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.StructTriangle 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_offsetsfields areNULLunless 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 classParSLMesh.BufferAn array ofParSLMeshstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intANNOTATIONS
NUM_TRIANGLES
NUM_VERTICES
POSITIONS
RANDOM_OFFSETSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSPINE_LENGTHS
TRIANGLE_INDICESThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description ParSLMesh(java.nio.ByteBuffer container)Creates aParSLMeshinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ParSLAnnotation.Bufferannotations()static ParSLMeshcreate(long address)Returns a newParSLMeshinstance for the specified memory address.static ParSLMesh.Buffercreate(long address, int capacity)Create aParSLMesh.Bufferinstance at the specified memory.static ParSLMeshcreateSafe(long address)static ParSLMesh.BuffercreateSafe(long address, int capacity)static ParSLAnnotation.Buffernannotations(long struct)Unsafe version ofannotations().static intnnum_triangles(long struct)Unsafe version ofnum_triangles().static intnnum_vertices(long struct)Unsafe version ofnum_vertices().static ParSLPosition.Buffernpositions(long struct)Unsafe version ofpositions().static java.nio.FloatBuffernrandom_offsets(long struct)Unsafe version ofrandom_offsets.static java.nio.FloatBuffernspine_lengths(long struct)Unsafe version ofspine_lengths.static java.nio.IntBufferntriangle_indices(long struct, int capacity)Unsafe version oftriangle_indices.intnum_triangles()intnum_vertices()ParSLPosition.Bufferpositions()java.nio.FloatBufferrandom_offsets()intsizeof()java.nio.FloatBufferspine_lengths()java.nio.IntBuffertriangle_indices(int capacity)
-
-
-
Constructor Detail
-
ParSLMesh
public ParSLMesh(java.nio.ByteBuffer container)
Creates aParSLMeshinstance 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
-
num_vertices
public int num_vertices()
- Returns:
- the value of the
num_verticesfield.
-
num_triangles
public int num_triangles()
- Returns:
- the value of the
num_trianglesfield.
-
triangle_indices
public java.nio.IntBuffer triangle_indices(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
IntBufferview of the data pointed to by thetriangle_indicesfield.
-
positions
public ParSLPosition.Buffer positions()
- Returns:
- a
ParSLPosition.Bufferview of the struct array pointed to by thepositionsfield.
-
annotations
@Nullable public ParSLAnnotation.Buffer annotations()
- Returns:
- a
ParSLAnnotation.Bufferview of the struct array pointed to by theannotationsfield.
-
spine_lengths
@Nullable public java.nio.FloatBuffer spine_lengths()
- Returns:
- a
FloatBufferview of the data pointed to by thespine_lengthsfield.
-
random_offsets
@Nullable public java.nio.FloatBuffer random_offsets()
- Returns:
- a
FloatBufferview of the data pointed to by therandom_offsetsfield.
-
create
public static ParSLMesh create(long address)
Returns a newParSLMeshinstance 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.Bufferinstance 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.
-
-