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