spline::bezier_curve< Time, Numeric, Dim, Safe, Point > Struct Template Reference

#include <parametric-curves/bezier_curve.h>

Inheritance diagram for spline::bezier_curve< Time, Numeric, Dim, Safe, Point >:
Collaboration diagram for spline::bezier_curve< Time, Numeric, Dim, Safe, Point >:

Public Types

typedef Point point_t
 
typedef Time time_t
 
typedef Numeric num_t
 
typedef curve_constraints< point_tcurve_constraints_t
 
typedef std::vector< point_t, Eigen::aligned_allocator< point_t > > t_point_t
 
typedef t_point_t::const_iterator cit_point_t
 
typedef bezier_curve< Time, Numeric, Dim, Safe, Point > bezier_curve_t
 

Public Member Functions

template<typename In >
 bezier_curve (In PointsBegin, In PointsEnd, const time_t minBound=0, const time_t maxBound=1)
 Constructor. More...
 
template<typename In >
 bezier_curve (In PointsBegin, In PointsEnd, const curve_constraints_t &constraints, const time_t minBound=0, const time_t maxBound=1)
 Constructor This constructor will add 4 points (2 after the first one, 2 before the last one) to ensure that velocity and acceleration constraints are respected. More...
 
 ~bezier_curve ()
 Destructor. More...
 
virtual point_t operator() (const time_t t) const
 Evaluation of the cubic spline at time t. More...
 
bezier_curve_t compute_derivate (const std::size_t order) const
 Computes the derivative curve at order N. More...
 
bezier_curve_t compute_primitive (const std::size_t order) const
 Computes the primitive of the curve at order N. More...
 
virtual point_t derivate (const time_t t, const std::size_t order) const
 Evaluates the derivative at order N of the curve. If the derivative is to be evaluated several times, it is rather recommended to compute the derivative curve using compute_derivate. More...
 
point_t evalBernstein (const Numeric u) const
 Evaluates all Bernstein polynomes for a certain degree. More...
 
point_t evalHorner (const Numeric t) const
 Evaluates all Bernstein polynomes for a certain degree using horner's scheme. More...
 
const t_point_twaypoints () const
 
virtual time_t min () const
 
virtual time_t max () const
 

Public Attributes

const time_t minBound_
 
const time_t maxBound_
 
const std::size_t size_
 
const std::size_t degree_
 
const std::vector< Bern< Numeric > > bernstein_
 

Member Typedef Documentation

◆ bezier_curve_t

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef bezier_curve<Time, Numeric, Dim, Safe, Point> spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bezier_curve_t

◆ cit_point_t

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef t_point_t::const_iterator spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::cit_point_t

◆ curve_constraints_t

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef curve_constraints<point_t> spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::curve_constraints_t

◆ num_t

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Numeric spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::num_t

◆ point_t

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Point spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::point_t

◆ t_point_t

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef std::vector<point_t, Eigen::aligned_allocator<point_t> > spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::t_point_t

◆ time_t

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Time spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::time_t

Constructor & Destructor Documentation

◆ bezier_curve() [1/2]

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
template<typename In >
spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bezier_curve ( In  PointsBegin,
In  PointsEnd,
const time_t  minBound = 0,
const time_t  maxBound = 1 
)
inline

Constructor.

Parameters
PointsBegin,PointsEnd: the points parametering the Bezier curve

◆ bezier_curve() [2/2]

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
template<typename In >
spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bezier_curve ( In  PointsBegin,
In  PointsEnd,
const curve_constraints_t constraints,
const time_t  minBound = 0,
const time_t  maxBound = 1 
)
inline

Constructor This constructor will add 4 points (2 after the first one, 2 before the last one) to ensure that velocity and acceleration constraints are respected.

Parameters
PointsBegin,PointsEnd: the points parametering the Bezier curve
constraints: constraints applying on start / end velocities and acceleration

◆ ~bezier_curve()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::~bezier_curve ( )
inline

Destructor.

Member Function Documentation

◆ compute_derivate()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
bezier_curve_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::compute_derivate ( const std::size_t  order) const
inline

Computes the derivative curve at order N.

Parameters
order: order of the derivative
return: the value x(t)

◆ compute_primitive()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
bezier_curve_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::compute_primitive ( const std::size_t  order) const
inline

Computes the primitive of the curve at order N.

Parameters
constant: value of the primitive at t = 0
return: the curve x_1(t) such that d/dt(x_1(t)) = x_1(t)

◆ derivate()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual point_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::derivate ( const time_t  t,
const std::size_t  order 
) const
inlinevirtual

Evaluates the derivative at order N of the curve. If the derivative is to be evaluated several times, it is rather recommended to compute the derivative curve using compute_derivate.

Parameters
order: order of the derivative
t: the time when to evaluate the spine
return: the value x(t)

◆ evalBernstein()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
point_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::evalBernstein ( const Numeric  u) const
inline

Evaluates all Bernstein polynomes for a certain degree.

◆ evalHorner()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
point_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::evalHorner ( const Numeric  t) const
inline

Evaluates all Bernstein polynomes for a certain degree using horner's scheme.

◆ max()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual time_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::max ( ) const
inlinevirtual

◆ min()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual time_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::min ( ) const
inlinevirtual

◆ operator()()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual point_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::operator() ( const time_t  t) const
inlinevirtual

Evaluation of the cubic spline at time t.

Parameters
t: the time when to evaluate the spine
return: the value x(t)

◆ waypoints()

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const t_point_t& spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::waypoints ( ) const
inline

Member Data Documentation

◆ bernstein_

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const std::vector<Bern<Numeric> > spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::bernstein_

◆ degree_

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const std::size_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::degree_

◆ maxBound_

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const time_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::maxBound_

◆ minBound_

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const time_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::minBound_

◆ size_

template<typename Time = double, typename Numeric = Time, Eigen::Index Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
const std::size_t spline::bezier_curve< Time, Numeric, Dim, Safe, Point >::size_

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