Top Description Inners Fields Constructors Methods
org.lwjgl.util.par

public Class ParSLMesh

extends Struct<ParSLMesh>
Class Inheritance
Annotations
@NativeType:struct parsl_mesh
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

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, and random_offsets fields are NULL unless their corresponding flags have been set in ParSLConfig.

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class
ParSLMesh.Buffer

An array of ParSLMesh structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
ANNOTATIONS

The struct member offsets.

public static final int
NUM_TRIANGLES

The struct member offsets.

public static final int
NUM_VERTICES

The struct member offsets.

public static final int
POSITIONS

The struct member offsets.

public static final int
RANDOM_OFFSETS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
SPINE_LENGTHS

The struct member offsets.

public static final int
TRIANGLE_INDICES

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
ParSLMesh(long address, ByteBuffer container)

public
ParSLMesh(ByteBuffer container)

Creates a ParSLMesh instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public ParSLAnnotation.Buffer

Returns:

a ParSLAnnotation.Buffer view of the struct array pointed to by the annotations field.
annotations
()

protected ParSLMesh
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static ParSLMesh
create(long address)

Returns a new ParSLMesh instance for the specified memory address.

public static ParSLMesh.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a ParSLMesh.Buffer instance at the specified memory.

public static ParSLMesh
createSafe(long address)

Like create, but returns null if address is NULL.

public static ParSLMesh.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public static ParSLAnnotation.Buffer
nannotations(long struct)

Unsafe version of annotations.

public static int
nnum_triangles(long struct)

Unsafe version of num_triangles.

public static int
nnum_vertices(long struct)

Unsafe version of num_vertices.

public static ParSLPosition.Buffer
npositions(long struct)

Unsafe version of positions.

public static FloatBuffer
nrandom_offsets(long struct)

Unsafe version of random_offsets.

public static FloatBuffer
nspine_lengths(long struct)

Unsafe version of spine_lengths.

public static IntBuffer
ntriangle_indices(long struct, int capacity)

Unsafe version of triangle_indices.

public int

Returns:

the value of the num_triangles field.
num_triangles
()

public int

Returns:

the value of the num_vertices field.
num_vertices
()

public ParSLPosition.Buffer

Returns:

a ParSLPosition.Buffer view of the struct array pointed to by the positions field.
positions
()

public FloatBuffer

Returns:

a FloatBuffer view of the data pointed to by the random_offsets field.
random_offsets
()

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public FloatBuffer

Returns:

a FloatBuffer view of the data pointed to by the spine_lengths field.
spine_lengths
()

public IntBuffer

Returns:

a IntBuffer view of the data pointed to by the triangle_indices field.
triangle_indices
(int
the number of elements in the returned buffer
capacity
)

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

ANNOTATIONSback to summary
public static final int ANNOTATIONS

The struct member offsets.

NUM_TRIANGLESback to summary
public static final int NUM_TRIANGLES

The struct member offsets.

NUM_VERTICESback to summary
public static final int NUM_VERTICES

The struct member offsets.

POSITIONSback to summary
public static final int POSITIONS

The struct member offsets.

RANDOM_OFFSETSback to summary
public static final int RANDOM_OFFSETS

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

SPINE_LENGTHSback to summary
public static final int SPINE_LENGTHS

The struct member offsets.

TRIANGLE_INDICESback to summary
public static final int TRIANGLE_INDICES

The struct member offsets.

Constructor Detail

ParSLMeshback to summary
protected ParSLMesh(long address, ByteBuffer container)
ParSLMeshback to summary
public ParSLMesh(ByteBuffer container)

Creates a 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.

Method Detail

annotationsback to summary
public ParSLAnnotation.Buffer annotations()
Returns:ParSLAnnotation.Buffer

a ParSLAnnotation.Buffer view of the struct array pointed to by the annotations field.

Annotations
@Nullable
@NativeType:parsl_annotation *
createback to summary
protected ParSLMesh create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static ParSLMesh create(long address)

Returns a new ParSLMesh instance for the specified memory address.

createback to summary
public static ParSLMesh.Buffer create(long address, int capacity)

Create a ParSLMesh.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static ParSLMesh createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static ParSLMesh.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
nannotationsback to summary
public static ParSLAnnotation.Buffer nannotations(long struct)

Unsafe version of annotations.

Annotations
@Nullable
nnum_trianglesback to summary
public static int nnum_triangles(long struct)

Unsafe version of num_triangles.

nnum_verticesback to summary
public static int nnum_vertices(long struct)

Unsafe version of num_vertices.

npositionsback to summary
public static ParSLPosition.Buffer npositions(long struct)

Unsafe version of positions.

nrandom_offsetsback to summary
public static FloatBuffer nrandom_offsets(long struct)

Unsafe version of random_offsets.

Annotations
@Nullable
nspine_lengthsback to summary
public static FloatBuffer nspine_lengths(long struct)

Unsafe version of spine_lengths.

Annotations
@Nullable
ntriangle_indicesback to summary
public static IntBuffer ntriangle_indices(long struct, int capacity)

Unsafe version of triangle_indices.

num_trianglesback to summary
public int num_triangles()
Returns:int

the value of the num_triangles field.

Annotations
@NativeType:uint32_t
num_verticesback to summary
public int num_vertices()
Returns:int

the value of the num_vertices field.

Annotations
@NativeType:uint32_t
positionsback to summary
public ParSLPosition.Buffer positions()
Returns:ParSLPosition.Buffer

a ParSLPosition.Buffer view of the struct array pointed to by the positions field.

Annotations
@NativeType:parsl_position *
random_offsetsback to summary
public FloatBuffer random_offsets()
Returns:FloatBuffer

a FloatBuffer view of the data pointed to by the random_offsets field.

Annotations
@Nullable
@NativeType:float *
sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
spine_lengthsback to summary
public FloatBuffer spine_lengths()
Returns:FloatBuffer

a FloatBuffer view of the data pointed to by the spine_lengths field.

Annotations
@Nullable
@NativeType:float *
triangle_indicesback to summary
public IntBuffer triangle_indices(int capacity)
Parameters
capacity:int

the number of elements in the returned buffer

Returns:IntBuffer

a IntBuffer view of the data pointed to by the triangle_indices field.

Annotations
@NativeType:uint32_t *
org.lwjgl.util.par back to summary

public Class ParSLMesh.Buffer

extends StructBuffer<ParSLMesh, ParSLMesh.Buffer>
Class Inheritance

An array of ParSLMesh structs.

Field Summary

Modifier and TypeField and Description
private static final ParSLMesh

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new ParSLMesh.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public ParSLAnnotation.Buffer

Returns:

a ParSLAnnotation.Buffer view of the struct array pointed to by the annotations field.
annotations
()

protected ParSLMesh
public int

Returns:

the value of the num_triangles field.
num_triangles
()

public int

Returns:

the value of the num_vertices field.
num_vertices
()

public ParSLPosition.Buffer

Returns:

a ParSLPosition.Buffer view of the struct array pointed to by the positions field.
positions
()

public FloatBuffer

Returns:

a FloatBuffer view of the data pointed to by the random_offsets field.
random_offsets
()

protected ParSLMesh.Buffer
public FloatBuffer

Returns:

a FloatBuffer view of the data pointed to by the spine_lengths field.
spine_lengths
()

public IntBuffer

Returns:

a IntBuffer view of the data pointed to by the triangle_indices field.
triangle_indices
(int
the number of elements in the returned buffer
capacity
)

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final ParSLMesh ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new ParSLMesh.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by ParSLMesh#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

annotationsback to summary
public ParSLAnnotation.Buffer annotations()
Returns:ParSLAnnotation.Buffer

a ParSLAnnotation.Buffer view of the struct array pointed to by the annotations field.

Annotations
@Nullable
@NativeType:parsl_annotation *
getElementFactoryback to summary
protected ParSLMesh getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
num_trianglesback to summary
public int num_triangles()
Returns:int

the value of the num_triangles field.

Annotations
@NativeType:uint32_t
num_verticesback to summary
public int num_vertices()
Returns:int

the value of the num_vertices field.

Annotations
@NativeType:uint32_t
positionsback to summary
public ParSLPosition.Buffer positions()
Returns:ParSLPosition.Buffer

a ParSLPosition.Buffer view of the struct array pointed to by the positions field.

Annotations
@NativeType:parsl_position *
random_offsetsback to summary
public FloatBuffer random_offsets()
Returns:FloatBuffer

a FloatBuffer view of the data pointed to by the random_offsets field.

Annotations
@Nullable
@NativeType:float *
selfback to summary
protected ParSLMesh.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
spine_lengthsback to summary
public FloatBuffer spine_lengths()
Returns:FloatBuffer

a FloatBuffer view of the data pointed to by the spine_lengths field.

Annotations
@Nullable
@NativeType:float *
triangle_indicesback to summary
public IntBuffer triangle_indices(int capacity)
Parameters
capacity:int

the number of elements in the returned buffer

Returns:IntBuffer

a IntBuffer view of the data pointed to by the triangle_indices field.

Annotations
@NativeType:uint32_t *