|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API void MayaFlux::bind_screenspace_preset | ( | const std::shared_ptr< Core::Window > & | window, |
| const std::shared_ptr< Buffers::RenderProcessor > & | processor, | ||
| const Kinesis::NavigationConfig & | config = {}, |
||
| const Kinesis::ScreenspaceKeyMap & | key_map = {}, |
||
| const std::string & | name = "default" |
||
| ) |
Bind the screenspace navigation controller to a window and render processor.
Drag translates the eye along the camera's local right and up axes derived from the current yaw and pitch. Rotation is never modified. Scroll dollies along the forward vector. Perspective projection is preserved throughout.
To set the initial viewing direction, supply a NavigationConfig with initial_eye and initial_target; yaw and pitch are derived from those on construction exactly as in bind_fly_preset.
| window | Window supplying input events |
| processor | RenderProcessor that receives the ViewTransform source |
| config | Camera tuning parameters; move_speed is unused |
| key_map | Input assignments; defaults to RMB drag |
| name | Unique prefix for registered events; must be unique per window |
Definition at line 318 of file ViewportPreset.cpp.
References MayaFlux::Kinesis::apply_scroll(), MayaFlux::Kinesis::build_view_transform(), MayaFlux::Kinesis::ScreenspaceKeyMap::drag_button, MayaFlux::Kinesis::make_navigation_state(), on_mouse_move(), on_mouse_pressed(), on_mouse_released(), and on_scroll().
Referenced by bind_screenspace_preset(), and bind_viewport_preset().
Here is the call graph for this function:
Here is the caller graph for this function: