Package org.lwjgl.openxr
Class XrTriangleMeshCreateInfoFB
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrTriangleMeshCreateInfoFB
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrTriangleMeshCreateInfoFB extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceThe information to create a triangle mesh.Description
Mesh buffers can be updated between
TriangleMeshBeginUpdateFBandTriangleMeshEndUpdateFBcalls.Valid Usage (Implicit)
- The
XR_FB_triangle_meshextension must be enabled prior to usingXrTriangleMeshCreateInfoFB typemust beTYPE_TRIANGLE_MESH_CREATE_INFO_FBnextmust beNULLor a valid pointer to the next structure in a structure chainflagsmust be a valid combination ofXrTriangleMeshFlagBitsFBvaluesflagsmust not be 0windingOrdermust be a validXrWindingOrderFBvalue- If
vertexBufferis notNULL,vertexBuffermust be a pointer to a validXrVector3fstructure - If
indexBufferis notNULL,indexBuffermust be a pointer to a validuint32_tvalue
See Also
XrVector3f,CreateTriangleMeshFBLayout
struct XrTriangleMeshCreateInfoFB { XrStructureTypetype(); void const *next(); XrTriangleMeshFlagsFBflags(); XrWindingOrderFBwindingOrder(); uint32_tvertexCount();XrVector3fconst *vertexBuffer(); uint32_ttriangleCount(); uint32_t const *indexBuffer(int); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrTriangleMeshCreateInfoFB.BufferAn array ofXrTriangleMeshCreateInfoFBstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intFLAGS
INDEXBUFFER
NEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTRIANGLECOUNT
TYPE
VERTEXBUFFER
VERTEXCOUNT
WINDINGORDERThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description XrTriangleMeshCreateInfoFB(java.nio.ByteBuffer container)Creates aXrTriangleMeshCreateInfoFBinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrTriangleMeshCreateInfoFBcalloc()Returns a newXrTriangleMeshCreateInfoFBinstance allocated withmemCalloc.static XrTriangleMeshCreateInfoFB.Buffercalloc(int capacity)Returns a newXrTriangleMeshCreateInfoFB.Bufferinstance allocated withmemCalloc.static XrTriangleMeshCreateInfoFB.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrTriangleMeshCreateInfoFB.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrTriangleMeshCreateInfoFBcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrTriangleMeshCreateInfoFBinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrTriangleMeshCreateInfoFBcreate()Returns a newXrTriangleMeshCreateInfoFBinstance allocated withBufferUtils.static XrTriangleMeshCreateInfoFB.Buffercreate(int capacity)Returns a newXrTriangleMeshCreateInfoFB.Bufferinstance allocated withBufferUtils.static XrTriangleMeshCreateInfoFBcreate(long address)Returns a newXrTriangleMeshCreateInfoFBinstance for the specified memory address.static XrTriangleMeshCreateInfoFB.Buffercreate(long address, int capacity)Create aXrTriangleMeshCreateInfoFB.Bufferinstance at the specified memory.static XrTriangleMeshCreateInfoFBcreateSafe(long address)static XrTriangleMeshCreateInfoFB.BuffercreateSafe(long address, int capacity)longflags()a bitmask ofXrTriangleMeshFlagBitsFBthat specify behavior.XrTriangleMeshCreateInfoFBflags(long value)Sets the specified value to theflags()field.java.nio.IntBufferindexBuffer(int capacity)XrTriangleMeshCreateInfoFBindexBuffer(java.nio.IntBuffer value)Sets the address of the specifiedIntBufferto theindexBuffer(int)field.static XrTriangleMeshCreateInfoFBmalloc()Returns a newXrTriangleMeshCreateInfoFBinstance allocated withmemAlloc.static XrTriangleMeshCreateInfoFB.Buffermalloc(int capacity)Returns a newXrTriangleMeshCreateInfoFB.Bufferinstance allocated withmemAlloc.static XrTriangleMeshCreateInfoFB.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrTriangleMeshCreateInfoFB.Bufferinstance allocated on the specifiedMemoryStack.static XrTriangleMeshCreateInfoFBmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrTriangleMeshCreateInfoFBinstance allocated on the specifiedMemoryStack.longnext()NULLor a pointer to the next structure in a structure chain.XrTriangleMeshCreateInfoFBnext(long value)Sets the specified value to thenext()field.static longnflags(long struct)Unsafe version offlags().static voidnflags(long struct, long value)Unsafe version offlags.static java.nio.IntBuffernindexBuffer(long struct, int capacity)Unsafe version ofindexBuffer.static voidnindexBuffer(long struct, java.nio.IntBuffer value)Unsafe version ofindexBuffer.static longnnext(long struct)Unsafe version ofnext().static voidnnext(long struct, long value)Unsafe version ofnext.static intntriangleCount(long struct)Unsafe version oftriangleCount().static voidntriangleCount(long struct, int value)Unsafe version oftriangleCount.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.static XrVector3fnvertexBuffer(long struct)Unsafe version ofvertexBuffer().static voidnvertexBuffer(long struct, XrVector3f value)Unsafe version ofvertexBuffer.static intnvertexCount(long struct)Unsafe version ofvertexCount().static voidnvertexCount(long struct, int value)Unsafe version ofvertexCount.static intnwindingOrder(long struct)Unsafe version ofwindingOrder().static voidnwindingOrder(long struct, int value)Unsafe version ofwindingOrder.XrTriangleMeshCreateInfoFBset(int type, long next, long flags, int windingOrder, int vertexCount, XrVector3f vertexBuffer, int triangleCount, java.nio.IntBuffer indexBuffer)Initializes this struct with the specified values.XrTriangleMeshCreateInfoFBset(XrTriangleMeshCreateInfoFB src)Copies the specified struct data to this struct.intsizeof()inttriangleCount()the number of triangles in the mesh.XrTriangleMeshCreateInfoFBtriangleCount(int value)Sets the specified value to thetriangleCount()field.inttype()theXrStructureTypeof this structure.XrTriangleMeshCreateInfoFBtype(int value)Sets the specified value to thetype()field.XrTriangleMeshCreateInfoFBtype$Default()Sets theTYPE_TRIANGLE_MESH_CREATE_INFO_FBvalue to thetype()field.XrVector3fvertexBuffer()a pointer to the vertex data.XrTriangleMeshCreateInfoFBvertexBuffer(XrVector3f value)Sets the address of the specifiedXrVector3fto thevertexBuffer()field.intvertexCount()the number of vertices in the mesh.XrTriangleMeshCreateInfoFBvertexCount(int value)Sets the specified value to thevertexCount()field.intwindingOrder()theXrWindingOrderFBvalue defining the winding order of the mesh triangles.XrTriangleMeshCreateInfoFBwindingOrder(int value)Sets the specified value to thewindingOrder()field.
-
-
-
Constructor Detail
-
XrTriangleMeshCreateInfoFB
public XrTriangleMeshCreateInfoFB(java.nio.ByteBuffer container)
Creates aXrTriangleMeshCreateInfoFBinstance at the current position of the specifiedByteBuffercontainer. 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
type
public int type()
theXrStructureTypeof this structure.
-
next
public long next()
NULLor 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 ofXrTriangleMeshFlagBitsFBthat specify behavior.
-
windingOrder
public int windingOrder()
theXrWindingOrderFBvalue 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 whenTriangleMeshEndUpdateFBis called.
-
vertexBuffer
@Nullable public XrVector3f vertexBuffer()
a pointer to the vertex data. The size of the array must bevertexCountelements. When the mesh is mutable (({@code flags} & {@link FBTriangleMesh#XR_TRIANGLE_MESH_MUTABLE_BIT_FB TRIANGLE_MESH_MUTABLE_BIT_FB}) != 0), thevertexBufferparameter must beNULLand 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 whenTriangleMeshEndUpdateFBis called.
-
indexBuffer
@Nullable public java.nio.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
triangleCountelements. When the mesh is mutable (({@code flags} & {@link FBTriangleMesh#XR_TRIANGLE_MESH_MUTABLE_BIT_FB TRIANGLE_MESH_MUTABLE_BIT_FB}) != 0), theindexBufferparameter must beNULLand mesh data must be populated separately.
-
type
public XrTriangleMeshCreateInfoFB type(int value)
Sets the specified value to thetype()field.
-
type$Default
public XrTriangleMeshCreateInfoFB type$Default()
Sets theTYPE_TRIANGLE_MESH_CREATE_INFO_FBvalue to thetype()field.
-
next
public XrTriangleMeshCreateInfoFB next(long value)
Sets the specified value to thenext()field.
-
flags
public XrTriangleMeshCreateInfoFB flags(long value)
Sets the specified value to theflags()field.
-
windingOrder
public XrTriangleMeshCreateInfoFB windingOrder(int value)
Sets the specified value to thewindingOrder()field.
-
vertexCount
public XrTriangleMeshCreateInfoFB vertexCount(int value)
Sets the specified value to thevertexCount()field.
-
vertexBuffer
public XrTriangleMeshCreateInfoFB vertexBuffer(@Nullable XrVector3f value)
Sets the address of the specifiedXrVector3fto thevertexBuffer()field.
-
triangleCount
public XrTriangleMeshCreateInfoFB triangleCount(int value)
Sets the specified value to thetriangleCount()field.
-
indexBuffer
public XrTriangleMeshCreateInfoFB indexBuffer(@Nullable java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto theindexBuffer(int)field.
-
set
public XrTriangleMeshCreateInfoFB set(int type, long next, long flags, int windingOrder, int vertexCount, @Nullable XrVector3f vertexBuffer, int triangleCount, @Nullable java.nio.IntBuffer indexBuffer)
Initializes this struct with the specified values.
-
set
public XrTriangleMeshCreateInfoFB set(XrTriangleMeshCreateInfoFB src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrTriangleMeshCreateInfoFB malloc()
Returns a newXrTriangleMeshCreateInfoFBinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrTriangleMeshCreateInfoFB calloc()
Returns a newXrTriangleMeshCreateInfoFBinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrTriangleMeshCreateInfoFB create()
Returns a newXrTriangleMeshCreateInfoFBinstance allocated withBufferUtils.
-
create
public static XrTriangleMeshCreateInfoFB create(long address)
Returns a newXrTriangleMeshCreateInfoFBinstance for the specified memory address.
-
createSafe
@Nullable public static XrTriangleMeshCreateInfoFB createSafe(long address)
-
malloc
public static XrTriangleMeshCreateInfoFB.Buffer malloc(int capacity)
Returns a newXrTriangleMeshCreateInfoFB.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrTriangleMeshCreateInfoFB.Buffer calloc(int capacity)
Returns a newXrTriangleMeshCreateInfoFB.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrTriangleMeshCreateInfoFB.Buffer create(int capacity)
Returns a newXrTriangleMeshCreateInfoFB.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrTriangleMeshCreateInfoFB.Buffer create(long address, int capacity)
Create aXrTriangleMeshCreateInfoFB.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrTriangleMeshCreateInfoFB.Buffer createSafe(long address, int capacity)
-
malloc
public static XrTriangleMeshCreateInfoFB malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrTriangleMeshCreateInfoFBinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrTriangleMeshCreateInfoFB calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrTriangleMeshCreateInfoFBinstance allocated on the specifiedMemoryStackand 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 newXrTriangleMeshCreateInfoFB.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrTriangleMeshCreateInfoFB.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrTriangleMeshCreateInfoFB.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
nnext
public static long nnext(long struct)
Unsafe version ofnext().
-
nflags
public static long nflags(long struct)
Unsafe version offlags().
-
nwindingOrder
public static int nwindingOrder(long struct)
Unsafe version ofwindingOrder().
-
nvertexCount
public static int nvertexCount(long struct)
Unsafe version ofvertexCount().
-
nvertexBuffer
@Nullable public static XrVector3f nvertexBuffer(long struct)
Unsafe version ofvertexBuffer().
-
ntriangleCount
public static int ntriangleCount(long struct)
Unsafe version oftriangleCount().
-
nindexBuffer
@Nullable public static java.nio.IntBuffer nindexBuffer(long struct, int capacity)Unsafe version ofindexBuffer.
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
nflags
public static void nflags(long struct, long value)Unsafe version offlags.
-
nwindingOrder
public static void nwindingOrder(long struct, int value)Unsafe version ofwindingOrder.
-
nvertexCount
public static void nvertexCount(long struct, int value)Unsafe version ofvertexCount.
-
nvertexBuffer
public static void nvertexBuffer(long struct, @Nullable XrVector3f value)Unsafe version ofvertexBuffer.
-
ntriangleCount
public static void ntriangleCount(long struct, int value)Unsafe version oftriangleCount.
-
nindexBuffer
public static void nindexBuffer(long struct, @Nullable java.nio.IntBuffer value)Unsafe version ofindexBuffer.
-
-