31 #include "hpl1/engine/math/Vector3.h" 82 T a00, T a01, T a02, T a03,
83 T a10, T a11, T a12, T a13,
84 T a20, T a21, T a22, T a23,
85 T a30, T a31, T a32, T a33) : m{
89 {a30, a31, a32, a33}} {
97 inline bool operator==(
const cMatrix<T> &aMtx)
const {
98 if (m[0][0] == aMtx.m[0][0] &&
99 m[0][1] == aMtx.m[0][1] &&
100 m[0][2] == aMtx.m[0][2] &&
101 m[0][3] == aMtx.m[0][3] &&
102 m[1][0] == aMtx.m[1][0] &&
103 m[1][1] == aMtx.m[1][1] &&
104 m[1][2] == aMtx.m[1][2] &&
105 m[1][3] == aMtx.m[1][3] &&
106 m[2][0] == aMtx.m[2][0] &&
107 m[2][1] == aMtx.m[2][1] &&
108 m[2][2] == aMtx.m[2][2] &&
109 m[2][3] == aMtx.m[2][3] &&
110 m[3][0] == aMtx.m[3][0] &&
111 m[3][1] == aMtx.m[3][1] &&
112 m[3][2] == aMtx.m[3][2] &&
113 m[3][3] == aMtx.m[3][3]) {
122 inline bool operator!=(
const cMatrix<T> &aMtx) {
123 return !(*
this == aMtx);
128 inline void FromVec(
const T *pA) {
149 inline void FromTranspose(
const T *pA) {
217 inline void SetTranslation(
const cVector3<T> &avTrans) {
226 return cMatrix<T>(m[0][0], m[0][1], m[0][2], 0,
227 m[1][0], m[1][1], m[1][2], 0,
228 m[2][0], m[2][1], m[2][2], 0,
235 return cMatrix<T>(m[0][0], m[1][0], m[2][0], m[3][0],
236 m[0][1], m[1][1], m[2][1], m[3][1],
237 m[0][2], m[1][2], m[2][2], m[3][2],
238 m[0][3], m[1][3], m[2][3], m[3][3]);
245 snprintf(buf, 512,
"[%f : %f : %f : %f] [%f : %f : %f : %f] [%f : %f : %f : %f] [%f : %f : %f : %f]",
246 m[0][0], m[0][1], m[0][2], m[0][3],
247 m[1][0], m[1][1], m[1][2], m[1][3],
248 m[2][0], m[2][1], m[2][2], m[2][3],
249 m[3][0], m[3][1], m[3][2], m[3][3]);
255 snprintf(buf, 512,
"%g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g",
256 m[0][0], m[0][1], m[0][2], m[0][3],
257 m[1][0], m[1][1], m[1][2], m[1][3],
258 m[2][0], m[2][1], m[2][2], m[2][3],
259 m[3][0], m[3][1], m[3][2], m[3][3]);
266 #endif // HPL_MATRIX_H
Definition: hplMatrix.h:36