Package org.lwjgl.ovr

Class OVRMatrix4f

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

    public class OVRMatrix4f
    extends Struct
    implements NativeResource
    A 4x4 matrix with float components.

    Member documentation

    • M – the matrix components

    Layout

    
     struct ovrMatrix4f {
         float M[16];
     }
    • Field Detail

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
      • ALIGNOF

        public static final int ALIGNOF
        The struct alignment in bytes.
      • M

        public static final int M
        The struct member offsets.
    • Constructor Detail

      • OVRMatrix4f

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

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

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

        public OVRMatrix4f M​(java.nio.FloatBuffer value)
        Copies the specified FloatBuffer to the M field.
      • M

        public OVRMatrix4f M​(int index,
                             float value)
        Sets the specified value at the specified index of the M field.
      • set

        public OVRMatrix4f set​(OVRMatrix4f src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • create

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

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

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

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

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

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

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

        public static OVRMatrix4f.Buffer callocStack​(int capacity,
                                                     MemoryStack stack)
        Returns a new OVRMatrix4f.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
      • nM

        public static java.nio.FloatBuffer nM​(long struct)
        Unsafe version of M.
      • nM

        public static float nM​(long struct,
                               int index)
        Unsafe version of M.
      • nM

        public static void nM​(long struct,
                              java.nio.FloatBuffer value)
        Unsafe version of M.
      • nM

        public static void nM​(long struct,
                              int index,
                              float value)
        Unsafe version of M.