Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
aiMatrix3x3t< TReal > Class Template Reference

Represents a row-major 3x3 matrix. More...

#include <matrix3x3.h>

Public Member Functions

 aiMatrix3x3t () AI_NO_EXCEPT
 
 aiMatrix3x3t (const aiMatrix4x4t< TReal > &pMatrix)
 Construction from a 4x4 matrix. More...
 
 aiMatrix3x3t (TReal _a1, TReal _a2, TReal _a3, TReal _b1, TReal _b2, TReal _b3, TReal _c1, TReal _c2, TReal _c3)
 
TReal Determinant () const
 
bool Equal (const aiMatrix3x3t< TReal > &m, TReal epsilon=ai_epsilon) const
 
aiMatrix3x3tInverse ()
 Invert the matrix. More...
 
template<typename TOther >
 operator aiMatrix3x3t< TOther > () const
 
bool operator!= (const aiMatrix3x3t< TReal > &m) const
 
aiMatrix3x3t operator* (const aiMatrix3x3t &m) const
 
aiMatrix3x3toperator*= (const aiMatrix3x3t &m)
 
bool operator== (const aiMatrix3x3t< TReal > &m) const
 
TReal * operator[] (unsigned int p_iIndex)
 
const TReal * operator[] (unsigned int p_iIndex) const
 
aiMatrix3x3tTranspose ()
 Transpose the matrix. More...
 

Static Public Member Functions

static aiMatrix3x3tFromToMatrix (const aiVector3t< TReal > &from, const aiVector3t< TReal > &to, aiMatrix3x3t &out)
 A function for creating a rotation matrix that rotates a vector called "from" into another vector called "to". More...
 
static aiMatrix3x3tRotation (TReal a, const aiVector3t< TReal > &axis, aiMatrix3x3t &out)
 Returns a rotation matrix for a rotation around an arbitrary axis. More...
 
static aiMatrix3x3tRotationZ (TReal a, aiMatrix3x3t &out)
 Returns a rotation matrix for a rotation around z. More...
 
static aiMatrix3x3tTranslation (const aiVector2t< TReal > &v, aiMatrix3x3t &out)
 Returns a translation matrix. More...
 

Public Attributes

TReal a1
 
TReal a2
 
TReal a3
 
TReal b1
 
TReal b2
 
TReal b3
 
TReal c1
 
TReal c2
 
TReal c3
 

Detailed Description

template<typename TReal>
class aiMatrix3x3t< TReal >

Represents a row-major 3x3 matrix.

There's much confusion about matrix layouts (column vs. row order). This is always a row-major matrix. Not even with the aiProcess_ConvertToLeftHanded flag, which absolutely does not affect matrix order - it just affects the handedness of the coordinate system defined thereby.

Constructor & Destructor Documentation

◆ aiMatrix3x3t() [1/3]

template<typename TReal >
aiMatrix3x3t< TReal >::aiMatrix3x3t ( )
inline

◆ aiMatrix3x3t() [2/3]

template<typename TReal >
aiMatrix3x3t< TReal >::aiMatrix3x3t ( TReal  _a1,
TReal  _a2,
TReal  _a3,
TReal  _b1,
TReal  _b2,
TReal  _b3,
TReal  _c1,
TReal  _c2,
TReal  _c3 
)
inline

◆ aiMatrix3x3t() [3/3]

template<typename TReal >
AI_FORCE_INLINE aiMatrix3x3t< TReal >::aiMatrix3x3t ( const aiMatrix4x4t< TReal > &  pMatrix)
explicit

Construction from a 4x4 matrix.

The remaining parts of the matrix are ignored.

Member Function Documentation

◆ Determinant()

template<typename TReal >
AI_FORCE_INLINE TReal aiMatrix3x3t< TReal >::Determinant

◆ Equal()

template<typename TReal >
AI_FORCE_INLINE bool aiMatrix3x3t< TReal >::Equal ( const aiMatrix3x3t< TReal > &  m,
TReal  epsilon = ai_epsilon 
) const

◆ FromToMatrix()

template<typename TReal >
AI_FORCE_INLINE aiMatrix3x3t< TReal > & aiMatrix3x3t< TReal >::FromToMatrix ( const aiVector3t< TReal > &  from,
const aiVector3t< TReal > &  to,
aiMatrix3x3t< TReal > &  out 
)
static

A function for creating a rotation matrix that rotates a vector called "from" into another vector called "to".

