|
mousetrap v0.2.0
|
transform, operates in OpenGL coordinate system More...
#include <gl_transform.hpp>
Public Member Functions | |
| GLTransform () | |
| construct a identity | |
| Vector2f | apply_to (Vector2f gl_coords) |
| apply transform to mousetrap::Vector2f | |
| Vector3f | apply_to (Vector3f gl_coords) |
| apply transform to mousetrap::Vector3f | |
| GLTransform | combine_with (GLTransform) |
| combin two transforms | |
| void | rotate (Angle, Vector2f gl_coords) |
| rotate transform | |
| void | translate (Vector2f gl_offset) |
| translate transform | |
| void | scale (float x, float y) |
| scale transform | |
| void | reset () |
| make transform identity | |
Public Attributes | |
| glm::mat4x4 | transform |
| transform data | |
transform, operates in OpenGL coordinate system
| Vector2f mousetrap::GLTransform::apply_to | ( | Vector2f | gl_coords | ) |
apply transform to mousetrap::Vector2f
| gl_coords | vector in 2d space |
References apply_to().
Referenced by apply_to().
| Vector3f mousetrap::GLTransform::apply_to | ( | Vector3f | gl_coords | ) |
apply transform to mousetrap::Vector3f
| gl_coords | vector in 3d space |
References transform.
| GLTransform mousetrap::GLTransform::combine_with | ( | GLTransform | other | ) |
combin two transforms
| other |
References GLTransform(), and transform.
| void mousetrap::GLTransform::rotate | ( | Angle | angle, |
| Vector2f | gl_coords | ||
| ) |
rotate transform
| angle | |
| gl_coords | origin point of rotation |
References mousetrap::Angle::as_radians(), and transform.
| void mousetrap::GLTransform::scale | ( | float | x, |
| float | y | ||
| ) |
| void mousetrap::GLTransform::translate | ( | Vector2f | gl_offset | ) |