Package org.lwjgl.stb
Class STBRPContext
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.stb.STBRPContext
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class STBRPContext extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceThe opaquestbrp_contextstruct.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_nodeextra()[2]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSTBRPContext.BufferAn array ofSTBRPContextstructs.
-
Field Summary
Fields Modifier and Type Field Description static intACTIVE_HEAD
ALIGNThe struct member offsets.static intALIGNOFThe struct alignment in bytes.static intEXTRA
FREE_HEAD
HEIGHT
HEURISTIC
INIT_MODE
NUM_NODESThe struct member offsets.static intSIZEOFThe struct size in bytes.static intWIDTHThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description STBRPContext(java.nio.ByteBuffer container)Creates aSTBRPContextinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description STBRPNodeactive_head()intalign()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 STBRPContextcallocStack()Deprecated.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 STBRPContextcreateSafe(long address)static STBRPContext.BuffercreateSafe(long address, int capacity)STBRPNode.Bufferextra()we allocate two extra nodes so optimal user-node-count iswidthnotwidth+2STBRPNodeextra(int index)we allocate two extra nodes so optimal user-node-count iswidthnotwidth+2STBRPNodefree_head()intheight()intheuristic()intinit_mode()static 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 STBRPContextmallocStack()Deprecated.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 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 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().intnum_nodes()static intnwidth(long struct)Unsafe version ofwidth().intsizeof()intwidth()
-
-
-
Constructor Detail
-
STBRPContext
public STBRPContext(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
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
@Nullable public STBRPNode active_head()
- Returns:
- a
STBRPNodeview of the struct pointed to by theactive_headfield.
-
free_head
@Nullable public STBRPNode free_head()
- Returns:
- a
STBRPNodeview of the struct pointed to by thefree_headfield.
-
extra
public STBRPNode.Buffer extra() public STBRPNode extra(int index)
we allocate two extra nodes so optimal user-node-count iswidthnotwidth+2
-
malloc
public static STBRPContext malloc()
Returns a newSTBRPContextinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static STBRPContext calloc()
Returns a newSTBRPContextinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static STBRPContext create()
Returns a newSTBRPContextinstance allocated withBufferUtils.
-
create
public static STBRPContext create(long address)
Returns a newSTBRPContextinstance for the specified memory address.
-
createSafe
@Nullable public static STBRPContext createSafe(long address)
-
malloc
public static STBRPContext.Buffer malloc(int capacity)
Returns a newSTBRPContext.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static STBRPContext.Buffer calloc(int capacity)
Returns a newSTBRPContext.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static STBRPContext.Buffer create(int capacity)
Returns a newSTBRPContext.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static STBRPContext.Buffer create(long address, int capacity)
Create aSTBRPContext.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static STBRPContext.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static STBRPContext mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static STBRPContext callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static STBRPContext mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static STBRPContext callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static STBRPContext.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static STBRPContext.Buffer callocStack(int capacity)
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
public static STBRPContext malloc(org.lwjgl.system.MemoryStack stack)
Returns a newSTBRPContextinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static STBRPContext calloc(org.lwjgl.system.MemoryStack stack)
Returns a newSTBRPContextinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static STBRPContext.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBRPContext.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static STBRPContext.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBRPContext.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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
@Nullable public static STBRPNode nactive_head(long struct)
Unsafe version ofactive_head().
-
nfree_head
@Nullable public static STBRPNode nfree_head(long struct)
Unsafe version offree_head().
-
nextra
public static STBRPNode.Buffer nextra(long struct)
Unsafe version ofextra().
-
-