#[non_exhaustive]pub enum Action {
Show 16 variants
Orbit,
Pan,
Zoom,
FocusObject,
ResetView,
EnterFlyMode,
FlyForward,
FlyBackward,
FlyLeft,
FlyRight,
FlyUp,
FlyDown,
FlySpeedBoost,
Confirm,
Cancel,
Custom(u32),
}Expand description
Semantic actions that can be triggered by user input.
Actions are decoupled from their physical triggers (keys/mouse buttons),
so bindings can be remapped and the same action can be reached through
different triggers depending on context. The named variants are the ones
the library’s controllers act on, plus Confirm and
Cancel for any modal tool; an application or a tool crate
binds its own actions to Action::Custom.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Orbit
Rotate the camera around the orbit centre (arcball).
Pan
Translate the orbit centre in the camera plane.
Zoom
Zoom in/out by adjusting camera distance.
FocusObject
Frame the selected object (zoom-to-fit).
ResetView
Reset camera to the default view.
EnterFlyMode
Enter first-person fly-through mode.
FlyForward
Move forward in fly mode.
FlyBackward
Move backward in fly mode.
FlyLeft
Strafe left in fly mode.
FlyRight
Strafe right in fly mode.
FlyUp
Move up in fly mode.
FlyDown
Move down in fly mode.
FlySpeedBoost
Hold to increase fly-mode movement speed.
Confirm
Confirm the current operation (Enter / left-click).
Cancel
Cancel the current operation (Escape / right-click).
Custom(u32)
An action the application defines. The library binds nothing to it and
never acts on it; the resolver reports it like any other action, so an
application shortcut gets the same gestures, modifiers and keyboard
ownership as a built-in one. Give each shortcut its own constant.
Library crates take values from 0x1000_0000 upwards; an application
keeps the range below.