diff options
author | vimene <vincent.menegaux@gmail.com> | 2023-11-26 02:08:10 +0100 |
---|---|---|
committer | vimene <vincent.menegaux@gmail.com> | 2023-11-26 02:08:10 +0100 |
commit | 97f4e5c80483255912b177e6a2557344da499a3e (patch) | |
tree | c75b709785ed6425e7a755eab859ed02e215c936 /src/math/mat4.h | |
parent | da56b98fd91fc94dd2a17936f362c0c9873f1d19 (diff) | |
download | engine-97f4e5c80483255912b177e6a2557344da499a3e.tar.gz |
added matrices
Diffstat (limited to 'src/math/mat4.h')
-rw-r--r-- | src/math/mat4.h | 24 |
1 files changed, 24 insertions, 0 deletions
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 <array> +#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<float, 16> values; + + Mat4 operator-(); + Mat4 operator+(Mat4 m); + Mat4 operator-(Mat4 m); + Mat4 operator*(Mat4 m); + MathVector4 operator*(MathVector4 v); + std::array<MathVector4, 4> to_vecs(); +}; + +#endif // MATH_MAT4_H |