Flint Engine / Guide / API Reference

compute_gap_ranges

Function compute_gap_ranges 

Source
pub fn compute_gap_ranges(
    points: &[SplineControlPoint],
    closed: bool,
) -> Vec<(f32, f32)>
Expand description

Compute parametric t-ranges where gap_after is true.

For a closed spline with N control points, CP k spans t = k/N to (k+1)/N. For an open spline with N control points, CP k spans t = k/(N-1) to (k+1)/(N-1). Consecutive gap_after CPs merge into a single range. Closed splines handle wrap-around (last CP → first CP).