From 97f4e5c80483255912b177e6a2557344da499a3e Mon Sep 17 00:00:00 2001 From: vimene Date: Sun, 26 Nov 2023 02:08:10 +0100 Subject: added matrices --- src/math/mat4.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/math/mat4.h (limited to 'src/math/mat4.h') diff --git a/src/math/mat4.h b/src/math/mat4.h new file mode 100644 index 0000000..d81da63 --- /dev/null +++ b/src/math/mat4.h @@ -0,0 +1,24 @@ +#ifndef MATH_MAT4_H +#define MATH_MAT4_H + +#include +#include "math/math_vector.h" + +class Mat4 { + public: + static Mat4 idty(); + static Mat4 rot_x(float a); + static Mat4 rot_y(float a); + static Mat4 rot_z(float a); + + std::array values; + + Mat4 operator-(); + Mat4 operator+(Mat4 m); + Mat4 operator-(Mat4 m); + Mat4 operator*(Mat4 m); + MathVector4 operator*(MathVector4 v); + std::array to_vecs(); +}; + +#endif // MATH_MAT4_H -- cgit v1.2.3