Plasma Engine  2.0
Loading...
Searching...
No Matches
plSimdMat4f Class Reference

A 4x4 matrix class. More...

#include <SimdMat4f.h>

Public Member Functions

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

Static Public Member Functions

static plSimdMat4f MakeZero ()
 Returns a zero matrix.
 
static plSimdMat4f MakeIdentity ()
 Returns an identity matrix.
 
static plSimdMat4f MakeFromRowMajorArray (const float *const pData)
 Creates a matrix from 16 values that are in row-major layout.
 
static plSimdMat4f MakeFromColumnMajorArray (const float *const pData)
 Creates a matrix from 16 values that are in column-major layout.
 
static plSimdMat4f MakeFromColumns (const plSimdVec4f &vCol0, const plSimdVec4f &vCol1, const plSimdVec4f &vCol2, const plSimdVec4f &vCol3)
 Creates a matrix from 4 column vectors.
 
static plSimdMat4f 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

plSimdVec4f m_col0
 
plSimdVec4f m_col1
 
plSimdVec4f m_col2
 
plSimdVec4f m_col3
 

Detailed Description

A 4x4 matrix class.

Member Function Documentation

◆ Invert()

plResult plSimdMat4f::Invert ( const plSimdFloat & fEpsilon = plMath::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: