Class XrTriangleMeshCreateInfoFB

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

public class XrTriangleMeshCreateInfoFB extends org.lwjgl.system.Struct<XrTriangleMeshCreateInfoFB> implements org.lwjgl.system.NativeResource
The information to create a triangle mesh.
Description

Mesh buffers can be updated between TriangleMeshBeginUpdateFB and TriangleMeshEndUpdateFB calls.

If the mesh is non-mutable, vertexBuffer must be a pointer to an array of vertexCount XrVector3f structures. If the mesh is non-mutable, indexBuffer must be a pointer to an array of 3 * triangleCount uint32_t vertex indices.

Valid Usage (Implicit)
See Also

XrVector3f, CreateTriangleMeshFB

Layout


 struct XrTriangleMeshCreateInfoFB {
     XrStructureType type();
     void const * next();
     XrTriangleMeshFlagsFB flags();
     XrWindingOrderFB windingOrder();
     uint32_t vertexCount();
     XrVector3f const * vertexBuffer();
     uint32_t triangleCount();
     uint32_t const * indexBuffer(int);
 }
  • 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.
    • FLAGS

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

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

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

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

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

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

    • XrTriangleMeshCreateInfoFB

      public XrTriangleMeshCreateInfoFB(ByteBuffer container)
      Creates a XrTriangleMeshCreateInfoFB 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<XrTriangleMeshCreateInfoFB>
    • 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. No such structures are defined in core OpenXR or this extension.
    • flags

      public long flags()
      a bitmask of XrTriangleMeshFlagBitsFB that specify behavior.
    • windingOrder

      public int windingOrder()
      the XrWindingOrderFB value defining the winding order of the mesh triangles.
    • vertexCount

      public int vertexCount()
      the number of vertices in the mesh. In the case of the mutable mesh, the value is treated as the maximum number of vertices the mesh will be able to represent at any time in its lifecycle. The actual number of vertices can vary and is defined when TriangleMeshEndUpdateFB is called.
    • vertexBuffer

      public @Nullable XrVector3f vertexBuffer()
      a pointer to the vertex data. The size of the array must be vertexCount elements. When the mesh is mutable (({@code flags} &amp; {@link FBTriangleMesh#XR_TRIANGLE_MESH_MUTABLE_BIT_FB TRIANGLE_MESH_MUTABLE_BIT_FB}) != 0), the vertexBuffer parameter must be NULL and mesh data must be populated separately.
    • triangleCount

      public int triangleCount()
      the number of triangles in the mesh. In the case of the mutable mesh, the value is treated as the maximum number of triangles the mesh will be able to represent at any time in its lifecycle. The actual number of triangles can vary and is defined when TriangleMeshEndUpdateFB is called.
    • indexBuffer

      public @Nullable IntBuffer indexBuffer(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      the triangle indices. The size of the array must be triangleCount elements. When the mesh is mutable (({@code flags} &amp; {@link FBTriangleMesh#XR_TRIANGLE_MESH_MUTABLE_BIT_FB TRIANGLE_MESH_MUTABLE_BIT_FB}) != 0), the indexBuffer parameter must be NULL and mesh data must be populated separately.
    • type

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

      public XrTriangleMeshCreateInfoFB type$Default()
      Sets the TYPE_TRIANGLE_MESH_CREATE_INFO_FB value to the type() field.
    • next

      public XrTriangleMeshCreateInfoFB next(long value)
      Sets the specified value to the next() field.
    • flags

      public XrTriangleMeshCreateInfoFB flags(long value)
      Sets the specified value to the flags() field.
    • windingOrder

      public XrTriangleMeshCreateInfoFB windingOrder(int value)
      Sets the specified value to the windingOrder() field.
    • vertexCount

      public XrTriangleMeshCreateInfoFB vertexCount(int value)
      Sets the specified value to the vertexCount() field.
    • vertexBuffer

      public XrTriangleMeshCreateInfoFB vertexBuffer(@Nullable XrVector3f value)
      Sets the address of the specified XrVector3f to the vertexBuffer() field.
    • triangleCount

      public XrTriangleMeshCreateInfoFB triangleCount(int value)
      Sets the specified value to the triangleCount() field.
    • indexBuffer

      public XrTriangleMeshCreateInfoFB indexBuffer(@Nullable IntBuffer value)
      Sets the address of the specified IntBuffer to the indexBuffer(int) field.
    • set

      public XrTriangleMeshCreateInfoFB set(int type, long next, long flags, int windingOrder, int vertexCount, @Nullable XrVector3f vertexBuffer, int triangleCount, @Nullable IntBuffer indexBuffer)
      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 XrTriangleMeshCreateInfoFB malloc()
      Returns a new XrTriangleMeshCreateInfoFB instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrTriangleMeshCreateInfoFB.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrTriangleMeshCreateInfoFB.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().
    • nflags

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

      public static int nwindingOrder(long struct)
      Unsafe version of windingOrder().
    • nvertexCount

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

      public static @Nullable XrVector3f nvertexBuffer(long struct)
      Unsafe version of vertexBuffer().
    • ntriangleCount

      public static int ntriangleCount(long struct)
      Unsafe version of triangleCount().
    • nindexBuffer

      public static @Nullable IntBuffer nindexBuffer(long struct, int capacity)
      Unsafe version of indexBuffer.
    • 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.
    • nflags

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

      public static void nwindingOrder(long struct, int value)
      Unsafe version of windingOrder.
    • nvertexCount

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

      public static void nvertexBuffer(long struct, @Nullable XrVector3f value)
      Unsafe version of vertexBuffer.
    • ntriangleCount

      public static void ntriangleCount(long struct, int value)
      Unsafe version of triangleCount.
    • nindexBuffer

      public static void nindexBuffer(long struct, @Nullable IntBuffer value)
      Unsafe version of indexBuffer.