KFbxMatrix Class Reference

#include <kfbxmatrix.h>

Inherits fbxVectorTemplate4.

List of all members.


Detailed Description

FBX SDK matrix class.

Definition at line 58 of file kfbxmatrix.h.


Constructors and Destructor

  KFbxMatrix ()
  Constructor. Constructs an identity matrix.
  KFbxMatrix (const KFbxMatrix &pM)
  Copy constructor.
  KFbxMatrix (const KFbxVector4 &pT, const KFbxVector4 &pR, const KFbxVector4 &pS)
  Constructor.
  KFbxMatrix (const KFbxVector4 &pT, const KFbxQuaternion &pQ, const KFbxVector4 &pS)
  Constructor.
  KFbxMatrix (const KFbxXMatrix &pM)
  Constructor.
  ~KFbxMatrix ()
  Destructor.

Access

double  Get (int pY, int pX) const
  Retrieve matrix element.
KFbxVector4  GetRow (int pY) const
  Extract a row vector.
KFbxVector4  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 KFbxVector4 &pT, const KFbxVector4 &pR, const KFbxVector4 &pS)
  Set matrix.
void  SetTQS (const KFbxVector4 &pT, const KFbxQuaternion &pQ, const KFbxVector4 &pS)
  Set matrix.
void  SetRow (int pY, const KFbxVector4 &pRow)
  Set a matrix row.
void  SetColumn (int pX, const KFbxVector4 &pColumn)
  Set a matrix column.
void  GetElements (KFbxVector4 &pTranslation, KFbxQuaternion &pRotation, KFbxVector4 &pShearing, KFbxVector4 &pScaling, double &pSign) const
  Decompose the affine matrix into elements of translation, rotation, shearing, scaling and sign of determinant.
KFbxMatrix operator= (const KFbxMatrix &pMatrix)
  Assignment operator.

Matrix Operations

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

Vector Operations

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

Boolean Operations

bool  operator== (const KFbxMatrix &pM) const
  Equivalence operator.
bool  operator== (const KFbxXMatrix &pM) const
  Equivalence operator.
bool  operator!= (const KFbxMatrix &pM) const
  Non-equivalence operator.
bool  operator!= (const KFbxXMatrix &pM) 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.
typedef const  double (kDouble44)[4][4]
  Define 4*4 array as a new type.
kDouble44 &  Double44 () const
  Cast the matrix in a reference to a 4*4 array.

Constructor & Destructor Documentation

KFbxMatrix (  ) 

Constructor. Constructs an identity matrix.

KFbxMatrix ( const KFbxMatrix pM  ) 

Copy constructor.

Parameters:
pM  Another KFbxMatrix object copied to this one.

KFbxMatrix ( const KFbxVector4 pT,
const KFbxVector4 pR,
const KFbxVector4 pS  
)

Constructor.

Parameters:
pT  Translation vector.
pR  Euler rotation vector.
pS  Scale vector.

KFbxMatrix ( const KFbxVector4 pT,
const KFbxQuaternion pQ,
const KFbxVector4 pS  
)

Constructor.

Parameters:
pT  Translation vector.
pQ  Quaternion.
pS  Scale vector.

KFbxMatrix ( const KFbxXMatrix pM  ) 

Constructor.

Parameters:
pM  Affine matrix

~KFbxMatrix (  ) 

Destructor.


Member Function Documentation

double Get ( int  pY,
int  pX  
) const

Retrieve matrix element.

Parameters:
pY  Row index.
pX  Column index.
Returns:
Value at element [ pX, pY ] of the matrix.

KFbxVector4 GetRow ( int  pY  )  const

Extract a row vector.

Parameters:
pY  Row index.
Returns:
The row vector.

KFbxVector4 GetColumn ( int  pX  )  const

Extract a column vector.

Parameters:
pX  Column index.
Returns:
The column vector.

void Set ( int  pY,
int  pX,
double  pValue  
)

Set matrix element.

Parameters:
pY  Row index.
pX  Column index.
pValue  New component value.

void SetIdentity (  ) 

Set matrix to identity.

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

Set matrix.

