This reference page is linked to from the following overview topics: List of Python FBX classes.
FBX SDK quaternion class.
Quaternions form a four-dimensional normed division algebra over the real numbers. It is for calculations involving three-dimensional rotations.
Definition at line 29 of file kfbxquaternion.h.
#include <kfbxquaternion.h>
Public Member Functions |
|
void | GetKFbxQuaternionFromPositionToPosition (const KFbxVector4 &pP0, const KFbxVector4 &pP1) |
Constructors and Destructor |
|
KFbxQuaternion () | |
Constructor. |
|
KFbxQuaternion (const KFbxQuaternion &pV) | |
Copy constructor. |
|
KFbxQuaternion (double pX, double pY, double pZ, double pW=1.0) | |
Constructor. |
|
~KFbxQuaternion () | |
Destructor. |
|
Access |
|
KFbxQuaternion & | operator= (const KFbxQuaternion &pQuaternion) |
Assignment operation. |
|
double & | operator[] (int pIndex) |
Accessor. |
|
const double & | operator[] (int pIndex) const |
Accessor. |
|
double | GetAt (int pIndex) const |
Get a vector element. |
|
void | SetAt (int pIndex, double pValue) |
Set a vector element. |
|
void | Set (double pX, double pY, double pZ, double pW=1.0) |
Set vector. |
|
Scalar Operations |
|
KFbxQuaternion | operator+ (double pValue) const |
Add a value to all vector components.
|
|
KFbxQuaternion | operator- (double pValue) const |
Subtract a value from all vector components.
|
|
KFbxQuaternion | operator* (double pValue) const |
Multiply all vector components by a value.
|
|
KFbxQuaternion | operator/ (double pValue) const |
Divide all vector components by a value.
|
|
KFbxQuaternion & | operator+= (double pValue) |
Add a value to all vector components.
|
|
KFbxQuaternion & | operator-= (double pValue) |
Subtract a value from all vector components.
|
|
KFbxQuaternion & | operator*= (double pValue) |
Multiply a value to all vector elements.
|
|
KFbxQuaternion & | operator/= (double pValue) |
Divide all vector elements by a value.
|
|
Vector Operations |
|
KFbxQuaternion | operator- () const |
Unary minus operator. |
|
KFbxQuaternion | operator+ (const KFbxQuaternion &pQuaternion) const |
Add two vectors together. |
|
KFbxQuaternion | operator- (const KFbxQuaternion &pQuaternion) const |
Subtract a quaternion from another
quaternion. |
|
KFbxQuaternion | operator* (const KFbxQuaternion &pQuaternion) const |
Memberwise multiplication of two vectors.
|
|
KFbxQuaternion | operator/ (const KFbxQuaternion &pQuaternion) const |
Memberwise division of a quaternion with
another quaternion. |
|
KFbxQuaternion & | operator+= (const KFbxQuaternion &pQuaternion) |
Add two quaternions together. |
|
KFbxQuaternion & | operator-= (const KFbxQuaternion &pQuaternion) |
Subtract a quaternion from another vector.
|
|
KFbxQuaternion & | operator*= (const KFbxQuaternion &pQuaternion) |
Memberwise multiplication of two
quaternions. |
|
KFbxQuaternion & | operator/= (const KFbxQuaternion &pQuaternion) |
Memberwise division of a quaternion by
another quaternion. |
|
KFbxQuaternion | Product (const KFbxQuaternion &pQuaternion) const |
Return quaternion product. |
|
double | DotProduct (const KFbxQuaternion &pQuaternion) const |
Return quaternion dot product. |
|
void | Normalize () |
Normalize the quaternion, length set to 1.
|
|
void | Conjugate () |
Calculate the quaternion conjugate. |
|
double | Length () |
Calculate the length of the quaternion.
|
|
void | Inverse () |
Calculate the inverse of the quaternion.
|
|
void | ComposeSphericalXYZ (const KFbxVector4 pEuler) |
Create a Quaternion equivalent to the
supplied Euler XYZ in spherical coordinate. |
|
KFbxVector4 | DecomposeSphericalXYZ () const |
Create an Euler XYZ equivalent to the
current quaternion. |
|
Boolean Operations |
|
bool | operator== (const KFbxQuaternion &pV) const |
Equivalence operator. |
|
bool | operator!= (const KFbxQuaternion &pV) const |
Non equivalence operator. |
|
Casting |
|
operator double * () | |
Cast the vector in a double pointer.
|
|
operator const double * () const | |
Cast the vector in a const double pointer.
|
KFbxQuaternion | ( | ) |
Constructor.
KFbxQuaternion | ( | const KFbxQuaternion & | pV | ) |
Copy constructor.
pV | KFbxQuaternion object copied to this one. |
KFbxQuaternion | ( | double | pX, |
double | pY, | ||
double | pZ, | ||
double | pW = 1.0 |
||
) |
Constructor.
pX | The X component. |
pY | The Y component. |
pZ | The Z component. |
pW | The W component. |
~KFbxQuaternion | ( | ) |
Destructor.
KFbxQuaternion& operator= | ( | const KFbxQuaternion & | pQuaternion | ) |
Assignment operation.
pQuaternion | KFbxQuaternion object assigned to this one. |
double& operator[] | ( | int | pIndex | ) |
Accessor.
pIndex | The index of the component to access. |
Reimplemented from fbxVectorTemplate4< T >.
const double& operator[] | ( | int | pIndex | ) | const |
Accessor.
pIndex | The index of the component to access. |
Reimplemented from fbxVectorTemplate4< T >.
double GetAt | ( | int | pIndex | ) | const |
Get a vector element.
pIndex | The index of the component to access. |
void SetAt | ( | int | pIndex, |
double | pValue | ||
) |
Set a vector element.
pIndex | The index of the component to set. |
pValue | The new value to set the component. |
void Set | ( | double | pX, |
double | pY, | ||
double | pZ, | ||
double | pW = 1.0 |
||
) |
Set vector.
pX | The X component value. |
pY | The Y component value. |
pZ | The Z component value. |
pW | The W component value. |
KFbxQuaternion operator+ | ( | double | pValue | ) | const |
Add a value to all vector components.
pValue | The value to add to each component of the vector. |
KFbxQuaternion operator- | ( | double | pValue | ) | const |
Subtract a value from all vector components.
pValue | The value to subtract from each component of the vector. |
KFbxQuaternion operator* | ( | double | pValue | ) | const |
Multiply all vector components by a value.
pValue | The value multiplying each component of the vector. |
KFbxQuaternion operator/ | ( | double | pValue | ) | const |
Divide all vector components by a value.
pValue | The value dividing each component of the vector. |
KFbxQuaternion& operator+= | ( | double | pValue | ) |
Add a value to all vector components.
pValue | The value to add to each component of the vector. |
KFbxQuaternion& operator-= | ( | double | pValue | ) |
Subtract a value from all vector components.
pValue | The value to subtract from each component of the vector. |
KFbxQuaternion& operator*= | ( | double | pValue | ) |
Multiply a value to all vector elements.
pValue | The value multiplying each component of the vector. |
KFbxQuaternion& operator/= | ( | double | pValue | ) |
Divide all vector elements by a value.
pValue | The value dividing each component of the vector. |
KFbxQuaternion operator- | ( | ) | const |
Unary minus operator.
KFbxQuaternion operator+ | ( | const KFbxQuaternion & | pQuaternion | ) | const |
Add two vectors together.
pQuaternion | Quaternion to add. |
KFbxQuaternion operator- | ( | const KFbxQuaternion & | pQuaternion | ) | const |
Subtract a quaternion from another quaternion.
pQuaternion | Quaternion to subtract. |
KFbxQuaternion operator* | ( | const KFbxQuaternion & | pQuaternion | ) | const |
Memberwise multiplication of two vectors.
pQuaternion | Multiplying quaternion. |
KFbxQuaternion operator/ | ( | const KFbxQuaternion & | pQuaternion | ) | const |
Memberwise division of a quaternion with another quaternion.
pQuaternion | Dividing quaternion. |
KFbxQuaternion& operator+= | ( | const KFbxQuaternion & | pQuaternion | ) |
Add two quaternions together.
pQuaternion | Quaternion to add. |
KFbxQuaternion& operator-= | ( | const KFbxQuaternion & | pQuaternion | ) |
Subtract a quaternion from another vector.
pQuaternion | Quaternion to subtract. |
KFbxQuaternion& operator*= | ( | const KFbxQuaternion & | pQuaternion | ) |
Memberwise multiplication of two quaternions.
pQuaternion | Multiplying quaternion. |
KFbxQuaternion& operator/= | ( | const KFbxQuaternion & | pQuaternion | ) |
Memberwise division of a quaternion by another quaternion.
pQuaternion | Dividing quaternion. |
KFbxQuaternion Product | ( | const KFbxQuaternion & | pQuaternion | ) | const |
Return quaternion product.
pQuaternion | product quaternion. |
double DotProduct | ( | const KFbxQuaternion & | pQuaternion | ) | const |
Return quaternion dot product.
pQuaternion | Dot product quaternion. |
void Normalize | ( | ) |
Normalize the quaternion, length set to 1.
void Conjugate | ( | ) |
Calculate the quaternion conjugate.
double Length | ( | ) |
Calculate the length of the quaternion.
void Inverse | ( | ) |
Calculate the inverse of the quaternion.
void ComposeSphericalXYZ | ( | const KFbxVector4 | pEuler | ) |
Create a Quaternion equivalent to the supplied Euler XYZ in spherical coordinate.
pEuler | The Euler XYZ angle. |
KFbxVector4 DecomposeSphericalXYZ | ( | ) | const |
Create an Euler XYZ equivalent to the current quaternion.
bool operator== | ( | const KFbxQuaternion & | pV | ) | const |
Equivalence operator.
pV | The quaternion to be compared to this quaternion. |
true
if the two quaternions are equal (each
element is within a 1.0e-6 tolerance), false
otherwise.bool operator!= | ( | const KFbxQuaternion & | pV | ) | const |
Non equivalence operator.
pV | The quaternion to be compared to this. |
false
if the two quaternions are equal (each
element is within a 1.0e-6 tolerance), true
otherwise.operator double * | ( | ) |
Cast the vector in a double pointer.
operator const double * | ( | ) | const |
Cast the vector in a const double pointer.
void GetKFbxQuaternionFromPositionToPosition | ( | const KFbxVector4 & | pP0, |
const KFbxVector4 & | pP1 | ||
) |