/* math/matrix4f.cc This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #ifndef __INCLUDED_MATH_MATRIX4F_H__ #define __INCLUDED_MATH_MATRIX4F_H__ #include #include "math/axis.h" namespace math { /// a transformation matrix class Matrix4f { public: Matrix4f(); Matrix4f(const Matrix4f & other); Matrix4f(const Axis & axis); /// set all values to zero void clear(); /// set the value to a 4x4 unity matrix void unity(); /// assignment operator void assign(const Matrix4f & other); /// assignment operator inline Matrix4f & operator=(const Matrix4f &other); /// assign the matrix transformation equivalent to the coordinate system void assign(const Axis & axis); /// assign the matrix transformation equivalent to the coordinate system Matrix4f & operator=(const Axis & axis); /// return a pointer to the internal data inline float * ptr() const { return (float *) matrix; } /// return the transpose matrix Matrix4f const transpose(); private: float matrix[4][4]; }; } #endif // __INCLUDED_MATH_MATRIX4F_H__