|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
|
inline |
Normalized arc-length position of the closest point on a polyline.
Inverse to stroke_slider, which places the handle at a fraction of the path's total arc length. Finds the nearest point across all segments and returns its cumulative length divided by the total, so the handle follows the cursor along the path regardless of how far off the path it strays.
Cumulative lengths are computed once and captured; the returned callable allocates nothing per invocation beyond an optional live_offset() call.
| points | Ordered polyline vertices in NDC. Copied into the closure. |
| live_offset | Optional. Current translation of the drawn path - shifts the cursor into the path's own frame rather than re-translating every point per call. |
Definition at line 176 of file Projection.hpp.
Referenced by MayaFlux::Portal::Forma::Geometry::stroke_slider().
Here is the caller graph for this function: