Class ParStreamlines
- java.lang.Object
-
- org.lwjgl.util.par.ParStreamlines
-
public class ParStreamlines extends java.lang.ObjectBindings to par_streamlines.h, a single-file, zero-dependency, C99 library that can triangulate wide lines and curves.
-
-
Field Summary
Fields Modifier and Type Field Description static intPAR_U_MODE_DISTANCE
PAR_U_MODE_NORMALIZED_DISTANCE
PAR_U_MODE_SEGMENT_FRACTION
PAR_U_MODE_SEGMENT_INDEXConfigures how the library assigns UV coordinates.static intPARSL_FLAG_ANNOTATIONSPopulatesmesh.annotationsstatic intPARSL_FLAG_CURVE_GUIPARSL_FLAG_DESDraws control pointsstatic intPARSL_FLAG_RANDOM_OFFSETSPopulatesmesh.random_offsetsstatic intPARSL_FLAG_SPINE_LENGTHSPopulatesmesh.lengthsstatic intPARSL_FLAG_WIREFRAMEEnables 4 indices per triangle
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longnparsl_create_context(long config)static voidnparsl_destroy_context(long ctx)static longnparsl_mesh_from_curves_cubic(long context, long spines)Unsafe version of:mesh_from_curves_cubicstatic longnparsl_mesh_from_curves_quadratic(long context, long spines)Unsafe version of:mesh_from_curves_quadraticstatic longnparsl_mesh_from_lines(long ctx, long spines)Unsafe version of:mesh_from_linesstatic longnparsl_mesh_from_streamlines(long context, long advect, int first_tick, int num_ticks, long userdata)Unsafe version of:mesh_from_streamlinesstatic longparsl_create_context(ParSLConfig config)static voidparsl_destroy_context(long ctx)static ParSLMeshparsl_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.static ParSLMeshparsl_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.static ParSLMeshparsl_mesh_from_lines(long ctx, ParSLSpineList spines)Low-level function that generates two triangles for each line segment.static ParSLMeshparsl_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.
-
-
-
Field Detail
-
PAR_U_MODE_NORMALIZED_DISTANCE, PAR_U_MODE_DISTANCE, PAR_U_MODE_SEGMENT_INDEX, PAR_U_MODE_SEGMENT_FRACTION
Configures how the library assigns UV coordinates.Enum values:
PAR_U_MODE_NORMALIZED_DISTANCE- This is the default.PAR_U_MODE_DISTANCE- Non-normalized distance along the curve.PAR_U_MODE_SEGMENT_INDEX- Starts at zero for each curve, counts up.PAR_U_MODE_SEGMENT_FRACTION- 0.0, 1.0 / COUNT, 2.0 / COUNT, etc...
-
PARSL_FLAG_WIREFRAME
Enables 4 indices per triangle
-
PARSL_FLAG_ANNOTATIONS
Populatesmesh.annotations
-
PARSL_FLAG_SPINE_LENGTHS
Populatesmesh.lengths
-
PARSL_FLAG_RANDOM_OFFSETS
Populatesmesh.random_offsets
-
PARSL_FLAG_CURVE_GUIPARSL_FLAG_DES
Draws control points
-
-
Method Detail
-
nparsl_create_context
public static long nparsl_create_context(long config)
-
parsl_create_context
public static long parsl_create_context(ParSLConfig config)
-
nparsl_destroy_context
public static void nparsl_destroy_context(long ctx)
-
parsl_destroy_context
public static void parsl_destroy_context(long ctx)
-
nparsl_mesh_from_lines
public static long nparsl_mesh_from_lines(long ctx, long spines)Unsafe version of:mesh_from_lines
-
parsl_mesh_from_lines
@Nullable public static ParSLMesh parsl_mesh_from_lines(long ctx, ParSLSpineList spines)
Low-level function that generates two triangles for each line segment.
-
nparsl_mesh_from_streamlines
public static long nparsl_mesh_from_streamlines(long context, long advect, int first_tick, int num_ticks, long userdata)Unsafe version of:mesh_from_streamlines
-
parsl_mesh_from_streamlines
@Nullable 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.
-
nparsl_mesh_from_curves_cubic
public static long nparsl_mesh_from_curves_cubic(long context, long spines)Unsafe version of:mesh_from_curves_cubic
-
parsl_mesh_from_curves_cubic
@Nullable 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)*2wherenis the number of piecewise curves.Each spine is equivalent to an SVG path that looks like
M C S S S.
-
nparsl_mesh_from_curves_quadratic
public static long nparsl_mesh_from_curves_quadratic(long context, long spines)Unsafe version of:mesh_from_curves_quadratic
-
parsl_mesh_from_curves_quadratic
@Nullable 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)*2wherenis the number of piecewise curves.Each spine is equivalent to an SVG path that looks like
M Q M Q M Q.
-
-