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

Spline vector calculator. More...

#include <cubic_vec.hpp>

Public Member Functions

 CubicVec ()=default
 Default constructor. More...
 
 CubicVec (const std::vector< Pose< D >> &waypoints)
 Constructor. More...
 
 CubicVec (const CubicVec< D > &other)
 Copy constructor.
 
CubicVec< D > & operator= (const CubicVec< D > &other)
 Assignment operator.
 
 ~CubicVec ()=default
 Destructor.
 
Vector< D > splpos (const double t) const
 
Vector< D > splvel (const double t) const
 
Vector< D > splacc (const double t) const
 

Detailed Description

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

Spline vector calculator.

Calculates spline for vectors in C++ STL containers

Constructor & Destructor Documentation

◆ CubicVec() [1/2]

template<std::size_t D>
hermite::CubicVec< D >::CubicVec ( )
default

Default constructor.

Note
Initializing with a default constructor and then using the methods will result in undefined behavior. Make sure that you are assigning the current object to another one with two or more waypoints, or you check bounds before using any of the methods.

◆ CubicVec() [2/2]

template<std::size_t D>
hermite::CubicVec< D >::CubicVec ( const std::vector< Pose< D >> &  waypoints)
inline

Constructor.

Takes a list of poses and calculates the position values and time values for each pose in each dimension efficiently (linear complexity to the number of waypoints, times the number of dimensions).

Note
Assumes that the size of poses is greater than or equal to 2, it is sorted by time, and there are no repeated times. Otherwise, there will be undefined behavior.
Parameters
waypointsA list of poses

Member Function Documentation

◆ splacc()

template<std::size_t D>
Vector<D> hermite::CubicVec< D >::splacc ( const double  t) const
inline

Gets acceleration value given a time input

Parameters
tTime input
Returns
Acceleration vector at a given time

◆ splpos()

template<std::size_t D>
Vector<D> hermite::CubicVec< D >::splpos ( const double  t) const
inline

Gets position value given a time input

Parameters
tTime input
Returns
Position vector at a given time

◆ splvel()

template<std::size_t D>
Vector<D> hermite::CubicVec< D >::splvel ( const double  t) const
inline

Gets velocity value given a time input

Parameters
tTime input
Returns
Velocity vector at a given time

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