CommonLibSSE NG
Loading...
Searching...
No Matches
GMatrix2D.h
Go to the documentation of this file.
1#pragma once
2
3namespace RE
4{
6 {
7 public:
9 {
11 }
12
13 GMatrix2D(float a_v0, float a_v1, float a_v2, float a_v3, float a_v4, float a_v5)
14 {
15 SetMatrix(a_v0, a_v1, a_v2, a_v3, a_v4, a_v5);
16 }
17
19 {
20 for (std::size_t i = 0; i < std::extent<decltype(data), 0>::value; ++i) {
21 for (std::size_t j = 0; j < std::extent<decltype(data), 1>::value; ++j) {
22 data[i][j] = a_rhs.data[i][j];
23 }
24 }
25 return *this;
26 }
27
28 inline void SetMatrix(const GMatrix2D& a_matrix)
29 {
30 data[0][0] = a_matrix.data[0][0];
31 data[0][1] = a_matrix.data[0][1];
32 data[0][2] = a_matrix.data[0][2];
33 data[1][0] = a_matrix.data[1][0];
34 data[1][1] = a_matrix.data[1][1];
35 data[1][2] = a_matrix.data[1][2];
36 }
37
38 inline void SetMatrix(float a_v0, float a_v1, float a_v2, float a_v3, float a_v4, float a_v5)
39 {
40 data[0][0] = a_v0;
41 data[0][1] = a_v1;
42 data[0][2] = a_v4;
43 data[1][0] = a_v2;
44 data[1][1] = a_v3;
45 data[1][2] = a_v5;
46 }
47
49 {
50 data[0][0] = 1.0f;
51 data[0][1] = 0.0f;
52 data[0][2] = 0.0f;
53 data[1][0] = 0.0f;
54 data[1][1] = 1.0f;
55 data[1][2] = 0.0f;
56 }
57
58 float data[2][3]; // 00
59 };
60 static_assert(sizeof(GMatrix2D) == 0x18);
61}
Definition GMatrix2D.h:6
GMatrix2D(float a_v0, float a_v1, float a_v2, float a_v3, float a_v4, float a_v5)
Definition GMatrix2D.h:13
void SetIdentity()
Definition GMatrix2D.h:48
void SetMatrix(float a_v0, float a_v1, float a_v2, float a_v3, float a_v4, float a_v5)
Definition GMatrix2D.h:38
void SetMatrix(const GMatrix2D &a_matrix)
Definition GMatrix2D.h:28
GMatrix2D()
Definition GMatrix2D.h:8
float data[2][3]
Definition GMatrix2D.h:58
GMatrix2D & operator=(const GMatrix2D &a_rhs)
Definition GMatrix2D.h:18
Definition AbsorbEffect.h:6