JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
matrix.hpp
Go to the documentation of this file.
1// Copyright 2012-2022 Jan Niklas Hasse <jhasse@bixense.com>
2// For conditions of distribution and use, see copyright notice in LICENSE.txt
5#pragma once
6
7#include "Mat3.hpp"
8
9namespace jngl {
10
33
35void rotate(double degree);
36
38void translate(double x, double y);
39
43template <class Vect> void translate(Vect v) {
44 translate(v.x, v.y);
45}
46
50void scale(double factor);
51
53void scale(double xfactor, double yfactor);
54
57
59void popMatrix();
60
62void reset();
63
64} // namespace jngl
Contains jngl::Mat3 class.
3x3 matrix
Definition: Mat3.hpp:18
JNGL's main namespace.
Definition: Achievement.hpp:10
void rotate(double degree)
Multiplies the global ModelView matrix with a rotation matrix.
void scale(double factor)
Multiplies the global ModelView matrix by a scaling matrix.
void popMatrix()
Replaces the current ModelView matrix with the top element of the global stack.
jngl::Mat3 modelview()
Returns a copy of the global ModelView matrix.
void reset()
Resets the global ModelView matrix to the identity matrix.
void translate(double x, double y)
Multiplies the global ModelView matrix with a translation matrix.
void pushMatrix()
Pushes the current ModelView matrix on a global stack.