Rotation class with the (3D) rotation represented by a unit quaternion (u, i, j, k). This is the optimal representation for multiplication of multiple rotations, and for computation of group-manifold-invariant distance between two rotations. See also ROOT::Math::AxisAngle, ROOT::Math::EulerAngles, and ROOT::Math::Rotation3D. @ingroup GenVector
ROOT::Math::Quaternion::Scalar | fI | |
ROOT::Math::Quaternion::Scalar | fJ | |
ROOT::Math::Quaternion::Scalar | fK | |
ROOT::Math::Quaternion::Scalar | fU |
========== Constructors and Assignment ===================== Default constructor (identity rotation)
{ }
Construct given a pair of pointers or iterators defining the beginning and end of an array of four Scalars
{ SetComponents(begin,end); }
======== Construction From other Rotation Forms ================== Construct from another supported rotation type (see gv_detail::convert )
{gv_detail::convert(r,*this);}
Construct from four Scalars representing the coefficients of u, i, j, k
{ }
The compiler-generated copy ctor, copy assignment, and dtor are OK. Re-adjust components to eliminate small deviations from |Q| = 1 orthonormality.
Assign from another supported rotation type (see gv_detail::convert )
======== Components ============== Set the four components given an iterator to the start of the desired data, and another to the end (4 past start).
Get the components into data specified by an iterator begin and another to the end of the desired data (4 past start).
Access to the four quaternion components: U() is the coefficient of the identity Pauli matrix, I(), J() and K() are the coefficients of sigma_x, sigma_y, sigma_z
{ return fU; }
Distance between two rotations in Quaternion form Note: The rotation group is isomorphic to a 3-sphere with diametrically opposite points identified. The (rotation group-invariant) is the smaller of the two possible angles between the images of the two totations on that sphere. Thus the distance is never greater than pi/2.
Multiplication of an axial rotation by an AxisAngle