Public Member Functions

FbxMatrix 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 basic 4x4 double matrix class.

Definition at line 27 of file fbxmatrix.h.

#include <fbxmatrix.h>

Inheritance diagram for FbxMatrix:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int Compare (const FbxMatrix pM, const double pThreshold=FBXSDK_TOLERANCE) const
int Compare (const FbxAMatrix pM, const double pThreshold=FBXSDK_TOLERANCE) const
FbxMatrix operator* (double pValue) const
FbxMatrixoperator*= (double pValue)
double LUDecomposition (FbxVector4 &pVector)
FbxMatrix LUMult (FbxMatrix pM, const FbxVector4 &pVector) const
double Determinant () const

Constructors and Destructor

 FbxMatrix ()
 Constructor. Constructs an identity matrix.
 FbxMatrix (const FbxMatrix &pM)
 Copy constructor.
 FbxMatrix (const FbxVector4 &pT, const FbxVector4 &pR, const FbxVector4 &pS)
 TRS Constructor.
 FbxMatrix (const FbxVector4 &pT, const FbxQuaternion &pQ, const FbxVector4 &pS)
 TQS Constructor.
 FbxMatrix (const FbxVector4 &pRow0, const FbxVector4 &pRow1, const FbxVector4 &pRow2, const FbxVector4 &pRow3)
 4 vector constructor.
 FbxMatrix (const double p00, const double p10, const double p20, const double p30, const double p01, const double p11, const double p21, const double p31, const double p02, const double p12, const double p22, const double p32, const double p03, const double p13, const double p23, const double p33)
 16 double constructor.
 FbxMatrix (const FbxAMatrix &pM)
 Constructor.
 ~FbxMatrix ()
 Destructor.

Access

double Get (int pY, int pX) const
 Retrieve matrix element.
FbxVector4 GetRow (int pY) const
 Extract a row vector.
FbxVector4 GetColumn (int pX) const
 Extract a column vector.
void Set (int pY, int pX, double pValue)
 Set matrix element.
void SetIdentity ()
 Set matrix to identity.
void SetTRS (const FbxVector4 &pT, const FbxVector4 &pR, const FbxVector4 &pS)
 Set matrix.
void SetTQS (const FbxVector4 &pT, const FbxQuaternion &pQ, const FbxVector4 &pS)
 Set matrix.
void SetRow (int pY, const FbxVector4 &pRow)
 Set a matrix row.
void SetColumn (int pX, const FbxVector4 &pColumn)
 Set a matrix column.
void GetElements (FbxVector4 &pTranslation, FbxQuaternion &pRotation, FbxVector4 &pShearing, FbxVector4 &pScaling, double &pSign) const
 Decompose the affine matrix into elements of translation, rotation, shearing, scaling and sign of determinant.
FbxMatrixoperator= (const FbxMatrix &pMatrix)
 Assignment operator.

Matrix Operations

FbxMatrix operator- () const
 Unary minus operator.
FbxMatrix operator+ (const FbxMatrix &pMatrix) const
 Add two matrices together.
FbxMatrix operator- (const FbxMatrix &pMatrix) const
 Subtract a matrix from another matrix.
FbxMatrix operator* (const FbxMatrix &pMatrix) const
 Multiply two matrices.
FbxMatrixoperator+= (const FbxMatrix &pMatrix)
 Add two matrices together.
FbxMatrixoperator-= (const FbxMatrix &pMatrix)
 Subtract a matrix from another matrix.
FbxMatrixoperator*= (const FbxMatrix &pMatrix)
 Multiply two matrices.
FbxMatrix Inverse () const
 Calculate the matrix inverse.
FbxMatrix Transpose () const
 Calculate the matrix transpose.

Vector Operations

FbxVector4 MultNormalize (const FbxVector4 &pVector) const
 Multiply this matrix by pVector, the w component is normalized to 1.

Boolean Operations

bool operator== (const FbxMatrix &pM) const
 Equivalence operator.
bool operator== (const FbxAMatrix &pM) const
 Equivalence operator.
