#include <SIBCQuaterniond.h>
Public Member Functions |
|
| CSIBCQuaterniond () | |
| CSIBCQuaterniond (const double in_dW, const double in_dX, const double in_dY, const double in_dZ) | |
| CSIBCQuaterniond (const CSIBCVector3Dd &in_vct) | |
| CSIBCQuaterniond (const CSIBCVector4Dd &in_vct) | |
| bool | IsPure (double in_dEpsilon=PICO_EPS) const |
| double | GetLength () const |
| double | GetSquaredLength () const |
| CSIBCQuaterniond & | SetIdentity () |
| bool | IsIdentity () |
| CSIBCQuaterniond & | Normalize () |
| double | GetW () const |
| double | GetX () const |
| double | GetY () const |
| double | GetZ () const |
| CSIBCQuaterniond & | SetW (const double in_dW) |
| CSIBCQuaterniond & | SetX (const double in_dX) |
| CSIBCQuaterniond & | SetY (const double in_dY) |
| CSIBCQuaterniond & | SetZ (const double in_dZ) |
| CSIBCVector4Dd & | Get (CSIBCVector4Dd &out_vct) const |
| void | Get (double &out_dW, double &out_dX, double &out_dY, double &out_dZ) const |
| CSIBCQuaterniond & | Set (const double in_dW, const double in_dX, const double in_dY, const double in_dZ) |
| CSIBCQuaterniond & | Set (const CSIBCVector4Dd &in_vct) |
| CSIBCQuaterniond & | Set (const CSIBCVector3Dd &in_vct) |
| CSIBCQuaterniond & | Set (const CSIBCQuaterniond &in_quat) |
| bool | operator== (const CSIBCQuaterniond &in_quat) const |
| bool | operator!= (const CSIBCQuaterniond &in_quat) const |
| CSIBCQuaterniond & | Negate () |
| CSIBCQuaterniond & | Invert (const CSIBCQuaterniond &in_quat) |
| CSIBCQuaterniond & | Invert () |
| CSIBCQuaterniond & | Conjugate (const CSIBCQuaterniond &in_quat) |
| CSIBCQuaterniond & | Conjugate () |
| CSIBCQuaterniond & | Add (const CSIBCQuaterniond &in_quat) |
| CSIBCQuaterniond & | Add (const CSIBCQuaterniond &in_quat1, const CSIBCQuaterniond &in_quat2) |
| CSIBCQuaterniond & | Sub (const CSIBCQuaterniond &in_quat) |
| CSIBCQuaterniond & | Sub (const CSIBCQuaterniond &in_quat1, const CSIBCQuaterniond &in_quat2) |
| CSIBCQuaterniond & | Mul (const CSIBCQuaterniond &in_quat1, const CSIBCQuaterniond &in_quat2) |
| CSIBCQuaterniond & | Mul (const CSIBCQuaterniond &in_quat) |
| CSIBCQuaterniond & | Mul (const CSIBCVector3Dd &in_quatPure, const CSIBCQuaterniond &in_quat) |
| CSIBCQuaterniond & | Mul (const CSIBCQuaterniond &in_quat, const CSIBCVector3Dd &in_quatPure) |
| CSIBCQuaterniond & | Mul (const CSIBCQuaterniond &in_quat, const double in_dFactor) |
| CSIBCQuaterniond & | Mul (const double in_dFactor, const CSIBCQuaterniond &in_quat) |
| CSIBCQuaterniond & | Mul (const double in_dFactor) |
| CSIBCQuaterniond & | Slerp (const CSIBCQuaterniond &in_quatStart, const CSIBCQuaterniond &in_quatEnd, const double in_dU) |
| CSIBCQuaterniond & | BisectSlerp (const CSIBCQuaterniond &in_quatStart, const CSIBCQuaterniond &in_quatEnd) |
| CSIBCQuaterniond & | DoubleSlerp (const CSIBCQuaterniond &in_quatStart, const CSIBCQuaterniond &in_quatEnd) |
| bool | Ln (CSIBCQuaterniond &out_quat) |
| bool | Exp (CSIBCQuaterniond &out_quat) |
| CSIBCQuaterniond & | Squad (const CSIBCQuaterniond &in_quatB0, const CSIBCQuaterniond &in_quatS1, const CSIBCQuaterniond &in_quatS2, const CSIBCQuaterniond &in_quatB3, const double in_dU, const double in_dT) |
Friends |
|
| bool | AreAlmostEqual (const CSIBCQuaterniond &in_quat1, const CSIBCQuaterniond &in_quat2, const double in_dEpsilon=PICO_EPS) |
| double | GetDot (const CSIBCQuaterniond &in_quat1, const CSIBCQuaterniond &in_quat2) |
The notation used in this quaternion class (W, X, Y, Z) makes the quaternions closely related to 4D vectors (See CSIBCVector4Dd). 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 CSIBCQuaterniond class are represented by doulbe precision floating-point numbers. Its corresponding single precision class, CSIBCQuaternion, has much less functionality, thus this class is preferred.
| CSIBCQuaterniond | ( | ) |
Default Constructor. Sets all components of the quaternion to zero, except W, which is set to one.
| CSIBCQuaterniond | ( | const double | in_dW, | |
| const double | in_dX, | |||
| const double | in_dY, | |||
| const double | in_dZ | |||
| ) |
Sets the new quaternion's values to those given as the parameters.
| in_dW | The value for the W component of the quaternion. | |
| in_dX | The value for the X component of the quaternion. | |
| in_dY | The value for the Y component of the quaternion. | |
| in_dZ | The value for the Z component of the quaternion. |
| CSIBCQuaterniond | ( | const CSIBCVector3Dd & | in_vct | ) |
Sets the new quaternion's vector values (X, Y, Z) as the corresponding component values in in_vct, and the W component to zero.
| in_vct | Vector containing values for the new quaternion's vector components. |
| CSIBCQuaterniond | ( | const CSIBCVector4Dd & | in_vct | ) |
Sets the new quaternion's values as their corresponding components in in_vct.
| in_vct | 4D Vector containing component values for the new quaternion. |
| bool IsPure | ( | double | in_dEpsilon = PICO_EPS |
) | const |
Determines whether this quaternion is a 'pure' quaternion. Pure quaternions have a zero scalar (W) component. Since this function uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison.
| in_dEpsilon | Floating-point comparison error range. Defaults to PICO_EPS. |
Returns the length of this quaternion.
Returns the squared length of this quaternion.
Sets this quaternion to the identity quaternion (all components zero, except W is set to one).
Determines whether this quaternion is the identity quaternion (all components zero, except W is set to one). Note that this function uses exact equality comparison, thus the components must be their exact values.
Normalizes this quaternion to be a unit quaternion.
Returns the W (scalar) component of the quaternion.
Returns the X component of the quaternion.
Returns the Y component of the quaternion.
Returns the Z component of the quaternion.
Sets the W (scalar) component of the quaternion.
| in_dW | New value for the W component of the quaternion. |
Sets the X component of the quaternion.
| in_dX | NeX value for the X component of the quaternion. |
Sets the Y component of the quaternion.
| in_dY | NeY value for the Y component of the quaternion. |
Sets the Z component of the quaternion.
| in_dZ | NeZ value for the Z component of the quaternion. |
Gets the quaternion values with a CSIBCVector4Dd.
| out_vct | Vector to receive the values of this quaternion. |
out_vct. | void Get | ( | double & | out_dW, | |
| double & | out_dX, | |||
| double & | out_dY, | |||
| double & | out_dZ | |||
| ) | const |
Gets the quaternion values.
| out_dW | double to receive the W component of the quaternion. | |
| out_dX | double to receive the X component of the quaternion. | |
| out_dY | double to receive the Y component of the quaternion. | |
| out_dZ | double to receive the Z component of the quaternion. |
| CSIBCQuaterniond& Set | ( | const double | in_dW, | |
| const double | in_dX, | |||
| const double | in_dY, | |||
| const double | in_dZ | |||
| ) |
Sets the quaternion values.
| in_dW | New value for the W component of this quaternion. | |
| in_dX | New value for the X component of this quaternion. | |
| in_dY | New value for the Y component of this quaternion. | |
| in_dZ | New value for the Z component of this quaternion. |
| CSIBCQuaterniond& Set | ( | const CSIBCVector4Dd & | in_vct | ) |
Sets this quaternion's components from the corresponding components of in_vct.
| in_vct | Vector containing new values for the quaternion's components. |
| CSIBCQuaterniond& Set | ( | const CSIBCVector3Dd & | in_vct | ) |
Sets this quaternion's vector components from the corresponding components of in_vct. The scalar (W) component is set to zero.
| in_vct | Vector containing new values for the quaternion's vector components. |
| CSIBCQuaterniond& Set | ( | const CSIBCQuaterniond & | in_quat | ) |
Sets this quaternion's components equal to the components of in_quat.
| in_quat | Quaternion |
Determines whether each of the components of this quaternion and in_quat are exactly equal to each other.
| in_quat | Quaternion to compare equality with. |
Determines whether any of the components of this quaternion and in_quat are different. Note that this function does not use floating-point comparison error, thus any difference in component values will result in a true return value.
| in_quat | Quaternion to compare inequality with. |
Negates all components of this quaternion.
Sets this quaternion to the inverse of the unit quaternion in_quat. Since a unitary input quaternion is assumed, this function is equivalent to CSIBCQuaterniond::Conjugate(const CSIBCQuateriond &).
| in_quat | Quaternion whose inverse contains the new values for this quaternion's components. |
| CSIBCQuaterniond& Invert | ( | ) |
Sets this quaternion to its inverse. It is assumed that this quaternion is a unit quaternion.
Sets this quaternion to the conjugate of in_quat. A conjugate quaternion is a quaternion that has each of its vector components negated.
| in_quat | Quaternion whose conjugate contains the new values for this quaternion's components. |
| CSIBCQuaterniond& Conjugate | ( | ) |
Sets this quaternion to its conjugate. A conjugate quaternion is a quaternion that has each of its vector components negated.
Adds in_quat to this quaternion.
| in_quat | Quaternion to add to this quaternion. |
| CSIBCQuaterniond& Add | ( | const CSIBCQuaterniond & | in_quat1, | |
| const CSIBCQuaterniond & | in_quat2 | |||
| ) |
Adds in_quat1 and in_quat2 and stores the result in this quaternion.
| in_quat1 | First quaternion for addition. | |
| in_quat2 | Second quaternion for addition. |
Subtracts in_quat from this quaternion.
| in_quat | Quaternion to subtract from this quaternion. |
| CSIBCQuaterniond& Sub | ( | const CSIBCQuaterniond & | in_quat1, | |
| const CSIBCQuaterniond & | in_quat2 | |||
| ) |
Subtracts in_quat2 from in_quat1 and stores the result in this quaterinon.
| in_quat1 | Quaternion for subtraction. | |
| in_quat2 | Quaternion to subtract from in_quat1. |
Computes the right-multiplication of in_quat1 by in_quat2 (in_quat1 * in_quat2), and stores the result in this quaternion.
| in_quat1 | First quaternion for the multiplication (on the left). | |
| in_quat2 | Second quaternion for the multiplication (on the right). |
| CSIBCQuaterniond& Mul | ( | const CSIBCQuaterniond & | in_quat | ) |
Computes the right-multiplication of this quaternion by in_quat (this * in_quat), and stores the result in this quaternion.
| in_quat | Quaternion for the multiplication (on the right). |
| CSIBCQuaterniond& Mul | ( | const CSIBCVector3Dd & | in_quatPure, | |
| const CSIBCQuaterniond & | in_quat | |||
| ) |
Computes the right-multiplication of the pure quaternion represented by in_quatPure, and the quaternion in_quat (in_quatPure * in_quat), and stores the result in this quaternion.
| in_quatPure | Vector representing the vector components of a pure quaternion (W component is zero), for the multiplication (on the left). | |
| in_quat | Quaternion for the multiplication (on the right). |
| CSIBCQuaterniond& Mul | ( | const CSIBCQuaterniond & | in_quat, | |
| const CSIBCVector3Dd & | in_quatPure | |||
| ) |
Computes the right-multiplication of the quaternion in_quat and the pure quaternion represented by in_quatPure (in_quat * in_quatPure), and stores the result in this quaternion.
| in_quat | Quaternion for the multiplication (on the left). | |
| in_quatPure | Vector representing the vector components of a pure quaternion (W component is zero), for the multiplication (on the right). |
| CSIBCQuaterniond& Mul | ( | const CSIBCQuaterniond & | in_quat, | |
| const double | in_dFactor | |||
| ) |
Scales in_quat by a factor of in_dFactor, and stores the result in this quaternion.
| in_quat | Quaternion to scale. | |
| in_dFactor | Scaling factor for quaternion. |
| CSIBCQuaterniond& Mul | ( | const double | in_dFactor, | |
| const CSIBCQuaterniond & | in_quat | |||
| ) |
Scales in_quat by a factor of in_dFactor, and stores the result in this quaternion.
| in_quat | Quaternion to scale. | |
| in_dFactor | Scaling factor for quaternion. |
| CSIBCQuaterniond& Mul | ( | const double | in_dFactor | ) |
Scales this quaternion by a factor of in_dFactor.
| in_dFactor | Scaling factor to apply to this quaternion. |
| CSIBCQuaterniond& Slerp | ( | const CSIBCQuaterniond & | in_quatStart, | |
| const CSIBCQuaterniond & | in_quatEnd, | |||
| const double | in_dU | |||
| ) |
Computes the spherical linear interpolation of two unit quaternions, where in_quatStart and in_quatEnd are the starting and ending quaternions, respectively. The interpolation point bewteen the two vectors is given by in_dU, in the range [0.0f, 1.0f]. The interpolated quaternion is stored in this quaternion.
| in_quatStart | Unit quaternion for the starting interpolation point. | |
| in_quatEnd | Unit quaternion for the ending interpolation end. | |
| in_dU | Interpolation point between in_quatStart and in_quatEnd. Must be in the range [0.0f, 1.0f]. |
| CSIBCQuaterniond& BisectSlerp | ( | const CSIBCQuaterniond & | in_quatStart, | |
| const CSIBCQuaterniond & | in_quatEnd | |||
| ) |
Not implemented yet.
| CSIBCQuaterniond& DoubleSlerp | ( | const CSIBCQuaterniond & | in_quatStart, | |
| const CSIBCQuaterniond & | in_quatEnd | |||
| ) |
Not implemented yet.
Not implemented yet.
Not implemented yet.
| CSIBCQuaterniond& Squad | ( | const CSIBCQuaterniond & | in_quatB0, | |
| const CSIBCQuaterniond & | in_quatS1, | |||
| const CSIBCQuaterniond & | in_quatS2, | |||
| const CSIBCQuaterniond & | in_quatB3, | |||
| const double | in_dU, | |||
| const double | in_dT | |||
| ) |
Not implemented yet.
| bool AreAlmostEqual | ( | const CSIBCQuaterniond & | in_quat1, | |
| const CSIBCQuaterniond & | in_quat2, | |||
| const double | in_dEpsilon = PICO_EPS |
|||
| ) | [friend] |
Determines whether each of the components of in_quat1 and in_quat2 are equal to each other. Since this function uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison.
| in_quat1 | The first quaternion for equality comparison. | |
| in_quat2 | The second quaternion for equality comparison. | |
| in_dEpsilon | Floating-point comparison error range. Defaults to PICO_EPS. |
Computes the dot product of in_quat1 and in_quat2.
| in_quat1 | First quaternion for the dot product. | |
| in_quat2 | Second quaternion for the dot product. |
in_quat1 and in_quat2.