public class STBRPContext
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
stbrp_context struct.
extra[2] – we allocate two extra nodes so optimal user-node-count is width not width+2
struct stbrp_context {
int width;
int height;
int align;
int init_mode;
int heuristic;
int num_nodes;
stbrp_node * active_head;
stbrp_node * free_head;
stbrp_node extra[2];
}| Modifier and Type | Class and Description |
|---|---|
static class |
STBRPContext.Buffer
An array of
STBRPContext structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTIVE_HEAD
The struct member offsets.
|
static int |
ALIGN
The struct member offsets.
|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
EXTRA
The struct member offsets.
|
static int |
FREE_HEAD
The struct member offsets.
|
static int |
HEIGHT
The struct member offsets.
|
static int |
HEURISTIC
The struct member offsets.
|
static int |
INIT_MODE
The struct member offsets.
|
static int |
NUM_NODES
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
WIDTH
The struct member offsets.
|
| Constructor and Description |
|---|
STBRPContext(java.nio.ByteBuffer container)
Creates a
STBRPContext instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
STBRPNode |
active_head()
Returns a
STBRPNode view of the struct pointed to by the active_head field. |
int |
align()
Returns the value of the
align field. |
static STBRPContext |
calloc()
Returns a new
STBRPContext instance allocated with memCalloc. |
static STBRPContext.Buffer |
calloc(int capacity)
Returns a new
STBRPContext.Buffer instance allocated with memCalloc. |
static STBRPContext |
callocStack()
Returns a new
STBRPContext instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static STBRPContext.Buffer |
callocStack(int capacity)
Returns a new
STBRPContext.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static STBRPContext.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
STBRPContext.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static STBRPContext |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
STBRPContext instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static STBRPContext |
create()
Returns a new
STBRPContext instance allocated with BufferUtils. |
static STBRPContext.Buffer |
create(int capacity)
Returns a new
STBRPContext.Buffer instance allocated with BufferUtils. |
static STBRPContext |
create(long address)
Returns a new
STBRPContext instance for the specified memory address. |
static STBRPContext.Buffer |
create(long address,
int capacity)
Create a
STBRPContext.Buffer instance at the specified memory. |
static STBRPContext |
createSafe(long address)
|
static STBRPContext.Buffer |
createSafe(long address,
int capacity)
|
STBRPNode.Buffer |
extra()
Returns a
STBRPNode.Buffer view of the extra field. |
STBRPNode |
extra(int index)
Returns a
STBRPNode view of the struct at the specified index of the extra field. |
STBRPNode |
free_head()
Returns a
STBRPNode view of the struct pointed to by the free_head field. |
int |
height()
Returns the value of the
height field. |
int |
heuristic()
Returns the value of the
heuristic field. |
int |
init_mode()
Returns the value of the
init_mode field. |
static STBRPContext |
malloc()
Returns a new
STBRPContext instance allocated with memAlloc. |
static STBRPContext.Buffer |
malloc(int capacity)
Returns a new
STBRPContext.Buffer instance allocated with memAlloc. |
static STBRPContext |
mallocStack()
Returns a new
STBRPContext instance allocated on the thread-local MemoryStack. |
static STBRPContext.Buffer |
mallocStack(int capacity)
Returns a new
STBRPContext.Buffer instance allocated on the thread-local MemoryStack. |
static STBRPContext.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
STBRPContext.Buffer instance allocated on the specified MemoryStack. |
static STBRPContext |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
STBRPContext instance allocated on the specified MemoryStack. |
static STBRPNode |
nactive_head(long struct)
Unsafe version of
active_head(). |
static int |
nalign(long struct)
Unsafe version of
align(). |
static STBRPNode.Buffer |
nextra(long struct)
Unsafe version of
extra(). |
static STBRPNode |
nextra(long struct,
int index)
Unsafe version of
extra. |
static STBRPNode |
nfree_head(long struct)
Unsafe version of
free_head(). |
static int |
nheight(long struct)
Unsafe version of
height(). |
static int |
nheuristic(long struct)
Unsafe version of
heuristic(). |
static int |
ninit_mode(long struct)
Unsafe version of
init_mode(). |
static int |
nnum_nodes(long struct)
Unsafe version of
num_nodes(). |
int |
num_nodes()
Returns the value of the
num_nodes field. |
static int |
nwidth(long struct)
Unsafe version of
width(). |
int |
sizeof() |
int |
width()
Returns the value of the
width field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int WIDTH
public static final int HEIGHT
public static final int ALIGN
public static final int INIT_MODE
public static final int HEURISTIC
public static final int NUM_NODES
public static final int ACTIVE_HEAD
public static final int FREE_HEAD
public static final int EXTRA
public STBRPContext(java.nio.ByteBuffer container)
STBRPContext 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 int width()
width field.public int height()
height field.public int align()
align field.public int init_mode()
init_mode field.public int heuristic()
heuristic field.public int num_nodes()
num_nodes field.@Nullable public STBRPNode active_head()
STBRPNode view of the struct pointed to by the active_head field.@Nullable public STBRPNode free_head()
STBRPNode view of the struct pointed to by the free_head field.public STBRPNode.Buffer extra()
STBRPNode.Buffer view of the extra field.public STBRPNode extra(int index)
STBRPNode view of the struct at the specified index of the extra field.public static STBRPContext malloc()
STBRPContext instance allocated with memAlloc. The instance must be explicitly freed.public static STBRPContext calloc()
STBRPContext instance allocated with memCalloc. The instance must be explicitly freed.public static STBRPContext create()
STBRPContext instance allocated with BufferUtils.public static STBRPContext create(long address)
STBRPContext instance for the specified memory address.@Nullable public static STBRPContext createSafe(long address)
public static STBRPContext.Buffer malloc(int capacity)
STBRPContext.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static STBRPContext.Buffer calloc(int capacity)
STBRPContext.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static STBRPContext.Buffer create(int capacity)
STBRPContext.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static STBRPContext.Buffer create(long address, int capacity)
STBRPContext.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static STBRPContext.Buffer createSafe(long address, int capacity)
public static STBRPContext mallocStack()
STBRPContext instance allocated on the thread-local MemoryStack.public static STBRPContext callocStack()
STBRPContext instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static STBRPContext mallocStack(org.lwjgl.system.MemoryStack stack)
STBRPContext instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static STBRPContext callocStack(org.lwjgl.system.MemoryStack stack)
STBRPContext instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static STBRPContext.Buffer mallocStack(int capacity)
STBRPContext.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static STBRPContext.Buffer callocStack(int capacity)
STBRPContext.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static STBRPContext.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
STBRPContext.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static STBRPContext.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
STBRPContext.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 int nwidth(long struct)
width().public static int nheight(long struct)
height().public static int nalign(long struct)
align().public static int ninit_mode(long struct)
init_mode().public static int nheuristic(long struct)
heuristic().public static int nnum_nodes(long struct)
num_nodes().@Nullable public static STBRPNode nactive_head(long struct)
active_head().@Nullable public static STBRPNode nfree_head(long struct)
free_head().public static STBRPNode.Buffer nextra(long struct)
extra().Copyright LWJGL. All Rights Reserved. License terms.