Trait OpenXrPointerSource

Source
pub trait OpenXrPointerSource {
    // Required method
    fn sample(&self) -> OpenXrPointerSample;
}
Expand description

Host-facing abstraction for streaming XR input samples.

§Examples

use ailloli_ui_openxr::{OpenXrPointerHit, OpenXrPointerSample, OpenXrPointerSource};

let source = OpenXrPointerSample::new(42, OpenXrPointerHit::Miss, false);
assert_eq!(source.sample().source_id, 42);

Required Methods§

Source

fn sample(&self) -> OpenXrPointerSample

Captures the source’s current state for one host polling iteration.

§Examples
use ailloli_ui_openxr::{OpenXrPointerHit, OpenXrPointerSample, OpenXrPointerSource};

let source = OpenXrPointerSample::new(9, OpenXrPointerHit::Miss, false);
let sample: OpenXrPointerSample = source.sample();
assert_eq!(sample.source_id, 9);

Implementors§