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.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 member offsets.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.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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 aMeshoptBounds
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic MeshoptBounds
calloc()
Returns a newMeshoptBounds
instance allocated withmemCalloc
.static MeshoptBounds.Buffer
calloc
(int capacity) Returns a newMeshoptBounds.Buffer
instance allocated withmemCalloc
.static MeshoptBounds.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newMeshoptBounds.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MeshoptBounds
calloc
(MemoryStack stack) Returns a newMeshoptBounds
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.center()
float
center
(int index) float
cone_apex
(int index) float
cone_axis
(int index) byte
cone_axis_s8
(int index) float
byte
static MeshoptBounds
create()
Returns a newMeshoptBounds
instance allocated withBufferUtils
.static MeshoptBounds.Buffer
create
(int capacity) Returns a newMeshoptBounds.Buffer
instance allocated withBufferUtils
.static MeshoptBounds
create
(long address) Returns a newMeshoptBounds
instance for the specified memory address.static MeshoptBounds.Buffer
create
(long address, int capacity) Create aMeshoptBounds.Buffer
instance at the specified memory.static @Nullable MeshoptBounds
createSafe
(long address) static @Nullable MeshoptBounds.Buffer
createSafe
(long address, int capacity) static MeshoptBounds
malloc()
Returns a newMeshoptBounds
instance allocated withmemAlloc
.static MeshoptBounds.Buffer
malloc
(int capacity) Returns a newMeshoptBounds.Buffer
instance allocated withmemAlloc
.static MeshoptBounds.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newMeshoptBounds.Buffer
instance allocated on the specifiedMemoryStack
.static MeshoptBounds
malloc
(MemoryStack stack) Returns a newMeshoptBounds
instance allocated on the specifiedMemoryStack
.static FloatBuffer
ncenter
(long struct) Unsafe version ofcenter()
.static float
ncenter
(long struct, int index) Unsafe version ofcenter
.static FloatBuffer
ncone_apex
(long struct) Unsafe version ofcone_apex()
.static float
ncone_apex
(long struct, int index) Unsafe version ofcone_apex
.static FloatBuffer
ncone_axis
(long struct) Unsafe version ofcone_axis()
.static float
ncone_axis
(long struct, int index) Unsafe version ofcone_axis
.static ByteBuffer
ncone_axis_s8
(long struct) Unsafe version ofcone_axis_s8()
.static byte
ncone_axis_s8
(long struct, int index) Unsafe version ofcone_axis_s8
.static float
ncone_cutoff
(long struct) Unsafe version ofcone_cutoff()
.static byte
ncone_cutoff_s8
(long struct) Unsafe version ofcone_cutoff_s8()
.static float
nradius
(long struct) Unsafe version ofradius()
.float
radius()
int
sizeof()
Returnssizeof(struct)
.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. -
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 aMeshoptBounds
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<MeshoptBounds>
-
center
- Returns:
- a
FloatBuffer
view of thecenter
field.
-
center
public float center(int index) - Returns:
- the value at the specified index of the
center
field.
-
radius
public float radius()- Returns:
- the value of the
radius
field.
-
cone_apex
- Returns:
- a
FloatBuffer
view of thecone_apex
field.
-
cone_apex
public float cone_apex(int index) - Returns:
- the value at the specified index of the
cone_apex
field.
-
cone_axis
- Returns:
- a
FloatBuffer
view of thecone_axis
field.
-
cone_axis
public float cone_axis(int index) - Returns:
- the value at the specified index of the
cone_axis
field.
-
cone_cutoff
public float cone_cutoff()- Returns:
- the value of the
cone_cutoff
field.
-
cone_axis_s8
- Returns:
- a
ByteBuffer
view of thecone_axis_s8
field.
-
cone_axis_s8
public byte cone_axis_s8(int index) - Returns:
- the value at the specified index of the
cone_axis_s8
field.
-
cone_cutoff_s8
public byte cone_cutoff_s8()- Returns:
- the value of the
cone_cutoff_s8
field.
-
malloc
Returns a newMeshoptBounds
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newMeshoptBounds
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newMeshoptBounds
instance allocated withBufferUtils
. -
create
Returns a newMeshoptBounds
instance for the specified memory address. -
createSafe
-
malloc
Returns a newMeshoptBounds.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newMeshoptBounds.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newMeshoptBounds.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aMeshoptBounds.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newMeshoptBounds
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newMeshoptBounds
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newMeshoptBounds.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newMeshoptBounds.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-