pub struct OpenXrPointerFrame {
pub samples: Vec<OpenXrPointerSample>,
}Expand description
Input frame emitted by host bridge for one poll iteration.
An empty vector is a valid frame and emits no events. Omitted source IDs do
not implicitly clear mapper state; call OpenXrInputMapper::clear_source
when a source is permanently removed.
§Examples
use ailloli_ui_openxr::OpenXrPointerFrame;
let frame = OpenXrPointerFrame::new(Vec::new());
assert!(frame.samples.is_empty());Fields§
§samples: Vec<OpenXrPointerSample>Samples to process in order for this polling iteration.
Implementations§
Source§impl OpenXrPointerFrame
impl OpenXrPointerFrame
Sourcepub fn new(samples: Vec<OpenXrPointerSample>) -> Self
pub fn new(samples: Vec<OpenXrPointerSample>) -> Self
Wraps the ordered set of samples for one frame.
§Examples
use ailloli_ui_openxr::{OpenXrPointerFrame, OpenXrPointerHit, OpenXrPointerSample};
let frame = OpenXrPointerFrame::new(vec![OpenXrPointerSample::new(
2,
OpenXrPointerHit::Miss,
false,
)]);
assert_eq!(frame.samples.len(), 1);Trait Implementations§
Source§impl Clone for OpenXrPointerFrame
impl Clone for OpenXrPointerFrame
Source§fn clone(&self) -> OpenXrPointerFrame
fn clone(&self) -> OpenXrPointerFrame
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 OpenXrPointerFrame
impl Debug for OpenXrPointerFrame
Source§impl Default for OpenXrPointerFrame
impl Default for OpenXrPointerFrame
Source§fn default() -> OpenXrPointerFrame
fn default() -> OpenXrPointerFrame
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpenXrPointerFrame
impl RefUnwindSafe for OpenXrPointerFrame
impl Send for OpenXrPointerFrame
impl Sync for OpenXrPointerFrame
impl Unpin for OpenXrPointerFrame
impl UnwindSafe for OpenXrPointerFrame
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().