curve_abc.h 1.35 KB
Newer Older
1
/**
2
3
* \file curve_abc.h
* \brief interface for a Curve of arbitrary dimension.
4
5
6
7
8
9
10
11
* \author Steve T.
* \version 0.1
* \date 06/17/2013
*
* Interface for a curve
*/


12
13
#ifndef _STRUCT_CURVE_ABC
#define _STRUCT_CURVE_ABC
14
15
16

#include "MathDefs.h"

17
#include <functional>
18
19
20

namespace spline
{
21
22
23
/// \struct curve_abc
/// \brief Represents a curve of dimension Dim
/// is Safe is false, no verification is made on the evaluation of the curve.
24
template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
25
26
27
28
29
30
, typename Point= Eigen::Matrix<Numeric, Dim, 1> >
struct  curve_abc : std::unary_function<Time, Point>
{
	typedef Point 	point_t;
	typedef Time 	time_t;

31
32
/* Constructors - destructors */
	public:
33
	///\brief Constructor
stonneau's avatar
stonneau committed
34
	curve_abc(){};
35

36
	///\brief Destructor
stonneau's avatar
stonneau committed
37
	~curve_abc(){};
38
39
40
41
42
43
/* Constructors - destructors */

/*Operations*/
	public:
	///  \brief Evaluation of the cubic spline at time t.
	///  \param t : the time when to evaluate the spine
44
	///  \param return : the value x(t)
stonneau's avatar
stonneau committed
45
	virtual point_t operator()(time_t t) const = 0;
46
47
48
/*Operations*/

/*Helpers*/
stonneau's avatar
stonneau committed
49
50
51
52
53
	public:
	///  \brief Returns the minimum time for wich curve is defined
	virtual time_t min() const = 0;
	///  \brief Returns the maximum time for wich curve is defined
	virtual time_t max() const = 0;
54
55
56
57
/*Helpers*/

	};
}
58
#endif //_STRUCT_CURVE_ABC
59