Libovr 1.43 Reference Guide

ovrLayerCylinder Struct Reference

Describes a layer of type ovrLayerType_Cylinder which is a single cylinder relative to the recentered origin.

Data Fields

ovrLayerHeader
Header ( )
Header.Type must be ovrLayerType_Cylinder.
ovrTextureSwapChain
Contains a single image, never with any stereo view.
ovrRecti
Specifies the ColorTexture sub-rect UV coordinates.
ovrPosef
Specifies the orientation and position of the center point of a cylinder layer type.
float
Radius of the cylinder in meters.
float
Angle in radians.
float
Custom aspect ratio presumably set based on 'Viewport'.

Detailed Description

This type of layer represents a single object placed in the world and not a stereo view of the world itself.
           -Z                                       +Y
    U=0  +--+--+  U=1
     +---+  |  +---+            +-----------------+  - V=0
  +--+ \    |    / +--+         |                 |  |
+-+     \       /     +-+       |                 |  |
++ \ A / ++ | | | ++ ---/ ++ | | | | \ / | | +X | | +----------C---R---+ +X +-----C-----+ | < Height (+Y is out of screen) | | | | | | R = Radius | | | A = Angle (0,2*Pi) | | | C = CylinderPoseCenter | | | U/V = UV Coordinates +--------------+ - V=1
An identity CylinderPoseCenter places the center of the cylinder at the recentered origin unless the headlocked flag is set.
Does not utilize HmdSpaceToWorldScaleInMeters. If necessary, adjust translation and radius.
Note:
Only the interior surface of the cylinder is visible. Use cylinder layers when the user cannot leave the extents of the cylinder. Artifacts may appear when viewing the cylinder's exterior surface. Additionally, while the interface supports an Angle that ranges from [0,2*Pi] the angle should remain less than 1.9*PI to avoid artifacts where the cylinder edges converge.
See Also:
ovrTextureSwapChain, ovr_SubmitFrame

Field Documentation

ovrLayerHeader ovrLayerCylinder::Header ( )
Header.Type must be ovrLayerType_Cylinder.
ovrTextureSwapChain ovrLayerCylinder::ColorTexture ( )
Contains a single image, never with any stereo view.
ovrRecti ovrLayerCylinder::Viewport ( )
Specifies the ColorTexture sub-rect UV coordinates.
ovrPosef ovrLayerCylinder::CylinderPoseCenter ( )
Specifies the orientation and position of the center point of a cylinder layer type.
The position is in real-world meters not the application's virtual world, but the physical world the user is in. It is relative to the "zero" position set by ovr_RecenterTrackingOrigin unless the ovrLayerFlag_HeadLocked flag is used.
float ovrLayerCylinder::CylinderRadius ( )
Radius of the cylinder in meters.
float ovrLayerCylinder::CylinderAngle ( )
Angle in radians.
Range is from 0 to 2*Pi exclusive covering the entire cylinder (see diagram and note above).
float ovrLayerCylinder::CylinderAspectRatio ( )
Custom aspect ratio presumably set based on 'Viewport'.
Used to calculate the height of the cylinder based on the arc-length (CylinderAngle) and radius (CylinderRadius) given above. The height of the cylinder is given by: height = (CylinderRadius * CylinderAngle) / CylinderAspectRatio. Aspect ratio is width / height.
The documentation for this struct was generated from the following file: Include/OVR_CAPI.h