Public Member Functions | Static Public Member Functions | Protected Attributes

psastras::engine::graphics::Viewport Class Reference

Collaboration diagram for psastras::engine::graphics::Viewport:
Collaboration graph
[legend]

List of all members.

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_

Detailed Description

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.

Author:
psastras

The documentation for this class was generated from the following file:
 All Classes Functions Variables