pub fn apply_pointer_depth_delta(
grab_world: Vec3,
depth_axis: Option<Vec3>,
last_origin: Option<Vec3>,
current_origin: Option<Vec3>,
) -> PanelDepthUpdateExpand description
Projects pointer-origin movement onto the initial ray axis.
The signed projection translates grab_world along the normalized axis.
Missing/near-zero axes or either missing origin return an unchanged result.
depth_applied is true only above 1e-6 metres.
ยงExamples
use ailloli_ui_openxr::openxr_runtime::apply_pointer_depth_delta;
use ailloli_ui_openxr::math::Vec3;
let update = apply_pointer_depth_delta(Vec3::new(0.0, 0.0, -2.0), Some(Vec3::new(0.0, 0.0, -1.0)), Some(Vec3::default()), Some(Vec3::new(0.0, 0.0, -0.25)));
assert_eq!(update.adjusted_grab_world, Vec3::new(0.0, 0.0, -2.25));