Skip to content

Commit

Permalink
add initRoot binding (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy authored Dec 18, 2024
1 parent d98fb54 commit d8b1683
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ PYBIND11_MODULE(Simulation, simulation)
simulation.def("print", [](Node* n){ sofa::simulation::node::print(n); }, sofapython3::doc::simulation::print);
simulation.def("animate", [](Node* n, SReal dt=0.0){ sofa::simulation::node::animate(n, dt); },sofapython3::doc::simulation::animate);
simulation.def("init", [](Node* n){ sofa::simulation::node::init(n); }, sofapython3::doc::simulation::init);
simulation.def("initRoot", [](Node* n){ sofa::simulation::node::initRoot(n); }, sofapython3::doc::simulation::initRoot);
simulation.def("initVisual", [](Node* n){ n->getVisualLoop()->initStep(sofa::core::visual::VisualParams::defaultInstance()); }, sofapython3::doc::simulation::initVisual);
simulation.def("reset", [](Node* n){ sofa::simulation::node::reset(n); }, sofapython3::doc::simulation::reset);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ static auto print =

static auto init =
R"(
Initialize the objects
Initialize the objects in the specified node
)";

static auto initRoot =
R"(
Initialize from the root node
)";

static auto initVisual =
Expand Down

0 comments on commit d8b1683

Please sign in to comment.