Class Spline

Nested Relationships

Nested Types

Inheritance Relationships

Derived Type

Class Documentation

class bitbots_splines::Spline

Spline

Generic one dimentional polynomial spline generator

Subclassed by bitbots_splines::SmoothSpline

Public Functions

double pos(double t) const

Return spline interpolation at given t. Compute spline value, its first, second and third derivative

double vel(double t) const
double acc(double t) const
double jerk(double t) const
double posMod(double t) const

Return spline interpolation value, first, second and third derivative with given t bound between 0 and 1

double velMod(double t) const
double accMod(double t) const
double jerkMod(double t) const
double min() const

Return minimum and maximum abscisse value for which spline is defined

double max() const
void exportData(std::ostream &os) const

Write and read splines data into given iostream in ascii format

void importData(std::istream &is)
size_t size() const

Return the number of internal polynom

const SplineT &part(size_t index) const

Access to given by its index

void addPart(const Polynom &poly, double min, double max)

Add a part with given polynom and min/max time range

void copyData(const Spline &sp)

Replace this spline part with the internal data of given spline

Protected Functions

virtual void importCallBack()

Possible override callback after importation

Protected Attributes

std::vector<SplineT> splines_

Spline part container

Private Functions

double interpolation(double x, double (Polynom::* func)(double) const) const

Return spline interpolation of given value and used given polynom evaluation function (member function pointer)

double interpolationMod(double x, double (Polynom::* func)(double) const) const

Return interpolation with x bound between 0 and 1

struct SplineT

Internal spline part structure with a polynom valid on an interval

Public Members

Polynom polynom
double min
double max