BASE::RCQuaternion Class Reference

A quaternion to represent rotations. More...

Inherits BASE::RCStringValueInterface.

Inheritance diagram for BASE::RCQuaternion:

Inheritance graph
[legend]
Collaboration diagram for BASE::RCQuaternion:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RCQuaternion ()
 RCQuaternion (TReal nW, TReal nX, TReal nY, TReal nZ)
 RCQuaternion (const TReal *naSource)
 RCQuaternion (const RCMatrix &Source)
 RCQuaternion (TReal nPhi, TReal nTheta, TReal nPsi, TBool bInRad=true)
 RCQuaternion (const RCTriple &EulerAngles, TBool bInRad=true)
 RCQuaternion (const RCQuaternion &Source)
const RCQuaternionoperator= (const RCQuaternion &Source)
const TRealData () const
TRealoperator[] (TInt nIndex)
const TRealoperator[] (TInt nIndex) const
RCQuaternion operator/ (TReal rhs) const
RCQuaternion operator- () const
RCQuaternion operator * (const RCQuaternion &rhs) const
const RCQuaternionoperator *= (const RCQuaternion &rhs)
const RCQuaternionoperator/= (TReal rhs)
void Normalize ()
RCQuaternion Normalized () const
TReal Length () const
void SetEulerAngles (TReal nPhi, TReal nTheta, TReal nPsi, TBool bInRad=true)
void SetEulerAngles (const RCTriple &EulerAngles, TBool bInRad=true)
void GetEulerAngles (TReal &nPhiRef, TReal &nThetaRef, TReal &nPsiRef, TBool bInRad=true) const
RCTriple GetEulerAngles (TBool bInRad=true) const
TReal GetHeading () const
virtual TBool FromString (const RCString &sValue)
virtual const RCStringToString () const

Detailed Description

A quaternion to represent rotations.

Author:
Patrik Stellmann
The values are stored in the order w, x, y, z.


Constructor & Destructor Documentation

RCQuaternion::RCQuaternion  )  [inline]
 

Creates an identity quaternion.

RCQuaternion::RCQuaternion TReal  nX,
TReal  nY,
TReal  nZ,
TReal  nW
[inline]
 

Creates a quaternion with the specified values.

RCQuaternion::RCQuaternion const TReal naSource  )  [inline, explicit]
 

Creates a quaternion from an array of 4 TReal values. They are required to be in the order x, y, z, w.

RCQuaternion::RCQuaternion const RCMatrix Source  ) 
 

Creates a quaternion representing the same rotation as the passed matrix. If the matrix is no rotation matrix the result is undefined. The 4th column and 4th row of the matrix are ignored.

RCQuaternion::RCQuaternion const RCQuaternion Source  )  [inline]
 

Creates a copy of the specified quaternion.


Member Function Documentation

const TReal * RCQuaternion::Data  )  const [inline]
 

Returns a constant pointer to the internal array of the values with the order x, y, z, w.

void RCQuaternion::GetEulerAngles TReal nPhiRef,
TReal nThetaRef,
TReal nPsiRef,
TBool  bInRad = true
const
 

Writes the spherical angles for the same rotation the quaternion refers to in the specified variables.

TReal RCQuaternion::Length  )  const [inline]
 

Returns the lenght of the quaternion which is the euclid norm.

void RCQuaternion::Normalize  )  [inline]
 

Normalizes the quaternion by deviding it by its length.

RCQuaternion RCQuaternion::Normalized  )  const [inline]
 

Returns a normalized copy of this quaternion.

RCQuaternion RCQuaternion::operator-  )  const [inline]
 

Negates all elements of the quaternion.

RCQuaternion RCQuaternion::operator/ TReal  rhs  )  const [inline]
 

Returns a quaternion equal to this one with all elements devided by the specified value. The value must be nonzero.

const RCQuaternion & RCQuaternion::operator/= TReal  rhs  )  [inline]
 

Devides all elements of the quaternion by the specified value. The value must be nonzero.

const RCQuaternion & RCQuaternion::operator= const RCQuaternion Source  )  [inline]
 

Assigns the specified quaterion to this one.

const TReal & RCQuaternion::operator[] TInt  nIndex  )  const [inline]
 

Returns the nIndex'th element of the quaternion while the oder is x, y, z, w. An index greater 3 is invalid.

TReal & RCQuaternion::operator[] TInt  nIndex  )  [inline]
 

Returns the nIndex'th element of the quaternion while the oder is x, y, z, w. An index greater 3 is invalid.

void RCQuaternion::SetEulerAngles TReal  nPhi,
TReal  nTheta,
TReal  nPsi,
TBool  bInRad = true
 

Sets the quaternion to represent the rotation of the specified spheric angles.


The documentation for this class was generated from the following files:
Generated on Thu Feb 16 12:46:19 2006 for Simulator Bob by  doxygen 1.4.6-NO