pub struct VitureSceneClient { /* private fields */ }Expand description
Native Viture client that retains one content Scene across device-rate frames.
Rich profiles reuse the shared clamp-aware spatial reprojector. Display-only
profiles return the retained scene/spatial packet unchanged for mirroring.
Implementations§
Source§impl VitureSceneClient
impl VitureSceneClient
Sourcepub fn new(caps: &SurfaceCaps, max_predict_ms: u64) -> Result<Self>
pub fn new(caps: &SurfaceCaps, max_predict_ms: u64) -> Result<Self>
Builds a client from open surface capabilities.
§Errors
Returns an error unless the caps describe stereo 6DoF or display-only glasses with valid per-eye dimensions.
Sourcepub fn receive(&mut self, scene: Expr) -> Result<()>
pub fn receive(&mut self, scene: Expr) -> Result<()>
Retains a new content-rate scene/spatial packet.
§Errors
Returns an error when scene is not a spatial Scene root.
Sourcepub fn frame(&self, pose: &PoseView) -> Result<Rc<Expr>>
pub fn frame(&self, pose: &PoseView) -> Result<Rc<Expr>>
Adapts the retained Scene for one local pose sample.
§Errors
Returns an error before the first content receipt or when reprojection rejects malformed spatial content.
Sourcepub fn content_receipts(&self) -> u64
pub fn content_receipts(&self) -> u64
Returns the number of content-rate Scene packets received.
Sourcepub fn viewport(&self) -> GlassesViewport
pub fn viewport(&self) -> GlassesViewport
Returns the side-by-side viewport dimensions.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for VitureSceneClient
impl !RefUnwindSafe for VitureSceneClient
impl !Send for VitureSceneClient
impl !Sync for VitureSceneClient
impl Unpin for VitureSceneClient
impl UnsafeUnpin for VitureSceneClient
impl UnwindSafe for VitureSceneClient
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