#ifndef MATRIX_H #define MATRIX_H #include #include "common/math/Vector.h" class Matrix final { public: Matrix(); Matrix& set(const Matrix& other); Matrix& setToIdentity(); Matrix& set(uint index, float f); const float* getValues() const; Matrix& mul(const Matrix& m); Matrix& scale(float sx, float sy, float sz); Matrix& scale(float s); Matrix& translate(float tx, float ty, float tz); Matrix& translateX(float tx); Matrix& translateY(float ty); Matrix& translateZ(float tz); Matrix& translateTo(float tx, float ty, float tz); Matrix& rotateX(float degrees); Matrix& rotateY(float degrees); Matrix& rotateZ(float degrees); private: Matrix& rotate(float degrees, uint indexA, uint indexB); alignas(16) float data[16]; }; std::ostream& operator<<(std::ostream& os, const Matrix& m); Vector<3> operator*(const Matrix& m, const Vector<3>& v); #endif