CQuaternion Class Reference

This class is used to create a quaternion to be used with rotations. More...

#include <CQuaternion.H>

List of all members.

Public Member Functions

 CQuaternion ()
 Default constructor.
 CQuaternion (float xAxis, float yAxis, float zAxis, float wAxis)
 Constructor for specified values.
void operator= (const CQuaternion &q)
 Set one quaternion equal to another.
CQuaternion operator* (const CQuaternion &q)
 Multiply quaternions.
CQuaternion Conjugate ()
 Get the conjugate of the quaternion.
void Rotatef (float amount, float xAxis, float yAxis, float zAxis)
 Rotate the quaternion by the specified amount around the specified axis.
void CreateMatrix (float *pMatrix)
 Create a rotation matrix from this quaternion.

Public Attributes

float x
 Axis for the quaternion.
float y
 Axis for the quaternion.
float z
 Axis for the quaternion.
float w
 Axis for the quaternion.

Detailed Description

This class is used to create a quaternion to be used with rotations.


Constructor & Destructor Documentation

CQuaternion::CQuaternion (  )  [inline]

Default constructor.

References w, x, y, and z.

Referenced by Conjugate().

CQuaternion::CQuaternion ( float  xAxis,
float  yAxis,
float  zAxis,
float  wAxis 
) [inline]

Constructor for specified values.

Parameters:
xAxis Axis of rotation.
yAxis Axis of rotation.
zAxis Axis of rotation.
wAxis Axis of rotation.

References w, x, y, and z.


Member Function Documentation

CQuaternion CQuaternion::Conjugate (  )  [inline]

Get the conjugate of the quaternion.

Returns:
The result of conjugation.

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

Referenced by CCamera::RotateCamera().

void CQuaternion::CreateMatrix ( float *  pMatrix  )  [inline]

Create a rotation matrix from this quaternion.

Parameters:
pMatrix The rotation matrix generated.

References w, x, y, and z.

CQuaternion CQuaternion::operator* ( const CQuaternion q  )  [inline]

Multiply quaternions.

Parameters:
q Quaternion to multiply by.
Returns:
The result of multiplication.

References w, x, y, and z.

void CQuaternion::operator= ( const CQuaternion q  )  [inline]

Set one quaternion equal to another.

Parameters:
q Another quaternion.

References w, x, y, and z.

void CQuaternion::Rotatef ( float  amount,
float  xAxis,
float  yAxis,
float  zAxis 
) [inline]

Rotate the quaternion by the specified amount around the specified axis.

Parameters:
amount Amount to rotate by.
xAxis Axis to rotate about.
yAxis Axis to rotate about.
zAxis Axis to rotate about.

References M_GET_RADIANS, w, x, y, and z.

Referenced by CCamera::RotateCamera().


Member Data Documentation


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

Generated on Fri Apr 9 10:45:17 2010 for Visualizer by  doxygen 1.6.1