Package org.lwjgl.util.par
Class ParSLMesh
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.par.ParSLMesh
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class ParSLMesh extends org.lwjgl.system.Struct
Triangle mesh generated by the library.The vertex data is owned by streamlines context and becomes invalid on any subsequent call to the API. The
annotations
,spine_lengths
, andrandom_offsets
fields areNULL
unless their corresponding flags have been set inParSLConfig
.Layout
struct parsl_mesh { uint32_t num_vertices; uint32_t num_triangles; uint32_t * triangle_indices;
parsl_position
* positions;parsl_annotation
* annotations; float * spine_lengths; float * random_offsets; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParSLMesh.Buffer
An array ofParSLMesh
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ANNOTATIONS
NUM_TRIANGLES
NUM_VERTICES
POSITIONS
RANDOM_OFFSETSThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SPINE_LENGTHS
TRIANGLE_INDICESThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description ParSLMesh(java.nio.ByteBuffer container)
Creates aParSLMesh
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ParSLAnnotation.Buffer
annotations()
Returns aParSLAnnotation.Buffer
view of the struct array pointed to by theannotations
field.static ParSLMesh
create(long address)
Returns a newParSLMesh
instance for the specified memory address.static ParSLMesh.Buffer
create(long address, int capacity)
Create aParSLMesh.Buffer
instance at the specified memory.static ParSLMesh
createSafe(long address)
static ParSLMesh.Buffer
createSafe(long address, int capacity)
static ParSLAnnotation.Buffer
nannotations(long struct)
Unsafe version ofannotations()
.static int
nnum_triangles(long struct)
Unsafe version ofnum_triangles()
.static int
nnum_vertices(long struct)
Unsafe version ofnum_vertices()
.static ParSLPosition.Buffer
npositions(long struct)
Unsafe version ofpositions()
.static java.nio.FloatBuffer
nrandom_offsets(long struct)
Unsafe version ofrandom_offsets
.static java.nio.FloatBuffer
nspine_lengths(long struct)
Unsafe version ofspine_lengths
.static java.nio.IntBuffer
ntriangle_indices(long struct, int capacity)
Unsafe version oftriangle_indices
.int
num_triangles()
Returns the value of thenum_triangles
field.int
num_vertices()
Returns the value of thenum_vertices
field.ParSLPosition.Buffer
positions()
Returns aParSLPosition.Buffer
view of the struct array pointed to by thepositions
field.java.nio.FloatBuffer
random_offsets()
Returns aFloatBuffer
view of the data pointed to by therandom_offsets
field.int
sizeof()
java.nio.FloatBuffer
spine_lengths()
Returns aFloatBuffer
view of the data pointed to by thespine_lengths
field.java.nio.IntBuffer
triangle_indices(int capacity)
Returns aIntBuffer
view of the data pointed to by thetriangle_indices
field.
-
-
-
Constructor Detail
-
ParSLMesh
public ParSLMesh(java.nio.ByteBuffer container)
Creates aParSLMesh
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_triangles
public int num_triangles()
Returns the value of thenum_triangles
field.
-
triangle_indices
public java.nio.IntBuffer triangle_indices(int capacity)
Returns aIntBuffer
view of the data pointed to by thetriangle_indices
field.- Parameters:
capacity
- the number of elements in the returned buffer
-
positions
public ParSLPosition.Buffer positions()
Returns aParSLPosition.Buffer
view of the struct array pointed to by thepositions
field.
-
annotations
@Nullable public ParSLAnnotation.Buffer annotations()
Returns aParSLAnnotation.Buffer
view of the struct array pointed to by theannotations
field.
-
spine_lengths
@Nullable public java.nio.FloatBuffer spine_lengths()
Returns aFloatBuffer
view of the data pointed to by thespine_lengths
field.
-
random_offsets
@Nullable public java.nio.FloatBuffer random_offsets()
Returns aFloatBuffer
view of the data pointed to by therandom_offsets
field.
-
create
public static ParSLMesh create(long address)
Returns a newParSLMesh
instance for the specified memory address.
-
createSafe
@Nullable public static ParSLMesh createSafe(long address)
-
create
public static ParSLMesh.Buffer create(long address, int capacity)
Create aParSLMesh.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static ParSLMesh.Buffer createSafe(long address, int capacity)
-
nnum_vertices
public static int nnum_vertices(long struct)
Unsafe version ofnum_vertices()
.
-
nnum_triangles
public static int nnum_triangles(long struct)
Unsafe version ofnum_triangles()
.
-
ntriangle_indices
public static java.nio.IntBuffer ntriangle_indices(long struct, int capacity)
Unsafe version oftriangle_indices
.
-
npositions
public static ParSLPosition.Buffer npositions(long struct)
Unsafe version ofpositions()
.
-
nannotations
@Nullable public static ParSLAnnotation.Buffer nannotations(long struct)
Unsafe version ofannotations()
.
-
nspine_lengths
@Nullable public static java.nio.FloatBuffer nspine_lengths(long struct)
Unsafe version ofspine_lengths
.
-
nrandom_offsets
@Nullable public static java.nio.FloatBuffer nrandom_offsets(long struct)
Unsafe version ofrandom_offsets
.
-
-