pub struct PoseView {
pub sample_seq: u64,
pub age_ms: u64,
pub predict_ns: u64,
pub translation_m: [f64; 3],
pub yaw_deg: f64,
pub pitch_deg: f64,
pub roll_deg: f64,
pub inter_eye_m: f64,
}Expand description
A pose-derived view sample for one device-rate reprojector step.
This type is intentionally not part of the content encoder. It is local
adapter state: the encoded scene/spatial packet can be reused while fresh
samples update the stereo eye views.
Fields§
§sample_seq: u64Monotone sample sequence number.
age_ms: u64Age of the sample at the current adapter tick.
predict_ns: u64Requested prediction lead in nanoseconds.
translation_m: [f64; 3]Head translation in meters relative to the encoded content origin.
yaw_deg: f64Yaw angle in degrees.
pitch_deg: f64Pitch angle in degrees.
roll_deg: f64Roll angle in degrees.
inter_eye_m: f64Distance between eyes in meters.
Implementations§
Source§impl PoseView
impl PoseView
Sourcepub fn with_timing(self, age_ms: u64, predict_ns: u64) -> Self
pub fn with_timing(self, age_ms: u64, predict_ns: u64) -> Self
Returns this sample with a different age and prediction lead.
Sourcepub fn with_translation(self, translation_m: [f64; 3]) -> Self
pub fn with_translation(self, translation_m: [f64; 3]) -> Self
Returns this sample translated in meters.
Sourcepub fn with_angles(self, yaw_deg: f64, pitch_deg: f64, roll_deg: f64) -> Self
pub fn with_angles(self, yaw_deg: f64, pitch_deg: f64, roll_deg: f64) -> Self
Returns this sample with yaw, pitch, and roll in degrees.
Sourcepub fn clamped_predict_ms(&self, max_predict_ms: u64) -> u64
pub fn clamped_predict_ms(&self, max_predict_ms: u64) -> u64
Clamps the prediction lead to max_predict_ms.
Trait Implementations§
impl StructuralPartialEq for PoseView
Auto Trait Implementations§
impl Freeze for PoseView
impl RefUnwindSafe for PoseView
impl Send for PoseView
impl Sync for PoseView
impl Unpin for PoseView
impl UnsafeUnpin for PoseView
impl UnwindSafe for PoseView
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