GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::WorldView2D Struct Reference

Configuration of a world-space view in 2D. More...

#include <GREM/graphics_2d/Camera2D.hpp>

Public Attributes

vec2 position {0.0f, 0.0f}
 World-space position of the view origin.
float angle = 0.0f
 World-space orientation of the view around its origin, in radians.
vec2 scale {1.0f, 1.0f}
 World-space scale of the view.

Detailed Description

Configuration of a world-space view in 2D.

Member Data Documentation

◆ position

vec2 grem::graphics::WorldView2D::position {0.0f, 0.0f}

World-space position of the view origin.

Note
As the view moves, its viewed contents will appear to move in the opposite direction relative to the view. In other words, moving the view to the left results in shifting what's seen in the view to the right.

◆ angle

float grem::graphics::WorldView2D::angle = 0.0f

World-space orientation of the view around its origin, in radians.

Note
As the view rotates, its viewed contents will appear to rotate in the opposite direction relative to the view. In other words, rotating the view counter-clockwise (positive angle) results in rotating what's seen in the view clockwise.

◆ scale

vec2 grem::graphics::WorldView2D::scale {1.0f, 1.0f}

World-space scale of the view.

Note
As the view is scaled, its viewed contents will appear to scale in the opposite direction relative to the view. In other words, lowering the scale below 1 results in zooming in, while increasing the scale above 1 results in zooming out.

The documentation for this struct was generated from the following file: