Geant4-11
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Attributes | Private Attributes | Friends
CLHEP::HepAxisAngle Class Reference

#include <AxisAngle.h>

Public Types

typedef double Scalar
 

Public Member Functions

Hep3Vector axis () const
 
int compare (const AA &aa) const
 
double delta () const
 
Hep3Vector getAxis () const
 
double getDelta () const
 
 HepAxisAngle ()
 
 HepAxisAngle (const Hep3Vector axis, Scalar delta)
 
double howNear (const AA &aa) const
 
bool isNear (const AA &aa, Scalar epsilon=tolerance) const
 
bool operator!= (const AA &aa) const
 
bool operator< (const AA &aa) const
 
bool operator<= (const AA &aa) const
 
bool operator== (const AA &aa) const
 
bool operator> (const AA &aa) const
 
bool operator>= (const AA &aa) const
 
AA & set (const Hep3Vector axis, Scalar delta)
 
AA & setAxis (const Hep3Vector axis)
 
AA & setDelta (Scalar delta)
 

Static Public Member Functions

static double getTolerance ()
 
static double setTolerance (Scalar tol)
 

Protected Types

typedef HepAxisAngle AA
 

Protected Member Functions

double distance (const HepAxisAngle &aa) const
 

Static Protected Attributes

static Scalar tolerance = Hep3Vector::ToleranceTicks * 1.0e-08
 

Private Attributes

Hep3Vector axis_
 
double delta_
 

Friends

std::ostream & operator<< (std::ostream &os, const AA &aa)
 
std::istream & operator>> (std::istream &is, AA &aa)
 

Detailed Description

Author

Definition at line 36 of file AxisAngle.h.

Member Typedef Documentation

◆ AA

Definition at line 42 of file AxisAngle.h.

◆ Scalar

Definition at line 39 of file AxisAngle.h.

Constructor & Destructor Documentation

◆ HepAxisAngle() [1/2]

CLHEP::HepAxisAngle::HepAxisAngle ( )
inline

◆ HepAxisAngle() [2/2]

CLHEP::HepAxisAngle::HepAxisAngle ( const Hep3Vector  axis,
Scalar  delta 
)
inline

Member Function Documentation

◆ axis()

Hep3Vector CLHEP::HepAxisAngle::axis ( ) const
inline

◆ compare()

int CLHEP::HepAxisAngle::compare ( const AA &  aa) const
inline

◆ delta()

double CLHEP::HepAxisAngle::delta ( ) const
inline

◆ distance()

double CLHEP::HepAxisAngle::distance ( const HepAxisAngle &  aa) const
protected

Definition at line 49 of file AxisAngle.cc.

49 {
50
51 double thisRep[9];
52 double aaRep[9];
53
54 ZMpvAxisAngleRep( *this, thisRep );
55 ZMpvAxisAngleRep( aa, aaRep );
56
57 double sum = 0.0;
58 for ( int i = 0; i < 9; i++ ) {
59 sum += thisRep[i] * aaRep[i];
60 }
61
62 double d = 3.0 - sum; // NaN-proofing:
63 return (d >= 0) ? d : 0; // std::sqrt(distance) is used in howNear()
64
65} // HepAxisAngle::distance()
static void ZMpvAxisAngleRep(const HepAxisAngle &aa, double array[])
Definition: AxisAngle.cc:24

References CLHEP::ZMpvAxisAngleRep().

Referenced by howNear(), and isNear().

◆ getAxis()

Hep3Vector CLHEP::HepAxisAngle::getAxis ( ) const
inline

◆ getDelta()

double CLHEP::HepAxisAngle::getDelta ( ) const
inline

◆ getTolerance()

static double CLHEP::HepAxisAngle::getTolerance ( )
inlinestatic

◆ howNear()

double CLHEP::HepAxisAngle::howNear ( const AA &  aa) const

Definition at line 75 of file AxisAngle.cc.

75 {
76
77 return std::sqrt( distance( aa ) );
78
79} // HepAxisAngle::howNear()
double distance(const HepAxisAngle &aa) const
Definition: AxisAngle.cc:49

References distance().

◆ isNear()

bool CLHEP::HepAxisAngle::isNear ( const AA &  aa,
Scalar  epsilon = tolerance 
) const

Definition at line 68 of file AxisAngle.cc.

68 {
69
70 return distance( aa ) <= epsilon * epsilon;
71
72} // HepAxisAngle::isNear()
G4double epsilon(G4double density, G4double temperature)

References distance(), and epsilon().

◆ operator!=()

bool CLHEP::HepAxisAngle::operator!= ( const AA &  aa) const
inline

◆ operator<()

bool CLHEP::HepAxisAngle::operator< ( const AA &  aa) const
inline

◆ operator<=()

bool CLHEP::HepAxisAngle::operator<= ( const AA &  aa) const
inline

◆ operator==()

bool CLHEP::HepAxisAngle::operator== ( const AA &  aa) const
inline

◆ operator>()

bool CLHEP::HepAxisAngle::operator> ( const AA &  aa) const
inline

◆ operator>=()

bool CLHEP::HepAxisAngle::operator>= ( const AA &  aa) const
inline

◆ set()

AA & CLHEP::HepAxisAngle::set ( const Hep3Vector  axis,
Scalar  delta 
)
inline

◆ setAxis()

AA & CLHEP::HepAxisAngle::setAxis ( const Hep3Vector  axis)
inline

◆ setDelta()

AA & CLHEP::HepAxisAngle::setDelta ( Scalar  delta)
inline

◆ setTolerance()

static double CLHEP::HepAxisAngle::setTolerance ( Scalar  tol)
inlinestatic

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const AA &  aa 
)
friend

Definition at line 89 of file AxisAngle.cc.

89 {
90 os << '(' << aa.axis() << ", " << aa.delta() << ')';
91 return os;
92} // operator<<()

◆ operator>>

std::istream & operator>> ( std::istream &  is,
AA &  aa 
)
friend

Definition at line 99 of file AxisAngle.cc.

99 {
100 Hep3Vector axis;
101 double delta;
102 double x,y,z;
103 ZMinputAxisAngle ( is, x, y, z, delta );
104 axis.set(x,y,z);
105 aa.set ( axis, delta );
106 return is;
107} // operator>>()
void set(double x, double y, double z)
double delta() const
Hep3Vector axis() const
void ZMinputAxisAngle(std::istream &is, double &x, double &y, double &z, double &delta)
Definition: ZMinput.cc:156

Field Documentation

◆ axis_

Hep3Vector CLHEP::HepAxisAngle::axis_
private

Definition at line 96 of file AxisAngle.h.

◆ delta_

double CLHEP::HepAxisAngle::delta_
private

Definition at line 97 of file AxisAngle.h.

◆ tolerance

double CLHEP::HepAxisAngle::tolerance = Hep3Vector::ToleranceTicks * 1.0e-08
staticprotected

Definition at line 43 of file AxisAngle.h.


The documentation for this class was generated from the following files: