#[repr(C)]pub struct ovrLayerEyeMatrix {
pub _align: [isize; 0],
pub Header: ovrLayerHeader,
pub ColorTexture: [ovrTextureSwapChain; 2],
pub Viewport: [ovrRecti; 2],
pub RenderPose: [ovrPosef; 2],
pub Matrix: [ovrMatrix4f; 2],
pub SensorSampleTime: f64,
}Expand description
Describes a layer that specifies a monoscopic or stereoscopic view.
This uses a direct 3x4 matrix to map from view space to the UV coordinates.
It is essentially the same thing as ovrLayerEyeFov but using a much
lower level. This is mainly to provide compatibility with specific apps.
Unless the application really requires this flexibility, it is usually better
to use ovrLayerEyeFov.
Three options exist with respect to mono/stereo texture usage:
ColorTexture[0]andColorTexture[1]contain the left and right stereo renderings, respectively.Viewport[0]andViewport[1]refer toColorTexture[0]andColorTexture[1], respectively.ColorTexture[0]contains both the left and right renderings,ColorTexture[1]is NULL, andViewport[0]andViewport[1]refer to sub-rects withColorTexture[0].ColorTexture[0]contains a single monoscopic rendering, andViewport[0]andViewport[1]both refer to that rendering.
Fields§
§_align: [isize; 0]§Header: ovrLayerHeaderHeader.Type must be ovrLayerType_EyeMatrix.
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.
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.
Matrix: [ovrMatrix4f; 2]Specifies the mapping from a view-space vector to a UV coordinate on the textures given above.
P = (x,y,z,1)*Matrix TexU = P.x/P.z TexV = P.y/P.z
SensorSampleTime: f64Specifies 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 ovrLayerEyeMatrix
impl Clone for ovrLayerEyeMatrix
Source§fn clone(&self) -> ovrLayerEyeMatrix
fn clone(&self) -> ovrLayerEyeMatrix
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more