ROOT::Math::AxisAngle Class Reference
[GenVector]

AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotation around that axis. More...

#include <AxisAngle.h>

Collaboration diagram for ROOT::Math::AxisAngle:

Collaboration graph
[legend]

List of all members.

Public Types

typedef double Scalar
typedef DisplacementVector3D
< Cartesian3D< Scalar > > 
AxisVector
 definition of vector axis
typedef DisplacementVector3D
< Cartesian3D< double >
, DefaultCoordinateSystemTag
XYZVector
 Rotation operation on a cartesian vector.

Public Member Functions

 AxisAngle ()
 Default constructor (axis is z and angle is zero).
template<class AnyVector >
 AxisAngle (const AnyVector &v, Scalar angle)
 Construct from a non-zero vector (x,y,z) and an angle.
template<class IT >
 AxisAngle (IT begin, IT end)
 Construct given a pair of pointers or iterators defining the beginning and end of an array of four Scalars, to be treated as the x, y, and z components of a unit axis vector, and the angle of rotation.
void Rectify ()
 Re-adjust components to eliminate small deviations from the axis being a unit vector and angles out of the canonical range (-pi,pi].
template<class OtherRotation >
 AxisAngle (const OtherRotation &r)
 Construct from another supported rotation type (see gv_detail::convert ).
template<class OtherRotation >
AxisAngleoperator= (OtherRotation const &r)
 Assign from another supported rotation type (see gv_detail::convert ).
template<class IT >
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 of an array of four Scalars.
template<class IT >
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 the desired data (4 past start).
template<class IT >
void GetComponents (IT begin) const
 Get the axis and then the angle into data specified by an iterator begin.
template<class AnyVector >
void SetComponents (const AnyVector &v, Scalar angle)
 Set components from a non-zero vector (x,y,z) and an angle.
template<class AnyVector >
void GetComponents (AnyVector &axis, Scalar &angle) const
 Set components into a non-zero vector (x,y,z) and an angle.
AxisVector Axis () const
 accesss to rotation axis
Scalar Angle () const
 access to rotation angle
XYZVector operator() (const XYZVector &v) const
template<class CoordSystem , class Tag >
DisplacementVector3D
< CoordSystem, Tag > 
operator() (const DisplacementVector3D< CoordSystem, Tag > &v) const
 Rotation operation on a displacement vector in any coordinate system.
template<class CoordSystem , class Tag >
PositionVector3D< CoordSystem,
Tag > 
operator() (const PositionVector3D< CoordSystem, Tag > &p) 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 4D 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 an AxisAngle rotation in place.
AxisAngle Inverse () const
 Return inverse of an AxisAngle rotation.
AxisAngle operator* (const Rotation3D &r) const
 Multiply (combine) two rotations.
AxisAngle operator* (const AxisAngle &a) const
AxisAngle operator* (const EulerAngles &e) const
AxisAngle operator* (const Quaternion &q) const
AxisAngle operator* (const RotationZYX &r) const
AxisAngle operator* (const RotationX &rx) const
AxisAngle operator* (const RotationY &ry) const
AxisAngle operator* (const RotationZ &rz) const
template<class R >
AxisAngleoperator*= (const R &r)
 Post-Multiply (on right) by another rotation : T = T*R.
template<class R >
Scalar Distance (const R &r) const
 Distance between two rotations.
bool operator== (const AxisAngle &rhs) const
 Equality/inequality operators.
bool operator!= (const AxisAngle &rhs) const


Detailed Description

AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotation around that axis.

Definition at line 41 of file GenVector/AxisAngle.h.


Member Typedef Documentation

definition of vector axis

Definition at line 50 of file GenVector/AxisAngle.h.

Definition at line 45 of file GenVector/AxisAngle.h.

Rotation operation on a cartesian vector.

Definition at line 187 of file GenVector/AxisAngle.h.


Constructor & Destructor Documentation

ROOT::Math::AxisAngle::AxisAngle (  )  [inline]

Default constructor (axis is z and angle is zero).

Definition at line 56 of file GenVector/AxisAngle.h.

Referenced by operator*().

template<class AnyVector >
ROOT::Math::AxisAngle::AxisAngle ( const AnyVector &  v,
Scalar  angle 
) [inline]

