23 #ifndef INCLUDED_MATRIX3D 24 #define INCLUDED_MATRIX3D 61 float a11,
float a12,
float a13,
float a14,
62 float a21,
float a22,
float a23,
float a24,
63 float a31,
float a32,
float a33,
float a34,
64 float a41,
float a42,
float a43,
float a44) :
75 _13(data[8]),
_23(data[9]),
_33(data[10]),
_43(data[11]),
76 _14(data[12]),
_24(data[13]),
_34(data[14]),
_44(data[15])
86 return _data[row*4+col];
90 return _data[row*4+col];
179 return !(*
this == m);
187 void SetOrtho(
float left,
float right,
float bottom,
float top,
float near,
float far);
189 void SetPerspective(
float fov,
float aspect,
float near,
float far);
190 void SetPerspectiveTile(
float fov,
float aspect,
float near,
float far,
int tiles,
int tile_x,
int tile_y);
195 (*this) = m * (*this);
241 void Translate(
float x,
float y,
float z);
248 void SetScaling(
float x_scale,
float y_scale,
float z_scale);
251 void Scale(
float x_scale,
float y_scale,
float z_scale);
332 sizeof(
CMatrix3D) ==
sizeof(
float) * 16u &&
336 "CMatrix3D should be properly layouted to use AsFloatArray");
341 #endif // INCLUDED_MATRIX3D CVector3D GetIn() const
Definition: Matrix3D.cpp:279
CMatrix3D GetInverse() const
Definition: Matrix3D.cpp:373
void Translate(float x, float y, float z)
Definition: Matrix3D.cpp:198
float _21
Definition: Matrix3D.h:44
void SetZRotation(float angle)
Definition: Matrix3D.cpp:109
void SetPerspectiveTile(float fov, float aspect, float near, float far, int tiles, int tile_x, int tile_y)
Definition: Matrix3D.cpp:73
CMatrix3D operator*(float f) const
Definition: Matrix3D.h:136
void RotateTransposed(const CVector3D &vector, CVector3D &result) const
Definition: Matrix3D.cpp:295
void SetTranslation(float x, float y, float z)
Definition: Matrix3D.cpp:184
CMatrix3D & operator+=(const CMatrix3D &m)
Definition: Matrix3D.h:158
void SetPerspective(float fov, float aspect, float near, float far)
Definition: Matrix3D.cpp:61
float _22
Definition: Matrix3D.h:45
float _12
Definition: Matrix3D.h:45
CVector3D GetLeft() const
Definition: Matrix3D.cpp:267
CMatrix3D()
Definition: Matrix3D.h:56
bool operator!=(const CMatrix3D &m) const
Definition: Matrix3D.h:177
float _44
Definition: Matrix3D.h:47
CMatrix3D operator*(const CMatrix3D &matrix) const
Definition: Matrix3D.h:103
void SetYRotation(float angle)
Definition: Matrix3D.cpp:98
CMatrix3D(float a11, float a12, float a13, float a14, float a21, float a22, float a23, float a24, float a31, float a32, float a33, float a34, float a41, float a42, float a43, float a44)
Definition: Matrix3D.h:60
CVector3D GetTranslation() const
Definition: Matrix3D.cpp:221
void SetZero()
Definition: Matrix3D.cpp:39
float _43
Definition: Matrix3D.h:46
CVector3D Rotate(const CVector3D &vector) const
Definition: Matrix3D.h:308
Definition: Vector3D.h:30
float _32
Definition: Matrix3D.h:45
float _11
Definition: Matrix3D.h:44
void Rotate(const CQuaternion &quat)
Definition: Matrix3D.cpp:380
float & operator[](int idx)
Definition: Matrix3D.h:93
CMatrix3D operator+(const CMatrix3D &m) const
Definition: Matrix3D.h:147
float Y
Definition: Vector4D.h:142
CMatrix3D & operator*=(const CMatrix3D &matrix)
Definition: Matrix3D.h:129
Definition: Vector4D.h:30
void PostTranslate(float x, float y, float z)
Definition: Matrix3D.cpp:212
float _33
Definition: Matrix3D.h:46
Definition: Matrix3D.h:33
void SetRotation(const CQuaternion &quat)
Definition: Matrix3D.cpp:424
void RotateY(float angle)
Definition: Matrix3D.cpp:143
float Z
Definition: Vector4D.h:142
void Rotate(const CVector3D &vector, CVector3D &result) const
Definition: Matrix3D.h:315
float X
Definition: Vector3D.h:33
float Y
Definition: Vector3D.h:33
float _13
Definition: Matrix3D.h:46
float _data2d[4][4]
Definition: Matrix3D.h:50
float _31
Definition: Matrix3D.h:44
CQuaternion GetRotation() const
Definition: Matrix3D.cpp:386
void Scale(float x_scale, float y_scale, float z_scale)
Definition: Matrix3D.cpp:236
float & operator()(int col, int row)
Definition: Matrix3D.h:84
void SetIdentity()
Definition: Matrix3D.cpp:30
void Transform(const CVector4D &vector, CVector4D &result) const
Definition: Matrix3D.h:299
float _42
Definition: Matrix3D.h:45
float _24
Definition: Matrix3D.h:47
PS::span< const float > AsFloatArray() const
Definition: Matrix3D.h:327
CMatrix3D(float data[])
Definition: Matrix3D.h:72
CVector3D GetUp() const
Definition: Matrix3D.cpp:273
CMatrix3D GetTranspose() const
Definition: Matrix3D.cpp:256
float _34
Definition: Matrix3D.h:47
void Concatenate(const CMatrix3D &m)
Definition: Matrix3D.h:193
bool operator==(const CMatrix3D &m) const
Definition: Matrix3D.h:168
float W
Definition: Vector4D.h:142
void Transform(const CVector3D &vector, CVector3D &result) const
Definition: Matrix3D.h:284
float GetYRotation() const
Definition: Matrix3D.cpp:429
Definition: Quaternion.h:25
float _23
Definition: Matrix3D.h:46
void SetScaling(float x_scale, float y_scale, float z_scale)
Definition: Matrix3D.cpp:227
float _data[16]
Definition: Matrix3D.h:49
void SetXRotation(float angle)
Definition: Matrix3D.cpp:87
const float & operator()(int col, int row) const
Definition: Matrix3D.h:88
float Z
Definition: Vector3D.h:33
const float & operator[](int idx) const
Definition: Matrix3D.h:97
void SetOrtho(float left, float right, float bottom, float top, float near, float far)
Definition: Matrix3D.cpp:47
void Blend(const CMatrix3D &m, float f)
Definition: Matrix3D.h:199
void RotateZ(float angle)
Definition: Matrix3D.cpp:163
float _41
Definition: Matrix3D.h:44
CVector4D Transform(const CVector4D &vector) const
Definition: Matrix3D.h:292
void AddBlend(const CMatrix3D &m, float f)
Definition: Matrix3D.h:208
void RotateX(float angle)
Definition: Matrix3D.cpp:123
CVector3D Transform(const CVector3D &vector) const
Definition: Matrix3D.h:277
Simplifed version of std::span (C++20) as we don't support the original one yet.
Definition: Span.h:36
float X
Definition: Vector4D.h:142
float _14
Definition: Matrix3D.h:47