pub struct PointHit {
pub point: Point,
pub depth: Option<f32>,
}Expand description
Absolute hit result for one XR pointer source.
§Examples
use ailloli_ui_core::Point;
use ailloli_ui_openxr::PointHit;
let hit = PointHit::new(Point::new(12.0, 8.0), Some(0.75));
assert_eq!(hit.point, Point::new(12.0, 8.0));
assert_eq!(hit.depth, Some(0.75));Fields§
§point: PointIntersection point in logical panel space.
depth: Option<f32>Optional depth/range value for debug overlays (None for forward ray tests).
Implementations§
Source§impl PointHit
impl PointHit
Sourcepub fn new(point: Point, depth: Option<f32>) -> Self
pub fn new(point: Point, depth: Option<f32>) -> Self
Creates a logical-space hit with optional host-defined depth.
depth is carried through unchanged; None means that the source did
not report a range value.
§Examples
use ailloli_ui_core::Point;
use ailloli_ui_openxr::PointHit;
let hit = PointHit::new(Point::new(1.0, 2.0), None);
assert_eq!(hit.depth, None);Trait Implementations§
impl Copy for PointHit
impl StructuralPartialEq for PointHit
Auto Trait Implementations§
impl Freeze for PointHit
impl RefUnwindSafe for PointHit
impl Send for PointHit
impl Sync for PointHit
impl Unpin for PointHit
impl UnwindSafe for PointHit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more