Construct from a non-zero vector (x,y,z) and an angle.

Precondition: the Vector needs to implement x(), y(), z(), and unit()

Definition at line 63 of file GenVector/AxisAngle.h.

template<class IT >
ROOT::Math::AxisAngle::AxisAngle ( IT  begin,
IT  end 
) [inline]

Construct given a pair of pointers or iterators defining the beginning and end of an array of four Scalars, to be treated as the x, y, and z components of a unit axis vector, and the angle of rotation.

Precondition: The first three components are assumed to represent the rotation axis vector and the 4-th the rotation angle. The angle is assumed to be in the range (-pi,pi]. The axis vector is automatically normalized to be a unit vector

Definition at line 77 of file GenVector/AxisAngle.h.

References SetComponents().

template<class OtherRotation >
ROOT::Math::AxisAngle::AxisAngle ( const OtherRotation &  r  )  [inline, explicit]

Construct from another supported rotation type (see gv_detail::convert ).

Definition at line 93 of file GenVector/AxisAngle.h.

References ROOT::Math::gv_detail::convert().


Member Function Documentation

Scalar ROOT::Math::AxisAngle::Angle (  )  const [inline]

access to rotation angle

Definition at line 180 of file GenVector/AxisAngle.h.

Referenced by ROOT::Math::gv_detail::convert(), and ROOT::Math::operator<<().

AxisVector ROOT::Math::AxisAngle::Axis (  )  const [inline]

accesss to rotation axis

Definition at line 175 of file GenVector/AxisAngle.h.

Referenced by ROOT::Math::gv_detail::convert(), and ROOT::Math::operator<<().

template<class R >
Scalar ROOT::Math::AxisAngle::Distance ( const R &  r  )  const [inline]

Distance between two rotations.

Definition at line 285 of file GenVector/AxisAngle.h.

References ROOT::Math::gv_detail::dist().

template<class AnyVector >
void ROOT::Math::AxisAngle::GetComponents ( AnyVector &  axis,
Scalar angle 
) const [inline]

Set components into a non-zero vector (x,y,z) and an angle.

The vector is intended to be a cartesian dispalcement vector but any vector class assignable from one will work.

Definition at line 167 of file GenVector/AxisAngle.h.

template<class IT >
void ROOT::Math::AxisAngle::GetComponents ( IT  begin  )  const [inline]

Get the axis and then the angle into data specified by an iterator begin.

Definition at line 142 of file GenVector/AxisAngle.h.

References ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::GetCoordinates().

template<class IT >
void ROOT::Math::AxisAngle::GetComponents ( IT  begin,
IT  end 
) const [inline]

Get the axis and then the angle into data specified by an iterator begin and another to the end of the desired data (4 past start).

Definition at line 131 of file GenVector/AxisAngle.h.

References ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::GetCoordinates().

AxisAngle ROOT::Math::AxisAngle::Inverse (  )  const [inline]

Return inverse of an AxisAngle rotation.

Definition at line 258 of file GenVector/AxisAngle.h.

References Invert().

void ROOT::Math::AxisAngle::Invert (  )  [inline]

Invert an AxisAngle rotation in place.

Definition at line 253 of file GenVector/AxisAngle.h.

Referenced by Inverse().

bool ROOT::Math::AxisAngle::operator!= ( const AxisAngle rhs  )  const [inline]

Definition at line 295 of file GenVector/AxisAngle.h.

References operator==().

template<class ForeignVector >
ForeignVector ROOT::Math::AxisAngle::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 234 of file GenVector/AxisAngle.h.

References operator()(), ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::X(), ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::Y(), and ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::Z().

template<class CoordSystem >
LorentzVector<CoordSystem> ROOT::Math::AxisAngle::operator() ( const LorentzVector< CoordSystem > &  v  )  const [inline]

template<class CoordSystem , class Tag >
PositionVector3D<CoordSystem, Tag> ROOT::Math::AxisAngle::operator() ( const PositionVector3D< CoordSystem, Tag > &  p  )  const [inline]

Rotation operation on a position vector in any coordinate system.

Definition at line 208 of file GenVector/AxisAngle.h.

