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
ROOT::Math::Rotation3D::Scalar | fM[9] | 9 elements (3x3 matrix) representing the rotation |
========== Constructors and Assignment ===================== Default constructor (identity rotation)
Construct given a pair of pointers or iterators defining the beginning and end of an array of nine Scalars
{ SetComponents(begin,end); }
Construct from an AxisAngle
{ gv_detail::convert(a, *this); }
Construct from EulerAngles
{ gv_detail::convert(e, *this); }
Construct from RotationZYX
{ gv_detail::convert(e, *this); }
Construct from a Quaternion
{ gv_detail::convert(q, *this); }
Construct from an axial rotation
{ gv_detail::convert(r, *this); }
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); }
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.
compiler generated destruuctor is ok Raw constructor from nine Scalar components (without any checking)
need to implement assignment operator to avoid using the templated one Assignment operator
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.)
Get the 9 matrix components into data specified by an iterator begin and another to the end of the desired data (9 past start).
Get the 9 matrix components into data specified by an iterator begin
Return inverse of a rotation
{ Rotation3D t(*this); t.Invert(); return t; }
Multiplication of an axial rotation by a Rotation3D
Multiplication of an axial rotation by another axial Rotation