17#ifndef ROOT_Math_GenVector_AxisAngle
18#define ROOT_Math_GenVector_AxisAngle 1
63 template<
class AnyVector>
93 template <
class OtherRotation>
100 template <
class OtherRotation>
118 IT
a = begin; IT
b = ++begin; IT
c = ++begin;
122 assert (++begin==end);
125 if (tot > 0)
fAxis /= tot;
134 IT
a = begin; IT
b = ++begin; IT
c = ++begin;
138 assert (++begin==end);
158 template<
class AnyVector>
169 template<
class AnyVector>
196 template <
class CoordSystem,
class Tag>
202 vNew.
SetXYZ( rxyz.
X(), rxyz.
Y(), rxyz.
Z() );
209 template <
class CoordSystem,
class Tag>
220 template <
class CoordSystem>
235 template <
class ForeignVector>
240 return ForeignVector ( rxyz.
X(), rxyz.
Y(), rxyz.
Z() );
246 template <
class AVector>
309 static double Pi() {
return 3.14159265358979323; }
326AxisAngle
operator* (RotationX
const & r1, AxisAngle
const & r2);
327AxisAngle
operator* (RotationY
const & r1, AxisAngle
const & r2);
328AxisAngle
operator* (RotationZ
const & r1, AxisAngle
const & r2);
335std::ostream & operator<< (std::ostream & os,
const AxisAngle &
a);
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint angle
AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotat...
void SetComponents(IT begin, IT end)
Set the axis and then the angle given a pair of pointers or iterators defining the beginning and end ...
void GetComponents(IT begin, IT end) const
Get the axis and then the angle into data specified by an iterator begin and another to the end of th...
void Rectify()
Re-adjust components to eliminate small deviations from the axis being a unit vector and angles out o...
AVector operator*(const AVector &v) const
Overload operator * for rotation on a vector.
bool operator==(const AxisAngle &rhs) const
Equality/inequality operators.
void GetComponents(AnyVector &axis, Scalar &angle) const
Set components into a non-zero vector (x,y,z) and an angle.
AxisVector Axis() const
access to rotation axis
Scalar Angle() const
access to rotation angle
Scalar Distance(const R &r) const
Distance between two rotations.
DisplacementVector3D< Cartesian3D< Scalar > > AxisVector
definition of vector axis
void SetComponents(const AnyVector &v, Scalar angle)
Set components from a non-zero vector (x,y,z) and an angle.
DisplacementVector3D< Cartesian3D< double >, DefaultCoordinateSystemTag > XYZVector
Rotation operation on a cartesian vector.
AxisAngle(const AnyVector &v, Scalar angle)
Construct from a non-zero vector (x,y,z) and an angle.
AxisAngle Inverse() const
Return inverse of an AxisAngle rotation.
constexpr AxisAngle(const OtherRotation &r)
Construct from another supported rotation type (see gv_detail::convert )
AxisAngle()
Default constructor (axis is z and angle is zero)
void GetComponents(IT begin) const
Get the axis and then the angle into data specified by an iterator begin.
bool operator!=(const AxisAngle &rhs) const
void Invert()
Invert an AxisAngle rotation in place.
AxisAngle & operator=(OtherRotation const &r)
Assign from another supported rotation type (see gv_detail::convert )
AxisAngle & operator*=(const R &r)
Post-Multiply (on right) by another rotation : T = T*R.
AxisAngle(IT begin, IT end)
Construct given a pair of pointers or iterators defining the beginning and end of an array of four Sc...
XYZVector operator()(const XYZVector &v) const
DefaultCoordinateSystemTag Default tag for identifying any coordinate system.
Class describing a generic displacement vector in 3 dimensions.
Scalar R() const
Polar R, converting if necessary from internal coordinate system.
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
void GetCoordinates(Scalar &a, Scalar &b, Scalar &c) const
get internal data into 3 Scalar numbers
Scalar Y() const
Cartesian Y, converting if necessary from internal coordinate system.
DisplacementVector3D unit() const
DisplacementVector3D< CoordSystem, Tag > & SetCoordinates(const Scalar src[])
Set internal data based on a C-style array of 3 Scalar numbers.
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).
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.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...