Input : from[3], to[3] which both must be normalized non-zero vectors Output: mtx[3][3] – a 3x3 matrix in column-major form Authors: Tomas Möller, John Hughes "Efficiently Building a Matrix to Rotate One Vector to Another" Journal of Graphics Tools, 4(4):1-4, 1999

Input : from[3], to[3] which both must be normalized non-zero vectors Output: mtx[3][3] – a 3x3 matrix in colum-major form Authors: Tomas Möller, John Hughes "Efficiently Building a Matrix to Rotate One Vector to Another" Journal of Graphics Tools, 4(4):1-4, 1999

◆ Inverse()

template<typename TReal >
AI_FORCE_INLINE aiMatrix3x3t< TReal > & aiMatrix3x3t< TReal >::Inverse

Invert the matrix.

If the matrix is not invertible all elements are set to qnan. Beware, use (f != f) to check whether a TReal f is qnan.

◆ operator aiMatrix3x3t< TOther >()

template<typename TReal >
template<typename TOther >
aiMatrix3x3t< TReal >::operator aiMatrix3x3t< TOther >

◆ operator!=()

template<typename TReal >
AI_FORCE_INLINE bool aiMatrix3x3t< TReal >::operator!= ( const aiMatrix3x3t< TReal > &  m) const

◆ operator*()

template<typename TReal >
AI_FORCE_INLINE aiMatrix3x3t< TReal > aiMatrix3x3t< TReal >::operator* ( const aiMatrix3x3t< TReal > &  m) const

◆ operator*=()

template<typename TReal >
AI_FORCE_INLINE aiMatrix3x3t< TReal > & aiMatrix3x3t< TReal >::operator*= ( const aiMatrix3x3t< TReal > &  m)

◆ operator==()

template<typename TReal >
AI_FORCE_INLINE bool aiMatrix3x3t< TReal >::operator== ( const aiMatrix3x3t< TReal > &  m) const

◆ operator[]() [1/2]

template<typename TReal >
AI_FORCE_INLINE TReal * aiMatrix3x3t< TReal >::operator[] ( unsigned int  p_iIndex)

◆ operator[]() [2/2]

template<typename TReal >
AI_FORCE_INLINE const TReal * aiMatrix3x3t< TReal >::operator[] ( unsigned int  p_iIndex) const

◆ Rotation()

template<typename TReal >
AI_FORCE_INLINE aiMatrix3x3t< TReal > & aiMatrix3x3t< TReal >::Rotation ( TReal  a,
const aiVector3t< TReal > &  axis,
aiMatrix3x3t< TReal > &  out 
)
static

Returns a rotation matrix for a rotation around an arbitrary axis.

Parameters
aRotation angle, in radians
axisAxis to rotate around
outTo be filled

◆ RotationZ()

template<typename TReal >
AI_FORCE_INLINE aiMatrix3x3t< TReal > & aiMatrix3x3t< TReal >::RotationZ ( TReal  a,
aiMatrix3x3t< TReal > &  out 
)
static

Returns a rotation matrix for a rotation around z.

Parameters
aRotation angle, in radians
outReceives the output matrix
Returns
Reference to the output matrix

◆ Translation()

template<typename TReal >
AI_FORCE_INLINE aiMatrix3x3t< TReal > & aiMatrix3x3t< TReal >::Translation ( const aiVector2t< TReal > &  v,
aiMatrix3x3t< TReal > &  out 
)
static

Returns a translation matrix.

Parameters
vTranslation vector
outReceives the output matrix
Returns
Reference to the output matrix

◆ Transpose()

template<typename TReal >
AI_FORCE_INLINE aiMatrix3x3t< TReal > & aiMatrix3x3t< TReal >::Transpose

Transpose the matrix.

Member Data Documentation

◆ a1

template<typename TReal >
TReal aiMatrix3x3t< TReal >::a1

◆ a2

template<typename TReal >
TReal aiMatrix3x3t< TReal >::a2

◆ a3

template<typename TReal >
TReal aiMatrix3x3t< TReal >::a3

◆ b1

template<typename TReal >
TReal aiMatrix3x3t< TReal >::b1

◆ b2

template<typename TReal >
TReal aiMatrix3x3t< TReal >::b2

◆ b3

template<typename TReal >
TReal aiMatrix3x3t< TReal >::b3

◆ c1

template<typename TReal >
TReal aiMatrix3x3t< TReal >::c1

◆ c2

template<typename TReal >
TReal aiMatrix3x3t< TReal >::c2

◆ c3

template<typename TReal >
TReal aiMatrix3x3t< TReal >::c3

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