00001 #ifndef HEP_AXISANGLE_H
00002 #define HEP_AXISANGLE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef HEP_THREEVECTOR_H
00018 #include "CLHEP/Vector/ThreeVector.h"
00019 #endif
00020
00021
00022 class HepAxisAngle;
00023 HepStd::ostream & operator<<( HepStd::ostream & os, const HepAxisAngle & aa );
00024 HepStd::istream & operator>>( HepStd::istream & is, HepAxisAngle & aa );
00025
00030 class HepAxisAngle {
00031
00032 public:
00033 typedef double Scalar;
00034
00035 protected:
00036 typedef HepAxisAngle AA;
00037 static Scalar tolerance;
00038
00039 public:
00040
00041
00042 inline HepAxisAngle();
00043 inline HepAxisAngle( const Hep3Vector axis, Scalar delta );
00044
00045
00046
00047
00048
00049
00050 public:
00051 inline Hep3Vector getAxis() const;
00052 inline Hep3Vector axis() const;
00053 inline AA & setAxis( const Hep3Vector axis );
00054
00055 inline double getDelta() const;
00056 inline double delta() const ;
00057 inline AA & setDelta( Scalar delta );
00058
00059 inline AA & set( const Hep3Vector axis, Scalar delta );
00060
00061
00062
00063
00064 inline int compare ( const AA & aa ) const;
00065
00066 inline bool operator==( const AA & aa ) const;
00067 inline bool operator!=( const AA & aa ) const;
00068 inline bool operator< ( const AA & aa ) const;
00069 inline bool operator<=( const AA & aa ) const;
00070 inline bool operator> ( const AA & aa ) const;
00071 inline bool operator>=( const AA & aa ) const;
00072
00073
00074 inline static double getTolerance();
00075 inline static double setTolerance( Scalar tol );
00076
00077 protected:
00078 double distance( const HepAxisAngle & aa ) const;
00079 public:
00080
00081 bool isNear ( const AA & aa, Scalar epsilon = tolerance ) const;
00082 double howNear( const AA & aa ) const;
00083
00084
00085
00086 friend HepStd::ostream & operator<<( HepStd::ostream & os, const AA & aa );
00087 friend HepStd::istream & operator>>( HepStd::istream & is, AA & aa );
00088
00089 private:
00090 Hep3Vector axis_;
00091 double delta_;
00092
00093 };
00094
00095 namespace zmpv {
00096
00097 typedef HepAxisAngle AxisAngle;
00098
00099 }
00100
00101 #define AXISANGLE_ICC
00102 #include "CLHEP/Vector/AxisAngle.icc"
00103 #undef AXISANGLE_ICC
00104
00105 #endif // HEP_AXISANGLE_H