Commit 7aac53f6 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[Python] add bindings for cs::phaseAtTime method

parent ad3c119e
...@@ -206,6 +206,16 @@ struct ContactSequencePythonVisitor : public bp::def_visitor<ContactSequencePyth ...@@ -206,6 +206,16 @@ struct ContactSequencePythonVisitor : public bp::def_visitor<ContactSequencePyth
"for each contact phases in the sequence.\n" "for each contact phases in the sequence.\n"
"During the phases where no contact normal forces are defined," "During the phases where no contact normal forces are defined,"
"the trajectory is constant with the value of 0.") "the trajectory is constant with the value of 0.")
.def("phaseIdAtTime", &CS::phaseIdAtTime,
bp::arg("time"),
"return the index of a phase in the sequence such that "
"phase.timeInitial <= t < phase.timeFinal \n"
"if t equal to the last phase timeFinal, this index is returned.")
.def("phaseAtTime", &CS::phaseAtTime,
bp::arg("time"), bp::return_internal_reference<>(),
"return a phase of the sequence such that "
"phase.timeInitial <= t < phase.timeFinal \n"
"if t equal to the last phase timeFinal, this index is returned.")
.def(bp::self == bp::self) .def(bp::self == bp::self)
.def(bp::self != bp::self) .def(bp::self != bp::self)
.def("copy", &copy, "Returns a copy of *this."); .def("copy", &copy, "Returns a copy of *this.");
......
Supports Markdown
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