FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxDualQuaternion Class Reference

#include <fbxdualquaternion.h>

Class Description

FBX SDK dual quaternion class to represent rigid transformation, which is combined by two quaternions.

A transformation is said to be rigid if it preserves relative distances and angles. That means rotation and translation.

Examples:
ViewScene/DrawScene.cxx.

Definition at line 27 of file fbxdualquaternion.h.

Constructors and Destructor

 FbxDualQuaternion ()
 Constructor. More...
 
 FbxDualQuaternion (const FbxQuaternion &pV1, const FbxQuaternion &pV2)
 Constructor. More...
 
 FbxDualQuaternion (const FbxDualQuaternion &pV)
 Copy constructor. More...
 
 FbxDualQuaternion (const FbxQuaternion &pRotation, const FbxVector4 &pTranslation)
 Constructor. More...
 
 FbxDualQuaternion (double pX1, double pY1, double pZ1, double pW1, double pX2, double pY2, double pZ2, double pW2)
 Constructor. More...
 
 ~FbxDualQuaternion ()
 Destructor. More...
 

Access

FbxDualQuaternionoperator= (const FbxDualQuaternion &pDualQuaternion)
 Assignment operation. More...
 
void Set (double pX1, double pY1, double pZ1, double pW1, double pX2, double pY2, double pZ2, double pW2)
 Set vector. More...
 
FbxQuaternionGetFirstQuaternion ()
 Get the first quaternion of the dual quaternion. More...
 
FbxQuaternionGetSecondQuaternion ()
 Get the second quaternion of the dual quaternion. More...
 
const FbxQuaternionGetFirstQuaternion () const
 Get the first quaternion of the dual quaternion. More...
 
const FbxQuaternionGetSecondQuaternion () const
 Get the second quaternion of the dual quaternion. More...
 
FbxQuaternion GetRotation () const
 Get the rotation part from the dual quaternion. More...
 
FbxVector4 GetTranslation () const
 Get the translation part from the dual quaternion. More...
 

Scalar Operations

FbxDualQuaternion operator+ (double pValue) const
 Add a value to all vector components. More...
 
FbxDualQuaternion operator- (double pValue) const
 Subtract a value from all vector components. More...
 
FbxDualQuaternion operator* (double pValue) const
 Multiply all vector components by a value. More...
 
FbxDualQuaternion operator/ (double pValue) const
 Divide all vector components by a value. More...
 
FbxDualQuaternionoperator+= (double pValue)
 Add a value to all vector components. More...
 
FbxDualQuaternionoperator-= (double pValue)
 Subtract a value from all vector components. More...
 
FbxDualQuaternionoperator*= (double pValue)
 Multiply a value to all vector elements. More...
 
FbxDualQuaternionoperator/= (double pValue)
 Divide all vector elements by a value. More...
 

Vector Operations

FbxDualQuaternion operator- () const
 Unary minus operator. More...
 
FbxDualQuaternion operator+ (const FbxDualQuaternion &pDualQuaternion) const
 Add two vectors together. More...
 
FbxDualQuaternion operator- (const FbxDualQuaternion &pDualQuaternion) const
 Subtract a quaternion from another quaternion. More...
 
FbxDualQuaternion operator* (const FbxDualQuaternion &pDualQuaternion) const
 Memberwise multiplication of two vectors. More...
 
FbxDualQuaternion operator/ (const FbxDualQuaternion &pDualQuaternion) const
 Memberwise division of a dual quaternion with another dual quaternion. More...
 
FbxDualQuaternionoperator+= (const FbxDualQuaternion &pDualQuaternion)
 Add two quaternions together. More...
 
FbxDualQuaternionoperator-= (const FbxDualQuaternion &pDualQuaternion)
 Subtract a dual quaternion from another vector. More...
 
FbxDualQuaternionoperator*= (const FbxDualQuaternion &pDualQuaternion)
 Memberwise multiplication of two quaternions. More...
 
