|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API void MayaFlux::bind_viewport_preset | ( | const std::shared_ptr< Core::Window > & | window, |
| const std::shared_ptr< Buffers::RenderProcessor > & | processor, | ||
| ViewportPresetMode | mode = ViewportPresetMode::Fly, |
||
| const std::string & | name = "default" |
||
| ) |
Bind a navigation preset to a window and render processor using default settings.
Convenience wrapper that constructs a default config for the selected mode and forwards to the corresponding bind_*_preset function. To tune the controller, call bind_fly_preset(), bind_orbit_preset(), or bind_pan_zoom_preset() directly.
Registers event handlers under the prefix "vp_<name>_".
Mode defaults: Fly - WASD/QE translate, RMB drag yaw/pitch, scroll dolly, KP ortho snaps Orbit - MMB rotate around focal point, Shift+MMB pan, scroll dolly, KP ortho snaps PanZoom2D - MMB drag pan, scroll zoom, orthographic projection
| window | Window supplying input events |
| processor | RenderProcessor that receives the ViewTransform source |
| mode | Navigation controller to install, defaults to Fly |
| name | Unique prefix for registered events; must be unique per window |
Definition at line 34 of file ViewportPreset.cpp.
References MayaFlux::Journal::API, bind_fly_preset(), bind_orbit_preset(), bind_pan_zoom_preset(), bind_screenspace_preset(), MayaFlux::Journal::EventDispatch, Fly, MF_RT_ERROR, Orbit, PanZoom2D, and Screenspace.
Referenced by bind_viewport_preset().
Here is the call graph for this function:
Here is the caller graph for this function: