ROOT logo
ROOT » MATH » GENVECTOR » ROOT::Math::EulerAngles

class ROOT::Math::EulerAngles

      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
      <A HREF="">mathworld</A>
      and used in Mathematica and CLHEP. Note that the ROOT class TRotation defines
      a slightly different convention.

      @ingroup GenVector

Function Members (Methods)

ROOT::Math::EulerAnglesEulerAngles(const ROOT::Math::EulerAngles&)
ROOT::Math::EulerAnglesEulerAngles(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi)
voidGetComponents(double* begin) const
voidGetComponents(ROOT::Math::EulerAngles::Scalar& phi, ROOT::Math::EulerAngles::Scalar& theta, ROOT::Math::EulerAngles::Scalar& psi) const
ROOT::Math::EulerAnglesInverse() const
booloperator!=(const ROOT::Math::EulerAngles& rhs) const
ROOT::Math::EulerAnglesoperator*(const ROOT::Math::Rotation3D& r) const
ROOT::Math::EulerAnglesoperator*(const ROOT::Math::AxisAngle& a) const
ROOT::Math::EulerAnglesoperator*(const ROOT::Math::EulerAngles& e) const
ROOT::Math::EulerAnglesoperator*(const ROOT::Math::Quaternion& q) const
ROOT::Math::EulerAnglesoperator*(const ROOT::Math::RotationX& rx) const
ROOT::Math::EulerAnglesoperator*(const ROOT::Math::RotationY& ry) const
ROOT::Math::EulerAnglesoperator*(const ROOT::Math::RotationZ& rz) const
ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>operator*(const ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v) const
ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>operator*(const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v) const
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >operator*(const ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >& v) const
ROOT::Math::EulerAngles&operator=(ROOT::Math::Rotation3D const& r)
ROOT::Math::EulerAngles&operator=(ROOT::Math::Quaternion const& r)
ROOT::Math::EulerAngles&operator=(ROOT::Math::RotationX const& r)
ROOT::Math::EulerAngles&operator=(ROOT::Math::RotationY const& r)
ROOT::Math::EulerAngles&operator=(ROOT::Math::RotationZ const& r)
ROOT::Math::EulerAngles&operator=(const ROOT::Math::EulerAngles&)
booloperator==(const ROOT::Math::EulerAngles& rhs) const
ROOT::Math::EulerAngles::ScalarPhi() const
ROOT::Math::EulerAngles::ScalarPsi() const
voidSetComponents(double* begin, double* end)
voidSetComponents(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi)
voidSetPhi(ROOT::Math::EulerAngles::Scalar phi)
voidSetPsi(ROOT::Math::EulerAngles::Scalar psi)
voidSetTheta(ROOT::Math::EulerAngles::Scalar theta)
ROOT::Math::EulerAngles::ScalarTheta() const
static doublePi()

Data Members

doublefPhiZ rotation angle (first) defined in [-PI,PI]
doublefPsiZ rotation angle (third) defined in [-PI,PI]
doublefThetaX rotation angle (second) defined only [0,PI]

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

     Default constructor

{ }
EulerAngles(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi)
      Constructor from phi, theta and psi

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.

{ SetComponents(begin,end); }
void Rectify()
 The compiler-generated copy ctor, copy assignment, and dtor are OK.

      Re-adjust components place angles in canonical ranges

EulerAngles & operator=( OtherRotation const & r )
      Assign from any other rotation (see gv_detail::convert )

operator=( AxisAngle const & a )
      Assign from an AxisAngle

{ return operator=(EulerAngles(a)); }
operator=( Quaternion const & q )
      Assign from a Quaternion

{return operator=(EulerAngles(q)); }
operator=( RotationZ const & r )
      Assign from an axial rotation

{ return operator=(EulerAngles(r)); }
operator=( RotationY const & r )
{ return operator=(EulerAngles(r)); }
operator=( RotationX const & r )
{ return operator=(EulerAngles(r)); }
void SetComponents(double* begin, double* end)
 ======== Components ==============

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

void GetComponents(IT begin, IT end)
      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).

void GetComponents(double* begin) const
      Get the axis and then the angle into data specified by an iterator begin

void SetComponents(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi)
      Set the components phi, theta, psi based on three Scalars.

void SetPhi(ROOT::Math::EulerAngles::Scalar phi)
      Set Phi Euler angle		// JMM 30 Jan. 2006

{ fPhi=phi; Rectify(); }
Scalar Phi() const
      Return Phi Euler angle

{ return fPhi; }
void SetTheta(ROOT::Math::EulerAngles::Scalar theta)
      Set Theta Euler angle		// JMM 30 Jan. 2006

{ fTheta=theta; Rectify(); }
Scalar Theta() const
      Return Theta Euler angle

{ return fTheta; }
void SetPsi(ROOT::Math::EulerAngles::Scalar psi)
      Set Psi Euler angle		// JMM 30 Jan. 2006

{ fPsi=psi; Rectify(); }
Scalar Psi() const
      Return Psi Euler angle

{ return fPsi; }
AVector operator*(const AVector & v)
      Overload operator * for rotation on a vector

void Invert()
      Invert a rotation in place

 theta stays the same and negative rotation in Theta is done via a rotation
 of + PI in phi and Psi
EulerAngles Inverse() const
      Return inverse of a rotation

{ return EulerAngles(-fPsi + Pi(), fTheta, -fPhi + Pi()); }
return ! operator==(rhs)
double Pi()
{ return M_PI; }
EulerAngles operator*(RotationX const & r1, EulerAngles const & r2)
   Multiplication of an axial rotation by an AxisAngle

EulerAngles operator*(RotationY const & r1, EulerAngles const & r2)
EulerAngles operator*(RotationZ const & r1, EulerAngles const & r2)