#[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 more