Keos::CQuaternion Class Reference

Quaternions class. More...

#include <KeosQuaternion.h>

List of all members.

Public Member Functions

 CQuaternion (float X=0.0f, float Y=0.0f, float Z=0.0f, float W=1.0f)
 Default constructor.
 CQuaternion (const CMatrix4 &Matrix)
 Constructor from one matrix.
 CQuaternion (const TVector3F &Axis, float Angle)
 Constructor from one axis and one angle.
void Identity ()
 Identity quaternion.
void Normalize ()
 Normalize the quaternion.
CQuaternion Conjugate () const
 Return the conjugate.
CMatrix4 ToMatrix () const
 Build a rotation matrix from quaternion.
void FromMatrix (const CMatrix4 &Matrix)
 Build quaternion from one matrice.
void FromAxisAngle (const TVector3F &Axis, float Angle)
 Build quaternion from one axis and one angle.
void ToAxisAngle (TVector3F &Axis, float &Angle) const
 Transform quaternion into an axis and a rotation angle.
void FromEulerAngles (float X, float Y, float Z)
 Build quaternion from three Euler angles.
CQuaternion operator * (const CQuaternion &Quaternion) const
const CQuaternionoperator *= (const CQuaternion &Quaternion)

Public Attributes

float x
float y
float z
float w


Detailed Description

Quaternions class.

Definition at line 34 of file KeosQuaternion.h.


Constructor & Destructor Documentation

Keos::CQuaternion::CQuaternion ( float  X = 0.0f,
float  Y = 0.0f,
float  Z = 0.0f,
float  W = 1.0f 
) [inline]

Default constructor.

Definition at line 114 of file KeosQuaternion.h.

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

Keos::CQuaternion::CQuaternion ( const CMatrix4 Matrix  )  [inline]

Constructor from one matrix.

Parameters:
Matrix Source matrix.

Definition at line 122 of file KeosQuaternion.h.

References FromMatrix().

Keos::CQuaternion::CQuaternion ( const TVector3F Axis,
float  Angle 
) [inline]

Constructor from one axis and one angle.

Parameters:
Axis Rotation axis.
Angle Rotation angle.

Definition at line 128 of file KeosQuaternion.h.

References FromAxisAngle().


Member Function Documentation

void Keos::CQuaternion::Identity (  )  [inline]

Identity quaternion.

Definition at line 134 of file KeosQuaternion.h.

References w, x, y, and z.

void Keos::CQuaternion::Normalize (  )  [inline]

Normalize the quaternion.

Definition at line 141 of file KeosQuaternion.h.

References w, x, y, and z.

Referenced by FromAxisAngle().

CQuaternion Keos::CQuaternion::Conjugate (  )  const [inline]

Return the conjugate.

Returns:
Quaternion conjugate.

Definition at line 155 of file KeosQuaternion.h.

References CQuaternion(), w, x, y, and z.

CMatrix4 Keos::CQuaternion::ToMatrix (  )  const [inline]

Build a rotation matrix from quaternion.

Returns:
Built matrix.

Definition at line 161 of file KeosQuaternion.h.

References w, x, y, and z.

void Keos::CQuaternion::FromMatrix ( const CMatrix4 Matrix  )  [inline]

Build quaternion from one matrice.

Parameters:
Matrix Source matrix.

Definition at line 180 of file KeosQuaternion.h.

References w, x, y, and z.

Referenced by CQuaternion().

void Keos::CQuaternion::FromAxisAngle ( const TVector3F Axis,
float  Angle 
) [inline]

Build quaternion from one axis and one angle.

Parameters:
Axis Rotation axis.
Angle Rotation angle.

Definition at line 222 of file KeosQuaternion.h.

References Normalize(), w, Keos::CVector3< T >::x, x, Keos::CVector3< T >::y, y, Keos::CVector3< T >::z, and z.

Referenced by CQuaternion().

void Keos::CQuaternion::ToAxisAngle ( TVector3F Axis,
float &  Angle 
) const [inline]

Transform quaternion into an axis and a rotation angle.

Parameters:
Axis Rotation axis.
Angle Rotation angle.

Definition at line 236 of file KeosQuaternion.h.

References w, Keos::CVector3< T >::x, x, Keos::CVector3< T >::y, y, Keos::CVector3< T >::z, and z.

void Keos::CQuaternion::FromEulerAngles ( float  X,
float  Y,
float  Z 
) [inline]

Build quaternion from three Euler angles.

Parameters:
X X-axis rotation.
Y Y-axis rotation.
Z Z-axis rotation.

Definition at line 258 of file KeosQuaternion.h.

CQuaternion Keos::CQuaternion::operator * ( const CQuaternion Quaternion  )  const [inline]

Definition at line 268 of file KeosQuaternion.h.

References CQuaternion(), w, x, y, and z.

const CQuaternion & Keos::CQuaternion::operator *= ( const CQuaternion Quaternion  )  [inline]

Definition at line 277 of file KeosQuaternion.h.


Member Data Documentation

float Keos::CQuaternion::x

Definition at line 99 of file KeosQuaternion.h.

Referenced by Conjugate(), FromAxisAngle(), FromMatrix(), Identity(), Normalize(), operator *(), Keos::operator<<(), Keos::operator>>(), ToAxisAngle(), and ToMatrix().

float Keos::CQuaternion::y

Definition at line 100 of file KeosQuaternion.h.

Referenced by Conjugate(), FromAxisAngle(), FromMatrix(), Identity(), Normalize(), operator *(), Keos::operator<<(), Keos::operator>>(), ToAxisAngle(), and ToMatrix().

float Keos::CQuaternion::z

Definition at line 101 of file KeosQuaternion.h.

Referenced by Conjugate(), FromAxisAngle(), FromMatrix(), Identity(), Normalize(), operator *(), Keos::operator<<(), Keos::operator>>(), ToAxisAngle(), and ToMatrix().

float Keos::CQuaternion::w

Definition at line 102 of file KeosQuaternion.h.

Referenced by Conjugate(), FromAxisAngle(), FromMatrix(), Identity(), Normalize(), operator *(), Keos::operator<<(), Keos::operator>>(), ToAxisAngle(), and ToMatrix().


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 14:29:26 2007 for Keos by  doxygen 1.5.1-p1