JNGL
matrix.hpp
Go to the documentation of this file.
1 // Copyright 2012-2021 Jan Niklas Hasse <[email protected]>
2 // For conditions of distribution and use, see copyright notice in LICENSE.txt
5 #pragma once
6 
7 #include "Mat3.hpp"
8 
9 namespace jngl {
10 
13 
15 void rotate(double degree);
16 
18 void translate(double x, double y);
19 
23 template <class Vect> void translate(Vect v) {
24  translate(v.x, v.y);
25 }
26 
30 void scale(double factor);
31 
33 void scale(double xfactor, double yfactor);
34 
36 void pushMatrix();
37 
39 void popMatrix();
40 
42 void reset();
43 
44 } // namespace jngl
Contains jngl::Mat3 class.
3x3 matrix
Definition: Mat3.hpp:19
JNGL's main namespace.
Definition: App.hpp:10
void translate(double x, double y)
Multiplies the global ModelView matrix with a translation matrix.
jngl::Mat3 modelview()
Returns a copy of the global ModelView matrix.
void popMatrix()
Replaces the current ModelView matrix with the top element of the global stack.
void scale(double factor)
Multiplies the global ModelView matrix by a scaling matrix.
void rotate(double degree)
Multiplies the global ModelView matrix with a rotation matrix.
void reset()
Resets the global ModelView matrix to the identity matrix.
void pushMatrix()
Pushes the current ModelView matrix on a global stack.