Class XrWorldMeshBlockML

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrWorldMeshBlockML extends Struct<XrWorldMeshBlockML> implements NativeResource

 struct XrWorldMeshBlockML {
     XrStructureType type;
     void * next;
     {@link XrUuidEXT XrUuidEXT} uuid;
     XrWorldMeshBlockResultML blockResult;
     XrWorldMeshDetectorLodML lod;
     XrWorldMeshDetectorFlagsML flags;
     uint32_t indexCount;
     uint16_t * indexBuffer;
     uint32_t vertexCount;
     {@link XrVector3f XrVector3f} * vertexBuffer;
     uint32_t normalCount;
     {@link XrVector3f XrVector3f} * normalBuffer;
     uint32_t confidenceCount;
     float * confidenceBuffer;
 }
  • 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.
    • UUID

      public static final int UUID
      The struct member offsets.
    • BLOCKRESULT

      public static final int BLOCKRESULT
      The struct member offsets.
    • LOD

      public static final int LOD
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • INDEXCOUNT

      public static final int INDEXCOUNT
      The struct member offsets.
    • INDEXBUFFER

      public static final int INDEXBUFFER
      The struct member offsets.
    • VERTEXCOUNT

      public static final int VERTEXCOUNT
      The struct member offsets.
    • VERTEXBUFFER

      public static final int VERTEXBUFFER
      The struct member offsets.
    • NORMALCOUNT

      public static final int NORMALCOUNT
      The struct member offsets.
    • NORMALBUFFER

      public static final int NORMALBUFFER
      The struct member offsets.
    • CONFIDENCECOUNT

      public static final int CONFIDENCECOUNT
      The struct member offsets.
    • CONFIDENCEBUFFER

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

    • XrWorldMeshBlockML

      public XrWorldMeshBlockML(ByteBuffer container)
      Creates a XrWorldMeshBlockML 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<XrWorldMeshBlockML>
    • type

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

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

      public XrUuidEXT uuid()
      Returns:
      a XrUuidEXT view of the uuid field.
    • blockResult

      public int blockResult()
      Returns:
      the value of the blockResult field.
    • lod

      public int lod()
      Returns:
      the value of the lod field.
    • flags

      public long flags()
      Returns:
      the value of the flags field.
    • indexCount

      public int indexCount()
      Returns:
      the value of the indexCount field.
    • indexBuffer

      public ShortBuffer indexBuffer()
      Returns:
      a ShortBuffer view of the data pointed to by the indexBuffer field.
    • vertexCount

      public int vertexCount()
      Returns:
      the value of the vertexCount field.
    • vertexBuffer

      public XrVector3f.Buffer vertexBuffer()
      Returns:
      a XrVector3f.Buffer view of the struct array pointed to by the vertexBuffer field.
    • normalCount

      public int normalCount()
      Returns:
      the value of the normalCount field.
    • normalBuffer

      public XrVector3f.Buffer normalBuffer()
      Returns:
      a XrVector3f.Buffer view of the struct array pointed to by the normalBuffer field.
    • confidenceCount

      public int confidenceCount()
      Returns:
      the value of the confidenceCount field.
    • confidenceBuffer

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

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

      public XrWorldMeshBlockML type$Default()
      Sets the TYPE_WORLD_MESH_BLOCK_ML value to the type field.
    • next

      public XrWorldMeshBlockML next(long value)
      Sets the specified value to the next field.
    • uuid

      public XrWorldMeshBlockML uuid(XrUuidEXT value)
      Copies the specified XrUuidEXT to the uuid field.
    • uuid

      public XrWorldMeshBlockML uuid(Consumer<XrUuidEXT> consumer)
      Passes the uuid field to the specified Consumer.
    • blockResult

      public XrWorldMeshBlockML blockResult(int value)
      Sets the specified value to the blockResult field.
    • lod

      public XrWorldMeshBlockML lod(int value)
      Sets the specified value to the lod field.
    • flags

      public XrWorldMeshBlockML flags(long value)
      Sets the specified value to the flags field.
    • indexBuffer

      public XrWorldMeshBlockML indexBuffer(ShortBuffer value)
      Sets the address of the specified ShortBuffer to the indexBuffer field.
    • vertexBuffer

      public XrWorldMeshBlockML vertexBuffer(XrVector3f.Buffer value)
      Sets the address of the specified XrVector3f.Buffer to the vertexBuffer field.
    • normalBuffer

      public XrWorldMeshBlockML normalBuffer(XrVector3f.Buffer value)
      Sets the address of the specified XrVector3f.Buffer to the normalBuffer field.
    • confidenceBuffer

      public XrWorldMeshBlockML confidenceBuffer(FloatBuffer value)
      Sets the address of the specified FloatBuffer to the confidenceBuffer field.
    • set

      public XrWorldMeshBlockML set(int type, long next, XrUuidEXT uuid, int blockResult, int lod, long flags, ShortBuffer indexBuffer, XrVector3f.Buffer vertexBuffer, XrVector3f.Buffer normalBuffer, FloatBuffer confidenceBuffer)
      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 XrWorldMeshBlockML malloc()
      Returns a new XrWorldMeshBlockML instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrWorldMeshBlockML.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XrWorldMeshBlockML.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().
    • nuuid

      public static XrUuidEXT nuuid(long struct)
      Unsafe version of uuid().
    • nblockResult

      public static int nblockResult(long struct)
      Unsafe version of blockResult().
    • nlod

      public static int nlod(long struct)
      Unsafe version of lod().
    • nflags

      public static long nflags(long struct)
      Unsafe version of flags().
    • nindexCount

      public static int nindexCount(long struct)
      Unsafe version of indexCount().
    • nindexBuffer

      public static ShortBuffer nindexBuffer(long struct)
      Unsafe version of indexBuffer.
    • nvertexCount

      public static int nvertexCount(long struct)
      Unsafe version of vertexCount().
    • nvertexBuffer

      public static XrVector3f.Buffer nvertexBuffer(long struct)
      Unsafe version of vertexBuffer().
    • nnormalCount

      public static int nnormalCount(long struct)
      Unsafe version of normalCount().
    • nnormalBuffer

      public static XrVector3f.Buffer nnormalBuffer(long struct)
      Unsafe version of normalBuffer().
    • nconfidenceCount

      public static int nconfidenceCount(long struct)
      Unsafe version of confidenceCount().
    • nconfidenceBuffer

      public static FloatBuffer nconfidenceBuffer(long struct)
      Unsafe version of confidenceBuffer.
    • 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.
    • nuuid

      public static void nuuid(long struct, XrUuidEXT value)
      Unsafe version of uuid.
    • nblockResult

      public static void nblockResult(long struct, int value)
      Unsafe version of blockResult.
    • nlod

      public static void nlod(long struct, int value)
      Unsafe version of lod.
    • nflags

      public static void nflags(long struct, long value)
      Unsafe version of flags.
    • nindexCount

      public static void nindexCount(long struct, int value)
      Sets the specified value to the indexCount field of the specified struct.
    • nindexBuffer

      public static void nindexBuffer(long struct, ShortBuffer value)
      Unsafe version of indexBuffer.
    • nvertexCount

      public static void nvertexCount(long struct, int value)
      Sets the specified value to the vertexCount field of the specified struct.
    • nvertexBuffer

      public static void nvertexBuffer(long struct, XrVector3f.Buffer value)
      Unsafe version of vertexBuffer.
    • nnormalCount

      public static void nnormalCount(long struct, int value)
      Sets the specified value to the normalCount field of the specified struct.
    • nnormalBuffer

      public static void nnormalBuffer(long struct, XrVector3f.Buffer value)
      Unsafe version of normalBuffer.
    • nconfidenceCount

      public static void nconfidenceCount(long struct, int value)
      Sets the specified value to the confidenceCount field of the specified struct.
    • nconfidenceBuffer

      public static void nconfidenceBuffer(long struct, FloatBuffer value)
      Unsafe version of confidenceBuffer.
    • validate

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