13template <u
int Rows, u
int Cols>
38 if (!mCol[
c].IsZero())
52 mCol[
rc].mF32[
rc] = 1.0f;
79 template <
class OtherMatrix>
106 if (mCol[
c] !=
inM2.mCol[
c])
114 if (mCol[
c] !=
inM2.mCol[
c])
128 template <u
int OtherCols>
138 m.mCol[
c].mF32[r] =
dot;
195 m.
mCol[r].mF32[
c] = mCol[
c].mF32[r];
232#ifndef JPH_PLATFORM_DOXYGEN
240 float b =
inM.mCol[1].mF32[0];
241 float c =
inM.mCol[0].mF32[1];
242 float d =
inM.mCol[1].mF32[1];
245 float det = a * d - b *
c;
250 mCol[0].mF32[0] = d /
det;
251 mCol[1].mF32[0] = -b /
det;
252 mCol[0].mF32[1] = -
c /
det;
253 mCol[1].mF32[1] = a /
det;
unsigned int uint
Definition Core.h:439
#define JPH_NAMESPACE_END
Definition Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
DVec3 operator*(double inV1, DVec3Arg inV2)
Definition DVec3.inl:447
JPH_NAMESPACE_BEGIN bool GaussianElimination(MatrixA &ioA, MatrixB &ioB, float inTolerance=1.0e-16f)
Definition GaussianElimination.h:19
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
AllocateFunction Allocate
Definition Memory.cpp:59
Templatized matrix class.
Definition Matrix.h:15
static Matrix sZero()
Definition Matrix.h:32
bool SetInversed(const Matrix &inM)
Inverse matrix.
Definition Matrix.h:200
uint GetRows() const
Dimensions.
Definition Matrix.h:22
bool IsIdentity() const
Check if this matrix is identity.
Definition Matrix.h:58
uint GetCols() const
Definition Matrix.h:23
Vector< Rows > mCol[Cols]
Column.
Definition Matrix.h:228
void CopyPart(const OtherMatrix &inM, uint inSourceRow, uint inSourceCol, uint inNumRows, uint inNumCols, uint inDestRow, uint inDestCol)
Copy a (part) of another matrix into this matrix.
Definition Matrix.h:80
Matrix()=default
Constructor.
void SetZero()
Zero matrix.
Definition Matrix.h:26
static Matrix sIdentity()
Definition Matrix.h:55
Vector< Rows > & GetColumn(int inIdx)
Definition Matrix.h:226
bool IsZero() const
Check if this matrix consists of all zeros.
Definition Matrix.h:35
Matrix(const Matrix &inM2)
Definition Matrix.h:19
const Vector< Rows > & GetColumn(int inIdx) const
Column access.
Definition Matrix.h:225
void SetIdentity()
Identity matrix.
Definition Matrix.h:45
void SetDiagonal(const Vector< Rows< Cols? Rows :Cols > &inV)
Diagonal matrix.
Definition Matrix.h:61
static Matrix sDiagonal(const Vector< Rows< Cols? Rows :Cols > &inV)
Definition Matrix.h:71
Matrix Inversed() const
Definition Matrix.h:208
Matrix< Cols, Rows > Transposed() const
Transpose matrix.
Definition Matrix.h:190
Templatized vector class.
Definition Vector.h:12
float mF32[Rows]
Definition Vector.h:213