public class ParSLMesh
extends org.lwjgl.system.Struct
The vertex data is owned by streamlines context and becomes invalid on any subsequent call to the API. The annotations, spine_lengths,
and random_offsets fields are NULL unless their corresponding flags have been set in ParSLConfig.
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;
}| Modifier and Type | Class and Description |
|---|---|
static class |
ParSLMesh.Buffer
An array of
ParSLMesh structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
ANNOTATIONS
The struct member offsets.
|
static int |
NUM_TRIANGLES
The struct member offsets.
|
static int |
NUM_VERTICES
The struct member offsets.
|
static int |
POSITIONS
The struct member offsets.
|
static int |
RANDOM_OFFSETS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
SPINE_LENGTHS
The struct member offsets.
|
static int |
TRIANGLE_INDICES
The struct member offsets.
|
| Constructor and Description |
|---|
ParSLMesh(java.nio.ByteBuffer container)
Creates a
ParSLMesh instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
ParSLAnnotation.Buffer |
annotations()
Returns a
ParSLAnnotation.Buffer view of the struct array pointed to by the annotations field. |
static ParSLMesh |
create(long address)
Returns a new
ParSLMesh instance for the specified memory address. |
static ParSLMesh.Buffer |
create(long address,
int capacity)
Create a
ParSLMesh.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 of
annotations(). |
static int |
nnum_triangles(long struct)
Unsafe version of
num_triangles(). |
static int |
nnum_vertices(long struct)
Unsafe version of
num_vertices(). |
static ParSLPosition.Buffer |
npositions(long struct)
Unsafe version of
positions(). |
static java.nio.FloatBuffer |
nrandom_offsets(long struct)
Unsafe version of
random_offsets. |
static java.nio.FloatBuffer |
nspine_lengths(long struct)
Unsafe version of
spine_lengths. |
static java.nio.IntBuffer |
ntriangle_indices(long struct,
int capacity)
Unsafe version of
triangle_indices. |
int |
num_triangles()
Returns the value of the
num_triangles field. |
int |
num_vertices()
Returns the value of the
num_vertices field. |
ParSLPosition.Buffer |
positions()
Returns a
ParSLPosition.Buffer view of the struct array pointed to by the positions field. |
java.nio.FloatBuffer |
random_offsets()
Returns a
FloatBuffer view of the data pointed to by the random_offsets field. |
int |
sizeof() |
java.nio.FloatBuffer |
spine_lengths()
Returns a
FloatBuffer view of the data pointed to by the spine_lengths field. |
java.nio.IntBuffer |
triangle_indices(int capacity)
Returns a
IntBuffer view of the data pointed to by the triangle_indices field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int NUM_VERTICES
public static final int NUM_TRIANGLES
public static final int TRIANGLE_INDICES
public static final int POSITIONS
public static final int ANNOTATIONS
public static final int SPINE_LENGTHS
public static final int RANDOM_OFFSETS
public ParSLMesh(java.nio.ByteBuffer container)
ParSLMesh instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int num_vertices()
num_vertices field.public int num_triangles()
num_triangles field.public java.nio.IntBuffer triangle_indices(int capacity)
IntBuffer view of the data pointed to by the triangle_indices field.capacity - the number of elements in the returned bufferpublic ParSLPosition.Buffer positions()
ParSLPosition.Buffer view of the struct array pointed to by the positions field.@Nullable public ParSLAnnotation.Buffer annotations()
ParSLAnnotation.Buffer view of the struct array pointed to by the annotations field.@Nullable public java.nio.FloatBuffer spine_lengths()
FloatBuffer view of the data pointed to by the spine_lengths field.@Nullable public java.nio.FloatBuffer random_offsets()
FloatBuffer view of the data pointed to by the random_offsets field.public static ParSLMesh create(long address)
ParSLMesh instance for the specified memory address.@Nullable public static ParSLMesh createSafe(long address)
public static ParSLMesh.Buffer create(long address, int capacity)
ParSLMesh.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static ParSLMesh.Buffer createSafe(long address, int capacity)
public static int nnum_vertices(long struct)
num_vertices().public static int nnum_triangles(long struct)
num_triangles().public static java.nio.IntBuffer ntriangle_indices(long struct,
int capacity)
triangle_indices.public static ParSLPosition.Buffer npositions(long struct)
positions().@Nullable public static ParSLAnnotation.Buffer nannotations(long struct)
annotations().@Nullable public static java.nio.FloatBuffer nspine_lengths(long struct)
spine_lengths.@Nullable public static java.nio.FloatBuffer nrandom_offsets(long struct)
random_offsets.Copyright LWJGL. All Rights Reserved. License terms.