A spline built from a sequence of cubic polynomials. More...
#include <spline.h>

Public Types | |
| using | VecPoly = std::vector< CubicHermitePolynomial > |
| using | VecTimes = std::vector< double > |
Public Member Functions | |
| const State | GetPoint (double t) const |
| const State | GetPoint (int poly_id, double t_local) const |
| VecTimes | GetPolyDurations () const |
| int | GetPolynomialCount () const |
| double | GetTotalTime () const |
| Spline (const VecTimes &poly_durations, int n_dim) | |
| virtual | ~Spline ()=default |
Static Public Member Functions | |
| static int | GetSegmentID (double t_global, const VecTimes &durations) |
Protected Member Functions | |
| std::pair< int, double > | GetLocalTime (double t_global, const VecTimes &d) const |
| How much time of the current segment has passed at t_global. More... | |
| void | UpdatePolynomialCoeff () |
| Updates the cubic-Hermite polynomial coefficients using the currently set nodes values and durations. More... | |
Protected Attributes | |
| VecPoly | cubic_polys_ |
| the sequence of polynomials making up the spline. More... | |
A spline built from a sequence of cubic polynomials.
This class is responsible for stitching together multiple individual polynomials into one spline.
| using towr::Spline::VecPoly = std::vector<CubicHermitePolynomial> |
| using towr::Spline::VecTimes = std::vector<double> |
| towr::Spline::Spline | ( | const VecTimes & | poly_durations, |
| int | n_dim | ||
| ) |
|
virtualdefault |
|
protected |
| const State towr::Spline::GetPoint | ( | double | t | ) | const |
| const State towr::Spline::GetPoint | ( | int | poly_id, |
| double | t_local | ||
| ) | const |
| poly_id | Polynomial id, 0 is first polynomial. |
| t_local | Time along the current polynomial. |
| Spline::VecTimes towr::Spline::GetPolyDurations | ( | ) | const |
| int towr::Spline::GetPolynomialCount | ( | ) | const |
|
static |
| double towr::Spline::GetTotalTime | ( | ) | const |
|
protected |
|
protected |