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

RandomObjects/CLHEP/Vector/EulerAngles.h
Go to the documentation of this file.
1 #ifndef HEP_EULERANGLES_H
2 #define HEP_EULERANGLES_H
3 
4 // ----------------------------------------------------------------------
5 //
6 // EulerAngles.h EulerAngles class --
7 // Support class for PhysicsVectors classes
8 //
9 // History:
10 // 09-Jan-1998 WEB FixedTypes is now found in ZMutility
11 // 12-Jan-1998 WEB PI is now found in ZMutility
12 // 15-Jun-1998 WEB Added namespace support
13 // 02-May-2000 WEB No global using
14 // 26-Jul-2000 MF CLHEP version
15 //
16 // ----------------------------------------------------------------------
17 
18 #include <iostream>
19 #include "CLHEP/Vector/defs.h"
20 
21 namespace CLHEP {
22 
23 // Declarations of classes and global methods
24 class HepEulerAngles;
25 std::ostream & operator<<(std::ostream & os, const HepEulerAngles & aa);
26 std::istream & operator>>(std::istream & is, HepEulerAngles & aa);
27 
32 class HepEulerAngles {
33 
34 protected:
35  typedef HepEulerAngles EA; // just an abbreviation
36  static double tolerance; // to determine relative nearness
37 
38 public:
39 
40  // ---------- Constructors:
41  inline HepEulerAngles();
42  inline HepEulerAngles( double phi, double theta, double psi );
43 
44  // ---------- Destructor, copy constructor, assignment:
45  // use C++ defaults
46 
47  // ---------- Accessors:
48 
49 public:
50  inline double getPhi() const;
51  inline double phi() const;
52  inline EA & setPhi( double phi );
53 
54  inline double getTheta() const;
55  inline double theta() const;
56  inline EA & setTheta( double theta );
57 
58  inline double getPsi() const;
59  inline double psi() const;
60  inline EA & setPsi( double psi );
61 
62  inline EA & set( double phi, double theta, double psi );
63 
64  // ---------- Operations:
65 
66  // comparisons:
67  inline int compare ( const EA & ea ) const;
68 
69  inline bool operator==( const EA & ea ) const;
70  inline bool operator!=( const EA & ea ) const;
71  inline bool operator< ( const EA & ea ) const;
72  inline bool operator<=( const EA & ea ) const;
73  inline bool operator> ( const EA & ea ) const;
74  inline bool operator>=( const EA & ea ) const;
75 
76  // relative comparison:
77  inline static double getTolerance();
78  inline static double setTolerance( double tol );
79 
80  bool isNear ( const EA & ea, double epsilon = tolerance ) const;
81  double howNear( const EA & ea ) const;
82 
83  // ---------- I/O:
84 
85  friend std::ostream & operator<<( std::ostream & os, const EA & ea );
86  friend std::istream & operator>>( std::istream & is, EA & ea );
87 
88  // ---------- Helper methods:
89 
90 protected:
91  double distance( const HepEulerAngles & ex ) const;
92 
93  // ---------- Data members:
94 protected:
95  double phi_;
96  double theta_;
97  double psi_;
98 
99 }; // HepEulerAngles
100 
101 } // namespace CLHEP
102 
103 
104 namespace zmpv {
105 
107 
108 } // end of namespace zmpv
109 
110 #define EULERANGLES_ICC
111 #include "CLHEP/Vector/EulerAngles.icc"
112 #undef EULERANGLES_ICC
113 
114 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
115 // backwards compatibility will be enabled ONLY in CLHEP 1.9
116 using namespace CLHEP;
117 #endif
118 
119 
120 #endif // EULERANGLES_H
CLHEP::HepEulerAngles::theta
double theta() const
CLHEP::HepEulerAngles::compare
int compare(const EA &ea) const
CLHEP::HepEulerAngles::getPsi
double getPsi() const
CLHEP::HepEulerAngles::operator>=
bool operator>=(const EA &ea) const
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::HepEulerAngles::getTheta
double getTheta() const
CLHEP::HepEulerAngles::operator<<
friend std::ostream & operator<<(std::ostream &os, const EA &ea)
Definition: EulerAngles.cc:101
CLHEP::HepEulerAngles::set
EA & set(double phi, double theta, double psi)
CLHEP::HepEulerAngles::setPhi
EA & setPhi(double phi)
CLHEP::HepEulerAngles::setTolerance
static double setTolerance(double tol)
CLHEP::HepEulerAngles::operator<=
bool operator<=(const EA &ea) const
CLHEP::HepEulerAngles::phi
double phi() const
CLHEP::HepEulerAngles::distance
double distance(const HepEulerAngles &ex) const
Definition: EulerAngles.cc:65
CLHEP::HepEulerAngles::isNear
bool isNear(const EA &ea, double epsilon=tolerance) const
Definition: EulerAngles.cc:84
CLHEP::HepEulerAngles::operator<
bool operator<(const EA &ea) const
CLHEP
Definition: ClhepVersion.h:13
CLHEP::HepEulerAngles::setPsi
EA & setPsi(double psi)
CLHEP::HepEulerAngles::theta_
double theta_
Definition: Geometry/CLHEP/Vector/EulerAngles.h:96
CLHEP::HepEulerAngles::operator>
bool operator>(const EA &ea) const
CLHEP::HepEulerAngles::operator==
bool operator==(const EA &ea) const
CLHEP::HepEulerAngles::HepEulerAngles
HepEulerAngles()
CLHEP::HepEulerAngles::operator!=
bool operator!=(const EA &ea) const
CLHEP::HepEulerAngles::getPhi
double getPhi() const
CLHEP::operator>>
std::istream & operator>>(std::istream &is, HepAxisAngle &aa)
Definition: AxisAngle.cc:96
CLHEP::HepEulerAngles::tolerance
static double tolerance
Definition: Geometry/CLHEP/Vector/EulerAngles.h:36
CLHEP::HepEulerAngles::EA
HepEulerAngles EA
Definition: RandomObjects/CLHEP/Vector/EulerAngles.h:35
CLHEP::HepEulerAngles::operator>>
friend std::istream & operator>>(std::istream &is, EA &ea)
Definition: EulerAngles.cc:110
CLHEP::HepEulerAngles::phi_
double phi_
Definition: Geometry/CLHEP/Vector/EulerAngles.h:95
CLHEP::HepEulerAngles::setTheta
EA & setTheta(double theta)
CLHEP::operator<<
std::ostream & operator<<(std::ostream &os, const HepAxisAngle &aa)
Definition: AxisAngle.cc:86
CLHEP::HepEulerAngles
Definition: Geometry/CLHEP/Vector/EulerAngles.h:32
CLHEP::HepEulerAngles::psi
double psi() const
CLHEP::HepEulerAngles::getTolerance
static double getTolerance()
CLHEP::HepEulerAngles::howNear
double howNear(const EA &ea) const
Definition: EulerAngles.cc:91
zmpv::EulerAngles
CLHEP::HepEulerAngles EulerAngles
Definition: Geometry/CLHEP/Vector/EulerAngles.h:106
CLHEP::HepEulerAngles::psi_
double psi_
Definition: Geometry/CLHEP/Vector/EulerAngles.h:97