Package org.lwjgl.util.par
Class ParSLSpineList
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.par.ParSLSpineList
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class ParSLSpineList extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Client-owned list of line strips that will be tessellated.Layout
struct parsl_spine_list { uint32_t num_vertices; uint16_t num_spines;
parsl_position
* vertices; uint16_t * spine_lengths; bool closed; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParSLSpineList.Buffer
An array ofParSLSpineList
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CLOSED
NUM_SPINES
NUM_VERTICESThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SPINE_LENGTHS
VERTICESThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description ParSLSpineList(java.nio.ByteBuffer container)
Creates aParSLSpineList
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParSLSpineList
calloc()
Returns a newParSLSpineList
instance allocated withmemCalloc
.static ParSLSpineList.Buffer
calloc(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated withmemCalloc
.static ParSLSpineList
callocStack()
Returns a newParSLSpineList
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ParSLSpineList.Buffer
callocStack(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ParSLSpineList.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLSpineList.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ParSLSpineList
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLSpineList
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.boolean
closed()
Returns the value of theclosed
field.ParSLSpineList
closed(boolean value)
Sets the specified value to theclosed
field.static ParSLSpineList
create()
Returns a newParSLSpineList
instance allocated withBufferUtils
.static ParSLSpineList.Buffer
create(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated withBufferUtils
.static ParSLSpineList
create(long address)
Returns a newParSLSpineList
instance for the specified memory address.static ParSLSpineList.Buffer
create(long address, int capacity)
Create aParSLSpineList.Buffer
instance at the specified memory.static ParSLSpineList
createSafe(long address)
static ParSLSpineList.Buffer
createSafe(long address, int capacity)
static ParSLSpineList
malloc()
Returns a newParSLSpineList
instance allocated withmemAlloc
.static ParSLSpineList.Buffer
malloc(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated withmemAlloc
.static ParSLSpineList
mallocStack()
Returns a newParSLSpineList
instance allocated on the thread-localMemoryStack
.static ParSLSpineList.Buffer
mallocStack(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated on the thread-localMemoryStack
.static ParSLSpineList.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLSpineList.Buffer
instance allocated on the specifiedMemoryStack
.static ParSLSpineList
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLSpineList
instance allocated on the specifiedMemoryStack
.static boolean
nclosed(long struct)
Unsafe version ofclosed()
.static void
nclosed(long struct, boolean value)
Unsafe version ofclosed
.static short
nnum_spines(long struct)
Unsafe version ofnum_spines()
.static void
nnum_spines(long struct, short value)
Sets the specified value to thenum_spines
field of the specifiedstruct
.static int
nnum_vertices(long struct)
Unsafe version ofnum_vertices()
.static void
nnum_vertices(long struct, int value)
Sets the specified value to thenum_vertices
field of the specifiedstruct
.static java.nio.ShortBuffer
nspine_lengths(long struct)
Unsafe version ofspine_lengths
.static void
nspine_lengths(long struct, java.nio.ShortBuffer value)
Unsafe version ofspine_lengths
.short
num_spines()
Returns the value of thenum_spines
field.int
num_vertices()
Returns the value of thenum_vertices
field.static ParSLPosition.Buffer
nvertices(long struct)
Unsafe version ofvertices()
.static void
nvertices(long struct, ParSLPosition.Buffer value)
Unsafe version ofvertices
.ParSLSpineList
set(ParSLPosition.Buffer vertices, java.nio.ShortBuffer spine_lengths, boolean closed)
Initializes this struct with the specified values.ParSLSpineList
set(ParSLSpineList src)
Copies the specified struct data to this struct.int
sizeof()
java.nio.ShortBuffer
spine_lengths()
Returns aShortBuffer
view of the data pointed to by thespine_lengths
field.ParSLSpineList
spine_lengths(java.nio.ShortBuffer value)
Sets the address of the specifiedShortBuffer
to thespine_lengths
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.ParSLPosition.Buffer
vertices()
Returns aParSLPosition.Buffer
view of the struct array pointed to by thevertices
field.ParSLSpineList
vertices(ParSLPosition.Buffer value)
Sets the address of the specifiedParSLPosition.Buffer
to thevertices
field.
-
-
-
Constructor Detail
-
ParSLSpineList
public ParSLSpineList(java.nio.ByteBuffer container)
Creates aParSLSpineList
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
num_vertices
public int num_vertices()
Returns the value of thenum_vertices
field.
-
num_spines
public short num_spines()
Returns the value of thenum_spines
field.
-
vertices
public ParSLPosition.Buffer vertices()
Returns aParSLPosition.Buffer
view of the struct array pointed to by thevertices
field.
-
spine_lengths
public java.nio.ShortBuffer spine_lengths()
Returns aShortBuffer
view of the data pointed to by thespine_lengths
field.
-
closed
public boolean closed()
Returns the value of theclosed
field.
-
vertices
public ParSLSpineList vertices(ParSLPosition.Buffer value)
Sets the address of the specifiedParSLPosition.Buffer
to thevertices
field.
-
spine_lengths
public ParSLSpineList spine_lengths(java.nio.ShortBuffer value)
Sets the address of the specifiedShortBuffer
to thespine_lengths
field.
-
closed
public ParSLSpineList closed(boolean value)
Sets the specified value to theclosed
field.
-
set
public ParSLSpineList set(ParSLPosition.Buffer vertices, java.nio.ShortBuffer spine_lengths, boolean closed)
Initializes this struct with the specified values.
-
set
public ParSLSpineList set(ParSLSpineList src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static ParSLSpineList malloc()
Returns a newParSLSpineList
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static ParSLSpineList calloc()
Returns a newParSLSpineList
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static ParSLSpineList create()
Returns a newParSLSpineList
instance allocated withBufferUtils
.
-
create
public static ParSLSpineList create(long address)
Returns a newParSLSpineList
instance for the specified memory address.
-
createSafe
@Nullable public static ParSLSpineList createSafe(long address)
-
malloc
public static ParSLSpineList.Buffer malloc(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static ParSLSpineList.Buffer calloc(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static ParSLSpineList.Buffer create(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static ParSLSpineList.Buffer create(long address, int capacity)
Create aParSLSpineList.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static ParSLSpineList.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ParSLSpineList mallocStack()
Returns a newParSLSpineList
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static ParSLSpineList callocStack()
Returns a newParSLSpineList
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static ParSLSpineList mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLSpineList
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static ParSLSpineList callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLSpineList
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static ParSLSpineList.Buffer mallocStack(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static ParSLSpineList.Buffer callocStack(int capacity)
Returns a newParSLSpineList.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static ParSLSpineList.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLSpineList.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static ParSLSpineList.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLSpineList.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nnum_vertices
public static int nnum_vertices(long struct)
Unsafe version ofnum_vertices()
.
-
nnum_spines
public static short nnum_spines(long struct)
Unsafe version ofnum_spines()
.
-
nvertices
public static ParSLPosition.Buffer nvertices(long struct)
Unsafe version ofvertices()
.
-
nspine_lengths
public static java.nio.ShortBuffer nspine_lengths(long struct)
Unsafe version ofspine_lengths
.
-
nclosed
public static boolean nclosed(long struct)
Unsafe version ofclosed()
.
-
nnum_vertices
public static void nnum_vertices(long struct, int value)
Sets the specified value to thenum_vertices
field of the specifiedstruct
.
-
nnum_spines
public static void nnum_spines(long struct, short value)
Sets the specified value to thenum_spines
field of the specifiedstruct
.
-
nvertices
public static void nvertices(long struct, ParSLPosition.Buffer value)
Unsafe version ofvertices
.
-
nspine_lengths
public static void nspine_lengths(long struct, java.nio.ShortBuffer value)
Unsafe version ofspine_lengths
.
-
nclosed
public static void nclosed(long struct, boolean value)
Unsafe version ofclosed
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-