#include <Rotation3D.h>
Public Types | |
| enum | ERotation3DMatrixIndex { kXX = 0, kXY = 1, kXZ = 2, kYX = 3, kYY = 4, kYZ = 5, kZX = 6, kZY = 7, kZZ = 8 } |
| typedef double | Scalar |
Public Member Functions | |
| Rotation3D () | |
| Default constructor (identity rotation). | |
| template<class IT > | |
| Rotation3D (IT begin, IT end) | |
| Construct given a pair of pointers or iterators defining the beginning and end of an array of nine Scalars. | |
| Rotation3D (Rotation3D const &r) | |
| copy constructor | |
| Rotation3D (AxisAngle const &a) | |
| Construct from an AxisAngle. | |
| Rotation3D (EulerAngles const &e) | |
| Construct from EulerAngles. | |
| Rotation3D (RotationZYX const &e) | |
| Construct from RotationZYX. | |
| Rotation3D (Quaternion const &q) | |
| Construct from a Quaternion. | |
| Rotation3D (RotationZ const &r) | |
| Construct from an axial rotation. | |
| Rotation3D (RotationY const &r) | |
| Rotation3D (RotationX const &r) | |
| template<class ForeignMatrix > | |
| 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). | |
| template<class ForeignVector > | |
| Rotation3D (const ForeignVector &v1, const ForeignVector &v2, const ForeignVector &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. | |
| Rotation3D (Scalar xx, Scalar xy, Scalar xz, Scalar yx, Scalar yy, Scalar yz, Scalar zx, Scalar zy, Scalar zz) | |
| Raw constructor from nine Scalar components (without any checking). | |
| Rotation3D & | operator= (Rotation3D const &rhs) |
| Assignment operator. | |
| Rotation3D & | operator= (AxisAngle const &a) |
| Assign from an AxisAngle. | |
| Rotation3D & | operator= (EulerAngles const &e) |
| Assign from EulerAngles. | |
| Rotation3D & | operator= (RotationZYX const &r) |
| Assign from RotationZYX. | |
| Rotation3D & | operator= (Quaternion const &q) |
| Assign from a Quaternion. | |
| Rotation3D & | operator= (RotationZ const &r) |
| Assign from an axial rotation. | |
| Rotation3D & | operator= (RotationY const &r) |
| Rotation3D & | operator= (RotationX const &r) |
| template<class ForeignMatrix > | |
| Rotation3D & | 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. | |
| template<class ForeignVector > | |
| void | SetComponents (const ForeignVector &v1, const ForeignVector &v2, const ForeignVector &v3) |
| 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. | |
| template<class ForeignVector > | |
| void | GetComponents (ForeignVector &v1, ForeignVector &v2, ForeignVector &v3) const |
| Get components into three vectors which will be the (orthonormal) columns of the rotation matrix. | |
| template<class IT > | |
| void | SetComponents (IT begin, IT end) |
| Set the 9 matrix components given an iterator to the start of the desired data, and another to the end (9 past start). | |
| template<class IT > | |
| void | GetComponents (IT begin, IT 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). | |
| template<class IT > | |
| void | GetComponents (IT begin) const |
| Get the 9 matrix components into data specified by an iterator begin. | |
| template<class ForeignMatrix > | |
| void | SetRotationMatrix (const ForeignMatrix &m) |
| Set components from a linear algebra matrix of size at least 3x3, which must support operator()(i,j) to obtain elements (0,0) thru (2,2). | |
| template<class ForeignMatrix > | |
| void | GetRotationMatrix (ForeignMatrix &m) const |
| Get components into a linear algebra matrix of size at least 3x3, which must support operator()(i,j) for write access to elements (0,0) thru (2,2). | |
| void | SetComponents (Scalar xx, Scalar xy, Scalar xz, Scalar yx, Scalar yy, Scalar yz, Scalar zx, Scalar zy, Scalar zz) |
| Set the components from nine scalars -- UNCHECKED for orthonormaility. | |
| void | GetComponents (Scalar &xx, Scalar &xy, Scalar &xz, Scalar &yx, Scalar &yy, Scalar &yz, Scalar &zx, Scalar &zy, Scalar &zz) const |
| Get the nine components into nine scalars. | |
| template<class CoordSystem , class U > | |
| DisplacementVector3D < CoordSystem, U > | operator() (const DisplacementVector3D< CoordSystem, U > &v) const |
| Rotation operation on a displacement vector in any coordinate system. | |
| template<class CoordSystem , class U > | |
| PositionVector3D< CoordSystem, U > | operator() (const PositionVector3D< CoordSystem, U > &v) const |
| Rotation operation on a position vector in any coordinate system. | |
| template<class CoordSystem > | |
| LorentzVector< CoordSystem > | operator() (const LorentzVector< CoordSystem > &v) const |
| Rotation operation on a Lorentz vector in any spatial coordinate system. | |
| template<class ForeignVector > | |
| ForeignVector | operator() (const ForeignVector &v) const |
| Rotation operation on an arbitrary vector v. | |
| template<class AVector > | |
| AVector | operator* (const AVector &v) const |
| Overload operator * for rotation on a vector. | |
| void | Invert () |
| Invert a rotation in place. | |
| Rotation3D | Inverse () const |
| Return inverse of a rotation. | |
| Rotation3D | operator* (const Rotation3D &r) const |
| Multiply (combine) two rotations. | |
| Rotation3D | operator* (const AxisAngle &a) const |
| Multiplication with arbitrary rotations. | |
| Rotation3D | operator* (const EulerAngles &e) const |
| Rotation3D | operator* (const Quaternion &q) const |
| Rotation3D | operator* (const RotationZYX &r) const |
| Rotation3D | operator* (const RotationX &rx) const |
| Rotation3D | operator* (const RotationY &ry) const |
| Rotation3D | operator* (const RotationZ &rz) const |
| template<class R > | |
| Rotation3D & | operator*= (const R &r) |
| Post-Multiply (on right) by another rotation : T = T*R. | |
| bool | operator== (const Rotation3D &rhs) const |
| Equality/inequality operators. | |
| bool | operator!= (const Rotation3D &rhs) const |
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.
Definition at line 65 of file GenVector/Rotation3D.h.
| typedef double ROOT::Math::Rotation3D::Scalar |
Definition at line 69 of file GenVector/Rotation3D.h.
Definition at line 71 of file GenVector/Rotation3D.h.
| ROOT::Math::Rotation3D::Rotation3D | ( | ) |
Default constructor (identity rotation).
Definition at line 29 of file Rotation3D.cxx.
References kXX, kXY, kXZ, kYX, kYY, kYZ, kZX, kZY, and kZZ.
Referenced by operator*(), and operator=().
| ROOT::Math::Rotation3D::Rotation3D | ( | IT | begin, | |
| IT | end | |||
| ) | [inline] |
Construct given a pair of pointers or iterators defining the beginning and end of an array of nine Scalars.
Definition at line 89 of file GenVector/Rotation3D.h.
References SetComponents().
| ROOT::Math::Rotation3D::Rotation3D | ( | Rotation3D const & | r | ) | [inline] |
| ROOT::Math::Rotation3D::Rotation3D | ( | AxisAngle const & | a | ) | [inline, explicit] |
Construct from an AxisAngle.
Definition at line 101 of file GenVector/Rotation3D.h.
References ROOT::Math::gv_detail::convert().
| ROOT::Math::Rotation3D::Rotation3D | ( | EulerAngles const & | e | ) | [inline, explicit] |
Construct from EulerAngles.
Definition at line 106 of file GenVector/Rotation3D.h.
References ROOT::Math::gv_detail::convert().
| ROOT::Math::Rotation3D::Rotation3D | ( | RotationZYX const & | e | ) | [inline, explicit] |
Construct from RotationZYX.
Definition at line 111 of file GenVector/Rotation3D.h.
References ROOT::Math::gv_detail::convert().
| ROOT::Math::Rotation3D::Rotation3D | ( | Quaternion const & | q | ) | [inline, explicit] |
Construct from a Quaternion.
Definition at line 116 of file GenVector/Rotation3D.h.
References ROOT::Math::gv_detail::convert().
| ROOT::Math::Rotation3D::Rotation3D | ( | RotationZ const & | r | ) | [inline, explicit] |
Construct from an axial rotation.
Definition at line 121 of file GenVector/Rotation3D.h.
References ROOT::Math::gv_detail::convert().
| ROOT::Math::Rotation3D::Rotation3D | ( | RotationY const & | r | ) | [inline, explicit] |
| ROOT::Math::Rotation3D::Rotation3D | ( | RotationX const & | r | ) | [inline, explicit] |
| ROOT::Math::Rotation3D::Rotation3D | ( | const ForeignMatrix & | m | ) | [inline, explicit] |
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.
Definition at line 132 of file GenVector/Rotation3D.h.
References SetComponents().
| ROOT::Math::Rotation3D::Rotation3D | ( | const ForeignVector & | v1, | |
| const ForeignVector & | v2, | |||
| const ForeignVector & | v3 | |||
| ) | [inline] |
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.
Definition at line 141 of file GenVector/Rotation3D.h.
References SetComponents().
| ROOT::Math::Rotation3D::Rotation3D | ( | Scalar | xx, | |
| Scalar | xy, | |||
| Scalar | xz, | |||
| Scalar | yx, | |||
| Scalar | yy, | |||
| Scalar | yz, | |||
| Scalar | zx, | |||
| Scalar | zy, | |||
| Scalar | zz | |||
| ) | [inline] |
Raw constructor from nine Scalar components (without any checking).
Definition at line 150 of file GenVector/Rotation3D.h.
References SetComponents().
| void ROOT::Math::Rotation3D::GetComponents | ( | IT | begin | ) | const [inline] |
Get the 9 matrix components into data specified by an iterator begin.
Definition at line 287 of file GenVector/Rotation3D.h.
| void ROOT::Math::Rotation3D::GetComponents | ( | IT | begin, | |
| IT | end | |||
| ) | const [inline] |
Get the 9 matrix components into data specified by an iterator begin and another to the end of the desired data (9 past start).
Definition at line 275 of file GenVector/Rotation3D.h.
| void ROOT::Math::Rotation3D::GetComponents | ( | ForeignVector & | v1, | |
| ForeignVector & | v2, | |||
| ForeignVector & | v3 | |||
| ) | const [inline] |
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.)
Definition at line 249 of file GenVector/Rotation3D.h.
References kXX, kXY, kXZ, kYX, kYY, kYZ, kZX, kZY, and kZZ.
Referenced by ROOT::Math::Transform3D::AssignFrom(), ROOT::Math::gv_detail::convert(), ROOT::Math::LorentzRotation::LorentzRotation(), and ROOT::Math::operator<<().
| void ROOT::Math::Rotation3D::GetRotationMatrix | ( | ForeignMatrix & | m | ) | const [inline] |
| Rotation3D ROOT::Math::Rotation3D::Inverse | ( | ) | const [inline] |
Return inverse of a rotation.
Definition at line 412 of file GenVector/Rotation3D.h.
References Invert().
| void ROOT::Math::Rotation3D::Invert | ( | ) |
Invert a rotation in place.
Definition at line 109 of file Rotation3D.cxx.
References kXY, kXZ, kYX, kYZ, kZX, and kZY.
Referenced by Inverse(), and ROOT::Math::RotationZYX::Invert().
| bool ROOT::Math::Rotation3D::operator!= | ( | const Rotation3D & | rhs | ) | const [inline] |
| ForeignVector ROOT::Math::Rotation3D::operator() | ( | const ForeignVector & | v | ) | const [inline] |
Rotation operation on an arbitrary vector v.
Preconditions: v must implement methods x(), y(), and z() and the arbitrary vector type must have a constructor taking (x,y,z)
Definition at line 388 of file GenVector/Rotation3D.h.
References operator()(), ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::X(), ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::Y(), and ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::Z().
| LorentzVector<CoordSystem> ROOT::Math::Rotation3D::operator() | ( | const LorentzVector< CoordSystem > & | v | ) | const [inline] |
Rotation operation on a Lorentz vector in any spatial coordinate system.
Definition at line 374 of file GenVector/Rotation3D.h.
References ROOT::Math::LorentzVector< CoordSystem >::E(), operator()(), ROOT::Math::LorentzVector< CoordSystem >::Vect(), ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::X(), ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::Y(), and ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::Z().
| PositionVector3D<CoordSystem,U> ROOT::Math::Rotation3D::operator() | ( | const PositionVector3D< CoordSystem, U > & | v | ) | const [inline] |
Rotation operation on a position vector in any coordinate system.
Definition at line 363 of file GenVector/Rotation3D.h.
References operator()().
| DisplacementVector3D<CoordSystem,U> ROOT::Math::Rotation3D::operator() | ( | const DisplacementVector3D< CoordSystem, U > & | v | ) | const [inline] |
Rotation operation on a displacement vector in any coordinate system.
Definition at line 350 of file GenVector/Rotation3D.h.
References kXX, kXY, kXZ, kYX, kYY, kYZ, kZX, kZY, kZZ, ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::SetXYZ(), ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::X(), ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::Y(), and ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::Z().
Referenced by operator()(), and operator*().
| Rotation3D ROOT::Math::Rotation3D::operator* | ( | const RotationZ & | rz | ) | const |
Definition at line 39 of file Rotation3DxAxial.cxx.
References ROOT::Math::RotationZ::CosAngle(), kXX, kXY, kXZ, kYX, kYY, kYZ, kZX, kZY, kZZ, Rotation3D(), and ROOT::Math::RotationZ::SinAngle().
| Rotation3D ROOT::Math::Rotation3D::operator* | ( | const RotationY & | ry | ) | const |
Definition at line 26 of file Rotation3DxAxial.cxx.
References ROOT::Math::RotationY::CosAngle(), kXX, kXY, kXZ, kYX, kYY, kYZ, kZX, kZY, kZZ, Rotation3D(), and ROOT::Math::RotationY::SinAngle().
| Rotation3D ROOT::Math::Rotation3D::operator* | ( | const RotationX & | rx | ) | const |
Definition at line 14 of file Rotation3DxAxial.cxx.
References ROOT::Math::RotationX::CosAngle(), kXX, kXY, kXZ, kYX, kYY, kYZ, kZX, kZY, kZZ, Rotation3D(), and ROOT::Math::RotationX::SinAngle().
| Rotation3D ROOT::Math::Rotation3D::operator* | ( | const RotationZYX & | r | ) | const |
| Rotation3D ROOT::Math::Rotation3D::operator* | ( | const Quaternion & | q | ) | const |
| Rotation3D ROOT::Math::Rotation3D::operator* | ( | const EulerAngles & | e | ) | const |
| Rotation3D ROOT::Math::Rotation3D::operator* | ( | const AxisAngle & | a | ) | const |
Multiplication with arbitrary rotations.
Definition at line 117 of file Rotation3D.cxx.
References operator*(), and Rotation3D().
| Rotation3D ROOT::Math::Rotation3D::operator* | ( | const Rotation3D & | r | ) | const [inline] |
| AVector ROOT::Math::Rotation3D::operator* | ( | const AVector & | v | ) | const [inline] |
Overload operator * for rotation on a vector.
Definition at line 399 of file GenVector/Rotation3D.h.
References operator()().
Referenced by operator*().
| Rotation3D& ROOT::Math::Rotation3D::operator*= | ( | const R & | r | ) | [inline] |
Post-Multiply (on right) by another rotation : T = T*R.
Definition at line 453 of file GenVector/Rotation3D.h.
| Rotation3D& ROOT::Math::Rotation3D::operator= | ( | const ForeignMatrix & | m | ) | [inline] |
Assign from an orthonormal linear algebra matrix of size 3x3, which must support operator()(i,j) to obtain elements (0,0) thru (2,2).
Definition at line 210 of file GenVector/Rotation3D.h.
References m, and SetComponents().
| Rotation3D& ROOT::Math::Rotation3D::operator= | ( | RotationX const & | r | ) | [inline] |
Definition at line 202 of file GenVector/Rotation3D.h.
References operator=(), and Rotation3D().
Referenced by operator=().
| Rotation3D& ROOT::Math::Rotation3D::operator= | ( | RotationY const & | r | ) | [inline] |
Definition at line 200 of file GenVector/Rotation3D.h.
References operator=(), and Rotation3D().
Referenced by operator=().
| Rotation3D& ROOT::Math::Rotation3D::operator= | ( | RotationZ const & | r | ) | [inline] |
Assign from an axial rotation.
Definition at line 198 of file GenVector/Rotation3D.h.
References operator=(), and Rotation3D().
Referenced by operator=().
| Rotation3D& ROOT::Math::Rotation3D::operator= | ( | Quaternion const & | q | ) | [inline] |
Assign from a Quaternion.
Definition at line 192 of file GenVector/Rotation3D.h.
References operator=(), and Rotation3D().
Referenced by operator=().
| Rotation3D& ROOT::Math::Rotation3D::operator= | ( | RotationZYX const & | r | ) | [inline] |
Assign from RotationZYX.
Definition at line 186 of file GenVector/Rotation3D.h.
References operator=(), and Rotation3D().
Referenced by operator=().
| Rotation3D& ROOT::Math::Rotation3D::operator= | ( | EulerAngles const & | e | ) | [inline] |
Assign from EulerAngles.
Definition at line 180 of file GenVector/Rotation3D.h.
References operator=(), and Rotation3D().
Referenced by operator=().
| Rotation3D& ROOT::Math::Rotation3D::operator= | ( | AxisAngle const & | a | ) | [inline] |
Definition at line 174 of file GenVector/Rotation3D.h.
References operator=(), and Rotation3D().
Referenced by operator=().
| Rotation3D& ROOT::Math::Rotation3D::operator= | ( | Rotation3D const & | rhs | ) | [inline] |
Assignment operator.
Definition at line 163 of file GenVector/Rotation3D.h.
References SetComponents().
| bool ROOT::Math::Rotation3D::operator== | ( | const Rotation3D & | rhs | ) | const [inline] |
Equality/inequality operators.
Definition at line 458 of file GenVector/Rotation3D.h.
Referenced by operator!=().
| void ROOT::Math::Rotation3D::Rectify | ( | ) |
Re-adjust components to eliminate small deviations from perfect orthonormality.
Definition at line 38 of file Rotation3D.cxx.
References kXX, kXY, kXZ, kYX, kYY, kYZ, kZX, kZY, kZZ, and ROOT::Math::sqrt().
Referenced by SetComponents().
| void ROOT::Math::Rotation3D::SetComponents | ( | IT | begin, | |
| IT | end | |||
| ) | [inline] |
Set the 9 matrix components given an iterator to the start of the desired data, and another to the end (9 past start).
Definition at line 262 of file GenVector/Rotation3D.h.
| void ROOT::Math::Rotation3D::SetComponents | ( | const ForeignVector & | v1, | |
| const ForeignVector & | v2, | |||
| const ForeignVector & | v3 | |||
| ) | [inline] |
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.
Definition at line 233 of file GenVector/Rotation3D.h.
References kXX, kXY, kXZ, kYX, kYY, kYZ, kZX, kZY, kZZ, and Rectify().
Referenced by ROOT::Math::gv_detail::convert(), operator=(), and Rotation3D().
| void ROOT::Math::Rotation3D::SetRotationMatrix | ( | const ForeignMatrix & | m | ) | [inline] |
Set components 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.
Definition at line 299 of file GenVector/Rotation3D.h.
References kXX, kXY, kXZ, kYX, kYY, kYZ, kZX, kZY, kZZ, and m.
1.5.9