30 #ifndef TOWR_VARIABLES_SPLINE_H_ 31 #define TOWR_VARIABLES_SPLINE_H_ 48 using VecPoly = std::vector<CubicHermitePolynomial>;
VecTimes GetPolyDurations() const
Stores at state comprised of values and higher-order derivatives.
A spline built from a sequence of cubic polynomials.
std::vector< double > VecTimes
std::pair< int, double > GetLocalTime(double t_global, const VecTimes &d) const
How much time of the current segment has passed at t_global.
int GetPolynomialCount() const
VecPoly cubic_polys_
the sequence of polynomials making up the spline.
void UpdatePolynomialCoeff()
Updates the cubic-Hermite polynomial coefficients using the currently set nodes values and durations...
static int GetSegmentID(double t_global, const VecTimes &durations)
std::vector< CubicHermitePolynomial > VecPoly
double GetTotalTime() const
const State GetPoint(double t) const
virtual ~Spline()=default
Spline(const VecTimes &poly_durations, int n_dim)