Module panel

Source
Expand description

Panel-facing, stable-grab, logical/world conversion, and depth-drag geometry.

Structs§

OpenXrPanelFacingOptions
Facing policy and inclusive pitch bounds in radians.
OpenXrPanelGrabState
Retained state that keeps a grabbed panel point stable while it reorients.
OpenXrPanelGrabUpdate
Result of applying a stable-grab facing update.
PanelDepthUpdate
World grab point after optional controller-origin depth translation.

Enums§

OpenXrPanelFacingMode
Policy controlling whether panel orientation follows the viewer.

Constants§

DEFAULT_PANEL_PITCH_MAX_RAD
Default maximum panel pitch, positive 45 degrees in radians.
DEFAULT_PANEL_PITCH_MIN_RAD
Default minimum panel pitch, negative 45 degrees in radians.

Functions§

apply_facing_stable_grab
Applies the selected facing policy while preserving the grabbed world point.
apply_pointer_depth_delta
Projects pointer-origin movement onto the initial ray axis.
apply_yaw_only_stable_grab
Reorients a dragged panel in yaw while preserving the grabbed world point.
face_user_yaw_only
Computes yaw-only orientation whose local positive Z faces the viewer.
face_user_yaw_pitch_clamped
Computes viewer-facing yaw and pitch while keeping roll at zero.
logical_point_to_panel_local
Maps a top-left-origin logical UI point into panel-local metres.
panel_local_to_world
Transforms a panel-local point into world space using the layer pose.
rotate_vec3
Rotates a vector by an OpenXR quaternion.
vec3_from_xr
Converts an OpenXR vector to the crate’s lightweight vector unchanged.
xr_vec3
Converts the crate’s lightweight vector to an OpenXR vector unchanged.