CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

Matrix/CLHEP/Vector/AxisAngle.h
Go to the documentation of this file.
1 #ifndef HEP_AXISANGLE_H
2 #define HEP_AXISANGLE_H
3 
4 // ----------------------------------------------------------------------
5 //
6 // AxisAngle.h - provide HepAxisAngle class
7 //
8 // History:
9 // 23-Jan-1998 WEB Initial draft
10 // 15-Jun-1998 WEB Added namespace support
11 // 02-May-2000 WEB No global using
12 // 27-Jul-2000 MF CLHEP version
13 //
14 // ----------------------------------------------------------------------
15 
16 
17 #ifndef HEP_THREEVECTOR_H
18  #include "CLHEP/Vector/ThreeVector.h"
19 #endif
20 
21 #include <iostream>
22 #include "CLHEP/Vector/defs.h"
23 
24 
25 namespace CLHEP {
26 
27 
28 // Declarations of classes and global methods
29 class HepAxisAngle;
30 std::ostream & operator<<( std::ostream & os, const HepAxisAngle & aa );
31 std::istream & operator>>( std::istream & is, HepAxisAngle & aa );
32 
37 class HepAxisAngle {
38 
39 public:
40  typedef double Scalar;
41 
42 protected:
43  typedef HepAxisAngle AA; // just an abbreviation
44  static Scalar tolerance; // to determine relative nearness
45 
46 public:
47 
48  // ---------- Constructors:
49  inline HepAxisAngle();
50  inline HepAxisAngle( const Hep3Vector axis, Scalar delta );
51 
52  // ---------- Destructor, copy constructor, assignment:
53  // use C++ defaults
54 
55  // ---------- Accessors:
56 
57 public:
58  inline Hep3Vector getAxis() const;
59  inline Hep3Vector axis() const;
60  inline AA & setAxis( const Hep3Vector axis );
61 
62  inline double getDelta() const;
63  inline double delta() const ;
64  inline AA & setDelta( Scalar delta );
65 
66  inline AA & set( const Hep3Vector axis, Scalar delta );
67 
68  // ---------- Operations:
69 
70  // comparisons:
71  inline int compare ( const AA & aa ) const;
72 
73  inline bool operator==( const AA & aa ) const;
74  inline bool operator!=( const AA & aa ) const;
75  inline bool operator< ( const AA & aa ) const;
76  inline bool operator<=( const AA & aa ) const;
77  inline bool operator> ( const AA & aa ) const;
78  inline bool operator>=( const AA & aa ) const;
79 
80  // relative comparison:
81  inline static double getTolerance();
82  inline static double setTolerance( Scalar tol );
83 
84 protected:
85  double distance( const HepAxisAngle & aa ) const;
86 public:
87 
88  bool isNear ( const AA & aa, Scalar epsilon = tolerance ) const;
89  double howNear( const AA & aa ) const;
90 
91  // ---------- I/O:
92 
93  friend std::ostream & operator<<( std::ostream & os, const AA & aa );
94  friend std::istream & operator>>( std::istream & is, AA & aa );
95 
96 private:
97  Hep3Vector axis_; // Note: After construction, this is always of mag 1
98  double delta_;
99 
100 }; // HepAxisAngle
101 
102 
103 } // namespace CLHEP
104 
105 
106 namespace zmpv {
107 
109 
110 } // namespace zmpv
111 
112 
113 #define AXISANGLE_ICC
114 #include "CLHEP/Vector/AxisAngle.icc"
115 #undef AXISANGLE_ICC
116 
117 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
118 // backwards compatibility will be enabled ONLY in CLHEP 1.9
119 using namespace CLHEP;
120 #endif
121 
122 #endif // HEP_AXISANGLE_H
CLHEP::HepAxisAngle
Definition: Geometry/CLHEP/Vector/AxisAngle.h:37
CLHEP::HepAxisAngle::axis
Hep3Vector axis() const
CLHEP::HepAxisAngle::tolerance
static Scalar tolerance
Definition: Geometry/CLHEP/Vector/AxisAngle.h:44
CLHEP::HepAxisAngle::isNear
bool isNear(const AA &aa, Scalar epsilon=tolerance) const
Definition: AxisAngle.cc:65
CLHEP::HepAxisAngle::operator<=
bool operator<=(const AA &aa) const
CLHEP::HepAxisAngle::HepAxisAngle
HepAxisAngle()
CLHEP::HepAxisAngle::operator<<
friend std::ostream & operator<<(std::ostream &os, const AA &aa)
Definition: AxisAngle.cc:86
zmpv
Definition: Geometry/CLHEP/Vector/AxisAngle.h:106
is
HepRotation and so forth isNear() norm2() rectify() static Rotation row1 row4(To avoid bloat in the code pulled in for programs which don 't use all these features, we split the implementation .cc files. Only isNear() goes into the original Rotation.cc) --------------------------------------- HepAxisAngle and HepEulerAngles classes --------------------------------------- These classes are very useful and simple structures for holding the result of a nice intuituve decomposition of a rotation there is no longer much content in the distinct ZOOM PhysicsVectors library The only content left in the library is the object files representing the various Exception objects When we build the CLHEP classes for the ZOOM we will set up so as to use ZOOM SpaceVector is(but we can disable namespace usage and most of our users do so at this point). What I do is leave Hep3Vector in the global namespace
CLHEP::HepAxisAngle::operator>
bool operator>(const AA &aa) const
CLHEP::HepAxisAngle::howNear
double howNear(const AA &aa) const
Definition: AxisAngle.cc:72
CLHEP::HepAxisAngle::set
AA & set(const Hep3Vector axis, Scalar delta)
CLHEP::HepAxisAngle::operator>>
friend std::istream & operator>>(std::istream &is, AA &aa)
Definition: AxisAngle.cc:96
CLHEP::HepAxisAngle::operator==
bool operator==(const AA &aa) const
CLHEP::HepAxisAngle::setAxis
AA & setAxis(const Hep3Vector axis)
CLHEP::HepAxisAngle::distance
double distance(const HepAxisAngle &aa) const
Definition: AxisAngle.cc:46
CLHEP::HepAxisAngle::compare
int compare(const AA &aa) const
CLHEP
Definition: ClhepVersion.h:13
zmpv::AxisAngle
CLHEP::HepAxisAngle AxisAngle
Definition: Geometry/CLHEP/Vector/AxisAngle.h:108
CLHEP::HepAxisAngle::getTolerance
static double getTolerance()
CLHEP::HepAxisAngle::getAxis
Hep3Vector getAxis() const
CLHEP::Hep3Vector
Definition: Geometry/CLHEP/Vector/ThreeVector.h:41
CLHEP::HepAxisAngle::getDelta
double getDelta() const
CLHEP::HepAxisAngle::operator!=
bool operator!=(const AA &aa) const
CLHEP::HepAxisAngle::AA
HepAxisAngle AA
Definition: Matrix/CLHEP/Vector/AxisAngle.h:43
CLHEP::operator>>
std::istream & operator>>(std::istream &is, HepAxisAngle &aa)
Definition: AxisAngle.cc:96
CLHEP::HepAxisAngle::setDelta
AA & setDelta(Scalar delta)
CLHEP::HepAxisAngle::operator<
bool operator<(const AA &aa) const
CLHEP::HepAxisAngle::delta
double delta() const
CLHEP::HepAxisAngle::Scalar
double Scalar
Definition: Matrix/CLHEP/Vector/AxisAngle.h:40
CLHEP::operator<<
std::ostream & operator<<(std::ostream &os, const HepAxisAngle &aa)
Definition: AxisAngle.cc:86
CLHEP::HepAxisAngle::operator>=
bool operator>=(const AA &aa) const
CLHEP::HepAxisAngle::setTolerance
static double setTolerance(Scalar tol)