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.

    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()
        the eye index this instance corresponds to. One of:
        Eye_LeftEye_Right
      • DistortedViewport

        public OVRRecti DistortedViewport()
        distortion viewport
      • PixelsPerTanAngleAtCenter

        public OVRVector2f PixelsPerTanAngleAtCenter()
        wow many display pixels will fit in tan(angle) = 1
      • HmdToEyePose

        public OVRPosef HmdToEyePose()
        transform of eye from the HMD center, in meters
      • 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

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

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

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

        public static OVREyeRenderDesc calloc​(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
      • malloc

        public static OVREyeRenderDesc.Buffer malloc​(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
      • calloc

        public static OVREyeRenderDesc.Buffer calloc​(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().