Package org.lwjgl.stb
Class STBRPContext
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct stbrp_context {
int width;
int height;
int align;
int init_mode;
int heuristic;
int num_nodes;
{@link STBRPNode stbrp_node} * active_head;
{@link STBRPNode stbrp_node} * free_head;
{@link STBRPNode stbrp_node} extra[2];
}
-
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 member offsets.static final int
The struct member offsets.static 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 size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionSTBRPContext
(ByteBuffer container) Creates aSTBRPContext
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescription@Nullable STBRPNode
int
align()
static STBRPContext
calloc()
Returns a newSTBRPContext
instance allocated withmemCalloc
.static STBRPContext.Buffer
calloc
(int capacity) Returns a newSTBRPContext.Buffer
instance allocated withmemCalloc
.static STBRPContext.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSTBRPContext.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBRPContext
calloc
(MemoryStack stack) Returns a newSTBRPContext
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBRPContext
Deprecated.static STBRPContext.Buffer
callocStack
(int capacity) Deprecated.static STBRPContext.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static STBRPContext
callocStack
(MemoryStack stack) Deprecated.static STBRPContext
create()
Returns a newSTBRPContext
instance allocated withBufferUtils
.static STBRPContext.Buffer
create
(int capacity) Returns a newSTBRPContext.Buffer
instance allocated withBufferUtils
.static STBRPContext
create
(long address) Returns a newSTBRPContext
instance for the specified memory address.static STBRPContext.Buffer
create
(long address, int capacity) Create aSTBRPContext.Buffer
instance at the specified memory.static @Nullable STBRPContext
createSafe
(long address) static @Nullable STBRPContext.Buffer
createSafe
(long address, int capacity) extra()
extra
(int index) @Nullable STBRPNode
int
height()
int
int
static STBRPContext
malloc()
Returns a newSTBRPContext
instance allocated withmemAlloc
.static STBRPContext.Buffer
malloc
(int capacity) Returns a newSTBRPContext.Buffer
instance allocated withmemAlloc
.static STBRPContext.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSTBRPContext.Buffer
instance allocated on the specifiedMemoryStack
.static STBRPContext
malloc
(MemoryStack stack) Returns a newSTBRPContext
instance allocated on the specifiedMemoryStack
.static STBRPContext
Deprecated.static STBRPContext.Buffer
mallocStack
(int capacity) Deprecated.static STBRPContext.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static STBRPContext
mallocStack
(MemoryStack stack) Deprecated.static @Nullable STBRPNode
nactive_head
(long struct) Unsafe version ofactive_head()
.static int
nalign
(long struct) Unsafe version ofalign()
.static STBRPNode.Buffer
nextra
(long struct) Unsafe version ofextra()
.static STBRPNode
nextra
(long struct, int index) Unsafe version ofextra
.static @Nullable STBRPNode
nfree_head
(long struct) Unsafe version offree_head()
.static int
nheight
(long struct) Unsafe version ofheight()
.static int
nheuristic
(long struct) Unsafe version ofheuristic()
.static int
ninit_mode
(long struct) Unsafe version ofinit_mode()
.static int
nnum_nodes
(long struct) Unsafe version ofnum_nodes()
.int
static int
nwidth
(long struct) Unsafe version ofwidth()
.int
sizeof()
Returnssizeof(struct)
.int
width()
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. -
WIDTH
public static final int WIDTHThe struct member offsets. -
HEIGHT
public static final int HEIGHTThe struct member offsets. -
ALIGN
public static final int ALIGNThe struct member offsets. -
INIT_MODE
public static final int INIT_MODEThe struct member offsets. -
HEURISTIC
public static final int HEURISTICThe struct member offsets. -
NUM_NODES
public static final int NUM_NODESThe struct member offsets. -
ACTIVE_HEAD
public static final int ACTIVE_HEADThe struct member offsets. -
FREE_HEAD
public static final int FREE_HEADThe struct member offsets. -
EXTRA
public static final int EXTRAThe struct member offsets.
-
-
Constructor Details
-
STBRPContext
Creates aSTBRPContext
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<STBRPContext>
-
width
public int width()- Returns:
- the value of the
width
field.
-
height
public int height()- Returns:
- the value of the
height
field.
-
align
public int align()- Returns:
- the value of the
align
field.
-
init_mode
public int init_mode()- Returns:
- the value of the
init_mode
field.
-
heuristic
public int heuristic()- Returns:
- the value of the
heuristic
field.
-
num_nodes
public int num_nodes()- Returns:
- the value of the
num_nodes
field.
-
active_head
- Returns:
- a
STBRPNode
view of the struct pointed to by theactive_head
field.
-
free_head
- Returns:
- a
STBRPNode
view of the struct pointed to by thefree_head
field.
-
extra
- Returns:
- a
STBRPNode
.Buffer view of theextra
field.
-
extra
- Returns:
- a
STBRPNode
view of the struct at the specified index of theextra
field.
-
malloc
Returns a newSTBRPContext
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSTBRPContext
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSTBRPContext
instance allocated withBufferUtils
. -
create
Returns a newSTBRPContext
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBRPContext.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSTBRPContext.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSTBRPContext.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSTBRPContext.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newSTBRPContext
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSTBRPContext
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSTBRPContext.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSTBRPContext.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nwidth
public static int nwidth(long struct) Unsafe version ofwidth()
. -
nheight
public static int nheight(long struct) Unsafe version ofheight()
. -
nalign
public static int nalign(long struct) Unsafe version ofalign()
. -
ninit_mode
public static int ninit_mode(long struct) Unsafe version ofinit_mode()
. -
nheuristic
public static int nheuristic(long struct) Unsafe version ofheuristic()
. -
nnum_nodes
public static int nnum_nodes(long struct) Unsafe version ofnum_nodes()
. -
nactive_head
Unsafe version ofactive_head()
. -
nfree_head
Unsafe version offree_head()
. -
nextra
Unsafe version ofextra()
. -
nextra
Unsafe version ofextra
.
-