Package org.lwjgl.ovr

Class OVRLayerCube

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<OVRLayerCube>
org.lwjgl.ovr.OVRLayerCube
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class OVRLayerCube extends org.lwjgl.system.Struct<OVRLayerCube> implements org.lwjgl.system.NativeResource
Describes a layer of type LayerType_Cube which is a single timewarped cubemap at infinity. When looking down the recentered origin's -Z axis, +X face is left and +Y face is up. Similarly, if headlocked the +X face is left, +Y face is up and -Z face is forward. Note that the coordinate system is left-handed.

LayerFlag_TextureOriginAtBottomLeft flag is not supported by ovrLayerCube.

Layout


 struct ovrLayerCube {
     ovrLayerHeader Header();
     ovrQuatf Orientation();
     ovrTextureSwapChain CubeMapTexture();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ORIENTATION
      The struct member offsets.
    • CUBEMAPTEXTURE

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

    • OVRLayerCube

      public OVRLayerCube(ByteBuffer container)
      Creates a OVRLayerCube 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

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<OVRLayerCube>
    • Header

      public OVRLayerHeader Header()
      Header.Type must be LayerType_Cube
    • Orientation

      public OVRQuatf Orientation()
      orientation of the cube
    • CubeMapTexture

      public long CubeMapTexture()
      contains a single cubemap swapchain (not a stereo pair of swapchains)
    • Header

      public OVRLayerCube Header(OVRLayerHeader value)
      Copies the specified OVRLayerHeader to the Header() field.
    • Header

      public OVRLayerCube Header(Consumer<OVRLayerHeader> consumer)
      Passes the Header() field to the specified Consumer.
    • Orientation

      public OVRLayerCube Orientation(OVRQuatf value)
      Copies the specified OVRQuatf to the Orientation() field.
    • Orientation

      public OVRLayerCube Orientation(Consumer<OVRQuatf> consumer)
      Passes the Orientation() field to the specified Consumer.
    • CubeMapTexture

      public OVRLayerCube CubeMapTexture(long value)
      Sets the specified value to the CubeMapTexture() field.
    • set

      public OVRLayerCube set(OVRLayerHeader Header, OVRQuatf Orientation, long CubeMapTexture)
      Initializes this struct with the specified values.
    • set

      public OVRLayerCube set(OVRLayerCube src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static OVRLayerCube malloc()
      Returns a new OVRLayerCube instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static OVRLayerCube calloc()
      Returns a new OVRLayerCube instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static OVRLayerCube create()
      Returns a new OVRLayerCube instance allocated with BufferUtils.
    • create

      public static OVRLayerCube create(long address)
      Returns a new OVRLayerCube instance for the specified memory address.
    • createSafe

      public static @Nullable OVRLayerCube createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static OVRLayerCube.Buffer malloc(int capacity)
      Returns a new OVRLayerCube.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static OVRLayerCube.Buffer calloc(int capacity)
      Returns a new OVRLayerCube.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static OVRLayerCube.Buffer create(int capacity)
      Returns a new OVRLayerCube.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static OVRLayerCube.Buffer create(long address, int capacity)
      Create a OVRLayerCube.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable OVRLayerCube.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static OVRLayerCube mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRLayerCube callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRLayerCube mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRLayerCube callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRLayerCube.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRLayerCube.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRLayerCube.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRLayerCube.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static OVRLayerCube malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new OVRLayerCube instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static OVRLayerCube calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new OVRLayerCube instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static OVRLayerCube.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OVRLayerCube.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static OVRLayerCube.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OVRLayerCube.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nHeader

      public static OVRLayerHeader nHeader(long struct)
      Unsafe version of Header().
    • nOrientation

      public static OVRQuatf nOrientation(long struct)
      Unsafe version of Orientation().
    • nCubeMapTexture

      public static long nCubeMapTexture(long struct)
      Unsafe version of CubeMapTexture().
    • nHeader

      public static void nHeader(long struct, OVRLayerHeader value)
      Unsafe version of Header.
    • nOrientation

      public static void nOrientation(long struct, OVRQuatf value)
      Unsafe version of Orientation.
    • nCubeMapTexture

      public static void nCubeMapTexture(long struct, long value)
      Unsafe version of CubeMapTexture.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate