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

◆ apply_orbit_scroll()

MAYAFLUX_API void MayaFlux::Kinesis::apply_orbit_scroll ( OrbitState state,
float  ticks 
)

Dolly the camera toward or away from the focal point.

Distance is multiplied by (1 - ticks * scroll_speed) and clamped to [min_distance, max_distance].

Parameters
stateOrbit state (distance mutated).
ticksSigned scroll ticks (positive = closer).

Definition at line 46 of file OrbitState.cpp.

47{
48 st.distance *= (1.0F - ticks * st.scroll_speed);
49 st.distance = glm::clamp(st.distance, st.min_distance, st.max_distance);
50}

References MayaFlux::Kinesis::OrbitState::distance, MayaFlux::Kinesis::OrbitState::max_distance, MayaFlux::Kinesis::OrbitState::min_distance, and MayaFlux::Kinesis::OrbitState::scroll_speed.

Referenced by MayaFlux::bind_orbit_preset().

+ Here is the caller graph for this function: