Commit 11fd64fb authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[Python] expose operator == and serialization of curve_constraints

parent 9485a479
......@@ -1005,7 +1005,23 @@ BOOST_PYTHON_MODULE(curves) {
.add_property("init_jerk", &get_init_jerk, &set_init_jerk)
.add_property("end_vel", &get_end_vel, &set_end_vel)
.add_property("end_acc", &get_end_acc, &set_end_acc)
.add_property("end_jerk", &get_end_jerk, &set_end_jerk);
.add_property("end_jerk", &get_end_jerk, &set_end_jerk)
.def("__eq__", &curve_constraints_t::operator==)
.def("__ne__", &curve_constraints_t::operator!=)
.def("saveAsText", &curve_constraints_t::saveAsText<curve_constraints_t>, bp::args("filename"),
"Saves *this inside a text file.")
.def("loadFromText", &curve_constraints_t::loadFromText<curve_constraints_t>, bp::args("filename"),
"Loads *this from a text file.")
.def("saveAsXML", &curve_constraints_t::saveAsXML<curve_constraints_t>, bp::args("filename", "tag_name"),
"Saves *this inside a XML file.")
.def("loadFromXML", &curve_constraints_t::loadFromXML<curve_constraints_t>,
bp::args("filename", "tag_name"), "Loads *this from a XML file.")
.def("saveAsBinary", &curve_constraints_t::saveAsBinary<curve_constraints_t>, bp::args("filename"),
"Saves *this inside a binary file.")
.def("loadFromBinary", &curve_constraints_t::loadFromBinary<curve_constraints_t>, bp::args("filename"),
"Loads *this from a binary file.")
.def_pickle(curve_pickle_suite<curve_constraints_t>());
;
/** END curve constraints**/
/** BEGIN bernstein polynomial**/
class_<bernstein_t>("bernstein", init<const unsigned int, const unsigned int>())
......
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