Class DistortionCoordinates

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

    public class DistortionCoordinates
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Used to return the post-distortion UVs for each color channel.

    UVs range from 0 to 1 with 0,0 in the upper left corner of the source render target. The 0,0 to 1,1 range covers a single eye.

    Layout

    
     struct DistortionCoordinates_t {
         float rfRed()[2];
         float rfGreen()[2];
         float rfBlue()[2];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • RFRED, RFGREEN, RFBLUE

        The struct member offsets.
    • Constructor Detail

      • DistortionCoordinates

        public DistortionCoordinates​(java.nio.ByteBuffer container)
        Creates a DistortionCoordinates 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
      • rfRed

        public java.nio.FloatBuffer rfRed()
        
        public float rfRed​(int index)
        
        the UVs for the red channel
      • rfGreen

        public java.nio.FloatBuffer rfGreen()
        
        public float rfGreen​(int index)
        
        the UVs for the green channel
      • rfBlue

        public java.nio.FloatBuffer rfBlue()
        
        public float rfBlue​(int index)
        
        the UVs for the blue channel
      • malloc

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

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

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

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

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

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

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

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

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

        public static java.nio.FloatBuffer nrfRed​(long struct)
        Unsafe version of rfRed().
      • nrfRed

        public static float nrfRed​(long struct,
                                   int index)
        Unsafe version of rfRed.
      • nrfGreen

        public static java.nio.FloatBuffer nrfGreen​(long struct)
        Unsafe version of rfGreen().
      • nrfGreen

        public static float nrfGreen​(long struct,
                                     int index)
        Unsafe version of rfGreen.
      • nrfBlue

        public static java.nio.FloatBuffer nrfBlue​(long struct)
        Unsafe version of rfBlue().
      • nrfBlue

        public static float nrfBlue​(long struct,
                                    int index)
        Unsafe version of rfBlue.