curves Namespace Reference

Namespaces

 helpers
 

Classes

struct  bezier_curve
 
struct  cubic_hermite_spline
 
struct  curve_abc
 Represents a curve of dimension Dim. More...
 
struct  curve_constraints
 
struct  exact_cubic
 
struct  linear_variable
 
struct  piecewise_curve
 
class  polynomial
 Represents a polynomial of an arbitrary order defined on the interval $[t_{min}, t_{max}]$. More...
 
class  SplineOptimizer
 Mosek connection to produce optimized splines. More...
 
struct  variables
 

Functions

template<typename Point , typename T_Point >
T_Point make_cubic_vector (Point const &a, Point const &b, Point const &c, Point const &d)
 Creates coefficient vector of a cubic spline defined on the interval $[t_{min}, t_{max}]$. More...
 
template<typename Time , typename Numeric , bool Safe, typename Point , typename T_Point >
polynomial< Time, Numeric, Safe, Point, T_Point > create_cubic (Point const &a, Point const &b, Point const &c, Point const &d, const Time t_min, const Time t_max)
 
template<typename Polynomial , typename curveTypeToConvert >
Polynomial polynomial_from_curve (const curveTypeToConvert &curve)
 Converts a cubic hermite spline or a bezier curve to a polynomial. More...
 
template<typename Bezier , typename curveTypeToConvert >
Bezier bezier_from_curve (const curveTypeToConvert &curve)
 Converts a cubic hermite spline or polynomial of order 3 or less to a cubic bezier curve. More...
 
template<typename Hermite , typename curveTypeToConvert >
Hermite hermite_from_curve (const curveTypeToConvert &curve)
 Converts a polynomial of order 3 or less/cubic bezier curve to a cubic hermite spline. More...
 
template<int D, typename N >
linear_variable< D, N > operator+ (const linear_variable< D, N > &w1, const linear_variable< D, N > &w2)
 
template<int D, typename N >
linear_variable< D, N > operator- (const linear_variable< D, N > &w1, const linear_variable< D, N > &w2)
 
template<int D, typename N >
linear_variable< D, N > operator* (const double k, const linear_variable< D, N > &w)
 
template<int D, typename N >
linear_variable< D, N > operator* (const linear_variable< D, N > &w, const double k)
 
template<int D, typename N >
linear_variable< D, N > operator/ (const linear_variable< D, N > &w, const double k)
 
template<typename V >
variables< V > operator+ (const variables< V > &w1, const variables< V > &w2)
 
template<typename V >
variables< V > operator- (const variables< V > &w1, const variables< V > &w2)
 
template<typename V >
variables< V > operator* (const double k, const variables< V > &w)
 
template<typename V >
variables< V > operator* (const variables< V > &w, const double k)
 
template<typename V >
variables< V > operator/ (const variables< V > &w, const double k)
 
template<typename _Matrix_Type_ >
void PseudoInverse (_Matrix_Type_ &pinvmat)
 
template<typename Point , typename T_Point >
T_Point make_quintic_vector (Point const &a, Point const &b, Point const &c, Point const &d, Point const &e, Point const &f)
 Creates coefficient vector of a quintic spline defined on the interval $[t_{min}, t_{max}]$. More...
 
template<typename Time , typename Numeric , bool Safe, typename Point , typename T_Point >
polynomial< Time, Numeric, Safe, Point, T_Point > create_quintic (Point const &a, Point const &b, Point const &c, Point const &d, Point const &e, Point const &f, const Time t_min, const Time t_max)
 

Function Documentation

◆ bezier_from_curve()

template<typename Bezier , typename curveTypeToConvert >
Bezier curves::bezier_from_curve ( const curveTypeToConvert &  curve)

Converts a cubic hermite spline or polynomial of order 3 or less to a cubic bezier curve.

Parameters
curve: the polynomial of order 3 or less/cubic hermite spline defined between [Tmin,Tmax] to convert.
Returns
the equivalent cubic bezier curve.

◆ create_cubic()

template<typename Time , typename Numeric , bool Safe, typename Point , typename T_Point >
polynomial<Time, Numeric, Safe, Point, T_Point> curves::create_cubic ( Point const &  a,
Point const &  b,
Point const &  c,
Point const &  d,
const Time  t_min,
const Time  t_max 
)

