Add matrix class to provide basic math in a way compatible with OpenGL.