This class is used to create a quaternion to be used with rotations. More...
#include <CQuaternion.H>
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. | |
This class is used to create a quaternion to be used with rotations.
| CQuaternion::CQuaternion | ( | ) | [inline] |
| CQuaternion::CQuaternion | ( | float | xAxis, | |
| float | yAxis, | |||
| float | zAxis, | |||
| float | wAxis | |||
| ) | [inline] |
| CQuaternion CQuaternion::Conjugate | ( | ) | [inline] |
Get the conjugate of the quaternion.
References CQuaternion(), w, x, y, and z.
Referenced by CCamera::RotateCamera().
| void CQuaternion::CreateMatrix | ( | float * | pMatrix | ) | [inline] |
| CQuaternion CQuaternion::operator* | ( | const CQuaternion & | q | ) | [inline] |
| void CQuaternion::operator= | ( | const CQuaternion & | q | ) | [inline] |
| void CQuaternion::Rotatef | ( | float | amount, | |
| float | xAxis, | |||
| float | yAxis, | |||
| float | zAxis | |||
| ) | [inline] |
Rotate the quaternion by the specified amount around the specified axis.
| 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().
| float CQuaternion::w |
Axis for the quaternion.
Referenced by Conjugate(), CQuaternion(), CreateMatrix(), operator*(), operator=(), CCamera::RotateCamera(), and Rotatef().
| float CQuaternion::x |
Axis for the quaternion.
Referenced by Conjugate(), CQuaternion(), CreateMatrix(), operator*(), operator=(), CCamera::RotateCamera(), and Rotatef().
| float CQuaternion::y |
Axis for the quaternion.
Referenced by Conjugate(), CQuaternion(), CreateMatrix(), operator*(), operator=(), CCamera::RotateCamera(), and Rotatef().
| float CQuaternion::z |
Axis for the quaternion.
Referenced by Conjugate(), CQuaternion(), CreateMatrix(), operator*(), operator=(), CCamera::RotateCamera(), and Rotatef().
1.6.1