#include <fbxquaternion.h>
FBX SDK quaternion class.
Quaternions form a four-dimensional normed division algebra over the real numbers. It is for calculations involving three-dimensional rotations.
- Examples:
- ViewScene/DrawScene.cxx.
Definition at line 27 of file fbxquaternion.h.
◆ FbxQuaternion() [1/4]
Constructor.
Initialize to the multiplicative identity.
◆ FbxQuaternion() [2/4]
Copy constructor.
- Parameters
-
◆ FbxQuaternion() [3/4]
FbxQuaternion |
( |
double |
pX, |
|
|
double |
pY, |
|
|
double |
pZ, |
|
|
double |
pW = 1.0 |
|
) |
| |
Constructor.
- Parameters
-
pX | The X component. |
pY | The Y component. |
pZ | The Z component. |
pW | The W component. |
◆ FbxQuaternion() [4/4]
From axis degree constructor.
- Parameters
-
pAxis | The axis to rotate around. |
pDegree | The amount of degree to rotate around the axis. |
◆ ~FbxQuaternion()
◆ operator=()
Assignment operation.
- Parameters
-
◆ operator[]() [1/2]
double& operator[] |
( |
int |
pIndex | ) |
|
Accessor.
- Parameters
-
pIndex | The index of the component to access. |
- Returns
- The reference to the indexed component.
◆ operator[]() [2/2]
const double& operator[] |
( |
int |
pIndex | ) |
const |
Accessor.
- Parameters
-
pIndex | The index of the component to access. |
- Returns
- The const reference to the indexed component.
◆ GetAt()
double GetAt |
( |
int |
pIndex | ) |
const |
Get a vector element.
- Parameters
-
pIndex | The index of the component to access. |
- Returns
- The value of the indexed component.
◆ SetAt()
void SetAt |
( |
int |
pIndex, |
|
|
double |
pValue |
|
) |
| |
Set a vector element.
- Parameters
-
pIndex | The index of the component to set. |
pValue | The new value to set the component. |
◆ Set()
void Set |
( |
double |
pX, |
|
|
double |
pY, |
|
|
double |
pZ, |
|
|
double |
pW = 1.0 |
|
) |
| |
Set vector.
- Parameters
-
pX | The X component value. |
pY | The Y component value. |
pZ | The Z component value. |
pW | The W component value. |
◆ operator+() [1/2]
The addition operator between the scalar part of this quaternion and a scalar value, no influence on the vector part of the quaternion.
- Parameters
-
pValue | The scalar value to be added. |
- Returns
- The sum of addition.
◆ operator-() [1/3]
The subtraction operator between the scalar part of this quaternion and a scalar value, no influence on the vector part of the quaternion.
- Parameters
-
pValue | The scalar subtrahend. |
- Returns
- The difference of subtraction.
◆ operator*() [1/2]
Multiply all vector components by a value.
- Parameters
-
pValue | The value multiplying each component of the vector. |
- Returns
- New vector.
◆ operator/() [1/2]
Divide all vector components by a value.
- Parameters
-
pValue | The value dividing each component of the vector. |
- Returns
- New vector.
◆ operator+=() [1/2]
The in place addition operator between the real part of this quaternion and a scalar value.
- Parameters
-
pValue | The value to be added. |
- Returns
- The sum of addition.
◆ operator-=() [1/2]
The subtraction operator between the real part of this quaternion and a scalar value.
- Parameters
-
pValue | The scalar subtrahend. |
- Returns
- The difference of subtraction.
◆ operator*=() [1/2]
Multiply a value to all vector elements.
- Parameters
-
pValue | The value multiplying each component of the vector. |
- Returns
- The result of multiplying each component of the vector by pValue, replacing this quaternion.
◆ operator/=() [1/2]
Divide all vector elements by a value.
- Parameters
-
pValue | The value dividing each component of the vector. |
- Returns
- The result of dividing each component of the vector by pValue, replacing this quaternion.
◆ operator-() [2/3]
Unary minus operator.
- Returns
- A quaternion where each component is multiplied by -1.
◆ operator+() [2/2]
Add two vectors together.
- Parameters
-
pQuaternion | Quaternion to add. |
- Returns
- The quaternion v' = this + pQuaternion.
◆ operator-() [3/3]
Subtract a quaternion from another quaternion.
- Parameters
-
pQuaternion | Quaternion to subtract. |
- Returns
- The quaternion v' = this - pQuaternion.
◆ operator*() [2/2]
The quaternion multiplication operator.
- Parameters
-
pOther | The quaternion to be multiplied with this quaternion. |
- Returns
- The product of two quaternions.
◆ operator/() [2/2]
The quaternion division operator.
- Parameters
-
pOther | The divisor quaternion. |
- Returns
- The quotient quaternion.
◆ operator+=() [2/2]
Add two quaternions together.
- Parameters
-
pQuaternion | Quaternion to add. |
- Returns
- The quaternion v' = this + pQuaternion, replacing this quaternion.
◆ operator-=() [2/2]
Subtract a quaternion from another vector.
- Parameters
-
pQuaternion | Quaternion to subtract. |
- Returns
- The quaternion v' = this - pQuaternion, replacing this quaternion.
◆ operator*=() [2/2]
The in place quaternion multiplication operator.
- Parameters
-
pOther | The quaternion to be multiplied with this quaternion. |
- Returns
- The product of two quaternions.
◆ operator/=() [2/2]
The in place quaternion division operator.
- Parameters
-
pOther | The divisor quaternion. |
- Returns
- The quotient quaternion.
◆ Product()
Return quaternion product.
- Parameters
-
pOther | The quaternion to be multiplied with this quaternion. |
- Returns
- The product of two quaternions.
◆ DotProduct()
Return quaternion dot product.
- Parameters
-
pQuaternion | Dot product quaternion. |
- Returns
- The dot product of this quaternion and pQuaternion.
- Examples:
- ViewScene/DrawScene.cxx.
◆ Normalize()
Normalize the quaternion, length set to 1.
◆ Conjugate()
Calculate the quaternion conjugate.
- Returns
- The conjugate of this quaternion.
◆ Length()
Calculate the length (norm) of the quaternion.
- Returns
- The length of the quaternion.
◆ Inverse()
Calculate the inverse of the quaternion.
- Returns
- The inverse of this quaternion.
◆ SetAxisAngle()
void SetAxisAngle |
( |
const FbxVector4 & |
pAxis, |
|
|
double |
pDegree |
|
) |
| |
Set the quaternion rotation from an axis degree angle.
- Parameters
-
pAxis | The axis to rotate around. |
pDegree | The amount of degree to rotate around the axis. |
◆ Slerp()
Calculate a spherical linear interpolation quaternion.
- Parameters
-
pOther | The other quaternion to interpolate with. |
pWeight | A value between 0.0 and 1.0 to specify the interpolation amount. |
◆ ComposeSphericalXYZ()
void ComposeSphericalXYZ |
( |
const FbxVector4 |
pEuler | ) |
|
Create a Quaternion equivalent to the supplied Euler XYZ in spherical coordinate.
- Parameters
-
pEuler | The Euler XYZ angle (in degrees). |
◆ DecomposeSphericalXYZ()
Create an Euler XYZ equivalent to the current quaternion.
- Returns
- The Euler XYZ angle (in degrees) equivalent to the current quaternion in spherical coordinate.
◆ operator==()
Equivalence operator.
- Parameters
-
pV | The quaternion to be compared to this quaternion. |
- Returns
true
if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), false
otherwise.
◆ operator!=()
Non equivalence operator.
- Parameters
-
pV | The quaternion to be compared to this. |
- Returns
false
if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), true
otherwise.
◆ operator double *()
Cast the vector in a double pointer.
◆ operator const double *()
operator const double * |
( |
| ) |
const |
Cast the vector in a const double pointer.
◆ Compare()
int Compare |
( |
const FbxQuaternion & |
pQ2, |
|
|
const double |
pThreshold = (1.0e-6) |
|
) |
| const |
Comparison method.
- Parameters
-
pQ2 | Quaternion to compare with this |
pThreshold | Epsilon for small number comparison |
- Returns
- 0 if quaternions are equal, non-zero value otherwise.
The documentation for this class was generated from the following file: