Package org.lwjgl.util.meshoptimizer
Class MeshoptMeshlet
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.meshoptimizer.MeshoptMeshlet
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class MeshoptMeshlet extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceExperimental: MeshletLayout
struct meshopt_Meshlet { unsigned intvertex_offset(); unsigned inttriangle_offset(); unsigned intvertex_count(); unsigned inttriangle_count(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMeshoptMeshlet.BufferAn array ofMeshoptMeshletstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intSIZEOFThe struct size in bytes.static intTRIANGLE_COUNT
TRIANGLE_OFFSET
VERTEX_COUNT
VERTEX_OFFSETThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description MeshoptMeshlet(java.nio.ByteBuffer container)Creates aMeshoptMeshletinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MeshoptMeshletcalloc()Returns a newMeshoptMeshletinstance allocated withmemCalloc.static MeshoptMeshlet.Buffercalloc(int capacity)Returns a newMeshoptMeshlet.Bufferinstance allocated withmemCalloc.static MeshoptMeshlet.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newMeshoptMeshlet.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MeshoptMeshletcalloc(org.lwjgl.system.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 MeshoptMeshletcreateSafe(long address)static 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, org.lwjgl.system.MemoryStack stack)Returns a newMeshoptMeshlet.Bufferinstance allocated on the specifiedMemoryStack.static MeshoptMeshletmalloc(org.lwjgl.system.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()inttriangle_count()number of triangles used in the meshlet; data is stored in consecutive range defined by offset and countinttriangle_offset()offset withinmeshlet_trianglesarray with meshlet dataintvertex_count()number of vertices used in the meshlet; data is stored in consecutive range defined by offset and countintvertex_offset()offset withinmeshlet_verticesarray with meshlet data
-
-
-
Constructor Detail
-
MeshoptMeshlet
public MeshoptMeshlet(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
vertex_offset
public int vertex_offset()
offset withinmeshlet_verticesarray with meshlet data
-
triangle_offset
public int triangle_offset()
offset withinmeshlet_trianglesarray with meshlet data
-
vertex_count
public int vertex_count()
number of vertices used in the meshlet; data is stored in consecutive range defined by offset and count
-
triangle_count
public int triangle_count()
number of triangles used in the meshlet; data is stored in consecutive range defined by offset and count
-
malloc
public static MeshoptMeshlet malloc()
Returns a newMeshoptMeshletinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static MeshoptMeshlet calloc()
Returns a newMeshoptMeshletinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static MeshoptMeshlet create()
Returns a newMeshoptMeshletinstance allocated withBufferUtils.
-
create
public static MeshoptMeshlet create(long address)
Returns a newMeshoptMeshletinstance for the specified memory address.
-
createSafe
@Nullable public static MeshoptMeshlet createSafe(long address)
-
malloc
public static MeshoptMeshlet.Buffer malloc(int capacity)
Returns a newMeshoptMeshlet.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static MeshoptMeshlet.Buffer calloc(int capacity)
Returns a newMeshoptMeshlet.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static MeshoptMeshlet.Buffer create(int capacity)
Returns a newMeshoptMeshlet.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static MeshoptMeshlet.Buffer create(long address, int capacity)
Create aMeshoptMeshlet.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static MeshoptMeshlet.Buffer createSafe(long address, int capacity)
-
malloc
public static MeshoptMeshlet malloc(org.lwjgl.system.MemoryStack stack)
Returns a newMeshoptMeshletinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static MeshoptMeshlet calloc(org.lwjgl.system.MemoryStack stack)
Returns a newMeshoptMeshletinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static MeshoptMeshlet.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMeshoptMeshlet.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static MeshoptMeshlet.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMeshoptMeshlet.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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().
-
-