Class XrWorldMeshBufferML

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrWorldMeshBufferML extends Struct<XrWorldMeshBufferML> implements NativeResource

 struct XrWorldMeshBufferML {
     XrStructureType type;
     void * next;
     uint32_t bufferSize;
     void * buffer;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • BUFFERSIZE

      public static final int BUFFERSIZE
      The struct member offsets.
    • BUFFER

      public static final int BUFFER
      The struct member offsets.
  • Constructor Details

    • XrWorldMeshBufferML

      public XrWorldMeshBufferML(ByteBuffer container)
      Creates a XrWorldMeshBufferML 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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<XrWorldMeshBufferML>
    • type

      public int type()
      Returns:
      the value of the type field.
    • next

      public long next()
      Returns:
      the value of the next field.
    • bufferSize

      public int bufferSize()
      Returns:
      the value of the bufferSize field.
    • buffer

      public ByteBuffer buffer()
      Returns:
      a ByteBuffer view of the data pointed to by the buffer field.
    • type

      public XrWorldMeshBufferML type(int value)
      Sets the specified value to the type field.
    • type$Default

      public XrWorldMeshBufferML type$Default()
      Sets the TYPE_WORLD_MESH_BUFFER_ML value to the type field.
    • next

      public XrWorldMeshBufferML next(long value)
      Sets the specified value to the next field.
    • buffer

      public XrWorldMeshBufferML buffer(ByteBuffer value)
      Sets the address of the specified ByteBuffer to the buffer field.
    • set

      public XrWorldMeshBufferML set(int type, long next, ByteBuffer buffer)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

      public static XrWorldMeshBufferML.Buffer create(int capacity)
      Returns a new XrWorldMeshBufferML.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

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

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

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

      public static XrWorldMeshBufferML.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XrWorldMeshBufferML.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static long nnext(long struct)
      Unsafe version of next().
    • nbufferSize

      public static int nbufferSize(long struct)
      Unsafe version of bufferSize().
    • nbuffer

      public static ByteBuffer nbuffer(long struct)
      Unsafe version of buffer.
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, long value)
      Unsafe version of next.
    • nbufferSize

      public static void nbufferSize(long struct, int value)
      Sets the specified value to the bufferSize field of the specified struct.
    • nbuffer

      public static void nbuffer(long struct, ByteBuffer value)
      Unsafe version of buffer.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate