Package org.lwjgl.ovr

Class OVREyeRenderDesc

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class OVREyeRenderDesc
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    rendering information for each eye. Computed by either GetRenderDesc based on the specified FOV. Note that the rendering viewport is not included here as it can be specified separately and modified per frame by passing different viewport values in the layer structure.

    Member documentation

    • Eye – the eye index this instance corresponds to. One of:
      Eye_LeftEye_Right
    • Fov – the field of view
    • DistortedViewport – distortion viewport
    • PixelsPerTanAngleAtCenter – wow many display pixels will fit in tan(angle) = 1
    • HmdToEyePose – transform of eye from the HMD center, in meters

    Layout

    
     struct ovrEyeRenderDesc {
         ovrEyeType Eye;
         ovrFovPort Fov;
         ovrRecti DistortedViewport;
         ovrVector2f PixelsPerTanAngleAtCenter;
         ovrPosef HmdToEyePose;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • EYE, FOV, DISTORTEDVIEWPORT, PIXELSPERTANANGLEATCENTER, HMDTOEYEPOSE

        The struct member offsets.
    • Constructor Detail

      • OVREyeRenderDesc

        public OVREyeRenderDesc​(java.nio.ByteBuffer container)
        Creates a OVREyeRenderDesc 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • Eye

        public int Eye()
        Returns the value of the Eye field.
      • DistortedViewport

        public OVRRecti DistortedViewport()
        Returns a OVRRecti view of the DistortedViewport field.
      • PixelsPerTanAngleAtCenter

        public OVRVector2f PixelsPerTanAngleAtCenter()
        Returns a OVRVector2f view of the PixelsPerTanAngleAtCenter field.
      • HmdToEyePose

        public OVRPosef HmdToEyePose()
        Returns a OVRPosef view of the HmdToEyePose field.
      • malloc

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

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

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

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

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

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

        public static OVREyeRenderDesc mallocStack()
        Returns a new OVREyeRenderDesc instance allocated on the thread-local MemoryStack.
      • callocStack

        public static OVREyeRenderDesc callocStack()
        Returns a new OVREyeRenderDesc instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static OVREyeRenderDesc mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new OVREyeRenderDesc instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

        public static OVREyeRenderDesc.Buffer callocStack​(int capacity)
        Returns a new OVREyeRenderDesc.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

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

        public static int nEye​(long struct)
        Unsafe version of Eye().
      • nFov

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