hermite  0.0.1
Public Member Functions | List of all members
hermite::BaseSpline< D > Class Template Referenceabstract

Abstract base class for interpolating splines. More...

#include <base_spline.hpp>

Inheritance diagram for hermite::BaseSpline< D >:
Inheritance graph
[legend]
Collaboration diagram for hermite::BaseSpline< D >:
Collaboration graph
[legend]

Public Member Functions

virtual ~BaseSpline ()=default
 Destructor.
 
virtual double getLowestTime () const =0
 Gets the lower bound of the domain of the piecewise spline function, which is the first time (lowest t-value) listed in the waypoints. More...
 
virtual double getHighestTime () const =0
 Gets the upper bound of the domain of the piecewise spline function, which is the last time (highest t-value) listed in the waypoints. More...
 
virtual Vector< D > getPos (const double t) const =0
 Gets value of the interpolation function at a certain point. More...
 
virtual Vector< D > getVel (const double t) const =0
 Gets derivative of the function at a certain point. More...
 
virtual Vector< D > getAcc (const double t) const =0
 Gets second derivative of the function at a certain point. More...
 
double getMaxDistance (const double timeStep) const
 Gets maximum distance from origin. More...
 
double getMaxSpeed (const double timeStep) const
 Gets maximum speed. More...
 
double getMaxAcceleration (const double timeStep) const
 Gets maximum magnitude of acceleration. More...
 
virtual double getLength (const double timeStep) const =0
 Gets arc length. More...
 
- Public Member Functions inherited from hermite::BaseInterpol< D >
virtual ~BaseInterpol ()=default
 Destructor.
 
virtual Vector< D > operator() (const double t) const
 Gets value of the interpolation function at a certain point. More...
 

Detailed Description

template<std::size_t D>
class hermite::BaseSpline< D >

Abstract base class for interpolating splines.

Member Function Documentation

◆ getAcc()

template<std::size_t D>
virtual Vector<D> hermite::BaseSpline< D >::getAcc ( const double  t) const
pure virtual

Gets second derivative of the function at a certain point.

This will usually be the acceleration.

Parameters
tInput to get value from
Returns
Output from function's second derivative

Implements hermite::BaseInterpol< D >.

Implemented in hermite::Hermite< D >, and hermite::Cubic< D >.

◆ getHighestTime()

template<std::size_t D>
virtual double hermite::BaseSpline< D >::getHighestTime ( ) const
pure virtual

Gets the upper bound of the domain of the piecewise spline function, which is the last time (highest t-value) listed in the waypoints.

Note
If there are no waypoints, then returns 0
Returns
The last time measurement

Implemented in hermite::Hermite< D >, and hermite::Cubic< D >.

◆ getLength()

template<std::size_t D>
virtual double hermite::BaseSpline< D >::getLength ( const double  timeStep) const
pure virtual

Gets arc length.

Parameters
timeStepThe time step to try for the arc length
Note
This function will take much longer for smaller timesteps. Recommended is between 0.001 and 0.1, but this also depends on the domain of your function.
If zero or one poses, returns 0.
Returns
Arc length

Implemented in hermite::Hermite< D >, and hermite::Cubic< D >.

◆ getLowestTime()

template<std::size_t D>
virtual double hermite::BaseSpline< D >::getLowestTime ( ) const
pure virtual

Gets the lower bound of the domain of the piecewise spline function, which is the first time (lowest t-value) listed in the waypoints.

Note
If there are no waypoints, then returns 0
Returns
The first time measurement

Implemented in hermite::Hermite< D >, and hermite::Cubic< D >.

◆ getMaxAcceleration()

template<std::size_t D>
double hermite::BaseSpline< D >::getMaxAcceleration ( const double  timeStep) const
inline

Gets maximum magnitude of acceleration.

Parameters
timeStepThe time step to try for the absolute maximum
Note
This function will take much longer for smaller timesteps. Recommended is between 0.001 and 0.1, but this also depends on the domain of your function.
If no poses, returns 0.
Returns
Magnitude of maximum acceleration.

◆ getMaxDistance()

template<std::size_t D>
double hermite::BaseSpline< D >::getMaxDistance ( const double  timeStep) const
inline

Gets maximum distance from origin.

Parameters
timeStepThe time step to try for the absolute maximum
Note
This function will take much longer for smaller timesteps. Recommended is between 0.001 and 0.1, but this also depends on the domain of your function.
If no waypoints, returns 0.
Returns
Maximum distance from the origin.

◆ getMaxSpeed()

template<std::size_t D>
double hermite::BaseSpline< D >::getMaxSpeed ( const double  timeStep) const
inline

Gets maximum speed.

Parameters
timeStepThe time step to try for the absolute maximum
Note
This function will take much longer for smaller timesteps. Recommended is between 0.001 and 0.1, but this also depends on the domain of your function.
If no poses, returns 0.
Returns
Maximum speed.

◆ getPos()

template<std::size_t D>
virtual Vector<D> hermite::BaseSpline< D >::getPos ( const double  t) const
pure virtual

Gets value of the interpolation function at a certain point.

Same as calling operator()()

Parameters
tInput to get value from
Returns
Output from function

Implements hermite::BaseInterpol< D >.

Implemented in hermite::Hermite< D >, and hermite::Cubic< D >.

◆ getVel()

template<std::size_t D>
virtual Vector<D> hermite::BaseSpline< D >::getVel ( const double  t) const
pure virtual

Gets derivative of the function at a certain point.

This will usually be the velocity.

Parameters
tInput to get value from
Returns
Output from function's derivative

Implements hermite::BaseInterpol< D >.

Implemented in hermite::Hermite< D >, and hermite::Cubic< D >.


The documentation for this class was generated from the following file: