From 8e92b0c5aa0cc57e8729069dad4cb635845f51d8 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Mon, 24 May 2010 03:12:17 +0200 Subject: Added Matrix-class. --- engine/matrix.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 engine/matrix.h (limited to 'engine/matrix.h') diff --git a/engine/matrix.h b/engine/matrix.h new file mode 100644 index 0000000..b6e4e3c --- /dev/null +++ b/engine/matrix.h @@ -0,0 +1,22 @@ +#ifndef MATRIX_H +#define MATRIX_H + +#include "vector.h" + +template +class Matrix { + public: + float m[M][N]; +}; + +class Matrix2 : Matrix<2, 2> { + public: + Matrix2(); + Matrix2(float m00, float m01, float m10, float m11); + + Vector2 operator*(const Vector2& v); +}; + +Matrix2 rotation_matrix(float rot); + +#endif -- cgit v1.2.3