#include <QuatC.h>
Public Member Functions | |
| QuatC (float32 f32X=0, float32 f32Y=0, float32 f32Z=0, float32 f32W=1) | |
| Default constructor. | |
| QuatC (const QuatC &rQuat) | |
| copy constructor. | |
| virtual | ~QuatC () |
| Default destructor. | |
| void | from_rot_matrix (const Matrix3C &rMat) |
| Converts a matrix to quaternion and stores the result to the quaternion. | |
| Matrix3C | to_rot_matrix () const |
| Converts the quaternion to matrix and returns the result. | |
| void | from_axis_angle (const Vector3C &rVec, float32 f32Angle) |
| Creates quaternion from axis-angle presentation and stores the result in the quaternion. | |
| void | from_axis_angle (float32 f32X, float32 f32Y, float32 f32Z, float32 f32Angle) |
| Creates quaternion from axis-angle presentation and stores the result in the quaternion. | |
| void | to_axis_angle (Vector3C &rVec, float32 &f32Angle) const |
| Converts the quaternion to axis-angle presentation and stores the result to the arguments. | |
| void | to_axis_angle (float32 &f32X, float32 &f32Y, float32 &f32Z, float32 &f32Angle) const |
| Converts the quaternion to axis-angle presentation and stores the result to the arguments. | |
| QuatC | operator- () const |
| Negates the quaternion and returns the result. | |
| float32 & | operator[] (int32 i) |
| Return reference to the component pointed by the index. | |
| const float32 & | operator[] (int32 i) const |
| Return reference to the component pointed by the index. | |
| QuatC | operator+ (const QuatC &rQuat) const |
| Adds the quaternion specified by argument from the quaternion and returns the result. | |
| QuatC | operator- (const QuatC &rQuat) const |
| Substracts the quaternion specified by argument from the quaternion and returns the result. | |
| QuatC | operator * (const QuatC &rQuat) const |
| Multiplies the quaternion specified by argument from the quaternion and returns the result. | |
| QuatC | operator/ (const QuatC &rQuat) const |
| Divides the quaternion specified by argument from the quaternion and returns the result. | |
| QuatC | operator * (float32 f32Scalar) const |
| Multiplies the quaternion by a scalar value specified by the argument and returns the result. | |
| bool | operator== (const QuatC &rQuat) const |
| Returns true if both quaternions are equal, else false. | |
| bool | operator!= (const QuatC &rQuat) const |
| Returns true if both quaternions are non-equal, else false. | |
| float32 | dot (const QuatC &rQuat) const |
| Computes the quaternion dot product and returns the result. | |
| float32 | norm () const |
| Return the squared-length of the quaternion. | |
| QuatC | inverse () const |
| Converts the quaternion to unit-length and inverses it and returns the result. | |
| QuatC | unit_inverse () const |
| Inverses the quaternion and returns the result. | |
| QuatC | exp () const |
| Computes the exponential of the quaternion and returns the result. | |
| QuatC | log () const |
| Computes the logarithm of the quaternion and returns the result. | |
| QuatC | normalize () const |
| Normalizes the quaternion to unit length and returns the result. | |
Static Public Member Functions | |
| QuatC | slerp (float32 f32T, const QuatC &rQ, const QuatC &rP) |
| Spherical linear interpolation. | |
Friends | |
| QuatC | operator * (float32 f32Scalar, const QuatC &rQuat) |
| Multiplies the quaternion by a scalar value specified by the argument and returns the result. | |
QuatC class defines a quaternion class which is used by the Demopaja system. The quaternion class implements standard set of methods and overdriven operators for easy use.
This class is implemented by the system.
|
||||||||||||||||||||
|
Default constructor.
|
|
|
copy constructor.
|
|
|
Default destructor.
|
|
|
Computes the quaternion dot product and returns the result.
|
|
|
Computes the exponential of the quaternion and returns the result.
|
|
||||||||||||||||||||
|
Creates quaternion from axis-angle presentation and stores the result in the quaternion.
|
|
||||||||||||
|
Creates quaternion from axis-angle presentation and stores the result in the quaternion.
|
|
|
Converts a matrix to quaternion and stores the result to the quaternion.
|
|
|
Converts the quaternion to unit-length and inverses it and returns the result. Use this method to inverse non-unit-length quaternions. |
|
|
Computes the logarithm of the quaternion and returns the result.
|
|
|
Return the squared-length of the quaternion.
|
|
|
Normalizes the quaternion to unit length and returns the result.
|
|
|
Multiplies the quaternion by a scalar value specified by the argument and returns the result.
|
|
|
Multiplies the quaternion specified by argument from the quaternion and returns the result.
|
|
|
Returns true if both quaternions are non-equal, else false.
|
|
|
Adds the quaternion specified by argument from the quaternion and returns the result.
|
|
|
Substracts the quaternion specified by argument from the quaternion and returns the result.
|
|
|
Negates the quaternion and returns the result.
|
|
|
Divides the quaternion specified by argument from the quaternion and returns the result.
|
|
|
Returns true if both quaternions are equal, else false.
|
|
|
Return reference to the component pointed by the index. The index values from 0 to 3 corresponds to components X, Y, Z, and W respectively. There are two versions of this method, this version is for retrieving the values. |
|
|
Return reference to the component pointed by the index. The index values from 0 to 3 corresponds to components X, Y, Z, and W respectively. There are two versions of this method, this version is to assign values. |
|
||||||||||||||||
|
Spherical linear interpolation.
|
|
||||||||||||||||||||
|
Converts the quaternion to axis-angle presentation and stores the result to the arguments.
|
|
||||||||||||
|
Converts the quaternion to axis-angle presentation and stores the result to the arguments.
|
|
|
Converts the quaternion to matrix and returns the result.
|
|
|
Inverses the quaternion and returns the result. Use this method to inverse unit-length quaternions. |
|
||||||||||||
|
Multiplies the quaternion by a scalar value specified by the argument and returns the result.
|