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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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 aMeshoptMeshlet
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic MeshoptMeshlet
calloc()
Returns a newMeshoptMeshlet
instance allocated withmemCalloc
.static MeshoptMeshlet.Buffer
calloc
(int capacity) Returns a newMeshoptMeshlet.Buffer
instance allocated withmemCalloc
.static MeshoptMeshlet.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newMeshoptMeshlet.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MeshoptMeshlet
calloc
(MemoryStack stack) Returns a newMeshoptMeshlet
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MeshoptMeshlet
create()
Returns a newMeshoptMeshlet
instance allocated withBufferUtils
.static MeshoptMeshlet.Buffer
create
(int capacity) Returns a newMeshoptMeshlet.Buffer
instance allocated withBufferUtils
.static MeshoptMeshlet
create
(long address) Returns a newMeshoptMeshlet
instance for the specified memory address.static MeshoptMeshlet.Buffer
create
(long address, int capacity) Create aMeshoptMeshlet.Buffer
instance at the specified memory.static @Nullable MeshoptMeshlet
createSafe
(long address) static @Nullable MeshoptMeshlet.Buffer
createSafe
(long address, int capacity) static MeshoptMeshlet
malloc()
Returns a newMeshoptMeshlet
instance allocated withmemAlloc
.static MeshoptMeshlet.Buffer
malloc
(int capacity) Returns a newMeshoptMeshlet.Buffer
instance allocated withmemAlloc
.static MeshoptMeshlet.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newMeshoptMeshlet.Buffer
instance allocated on the specifiedMemoryStack
.static MeshoptMeshlet
malloc
(MemoryStack stack) Returns a newMeshoptMeshlet
instance allocated on the specifiedMemoryStack
.static int
ntriangle_count
(long struct) Unsafe version oftriangle_count()
.static int
ntriangle_offset
(long struct) Unsafe version oftriangle_offset()
.static int
nvertex_count
(long struct) Unsafe version ofvertex_count()
.static int
nvertex_offset
(long struct) Unsafe version ofvertex_offset()
.int
sizeof()
Returnssizeof(struct)
.int
int
int
int
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aMeshoptMeshlet
instance at the current position of the specifiedByteBuffer
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
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<MeshoptMeshlet>
-
vertex_offset
public int vertex_offset()- Returns:
- the value of the
vertex_offset
field.
-
triangle_offset
public int triangle_offset()- Returns:
- the value of the
triangle_offset
field.
-
vertex_count
public int vertex_count()- Returns:
- the value of the
vertex_count
field.
-
triangle_count
public int triangle_count()- Returns:
- the value of the
triangle_count
field.
-
malloc
Returns a newMeshoptMeshlet
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newMeshoptMeshlet
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newMeshoptMeshlet
instance allocated withBufferUtils
. -
create
Returns a newMeshoptMeshlet
instance for the specified memory address. -
createSafe
-
malloc
Returns a newMeshoptMeshlet.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newMeshoptMeshlet.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newMeshoptMeshlet.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aMeshoptMeshlet.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newMeshoptMeshlet
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newMeshoptMeshlet
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newMeshoptMeshlet.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newMeshoptMeshlet.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-