|
GameKit
0.0.1a
C++ gamedev tools
|
2D view that defines what is shown on screen More...
#include <View.hpp>
Public Member Functions | |
| View () | |
| View (const Vector3f ¢er, const Vector2f &size) | |
| View (const FloatRect &rectangle) | |
| virtual | ~View ()=default |
| void | setCenter (float x, float y, float z=0) |
| void | setCenter (const Vector3f &position) |
| void | setSize (float width, float height) |
| void | setSize (const Vector2f &size) |
| void | setRotation (float angle) |
| void | setViewport (const FloatRect &viewport) |
| void | reset (const FloatRect &rectangle) |
| const Vector3f & | getCenter () const |
| const Vector2f & | getSize () const |
| float | getRotation () const |
| const FloatRect & | getViewport () const |
| void | move (float offsetX, float offsetY, float offsetZ=0) |
| void | move (const Vector3f &offset) |
| void | rotate (float angle) |
| void | zoom (float factor) |
| virtual const Transform & | getTransform () const |
| virtual const Transform & | getViewTransform () const |
| virtual const Vector3f & | getPosition () const |
Protected Attributes | |
| bool | m_transformUpdated = false |
| bool | m_viewTransformUpdated = false |
| Transform | m_transform |
| Transform | m_viewTransform |
Private Attributes | |
| Vector3f | m_position |
| Vector2f | m_size |
| float | m_rotation = 0.0f |
| FloatRect | m_viewport {0, 0, 1, 1} |
2D view that defines what is shown on screen
Code inspired by SFML
|
virtualdefault |
|
inlinevirtual |
Reimplemented in gk::Camera.
|
virtual |
Reimplemented in gk::Camera.
|
virtual |
Reimplemented in gk::Camera.
| void gk::View::move | ( | float | offsetX, |
| float | offsetY, | ||
| float | offsetZ = 0 |
||
| ) |
|
inline |
|
inline |
|
mutableprotected |
1.8.12