diff -r 68443f5be176 -r 44679e468ba9 src/matrix.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/matrix.h Sun Nov 03 12:17:41 2019 +0200 @@ -0,0 +1,21 @@ +#pragma once +#include + +template +struct Matrix +{ + T values[Rows][Columns]; + T& operator()(int row, int column) + { + return this->values[row][column]; + } + T operator()(int row, int column) const + { + return this->values[row][column]; + } +}; + +using Matrix3x3 = Matrix<3, 3>; +Q_DECLARE_METATYPE(Matrix3x3); +using Matrix4x4 = Matrix<4, 4>; +Q_DECLARE_METATYPE(Matrix4x4);