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;
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
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
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, MemoryStack stack) Returns a newSTBRPContext.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBRPContextcalloc(MemoryStack stack) Returns a newSTBRPContextinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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()extra(int index) @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, MemoryStack stack) Returns a newSTBRPContext.Bufferinstance allocated on the specifiedMemoryStack.static STBRPContextmalloc(MemoryStack stack) Returns a newSTBRPContextinstance allocated on the specifiedMemoryStack.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()Returnssizeof(struct).intwidth()Methods 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()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<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
- Returns:
- a
STBRPNode.Buffer view of theextrafield.
-
extra
- Returns:
- a
STBRPNodeview of the struct at the specified index of theextrafield.
-
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
-
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.
-