bool operator!= (const FbxMatrix &pM) const
 Non-equivalence operator.
bool operator!= (const FbxAMatrix &pM) const
 Non-equivalence operator.

Casting

typedef const double (kDouble44)[4][4]
 Define 4*4 array as a new type.
 operator double * ()
 Cast the vector in a double pointer.
 operator const double * () const
 Cast the vector in a const double pointer.
kDouble44 & Double44 () const
 Cast the matrix in a reference to a 4*4 array.

Member Typedef Documentation

typedef const double(kDouble44)[4][4]

Define 4*4 array as a new type.

Definition at line 278 of file fbxmatrix.h.


Constructor & Destructor Documentation

FbxMatrix ( )

Constructor. Constructs an identity matrix.

FbxMatrix ( const FbxMatrix pM)

Copy constructor.

Parameters:
pMAnother FbxMatrix object copied to this one.
FbxMatrix ( const FbxVector4 pT,
const FbxVector4 pR,
const FbxVector4 pS 
)

TRS Constructor.

Parameters:
pTTranslation vector.
pREuler rotation vector.
pSScale vector.
FbxMatrix ( const FbxVector4 pT,
const FbxQuaternion pQ,
const FbxVector4 pS 
)

TQS Constructor.

Parameters:
pTTranslation vector.
pQQuaternion.
pSScale vector.
FbxMatrix ( const FbxVector4 pRow0,
const FbxVector4 pRow1,
const FbxVector4 pRow2,
const FbxVector4 pRow3 
)

4 vector constructor.

Parameters:
pRow0Values to set in row 0.
pRow1Values to set in row 1.
pRow2Values to set in row 2.
pRow3Values to set in row 3.
FbxMatrix ( const double  p00,
const double  p10,
const double  p20,
const double  p30,
const double  p01,
const double  p11,
const double  p21,
const double  p31,
const double  p02,
const double  p12,
const double  p22,
const double  p32,
const double  p03,
const double  p13,
const double  p23,
const double  p33 
)

16 double constructor.

Parameters:
p00Value at column 0 row 0.
p10Value at column 1 row 0.
p20Value at column 2 row 0.
p30Value at column 3 row 0.
p01Value at column 0 row 1.
p11Value at column 1 row 1.
p21Value at column 2 row 1.
p31Value at column 3 row 1.
p02Value at column 0 row 2.
p12Value at column 1 row 2.
p22Value at column 2 row 2.
p32Value at column 3 row 2.
p03Value at column 0 row 3.
p13Value at column 1 row 3.
p23Value at column 2 row 3.
p33Value at column 3 row 3.
FbxMatrix ( const FbxAMatrix pM)

Constructor.

Parameters:
pMAffine matrix
~FbxMatrix ( )

Destructor.


Member Function Documentation

double Get ( int  pY,
int  pX 
) const

Retrieve matrix element.

Parameters:
pYRow index.
pXColumn index.
Returns:
Value at element [ pX, pY ] of the matrix.
FbxVector4 GetRow ( int  pY) const

Extract a row vector.

Parameters:
pYRow index.
Returns:
The row vector.
FbxVector4 GetColumn ( int  pX) const

Extract a column vector.

Parameters:
pXColumn index.
Returns:
The column vector.
void Set ( int  pY,
int  pX,
double  pValue 
)

Set matrix element.

Parameters:
pYRow index.
pXColumn index.
pValueNew component value.
void SetIdentity ( )

Set matrix to identity.

void SetTRS ( const FbxVector4 pT,
const FbxVector4 pR,
const FbxVector4 pS 
)

Set matrix.

Parameters:
pTTranslation vector.
pREuler rotation vector.
pSScale vector.
void SetTQS ( const FbxVector4 pT,
const FbxQuaternion pQ,
const FbxVector4 pS 
)

Set matrix.

Parameters:
pTTranslation vector.
pQQuaternion.
pSScale vector.
void SetRow ( int  pY,
const FbxVector4 pRow 
)

Set a matrix row.

Parameters:
pYRow index.
pRowRow vector.
void SetColumn ( int  pX,
const FbxVector4 pColumn 
)

