JNGL
matrix.hpp
Go to the documentation of this file.
1 // Copyright 2012-2020 Jan Niklas Hasse <[email protected]>
2 // For conditions of distribution and use, see copyright notice in LICENSE.txt
5 #pragma once
6 
7 namespace jngl {
8 
10 void rotate(double degree);
11 
13 void translate(double x, double y);
14 
18 template <class Vect> void translate(Vect v) {
19  translate(v.x, v.y);
20 }
21 
25 void scale(double factor);
26 
28 void scale(double xfactor, double yfactor);
29 
31 void pushMatrix();
32 
34 void popMatrix();
35 
37 void reset();
38 
39 } // namespace jngl
jngl::reset
void reset()
Resets the global ModelView matrix to the identity matrix.
jngl
JNGL's main namespace.
Definition: App.hpp:9
jngl::pushMatrix
void pushMatrix()
Pushes the current ModelView matrix on a global stack.
jngl::scale
void scale(double factor)
Multiplies the global ModelView matrix by a scaling matrix.
jngl::rotate
void rotate(double degree)
Multiplies the global ModelView matrix with a rotation matrix.
jngl::translate
void translate(double x, double y)
Multiplies the global ModelView matrix with a translation matrix.
jngl::popMatrix
void popMatrix()
Replaces the current ModelView matrix with the top element of the global stack.