Package org.lwjgl.ovr

Class OVRLayerEyeFov

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

public class OVRLayerEyeFov extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Describes a layer that specifies a monoscopic or stereoscopic view. This is the kind of layer that's typically used as layer 0 to SubmitFrame, as it is the kind of layer used to render a 3D stereoscopic view.

Layout


 struct ovrLayerEyeFov {
     ovrLayerHeader Header();
     ovrTextureSwapChain ColorTexture()[ovrEye_Count];
     ovrRecti Viewport()[ovrEye_Count];
     ovrFovPort Fov()[ovrEye_Count];
     ovrPosef RenderPose()[ovrEye_Count];
     double SensorSampleTime();
 }
  • 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.
    • FOV

      public static final int FOV
      The struct member offsets.
    • RENDERPOSE

      public static final int RENDERPOSE
      The struct member offsets.
    • SENSORSAMPLETIME

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

    • OVRLayerEyeFov

      public OVRLayerEyeFov(ByteBuffer container)
      Creates a OVRLayerEyeFov 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
    • Header

      public OVRLayerHeader Header()
      Header.Type must be LayerType_EyeFov
    • ColorTexture

      public org.lwjgl.PointerBuffer ColorTexture()
      ovrTextureSwapChains for the left and right eye respectively. The second one of which can be NULL.
    • ColorTexture

      public long ColorTexture(int index)
      ovrTextureSwapChains for the left and right eye respectively. The second one of which can be NULL.
    • Viewport

      public OVRRecti.Buffer Viewport()
      specifies the ColorTexture sub-rect UV coordinates. Both Viewport[0] and Viewport[1] must be valid.
    • Viewport

      public OVRRecti Viewport(int index)
      specifies the ColorTexture sub-rect UV coordinates. Both Viewport[0] and Viewport[1] must be valid.
    • Fov

      public OVRFovPort.Buffer Fov()
      the viewport field of view
    • Fov

      public OVRFovPort Fov(int index)
      the viewport field of view
    • RenderPose

      public OVRPosef.Buffer RenderPose()
      specifies the position and orientation of each eye view, with the position specified in meters. RenderPose will typically be the value returned from _CalcEyePoses, but can be different in special cases if a different head pose is used for rendering.
    • RenderPose

      public OVRPosef RenderPose(int index)
      specifies the position and orientation of each eye view, with the position specified in meters. RenderPose will typically be the value returned from _CalcEyePoses, but can be different in special cases if a different head pose is used for rendering.
    • SensorSampleTime

      public double SensorSampleTime()
      specifies the timestamp when the source OVRPosef (used in calculating RenderPose) was sampled from the SDK. Typically retrieved by calling GetTimeInSeconds around the instant the application calls GetTrackingState. The main purpose for this is to accurately track app tracking latency.
    • Header

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

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

      public OVRLayerEyeFov ColorTexture(org.lwjgl.PointerBuffer value)
      Copies the specified PointerBuffer to the ColorTexture() field.
    • ColorTexture

      public OVRLayerEyeFov ColorTexture(int index, long value)
      Sets the specified value at the specified index of the ColorTexture() field.
    • Viewport

      public OVRLayerEyeFov Viewport(OVRRecti.Buffer value)
      Copies the specified OVRRecti.Buffer to the Viewport() field.
    • Viewport

      public OVRLayerEyeFov Viewport(int index, OVRRecti value)
      Copies the specified OVRRecti at the specified index of the Viewport() field.
    • Viewport

      public OVRLayerEyeFov Viewport(Consumer<OVRRecti.Buffer> consumer)
      Passes the Viewport() field to the specified Consumer.
    • Viewport

      public OVRLayerEyeFov Viewport(int index, Consumer<OVRRecti> consumer)
      Passes the element at index of the Viewport() field to the specified Consumer.
    • Fov

      public OVRLayerEyeFov Fov(OVRFovPort.Buffer value)
      Copies the specified OVRFovPort.Buffer to the Fov() field.
    • Fov

      public OVRLayerEyeFov Fov(int index, OVRFovPort value)
      Copies the specified OVRFovPort at the specified index of the Fov() field.
    • Fov

      public OVRLayerEyeFov Fov(Consumer<OVRFovPort.Buffer> consumer)
      Passes the Fov() field to the specified Consumer.
    • Fov

      public OVRLayerEyeFov Fov(int index, Consumer<OVRFovPort> consumer)
      Passes the element at index of the Fov() field to the specified Consumer.
    • RenderPose

      public OVRLayerEyeFov RenderPose(OVRPosef.Buffer value)
      Copies the specified OVRPosef.Buffer to the RenderPose() field.
    • RenderPose

      public OVRLayerEyeFov RenderPose(int index, OVRPosef value)
      Copies the specified OVRPosef at the specified index of the RenderPose() field.
    • RenderPose

      public OVRLayerEyeFov RenderPose(Consumer<OVRPosef.Buffer> consumer)
      Passes the RenderPose() field to the specified Consumer.
    • RenderPose

      public OVRLayerEyeFov RenderPose(int index, Consumer<OVRPosef> consumer)
      Passes the element at index of the RenderPose() field to the specified Consumer.
    • SensorSampleTime

      public OVRLayerEyeFov SensorSampleTime(double value)
      Sets the specified value to the SensorSampleTime() field.
    • set

      public OVRLayerEyeFov set(OVRLayerHeader Header, org.lwjgl.PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static OVRLayerEyeFov.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 OVRLayerEyeFov.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 OVRLayerEyeFov malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new OVRLayerEyeFov instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

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

      public static OVRLayerEyeFov.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OVRLayerEyeFov.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().
    • nColorTexture

      public static org.lwjgl.PointerBuffer nColorTexture(long struct)
      Unsafe version of ColorTexture().
    • nColorTexture

      public static long nColorTexture(long struct, int index)
      Unsafe version of ColorTexture.
    • nViewport

      public static OVRRecti.Buffer nViewport(long struct)
      Unsafe version of Viewport().
    • nViewport

      public static OVRRecti nViewport(long struct, int index)
      Unsafe version of Viewport.
    • nFov

      public static OVRFovPort.Buffer nFov(long struct)
      Unsafe version of Fov().
    • nFov

      public static OVRFovPort nFov(long struct, int index)
      Unsafe version of Fov.
    • nRenderPose

      public static OVRPosef.Buffer nRenderPose(long struct)
      Unsafe version of RenderPose().
    • nRenderPose

      public static OVRPosef nRenderPose(long struct, int index)
      Unsafe version of RenderPose.
    • nSensorSampleTime

      public static double nSensorSampleTime(long struct)
      Unsafe version of SensorSampleTime().
    • nHeader

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

      public static void nColorTexture(long struct, org.lwjgl.PointerBuffer value)
      Unsafe version of ColorTexture.
    • nColorTexture

      public static void nColorTexture(long struct, int index, long value)
      Unsafe version of ColorTexture.
    • nViewport

      public static void nViewport(long struct, OVRRecti.Buffer value)
      Unsafe version of Viewport.
    • nViewport

      public static void nViewport(long struct, int index, OVRRecti value)
      Unsafe version of Viewport.
    • nFov

      public static void nFov(long struct, OVRFovPort.Buffer value)
      Unsafe version of Fov.
    • nFov

      public static void nFov(long struct, int index, OVRFovPort value)
      Unsafe version of Fov.
    • nRenderPose

      public static void nRenderPose(long struct, OVRPosef.Buffer value)
      Unsafe version of RenderPose.
    • nRenderPose

      public static void nRenderPose(long struct, int index, OVRPosef value)
      Unsafe version of RenderPose.
    • nSensorSampleTime

      public static void nSensorSampleTime(long struct, double value)
      Unsafe version of SensorSampleTime.
    • validate

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