16#ifndef ROOT_Math_GenVector_Quaternion
17#define ROOT_Math_GenVector_Quaternion 1
77 template <
class OtherRotation>
98 template <
class OtherRotation>
182 alpha *
v.Y() + twoU * (
fK*
v.X() -
fI*
v.Z()) + twoQv *
fJ ,
183 alpha *
v.Z() + twoU * (
fI*
v.Y() -
fJ*
v.X()) + twoQv *
fK );
189 template <
class CoordSystem,
class Tag>
195 vNew.
SetXYZ( rxyz.
X(), rxyz.
Y(), rxyz.
Z() );
202 template <
class CoordSystem,
class Tag>
213 template <
class CoordSystem>
227 template <
class ForeignVector>
232 return ForeignVector ( rxyz.
X(), rxyz.
Y(), rxyz.
Z() );
238 template <
class AVector>
301 if(
fU != rhs.
fU )
return false;
302 if(
fI != rhs.
fI )
return false;
303 if(
fJ != rhs.
fJ )
return false;
304 if(
fK != rhs.
fK )
return false;
333Quaternion
operator* (RotationX
const & r1, Quaternion
const & r2);
334Quaternion
operator* (RotationY
const & r1, Quaternion
const & r2);
335Quaternion
operator* (RotationZ
const & r1, Quaternion
const & r2);
342std::ostream & operator<< (std::ostream & os,
const Quaternion &
q);
typedef void(GLAPIENTRYP _GLUfuncptr)(void)
AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotat...
DefaultCoordinateSystemTag Default tag for identifying any coordinate system.
Class describing a generic displacement vector in 3 dimensions.
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
Scalar Y() const
Cartesian Y, converting if necessary from internal coordinate system.
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...
Scalar Z() const
Cartesian Z, converting if necessary from internal coordinate system.
EulerAngles class describing rotation as three angles (Euler Angles).
Class describing a generic LorentzVector in the 4D space-time, using the specified coordinate system ...
Class describing a generic position vector (point) in 3 dimensions.
Rotation class with the (3D) rotation represented by a unit quaternion (u, i, j, k).
Scalar Distance(const Quaternion &q) const
Distance between two rotations in Quaternion form Note: The rotation group is isomorphic to a 3-spher...
Quaternion(const OtherRotation &r)
Construct from another supported rotation type (see gv_detail::convert )
bool operator!=(const Quaternion &rhs) const
void SetComponents(Scalar u, Scalar i, Scalar j, Scalar k)
Set the components based on four Scalars.
Quaternion()
Default constructor (identity rotation)
Quaternion(Scalar u, Scalar i, Scalar j, Scalar k)
Construct from four Scalars representing the coefficients of u, i, j, k.
DisplacementVector3D< Cartesian3D< double >, DefaultCoordinateSystemTag > XYZVector
Rotation operation on a cartesian vector.
void Rectify()
Re-adjust components to eliminate small deviations from |Q| = 1 orthonormality.
Quaternion(IT begin, IT end)
Construct given a pair of pointers or iterators defining the beginning and end of an array of four Sc...
Scalar U() const
Access to the four quaternion components: U() is the coefficient of the identity Pauli matrix,...
void GetComponents(IT begin, IT end) const
Get the components into data specified by an iterator begin and another to the end of the desired dat...
Quaternion & operator*=(const R &r)
Post-Multiply (on right) by another rotation : T = T*R.
Quaternion & operator=(OtherRotation const &r)
Assign from another supported rotation type (see gv_detail::convert )
bool operator==(const Quaternion &rhs) const
Equality/inequality operators.
XYZVector operator()(const XYZVector &v) const
AVector operator*(const AVector &v) const
Overload operator * for rotation on a vector.
void GetComponents(IT begin) const
Get the components into data specified by an iterator begin.
Quaternion Inverse() const
Return inverse of a rotation.
void GetComponents(Scalar &u, Scalar &i, Scalar &j, Scalar &k) const
Get the components into four Scalars.
void SetComponents(IT begin, IT end)
Set the four components given an iterator to the start of the desired data, and another to the end (4...
void Invert()
Invert a rotation in place.
Rotation class with the (3D) rotation represented by a 3x3 orthogonal matrix.
Rotation class representing a 3D rotation about the X axis by the angle of rotation.
Rotation class representing a 3D rotation about the Y axis by the angle of rotation.
Rotation class with the (3D) rotation represented by angles describing first a rotation of an angle p...
Rotation class representing a 3D rotation about the Z axis by the angle of rotation.
Namespace for new Math classes and functions.
double dist(Rotation3D const &r1, Rotation3D const &r2)
void convert(R1 const &, R2 const)
AxisAngle operator*(RotationX const &r1, AxisAngle const &r2)
Multiplication of an axial rotation by an AxisAngle.
AxisAngle::Scalar Distance(const AxisAngle &r1, const R &r2)
Distance between two rotations.
Rotation3D::Scalar Scalar
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...