Skip to main content

VitureSceneClient

Struct VitureSceneClient 

Source
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

Source

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.

Source

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.

Source

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.

Source

pub fn content_receipts(&self) -> u64

Returns the number of content-rate Scene packets received.

Source

pub fn viewport(&self) -> GlassesViewport

Returns the side-by-side viewport dimensions.

Source

pub fn is_mirror(&self) -> bool

Returns whether this client is using display-only mirroring.

Trait Implementations§

Source§

impl Debug for VitureSceneClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.