Logo ROOT   6.14/05
Reference Guide
List of all members | Public Types | Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
ROOT::Math::EulerAngles Class Reference

EulerAngles class describing rotation as three angles (Euler Angles).

The Euler angles definition matches that of Classical Mechanics (Goldstein). It is also the same convention defined in mathworld and used in Mathematica and CLHEP. Note that the ROOT class TRotation defines a slightly different convention.

Definition at line 43 of file EulerAngles.h.

Public Types

typedef double Scalar
 

Public Member Functions

 EulerAngles ()
 Default constructor. More...
 
 EulerAngles (Scalar phi, Scalar theta, Scalar psi)
 Constructor from phi, theta and psi. More...
 
template<class IT >
 EulerAngles (IT begin, IT end)
 Construct given a pair of pointers or iterators defining the beginning and end of an array of three Scalars, to be treated as the angles phi, theta and psi. More...
 
template<class OtherRotation >
 EulerAngles (const OtherRotation &r)
 Create from any other supported rotation (see gv_detail::convert ) More...
 
template<class R >
Scalar Distance (const R &r) const
 Distance between two rotations. More...
 
template<class IT >
void GetComponents (IT begin, IT end) const
 Get the axis and then the angle into data specified by an iterator begin and another to the end of the desired data (4 past start). More...
 
template<class IT >
void GetComponents (IT begin) const
 Get the axis and then the angle into data specified by an iterator begin. More...
 
void GetComponents (Scalar &phi, Scalar &theta, Scalar &psi) const
 Get the components phi, theta, psi into three Scalars. More...
 
EulerAngles Inverse () const
 Return inverse of a rotation. More...
 
void Invert ()
 Invert a rotation in place. More...
 
bool operator!= (const EulerAngles &rhs) const
 
template<class CoordSystem , class U >
DisplacementVector3D< CoordSystem, U > operator() (const DisplacementVector3D< CoordSystem, U > &v) const
 Rotation operation on a displacement vector in any coordinate system and tag. More...
 
template<class CoordSystem , class U >
PositionVector3D< CoordSystem, U > operator() (const PositionVector3D< CoordSystem, U > &v) const
 Rotation operation on a position vector in any coordinate system. More...
 
template<class CoordSystem >
LorentzVector< CoordSystem > operator() (const LorentzVector< CoordSystem > &v) const
 Rotation operation on a Lorentz vector in any 4D coordinate system. More...
 
template<class ForeignVector >
ForeignVector operator() (const ForeignVector &v) const
 Rotation operation on an arbitrary vector v. More...
 
template<class AVector >
AVector operator* (const AVector &v) const
 Overload operator * for rotation on a vector. More...
 
EulerAngles operator* (const Rotation3D &r) const
 Multiply (combine) two rotations. More...
 
EulerAngles operator* (const AxisAngle &a) const
 
EulerAngles operator* (const EulerAngles &e) const
 
EulerAngles operator* (const Quaternion &q) const
 
EulerAngles operator* (const RotationX &rx) const
 
EulerAngles operator* (const RotationY &ry) const
 
EulerAngles operator* (const RotationZ &rz) const
 
template<class R >
EulerAnglesoperator*= (const R &r)
 Post-Multiply (on right) by another rotation : T = T*R. More...
 
template<class OtherRotation >
EulerAnglesoperator= (OtherRotation const &r)
 Assign from any other rotation (see gv_detail::convert ) More...
 
bool operator== (const EulerAngles &rhs) const
 Equality/inequality operators. More...
 
Scalar Phi () const
 Return Phi Euler angle. More...
 
Scalar Psi () const
 Return Psi Euler angle. More...
 
void Rectify ()
 Re-adjust components place angles in canonical ranges. More...
 
template<class IT >
void SetComponents (IT begin, IT end)
 Set the three Euler angles given a pair of pointers or iterators defining the beginning and end of an array of three Scalars. More...
 
void SetComponents (Scalar phi, Scalar theta, Scalar psi)
 Set the components phi, theta, psi based on three Scalars. More...
 
void SetPhi (Scalar phi)
 Set Phi Euler angle // JMM 30 Jan. More...
 
void SetPsi (Scalar psi)
 Set Psi Euler angle // JMM 30 Jan. More...
 
void SetTheta (Scalar theta)
 Set Theta Euler angle // JMM 30 Jan. More...
 
Scalar Theta () const
 Return Theta Euler angle. More...
 

Static Private Member Functions

static double Pi ()
 

Private Attributes

double fPhi
 
