ezEngine Release 26.3
Loading...
Searching...
No Matches
ezSimdMat4d Class Reference

A 4x4 matrix class. More...

#include <SimdMat4d.h>

Public Member Functions

 EZ_DECLARE_POD_TYPE ()
 
void GetAsArray (double *out_pData, ezMatrixLayout::Enum layout) const
 
void Transpose ()
 Transposes this matrix.
 
ezSimdMat4d GetTranspose () const
 Returns the transpose of this matrix.
 
ezResult Invert (const ezSimdDouble &fEpsilon=ezMath::SmallEpsilon< double >())
 Inverts this matrix. Return value indicates whether the matrix could be inverted.
 
ezSimdMat4d GetInverse (const ezSimdDouble &fEpsilon=ezMath::SmallEpsilon< double >()) const
 Returns the inverse of this matrix.
 
bool IsEqual (const ezSimdMat4d &rhs, const ezSimdDouble &fEpsilon) const
 Equality Check with epsilon.
 
bool IsIdentity (const ezSimdDouble &fEpsilon=ezMath::DefaultEpsilon< double >()) 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 ezSimdVec4d &vRow0, const ezSimdVec4d &vRow1, const ezSimdVec4d &vRow2, const ezSimdVec4d &vRow3)
 
void GetRows (ezSimdVec4d &ref_vRow0, ezSimdVec4d &ref_vRow1, ezSimdVec4d &ref_vRow2, ezSimdVec4d &ref_vRow3) const
 
ezSimdVec4d TransformPosition (const ezSimdVec4d &v) const
 Matrix-vector multiplication, assuming the 4th component of the vector is one (default behavior).
 
ezSimdVec4d TransformDirection (const ezSimdVec4d &v) const
 Matrix-vector multiplication, assuming the 4th component of the vector is zero. So, rotation/scaling only.
 
ezSimdMat4d operator* (const ezSimdMat4d &rhs) const
 
void operator*= (const ezSimdMat4d &rhs)
 
bool operator== (const ezSimdMat4d &rhs) const
 
bool operator!= (const ezSimdMat4d &rhs) const
 

Static Public Member Functions

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

Public Attributes

ezSimdVec4d m_col0
 
ezSimdVec4d m_col1
 
ezSimdVec4d m_col2
 
ezSimdVec4d m_col3
 

Detailed Description

A 4x4 matrix class.

Member Function Documentation

◆ Invert()

ezResult ezSimdMat4d::Invert ( const ezSimdDouble fEpsilon = ezMath::SmallEpsilon<double>())

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: