class ROOT::Math::Rotation3D


Rotation class with the (3D) rotation represented by
a 3x3 orthogonal matrix.
This is the optimal representation for application to vectors.
See also ROOT::Math::AxisAngle, ROOT::Math::EulerAngles, and ROOT::Math::Quaternion for
classes which have conversion operators to Rotation3D.

All Rotations types (not only Rotation3D) can be applied to all 3D Vector classes
(like ROOT::Math::DisplacementVector3D and ROOT::Math::PositionVector3D)
and also to the 4D Vectors (ROOT::Math::LorentzVector classes), acting on the 3D components.
A rotaiton operation is applied by using the operator() or the operator *.
With the operator * is possible also to combine rotations.
Note that the operator is NOT commutative, the order how the rotations are applied is relevant.

@ingroup GenVector

Function Members (Methods)

public:
~Rotation3D()
voidGetComponents(double* begin) const
voidGetComponents(double* begin, double* end) const
voidGetComponents(ROOT::Math::Rotation3D::Scalar& xx, ROOT::Math::Rotation3D::Scalar& xy, ROOT::Math::Rotation3D::Scalar& xz, ROOT::Math::Rotation3D::Scalar& yx, ROOT::Math::Rotation3D::Scalar& yy, ROOT::Math::Rotation3D::Scalar& yz, ROOT::Math::Rotation3D::Scalar& zx, ROOT::Math::Rotation3D::Scalar& zy, ROOT::Math::Rotation3D::Scalar& zz) const
ROOT::Math::Rotation3DInverse() const
voidInvert()
booloperator!=(const ROOT::Math::Rotation3D& rhs) const
ROOT::Math::Rotation3Doperator*(const ROOT::Math::Rotation3D& r) const
ROOT::Math::Rotation3Doperator*(const ROOT::Math::AxisAngle& a) const
ROOT::Math::Rotation3Doperator*(const ROOT::Math::EulerAngles& e) const
ROOT::Math::Rotation3Doperator*(const ROOT::Math::Quaternion& q) const
ROOT::Math::Rotation3Doperator*(const ROOT::Math::RotationZYX& r) const
ROOT::Math::Rotation3Doperator*(const ROOT::Math::RotationX& rx) const
ROOT::Math::Rotation3Doperator*(const ROOT::Math::RotationY& ry) const
ROOT::Math::Rotation3Doperator*(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::Rotation3D&operator=(ROOT::Math::AxisAngle const& a)
ROOT::Math::Rotation3D&operator=(ROOT::Math::EulerAngles const& e)
ROOT::Math::Rotation3D&operator=(ROOT::Math::RotationZYX const& r)
ROOT::Math::Rotation3D&operator=(ROOT::Math::Quaternion const& q)
ROOT::Math::Rotation3D&operator=(ROOT::Math::RotationZ const& r)
ROOT::Math::Rotation3D&operator=(ROOT::Math::RotationY const& r)
ROOT::Math::Rotation3D&operator=(ROOT::Math::RotationX const& r)
ROOT::Math::Rotation3D&operator=(const ROOT::Math::Rotation3D&)
booloperator==(const ROOT::Math::Rotation3D& rhs) const
voidRectify()
ROOT::Math::Rotation3DRotation3D()
ROOT::Math::Rotation3DRotation3D(ROOT::Math::AxisAngle const& a)
ROOT::Math::Rotation3DRotation3D(ROOT::Math::EulerAngles const& e)
ROOT::Math::Rotation3DRotation3D(ROOT::Math::RotationZYX const& e)
ROOT::Math::Rotation3DRotation3D(ROOT::Math::Quaternion const& q)
ROOT::Math::Rotation3DRotation3D(ROOT::Math::RotationZ const& r)
ROOT::Math::Rotation3DRotation3D(ROOT::Math::RotationY const& r)
ROOT::Math::Rotation3DRotation3D(ROOT::Math::RotationX const& r)
ROOT::Math::Rotation3DRotation3D(const ROOT::Math::Rotation3D&)
ROOT::Math::Rotation3DRotation3D(double* begin, double* end)
ROOT::Math::Rotation3DRotation3D(const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v1, const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v2, const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v3)
ROOT::Math::Rotation3DRotation3D(ROOT::Math::Rotation3D::Scalar xx, ROOT::Math::Rotation3D::Scalar xy, ROOT::Math::Rotation3D::Scalar xz, ROOT::Math::Rotation3D::Scalar yx, ROOT::Math::Rotation3D::Scalar yy, ROOT::Math::Rotation3D::Scalar yz, ROOT::Math::Rotation3D::Scalar zx, ROOT::Math::Rotation3D::Scalar zy, ROOT::Math::Rotation3D::Scalar zz)
voidSetComponents(double* begin, double* end)
voidSetComponents(const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v1, const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v2, const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v3)
voidSetComponents(ROOT::Math::Rotation3D::Scalar xx, ROOT::Math::Rotation3D::Scalar xy, ROOT::Math::Rotation3D::Scalar xz, ROOT::Math::Rotation3D::Scalar yx, ROOT::Math::Rotation3D::Scalar yy, ROOT::Math::Rotation3D::Scalar yz, ROOT::Math::Rotation3D::Scalar zx, ROOT::Math::Rotation3D::Scalar zy, ROOT::Math::Rotation3D::Scalar zz)

Data Members

public:
enum ERotation3DMatrixIndex { kXX
kXY
kXZ
kYX
kYY
kYZ
kZX
kZY
kZZ
};
private:
ROOT::Math::Rotation3D::ScalarfM[9]9 elements (3x3 matrix) representing the rotation

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Rotation3D()
 ========== Constructors and Assignment =====================

Default constructor (identity rotation)

Rotation3D(double* begin, double* end)
Construct given a pair of pointers or iterators defining the
beginning and end of an array of nine Scalars

{ SetComponents(begin,end); }
explicit Rotation3D( AxisAngle const & a )
Construct from an AxisAngle

{ gv_detail::convert(a, *this); }
explicit Rotation3D( EulerAngles const & e )
Construct from EulerAngles

{ gv_detail::convert(e, *this); }
explicit Rotation3D( RotationZYX const & e )
Construct from RotationZYX

{ gv_detail::convert(e, *this); }
explicit Rotation3D( Quaternion const & q )
Construct from a Quaternion

{ gv_detail::convert(q, *this); }
explicit Rotation3D( RotationZ const & r )
Construct from an axial rotation

{ gv_detail::convert(r, *this); }
explicit Rotation3D( RotationY const & r )
{ gv_detail::convert(r, *this); }
explicit Rotation3D( RotationX const & r )
{ gv_detail::convert(r, *this); }
explicit Rotation3D(const ForeignMatrix & m)
Construct from a linear algebra matrix of size at least 3x3,
which must support operator()(i,j) to obtain elements (0,0) thru (2,2).
Precondition:  The matrix is assumed to be orthonormal.  No checking
or re-adjusting is performed.

{ SetComponents(m); }
Rotation3D(const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v1, const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v2, const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v3)
Construct from three orthonormal vectors (which must have methods
x(), y() and z()) which will be used as the columns of the rotation
matrix.  The orthonormality will be checked, and values adjusted
so that the result will always be a good rotation matrix.

SetComponents(ROOT::Math::Rotation3D::Scalar xx, ROOT::Math::Rotation3D::Scalar xy, ROOT::Math::Rotation3D::Scalar xz, ROOT::Math::Rotation3D::Scalar yx, ROOT::Math::Rotation3D::Scalar yy, ROOT::Math::Rotation3D::Scalar yz, ROOT::Math::Rotation3D::Scalar zx, ROOT::Math::Rotation3D::Scalar zy, ROOT::Math::Rotation3D::Scalar zz)
operator=( AxisAngle const & a )
Assign from an AxisAngle

{ return operator=(Rotation3D(a)); }
operator=( EulerAngles const & e )
Assign from EulerAngles

{ return operator=(Rotation3D(e)); }
operator=( RotationZYX const & r )
Assign from RotationZYX

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

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

{ return operator=(Rotation3D(r)); }
operator=( RotationY const & r )
{ return operator=(Rotation3D(r)); }
operator=( RotationX const & r )
{ return operator=(Rotation3D(r)); }
operator=(const ForeignMatrix & m)
Assign from an orthonormal linear algebra matrix of size 3x3,
which must support operator()(i,j) to obtain elements (0,0) thru (2,2).

{ SetComponents(m); return *this; }
void Rectify()
Re-adjust components to eliminate small deviations from perfect
orthonormality.

SetComponents(const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v1, const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v2, const ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>& v3)
 ======== Components ==============

Set components from three orthonormal vectors (which must have methods
x(), y() and z()) which will be used as the columns of the rotation
matrix.  The orthonormality will be checked, and values adjusted
so that the result will always be a good rotation matrix.

GetComponents( ForeignVector& v1, ForeignVector& v2, ForeignVector& v3 )
Get components into three vectors which will be the (orthonormal)
columns of the rotation matrix.  (The vector class must have a
constructor from 3 Scalars.)

void SetComponents(double* begin, double* end)
Set the 9 matrix components given an iterator to the start of
the desired data, and another to the end (9 past start).

void GetComponents(double* begin, double* end) const
Get the 9 matrix components into data specified by an iterator begin
and another to the end of the desired data (9 past start).

void GetComponents(double* begin) const
Get the 9 matrix components into data specified by an iterator begin

AVector operator*(const AVector & v)
Overload operator * for rotation on a vector

void Invert()
Invert a rotation in place

Rotation3D Inverse()
Return inverse of  a rotation

{ Rotation3D t(*this); t.Invert(); return t; }
return ! operator==(const ROOT::Math::Rotation3D& rhs) const
Rotation3D operator*(RotationX const & r1, Rotation3D const & r2)
Multiplication of an axial rotation by a Rotation3D

Rotation3D operator*(RotationY const & r1, Rotation3D const & r2)
Rotation3D operator*(RotationZ const & r1, Rotation3D const & r2)
Rotation3D operator*(RotationX const & r1, RotationY const & r2)
Multiplication of an axial rotation by another axial Rotation

Rotation3D operator*(RotationX const & r1, RotationZ const & r2)
Rotation3D operator*(RotationY const & r1, RotationX const & r2)
Rotation3D operator*(RotationY const & r1, RotationZ const & r2)
Rotation3D operator*(RotationZ const & r1, RotationX const & r2)
Rotation3D operator*(RotationZ const & r1, RotationY const & r2)

Last update: root/mathcore:$Id: Rotation3D.h 21503 2007-12-19 17:34:54Z moneta $
Copyright (c) 2005 , LCG ROOT FNAL 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.