ezEngine  Release 25.03
ezSimdMat4f Class Reference

A 4x4 matrix class. More...

#include <SimdMat4f.h>

Public Member Functions

 EZ_DECLARE_POD_TYPE ()
 
void GetAsArray (float *out_pData, ezMatrixLayout::Enum layout) const
 
void Transpose ()
 Transposes this matrix.
 
ezSimdMat4f GetTranspose () const
 Returns the transpose of this matrix.
 
ezResult Invert (const ezSimdFloat &fEpsilon=ezMath::SmallEpsilon< float >())
 Inverts this matrix. Return value indicates whether the matrix could be inverted. More...
 
ezSimdMat4f GetInverse (const ezSimdFloat &fEpsilon=ezMath::SmallEpsilon< float >()) const
 Returns the inverse of this matrix.
 
bool IsEqual (const ezSimdMat4f &rhs, const ezSimdFloat &fEpsilon) const
 Equality Check with epsilon.
 
bool IsIdentity (const ezSimdFloat &fEpsilon=ezMath::DefaultEpsilon< float >()) const
 Checks whether this is an identity matrix.
 
bool IsValid () const
 Checks whether all components are finite numbers.
 
bool IsNaN () const
 Checks whether any component is NaN.
 
void SetRows (const ezSimdVec4f &vRow0, const ezSimdVec4f &vRow1, const ezSimdVec4f &vRow2, const ezSimdVec4f &vRow3)
 
void GetRows (ezSimdVec4f &ref_vRow0, ezSimdVec4f &ref_vRow1, ezSimdVec4f &ref_vRow2, ezSimdVec4f &ref_vRow3) const
 
ezSimdVec4f TransformPosition (const ezSimdVec4f &v) const
 Matrix-vector multiplication, assuming the 4th component of the vector is one (default behavior).
 
ezSimdVec4f TransformDirection (const ezSimdVec4f &v) const
 Matrix-vector multiplication, assuming the 4th component of the vector is zero. So, rotation/scaling only.
 
ezSimdMat4f operator* (const ezSimdMat4f &rhs) const
 
void operator*= (const ezSimdMat4f &rhs)
 
bool operator== (const ezSimdMat4f &rhs) const
 
bool operator!= (const ezSimdMat4f &rhs) const
 

Static Public Member Functions

static ezSimdMat4f MakeZero ()
 Returns a zero matrix.
 
static ezSimdMat4f MakeIdentity ()
 Returns an identity matrix.
 
static ezSimdMat4f MakeFromRowMajorArray (const float *const pData)
 Creates a matrix from 16 values that are in row-major layout.
 
static ezSimdMat4f MakeFromColumnMajorArray (const float *const pData)
 Creates a matrix from 16 values that are in column-major layout.
 
static ezSimdMat4f MakeFromColumns (const ezSimdVec4f &vCol0, const ezSimdVec4f &vCol1, const ezSimdVec4f &vCol2, const ezSimdVec4f &vCol3)
 Creates a matrix from 4 column vectors.
 
static ezSimdMat4f MakeFromValues (float f1r1, float f2r1, float f3r1, float f4r1, float f1r2, float f2r2, float f3r2, float f4r2, float f1r3, float f2r3, float f3r3, float f4r3, float f1r4, float f2r4, float f3r4, float f4r4)
 Creates a matrix from 16 values. Naming is "column-n row-m".
 

Public Attributes

ezSimdVec4f m_col0
 
ezSimdVec4f m_col1
 
ezSimdVec4f m_col2
 
ezSimdVec4f m_col3
 

Detailed Description

A 4x4 matrix class.

Member Function Documentation

◆ Invert()

ezResult ezSimdMat4f::Invert ( const ezSimdFloat fEpsilon = ezMath::SmallEpsilon<float>())

Inverts this matrix. Return value indicates whether the matrix could be inverted.

Todo:
optimize

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