|
Thunderbots Project
|
#include <spline2d.h>

Public Member Functions | |
| virtual const Point | getValueAt (double t) const =0 |
| virtual const std::vector< Point > | getKnots () const =0 |
| virtual size_t | getNumKnots () const =0 |
| virtual std::vector< double > | getKnotParametrizationValues () const =0 |
| virtual const Point | getStartPoint () const =0 |
| virtual const Point | getEndPoint () const =0 |
| virtual const std::vector< SplineSegment2d > | getSplineSegments () const =0 |
Static Protected Member Functions | |
| static SplineSegment2d | createSplineSegment2d (double start_val, double end_val, Polynomial2d polynomial) |
A 2D spline, consistent of a series of connected 2D polynomials.
Important terms: "knot" - A point on the spline where two consecutive polynomials meet
|
staticprotected |
Create a SplineSegment2d
The reason that this function exists is because friendship is not inherited, and we do not want to publicly expose the constructor for SplineSegment2d. So we allow subclasses to create segments via this function.
| start_val | The first value at which to evaluate the polynomial that lies on the spline |
| end_val | The last value at which to evaluate the polynomial that lies on the spline |
| polynomial | The polynomial, part of which is on the spline |
|
pure virtual |
Gets end point of spline
Implemented in CubicBezierSpline2d, and LinearSpline2d.
|
pure virtual |
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.
Implemented in CubicBezierSpline2d, and LinearSpline2d.
|
pure virtual |
Get the knots of this spline, including the start and end points
Implemented in CubicBezierSpline2d, and LinearSpline2d.
|
pure virtual |
Gets the number of knots in the spline including start and end points
Implemented in CubicBezierSpline2d, and LinearSpline2d.
|
pure virtual |
Get the segments that make up this spline.
Implemented in CubicBezierSpline2d, and LinearSpline2d.
|
pure virtual |
Gets start point of spline
Implemented in CubicBezierSpline2d, and LinearSpline2d.
|
pure virtual |
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 |
Implemented in CubicBezierSpline2d, and LinearSpline2d.