Package org.lwjgl.util.par
Class ParSLMesh
- All Implemented Interfaces:
Pointer
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 ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionParSLMesh(ByteBuffer container) Creates aParSLMeshinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescription@Nullable ParSLAnnotation.Bufferstatic 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 @Nullable ParSLMeshcreateSafe(long address) static @Nullable ParSLMesh.BuffercreateSafe(long address, int capacity) static @Nullable 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 @Nullable FloatBuffernrandom_offsets(long struct) Unsafe version ofrandom_offsets.static @Nullable FloatBuffernspine_lengths(long struct) Unsafe version ofspine_lengths.static IntBufferntriangle_indices(long struct, int capacity) Unsafe version oftriangle_indices.intint@Nullable FloatBufferintsizeof()Returnssizeof(struct).@Nullable FloatBuffertriangle_indices(int capacity) Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
NUM_VERTICES
public static final int NUM_VERTICESThe struct member offsets. -
NUM_TRIANGLES
public static final int NUM_TRIANGLESThe struct member offsets. -
TRIANGLE_INDICES
public static final int TRIANGLE_INDICESThe struct member offsets. -
POSITIONS
public static final int POSITIONSThe struct member offsets. -
ANNOTATIONS
public static final int ANNOTATIONSThe struct member offsets. -
SPINE_LENGTHS
public static final int SPINE_LENGTHSThe struct member offsets. -
RANDOM_OFFSETS
public static final int RANDOM_OFFSETSThe struct member offsets.
-
-
Constructor Details
-
ParSLMesh
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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(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
- Returns:
- a
IntBufferview of the data pointed to by thetriangle_indicesfield.
-
positions
- Returns:
- a
ParSLPosition.Bufferview of the struct array pointed to by thepositionsfield.
-
annotations
- Returns:
- a
ParSLAnnotation.Bufferview of the struct array pointed to by theannotationsfield.
-
spine_lengths
- Returns:
- a
FloatBufferview of the data pointed to by thespine_lengthsfield.
-
random_offsets
- Returns:
- a
FloatBufferview of the data pointed to by therandom_offsetsfield.
-
create
Returns a newParSLMeshinstance for the specified memory address. -
createSafe
-
create
Create aParSLMesh.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
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
Unsafe version oftriangle_indices. -
npositions
Unsafe version ofpositions(). -
nannotations
Unsafe version ofannotations(). -
nspine_lengths
Unsafe version ofspine_lengths. -
nrandom_offsets
Unsafe version ofrandom_offsets.
-