Class HmdQuad

    • Field Detail

      • SIZEOF

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

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

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

      • HmdQuad

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

        public HmdVector3 vCorners​(int index)
        Returns a HmdVector3 view of the struct at the specified index of the vCorners field.
      • vCorners

        public HmdQuad vCorners​(int index,
                                HmdVector3 value)
        Copies the specified HmdVector3 at the specified index of the vCorners field.
      • set

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

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

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

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

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

        public static HmdQuad.Buffer malloc​(int capacity)
        Returns a new HmdQuad.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static HmdQuad.Buffer calloc​(int capacity)
        Returns a new HmdQuad.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

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

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

        public static HmdQuad mallocStack()
        Returns a new HmdQuad instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

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

        public static HmdQuad.Buffer mallocStack​(int capacity)
        Returns a new HmdQuad.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

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

        public static HmdQuad.Buffer mallocStack​(int capacity,
                                                 MemoryStack stack)
        Returns a new HmdQuad.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

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

        public static HmdVector3 nvCorners​(long struct,
                                           int index)
        Unsafe version of vCorners.
      • nvCorners

        public static void nvCorners​(long struct,
                                     int index,
                                     HmdVector3 value)
        Unsafe version of vCorners.