Package org.lwjgl.util.meshoptimizer
Class MeshoptBounds
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct meshopt_Bounds {
float center[3];
float radius;
float cone_apex[3];
float cone_axis[3];
float cone_cutoff;
char cone_axis_s8[3];
char cone_cutoff_s8;
}-
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 member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionMeshoptBounds(ByteBuffer container) Creates aMeshoptBoundsinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic MeshoptBoundscalloc()Returns a newMeshoptBoundsinstance allocated withmemCalloc.static MeshoptBounds.Buffercalloc(int capacity) Returns a newMeshoptBounds.Bufferinstance allocated withmemCalloc.static MeshoptBounds.Buffercalloc(int capacity, MemoryStack stack) Returns a newMeshoptBounds.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MeshoptBoundscalloc(MemoryStack stack) Returns a newMeshoptBoundsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.center()floatcenter(int index) floatcone_apex(int index) floatcone_axis(int index) bytecone_axis_s8(int index) floatbytestatic MeshoptBoundscreate()Returns a newMeshoptBoundsinstance allocated withBufferUtils.static MeshoptBounds.Buffercreate(int capacity) Returns a newMeshoptBounds.Bufferinstance allocated withBufferUtils.static MeshoptBoundscreate(long address) Returns a newMeshoptBoundsinstance for the specified memory address.static MeshoptBounds.Buffercreate(long address, int capacity) Create aMeshoptBounds.Bufferinstance at the specified memory.static @Nullable MeshoptBoundscreateSafe(long address) static @Nullable MeshoptBounds.BuffercreateSafe(long address, int capacity) static MeshoptBoundsmalloc()Returns a newMeshoptBoundsinstance allocated withmemAlloc.static MeshoptBounds.Buffermalloc(int capacity) Returns a newMeshoptBounds.Bufferinstance allocated withmemAlloc.static MeshoptBounds.Buffermalloc(int capacity, MemoryStack stack) Returns a newMeshoptBounds.Bufferinstance allocated on the specifiedMemoryStack.static MeshoptBoundsmalloc(MemoryStack stack) Returns a newMeshoptBoundsinstance allocated on the specifiedMemoryStack.static FloatBufferncenter(long struct) Unsafe version ofcenter().static floatncenter(long struct, int index) Unsafe version ofcenter.static FloatBufferncone_apex(long struct) Unsafe version ofcone_apex().static floatncone_apex(long struct, int index) Unsafe version ofcone_apex.static FloatBufferncone_axis(long struct) Unsafe version ofcone_axis().static floatncone_axis(long struct, int index) Unsafe version ofcone_axis.static ByteBufferncone_axis_s8(long struct) Unsafe version ofcone_axis_s8().static bytencone_axis_s8(long struct, int index) Unsafe version ofcone_axis_s8.static floatncone_cutoff(long struct) Unsafe version ofcone_cutoff().static bytencone_cutoff_s8(long struct) Unsafe version ofcone_cutoff_s8().static floatnradius(long struct) Unsafe version ofradius().floatradius()intsizeof()Returnssizeof(struct).Methods 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. -
CENTER
public static final int CENTERThe struct member offsets. -
RADIUS
public static final int RADIUSThe struct member offsets. -
CONE_APEX
public static final int CONE_APEXThe struct member offsets. -
CONE_AXIS
public static final int CONE_AXISThe struct member offsets. -
CONE_CUTOFF
public static final int CONE_CUTOFFThe struct member offsets. -
CONE_AXIS_S8
public static final int CONE_AXIS_S8The struct member offsets. -
CONE_CUTOFF_S8
public static final int CONE_CUTOFF_S8The struct member offsets.
-
-
Constructor Details
-
MeshoptBounds
Creates aMeshoptBoundsinstance 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<MeshoptBounds>
-
center
- Returns:
- a
FloatBufferview of thecenterfield.
-
center
public float center(int index) - Returns:
- the value at the specified index of the
centerfield.
-
radius
public float radius()- Returns:
- the value of the
radiusfield.
-
cone_apex
- Returns:
- a
FloatBufferview of thecone_apexfield.
-
cone_apex
public float cone_apex(int index) - Returns:
- the value at the specified index of the
cone_apexfield.
-
cone_axis
- Returns:
- a
FloatBufferview of thecone_axisfield.
-
cone_axis
public float cone_axis(int index) - Returns:
- the value at the specified index of the
cone_axisfield.
-
cone_cutoff
public float cone_cutoff()- Returns:
- the value of the
cone_cutofffield.
-
cone_axis_s8
- Returns:
- a
ByteBufferview of thecone_axis_s8field.
-
cone_axis_s8
public byte cone_axis_s8(int index) - Returns:
- the value at the specified index of the
cone_axis_s8field.
-
cone_cutoff_s8
public byte cone_cutoff_s8()- Returns:
- the value of the
cone_cutoff_s8field.
-
malloc
Returns a newMeshoptBoundsinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newMeshoptBoundsinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newMeshoptBoundsinstance allocated withBufferUtils. -
create
Returns a newMeshoptBoundsinstance for the specified memory address. -
createSafe
-
malloc
Returns a newMeshoptBounds.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newMeshoptBounds.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newMeshoptBounds.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aMeshoptBounds.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newMeshoptBoundsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newMeshoptBoundsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newMeshoptBounds.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newMeshoptBounds.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ncenter
Unsafe version ofcenter(). -
ncenter
public static float ncenter(long struct, int index) Unsafe version ofcenter. -
nradius
public static float nradius(long struct) Unsafe version ofradius(). -
ncone_apex
Unsafe version ofcone_apex(). -
ncone_apex
public static float ncone_apex(long struct, int index) Unsafe version ofcone_apex. -
ncone_axis
Unsafe version ofcone_axis(). -
ncone_axis
public static float ncone_axis(long struct, int index) Unsafe version ofcone_axis. -
ncone_cutoff
public static float ncone_cutoff(long struct) Unsafe version ofcone_cutoff(). -
ncone_axis_s8
Unsafe version ofcone_axis_s8(). -
ncone_axis_s8
public static byte ncone_axis_s8(long struct, int index) Unsafe version ofcone_axis_s8. -
ncone_cutoff_s8
public static byte ncone_cutoff_s8(long struct) Unsafe version ofcone_cutoff_s8().
-