hpp-spline  4.10.0
template based classes for creating and manipulating spline and bezier curves. Comes with extra options specific to end-effector trajectories in robotics.
curve_abc.h
Go to the documentation of this file.
1 
11 #ifndef _STRUCT_CURVE_ABC
12 #define _STRUCT_CURVE_ABC
13 
14 #include "MathDefs.h"
15 
16 #include <functional>
17 
18 namespace spline {
22 template <typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false,
23  typename Point = Eigen::Matrix<Numeric, Dim, 1> >
24 struct curve_abc : std::unary_function<Time, Point> {
25  typedef Point point_t;
26  typedef Time time_t;
27 
28  /* Constructors - destructors */
29  public:
31  curve_abc() {}
32 
34  virtual ~curve_abc() {}
35  /* Constructors - destructors */
36 
37  /*Operations*/
38  public:
42  virtual point_t operator()(const time_t t) const = 0;
43 
48  virtual point_t derivate(const time_t t, const std::size_t order) const = 0;
49  /*Operations*/
50 
51  /*Helpers*/
52  public:
54  virtual time_t min() const = 0;
56  virtual time_t max() const = 0;
57 
58  std::pair<time_t, time_t> timeRange() { return std::make_pair(min(), max()); }
59  /*Helpers*/
60 };
61 } // namespace spline
62 #endif //_STRUCT_CURVE_ABC
spline::curve_abc::curve_abc
curve_abc()
Constructor.
Definition: curve_abc.h:31
spline::curve_abc::point_t
Point point_t
Definition: curve_abc.h:25
spline::curve_abc::timeRange
std::pair< time_t, time_t > timeRange()
Definition: curve_abc.h:58
spline::curve_abc::derivate
virtual point_t derivate(const time_t t, const std::size_t order) const =0
Evaluation of the derivative spline at time t.
spline::helpers::Numeric
double Numeric
Definition: effector_spline.h:26
spline::helpers::Time
double Time
Definition: effector_spline.h:27
spline::helpers::Point
Eigen::Matrix< Numeric, 3, 1 > Point
Definition: effector_spline.h:28
spline::curve_abc::operator()
virtual point_t operator()(const time_t t) const =0
Evaluation of the cubic spline at time t.
MathDefs.h
spline::curve_abc::min
virtual time_t min() const =0
Returns the minimum time for wich curve is defined.
spline::curve_abc
Represents a curve of dimension Dim is Safe is false, no verification is made on the evaluation of th...
Definition: curve_abc.h:24
spline::curve_abc::max
virtual time_t max() const =0
Returns the maximum time for wich curve is defined.
spline::curve_abc::~curve_abc
virtual ~curve_abc()
Destructor.
Definition: curve_abc.h:34
spline
Definition: bernstein.h:20
spline::curve_abc::time_t
Time time_t
Definition: curve_abc.h:26