Set a matrix column.

Parameters:
pXColumn index.
pColumnColumn vector.
void GetElements ( FbxVector4 pTranslation,
FbxQuaternion pRotation,
FbxVector4 pShearing,
FbxVector4 pScaling,
double pSign 
) const

Decompose the affine matrix into elements of translation, rotation, shearing, scaling and sign of determinant.

Parameters:
pTranslationTranslation element.
pRotationRotation element.
pShearingShearing element.
pScalingScaling element.
pSignSign of determinant.
FbxMatrix& operator= ( const FbxMatrix pMatrix)

Assignment operator.

Parameters:
pMatrixSource matrix.
FbxMatrix operator- ( ) const

Unary minus operator.

Returns:
A matrix where each element is multiplied by -1.
FbxMatrix operator+ ( const FbxMatrix pMatrix) const

Add two matrices together.

Parameters:
pMatrixA matrix.
Returns:
The result of this matrix + pMatrix.
FbxMatrix operator- ( const FbxMatrix pMatrix) const

Subtract a matrix from another matrix.

Parameters:
pMatrixA matrix.
Returns:
The result of this matrix - pMatrix.
FbxMatrix operator* ( const FbxMatrix pMatrix) const

Multiply two matrices.

Parameters:
pMatrixA matrix.
Returns:
The result of this matrix * pMatrix.
FbxMatrix& operator+= ( const FbxMatrix pMatrix)

Add two matrices together.

Parameters:
pMatrixA matrix.
Returns:
The result of this matrix + pMatrix, replacing this matrix.
FbxMatrix& operator-= ( const FbxMatrix pMatrix)

Subtract a matrix from another matrix.

Parameters:
pMatrixA matrix.
Returns:
The result of this matrix - pMatrix, replacing this matrix.
FbxMatrix& operator*= ( const FbxMatrix pMatrix)

Multiply two matrices.

Parameters:
pMatrixA matrix.
Returns:
The result of this matrix * pMatrix, replacing this matrix.
FbxMatrix Inverse ( ) const

Calculate the matrix inverse.

Returns:
The inverse matrix.
FbxMatrix Transpose ( ) const

Calculate the matrix transpose.

Returns:
This matrix transposed.
FbxVector4 MultNormalize ( const FbxVector4 pVector) const

Multiply this matrix by pVector, the w component is normalized to 1.

Parameters:
pVectorA vector.
Returns:
The result of this matrix * pVector.
bool operator== ( const FbxMatrix pM) const

Equivalence operator.

Parameters:
pMThe matrix to be compared against this matrix.
Returns:
true if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), false otherwise.
bool operator== ( const FbxAMatrix pM) const

Equivalence operator.

Parameters:
pMThe affine matrix to be compared against this matrix.
Returns:
true if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), false otherwise.
bool operator!= ( const FbxMatrix pM) const

Non-equivalence operator.

Parameters:
pMThe matrix to be compared against this matrix.
Returns:
false if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), true otherwise.
bool operator!= ( const FbxAMatrix pM) const

Non-equivalence operator.

Parameters:
pMThe affine matrix to be compared against this matrix.
Returns:
false if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), true otherwise.
operator double * ( )

Cast the vector in a double pointer.

operator const double * ( ) const

Cast the vector in a const double pointer.

kDouble44& Double44 ( ) const [inline]

Cast the matrix in a reference to a 4*4 array.

Definition at line 281 of file fbxmatrix.h.

{ return *((kDouble44 *)&mData); }
int Compare ( const FbxMatrix  pM,
const double  pThreshold = FBXSDK_TOLERANCE 
) const
int Compare ( const FbxAMatrix  pM,
const double  pThreshold = FBXSDK_TOLERANCE 
) const
FbxMatrix operator* ( double  pValue) const
FbxMatrix& operator*= ( double  pValue)
double LUDecomposition ( FbxVector4 pVector)
FbxMatrix LUMult ( FbxMatrix  pM,
const FbxVector4 pVector 
) const
double Determinant ( ) const

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

FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix
FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix FbxMatrix