|
Thunderbots Project
|
#include <linear_spline2d.h>


Public Member Functions | |
| LinearSpline2d (const std::vector< Point > &points) | |
| LinearSpline2d (const std::initializer_list< Point > &points) | |
| const Point | getValueAt (double val) const override |
| size_t | getNumKnots (void) const override |
| std::vector< double > | getKnotParametrizationValues () const override |
| const std::vector< Point > | getKnots (void) const override |
| const Point | getStartPoint (void) const override |
| const Point | getEndPoint (void) const override |
| const std::vector< SplineSegment2d > | getSplineSegments () const override |
A linear spline is a spline composed of a series of linear 2d polynomials, ie. a series of connected line segments
|
explicit |
Construct a spline by drawing line segments between consecutive Points
| std::invalid_argument | if points.size() == 0 |
| points | Points on the spline |
| LinearSpline2d | ( | const std::initializer_list< Point > & | points | ) |
Construct a spline by drawing line segments between consecutive Points
| std::invalid_argument | if points.size() == 0 |
| points | Points on the spline |
|
overridevirtual |
|
overridevirtual |
Get the parametrization values corresponding to the knots of this spline
So for example, if we had a 3-knot spline that is linearly interpolated, this function would return {0, 0.5, 1}.
NOTE: There is no guarantee that the knots will be at linearly interpolated (equally spaced) intervals. This could return {0, 0.25, 1.0} and still be well defined.
Implements Spline2d.
|
overridevirtual |
Get the knots of this spline, including the start and end points
Implements Spline2d.
|
overridevirtual |
Gets the number of knots in the spline including start and end points
Implements Spline2d.
|
overridevirtual |
Get the segments that make up this spline.
Implements Spline2d.
|
overridevirtual |
|
overridevirtual |
Calculates the value of spline evaluated at value t
| t | A value in [0,1] to get the value of the spline at. 0 is one endpoint of the spline 1 is the other endpoint of the spline |
Implements Spline2d.