Package org.lwjgl.ovr

Class OVRMatrix4f

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


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

    Member documentation

    • M – the matrix components

    Layout

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

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • 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 the 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 or null if the 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
      • 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