#[repr(u32)]pub enum TrackState {
Lost = 0,
Inferred = 1,
Known = 2,
}
Expand description
This is the tracking state of a sensory input in the world, like a controller’s position sensor, or a QR code identified by a tracking system. https://stereokit.net/Pages/StereoKit/TrackState.html
see also Controller
§Examples
use stereokit_rust::system::{TrackState, Input, Handed};
let controller = Input::controller(Handed::Right);
assert_eq!(controller.tracked_pos, TrackState::Lost);
assert_ne!(controller.tracked_pos, TrackState::Inferred);
assert_ne!(controller.tracked_pos, TrackState::Known);
assert_eq!(controller.tracked_rot, TrackState::Lost);
assert_ne!(controller.tracked_rot, TrackState::Inferred);
assert_ne!(controller.tracked_rot, TrackState::Known);
Variants§
Lost = 0
The system has no current knowledge about the state of this input. It may be out of visibility, or possibly just disconnected.
Inferred = 1
The system doesn’t know for sure where this is, but it has an educated guess that may be inferred from previous data at a lower quality. For example, a controller may still have accelerometer data after going out of view, which can still be accurate for a short time after losing optical tracking.
Known = 2
The system actively knows where this input is. Within the constraints of the relevant hardware’s capabilities, this is as accurate as it gets!
Trait Implementations§
Source§impl Clone for TrackState
impl Clone for TrackState
Source§fn clone(&self) -> TrackState
fn clone(&self) -> TrackState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TrackState
impl Debug for TrackState
Source§impl PartialEq for TrackState
impl PartialEq for TrackState
impl Copy for TrackState
impl Eq for TrackState
impl StructuralPartialEq for TrackState
Auto Trait Implementations§
impl Freeze for TrackState
impl RefUnwindSafe for TrackState
impl Send for TrackState
impl Sync for TrackState
impl Unpin for TrackState
impl UnwindSafe for TrackState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.