FbxDualQuaternionoperator/= (const FbxDualQuaternion &pDualQuaternion)
 Memberwise division of a dual quaternion by another dual quaternion. More...
 
FbxDualQuaternion operator* (const FbxVector4 pVector) const
 Multiplication of a dual quaternion by a FbxVector4. More...
 
FbxDualQuaternion Product (const FbxDualQuaternion &pDualQuaternion) const
 Return dual quaternion product. More...
 
void Normalize ()
 Normalize the dual quaternion, length set to 1. More...
 
void Inverse ()
 Calculate the dual quaternion's inverse. More...
 
FbxVector4 Deform (FbxVector4 &pPoint)
 Deform a point by this dual quaternion. More...
 

Conjugate Operations

Dual quaternion has three types of conjugate.

void Conjugate ()
 Conjugate both quaternions of this dual quaternion. More...
 
void Dual ()
 Conjugate in dual space. More...
 
void DualConjugate ()
 Conjugate both quaternions of this dual quaternion in dual space. More...
 

Boolean Operations

bool operator== (const FbxDualQuaternion &pV) const
 Equivalence operator. More...
 
bool operator!= (const FbxDualQuaternion &pV) const
 Non equivalence operator. More...
 

Constructor & Destructor Documentation

◆ FbxDualQuaternion() [1/5]

Constructor.

◆ FbxDualQuaternion() [2/5]

FbxDualQuaternion ( const FbxQuaternion pV1,
const FbxQuaternion pV2 
)

Constructor.

Parameters
pV1FbxQuaternion object.
pV2FbxQuaternion object.

◆ FbxDualQuaternion() [3/5]

Copy constructor.

Parameters
pVFbxQuaternion object copied to this one.

◆ FbxDualQuaternion() [4/5]

FbxDualQuaternion ( const FbxQuaternion pRotation,
const FbxVector4 pTranslation 
)

Constructor.

Parameters
pRotationThe rotation the dual quaternion is going to represent.
pTranslationThe translation the dual quaternion is going to represent.

◆ FbxDualQuaternion() [5/5]

FbxDualQuaternion ( double  pX1,
double  pY1,
double  pZ1,
double  pW1,
double  pX2,
double  pY2,
double  pZ2,
double  pW2 
)

Constructor.

Parameters
pX1The X component of the first quaternion.
pY1The Y component of the first quaternion.
pZ1The Z component of the first quaternion.
pW1The W component of the first quaternion.
pX2The X component of the second quaternion.
pY2The Y component of the second quaternion.
pZ2The Z component of the second quaternion.
pW2The W component of the second quaternion.

◆ ~FbxDualQuaternion()

Destructor.

Member Function Documentation

◆ operator=()

FbxDualQuaternion& operator= ( const FbxDualQuaternion pDualQuaternion)

Assignment operation.

Parameters
pDualQuaternionFbxDualQuaternion object assigned to this one.

◆ Set()

void Set ( double  pX1,
double  pY1,
double  pZ1,
double  pW1,
double  pX2,
double  pY2,
double  pZ2,
double  pW2 
)

Set vector.

Parameters
pX1The X component of the first quaternion.
pY1The Y component of the first quaternion.
pZ1The Z component of the first quaternion.
pW1The W component of the first quaternion.
pX2The X component of the second quaternion.
pY2The Y component of the second quaternion.
pZ2The Z component of the second quaternion.
pW2The W component of the second quaternion.

◆ GetFirstQuaternion() [1/2]

FbxQuaternion& GetFirstQuaternion ( )

Get the first quaternion of the dual quaternion.

Returns
The first quaternion of the dual quaternion.
Examples:
ViewScene/DrawScene.cxx.

◆ GetSecondQuaternion() [1/2]

FbxQuaternion& GetSecondQuaternion ( )

Get the second quaternion of the dual quaternion.

Returns
The second quaternion of the dual quaternion.

◆ GetFirstQuaternion() [2/2]

const FbxQuaternion& GetFirstQuaternion ( ) const

