16#ifndef ROOT_Math_GenVector_Quaternion
17#define ROOT_Math_GenVector_Quaternion 1
77 template <
class OtherRotation>
98 template <
class OtherRotation>
188 alpha *
v.Y() + twoU * (
fK*
v.X() -
fI*
v.Z()) + twoQv *
fJ ,
189 alpha *
v.Z() + twoU * (
fI*
v.Y() -
fJ*
v.X()) + twoQv *
fK );
195 template <
class CoordSystem,
class Tag>
201 vNew.
SetXYZ( rxyz.
X(), rxyz.
Y(), rxyz.
Z() );
208 template <
class CoordSystem,
class Tag>
219 template <
class CoordSystem>
233 template <
class ForeignVector>
238 return ForeignVector ( rxyz.
X(), rxyz.
Y(), rxyz.
Z() );
244 template <
class AVector>
307 if(
fU != rhs.
fU )
return false;
308 if(
fI != rhs.
fI )
return false;
309 if(
fJ != rhs.
fJ )
return false;
310 if(
fK != rhs.
fK )
return false;
#define R(a, b, c, d, e, f, g, h, i)
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)
std::ostream & operator<<(std::ostream &os, const AxisAngle &a)
Stream Output and Input.
Rotation3D::Scalar Scalar
Namespace for new ROOT classes and functions.