CSIBCQuaternion Class Reference
Generic class representing quaternions.
More...#include <SIBCQuaternion.h>
List of all members.
|
|
Public Member Functions
|
| |
CSIBCQuaternion () |
| |
CSIBCQuaternion (const CSIBCQuaternion &in_quat) |
| SI_Error |
Init () |
| SI_Error |
Init (CSIBCQuaternion &in_quat) |
| SI_Error |
Init (SI_Float in_dX, SI_Float in_dY, SI_Float in_dZ, SI_Float in_dW) |
| SI_Error |
Init (SI_Float in_dX, SI_Float in_dY, SI_Float in_dZ) |
| SI_Float |
GetX () const |
| SI_Float |
GetY () const |
| SI_Float |
GetZ () const |
| SI_Float |
GetW () const |
| SI_Error |
SetX (SI_Float in_dX) |
| SI_Error |
SetY (SI_Float in_dY) |
| SI_Error |
SetZ (SI_Float in_dZ) |
| SI_Error |
SetW (SI_Float in_dW) |
| SI_Error |
GetMatrix (CSIBCMatrix4x4 &out_mat) |
| SI_Error |
GetXYZRotation (CSIBCVector3D &out_vect) |
| SI_Error |
GetXYZRotation (SI_Float in_dX, SI_Float in_dY, SI_Float in_dZ, CSIBCVector3D &out_vect) |
| SI_Error |
GetAxisAngle (CSIBCVector3D &out_vAxis, float &out_fAngle) |
| SI_Error |
Set (SI_Float in_dX, SI_Float in_dY, SI_Float in_dZ, SI_Float in_dW) |
| void |
operator= (const CSIBCQuaternion &in_quat) |
| SI_Error |
SelfTest () |
Detailed Description
Generic class representing quaternions.
The notation used in this quaternion class (W, X, Y, Z) makes the quaternions closely related to 4D vectors (See CSIBCVector4D). In general, the quaternion can be thought of as a scalar plus a vector, where the W component is the vector, and X, Y and Z are the coefficients of the I, J and K matrices respectively.
The components of the CSIBCQuaternion class are represented by single precision floating-point numbers. Its corresponding double precision class, CSIBCQuaterniond, has much more functionality, such as the ability to interpolate and multiply quaternions.
Constructor & Destructor Documentation
Default Constructor. Sets all components of the quaternion to zero, except W, which is set to one.
- See also:
- CSIBCQuaternion::Init()
Copy Copnstructor. Copies the data from in_quat to the new quaternion.
- Parameters:
-
| [in] |
in_quat |
Quaternion containing data to copy to this quaternion. |
- See also:
- CSIBCQuaternion::operator=
CSIBCQuaternion::Init(CSIBCQuaternion &)
Member Function Documentation
Initializes the quaternion component values to those of in_quat.
- Parameters:
-
| [in] |
in_quat |
The quaternion from which to copy initialization values. |
- Return values:
-
- See also:
- CSIBCQuaternion::CSIBCQuaternion(CSIBCQuaternion &)
CSIBCQuaternion::Init
| SI_Error Init |
( |
SI_Float |
in_dX, |
|
|
|
SI_Float |
in_dY, |
|
|
|
SI_Float |
in_dZ, |
|
|
|
SI_Float |
in_dW |
|
|
|
) |
|
|
|
Initializes the quaternion components values to the values given.
- Parameters:
-
| [in] |
in_dX |
The new value for the X component of the quaternion. |
| [in] |
in_dY |
The new value for the Y component of the quaternion. |
| [in] |
in_dZ |
The new value for the Z component of the quaternion. |
| [in] |
in_dW |
The new value for the W component of the quaternion. |
- Return values:
-
- See also:
- CSIBCQuaternion::Init
CSIBCQuaternion::Set
| SI_Error Init |
( |
SI_Float |
in_dX, |
|
|
|
SI_Float |
in_dY, |
|
|
|
SI_Float |
in_dZ |
|
|
|
) |
|
|
|
Initializes the quaternion to the quaternion represented by the euler rotations given by the euler angles (pitch-roll-yaw) of the parameters.
- Parameters:
-
| [in] |
in_dX |
Value for the pitch euler angle, for the quaternion value. |
| [in] |
in_dY |
Value for the roll euler angle, for the quaternion value. |
| [in] |
in_dZ |
Value for the yaw euler angle, for the quaternion value. |
- Return values:
-
- See also:
- CSIBCQuaternion::Init
| SI_Float GetX |
( |
|
) |
const [inline] |
Returns the X component of the quaternion.
- Returns:
- The X component of the quaternion.
- See also:
- CSIBCQuaternion::GetY
CSIBCQuaternion::GetZ
CSIBCQuaternion::GetW
CSIBCQuaternion::SetX
| SI_Float GetY |
( |
|
) |
const [inline] |
Returns the Y component of the quaternion.
- Returns:
- The Y component of the quaternion.
- See also:
- CSIBCQuaternion::GetX
CSIBCQuaternion::GetZ
CSIBCQuaternion::GetW
CSIBCQuaternion::SetY
| SI_Float GetZ |
( |
|
) |
const [inline] |
Returns the Z component of the quaternion.
- Returns:
- The Z component of the quaternion.
- See also:
- CSIBCQuaternion::GetX
CSIBCQuaternion::GetY
CSIBCQuaternion::GetW
CSIBCQuaternion::SetZ
| SI_Float GetW |
( |
|
) |
const [inline] |
Returns the W component of the quaternion.
- Returns:
- The W component of the quaternion.
- See also:
- CSIBCQuaternion::GetX
CSIBCQuaternion::GetY
CSIBCQuaternion::GetZ
CSIBCQuaternion::SetW
| SI_Error SetX |
( |
SI_Float |
in_dX |
) |
[inline] |
Sets the X component of the quaternion.
- Parameters:
-
| [in] |
in_dX |
The new values for the X component of the quaternion. |
- Return values:
-
- See also:
- CSIBCQuaternion::Set
CSIBCQuaternion::SetY
CSIBCQuaternion::SetZ
CSIBCQuaternion::SetW
CSIBCQuaternion::GetX
| SI_Error SetY |
( |
SI_Float |
in_dY |
) |
[inline] |
Sets the Y component of the quaternion.
- Parameters:
-
| [in] |
in_dY |
The new values for the Y component of the quaternion. |
- Return values:
-
- See also:
- CSIBCQuaternion::Set
CSIBCQuaternion::SetX
CSIBCQuaternion::SetZ
CSIBCQuaternion::SetW
CSIBCQuaternion::GetY
| SI_Error SetZ |
( |
SI_Float |
in_dZ |
) |
[inline] |
Sets the Z component of the quaternion.
- Parameters:
-
| [in] |
in_dZ |
The new values for the Z component of the quaternion. |
- Return values:
-
- See also:
- CSIBCQuaternion::Set
CSIBCQuaternion::SetX
CSIBCQuaternion::SetY
CSIBCQuaternion::SetW
CSIBCQuaternion::GetZ
| SI_Error SetW |
( |
SI_Float |
in_dW |
) |
[inline] |
Sets the W component of the quaternion.
- Parameters:
-
| [in] |
in_dW |
The new values for the W component of the quaternion. |
- Return values:
-
- See also:
- CSIBCQuaternion::Set
CSIBCQuaternion::SetX
CSIBCQuaternion::SetY
CSIBCQuaternion::SetZ
CSIBCQuaternion::GetW
Returns the rotation matrix corresponding to this quaternion. The quaternion must be a unit quaternion for this operation to succeed.
- Parameters:
-
| [out] |
out_mat |
Reference to the matrix object to receive the rotation matrix. |
- Return values:
-
- See also:
- CSIBCQuaternion::GetXYZRotation
CSIBCQuaternion::GetAxisAngle
Returns the euler rotation angles (pitch-roll-yaw) represented by this quaternion.
- Parameters:
-
| [out] |
out_vect |
Vector to receive the euler rotation angles. |
- Return values:
-
- See also:
- CSIBCQuaternion::GetMatrix
CSIBCQuaternion::GetAxisAngle
Returns the euler rotation angles (pitch-roll-yaw) represented by this quaternion.
- Parameters:
-
| [out] |
out_vect |
Vector to receive the euler rotation angles. |
| [in] |
in_dX |
Ignored. |
| [in] |
in_dY |
Ignored. |
| [in] |
in_dZ |
Ignored. |
- Return values:
-
- See also:
- CSIBCQuaternion::GetMatrix
CSIBCQuaternion::GetAxisAngle
Returns the axis of rotation, and rotation angle about the axis, that is represented by this quaternion.
- Parameters:
-
| [out] |
out_vAxis |
Receives the axis of rotation. |
| [out] |
out_fAngle |
Receives the angle of rotation about the axis (in radians). |
- Return values:
-
- See also:
- CSIBCQuaternion::GetXYZRotation
| SI_Error Set |
( |
SI_Float |
in_dX, |
|
|
|
SI_Float |
in_dY, |
|
|
|
SI_Float |
in_dZ, |
|
|
|
SI_Float |
in_dW |
|
|
|
) |
|
|
[inline] |
Sets all components of the quaternion.
- Parameters:
-
| [in] |
in_dX |
Value for the X component of the quaternion. |
| [in] |
in_dY |
Value for the Y component of the quaternion. |
| [in] |
in_dZ |
Value for the Z component of the quaternion. |
| [in] |
in_dW |
Value for the W component of the quaternion. |
- Return values:
-
- See also:
- CSIBCQuaternion::SetX
CSIBCQuaternion::SetY
CSIBCQuaternion::SetZ
CSIBCQuaternion::SetW
Sets this quaternion equal to in_quat.
- Parameters:
-
| [in] |
in_quat |
Quaternion to set this quaternion equal to. |
- See also:
- CSIBCQuaternion::Init(CSIBCQuaternion &)
Tests to see whether this quaternion is valid. If the quaternion is invalid, an assertion will occur.
- Return values:
-
The documentation for this class was generated from the following file: