MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ apply_pan_zoom_scroll()

MAYAFLUX_API void MayaFlux::Kinesis::apply_pan_zoom_scroll ( PanZoom2DState state,
float  ticks 
)

Zoom by multiplying the half-height, clamped to [min_zoom, max_zoom].

Parameters
statePanZoom2D state (zoom mutated).
ticksSigned scroll ticks (positive = zoom in).

Definition at line 39 of file PanZoom2DState.cpp.

40{
41 st.zoom *= (1.0F - ticks * st.scroll_speed);
42 st.zoom = glm::clamp(st.zoom, st.min_zoom, st.max_zoom);
43}

References MayaFlux::Kinesis::PanZoom2DState::max_zoom, MayaFlux::Kinesis::PanZoom2DState::min_zoom, MayaFlux::Kinesis::PanZoom2DState::scroll_speed, and MayaFlux::Kinesis::PanZoom2DState::zoom.

Referenced by MayaFlux::bind_pan_zoom_preset().

+ Here is the caller graph for this function: