34 typedef double Aligned4x4[4][4];
63 void Set(
double a,
double b,
double c,
double d,
double e,
double f);
68 void Set(
double m11,
double m12,
double m13,
double m14,
69 double m21,
double m22,
double m23,
double m24,
70 double m31,
double m32,
double m33,
double m34,
71 double m41,
double m42,
double m43,
double m44);
73 inline double m11()
const {
return data[0][0]; }
74 inline double m12()
const {
return data[0][1]; }
75 inline double m13()
const {
return data[0][2]; }
76 inline double m14()
const {
return data[0][3]; }
77 inline double m21()
const {
return data[1][0]; }
78 inline double m22()
const {
return data[1][1]; }
79 inline double m23()
const {
return data[1][2]; }
80 inline double m24()
const {
return data[1][3]; }
81 inline double m31()
const {
return data[2][0]; }
82 inline double m32()
const {
return data[2][1]; }
83 inline double m33()
const {
return data[2][2]; }
84 inline double m34()
const {
return data[2][3]; }
85 inline double m41()
const {
return data[3][0]; }
86 inline double m42()
const {
return data[3][1]; }
87 inline double m43()
const {
return data[3][2]; }
88 inline double m44()
const {
return data[3][3]; }
90 inline double a()
const {
return data[0][0]; }
91 inline double b()
const {
return data[0][1]; }
92 inline double c()
const {
return data[1][0]; }
93 inline double d()
const {
return data[1][1]; }
94 inline double e()
const {
return data[3][0]; }
95 inline double f()
const {
return data[3][1]; }
#define UExport
Definition Defines.h:65
bool operator!=(const Matrix &a, const Matrix &b)
bool operator==(const Matrix &a, const Matrix &b)
4x4 Matrix Helper
Definition Matrix.h:18
void SetIdentity()
Set to identity matrix.
Transformation Matrix helper.
Definition Matrix.h:33
double m11() const
Definition Matrix.h:73
double m33() const
Definition Matrix.h:83
void Rotate(double theta)
Rotate matrix by theta (in degrees)
double m43() const
Definition Matrix.h:87
void Set(const Matrix &other)
Set to another matrix.
Point Apply(const Point &p) const
Transform point by this matrix and get the result.
void Translate(double x, double y)
Translate by x and y.
void Set(double a, double b, double c, double d, double e, double f)
Set from raw affine members.
double m14() const
Definition Matrix.h:76
void SetIdentity()
Set to identity matrix.
bool GetInverse(Matrix &result) const
Get the inverse of this matrix.
double m23() const
Definition Matrix.h:79
double m34() const
Definition Matrix.h:84
void Scale(double x, double y)
Scale by x and y.
double c() const
Definition Matrix.h:92
double m31() const
Definition Matrix.h:81
void SetOrthographicProjection(double screen_width, double screen_height, bool flip_y)
Set to an orthographic projection matrix suitable for use with our vertex shaders.
double m12() const
Definition Matrix.h:74
bool IsAffine() const
Whether or not this matrix uses only affine transformations.
double m22() const
Definition Matrix.h:78
bool IsIdentity() const
Whether or not this is an identity matrix.
bool IsIdentityOrTranslation() const
Whether or not this is an identity matrix or translation.
Rect Apply(const Rect &r) const
Transform rect by this matrix and get the result as an axis-aligned rect.
bool IsSimple() const
Whether or not this is an identity, translation, or non-negative uniform scale.
double d() const
Definition Matrix.h:93
void Rotate(double x, double y)
Rotate matrix by x and y.
void Set(double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double m41, double m42, double m43, double m44)
Set from raw 4x4 components.
void Transform(const Matrix &other)
Transform (multiply) by another Matrix.
double b() const
Definition Matrix.h:91
Matrix4x4 GetMatrix4x4() const
Get this matrix as unaligned 4x4 float components (for use passing to GPU driver APIs).
Aligned4x4 data
Definition Matrix.h:36
double m42() const
Definition Matrix.h:86
double m13() const
Definition Matrix.h:75
double m32() const
Definition Matrix.h:82
double a() const
Definition Matrix.h:90
double f() const
Definition Matrix.h:95
double e() const
Definition Matrix.h:94
double m41() const
Definition Matrix.h:85
double m44() const
Definition Matrix.h:88
double m21() const
Definition Matrix.h:77
double m24() const
Definition Matrix.h:80
void Set(const Matrix4x4 &other)
Set to another matrix.
uint32_t Hash() const
Get an integer hash of this matrix's members.
Float Rectangle Helper.
Definition Geometry.h:419
2D Vector Helper
Definition Geometry.h:20