6#include <Common/assertion.h>
15 for(std::size_t ri = 0; ri < 3; ++ri)
17 for(std::size_t ci = 0; ci < 3; ++ci)
19 m[ri][ci] =
static_cast<T
>(other[ri][ci]);
26 const T m00,
const T m01,
const T m02,
27 const T m10,
const T m11,
const T m12,
28 const T m20,
const T m21,
const T m22)
30 m[0][0] = m00; m[0][1] = m01; m[0][2] = m02;
31 m[1][0] = m10; m[1][1] = m11; m[1][2] = m12;
32 m[2][0] = m20; m[2][1] = m21; m[2][2] = m22;
40 result.
m[0][0] = (m[2][2] * m[1][1] - m[2][1] * m[1][2]);
41 result.
m[0][1] = -(m[2][2] * m[0][1] - m[2][1] * m[0][2]);
42 result.
m[0][2] = (m[1][2] * m[0][1] - m[1][1] * m[0][2]);
44 result.
m[1][0] = -(m[2][2] * m[1][0] - m[2][0] * m[1][2]);
45 result.
m[1][1] = (m[2][2] * m[0][0] - m[2][0] * m[0][2]);
46 result.
m[1][2] = -(m[1][2] * m[0][0] - m[1][0] * m[0][2]);
48 result.
m[2][0] = (m[2][1] * m[1][0] - m[2][0] * m[1][1]);
49 result.
m[2][1] = -(m[2][1] * m[0][0] - m[2][0] * m[0][1]);
50 result.
m[2][2] = (m[1][1] * m[0][0] - m[1][0] * m[0][1]);
52 const T det = determinant();
54 result.
mulLocal(
static_cast<T
>(1) / det);
62 return m[0][0] * ((m[1][1] * m[2][2]) - (m[2][1] * m[1][2])) -
63 m[0][1] * (m[1][0] * m[2][2] - m[2][0] * m[1][2]) +
64 m[0][2] * (m[1][0] * m[2][1] - m[2][0] * m[1][1]);
76 return this->mul(rhsColVector);
Represents a 3x3 matrix.
Definition TMatrix3.h:16
TVector3< T > operator*(const TVector3< T > &rhsColVector) const
Definition TMatrix3.ipp:74
T determinant() const
Definition TMatrix3.ipp:60
TVector3< T > mul(const TVector3< T > &rhsColVector) const
Definition TMatrix3.ipp:68
TMatrix3 inverse() const
Definition TMatrix3.ipp:36
TRawMatrix< T, M, N > m
Definition TMatrixMxNBase.h:77
Derived & mulLocal(const Derived &rhsMatrix)
Definition TMatrixNBase.ipp:50
Represents a 3-D vector.
Definition TVector3.h:17
std::array< T, N > toArray() const
Definition TArithmeticArrayBase.ipp:855
Math functions and utilities.
Definition TransformInfo.h:10