Package org.lwjgl.util.meshoptimizer
Class MeshoptMeshlet
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct meshopt_Meshlet {
unsigned int vertex_offset;
unsigned int triangle_offset;
unsigned int vertex_count;
unsigned int triangle_count;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionMeshoptMeshlet(ByteBuffer container) Creates aMeshoptMeshletinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic MeshoptMeshletcalloc()Returns a newMeshoptMeshletinstance allocated withmemCalloc.static MeshoptMeshlet.Buffercalloc(int capacity) Returns a newMeshoptMeshlet.Bufferinstance allocated withmemCalloc.static MeshoptMeshlet.Buffercalloc(int capacity, MemoryStack stack) Returns a newMeshoptMeshlet.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MeshoptMeshletcalloc(MemoryStack stack) Returns a newMeshoptMeshletinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MeshoptMeshletcreate()Returns a newMeshoptMeshletinstance allocated withBufferUtils.static MeshoptMeshlet.Buffercreate(int capacity) Returns a newMeshoptMeshlet.Bufferinstance allocated withBufferUtils.static MeshoptMeshletcreate(long address) Returns a newMeshoptMeshletinstance for the specified memory address.static MeshoptMeshlet.Buffercreate(long address, int capacity) Create aMeshoptMeshlet.Bufferinstance at the specified memory.static @Nullable MeshoptMeshletcreateSafe(long address) static @Nullable MeshoptMeshlet.BuffercreateSafe(long address, int capacity) static MeshoptMeshletmalloc()Returns a newMeshoptMeshletinstance allocated withmemAlloc.static MeshoptMeshlet.Buffermalloc(int capacity) Returns a newMeshoptMeshlet.Bufferinstance allocated withmemAlloc.static MeshoptMeshlet.Buffermalloc(int capacity, MemoryStack stack) Returns a newMeshoptMeshlet.Bufferinstance allocated on the specifiedMemoryStack.static MeshoptMeshletmalloc(MemoryStack stack) Returns a newMeshoptMeshletinstance allocated on the specifiedMemoryStack.static intntriangle_count(long struct) Unsafe version oftriangle_count().static intntriangle_offset(long struct) Unsafe version oftriangle_offset().static intnvertex_count(long struct) Unsafe version ofvertex_count().static intnvertex_offset(long struct) Unsafe version ofvertex_offset().intsizeof()Returnssizeof(struct).intintintintMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
VERTEX_OFFSET
public static final int VERTEX_OFFSETThe struct member offsets. -
TRIANGLE_OFFSET
public static final int TRIANGLE_OFFSETThe struct member offsets. -
VERTEX_COUNT
public static final int VERTEX_COUNTThe struct member offsets. -
TRIANGLE_COUNT
public static final int TRIANGLE_COUNTThe struct member offsets.
-
-
Constructor Details
-
MeshoptMeshlet
Creates aMeshoptMeshletinstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<MeshoptMeshlet>
-
vertex_offset
public int vertex_offset()- Returns:
- the value of the
vertex_offsetfield.
-
triangle_offset
public int triangle_offset()- Returns:
- the value of the
triangle_offsetfield.
-
vertex_count
public int vertex_count()- Returns:
- the value of the
vertex_countfield.
-
triangle_count
public int triangle_count()- Returns:
- the value of the
triangle_countfield.
-
malloc
Returns a newMeshoptMeshletinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newMeshoptMeshletinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newMeshoptMeshletinstance allocated withBufferUtils. -
create
Returns a newMeshoptMeshletinstance for the specified memory address. -
createSafe
-
malloc
Returns a newMeshoptMeshlet.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newMeshoptMeshlet.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newMeshoptMeshlet.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aMeshoptMeshlet.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newMeshoptMeshletinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newMeshoptMeshletinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newMeshoptMeshlet.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newMeshoptMeshlet.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nvertex_offset
public static int nvertex_offset(long struct) Unsafe version ofvertex_offset(). -
ntriangle_offset
public static int ntriangle_offset(long struct) Unsafe version oftriangle_offset(). -
nvertex_count
public static int nvertex_count(long struct) Unsafe version ofvertex_count(). -
ntriangle_count
public static int ntriangle_count(long struct) Unsafe version oftriangle_count().
-