Skip to content
Snippets Groups Projects
Commit d3ffeb3b authored by JasonChmn's avatar JasonChmn
Browse files

Edit wraping from bezier to bezier3, start documentation on bezier_curve

parent 5342d9e8
No related branches found
No related tags found
No related merge requests found
......@@ -42,8 +42,11 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
/* Constructors - destructors */
public:
///\brief Constructor
///\param PointsBegin, PointsEnd : the points parametering the Bezier curve
/// \brief Constructor.
/// Given the first and last point of a control points set, automatically create the bezier curve
/// \param PointsBegin : an iterator pointing to the first element of a control point container
/// \param PointsEnd : an iterator pointing to the last element of a control point container
///
template<typename In>
bezier_curve(In PointsBegin, In PointsEnd)
......@@ -61,8 +64,11 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
pts_.push_back(*it);
}
///\brief Constructor
///\param PointsBegin, PointsEnd : the points parametering the Bezier curve
//// \brief Constructor.
/// Given the first and last point of a control points set, automatically create the bezier curve
/// \param PointsBegin : an iterator pointing to the first element of a control point container
/// \param PointsEnd : an iterator pointing to the last element of a control point container
/// \param T : upper bound of curve parameter which is between $[0;T]$ (default $[0;1]$)
///
template<typename In>
bezier_curve(In PointsBegin, In PointsEnd, const time_t T)
......@@ -82,8 +88,12 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
///\brief Constructor
///\param PointsBegin, PointsEnd : the points parametering the Bezier curve
//// \brief Constructor.
/// Given the first and last point of a control points set, automatically create the bezier curve
/// \param PointsBegin : an iterator pointing to the first element of a control point container
/// \param PointsEnd : an iterator pointing to the last element of a control point container
/// \param T : upper bound of curve parameter which is between $[0;T]$ (default $[0;1]$)
/// \param mult_T :
///
template<typename In>
bezier_curve(In PointsBegin, In PointsEnd, const time_t T, const time_t mult_T)
......
......@@ -76,19 +76,19 @@ Bezier* wrapBezierConstructorConstraintsTemplate(const PointList& array, const C
}
/*3D constructors */
bezier3_t* wrapBezierConstructor(const point_list_t& array)
bezier3_t* wrapBezierConstructor3(const point_list_t& array)
{
return wrapBezierConstructorTemplate<bezier3_t, point_list_t, t_point_t>(array) ;
}
bezier3_t* wrapBezierConstructorBounds(const point_list_t& array, const real ub)
bezier3_t* wrapBezierConstructorBounds3(const point_list_t& array, const real ub)
{
return wrapBezierConstructorTemplate<bezier3_t, point_list_t, t_point_t>(array, ub) ;
}
bezier3_t* wrapBezierConstructorConstraints(const point_list_t& array, const curve_constraints_t& constraints)
bezier3_t* wrapBezierConstructor3Constraints(const point_list_t& array, const curve_constraints_t& constraints)
{
return wrapBezierConstructorConstraintsTemplate<bezier3_t, point_list_t, t_point_t, curve_constraints_t>(array, constraints) ;
}
bezier3_t* wrapBezierConstructorBoundsConstraints(const point_list_t& array, const curve_constraints_t& constraints, const real ub)
bezier3_t* wrapBezierConstructorBounds3Constraints(const point_list_t& array, const curve_constraints_t& constraints, const real ub)
{
return wrapBezierConstructorConstraintsTemplate<bezier3_t, point_list_t, t_point_t, curve_constraints_t>(array, constraints, ub) ;
}
......@@ -238,10 +238,10 @@ BOOST_PYTHON_MODULE(curves)
/** BEGIN bezier curve**/
class_<bezier3_t>
("bezier3", no_init)
.def("__init__", make_constructor(&wrapBezierConstructor))
.def("__init__", make_constructor(&wrapBezierConstructorBounds))
.def("__init__", make_constructor(&wrapBezierConstructorConstraints))
.def("__init__", make_constructor(&wrapBezierConstructorBoundsConstraints))
.def("__init__", make_constructor(&wrapBezierConstructor3))
.def("__init__", make_constructor(&wrapBezierConstructorBounds3))
.def("__init__", make_constructor(&wrapBezierConstructor3Constraints))
.def("__init__", make_constructor(&wrapBezierConstructorBounds3Constraints))
.def("min", &bezier3_t::min)
.def("max", &bezier3_t::max)
.def("__call__", &bezier3_t::operator())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment