Jolt Physics
A multi core friendly Game Physics Engine
|
Templatized matrix class. More...
#include <Matrix.h>
Public Member Functions | |
Matrix ()=default | |
Constructor. | |
Matrix (const Matrix &inM2) | |
uint | GetRows () const |
Dimensions. | |
uint | GetCols () const |
void | SetZero () |
Zero matrix. | |
bool | IsZero () const |
Check if this matrix consists of all zeros. | |
void | SetIdentity () |
Identity matrix. | |
bool | IsIdentity () const |
Check if this matrix is identity. | |
void | SetDiagonal (const Vector< Rows< Cols? Rows :Cols > &inV) |
Diagonal matrix. | |
template<class OtherMatrix > | |
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. | |
float | operator() (uint inRow, uint inColumn) const |
Get float component by element index. | |
float & | operator() (uint inRow, uint inColumn) |
bool | operator== (const Matrix &inM2) const |
Comparison. | |
bool | operator!= (const Matrix &inM2) const |
Matrix & | operator= (const Matrix &inM2) |
Assignment. | |
template<uint OtherCols> | |
Matrix< Rows, OtherCols > | operator* (const Matrix< Cols, OtherCols > &inM) const |
Multiply matrix by matrix. | |
Vector< Rows > | operator* (const Vector< Cols > &inV) const |
Multiply vector by matrix. | |
Matrix | operator* (float inV) const |
Multiply matrix with float. | |
Matrix | operator+ (const Matrix &inM) const |
Per element addition of matrix. | |
Matrix | operator- (const Matrix &inM) const |
Per element subtraction of matrix. | |
Matrix< Cols, Rows > | Transposed () const |
Transpose matrix. | |
bool | SetInversed (const Matrix &inM) |
Inverse matrix. | |
Matrix | Inversed () const |
const Vector< Rows > & | GetColumn (int inIdx) const |
Column access. | |
Vector< Rows > & | GetColumn (int inIdx) |
Static Public Member Functions | |
static Matrix | sZero () |
static Matrix | sIdentity () |
static Matrix | sDiagonal (const Vector< Rows< Cols? Rows :Cols > &inV) |
Public Attributes | |
Vector< Rows > | mCol [Cols] |
Column. | |
Friends | |
Matrix | operator* (float inV, const Matrix &inM) |
ostream & | operator<< (ostream &inStream, const Matrix &inM) |
To String. | |
|
inline |
Copy a (part) of another matrix into this matrix.
Check if this matrix is identity.
Check if this matrix consists of all zeros.
Get float component by element index.
|
inline |
Multiply matrix by matrix.
Multiply vector by matrix.
Multiply matrix with float.
Per element addition of matrix.
Per element subtraction of matrix.
|
friend |
To String.