1 #ifndef DQM_TRACKERREMAPPER_MAT4_H 2 #define DQM_TRACKERREMAPPER_MAT4_H 45 for (
unsigned i = 0;
i < 12; ++
i)
53 for (
unsigned i = 0;
i < 12; ++
i)
61 for (
unsigned i = 0;
i < 12; ++
i)
62 tmp[
i] = (*
this)[
i] + mat[
i];
69 for (
unsigned i = 0;
i < 12; ++
i)
79 void MulVec(
const float* vecIn,
float* vecOut) {
80 for (
unsigned i = 0;
i < 3; ++
i) {
82 for (
unsigned j = 0;
j < 3; ++
j) {
89 float rmli = 1.0f / (right - left);
90 float rpl = right + left;
92 float tmbi = 1.0f / (top - bottom);
93 float tpb = top + bottom;
95 float fmni = 1.0f / (far - near);
96 float fpn = far + near;
98 data[0] = 2.0f * rmli;
103 data[4] = 2.0f * tmbi;
108 data[8] = -2.0f * fmni;
110 data[9] = -rpl * rmli;
111 data[10] = -tpb * tmbi;
112 data[11] = -fpn * fmni;
float operator[](unsigned i) const
void BuildOrthographicMatrix(float left, float right, float top, float bottom, float near, float far)
float & operator[](unsigned i)
mat4(float r00, float r10, float r20, float r01, float r11, float r21, float r02, float r12, float r22, float x, float y, float z)
void MulVec(const float *vecIn, float *vecOut)
mat4 operator+(const mat4 &mat) const
mat4 operator*(float s) const
mat4 & operator=(const mat4 &mat)=default
mat4 & operator &(const mat4 &mat)