Package org.lwjgl.ovr

Class OVRLayerCylinder

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class OVRLayerCylinder extends Struct<OVRLayerCylinder> implements NativeResource
Describes a layer of type LayerType_Cylinder which is a single cylinder relative to the recentered origin. 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.

Layout


 struct ovrLayerCylinder {
     ovrLayerHeader Header();
     ovrTextureSwapChain ColorTexture();
     ovrRecti Viewport();
     ovrPosef CylinderPoseCenter();
     float CylinderRadius();
     float CylinderAngle();
     float CylinderAspectRatio();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • COLORTEXTURE

      public static final int COLORTEXTURE
      The struct member offsets.
    • VIEWPORT

      public static final int VIEWPORT
      The struct member offsets.
    • CYLINDERPOSECENTER

      public static final int CYLINDERPOSECENTER
      The struct member offsets.
    • CYLINDERRADIUS

      public static final int CYLINDERRADIUS
      The struct member offsets.
    • CYLINDERANGLE

      public static final int CYLINDERANGLE
      The struct member offsets.
    • CYLINDERASPECTRATIO

      public static final int CYLINDERASPECTRATIO
      The struct member offsets.
  • Constructor Details

    • OVRLayerCylinder

      public OVRLayerCylinder(ByteBuffer container)
      Creates a OVRLayerCylinder instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details