Class DistortionCoordinates

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

    public class DistortionCoordinates
    extends Struct
    implements 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.

    Member documentation

    • rfRed[2] – the UVs for the red channel
    • rfGreen[2] – the UVs for the green channel
    • rfBlue[2] – the UVs for the blue channel

    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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • rfRed

        public java.nio.FloatBuffer rfRed()
        Returns a FloatBuffer view of the rfRed field.
      • rfRed

        public float rfRed​(int index)
        Returns the value at the specified index of the rfRed field.
      • rfGreen

        public java.nio.FloatBuffer rfGreen()
        Returns a FloatBuffer view of the rfGreen field.
      • rfGreen

        public float rfGreen​(int index)
        Returns the value at the specified index of the rfGreen field.
      • rfBlue

        public java.nio.FloatBuffer rfBlue()
        Returns a FloatBuffer view of the rfBlue field.
      • rfBlue

        public float rfBlue​(int index)
        Returns the value at the specified index of the rfBlue field.
      • 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​(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.
      • callocStack

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

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

        public static DistortionCoordinates callocStack​(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
      • 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.