Public Member Functions

KFbxQuaternion Class Reference

This reference page is linked to from the following overview topics: List of Python FBX classes.


Search for all occurrences

Detailed Description

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 29 of file kfbxquaternion.h.

#include <kfbxquaternion.h>

Inheritance diagram for KFbxQuaternion:
Inheritance graph
[legend]

List of all members.

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.

Constructor & Destructor Documentation

Constructor.

KFbxQuaternion ( const KFbxQuaternion pV )

Copy constructor.

Parameters:
pV KFbxQuaternion object copied to this one.
KFbxQuaternion ( 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.

Destructor.


Member Function Documentation

KFbxQuaternion& operator= ( const KFbxQuaternion pQuaternion )

Assignment operation.

Parameters:
pQuaternion KFbxQuaternion object assigned to this one.
double& operator[] ( int  pIndex )

Accessor.

Parameters:
pIndex The index of the component to access.
Returns:
The reference to the indexed component.
Remarks:
The index parameter is not checked for values out of bounds. The valid range is [0,3].

Reimplemented from fbxVectorTemplate4< T >.

const double& operator[] ( int  pIndex ) const

Accessor.

Parameters:
pIndex The index of the component to access.
Returns:
The const reference to the indexed component.
Remarks:
The index parameter is not checked for values out of bounds. The valid range is [0,3].

Reimplemented from fbxVectorTemplate4< T >.

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.
Remarks:
The index parameter is not checked for values out of bounds. The valid range is [0,3].
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.
Remarks:
The index parameter is not checked for values out of bounds. The valid range is [0,3].
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.
KFbxQuaternion operator+ ( double  pValue ) const

Add a value to all vector components.

Parameters:
pValue The value to add to each component of the vector.
Returns:
New vector.
Remarks:
The passed value is not checked.
KFbxQuaternion operator- ( double  pValue ) const

Subtract a value from all vector components.

Parameters:
pValue The value to subtract from each component of the vector.
Returns:
New vector.
Remarks:
The passed value is not checked.
KFbxQuaternion operator* ( double  pValue ) const

Multiply all vector components by a value.

Parameters:
pValue The value multiplying each component of the vector.
Returns:
New vector.
Remarks:
The passed value is not checked.
KFbxQuaternion operator/ ( double  pValue ) const

Divide all vector components by a value.

Parameters:
pValue The value dividing each component of the vector.
Returns:
New vector.
Remarks:
The passed value is not checked.
KFbxQuaternion& operator+= ( double  pValue )

Add a value to all vector components.

Parameters:
pValue The value to add to each component of the vector.
Returns:
The result of adding pValue to each component of the vector, replacing this quaternion.
Remarks:
The passed value is not checked.
KFbxQuaternion& operator-= ( double  pValue )

Subtract a value from all vector components.

Parameters:
pValue The value to subtract from each component of the vector.
Returns:
The result of subtracting pValue from each component of the vector, replacing this quaternion.
Remarks:
The passed value is not checked.
KFbxQuaternion& operator*= ( double  pValue )

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.
Remarks:
The passed value is not checked.
KFbxQuaternion& operator/= ( double  pValue )

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.
Remarks:
The passed value is not checked.
KFbxQuaternion operator- ( ) const

Unary minus operator.

Returns:
A quaternion where each component is multiplied by -1.
KFbxQuaternion operator+ ( const KFbxQuaternion pQuaternion ) const

Add two vectors together.

Parameters:
pQuaternion Quaternion to add.
Returns:
The quaternion v' = this + pQuaternion.
Remarks:
The values in pQuaternion are not checked.
KFbxQuaternion operator- ( const KFbxQuaternion pQuaternion ) const

Subtract a quaternion from another quaternion.

Parameters:
pQuaternion Quaternion to subtract.
Returns:
The quaternion v' = this - pQuaternion.
Remarks:
The values in pQuaternion are not checked.
KFbxQuaternion operator* ( const KFbxQuaternion pQuaternion ) const

Memberwise multiplication of two vectors.

Parameters:
pQuaternion Multiplying quaternion.
Returns:
The quaternion v' = this * pQuaternion.
Remarks:
The values in pQuaternion are not checked.
KFbxQuaternion operator/ ( const KFbxQuaternion pQuaternion ) const

Memberwise division of a quaternion with another quaternion.

Parameters:
pQuaternion Dividing quaternion.
Returns:
The quaternion v' = this / pQuaternion.
Remarks:
The values in pQuaternion are not checked.
KFbxQuaternion& operator+= ( const KFbxQuaternion pQuaternion )

Add two quaternions together.

Parameters:
pQuaternion Quaternion to add.
Returns:
The quaternion v' = this + pQuaternion, replacing this quaternion.
Remarks:
The values in pQuaternion are not checked.
KFbxQuaternion& operator-= ( const KFbxQuaternion pQuaternion )

Subtract a quaternion from another vector.

Parameters:
pQuaternion Quaternion to subtract.
Returns:
The quaternion v' = this - pQuaternion, replacing this quaternion.
Remarks:
The values in pQuaternion are not checked.
KFbxQuaternion& operator*= ( const KFbxQuaternion pQuaternion )

Memberwise multiplication of two quaternions.

Parameters:
pQuaternion Multiplying quaternion.
Returns:
The quaternion v' = this * pQuaternion, replacing this quaternion.
Remarks:
The values in pQuaternion are not checked.
KFbxQuaternion& operator/= ( const KFbxQuaternion pQuaternion )

Memberwise division of a quaternion by another quaternion.

Parameters:
pQuaternion Dividing quaternion.
Returns:
The quaternion v' = this / pQuaternion, replacing this quaternion.
Remarks:
The values in pQuaternion are not checked.
KFbxQuaternion Product ( const KFbxQuaternion pQuaternion ) const

Return quaternion product.

Parameters:
pQuaternion product quaternion.
Returns:
This quaternion replace with the quaternion product.
double DotProduct ( const KFbxQuaternion pQuaternion ) const

Return quaternion dot product.

Parameters:
pQuaternion Dot product quaternion.
Returns:
The dot product of this quaternion and pQuaternion.
Examples:
ViewScene/DrawScene.cxx.
void Normalize ( )

Normalize the quaternion, length set to 1.

void Conjugate ( )

Calculate the quaternion conjugate.

Returns:
The conjugate of this quaternion. Set XYZ as -XYZ.
double Length ( )

Calculate the length of the quaternion.

Returns:
The norm of the quaternion.
void Inverse ( )

Calculate the inverse of the quaternion.

Returns:
The inverse of this quaternion.
Remarks:
If the quaternion is normalized, then its inverse is equal to its conjugate.
void ComposeSphericalXYZ ( const KFbxVector4  pEuler )

Create a Quaternion equivalent to the supplied Euler XYZ in spherical coordinate.

Parameters:
pEuler The Euler XYZ angle.
KFbxVector4 DecomposeSphericalXYZ ( ) const

Create an Euler XYZ equivalent to the current quaternion.

Returns:
The Euler XYZ equivalent to the current quaternion in spherical coordinate.
bool operator== ( const KFbxQuaternion pV ) const

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 1.0e-6 tolerance), false otherwise.
bool operator!= ( const KFbxQuaternion pV ) const

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 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 
)

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

KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion
KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion KFbxQuaternion