pub enum OpenXrPointerHit {
Miss,
Hit(PointHit),
}Expand description
Hit state used by source/mappers.
§Examples
use ailloli_ui_openxr::OpenXrPointerHit;
assert_eq!(OpenXrPointerHit::Miss.point(), None);Variants§
Miss
Pointer does not currently intersect target UI.
Hit(PointHit)
Pointer intersects UI and can be routed with a logical 2D point.
Implementations§
Source§impl OpenXrPointerHit
impl OpenXrPointerHit
Sourcepub fn point(self) -> Option<Point>
pub fn point(self) -> Option<Point>
Returns the logical hit point, or None for Self::Miss.
§Examples
use ailloli_ui_core::Point;
use ailloli_ui_openxr::{OpenXrPointerHit, PointHit};
let hit = OpenXrPointerHit::Hit(PointHit::new(Point::new(3.0, 4.0), None));
assert_eq!(hit.point(), Some(Point::new(3.0, 4.0)));Trait Implementations§
Source§impl Clone for OpenXrPointerHit
impl Clone for OpenXrPointerHit
Source§fn clone(&self) -> OpenXrPointerHit
fn clone(&self) -> OpenXrPointerHit
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenXrPointerHit
impl Debug for OpenXrPointerHit
Source§impl PartialEq for OpenXrPointerHit
impl PartialEq for OpenXrPointerHit
impl Copy for OpenXrPointerHit
impl StructuralPartialEq for OpenXrPointerHit
Auto Trait Implementations§
impl Freeze for OpenXrPointerHit
impl RefUnwindSafe for OpenXrPointerHit
impl Send for OpenXrPointerHit
impl Sync for OpenXrPointerHit
impl Unpin for OpenXrPointerHit
impl UnwindSafe for OpenXrPointerHit
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