|
ROOT
Reference Guide |
|
Go to the documentation of this file.
17 #ifndef ROOT_Math_GenVector_Rotation3D
18 #define ROOT_Math_GenVector_Rotation3D 1
131 template<
class ForeignMatrix>
140 template<
class ForeignVector>
142 const ForeignVector&
v2,
165 rhs.
fM[3], rhs.
fM[4], rhs.
fM[5],
166 rhs.
fM[6], rhs.
fM[7], rhs.
fM[8] );
208 template<
class ForeignMatrix>
212 m(1,0),
m(1,1),
m(1,2),
213 m(2,0),
m(2,1),
m(2,2) );
231 template<
class ForeignVector>
234 const ForeignVector&
v2,
235 const ForeignVector&
v3 ) {
247 template<
class ForeignVector>
251 ForeignVector&
v3 )
const {
263 for (
int i = 0; i <9; ++i) {
277 for (
int i = 0; i <9; ++i) {
290 std::copy (
fM,
fM+9, begin );
299 template<
class ForeignMatrix>
312 template<
class ForeignMatrix>
350 template <
class CoordSystem,
class U>
363 template <
class CoordSystem,
class U>
374 template <
class CoordSystem>
388 template <
class ForeignVector>
393 return ForeignVector ( rxyz.
X(), rxyz.
Y(), rxyz.
Z() );
399 template <
class AVector>
461 if(
fM[0] != rhs.
fM[0] )
return false;
462 if(
fM[1] != rhs.
fM[1] )
return false;
463 if(
fM[2] != rhs.
fM[2] )
return false;
464 if(
fM[3] != rhs.
fM[3] )
return false;
465 if(
fM[4] != rhs.
fM[4] )
return false;
466 if(
fM[5] != rhs.
fM[5] )
return false;
467 if(
fM[6] != rhs.
fM[6] )
return false;
468 if(
fM[7] != rhs.
fM[7] )
return false;
469 if(
fM[8] != rhs.
fM[8] )
return false;
495 Rotation3D
operator* (RotationX
const & r1, Rotation3D
const & r2);
496 Rotation3D
operator* (RotationY
const & r1, Rotation3D
const & r2);
497 Rotation3D
operator* (RotationZ
const & r1, Rotation3D
const & r2);
502 Rotation3D
operator* (RotationX
const & r1, RotationY
const & r2);
503 Rotation3D
operator* (RotationX
const & r1, RotationZ
const & r2);
505 Rotation3D
operator* (RotationY
const & r1, RotationX
const & r2);
506 Rotation3D
operator* (RotationY
const & r1, RotationZ
const & r2);
508 Rotation3D
operator* (RotationZ
const & r1, RotationX
const & r2);
509 Rotation3D
operator* (RotationZ
const & r1, RotationY
const & r2);
516 std::ostream &
operator<< (std::ostream & os,
const Rotation3D &
r);
AVector operator*(const AVector &v) const
Overload operator * for rotation on a vector.
AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotat...
Rotation3D(EulerAngles const &e)
Construct from EulerAngles.
bool operator==(const Rotation3D &rhs) const
Equality/inequality operators.
bool operator!=(const Rotation3D &rhs) const
Rotation3D & operator=(RotationX const &r)
Rotation class with the (3D) rotation represented by angles describing first a rotation of an angle p...
Class describing a generic position vector (point) in 3 dimensions.
Rotation class representing a 3D rotation about the Z axis by the angle of rotation.
Rotation class with the (3D) rotation represented by a 3x3 orthogonal matrix.
DisplacementVector3D< CoordSystem, U > operator()(const DisplacementVector3D< CoordSystem, U > &v) const
Rotation operation on a displacement vector in any coordinate system.
std::ostream & operator<<(std::ostream &os, const AxisAngle &a)
Stream Output and Input.
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 b...
Rotation3D(Quaternion const &q)
Construct from a Quaternion.
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(const ForeignMatrix &m)
Construct from a linear algebra matrix of size at least 3x3, which must support operator()(i,...
Scalar Y() const
Cartesian Y, converting if necessary from internal coordinate system.
Rotation3D()
Default constructor (identity rotation)
Rotation3D(RotationY const &r)
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 de...
Rotation3D & operator*=(const R &r)
Post-Multiply (on right) by another rotation : T = T*R.
void Rectify()
Re-adjust components to eliminate small deviations from perfect orthonormality.
#define R(a, b, c, d, e, f, g, h, i)
double dist(Rotation3D const &r1, Rotation3D const &r2)
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 use...
void GetRotationMatrix(ForeignMatrix &m) const
Get components into a linear algebra matrix of size at least 3x3, which must support operator()(i,...
Rotation3D & operator=(RotationY const &r)
Rotation3D Inverse() const
Return inverse of a rotation.
EulerAngles class describing rotation as three angles (Euler Angles).
void SetRotationMatrix(const ForeignMatrix &m)
Set components from a linear algebra matrix of size at least 3x3, which must support operator()(i,...
Rotation3D & operator=(const ForeignMatrix &m)
Assign from an orthonormal linear algebra matrix of size 3x3, which must support operator()(i,...
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
Rotation class representing a 3D rotation about the X axis by the angle of rotation.
typedef void((*Func_t)())
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.
Scalar Z() const
Cartesian Z, converting if necessary from internal coordinate system.
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.
AxisAngle operator*(RotationX const &r1, AxisAngle const &r2)
Multiplication of an axial rotation by an AxisAngle.
void Invert()
Invert a rotation in place.
Rotation3D & operator=(Quaternion const &q)
Assign from a Quaternion.
Rotation3D(RotationX const &r)
Rotation3D(AxisAngle const &a)
Construct from an AxisAngle.
void convert(R1 const &, R2 const)
Rotation3D(RotationZYX const &e)
Construct from RotationZYX.
Rotation3D & operator=(AxisAngle const &a)
Assign from an AxisAngle.
Rotation3D(Rotation3D const &r)
copy constructor
DisplacementVector3D< CoordSystem, Tag > & SetXYZ(Scalar a, Scalar b, Scalar c)
set the values of the vector from the cartesian components (x,y,z) (if the vector is held in polar or...
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 en...
Rotation3D(RotationZ const &r)
Construct from an axial rotation.
Class describing a generic displacement vector in 3 dimensions.
void GetComponents(ForeignVector &v1, ForeignVector &v2, ForeignVector &v3) const
Get components into three vectors which will be the (orthonormal) columns of the rotation matrix.
Rotation class with the (3D) rotation represented by a unit quaternion (u, i, j, k).
Rotation3D & operator=(Rotation3D const &rhs)
Assignment operator.
AxisAngle::Scalar Distance(const AxisAngle &r1, const R &r2)
Distance between two rotations.
void GetComponents(IT begin) const
Get the 9 matrix components into data specified by an iterator begin.
Rotation3D & operator=(RotationZYX const &r)
Assign from RotationZYX.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Rotation3D(IT begin, IT end)
Construct given a pair of pointers or iterators defining the beginning and end of an array of nine Sc...
Rotation3D & operator=(EulerAngles const &e)
Assign from EulerAngles.
Namespace for new Math classes and functions.
Class describing a generic LorentzVector in the 4D space-time, using the specified coordinate system ...
Rotation3D & operator=(RotationZ const &r)
Assign from an axial rotation.
Rotation class representing a 3D rotation about the Y axis by the angle of rotation.