This reference page is linked to from the following overview topics: FBX SDK 2014, Transformation Data.
#include <fbxaffinematrix.h>
FBX SDK affine matrix class.
Matrices are defined using the Column Major scheme. When a FbxAMatrix represents a transformation (translation, rotation and scale), the last row of the matrix represents the translation part of the transformation.
ExportScene01/main.cxx, ExportScene05/main.cxx, ImportScene/DisplayLink.cxx, ImportScene/DisplayPose.cxx, Pivot/main.cxx, StereoCamera/main.cxx, SwitchBinding/main.cxx, Transformations/main.cxx, ViewScene/DrawScene.cxx, ViewScene/DrawScene.h, ViewScene/GetPosition.cxx, ViewScene/GetPosition.h, ViewScene/GlFunctions.cxx, ViewScene/GlFunctions.h, ViewScene/SceneContext.cxx, ViewScene/SceneContext.h, and ViewScene/SetCamera.cxx.
Definition at line 31 of file fbxaffinematrix.h.
Public Member Functions |
|
| bool | IsIdentity (const double pThreshold=FBXSDK_TOLERANCE) |
| Find out if the matrix is equal to identity
matrix. |
|
Constructors and Destructor |
|
| FbxAMatrix () | |
| Constructor. |
|
| FbxAMatrix (const FbxAMatrix &pOther) | |
| Copy constructor. |
|
| FbxAMatrix (const FbxVector4 &pT, const FbxVector4 &pR, const FbxVector4 &pS) | |
| Constructor. |
|
| ~FbxAMatrix () | |
| Destructor. |
|
Access |
|
| double | Get (int pY, int pX) const |
| Retrieve matrix element. |
|
| FbxVector4 | GetT () const |
| Extract translation vector. |
|
| FbxVector4 | GetR () const |
| Extract rotation vector. |
|
| FbxQuaternion | GetQ () const |
| Extract quaternion vector. |
|
| FbxVector4 | GetS () const |
| Extract scale vector. |
|
| FbxVector4 | GetRow (int pY) const |
| Extract a row vector. |
|
| FbxVector4 | GetColumn (int pX) const |
| Extract a column vector. |
|
| void | SetIdentity () |
| Set matrix to identity. |
|
| void | SetT (const FbxVector4 &pT) |
| Set matrix's translation. |
|
| void | SetR (const FbxVector4 &pR) |
| Set matrix's Euler rotation. |
|
| void | SetQ (const FbxQuaternion &pQ) |
| Set matrix's quaternion. |
|
| void | SetS (const FbxVector4 &pS) |
| Set matrix's scale. |
|
| 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. |
|
| FbxAMatrix & | operator= (const FbxAMatrix &pM) |
| Assignment operator. |
|
Scalar Operations |
|
| FbxAMatrix | operator* (double pValue) const |
| Multiply matrix by a scalar value. |
|
| FbxAMatrix | operator/ (double pValue) const |
| Divide matrix by a scalar value. |
|
| FbxAMatrix & | operator*= (double pValue) |
| Multiply matrix by a scalar value. |
|
| FbxAMatrix & | operator/= (double pValue) |
| Divide matrix by a scalar value. |
|
Vector Operations |
|
| FbxVector4 | MultT (const FbxVector4 &pVector4) const |
| Multiply matrix by a translation vector.
|
|
| FbxVector4 | MultR (const FbxVector4 &pVector4) const |
| Multiply matrix by an Euler rotation vector.
|
|
| FbxQuaternion | MultQ (const FbxQuaternion &pQuaternion) const |
| Multiply matrix by a quaternion. |
|
| FbxVector4 | MultS (const FbxVector4 &pVector4) const |
| Multiply matrix by a scale vector. |
|
Matrix Operations |
|
| FbxAMatrix | operator- () const |
| Unary minus operator. |
|
| FbxAMatrix | operator* (const FbxAMatrix &pOther) const |
| Multiply two matrices together. |
|
| FbxAMatrix & | operator*= (const FbxAMatrix &pOther) |
| Multiply two matrices together. |
|
| FbxAMatrix | Inverse () const |
| Calculate the matrix inverse. |
|
| FbxAMatrix | Transpose () const |
| Calculate the matrix transpose. |
|
Boolean Operations |
|
| bool | operator== (const FbxAMatrix &pOther) const |
| Equivalence operator. |
|
| bool | operator!= (const FbxAMatrix &pOther) const |
| Non-equivalence operator. |
|
Casting |
|
| typedef const | double (kDouble44)[4][4] |
| Define 4*4 array as a new type. |
|
| operator double * () | |
| Cast the matrix in a double pointer.
|
|
| operator const double * () const | |
| Cast the matrix in a const double pointer.
|
|
| kDouble44 & | Double44 () const |
| Cast the matrix in a reference to a 4*4
array. |
|
| typedef const double(kDouble44)[4][4] |
Define 4*4 array as a new type.
Definition at line 297 of file fbxaffinematrix.h.
| FbxAMatrix | ( | ) |
Constructor.
| FbxAMatrix | ( | const FbxAMatrix & | pOther | ) |
Copy constructor.
| pOther | FbxAMatrix copied to this one. |
| FbxAMatrix | ( | const FbxVector4 & | pT, |
| const FbxVector4 & | pR, | ||
| const FbxVector4 & | pS | ||
| ) |
Constructor.
| pT | Translation vector. |
| pR | Euler rotation vector. |
| pS | Scale vector. |
| ~FbxAMatrix | ( | ) |
Destructor.
| double Get | ( | int | pY, |
| int | pX | ||
| ) | const |
Retrieve matrix element.
| pY | Row index. |
| pX | Column index. |
| FbxVector4 GetT | ( | ) | const |
Extract translation vector.
| FbxVector4 GetR | ( | ) | const |
Extract rotation vector.
| FbxQuaternion GetQ | ( | ) | const |
| FbxVector4 GetS | ( | ) | const |
Extract scale vector.
| FbxVector4 GetRow | ( | int | pY | ) | const |
Extract a row vector.
| pY | Row index. |
| FbxVector4 GetColumn | ( | int | pX | ) | const |
Extract a column vector.
| pX | Column index. |
| void SetIdentity | ( | ) |
Set matrix to identity.
| void SetT | ( | const FbxVector4 & | pT | ) |
Set matrix's translation.
| pT | Translation vector. |
| void SetR | ( | const FbxVector4 & | pR | ) |
Set matrix's Euler rotation.
| pR | X, Y and Z rotation values expressed as a vector. |
| void SetQ | ( | const FbxQuaternion & | pQ | ) |
| void SetS | ( | const FbxVector4 & | pS | ) |
Set matrix's scale.
| pS | X, Y and Z scaling factors expressed as a vector. |
| void SetTRS | ( | const FbxVector4 & | pT, |
| const FbxVector4 & | pR, | ||
| const FbxVector4 & | pS | ||
| ) |
Set matrix.
| pT | Translation vector. |
| pR | Rotation vector. |
| pS | Scale vector. |
| void SetTQS | ( | const FbxVector4 & | pT, |
| const FbxQuaternion & | pQ, | ||
| const FbxVector4 & | pS | ||
| ) |
Set matrix.
| pT | Translation vector. |
| pQ | Quaternion vector. |
| pS | Scale vector. |
| FbxAMatrix& operator= | ( | const FbxAMatrix & | pM | ) |
Assignment operator.
| pM | FbxAMatrix assigned to this one. |
| FbxAMatrix operator* | ( | double | pValue | ) | const |
Multiply matrix by a scalar value.
| pValue | Scalar value. |
| FbxAMatrix operator/ | ( | double | pValue | ) | const |
Divide matrix by a scalar value.
| pValue | Scalar value. |
| FbxAMatrix& operator*= | ( | double | pValue | ) |
Multiply matrix by a scalar value.
| pValue | Scalar value. |
| FbxAMatrix& operator/= | ( | double | pValue | ) |
Divide matrix by a scalar value.
| pValue | Scalar value. |
| FbxVector4 MultT | ( | const FbxVector4 & | pVector4 | ) | const |
Multiply matrix by a translation vector.
| pVector4 | Translation vector. |
| FbxVector4 MultR | ( | const FbxVector4 & | pVector4 | ) | const |
Multiply matrix by an Euler rotation vector.
| pVector4 | Euler Rotation vector. |
| FbxQuaternion MultQ | ( | const FbxQuaternion & | pQuaternion | ) | const |
Multiply matrix by a quaternion.
| pQuaternion | Rotation value. |
| FbxVector4 MultS | ( | const FbxVector4 & | pVector4 | ) | const |
Multiply matrix by a scale vector.
| pVector4 | Scaling vector. |
| FbxAMatrix operator- | ( | ) | const |
Unary minus operator.
| FbxAMatrix operator* | ( | const FbxAMatrix & | pOther | ) | const |
Multiply two matrices together.
| pOther | A Matrix. |
FbxAMatrix lRotateXM, lRotateYM, lRotateZM, lRotateXYZM, lRotateM; // Construct rotation matrix around X, Y and Z axises separately and then combine them. FbxVector4 lRotateX(10, 0, 0); FbxVector4 lRotateY(0, 10, 0); FbxVector4 lRotateZ(0, 0, 10); lRotateXM.SetR(lRotateX); lRotateYM.SetR(lRotateY); lRotateZM.SetR(lRotateZ); lRotateXYZM = lRotateZM * lRotateYM * lRotateXM; // Alternatively, we can use SetR() directly. // lRotateXYZM and lRotateM will be the same. FbxVector4 lRotateXYZ (10, 10, 10); lRotateM.SetR(lRotateXYZ);
| FbxAMatrix& operator*= | ( | const FbxAMatrix & | pOther | ) |
Multiply two matrices together.
| pOther | A Matrix. |
| FbxAMatrix Inverse | ( | ) | const |
Calculate the matrix inverse.
| FbxAMatrix Transpose | ( | ) | const |
| bool operator== | ( | const FbxAMatrix & | pOther | ) | const |
Equivalence operator.
| pOther | The matrix to be compared to this. |
true if the two matrices are equal (each element
is within a FBXSDK_TOLERANCE tolerance) and false
otherwise.| bool operator!= | ( | const FbxAMatrix & | pOther | ) | const |
Non-equivalence operator.
| pOther | The matrix to be compared to this. |
false if the two matrices are equal (each element
is within a FBXSDK_TOLERANCE tolerance) and true
otherwise.| operator double * | ( | ) |
Cast the matrix in a double pointer.
| operator const double * | ( | ) | const |
Cast the matrix in a const double pointer.
| kDouble44& Double44 | ( | ) | const [inline] |
Cast the matrix in a reference to a 4*4 array.
Definition at line 299 of file fbxaffinematrix.h.
{ return *((kDouble44 *)&mData); }
| bool IsIdentity | ( | const double | pThreshold =
FBXSDK_TOLERANCE |
) |
Find out if the matrix is equal to identity matrix.
true if the matrix is equal to identity matrix,
false otherwise.