Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
matrix4x4.inl File Reference

Inline implementation of the 4x4 matrix operators. More...

Macros

#define AI_MATRIX4X4_INL_INC
 
#define ASSIMP_MATRIX4_4_DECOMPOSE_PART
 

Detailed Description

Inline implementation of the 4x4 matrix operators.

Macro Definition Documentation

◆ AI_MATRIX4X4_INL_INC

#define AI_MATRIX4X4_INL_INC

◆ ASSIMP_MATRIX4_4_DECOMPOSE_PART

#define ASSIMP_MATRIX4_4_DECOMPOSE_PART
Value:
const aiMatrix4x4t<TReal>& _this = *this;/* Create alias for conveniance. */ \
\
/* extract translation */ \
pPosition.x = _this[0][3]; \
pPosition.y = _this[1][3]; \
pPosition.z = _this[2][3]; \
\
/* extract the columns of the matrix. */ \
aiVector3t<TReal> vCols[3] = { \
aiVector3t<TReal>(_this[0][0],_this[1][0],_this[2][0]), \
aiVector3t<TReal>(_this[0][1],_this[1][1],_this[2][1]), \
aiVector3t<TReal>(_this[0][2],_this[1][2],_this[2][2]) \
}; \
\
/* extract the scaling factors */ \
pScaling.x = vCols[0].Length(); \
pScaling.y = vCols[1].Length(); \
pScaling.z = vCols[2].Length(); \
\
/* and the sign of the scaling */ \
if (Determinant() < 0) pScaling = -pScaling; \
\
/* and remove all scaling from the matrix */ \
if(pScaling.x) vCols[0] /= pScaling.x; \
if(pScaling.y) vCols[1] /= pScaling.y; \
if(pScaling.z) vCols[2] /= pScaling.z; \
\
do {} while(false)
Represents a row-major 4x4 matrix, use this for homogeneous coordinates.
Definition: matrix4x4.h:73