|
hx3d
1
2D/3D Simple Game Framework
|
Fit the screen resolution. More...
#include <fit_viewport.hpp>
Public Member Functions | |
| FitViewport (const float worldWidth, const float worldHeight) | |
| Create a fit viewport using a world width and height. More... | |
| virtual void | internalUpdate (Camera &camera) override |
| Update the viewport, centering the camera (internal). | |
Public Member Functions inherited from hx3d::graphics::viewports::Viewport | |
| void | setScreenPosition (const float x, const float y) |
| Set the viewport position. More... | |
| void | apply (Camera &camera) |
| Apply the viewport on the screen, centering the camera. More... | |
| void | update (Camera &camera, const int screenWidth, const int screenHeight) |
| Update the viewport with a new screen width and height, centering the camera. More... | |
| glm::vec2 | screenToWorld (const glm::vec2 screenPoint) |
| Convert a screen point to a world point. More... | |
| glm::vec2 | getWorldSize () |
| Get the world size. | |
Additional Inherited Members | |
Protected Attributes inherited from hx3d::graphics::viewports::Viewport | |
| float | _worldWidth |
| World width. | |
| float | _worldHeight |
| World height. | |
| int | _screenX |
| X offset. | |
| int | _screenY |
| Y offset. | |
| int | _screenWidth |
| Screen width. | |
| int | _screenHeight |
| Screen height. | |
Fit the screen resolution.
Definition at line 36 of file fit_viewport.hpp.
| hx3d::graphics::viewports::FitViewport::FitViewport | ( | const float | worldWidth, |
| const float | worldHeight | ||
| ) |
Create a fit viewport using a world width and height.
| worldWidth | World width |
| worldHeight | World height |
Definition at line 34 of file fit_viewport.cpp.
1.8.11