File indexing completed on 2025-01-18 09:54:39
0001 #ifndef HEP_AXISANGLE_H
0002 #define HEP_AXISANGLE_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef HEP_THREEVECTOR_H
0018 #include "CLHEP/Vector/ThreeVector.h"
0019 #endif
0020
0021 #include <iostream>
0022 #include "CLHEP/Vector/defs.h"
0023
0024
0025 namespace CLHEP {
0026
0027
0028
0029 class HepAxisAngle;
0030 std::ostream & operator<<( std::ostream & os, const HepAxisAngle & aa );
0031 std::istream & operator>>( std::istream & is, HepAxisAngle & aa );
0032
0033
0034
0035
0036
0037 class HepAxisAngle {
0038
0039 public:
0040 typedef double Scalar;
0041
0042 protected:
0043 typedef HepAxisAngle AA;
0044 static Scalar tolerance;
0045
0046 public:
0047
0048
0049 inline HepAxisAngle();
0050 inline HepAxisAngle( const Hep3Vector axis, Scalar delta );
0051
0052
0053
0054
0055
0056
0057 public:
0058 inline Hep3Vector getAxis() const;
0059 inline Hep3Vector axis() const;
0060 inline AA & setAxis( const Hep3Vector axis );
0061
0062 inline double getDelta() const;
0063 inline double delta() const ;
0064 inline AA & setDelta( Scalar delta );
0065
0066 inline AA & set( const Hep3Vector axis, Scalar delta );
0067
0068
0069
0070
0071 inline int compare ( const AA & aa ) const;
0072
0073 inline bool operator==( const AA & aa ) const;
0074 inline bool operator!=( const AA & aa ) const;
0075 inline bool operator< ( const AA & aa ) const;
0076 inline bool operator<=( const AA & aa ) const;
0077 inline bool operator> ( const AA & aa ) const;
0078 inline bool operator>=( const AA & aa ) const;
0079
0080
0081 inline static double getTolerance();
0082 inline static double setTolerance( Scalar tol );
0083
0084 protected:
0085 double distance( const HepAxisAngle & aa ) const;
0086 public:
0087
0088 bool isNear ( const AA & aa, Scalar epsilon = tolerance ) const;
0089 double howNear( const AA & aa ) const;
0090
0091
0092
0093 friend std::ostream & operator<<( std::ostream & os, const AA & aa );
0094 friend std::istream & operator>>( std::istream & is, AA & aa );
0095
0096 private:
0097 Hep3Vector axis_;
0098 double delta_;
0099
0100 };
0101
0102
0103 }
0104
0105
0106 namespace zmpv {
0107
0108 typedef CLHEP::HepAxisAngle AxisAngle;
0109
0110 }
0111
0112
0113 #define AXISANGLE_ICC
0114 #include "CLHEP/Vector/AxisAngle.icc"
0115 #undef AXISANGLE_ICC
0116
0117 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
0118
0119 using namespace CLHEP;
0120 #endif
0121
0122 #endif