3#include "../vec/vec3.h"
20 values[0][0] =
static_cast<T
>(0);
values[0][1] =
static_cast<T
>(0);
values[0][2] =
static_cast<T
>(0);
21 values[1][0] =
static_cast<T
>(0);
values[1][1] =
static_cast<T
>(0);
values[1][2] =
static_cast<T
>(0);
22 values[2][0] =
static_cast<T
>(0);
values[2][1] =
static_cast<T
>(0);
values[2][2] =
static_cast<T
>(0);
38 mat3(
const T& _a,
const T& _b,
const T& _c,
39 const T& _d,
const T& _e,
const T& _f,
40 const T& _g,
const T& _h,
const T& _i)
87 static_cast<T
>(1),
static_cast<T
>(0),
static_cast<T
>(0),
88 static_cast<T
>(0),
static_cast<T
>(1),
static_cast<T
>(0),
89 static_cast<T
>(0),
static_cast<T
>(0),
static_cast<T
>(1));
223 values[0][0] = _a * rhs[0][0] + _b * rhs[1][0] + _c * rhs[2][0];
224 values[0][1] = _a * rhs[0][1] + _b * rhs[1][1] + _c * rhs[2][1];
225 values[0][2] = _a * rhs[0][2] + _b * rhs[1][2] + _c * rhs[2][2];
227 values[1][0] = _d * rhs[0][0] + _e * rhs[1][0] + _f * rhs[2][0];
228 values[1][1] = _d * rhs[0][1] + _e * rhs[1][1] + _f * rhs[2][1];
229 values[1][2] = _d * rhs[0][2] + _e * rhs[1][2] + _f * rhs[2][2];
231 values[2][0] = _g * rhs[0][0] + _h * rhs[1][0] + _i * rhs[2][0];
232 values[2][1] = _g * rhs[0][1] + _h * rhs[1][1] + _i * rhs[2][1];
233 values[2][2] = _g * rhs[0][2] + _h * rhs[1][2] + _i * rhs[2][2];
291 << mat[0][0] <<
", " << mat[0][1] <<
", " << mat[0][2] <<
";\n\t"
292 << mat[1][0] <<
", " << mat[1][1] <<
", " << mat[1][2] <<
";\n\t"
293 << mat[2][0] <<
", " << mat[2][1] <<
", " << mat[2][2] <<
"\n]\n";
std::ostream & operator<<(std::ostream &out, const mat3< U > &mat)
Definition: mat3.h:288
mat3(T *vals)
Definition: mat3.h:64
const T * operator[](int index) const
Definition: mat3.h:275
mat3< T > Inverse()
Definition: mat3.h:108
T values[3][3]
loosely packed data
Definition: mat3.h:13
friend mat3< T > operator*(mat3< T > lhs, const mat3< T > &rhs)
Definition: mat3.h:175
T * operator[](int index)
Definition: mat3.h:269
mat3< T > & operator+=(const mat3< T > &rhs)
Definition: mat3.h:191
friend mat3< T > operator*(mat3< T > lhs, const T &rhs)
Definition: mat3.h:153
static mat3< T > Unit()
Definition: mat3.h:85
friend vec3< T > operator*(mat3< T > lhs, const vec3< T > &rhs)
Definition: mat3.h:161
friend mat3< T > operator+(mat3< T > lhs, const mat3< T > &rhs)
Definition: mat3.h:138
friend mat3< T > operator/(mat3< T > lhs, const T &rhs)
Definition: mat3.h:183
mat3(const T &_a, const T &_b, const T &_c, const T &_d, const T &_e, const T &_f, const T &_g, const T &_h, const T &_i)
Definition: mat3.h:38
mat3< T > & operator-=(const mat3< T > &rhs)
Definition: mat3.h:204
mat3< T > & operator*=(const mat3< T > &rhs)
Definition: mat3.h:217
float Determinant()
Definition: mat3.h:125
mat3< T > Transpose()
Definition: mat3.h:96
mat3(const vec3< T > &A, const vec3< T > &B, const vec3< T > &C)
Definition: mat3.h:53
bool IsSymmetric()
Definition: mat3.h:117
mat3< T > & operator/=(const T &rhs)
Definition: mat3.h:255
mat3< T > & operator*=(const T &rhs)
Definition: mat3.h:242
friend std::ostream & operator<<(std::ostream &, const mat3< U > &)
Definition: mat3.h:288
friend mat3< T > operator-(mat3< T > lhs, const mat3< T > &rhs)
Definition: mat3.h:146
mat3()
Definition: mat3.h:18