Parameters:
pT  Translation vector.
pR  Euler rotation vector.
pS  Scale vector.

void SetTQS ( const KFbxVector4 pT,
const KFbxQuaternion pQ,
const KFbxVector4 pS  
)

Set matrix.

Parameters:
pT  Translation vector.
pQ  Quaternion.
pS  Scale vector.

void SetRow ( int  pY,
const KFbxVector4 pRow  
)

Set a matrix row.

Parameters:
pY  Row index.
pRow  Row vector.

void SetColumn ( int  pX,
const KFbxVector4 pColumn  
)

Set a matrix column.

Parameters:
pX  Column index.
pColumn  Column vector.

void GetElements ( KFbxVector4 pTranslation,
KFbxQuaternion pRotation,
KFbxVector4 pShearing,
KFbxVector4 pScaling,
double &  pSign  
) const

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

Parameters:
pTranslation  Translation element.
pRotation  Rotation element.
pShearing  Shearing element.
pScaling  Scaling element.
pSign  Sign of determinant.

KFbxMatrix& operator= ( const KFbxMatrix pMatrix  ) 

Assignment operator.

Parameters:
pMatrix  Source matrix.

KFbxMatrix operator- (  )  const

Unary minus operator.

Returns:
A matrix where each element is multiplied by -1.

KFbxMatrix operator+ ( const KFbxMatrix pMatrix  )  const

Add two matrices together.

Parameters:
pMatrix  A matrix.
Returns:
The result of this matrix + pMatrix.

KFbxMatrix operator- ( const KFbxMatrix pMatrix  )  const

Subtract a matrix from another matrix.

Parameters:
pMatrix  A matrix.
Returns:
The result of this matrix - pMatrix.

KFbxMatrix operator* ( const KFbxMatrix pMatrix  )  const

Multiply two matrices.

Parameters:
pMatrix  A matrix.
Returns:
The result of this matrix * pMatrix.

KFbxMatrix& operator+= ( const KFbxMatrix pMatrix  ) 

Add two matrices together.

Parameters:
pMatrix  A matrix.
Returns:
The result of this matrix + pMatrix, replacing this matrix.

KFbxMatrix& operator-= ( const KFbxMatrix pMatrix  ) 

Subtract a matrix from another matrix.

Parameters:
pMatrix  A matrix.
Returns:
The result of this matrix - pMatrix, replacing this matrix.

KFbxMatrix& operator*= ( const KFbxMatrix pMatrix  ) 

Multiply two matrices.

Parameters:
pMatrix  A matrix.
Returns:
The result of this matrix * pMatrix, replacing this matrix.

KFbxMatrix Inverse (  )  const

Calculate the matrix inverse.

Returns:
The inverse matrix.

KFbxMatrix Transpose (  )  const

Calculate the matrix transpose.

Returns:
This matrix transposed.

KFbxVector4 MultNormalize ( const KFbxVector4 pVector  )  const

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

Parameters:
pVector  A vector.
Returns:
The result of this matrix * pVector.

bool operator== ( const KFbxMatrix pM  )  const

Equivalence operator.

Parameters:
pM  The matrix to be compared against this matrix.
Returns:
true if the two matrices are equal (each element is within a 1.0e-6 tolerance), false otherwise.

bool operator== ( const KFbxXMatrix pM  )  const

Equivalence operator.

Parameters:
pM  The affine matrix to be compared against this matrix.
Returns:
true if the two matrices are equal (each element is within a 1.0e-6 tolerance), false otherwise.

bool operator!= ( const KFbxMatrix pM  )  const

Non-equivalence operator.

Parameters:
pM  The matrix to be compared against this matrix.
Returns:
false if the two matrices are equal (each element is within a 1.0e-6 tolerance), true otherwise.

bool operator!= ( const KFbxXMatrix pM  )  const

Non-equivalence operator.

Parameters:
pM  The affine matrix to be compared against this matrix.
Returns:
false if the two matrices 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.

typedef const double ( kDouble44   ) 

Define 4*4 array as a new type.

kDouble44& Double44 (  )  const [inline]

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

Definition at line 304 of file kfbxmatrix.h.

KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix
KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix KFbxMatrix