References operator()().

template<class CoordSystem , class Tag >
DisplacementVector3D<CoordSystem, Tag> ROOT::Math::AxisAngle::operator() ( const DisplacementVector3D< CoordSystem, Tag > &  v  )  const [inline]

XYZVector ROOT::Math::AxisAngle::operator() ( const XYZVector v  )  const

Referenced by operator()(), and operator*().

AxisAngle ROOT::Math::AxisAngle::operator* ( const RotationZ rz  )  const

AxisAngle ROOT::Math::AxisAngle::operator* ( const RotationY ry  )  const

AxisAngle ROOT::Math::AxisAngle::operator* ( const RotationX rx  )  const

AxisAngle ROOT::Math::AxisAngle::operator* ( const RotationZYX r  )  const

Definition at line 51 of file AxisAngleXother.cxx.

References operator*().

AxisAngle ROOT::Math::AxisAngle::operator* ( const Quaternion q  )  const

Definition at line 56 of file AxisAngleXother.cxx.

References AxisAngle().

AxisAngle ROOT::Math::AxisAngle::operator* ( const EulerAngles e  )  const

Definition at line 46 of file AxisAngleXother.cxx.

References operator*().

AxisAngle ROOT::Math::AxisAngle::operator* ( const AxisAngle a  )  const

Definition at line 41 of file AxisAngleXother.cxx.

References operator*().

AxisAngle ROOT::Math::AxisAngle::operator* ( const Rotation3D r  )  const

Multiply (combine) two rotations.

Definition at line 35 of file AxisAngleXother.cxx.

References operator*().

template<class AVector >
AVector ROOT::Math::AxisAngle::operator* ( const AVector &  v  )  const [inline]

Overload operator * for rotation on a vector.

Definition at line 245 of file GenVector/AxisAngle.h.

References operator()().

Referenced by operator*().

template<class R >
AxisAngle& ROOT::Math::AxisAngle::operator*= ( const R &  r  )  [inline]

Post-Multiply (on right) by another rotation : T = T*R.

Definition at line 278 of file GenVector/AxisAngle.h.

template<class OtherRotation >
AxisAngle& ROOT::Math::AxisAngle::operator= ( OtherRotation const &  r  )  [inline]

Assign from another supported rotation type (see gv_detail::convert ).

Definition at line 100 of file GenVector/AxisAngle.h.

References ROOT::Math::gv_detail::convert().

bool ROOT::Math::AxisAngle::operator== ( const AxisAngle rhs  )  const [inline]

Equality/inequality operators.

Definition at line 290 of file GenVector/AxisAngle.h.

Referenced by operator!=().

void ROOT::Math::AxisAngle::Rectify (  ) 

Re-adjust components to eliminate small deviations from the axis being a unit vector and angles out of the canonical range (-pi,pi].

Definition at line 47 of file AxisAngle.cxx.

References ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::Mag2(), and ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::SetCoordinates().

Referenced by ROOT::Math::gv_detail::convert().

template<class AnyVector >
void ROOT::Math::AxisAngle::SetComponents ( const AnyVector &  v,
Scalar  angle 
) [inline]

Set components from a non-zero vector (x,y,z) and an angle.

Precondition: the Vector needs to implement x(), y(), z(), and unit()

Definition at line 156 of file GenVector/AxisAngle.h.

References ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::unit().

template<class IT >
void ROOT::Math::AxisAngle::SetComponents ( IT  begin,
IT  end 
) [inline]

Set the axis and then the angle given a pair of pointers or iterators defining the beginning and end of an array of four Scalars.

Precondition: The first three components are assumed to represent the rotation axis vector and the 4-th the rotation angle. The angle is assumed to be in the range (-pi,pi]. The axis vector is automatically normalized to be a unit vector

Definition at line 116 of file GenVector/AxisAngle.h.

References ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::R(), and ROOT::Math::DisplacementVector3D< CoordSystem, Tag >::SetCoordinates().

Referenced by AxisAngle(), and ROOT::Math::gv_detail::convert().


The documentation for this class was generated from the following files:

Generated on Thu Dec 16 21:09:40 2010 for ROOT Mathematical Libraries by  doxygen 1.5.9