|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Mutable 2D pan/zoom navigation state. More...
#include <PanZoom2DState.hpp>
Collaboration diagram for MayaFlux::Kinesis::PanZoom2DState:Public Attributes | |
| bool | drag_held { false } |
| float | far_plane { 1.0F } |
| bool | first_mouse { true } |
| double | last_x { 0.0 } |
| double | last_y { 0.0 } |
| float | max_zoom { 10000.0F } |
| float | min_zoom { 0.001F } |
| float | near_plane { -1.0F } |
| glm::vec2 | pan { 0.0F, 0.0F } |
| World-space pan offset. | |
| float | scroll_speed { 0.1F } |
| float | zoom { 1.0F } |
| Orthographic half-height. | |
Mutable 2D pan/zoom navigation state.
Pan offset and zoom (orthographic half-height) are the only mutable fields. The ViewTransform is purely orthographic: view is identity, projection is derived each frame as ortho(-zoom*aspect + pan.x, zoom*aspect + pan.x, -zoom + pan.y, zoom + pan.y).
Construct via make_pan_zoom_state(). Update via apply_pan_zoom_pan() and apply_pan_zoom_scroll(), then call compute_pan_zoom_view_transform() each frame.
Definition at line 33 of file PanZoom2DState.hpp.