56 dest.
m[0][0] = src.
m[0][0];
57 dest.
m[1][0] = src.
m[0][1];
58 dest.
m[2][0] = src.
m[0][2];
59 dest.
m[3][0] = -(src.
m[3][0]*src.
m[0][0] + src.
m[3][1]*src.
m[0][1] + src.
m[3][2]*src.
m[0][2]);
61 dest.
m[0][1] = src.
m[1][0];
62 dest.
m[1][1] = src.
m[1][1];
63 dest.
m[2][1] = src.
m[1][2];
64 dest.
m[3][1] = -(src.
m[3][0]*src.
m[1][0] + src.
m[3][1]*src.
m[1][1] + src.
m[3][2]*src.
m[1][2]);
66 dest.
m[0][2] = src.
m[2][0];
67 dest.
m[1][2] = src.
m[2][1];
68 dest.
m[2][2] = src.
m[2][2];
69 dest.
m[3][2] = -(src.
m[3][0]*src.
m[2][0] + src.
m[3][1]*src.
m[2][1] + src.
m[3][2]*src.
m[2][2]);
82 return ((
m[(row+1)&3][(col+1)&3]*
m[(row+2)&3][(col+2)&3]*
m[(row+3)&3][(col+3)&3] +
83 m[(row+1)&3][(col+2)&3]*
m[(row+2)&3][(col+3)&3]*
m[(row+3)&3][(col+1)&3] +
84 m[(row+1)&3][(col+3)&3]*
m[(row+2)&3][(col+1)&3]*
m[(row+3)&3][(col+2)&3])
85 - (
m[(row+3)&3][(col+1)&3]*
m[(row+2)&3][(col+2)&3]*
m[(row+1)&3][(col+3)&3] +
86 m[(row+3)&3][(col+2)&3]*
m[(row+2)&3][(col+3)&3]*
m[(row+1)&3][(col+1)&3] +
87 m[(row+3)&3][(col+3)&3]*
m[(row+2)&3][(col+1)&3]*
m[(row+1)&3][(col+2)&3])) * ((row + col) & 1 ? -1.0
f : +1.0
f);
112 float IDet = 1.0f / Det;
Matrix4x4 & Invert()
Inverts the matrix. Determinant must be different from zero, else matrix can't be inverted...
float CoFactor(udword row, udword col) const
Computes a cofactor. Used for matrix inversion.
unsigned int udword
sizeof(udword) must be 4
#define MATRIX4X4_EPSILON
ICEMATHS_API void InvertPRMatrix(Matrix4x4 &dest, const Matrix4x4 &src)
float Determinant() const
Computes the determinant of the matrix.