# class ROOT::Math::RotationZYX

Rotation class with the (3D) rotation represented by
angles describing first a rotation of
an angle phi (yaw) about the  Z axis,
followed by a rotation of an angle theta (pitch) about the new Y' axis,
followed by a third rotation of an angle psi (roll) about the final X'' axis.
This is  sometimes referred to as the Euler 321 sequence.
It has not to be confused with the typical Goldstein definition of the Euler Angles
(Z-X-Z or 313 sequence) which is used by the ROOT::Math::EulerAngles class.

@ingroup GenVector

## Function Members (Methods)

public:
 ~RotationZYX() void GetComponents(double* begin) const void GetComponents(ROOT::Math::RotationZYX::Scalar& phi, ROOT::Math::RotationZYX::Scalar& theta, ROOT::Math::RotationZYX::Scalar& psi) const ROOT::Math::RotationZYX Inverse() const void Invert() bool operator!=(const ROOT::Math::RotationZYX& rhs) const ROOT::Math::RotationZYX operator*(const ROOT::Math::RotationZYX& e) const ROOT::Math::RotationZYX operator*(const ROOT::Math::Rotation3D& r) const ROOT::Math::RotationZYX operator*(const ROOT::Math::AxisAngle& a) const ROOT::Math::RotationZYX operator*(const ROOT::Math::Quaternion& q) const ROOT::Math::RotationZYX operator*(const ROOT::Math::EulerAngles& q) const ROOT::Math::RotationZYX operator*(const ROOT::Math::RotationX& rx) const ROOT::Math::RotationZYX operator*(const ROOT::Math::RotationY& ry) const ROOT::Math::RotationZYX 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::RotationZYX& operator=(ROOT::Math::Rotation3D const& r) ROOT::Math::RotationZYX& operator=(ROOT::Math::AxisAngle const& r) ROOT::Math::RotationZYX& operator=(ROOT::Math::EulerAngles const& r) ROOT::Math::RotationZYX& operator=(ROOT::Math::Quaternion const& r) ROOT::Math::RotationZYX& operator=(ROOT::Math::RotationX const& r) ROOT::Math::RotationZYX& operator=(ROOT::Math::RotationY const& r) ROOT::Math::RotationZYX& operator=(ROOT::Math::RotationZ const& r) ROOT::Math::RotationZYX& operator=(const ROOT::Math::RotationZYX&) bool operator==(const ROOT::Math::RotationZYX& rhs) const ROOT::Math::RotationZYX::Scalar Phi() const ROOT::Math::RotationZYX::Scalar Psi() const void Rectify() ROOT::Math::RotationZYX RotationZYX() ROOT::Math::RotationZYX RotationZYX(const ROOT::Math::RotationZYX&) ROOT::Math::RotationZYX RotationZYX(ROOT::Math::RotationZYX::Scalar phi, ROOT::Math::RotationZYX::Scalar theta, ROOT::Math::RotationZYX::Scalar psi) void SetComponents(double* begin, double* end) void SetComponents(ROOT::Math::RotationZYX::Scalar phi, ROOT::Math::RotationZYX::Scalar theta, ROOT::Math::RotationZYX::Scalar psi) void SetPhi(ROOT::Math::RotationZYX::Scalar phi) void SetPsi(ROOT::Math::RotationZYX::Scalar psi) void SetTheta(ROOT::Math::RotationZYX::Scalar theta) ROOT::Math::RotationZYX::Scalar Theta() const
private:
 static double Pi()

## Data Members

private:
 double fPhi Z rotation angle (yaw) defined in (-PI,PI] double fPsi X'' rotation angle (roll) defined in (-PI,PI] double fTheta Y' rotation angle (pitch) defined in [-PI/2,PI/2]

## Function documentation

========== Constructors and Assignment =====================

Default constructor

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

{Rectify();}
RotationZYX(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

RotationZYX & operator=( OtherRotation const & r )
Assign from another supported rotation type (see gv_detail::convert )

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::RotationZYX::Scalar phi, ROOT::Math::RotationZYX::Scalar theta, ROOT::Math::RotationZYX::Scalar psi)
Set the components phi, theta, psi based on three Scalars.

void SetPhi(ROOT::Math::RotationZYX::Scalar phi)
Set Phi angle (Z rotation angle)

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

{ return fPhi; }
void SetTheta(ROOT::Math::RotationZYX::Scalar theta)
Set Theta angle (Y' rotation angle)

{ fTheta=theta; Rectify(); }
Scalar Theta() const
Return Theta angle (Y' rotation angle)

{ return fTheta; }
void SetPsi(ROOT::Math::RotationZYX::Scalar psi)
Set Psi angle (X'' rotation angle)

{ fPsi=psi; Rectify(); }
Scalar Psi() const
Return Psi angle (X'' rotation angle)

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

void Invert()
Invert a rotation in place

RotationZYX Inverse() const
Return inverse of a rotation

return ! operator==(rhs)
double Pi()
{ return M_PI; }
RotationZYX operator*(RotationX const & r1, RotationZYX const & r2)
Multiplication of an axial rotation by an AxisAngle

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