Matrix44_tpl

General-purpose 4x4 matrix. More...

#include

Inherits INumberArray< F, 16 >.

Public Types

typedef INumberArray< F, 16 > NA

Public Member Functions

ILINE Matrix44_tpl (type_zero)
template
ILINE Matrix44_tpl (const Matrix44_tpl< F1 > &m)
template
ILINE Matrix44_tpl (const Matrix44H< F1 > &m)
template
ILINE Matrix44_tpl (const Matrix44HR< F1 > &m)
ILINE Matrix44_tpl (F v00, F v01, F v02, F v03, F v10, F v11, F v12, F v13, F v20, F v21, F v22, F v23, F v30, F v31, F v32, F v33)
template
ILINE Matrix44_tpl (const Matrix33_tpl< F1 > &m)
template
ILINE Matrix44_tpl (const Matrix34_tpl< F1 > &m)
ILINE void SetIdentity ()
ILINE Matrix44_tpl (type_identity)
ILINE Matrix44_tpl & Transpose (const Matrix44_tpl &m)
ILINE void Transpose ()
ILINE Matrix44_tpl GetTransposed () const
F DeterminantInvert (Matrix44_tpl *pInv=0) const
ILINE void Invert (const Matrix44_tpl< F > &m)
ILINE void Invert ()
ILINE Matrix44_tpl< F > GetInverted () const
ILINE F Determinant () const
ILINE Vec3 TransformVector (const Vec3 &b) const
Transform a vector.
ILINE Vec3 TransformPoint (const Vec3 &b) const
Transform a point.
ILINE F * GetData ()
ILINE const F * GetData () const
ILINE F operator() (uint32 i, uint32 j) const
ILINE F & operator() (uint32 i, uint32 j)
ILINE void SetRow (int i, const Vec3_tpl< F > &v)
ILINE void SetRow4 (int i, const Vec4_tpl< F > &v)
ILINE const Vec3_tpl< F > & GetRow (int i) const
ILINE const Vec4_tpl< F > & GetRow4 (int i) const
ILINE void SetColumn (int i, const Vec3_tpl< F > &v)
ILINE void SetColumn4 (int i, const Vec4_tpl< F > &v)
ILINE Vec3_tpl< F > GetColumn (int i) const
ILINE Vec4_tpl< F > GetColumn4 (int i) const
ILINE Vec3 GetTranslation () const
ILINE void SetTranslation (const Vec3 &t)

Public Attributes

F m00
F m01
F m02
F m03
F m10
F m11
F m12
F m13
F m20
F m21
F m22
F m23
F m30
F m31
F m32
F m33
AUTO_STRUCT_INFO

Friends

ILINE Matrix44_tpl< F > operator* (const Matrix44_tpl< F > &m, const F f)
multiply all m1 matrix's values by f and return the matrix
ILINE Matrix44_tpl< F > operator+ (const Matrix44_tpl< F > &mm0, const Matrix44_tpl< F > &mm1)
add all m matrix's values and return the matrix

Detailed Description

template struct Matrix44_tpl< F >

General-purpose 4x4 matrix.

Constructor & Destructor Documentation

◆ Matrix44_tpl() [1/2]

template
template
ILINE Matrix44_tpl< F >::Matrix44_tpl ( const Matrix33_tpl< F1 > & m)
inline

CONSTRUCTOR for different types. It converts a Matrix33 into a Matrix44 and also converts between double/float. Matrix44(Matrix33);

◆ Matrix44_tpl() [2/2]

template
template
ILINE Matrix44_tpl< F >::Matrix44_tpl ( const Matrix34_tpl< F1 > & m)
inline

CONSTRUCTOR for different types. It converts a Matrix34 into a Matrix44 and also converts between double/float. Matrix44(Matrix34);

Member Function Documentation

◆ DeterminantInvert()

template
F Matrix44_tpl< F >::DeterminantInvert ( Matrix44_tpl< F > * pInv = 0) const
inline

Calculate a real inversion of a Matrix44. Uses Cramer's Rule which is faster (branchless) but numerically less stable than other methods like Gaussian Elimination. Example 1: Matrix44 im44; im44.Invert(); Example 2: Matrix44 im44 = m33.GetInverted();