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

public Class ParStreamlines

extends Object
Class Inheritance
Imports
javax.annotation.*, org.lwjgl.system.*

Bindings to par_streamlines.h, a single-file, zero-dependency, C99 library that can triangulate wide lines and curves.

Field Summary

Modifier and TypeField and Description
public static final int
PAR_U_MODE_DISTANCE

Configures how the library assigns UV coordinates.

public static final int
PAR_U_MODE_NORMALIZED_DISTANCE

Configures how the library assigns UV coordinates.

public static final int
PAR_U_MODE_SEGMENT_FRACTION

Configures how the library assigns UV coordinates.

public static final int
PAR_U_MODE_SEGMENT_INDEX

Configures how the library assigns UV coordinates.

public static final int
PARSL_FLAG_ANNOTATIONS

Populates mesh.annotations

public static final int
public static final int
PARSL_FLAG_RANDOM_OFFSETS

Populates mesh.random_offsets

public static final int
PARSL_FLAG_SPINE_LENGTHS

Populates mesh.lengths

public static final int
PARSL_FLAG_WIREFRAME

Enables 4 indices per triangle

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static native long
nparsl_create_context(long config)

public static native void
public static native long
nparsl_mesh_from_curves_cubic(long context, long spines)

Unsafe version of: mesh_from_curves_cubic

public static native long
nparsl_mesh_from_curves_quadratic(long context, long spines)

Unsafe version of: mesh_from_curves_quadratic

public static native long
nparsl_mesh_from_lines(long ctx, long spines)

Unsafe version of: mesh_from_lines

public static native long
nparsl_mesh_from_streamlines(long context, long advect, int first_tick, int num_ticks, long userdata)

Unsafe version of: mesh_from_streamlines

public static long
public static void
public static ParSLMesh
parsl_mesh_from_curves_cubic(long context, ParSLSpineList spines)

High-level function that tessellates a series of curves into triangles, where each spine is a series of chained cubic Bézier curves.

public static ParSLMesh
parsl_mesh_from_curves_quadratic(long context, ParSLSpineList spines)

High-level function that tessellates a series of curves into triangles, where each spine is a series of chained quadratic Bézier curves.

public static ParSLMesh
parsl_mesh_from_lines(long ctx, ParSLSpineList spines)

Low-level function that generates two triangles for each line segment.

public static ParSLMesh
parsl_mesh_from_streamlines(long context, ParSLAdvectionCallbackI advect, int first_tick, int num_ticks, long userdata)

High-level function that can be used to visualize a vector field.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

PAR_U_MODE_DISTANCEback to summary
public static final int PAR_U_MODE_DISTANCE

Configures how the library assigns UV coordinates.

Enum values:
PAR_U_MODE_NORMALIZED_DISTANCEback to summary
public static final int PAR_U_MODE_NORMALIZED_DISTANCE

Configures how the library assigns UV coordinates.

Enum values:
PAR_U_MODE_SEGMENT_FRACTIONback to summary
public static final int PAR_U_MODE_SEGMENT_FRACTION

Configures how the library assigns UV coordinates.

Enum values:
PAR_U_MODE_SEGMENT_INDEXback to summary
public static final int PAR_U_MODE_SEGMENT_INDEX

Configures how the library assigns UV coordinates.

Enum values:
PARSL_FLAG_ANNOTATIONSback to summary
public static final int PARSL_FLAG_ANNOTATIONS

Populates mesh.annotations

PARSL_FLAG_CURVE_GUIPARSL_FLAG_DESback to summary
public static final int PARSL_FLAG_CURVE_GUIPARSL_FLAG_DES

Draws control points

PARSL_FLAG_RANDOM_OFFSETSback to summary
public static final int PARSL_FLAG_RANDOM_OFFSETS

Populates mesh.random_offsets

PARSL_FLAG_SPINE_LENGTHSback to summary
public static final int PARSL_FLAG_SPINE_LENGTHS

Populates mesh.lengths

PARSL_FLAG_WIREFRAMEback to summary
public static final int PARSL_FLAG_WIREFRAME

Enables 4 indices per triangle

Constructor Detail

ParStreamlinesback to summary
protected ParStreamlines()

Method Detail

nparsl_create_contextback to summary
public static native long nparsl_create_context(long config)
nparsl_destroy_contextback to summary
public static native void nparsl_destroy_context(long ctx)
nparsl_mesh_from_curves_cubicback to summary
public static native long nparsl_mesh_from_curves_cubic(long context, long spines)

Unsafe version of: mesh_from_curves_cubic

nparsl_mesh_from_curves_quadraticback to summary
public static native long nparsl_mesh_from_curves_quadratic(long context, long spines)

Unsafe version of: mesh_from_curves_quadratic

nparsl_mesh_from_linesback to summary
public static native long nparsl_mesh_from_lines(long ctx, long spines)

Unsafe version of: mesh_from_lines

nparsl_mesh_from_streamlinesback to summary
public static native long nparsl_mesh_from_streamlines(long context, long advect, int first_tick, int num_ticks, long userdata)

Unsafe version of: mesh_from_streamlines

parsl_create_contextback to summary
public static long parsl_create_context(ParSLConfig config)
Annotations
@NativeType:parsl_context *
parsl_destroy_contextback to summary
public static void parsl_destroy_context(long ctx)
parsl_mesh_from_curves_cubicback to summary
public static ParSLMesh parsl_mesh_from_curves_cubic(long context, ParSLSpineList spines)

High-level function that tessellates a series of curves into triangles, where each spine is a series of chained cubic Bézier curves.

The first curve of each spine is defined by an endpoint, followed by two control points, followed by an endpoint. Every subsequent curve in the spine is defined by a single control point followed by an endpoint. Only one control point is required because the first control point is computed via reflection over the endpoint.

The number of vertices in each spine should be 4+(n-1)*2 where n is the number of piecewise curves.

Each spine is equivalent to an SVG path that looks like M C S S S.

Annotations
@Nullable
@NativeType:parsl_mesh *
parsl_mesh_from_curves_quadraticback to summary
public static ParSLMesh parsl_mesh_from_curves_quadratic(long context, ParSLSpineList spines)

High-level function that tessellates a series of curves into triangles, where each spine is a series of chained quadratic Bézier curves.

The first curve of each spine is defined by an endpoint, followed by one control point, followed by an endpoint. Every subsequent curve in the spine is defined by a single control point followed by an endpoint.

The number of vertices in each spine should be 3+(n-1)*2 where n is the number of piecewise curves.

Each spine is equivalent to an SVG path that looks like M Q M Q M Q.

Annotations
@Nullable
@NativeType:parsl_mesh *
parsl_mesh_from_linesback to summary
public static ParSLMesh parsl_mesh_from_lines(long ctx, ParSLSpineList spines)

Low-level function that generates two triangles for each line segment.

Annotations
@Nullable
@NativeType:parsl_mesh *
parsl_mesh_from_streamlinesback to summary
public static ParSLMesh parsl_mesh_from_streamlines(long context, ParSLAdvectionCallbackI advect, int first_tick, int num_ticks, long userdata)

High-level function that can be used to visualize a vector field.

Annotations
@Nullable
@NativeType:parsl_mesh *