Concatenated quintic Hermite spline with arc-length parameterization.
More...
#include <spline.hpp>
Concatenated quintic Hermite spline with arc-length parameterization.
Construct from a list of Waypoints; the resulting spline can then be sampled by global arc length s ∈ [0, totalArcLen()].
Definition at line 60 of file spline.hpp.
◆ Spline() [1/2]
| light::Spline::Spline |
( |
| ) |
|
|
default |
◆ Spline() [2/2]
| light::Spline::Spline |
( |
const std::vector< Waypoint > & |
wps | ) |
|
|
explicit |
Build a spline from waypoints.
- Parameters
-
| wps | ordered list of waypoints; must have at least 2 entries |
◆ curvatureAt()
| float light::Spline::curvatureAt |
( |
float |
s | ) |
const |
Signed curvature at arc length s.
- Parameters
-
- Returns
- curvature in 1/in; positive = CW (matches theta sign)
◆ headingAt()
| float light::Spline::headingAt |
( |
float |
s | ) |
const |
Heading at arc length s, in radians.
- Parameters
-
- Returns
atan2(dx, dy) — LightLib convention (+Y forward)
◆ sampleAt()
Sample pose / derivatives at arc length s.
- Parameters
-
◆ segmentCount()
| size_t light::Spline::segmentCount |
( |
| ) |
const |
|
inline |
- Returns
- Number of internal Hermite segments.
Definition at line 79 of file spline.hpp.
◆ totalArcLen()
| float light::Spline::totalArcLen |
( |
| ) |
const |
|
inline |
- Returns
- Total arc length of the spline, inches.
Definition at line 76 of file spline.hpp.
◆ valid()
| bool light::Spline::valid |
( |
| ) |
const |
|
inline |
- Returns
- true if the spline has at least one segment.
Definition at line 73 of file spline.hpp.
The documentation for this class was generated from the following file: