diff options
author | vimene <vincent.menegaux@gmail.com> | 2023-12-05 10:42:35 +0100 |
---|---|---|
committer | vimene <vincent.menegaux@gmail.com> | 2023-12-05 10:42:35 +0100 |
commit | 9b70ca7b3a1b7bfd3bf434d8b84bde42f5572ca0 (patch) | |
tree | 7078a70f7fc5b590c61386f55f4fbcc67e36b0f3 /src/math/mat4.h | |
parent | 48ec7df0fd27fab05c9918e83a3a7da1cc32d7a0 (diff) | |
download | engine-9b70ca7b3a1b7bfd3bf434d8b84bde42f5572ca0.tar.gz |
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
Diffstat (limited to 'src/math/mat4.h')
-rw-r--r-- | src/math/mat4.h | 15 |
1 files changed, 8 insertions, 7 deletions
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<float, 16> values; - Matrix4 operator+(); - Matrix4 operator-(); - Matrix4 operator+(Matrix4 m); - Matrix4 operator-(Matrix4 m); - Matrix4 operator*(Matrix4 m); - Vector4 operator*(Vector4 v); - std::array<Vector4, 4> 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<Vector4, 4> to_vecs() const; }; Matrix4 operator*(float fac, Matrix4 m); |