#ifndef MATRIX_H #define MATRIX_H #include "Vector3.h" /// @brief Single precision float matrix template class MatrixOf { public: MatrixOf(int rows, int cols, T *data) : rows(rows), cols(cols), data(data) {} MatrixOf(Vector3 v); // creates a 3,1 matrix /// @brief Transpose with result in matrix m /// @param r The matrix in which the transposed matrix is stored void Transpose(MatrixOf *r); static void Multiply(MatrixOf *m1, MatrixOf *m2, MatrixOf *r); void Multiply(MatrixOf *m, MatrixOf *r); static Vector3 Multiply(MatrixOf *m, Vector3 v); private: int rows; int cols; T *data; }; #endif