public class MeshoptBounds
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
center[3] – bounding sphere, useful for frustum and occlusion cullingcone_apex[3] – normal cone, useful for backface cullingcone_cutoff – cos(angle/2)cone_axis_s8[3] – normal cone axis and cutoff, stored in 8-bit SNORM format; decode using x/127.0
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;
}| Modifier and Type | Class and Description |
|---|---|
static class |
MeshoptBounds.Buffer
An array of
MeshoptBounds structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
CENTER
The struct member offsets.
|
static int |
CONE_APEX
The struct member offsets.
|
static int |
CONE_AXIS
The struct member offsets.
|
static int |
CONE_AXIS_S8
The struct member offsets.
|
static int |
CONE_CUTOFF
The struct member offsets.
|
static int |
CONE_CUTOFF_S8
The struct member offsets.
|
static int |
RADIUS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
MeshoptBounds(java.nio.ByteBuffer container)
Creates a
MeshoptBounds instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static MeshoptBounds |
calloc()
Returns a new
MeshoptBounds instance allocated with memCalloc. |
static MeshoptBounds.Buffer |
calloc(int capacity)
Returns a new
MeshoptBounds.Buffer instance allocated with memCalloc. |
static MeshoptBounds |
callocStack()
Returns a new
MeshoptBounds instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static MeshoptBounds.Buffer |
callocStack(int capacity)
Returns a new
MeshoptBounds.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static MeshoptBounds.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
MeshoptBounds.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static MeshoptBounds |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
MeshoptBounds instance allocated on the specified MemoryStack and initializes all its bits to zero. |
java.nio.FloatBuffer |
center()
Returns a
FloatBuffer view of the center field. |
float |
center(int index)
Returns the value at the specified index of the
center field. |
java.nio.FloatBuffer |
cone_apex()
Returns a
FloatBuffer view of the cone_apex field. |
float |
cone_apex(int index)
Returns the value at the specified index of the
cone_apex field. |
java.nio.ByteBuffer |
cone_axis_s8()
Returns a
ByteBuffer view of the cone_axis_s8 field. |
byte |
cone_axis_s8(int index)
Returns the value at the specified index of the
cone_axis_s8 field. |
java.nio.FloatBuffer |
cone_axis()
Returns a
FloatBuffer view of the cone_axis field. |
float |
cone_axis(int index)
Returns the value at the specified index of the
cone_axis field. |
byte |
cone_cutoff_s8()
Returns the value of the
cone_cutoff_s8 field. |
float |
cone_cutoff()
Returns the value of the
cone_cutoff field. |
static MeshoptBounds |
create()
Returns a new
MeshoptBounds instance allocated with BufferUtils. |
static MeshoptBounds.Buffer |
create(int capacity)
Returns a new
MeshoptBounds.Buffer instance allocated with BufferUtils. |
static MeshoptBounds |
create(long address)
Returns a new
MeshoptBounds instance for the specified memory address. |
static MeshoptBounds.Buffer |
create(long address,
int capacity)
Create a
MeshoptBounds.Buffer instance at the specified memory. |
static MeshoptBounds |
createSafe(long address)
|
static MeshoptBounds.Buffer |
createSafe(long address,
int capacity)
|
static MeshoptBounds |
malloc()
Returns a new
MeshoptBounds instance allocated with memAlloc. |
static MeshoptBounds.Buffer |
malloc(int capacity)
Returns a new
MeshoptBounds.Buffer instance allocated with memAlloc. |
static MeshoptBounds |
mallocStack()
Returns a new
MeshoptBounds instance allocated on the thread-local MemoryStack. |
static MeshoptBounds.Buffer |
mallocStack(int capacity)
Returns a new
MeshoptBounds.Buffer instance allocated on the thread-local MemoryStack. |
static MeshoptBounds.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
MeshoptBounds.Buffer instance allocated on the specified MemoryStack. |
static MeshoptBounds |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
MeshoptBounds instance allocated on the specified MemoryStack. |
static java.nio.FloatBuffer |
ncenter(long struct)
Unsafe version of
center(). |
static float |
ncenter(long struct,
int index)
Unsafe version of
center. |
static java.nio.FloatBuffer |
ncone_apex(long struct)
Unsafe version of
cone_apex(). |
static float |
ncone_apex(long struct,
int index)
Unsafe version of
cone_apex. |
static java.nio.ByteBuffer |
ncone_axis_s8(long struct)
Unsafe version of
cone_axis_s8(). |
static byte |
ncone_axis_s8(long struct,
int index)
Unsafe version of
cone_axis_s8. |
static java.nio.FloatBuffer |
ncone_axis(long struct)
Unsafe version of
cone_axis(). |
static float |
ncone_axis(long struct,
int index)
Unsafe version of
cone_axis. |
static byte |
ncone_cutoff_s8(long struct)
Unsafe version of
cone_cutoff_s8(). |
static float |
ncone_cutoff(long struct)
Unsafe version of
cone_cutoff(). |
static float |
nradius(long struct)
Unsafe version of
radius(). |
float |
radius()
Returns the value of the
radius field. |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int CENTER
public static final int RADIUS
public static final int CONE_APEX
public static final int CONE_AXIS
public static final int CONE_CUTOFF
public static final int CONE_AXIS_S8
public static final int CONE_CUTOFF_S8
public MeshoptBounds(java.nio.ByteBuffer container)
MeshoptBounds instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic java.nio.FloatBuffer center()
FloatBuffer view of the center field.public float center(int index)
center field.public float radius()
radius field.public java.nio.FloatBuffer cone_apex()
FloatBuffer view of the cone_apex field.public float cone_apex(int index)
cone_apex field.public java.nio.FloatBuffer cone_axis()
FloatBuffer view of the cone_axis field.public float cone_axis(int index)
cone_axis field.public float cone_cutoff()
cone_cutoff field.public java.nio.ByteBuffer cone_axis_s8()
ByteBuffer view of the cone_axis_s8 field.public byte cone_axis_s8(int index)
cone_axis_s8 field.public byte cone_cutoff_s8()
cone_cutoff_s8 field.public static MeshoptBounds malloc()
MeshoptBounds instance allocated with memAlloc. The instance must be explicitly freed.public static MeshoptBounds calloc()
MeshoptBounds instance allocated with memCalloc. The instance must be explicitly freed.public static MeshoptBounds create()
MeshoptBounds instance allocated with BufferUtils.public static MeshoptBounds create(long address)
MeshoptBounds instance for the specified memory address.@Nullable public static MeshoptBounds createSafe(long address)
public static MeshoptBounds.Buffer malloc(int capacity)
MeshoptBounds.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static MeshoptBounds.Buffer calloc(int capacity)
MeshoptBounds.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static MeshoptBounds.Buffer create(int capacity)
MeshoptBounds.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static MeshoptBounds.Buffer create(long address, int capacity)
MeshoptBounds.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static MeshoptBounds.Buffer createSafe(long address, int capacity)
public static MeshoptBounds mallocStack()
MeshoptBounds instance allocated on the thread-local MemoryStack.public static MeshoptBounds callocStack()
MeshoptBounds instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static MeshoptBounds mallocStack(org.lwjgl.system.MemoryStack stack)
MeshoptBounds instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static MeshoptBounds callocStack(org.lwjgl.system.MemoryStack stack)
MeshoptBounds instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static MeshoptBounds.Buffer mallocStack(int capacity)
MeshoptBounds.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static MeshoptBounds.Buffer callocStack(int capacity)
MeshoptBounds.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static MeshoptBounds.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
MeshoptBounds.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static MeshoptBounds.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
MeshoptBounds.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static java.nio.FloatBuffer ncenter(long struct)
center().public static float ncenter(long struct,
int index)
center.public static float nradius(long struct)
radius().public static java.nio.FloatBuffer ncone_apex(long struct)
cone_apex().public static float ncone_apex(long struct,
int index)
cone_apex.public static java.nio.FloatBuffer ncone_axis(long struct)
cone_axis().public static float ncone_axis(long struct,
int index)
cone_axis.public static float ncone_cutoff(long struct)
cone_cutoff().public static java.nio.ByteBuffer ncone_axis_s8(long struct)
cone_axis_s8().public static byte ncone_axis_s8(long struct,
int index)
cone_axis_s8.public static byte ncone_cutoff_s8(long struct)
cone_cutoff_s8().Copyright LWJGL. All Rights Reserved. License terms.