libvmath4
diff src/matrix.h @ 0:4d6383605d64
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 05 Oct 2014 04:00:05 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/matrix.h Sun Oct 05 04:00:05 2014 +0300 1.3 @@ -0,0 +1,39 @@ 1.4 +#ifndef MATRIX_H_ 1.5 +#define MATRIX_H_ 1.6 + 1.7 +namespace vmath { 1.8 + 1.9 +class Matrix3x3 { 1.10 +private: 1.11 + float m[3][3]; 1.12 + 1.13 +public: 1.14 + static Matrix3x3 id; 1.15 + 1.16 + Matrix3x3(); 1.17 + Matrix3x3(const float *m); 1.18 + Matrix3x3(float m00, float m01, float m02, 1.19 + float m10, float m11, float m12, 1.20 + float m20, float m21, float m22); 1.21 +}; 1.22 + 1.23 +class Matrix4x4 { 1.24 +private: 1.25 + float m[4][4]; 1.26 + 1.27 +public: 1.28 + static Matrix4x4 id; 1.29 + 1.30 + Matrix4x4(); 1.31 + Matrix4x4(const float *m); 1.32 + Matrix4x4(float m00, float m01, float m02, float m03, 1.33 + float m10, float m11, float m12, float m13, 1.34 + float m20, float m21, float m22, float m23, 1.35 + float m30, float m31, float m32, float m33); 1.36 +}; 1.37 + 1.38 +#include "matrix.inl" 1.39 + 1.40 +} // namespace vmath 1.41 + 1.42 +#endif // MATRIX_H_