Main Page Modules Class Hierarchy Alphabetical List Compound List Compound Members
CSIBCQuaternion Class Reference
Generic class representing quaternions.
More...
#include <SIBCQuaternion.h>
List of all members.
Public Methods
- 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 matricies 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
CSIBCQuaternion::CSIBCQuaternion |
( |
|
) |
[inline] |
|
|
Default Constructor. Sets all components of the quaternion to zero, except W, which is set to one. -
See also:
-
CSIBCQuaternion::Init()
|
CSIBCQuaternion::CSIBCQuaternion |
( |
const CSIBCQuaternion & |
in_quat |
) |
[inline] |
|
Member Function Documentation
|
Gets the axis of rotation, and rotation angle about the axis, that is represented by this quaternion. -
Parameters:
-
out_vAxis |
Receives the axis of rotation. |
out_fAngle |
Receives the angle of rotation about the axis (in radians). |
-
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion was properly converted.
- SI_ERR_ERROR_MSG - The quaternion could not be converted, axis components and angle are all zero.
-
See also:
-
CSIBCQuaternion::GetXYZRotation
|
|
Returns the rotation matrix corresponding to this quaternion. The quaternion must be a unit quaternion for this operation to succeed. -
Parameters:
-
out_mat |
Reference to the matrix object to receive the rotation matrix. |
-
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion was properly converted.
- SI_ERR_ERROR_MSG - The quaternion was not a unit quaternion.
-
See also:
-
CSIBCQuaternion::GetXYZRotation , CSIBCQuaternion::GetAxisAngle
|
SI_Float CSIBCQuaternion::GetW |
( |
|
) |
const [inline] |
|
SI_Float CSIBCQuaternion::GetX |
( |
|
) |
const [inline] |
|
SI_Error CSIBCQuaternion::GetXYZRotation |
( |
SI_Float |
in_dX, |
|
|
SI_Float |
in_dY, |
|
|
SI_Float |
in_dZ, |
|
|
CSIBCVector3D & |
out_vect |
|
) |
|
|
|
Returns the euler rotation angles (pitch-roll-yaw) represented by this quaternion. -
Parameters:
-
out_vect |
Vector to receive the euler rotation angles. |
in_dX |
Ignored. |
in_dY |
Ignored. |
in_dZ |
Ignored. |
-
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion was properly converted.
-
See also:
-
CSIBCQuaternion::GetMatrix , CSIBCQuaternion::GetAxisAngle
|
|
Returns the euler rotation angles (pitch-roll-yaw) represented by this quaternion. -
Parameters:
-
out_vect |
Vector to receive the euler rotation angles. |
-
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion was properly converted.
-
See also:
-
CSIBCQuaternion::GetMatrix , CSIBCQuaternion::GetAxisAngle
|
SI_Float CSIBCQuaternion::GetY |
( |
|
) |
const [inline] |
|
SI_Float CSIBCQuaternion::GetZ |
( |
|
) |
const [inline] |
|
SI_Error CSIBCQuaternion::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_dX |
Value for the pitch euler angle, for the quaternion value. |
in_dY |
Value for the roll euler angle, for the quaternion value. |
in_dZ |
Value for the yaw euler angle, for the quaternion value. |
-
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion was properly initialized.
-
See also:
-
CSIBCQuaternion::Init
|
SI_Error CSIBCQuaternion::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_dX |
The new value for the X component of the quaternion. |
in_dY |
The new value for the Y component of the quaternion. |
in_dZ |
The new value for the Z component of the quaternion. |
in_dW |
The new value for the W component of the quaternion. |
-
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion was properly initialized.
-
See also:
-
CSIBCQuaternion::Init , CSIBCQuaternion::Set
|
SI_Error CSIBCQuaternion::Init |
( |
CSIBCQuaternion & |
in_quat |
) |
|
|
|
Initializes the quaternion component values to those of in_quat . -
Parameters:
-
in_quat |
The quaternion from which to copy initialization values. |
-
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion was properly initialized.
-
See also:
-
CSIBCQuaternion::CSIBCQuaternion(CSIBCQuaternion &) , CSIBCQuaternion::Init
|
SI_Error CSIBCQuaternion::Init |
( |
|
) |
[inline] |
|
|
Initializes the quaternion components values all to zero, except W, which is set to one. -
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion was properly initialized.
-
See also:
-
CSIBCQuaternion::CSIBCQuaternion() , CSIBCQuaternion::Init
|
void CSIBCQuaternion::operator= |
( |
const CSIBCQuaternion & |
in_quat |
) |
[inline] |
|
|
Sets this quaternion equal to in_quat . -
Parameters:
-
in_quat |
Quaternion to set this quaternion equal to. |
-
See also:
-
CSIBCQuaternion::Init(CSIBCQuaternion &)
|
SI_Error CSIBCQuaternion::SelfTest |
( |
|
) |
[inline] |
|
|
Tests to see whether this quaternion is valid. If the quaternion is invalid, an assertion will occur. -
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion is valid.
|
SI_Error CSIBCQuaternion::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_dX |
Value for the X component of the quaternion. |
in_dY |
Value for the Y component of the quaternion. |
in_dZ |
Value for the Z component of the quaternion. |
in_dW |
Value for the W component of the quaternion. |
-
Returns:
-
SI_Error Error code indicating the success or failure of this command.
Possible returns: - SI_SUCCESS - The quaternion was properly set.
-
See also:
-
CSIBCQuaternion::SetX , CSIBCQuaternion::SetY , CSIBCQuaternion::SetZ , CSIBCQuaternion::SetW
|
SI_Error CSIBCQuaternion::SetW |
( |
SI_Float |
in_dW |
) |
[inline] |
|
SI_Error CSIBCQuaternion::SetX |
( |
SI_Float |
in_dX |
) |
[inline] |
|
SI_Error CSIBCQuaternion::SetY |
( |
SI_Float |
in_dY |
) |
[inline] |
|
SI_Error CSIBCQuaternion::SetZ |
( |
SI_Float |
in_dZ |
) |
[inline] |
|
The documentation for this class was generated from the following files:
- SIBCQuaternion.h
- SIBCQuaternion.cpp
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.