Get the first quaternion of the dual quaternion.

Returns
The first quaternion of the dual quaternion.

◆ GetSecondQuaternion() [2/2]

const FbxQuaternion& GetSecondQuaternion ( ) const

Get the second quaternion of the dual quaternion.

Returns
The second quaternion of the dual quaternion.

◆ GetRotation()

FbxQuaternion GetRotation ( ) const

Get the rotation part from the dual quaternion.

Returns
FbxQuaternion object to represent rotation.

◆ GetTranslation()

FbxVector4 GetTranslation ( ) const

Get the translation part from the dual quaternion.

Returns
FbxVector4 object to represent translation.
Remarks
A dual quaternion can represent rotation followed by translation, or translation followed by rotation. This method assumes that the rotation is expressed first, followed by translation, as is done by most DCC tools.

◆ operator+() [1/2]

FbxDualQuaternion operator+ ( double  pValue) const

Add a value to all vector components.

Parameters
pValueThe value to add to each component of the vector.
Returns
New vector.
Remarks
The passed value is not checked.

◆ operator-() [1/3]

FbxDualQuaternion operator- ( double  pValue) const

Subtract a value from all vector components.

Parameters
pValueThe value to subtract from each component of the vector.
Returns
New vector.
Remarks
The passed value is not checked.

◆ operator*() [1/3]

FbxDualQuaternion operator* ( double  pValue) const

Multiply all vector components by a value.

Parameters
pValueThe value multiplying each component of the vector.
Returns
New vector.
Remarks
The passed value is not checked.

◆ operator/() [1/2]

FbxDualQuaternion operator/ ( double  pValue) const

Divide all vector components by a value.

Parameters
pValueThe value dividing each component of the vector.
Returns
New vector.
Remarks
The passed value is not checked.

◆ operator+=() [1/2]

FbxDualQuaternion& operator+= ( double  pValue)

Add a value to all vector components.

Parameters
pValueThe value to add to each component of the vector.
Returns
The result of adding pValue to each component of the vector, replacing this dual quaternion.
Remarks
The passed value is not checked.

◆ operator-=() [1/2]

FbxDualQuaternion& operator-= ( double  pValue)

Subtract a value from all vector components.

Parameters
pValueThe value to subtract from each component of the vector.
Returns
The result of subtracting pValue from each component of the vector, replacing this dual quaternion.
Remarks
The passed value is not checked.

◆ operator*=() [1/2]

FbxDualQuaternion& operator*= ( double  pValue)

Multiply a value to all vector elements.

Parameters
pValueThe value multiplying each component of the vector.
Returns
The result of multiplying each component of the vector by pValue, replacing this dual quaternion.
Remarks
The passed value is not checked.

◆ operator/=() [1/2]

FbxDualQuaternion& operator/= ( double  pValue)

Divide all vector elements by a value.

Parameters
pValueThe value dividing each component of the vector.
Returns
The result of dividing each component of the vector by pValue, replacing this dual quaternion.
Remarks
The passed value is not checked.

◆ operator-() [2/3]

FbxDualQuaternion operator- ( ) const

Unary minus operator.

Returns
A dual quaternion where each component is multiplied by -1.

◆ operator+() [2/2]

FbxDualQuaternion operator+ ( const FbxDualQuaternion pDualQuaternion) const

Add two vectors together.

Parameters
pDualQuaternionDual quaternion to add.
Returns
The dual quaternion v' = this + pDualQuaternion.
Remarks
The values in pDualQuaternion are not checked.

◆ operator-() [3/3]

FbxDualQuaternion operator- ( const FbxDualQuaternion pDualQuaternion) const

Subtract a quaternion from another quaternion.

Parameters
pDualQuaternionDual quaternion to subtract.
Returns
The dual quaternion v' = this - pDualQuaternion.
Remarks
The values in pDualQuaternion are not checked.

◆ operator*() [2/3]

FbxDualQuaternion operator* ( const FbxDualQuaternion pDualQuaternion) const

Memberwise multiplication of two vectors.

Parameters
pDualQuaternionMultiplying dual quaternion.
Returns
The dual quaternion v' = this * pQuaternion.
Remarks
The values in pDualQuaternion are not checked.

◆ operator/() [2/2]

FbxDualQuaternion operator/ ( const FbxDualQuaternion pDualQuaternion) const

Memberwise division of a dual quaternion with another dual quaternion.

Parameters
pDualQuaternionDividing dual quaternion.
Returns
The dual quaternion v' = this / pQuaternion.
Remarks
The values in pDualQuaternion are not checked.

◆ operator+=() [2/2]

FbxDualQuaternion& operator+= ( const FbxDualQuaternion pDualQuaternion)

Add two quaternions together.

Parameters
pDualQuaternionDual quaternion to add.
Returns
The dual quaternion v' = this + pQuaternion, replacing this dual quaternion.
Remarks
The values in pDualQuaternion are not checked.

◆ operator-=() [2/2]

FbxDualQuaternion& operator-= ( const FbxDualQuaternion pDualQuaternion)

Subtract a dual quaternion from another vector.

Parameters
pDualQuaternionDual quaternion to subtract.
Returns
The dual quaternion v' = this - pQuaternion, replacing this dual quaternion.
Remarks
The values in pDualQuaternion are not checked.

◆ operator*=() [2/2]

FbxDualQuaternion& operator*= ( const FbxDualQuaternion pDualQuaternion)

Memberwise multiplication of two quaternions.

Parameters
pDualQuaternionMultiplying dual quaternion.
Returns
The dual quaternion v' = this * pQuaternion, replacing this dual quaternion.
Remarks
The values in pDualQuaternion are not checked.

◆ operator/=() [2/2]

FbxDualQuaternion& operator/= ( const FbxDualQuaternion pDualQuaternion)

Memberwise division of a dual quaternion by another dual quaternion.

Parameters
pDualQuaternionDividing dual quaternion.
Returns
The dual quaternion v' = this / pQuaternion, replacing this dual quaternion.
Remarks
The values in pDualQuaternion are not checked.

◆ operator*() [3/3]

FbxDualQuaternion operator* ( const FbxVector4  pVector) const

Multiplication of a dual quaternion by a FbxVector4.

Parameters
pVectorThe FbxVector4 to multiply with.
Returns
The dual quaternion v' = FbxDualQuaternion(mQ1, (mQ1 * pVector) + mQ2).
Remarks
The values in pDualQuaternion are not checked.

◆ Product()

FbxDualQuaternion Product ( const FbxDualQuaternion pDualQuaternion) const

Return dual quaternion product.

Parameters
pDualQuaternionProduct dual quaternion.
Returns
The dual quaternion that is the product of this and pDualQuaternion.

◆ Normalize()

void Normalize ( )

Normalize the dual quaternion, length set to 1.

Examples:
ViewScene/DrawScene.cxx.

◆ Inverse()

void Inverse ( )

Calculate the dual quaternion's inverse.

Returns
The inverse of this dual quaternion.

◆ Deform()

FbxVector4 Deform ( FbxVector4 pPoint)

Deform a point by this dual quaternion.

Returns
The inverse of this quaternion.
Examples:
ViewScene/DrawScene.cxx.

◆ Conjugate()

void Conjugate ( )

Conjugate both quaternions of this dual quaternion.

◆ Dual()

void Dual ( )

Conjugate in dual space.

◆ DualConjugate()

void DualConjugate ( )

Conjugate both quaternions of this dual quaternion in dual space.

◆ operator==()

bool operator== ( const FbxDualQuaternion pV) const

Equivalence operator.

Parameters
pVThe 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!=()

bool operator!= ( const FbxDualQuaternion pV) const

Non equivalence operator.

Parameters
pVThe quaternion to be compared to this.
Returns
false if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), true otherwise.

The documentation for this class was generated from the following file: