Class XrWorldMeshBlockML

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrWorldMeshBlockML>
org.lwjgl.openxr.XrWorldMeshBlockML
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrWorldMeshBlockML extends org.lwjgl.system.Struct<XrWorldMeshBlockML> implements org.lwjgl.system.NativeResource
Block Vertex Data.
Description

normalCount must be equal to vertexCount if WORLD_MESH_DETECTOR_COMPUTE_NORMALS_BIT_ML was specified during XrWorldMeshDetectorML creation, otherwise 0.

confidenceCount must be equal to vertexCount if WORLD_MESH_DETECTOR_COMPUTE_CONFIDENCE_BIT_ML was specified during XrWorldMeshDetectorML creation, otherwise 0.

Valid Usage (Implicit)
  • The XR_ML_world_mesh_detection extension must be enabled prior to using XrWorldMeshBlockML
  • type must be TYPE_WORLD_MESH_BLOCK_ML
  • next must be NULL or a valid pointer to the next structure in a structure chain
  • blockResult must be a valid XrWorldMeshBlockResultML value
  • lod must be a valid XrWorldMeshDetectorLodML value
  • flags must be a valid combination of XrWorldMeshDetectorFlagBitsML values
  • flags must not be 0
  • indexBuffer must be a pointer to an array of indexCount uint16_t values
  • vertexBuffer must be a pointer to an array of vertexCount XrVector3f structures
  • normalBuffer must be a pointer to an array of normalCount XrVector3f structures
  • confidenceBuffer must be a pointer to an array of confidenceCount float values
  • The indexCount parameter must be greater than 0
  • The vertexCount parameter must be greater than 0
  • The normalCount parameter must be greater than 0
  • The confidenceCount parameter must be greater than 0
See Also

XrUuidEXT, XrVector3f, XrWorldMeshRequestCompletionML, RequestWorldMeshCompleteML

Layout


 struct XrWorldMeshBlockML {
     XrStructureType type();
     void * next();
     XrUuidEXT uuid();
     XrWorldMeshBlockResultML blockResult();
     XrWorldMeshDetectorLodML lod();
     XrWorldMeshDetectorFlagsML flags();
     uint32_t indexCount();
     uint16_t * indexBuffer();
     uint32_t vertexCount();
     XrVector3f * vertexBuffer();
     uint32_t normalCount();
     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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrWorldMeshBlockML>
    • type

      public int type()
      the XrStructureType of this structure.
    • next

      public long next()
      NULL or a pointer to the next structure in a structure chain.
    • uuid

      public XrUuidEXT uuid()
      the XrUuidEXT of the mesh block
    • blockResult

      public int blockResult()
      the XrWorldMeshBlockResultML of the mesh block.
    • lod

      public int lod()
      the XrWorldMeshDetectorLodML used to generated this mesh block.
    • flags

      public long flags()
      are the detector flags defined by XrWorldMeshDetectorFlagBitsML.
    • indexCount

      public int indexCount()
      the number of indices in the indexBuffer.
    • indexBuffer

      public ShortBuffer indexBuffer()
      the index buffer of type uint16_t. In the indexBuffer each value is the index of a vertex in the vertexBuffer. Three indices define one triangle. For example, the first triangle will have the vertices: vertexBuffer[index[0]], vertexBuffer[index[1]], vertexBuffer[index[2]]. Index order is defined by the WORLD_MESH_DETECTOR_INDEX_ORDER_CW_BIT_ML flag.
    • vertexCount

      public int vertexCount()
      the number of vertices in the vertexBuffer.
    • vertexBuffer

      public XrVector3f.Buffer vertexBuffer()
      the vertex buffer of type XrVector3f. Vertex data will be provided in the XrWorldMeshStateRequestInfoML::baseSpace at time XrWorldMeshBlockStateML::lastUpdateTime.
    • normalCount

      public int normalCount()
      the number of normals in the normalBuffer.
    • normalBuffer

      public XrVector3f.Buffer normalBuffer()
      the normal buffer of type XrVector3f.
    • confidenceCount

      public int confidenceCount()
      the number of confidence values in the confidenceBuffer.
    • confidenceBuffer

      public FloatBuffer confidenceBuffer()
      the confidence buffer of type float with range 0.0 - 1.0.
    • 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(org.lwjgl.system.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(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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