double fPsi
 
double fTheta
 

#include <Math/GenVector/EulerAngles.h>

Member Typedef Documentation

◆ Scalar

Definition at line 47 of file EulerAngles.h.

Constructor & Destructor Documentation

◆ EulerAngles() [1/4]

ROOT::Math::EulerAngles::EulerAngles ( )
inline

Default constructor.

Definition at line 52 of file EulerAngles.h.

◆ EulerAngles() [2/4]

ROOT::Math::EulerAngles::EulerAngles ( Scalar  phi,
Scalar  theta,
Scalar  psi 
)
inline

Constructor from phi, theta and psi.

Definition at line 57 of file EulerAngles.h.

◆ EulerAngles() [3/4]

template<class IT >
ROOT::Math::EulerAngles::EulerAngles ( IT  begin,
IT  end 
)
inline

Construct given a pair of pointers or iterators defining the beginning and end of an array of three Scalars, to be treated as the angles phi, theta and psi.

Definition at line 67 of file EulerAngles.h.

◆ EulerAngles() [4/4]

template<class OtherRotation >
ROOT::Math::EulerAngles::EulerAngles ( const OtherRotation &  r)
inlineexplicit

Create from any other supported rotation (see gv_detail::convert )

Definition at line 83 of file EulerAngles.h.

Member Function Documentation

◆ Distance()

template<class R >
Scalar ROOT::Math::EulerAngles::Distance ( const R r) const
inline

Distance between two rotations.

Definition at line 331 of file EulerAngles.h.

◆ GetComponents() [1/3]

template<class IT >
void ROOT::Math::EulerAngles::GetComponents ( IT  begin,
IT  end 
) const
inline

Get the axis and then the angle into data specified by an iterator begin and another to the end of the desired data (4 past start).

Definition at line 169 of file EulerAngles.h.

◆ GetComponents() [2/3]

template<class IT >
void ROOT::Math::EulerAngles::GetComponents ( IT  begin) const
inline

Get the axis and then the angle into data specified by an iterator begin.

Definition at line 183 of file EulerAngles.h.

◆ GetComponents() [3/3]

void ROOT::Math::EulerAngles::GetComponents ( Scalar phi,
Scalar theta,
Scalar psi 
) const
inline

Get the components phi, theta, psi into three Scalars.

Definition at line 200 of file EulerAngles.h.

◆ Inverse()

EulerAngles ROOT::Math::EulerAngles::Inverse ( ) const
inline

Return inverse of a rotation.

Definition at line 306 of file EulerAngles.h.

◆ Invert()

void ROOT::Math::EulerAngles::Invert ( )
inline

Invert a rotation in place.

Definition at line 297 of file EulerAngles.h.

◆ operator!=()

bool ROOT::Math::EulerAngles::operator!= ( const EulerAngles rhs) const
inline

Definition at line 342 of file EulerAngles.h.

◆ operator()() [1/4]

template<class CoordSystem , class U >
DisplacementVector3D<CoordSystem,U> ROOT::Math::EulerAngles::operator() ( const DisplacementVector3D< CoordSystem, U > &  v) const
inline

Rotation operation on a displacement vector in any coordinate system and tag.

Definition at line 242 of file EulerAngles.h.

◆ operator()() [2/4]

template<class CoordSystem , class U >
PositionVector3D<CoordSystem, U> ROOT::Math::EulerAngles::operator() ( const PositionVector3D< CoordSystem, U > &  v) const
inline

Rotation operation on a position vector in any coordinate system.

Definition at line 251 of file EulerAngles.h.

◆ operator()() [3/4]

template<class CoordSystem >
LorentzVector<CoordSystem> ROOT::Math::EulerAngles::operator() ( const LorentzVector< CoordSystem > &  v) const
inline

Rotation operation on a Lorentz vector in any 4D coordinate system.

Definition at line 262 of file EulerAngles.h.

◆ operator()() [4/4]

template<class ForeignVector >
ForeignVector ROOT::Math::EulerAngles::operator() ( const ForeignVector &  v) const
inline

Rotation operation on an arbitrary vector v.

Preconditions: v must implement methods x(), y(), and z() and the arbitrary vector type must have a constructor taking (x,y,z)

Definition at line 276 of file EulerAngles.h.

◆ operator*() [1/8]

template<class AVector >
AVector ROOT::Math::EulerAngles::operator* ( const AVector &  v) const
inline

Overload operator * for rotation on a vector.

Definition at line 287 of file EulerAngles.h.

◆ operator*() [2/8]

EulerAngles ROOT::Math::EulerAngles::operator* ( const Rotation3D r) const

Multiply (combine) two rotations.

Definition at line 73 of file EulerAngles.cxx.

◆ operator*() [3/8]

EulerAngles ROOT::Math::EulerAngles::operator* ( const AxisAngle a) const

Definition at line 78 of file EulerAngles.cxx.

◆ operator*() [4/8]

EulerAngles ROOT::Math::EulerAngles::operator* ( const EulerAngles e) const

Definition at line 83 of file EulerAngles.cxx.

◆ operator*() [5/8]

EulerAngles ROOT::Math::EulerAngles::operator* ( const Quaternion q) const

Definition at line 87 of file EulerAngles.cxx.

◆ operator*() [6/8]

EulerAngles ROOT::Math::EulerAngles::operator* ( const RotationX rx) const

Definition at line 92 of file EulerAngles.cxx.

◆ operator*() [7/8]

EulerAngles ROOT::Math::EulerAngles::operator* ( const RotationY ry) const

Definition at line 97 of file EulerAngles.cxx.

◆ operator*() [8/8]

EulerAngles ROOT::Math::EulerAngles::operator* ( const RotationZ rz) const

Definition at line 102 of file EulerAngles.cxx.

◆ operator*=()

template<class R >
EulerAngles& ROOT::Math::EulerAngles::operator*= ( const R r)
inline

Post-Multiply (on right) by another rotation : T = T*R.

Definition at line 325 of file EulerAngles.h.

◆ operator=()

template<class OtherRotation >
EulerAngles& ROOT::Math::EulerAngles::operator= ( OtherRotation const &  r)
inline

Assign from any other rotation (see gv_detail::convert )

Definition at line 89 of file EulerAngles.h.

◆ operator==()

bool ROOT::Math::EulerAngles::operator== ( const EulerAngles rhs) const
inline

Equality/inequality operators.

Definition at line 336 of file EulerAngles.h.

◆ Phi()

Scalar ROOT::Math::EulerAngles::Phi ( ) const
inline

Return Phi Euler angle.

Definition at line 212 of file EulerAngles.h.

◆ Pi()

static double ROOT::Math::EulerAngles::Pi ( )
inlinestaticprivate

Definition at line 352 of file EulerAngles.h.

◆ Psi()

Scalar ROOT::Math::EulerAngles::Psi ( ) const
inline

Return Psi Euler angle.

Definition at line 232 of file EulerAngles.h.

◆ Rectify()

void ROOT::Math::EulerAngles::Rectify ( )

Re-adjust components place angles in canonical ranges.

Definition at line 38 of file EulerAngles.cxx.

◆ SetComponents() [1/2]

template<class IT >
void ROOT::Math::EulerAngles::SetComponents ( IT  begin,
IT  end 
)
inline

Set the three Euler angles given a pair of pointers or iterators defining the beginning and end of an array of three Scalars.

Definition at line 152 of file EulerAngles.h.

◆ SetComponents() [2/2]

void ROOT::Math::EulerAngles::SetComponents ( Scalar  phi,
Scalar  theta,
Scalar  psi 
)
inline

Set the components phi, theta, psi based on three Scalars.

Definition at line 192 of file EulerAngles.h.

◆ SetPhi()

void ROOT::Math::EulerAngles::SetPhi ( Scalar  phi)
inline

Set Phi Euler angle // JMM 30 Jan.

2006

Definition at line 207 of file EulerAngles.h.

◆ SetPsi()

void ROOT::Math::EulerAngles::SetPsi ( Scalar  psi)
inline

Set Psi Euler angle // JMM 30 Jan.

2006

Definition at line 227 of file EulerAngles.h.

◆ SetTheta()

void ROOT::Math::EulerAngles::SetTheta ( Scalar  theta)
inline

Set Theta Euler angle // JMM 30 Jan.

2006

Definition at line 217 of file EulerAngles.h.

◆ Theta()

Scalar ROOT::Math::EulerAngles::Theta ( ) const
inline

Return Theta Euler angle.

Definition at line 222 of file EulerAngles.h.

Member Data Documentation

◆ fPhi

double ROOT::Math::EulerAngles::fPhi
private

Definition at line 348 of file EulerAngles.h.

◆ fPsi

double ROOT::Math::EulerAngles::fPsi
private

Definition at line 350 of file EulerAngles.h.

◆ fTheta

double ROOT::Math::EulerAngles::fTheta
private

Definition at line 349 of file EulerAngles.h.


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