Package org.lwjgl.stb
Class STBRPContext
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<STBRPContext>
org.lwjgl.stb.STBRPContext
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class STBRPContext
extends org.lwjgl.system.Struct<STBRPContext>
implements org.lwjgl.system.NativeResource
The opaque
stbrp_context struct.
Layout
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];
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct member offsets.static 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 size in bytes.static final intThe 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 aSTBRPContextinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescription@Nullable STBRPNodeintalign()static STBRPContextcalloc()Returns a newSTBRPContextinstance allocated withmemCalloc.static STBRPContext.Buffercalloc(int capacity) Returns a newSTBRPContext.Bufferinstance allocated withmemCalloc.static STBRPContext.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newSTBRPContext.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBRPContextcalloc(org.lwjgl.system.MemoryStack stack) Returns a newSTBRPContextinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBRPContextDeprecated.static STBRPContext.BuffercallocStack(int capacity) Deprecated.static STBRPContext.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static STBRPContextcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static STBRPContextcreate()Returns a newSTBRPContextinstance allocated withBufferUtils.static STBRPContext.Buffercreate(int capacity) Returns a newSTBRPContext.Bufferinstance allocated withBufferUtils.static STBRPContextcreate(long address) Returns a newSTBRPContextinstance for the specified memory address.static STBRPContext.Buffercreate(long address, int capacity) Create aSTBRPContext.Bufferinstance at the specified memory.static @Nullable STBRPContextcreateSafe(long address) static @Nullable STBRPContext.BuffercreateSafe(long address, int capacity) extra()we allocate two extra nodes so optimal user-node-count iswidthnotwidth+2extra(int index) we allocate two extra nodes so optimal user-node-count iswidthnotwidth+2@Nullable STBRPNodeintheight()intintstatic STBRPContextmalloc()Returns a newSTBRPContextinstance allocated withmemAlloc.static STBRPContext.Buffermalloc(int capacity) Returns a newSTBRPContext.Bufferinstance allocated withmemAlloc.static STBRPContext.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newSTBRPContext.Bufferinstance allocated on the specifiedMemoryStack.static STBRPContextmalloc(org.lwjgl.system.MemoryStack stack) Returns a newSTBRPContextinstance allocated on the specifiedMemoryStack.static STBRPContextDeprecated.static STBRPContext.BuffermallocStack(int capacity) Deprecated.static STBRPContext.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static STBRPContextmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static @Nullable STBRPNodenactive_head(long struct) Unsafe version ofactive_head().static intnalign(long struct) Unsafe version ofalign().static STBRPNode.Buffernextra(long struct) Unsafe version ofextra().static STBRPNodenextra(long struct, int index) Unsafe version ofextra.static @Nullable STBRPNodenfree_head(long struct) Unsafe version offree_head().static intnheight(long struct) Unsafe version ofheight().static intnheuristic(long struct) Unsafe version ofheuristic().static intninit_mode(long struct) Unsafe version ofinit_mode().static intnnum_nodes(long struct) Unsafe version ofnum_nodes().intstatic intnwidth(long struct) Unsafe version ofwidth().intsizeof()intwidth()Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods 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. -
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 aSTBRPContextinstance 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<STBRPContext>
-
width
public int width()- Returns:
- the value of the
widthfield.
-
height
public int height()- Returns:
- the value of the
heightfield.
-
align
public int align()- Returns:
- the value of the
alignfield.
-
init_mode
public int init_mode()- Returns:
- the value of the
init_modefield.
-
heuristic
public int heuristic()- Returns:
- the value of the
heuristicfield.
-
num_nodes
public int num_nodes()- Returns:
- the value of the
num_nodesfield.
-
active_head
- Returns:
- a
STBRPNodeview of the struct pointed to by theactive_headfield.
-
free_head
- Returns:
- a
STBRPNodeview of the struct pointed to by thefree_headfield.
-
extra
we allocate two extra nodes so optimal user-node-count iswidthnotwidth+2 -
extra
we allocate two extra nodes so optimal user-node-count iswidthnotwidth+2 -
malloc
Returns a newSTBRPContextinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSTBRPContextinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSTBRPContextinstance allocated withBufferUtils. -
create
Returns a newSTBRPContextinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBRPContext.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSTBRPContext.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSTBRPContext.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSTBRPContext.Bufferinstance 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 public static STBRPContext.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static STBRPContext.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newSTBRPContextinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSTBRPContextinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSTBRPContext.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSTBRPContext.Bufferinstance allocated on the specifiedMemoryStackand 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.
-