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() |
void | GetComponents(double* begin) const |
void | GetComponents(double* begin, double* end) const |
void | GetComponents(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::Rotation3D | Inverse() const |
void | Invert() |
bool | operator!=(const ROOT::Math::Rotation3D& rhs) const |
ROOT::Math::Rotation3D | operator*(const ROOT::Math::Rotation3D& r) const |
ROOT::Math::Rotation3D | operator*(const ROOT::Math::AxisAngle& a) const |
ROOT::Math::Rotation3D | operator*(const ROOT::Math::EulerAngles& e) const |
ROOT::Math::Rotation3D | operator*(const ROOT::Math::Quaternion& q) const |
ROOT::Math::Rotation3D | operator*(const ROOT::Math::RotationZYX& r) const |
ROOT::Math::Rotation3D | operator*(const ROOT::Math::RotationX& rx) const |
ROOT::Math::Rotation3D | operator*(const ROOT::Math::RotationY& ry) const |
ROOT::Math::Rotation3D | operator*(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&) |
bool | operator==(const ROOT::Math::Rotation3D& rhs) const |
void | Rectify() |
ROOT::Math::Rotation3D | Rotation3D() |
ROOT::Math::Rotation3D | Rotation3D(ROOT::Math::AxisAngle const& a) |
ROOT::Math::Rotation3D | Rotation3D(ROOT::Math::EulerAngles const& e) |
ROOT::Math::Rotation3D | Rotation3D(ROOT::Math::RotationZYX const& e) |
ROOT::Math::Rotation3D | Rotation3D(ROOT::Math::Quaternion const& q) |
ROOT::Math::Rotation3D | Rotation3D(ROOT::Math::RotationZ const& r) |
ROOT::Math::Rotation3D | Rotation3D(ROOT::Math::RotationY const& r) |
ROOT::Math::Rotation3D | Rotation3D(ROOT::Math::RotationX const& r) |
ROOT::Math::Rotation3D | Rotation3D(const ROOT::Math::Rotation3D&) |
ROOT::Math::Rotation3D | Rotation3D(double* begin, double* end) |
ROOT::Math::Rotation3D | 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) |
ROOT::Math::Rotation3D | Rotation3D(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) |
void | SetComponents(double* begin, double* end) |
void | 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) |
void | 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) |
Data Members
private:
enum ERotation3DMatrixIndex { | kXX | |
| kXY | |
| kXZ | |
| kYX | |
| kYY | |
| kYZ | |
| kZX | |
| kZY | |
| kZZ | |
}; | | |
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
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.
operator=( RotationZ const & r )
Assign from an axial rotation
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).
void Rectify()
Re-adjust components to eliminate small deviations from perfect
orthonormality.
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
Rotation3D operator*(RotationX const & r1, RotationY const & r2)
Multiplication of an axial rotation by another axial Rotation