Public Member Functions | |
Viewport (Vec2F pos, Vec2F bounds) | |
final Vec2F | pos () |
final Vec2F | screenSize () |
final Vec2F | bounds () |
void | updateScreenSize (Vec2F screen) |
final Vec2F | virtualToScreen (final Vec2F coords) |
final Vec2F | screenToVirtual (final Vec2F coords) |
Static Public Member Functions | |
static final Viewport | defaultViewport () |
Protected Attributes | |
Vec2F | pos_ |
Vec2F | bounds_ |
Vec2F | screenSize_ |
Vec2F | offset_ |
Vec2F | maxVirtual_ |
float | ratio_ |
Viewport describes a origin, width, and height of a scene viewport in virtual coordinates. Objects drawn using a viewport will automatically be scaled to best fit of the actual screen size.