◆ create_quintic()

template<typename Time , typename Numeric , bool Safe, typename Point , typename T_Point >
polynomial<Time, Numeric, Safe, Point, T_Point> curves::create_quintic ( Point const &  a,
Point const &  b,
Point const &  c,
Point const &  d,
Point const &  e,
Point const &  f,
const Time  t_min,
const Time  t_max 
)

◆ hermite_from_curve()

template<typename Hermite , typename curveTypeToConvert >
Hermite curves::hermite_from_curve ( const curveTypeToConvert &  curve)

Converts a polynomial of order 3 or less/cubic bezier curve to a cubic hermite spline.

Parameters
curve: the polynomial of order 3 or less/cubic bezier curve defined between [Tmin,Tmax] to convert.
Returns
the equivalent cubic hermite spline.

◆ make_cubic_vector()

template<typename Point , typename T_Point >
T_Point curves::make_cubic_vector ( Point const &  a,
Point const &  b,
Point const &  c,
Point const &  d 
)

Creates coefficient vector of a cubic spline defined on the interval $[t_{min}, t_{max}]$.

It follows the equation :
$ x(t) = a + b(t - t_{min}) + c(t - t_{min})^2 + d(t - t_{min})^3 $ where $ t \in [t_{min}, t_{max}] $ with a, b, c and d the control points.

◆ make_quintic_vector()

template<typename Point , typename T_Point >
T_Point curves::make_quintic_vector ( Point const &  a,
Point const &  b,
Point const &  c,
Point const &  d,
Point const &  e,
Point const &  f 
)

Creates coefficient vector of a quintic spline defined on the interval $[t_{min}, t_{max}]$.

It follows the equation :
$ x(t) = a + b(t - t_{min}) + c(t - t_{min})^2 + d(t - t_{min})^3 + e(t - t_{min})^4 + f(t - t_{min})^5 $
where $ t \in [t_{min}, t_{max}] $.

◆ operator*() [1/4]

template<int D, typename N >
linear_variable<D, N> curves::operator* ( const double  k,
const linear_variable< D, N > &  w 
)

◆ operator*() [2/4]

template<int D, typename N >
linear_variable<D, N> curves::operator* ( const linear_variable< D, N > &  w,
const double  k 
)

◆ operator*() [3/4]

template<typename V >
variables<V> curves::operator* ( const double  k,
const variables< V > &  w 
)

◆ operator*() [4/4]

template<typename V >
variables<V> curves::operator* ( const variables< V > &  w,
const double  k 
)

◆ operator+() [1/2]

template<int D, typename N >
linear_variable<D, N> curves::operator+ ( const linear_variable< D, N > &  w1,
const linear_variable< D, N > &  w2 
)
inline

◆ operator+() [2/2]

template<typename V >
variables<V> curves::operator+ ( const variables< V > &  w1,
const variables< V > &  w2 
)

◆ operator-() [1/2]

template<int D, typename N >
linear_variable<D, N> curves::operator- ( const linear_variable< D, N > &  w1,
const linear_variable< D, N > &  w2 
)

◆ operator-() [2/2]

template<typename V >
variables<V> curves::operator- ( const variables< V > &  w1,
const variables< V > &  w2 
)

◆ operator/() [1/2]

template<int D, typename N >
linear_variable<D, N> curves::operator/ ( const linear_variable< D, N > &  w,
const double  k 
)

◆ operator/() [2/2]

template<typename V >
variables<V> curves::operator/ ( const variables< V > &  w,
const double  k 
)

◆ polynomial_from_curve()

template<typename Polynomial , typename curveTypeToConvert >
Polynomial curves::polynomial_from_curve ( const curveTypeToConvert &  curve)

Converts a cubic hermite spline or a bezier curve to a polynomial.

Parameters
curve: the bezier curve/cubic hermite spline defined between [Tmin,Tmax] to convert.
Returns
the equivalent polynomial.

◆ PseudoInverse()

template<typename _Matrix_Type_ >
void curves::PseudoInverse ( _Matrix_Type_ &  pinvmat)