Flint Engine / Guide / API Reference

Module spline

Module spline 

Source
Expand description

Pure spline math — Catmull-Rom path sampling with twist (banking).

Provides open and closed spline evaluation from control points, producing evenly-spaced samples with position, forward, right, up basis vectors and parametric t values.

Structs§

SplineControlPoint
A single control point on a Catmull-Rom spline.
SplineSample
A sampled point along a spline with computed basis vectors.

Functions§

catmull_rom
Catmull-Rom spline interpolation between four points.
catmull_rom_scalar
Catmull-Rom interpolation for a single scalar value.
compute_gap_ranges
Compute parametric t-ranges where gap_after is true.
gap_at
Return the gap range containing t, or None.
is_in_gap
Check if parametric t falls within any gap range.
rotate_around_axis
Rotate a vector around an axis by an angle in radians (Rodrigues’ formula).
sample_closed_spline
Sample a closed-loop Catmull-Rom spline at approximately spacing meters apart.
sample_open_spline
Sample an open Catmull-Rom spline at approximately spacing meters apart.