ovrLayerEyeFov

Struct ovrLayerEyeFov 

Source
#[repr(C)]
pub struct ovrLayerEyeFov { pub _align: [isize; 0], pub Header: ovrLayerHeader, pub ColorTexture: [ovrTextureSwapChain; 2], pub Viewport: [ovrRecti; 2], pub Fov: [ovrFovPort; 2], pub RenderPose: [ovrPosef; 2], pub SensorSampleTime: f64, }
Expand description

Describes a layer that specifies a monoscopic or stereoscopic view.

This is the kind of layer that’s typically used as layer 0 to ovr_SubmitFrame, as it is the kind of layer used to render a 3D stereoscopic view.

Three options exist with respect to mono/stereo texture usage:

  • ColorTexture[0] and ColorTexture[1] contain the left and right stereo renderings, respectively. Viewport[0] and Viewport[1] refer to ColorTexture[0] and ColorTexture[1], respectively.
  • ColorTexture[0] contains both the left and right renderings, ColorTexture[1] is NULL, and Viewport[0] and Viewport[1] refer to sub-rects with ColorTexture[0].
  • ColorTexture[0] contains a single monoscopic rendering, and Viewport[0] and Viewport[1] both refer to that rendering.

see ovrTextureSwapChain, ovr_SubmitFrame

Fields§

§_align: [isize; 0]§Header: ovrLayerHeader

Header.Type must be ovrLayerType_EyeFov.

§ColorTexture: [ovrTextureSwapChain; 2]

ovrTextureSwapChains for the left and right eye respectively.

The second one of which can be NULL for cases described above.

§Viewport: [ovrRecti; 2]

Specifies the ColorTexture sub-rect UV coordinates.

Both Viewport[0] and Viewport[1] must be valid.

§Fov: [ovrFovPort; 2]

The viewport field of view.

§RenderPose: [ovrPosef; 2]

Specifies the position and orientation of each eye view, with the position specified in meters.

RenderPose will typically be the value returned from ovr_CalcEyePoses, but can be different in special cases if a different head pose is used for rendering.

§SensorSampleTime: f64

Specifies the timestamp when the source ovrPosef (used in calculating RenderPose) was sampled from the SDK. Typically retrieved by calling ovr_GetTimeInSeconds around the instant the application calls ovr_GetTrackingState The main purpose for this is to accurately track app tracking latency.

Trait Implementations§

Source§

impl Clone for ovrLayerEyeFov

Source§

fn clone(&self) -> ovrLayerEyeFov

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ovrLayerEyeFov

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Copy for ovrLayerEyeFov

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.