From f63febed2a769d0c55192e192a20b8e39f162932 Mon Sep 17 00:00:00 2001 From: vimene Date: Sun, 26 Nov 2023 06:49:51 +0100 Subject: improved matrices, cube building and command parsing --- src/math/mat4.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/math/mat4.h') diff --git a/src/math/mat4.h b/src/math/mat4.h index d81da63..6df9d49 100644 --- a/src/math/mat4.h +++ b/src/math/mat4.h @@ -7,12 +7,16 @@ class Mat4 { public: static Mat4 idty(); + static Mat4 translate(MathVector3 v); + static Mat4 scale(float fac); static Mat4 rot_x(float a); static Mat4 rot_y(float a); static Mat4 rot_z(float a); + static Mat4 projection(float aspect_ratio, float min_z, float max_z); std::array values; + Mat4 operator+(); Mat4 operator-(); Mat4 operator+(Mat4 m); Mat4 operator-(Mat4 m); @@ -21,4 +25,6 @@ class Mat4 { std::array to_vecs(); }; +Mat4 operator*(float fac, Mat4 m); + #endif // MATH_MAT4_H -- cgit v1.2.3