cubic_hermite_spline.h 15.4 KB
 JasonChmn committed May 20, 2019 1 2 3 4 5 6 7 /** * \file cubic_hermite_spline.h * \brief class allowing to create a cubic hermite spline of any dimension. * \author Justin Carpentier modified by Jason Chemin * \date 05/2019 */  JasonChmn committed Apr 25, 2019 8 9 10 11 12 13 14 15 16 17 18 19 20 #ifndef _CLASS_CUBICHERMITESPLINE #define _CLASS_CUBICHERMITESPLINE #include "curve_abc.h" #include "curve_constraint.h" #include "MathDefs.h" #include #include #include  JasonChmn committed Sep 03, 2019 21 22 23 24 25 #include "serialization/archive.hpp" #include "serialization/eigen-matrix.hpp" #include  JasonChmn committed Apr 25, 2019 26 27 namespace curves {  JasonChmn committed Sep 03, 2019 28 29 30 31 32 33 34 35 36 37  /// \class CubicHermiteSpline. /// \brief Represents a set of cubic hermite splines defining a continuous function \f$p(t)\f$. /// A hermite cubic spline is a minimal degree polynom interpolating a function in two /// points \f$P_i\f$ and \f$P_{i+1}\f$ with its tangent \f$m_i\f$ and \f$m_{i+1}\f$.
/// A hermite cubic spline : /// - crosses each of the waypoint given in its initialization (\f$P_0\f$, \f$P_1\f$,...,\f$P_N\f$). /// - has its derivatives on \f$P_i\f$ and \f$P_{i+1}\f$ are \f$p'(t_{P_i}) = m_i\f$ and \f$p'(t_{P_{i+1}}) = m_{i+1}\f$. /// template,  JasonChmn committed Sep 03, 2019 38  typename Tangent= Eigen::Matrix >  JasonChmn committed Sep 03, 2019 39 40 41  struct cubic_hermite_spline : public curve_abc, public serialization::Serializable< cubic_hermite_spline > {  JasonChmn committed May 20, 2019 42 43 44  typedef std::pair pair_point_tangent_t; typedef std::vector< pair_point_tangent_t ,Eigen::aligned_allocator > t_pair_point_tangent_t; typedef std::vector