Commit 129b0aa2 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

Implement compute_derivate for cubic_hermite

parent 29b56978
......@@ -161,15 +161,20 @@ struct cubic_hermite_spline : public curve_abc<Time, Numeric, Safe, Point> {
cubic_hermite_spline_t compute_derivate(const std::size_t /*order*/) const {
throw std::logic_error("Compute derivate for cubic hermite spline is not implemented yet.");
piecewise_bezier_t compute_derivate(const std::size_t order) const {
piecewise_bezier_t res;
for(size_t i = 0 ; i < size_ - 1 ; ++i){
const bezier_t curve = buildCurrentBezier(time_control_points_[i]);
return res;
/// \brief Compute the derived curve at order N.
/// \param order : order of derivative.
/// \return A pointer to \f$\frac{d^Nx(t)}{dt^N}\f$ derivative order N of the curve.
cubic_hermite_spline_t* compute_derivate_ptr(const std::size_t order) const {
return new cubic_hermite_spline_t(compute_derivate(order));
piecewise_bezier_t* compute_derivate_ptr(const std::size_t order) const {
return new piecewise_bezier_t(compute_derivate(order));
/// \brief Set time of each control point of cubic hermite spline.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment