CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
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
25namespace CLHEP {
26
27
28// Declarations of classes and global methods
29class HepAxisAngle;
30std::ostream & operator<<( std::ostream & os, const HepAxisAngle & aa );
31std::istream & operator>>( std::istream & is, HepAxisAngle & aa );
32
33/**
34 * @author
35 * @ingroup vector
36 */
38
39public:
40 typedef double Scalar;
41
42protected:
43 typedef HepAxisAngle AA; // just an abbreviation
44 static Scalar tolerance; // to determine relative nearness
45
46public:
47
48 // ---------- Constructors:
49 inline HepAxisAngle();
51
52 // ---------- Destructor, copy constructor, assignment:
53 // use C++ defaults
54
55 // ---------- Accessors:
56
57public:
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
84protected:
85 double distance( const HepAxisAngle & aa ) const;
86public:
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
96private:
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
106namespace 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
119using namespace CLHEP;
120#endif
121
122#endif // HEP_AXISANGLE_H
static double getTolerance()
bool operator==(const AA &aa) const
double getDelta() const
bool isNear(const AA &aa, Scalar epsilon=tolerance) const
Definition: AxisAngle.cc:69
bool operator>(const AA &aa) const
HepAxisAngle(const Hep3Vector axis, Scalar delta)
AA & setAxis(const Hep3Vector axis)
double distance(const HepAxisAngle &aa) const
Definition: AxisAngle.cc:50
double delta() const
bool operator>=(const AA &aa) const
static double setTolerance(Scalar tol)
double howNear(const AA &aa) const
Definition: AxisAngle.cc:76
Hep3Vector getAxis() const
int compare(const AA &aa) const
bool operator<(const AA &aa) const
static Scalar tolerance
Definition: AxisAngle.h:44
HepAxisAngle AA
Definition: AxisAngle.h:43
bool operator<=(const AA &aa) const
Hep3Vector axis() const
bool operator!=(const AA &aa) const
friend std::istream & operator>>(std::istream &is, AA &aa)
Definition: AxisAngle.cc:100
friend std::ostream & operator<<(std::ostream &os, const AA &aa)
Definition: AxisAngle.cc:90
AA & setDelta(Scalar delta)
AA & set(const Hep3Vector axis, Scalar delta)
std::istream & operator>>(std::istream &is, HepRandom &dist)
Definition: Random.cc:225
std::ostream & operator<<(std::ostream &s, const HepDiagMatrix &q)
Definition: DiagMatrix.cc:560
CLHEP::HepAxisAngle AxisAngle
Definition: AxisAngle.h:108