From 9b70ca7b3a1b7bfd3bf434d8b84bde42f5572ca0 Mon Sep 17 00:00:00 2001 From: vimene Date: Tue, 5 Dec 2023 10:42:35 +0100 Subject: added renderer, improved various things - Added renderer to unify frame buffers - Added FrameBuffer class as a parent for frame buffers' classes - Improved formatting in Makefile.am - Added const modifier in Matrix4's methods --- src/math/mat4.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/math/mat4.h') diff --git a/src/math/mat4.h b/src/math/mat4.h index 66d6cd2..35b1ad2 100644 --- a/src/math/mat4.h +++ b/src/math/mat4.h @@ -11,6 +11,7 @@ class Matrix4 { static Matrix4 idty(); static Matrix4 translate(Vector3 v); static Matrix4 scale(float fac); + static Matrix4 scale(Vector3 facs); static Matrix4 rot_x(float a); static Matrix4 rot_y(float a); static Matrix4 rot_z(float a); @@ -18,13 +19,13 @@ class Matrix4 { std::array values; - Matrix4 operator+(); - Matrix4 operator-(); - Matrix4 operator+(Matrix4 m); - Matrix4 operator-(Matrix4 m); - Matrix4 operator*(Matrix4 m); - Vector4 operator*(Vector4 v); - std::array to_vecs(); + Matrix4 operator+() const; + Matrix4 operator-() const; + Matrix4 operator+(Matrix4 m) const; + Matrix4 operator-(Matrix4 m) const; + Matrix4 operator*(Matrix4 m) const; + Vector4 operator*(Vector4 v) const; + std::array to_vecs() const; }; Matrix4 operator*(float fac, Matrix4 m); -- cgit v1.2.3