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

@ingroup GenVector

```

Function Members (Methods)

public:
 ~EulerAngles() ROOT::Math::EulerAngles EulerAngles() ROOT::Math::EulerAngles EulerAngles(const ROOT::Math::EulerAngles&) ROOT::Math::EulerAngles EulerAngles(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi) void GetComponents(double* begin) const void GetComponents(ROOT::Math::EulerAngles::Scalar& phi, ROOT::Math::EulerAngles::Scalar& theta, ROOT::Math::EulerAngles::Scalar& psi) const ROOT::Math::EulerAngles Inverse() const void Invert() bool operator!=(const ROOT::Math::EulerAngles& rhs) const ROOT::Math::EulerAngles operator*(const ROOT::Math::Rotation3D& r) const ROOT::Math::EulerAngles operator*(const ROOT::Math::AxisAngle& a) const ROOT::Math::EulerAngles operator*(const ROOT::Math::EulerAngles& e) const ROOT::Math::EulerAngles operator*(const ROOT::Math::Quaternion& q) const ROOT::Math::EulerAngles operator*(const ROOT::Math::RotationX& rx) const ROOT::Math::EulerAngles operator*(const ROOT::Math::RotationY& ry) const ROOT::Math::EulerAngles operator*(const ROOT::Math::RotationZ& rz) const ROOT::Math::PositionVector3D,ROOT::Math::DefaultCoordinateSystemTag> operator*(const ROOT::Math::PositionVector3D,ROOT::Math::DefaultCoordinateSystemTag>& v) const ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag> operator*(const ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag>& v) const ROOT::Math::LorentzVector > operator*(const ROOT::Math::LorentzVector >& v) const ROOT::Math::EulerAngles& operator=(ROOT::Math::Rotation3D const& r) ROOT::Math::EulerAngles& operator=(const ROOT::Math::EulerAngles&) bool operator==(const ROOT::Math::EulerAngles& rhs) const ROOT::Math::EulerAngles::Scalar Phi() const ROOT::Math::EulerAngles::Scalar Psi() const void Rectify() void SetComponents(double* begin, double* end) void SetComponents(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi) void SetPhi(ROOT::Math::EulerAngles::Scalar phi) void SetPsi(ROOT::Math::EulerAngles::Scalar psi) void SetTheta(ROOT::Math::EulerAngles::Scalar theta) ROOT::Math::EulerAngles::Scalar Theta() const
private:
 static double Pi()

Data Members

private:
 double fPhi Z rotation angle (first) defined in [-PI,PI] double fPsi Z rotation angle (third) defined in [-PI,PI] double fTheta X rotation angle (second) defined only [0,PI]

Function documentation

EulerAngles(const ROOT::Math::EulerAngles& )
```Default constructor

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

```
`{Rectify();}`
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)); }`
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()
```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()
```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()
```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 pohi and Psi
```

```Return inverse of a rotation

```
`{ return EulerAngles(-fPsi + Pi(), fTheta, -fPhi + Pi()); }`
return ! operator==(const ROOT::Math::EulerAngles& rhs) const
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)

Last update: root/mathcore:\$Id: EulerAngles.h 21503 2007-12-19 17:34:54Z moneta \$
Copyright (c) 2005 , LCG ROOT MathLib Team *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.