@@ -61,30 +61,30 @@ PYBIND11_MODULE(Simulation, simulation)
6161
6262 simulation.doc () =sofapython3::doc::simulation::Class;
6363
64- simulation.def (" print" , [](Node* n){ sofa::simulation::getSimulation ()-> print (n); }, sofapython3::doc::simulation::print);
65- simulation.def (" animate" , [](Node* n, SReal dt=0.0 ){ sofa::simulation::getSimulation ()-> animate (n, dt); },sofapython3::doc::simulation::animate);
66- simulation.def (" init" , [](Node* n){ sofa::simulation::getSimulation ()-> init (n); }, sofapython3::doc::simulation::init);
64+ simulation.def (" print" , [](Node* n){ sofa::simulation::node:: print (n); }, sofapython3::doc::simulation::print);
65+ simulation.def (" animate" , [](Node* n, SReal dt=0.0 ){ sofa::simulation::node:: animate (n, dt); },sofapython3::doc::simulation::animate);
66+ simulation.def (" init" , [](Node* n){ sofa::simulation::node::initRoot (n); }, sofapython3::doc::simulation::init);
6767 simulation.def (" initVisual" , [](Node* n){ n->getVisualLoop ()->initStep (sofa::core::visual::VisualParams::defaultInstance ()); });
68- simulation.def (" reset" , [](Node* n){ sofa::simulation::getSimulation ()-> reset (n); }, sofapython3::doc::simulation::reset);
68+ simulation.def (" reset" , [](Node* n){ sofa::simulation::node:: reset (n); }, sofapython3::doc::simulation::reset);
6969 simulation.def (" load" , [](const std::string & name) {
70- sofa::simulation::Node::SPtr node = sofa::simulation::getSimulation ()-> load (name);
70+ sofa::simulation::Node::SPtr node = sofa::simulation::node:: load (name);
7171 return node ? py::cast (node.get ()) : py::none ();
7272 }, sofapython3::doc::simulation::load);
7373 simulation.def (" unload" , [](Node* n){
7474 auto & memcache = getObjectCache ();
75- sofa::simulation::getSimulation ()-> unload (n);
75+ sofa::simulation::node:: unload (n);
7676 memcache.clear ();
7777 }, sofapython3::doc::simulation::unload);
7878 simulation.def (" animateNSteps" , [](Node *n, int n_steps, SReal dt=0.0 ){
7979 for (int i = 0 ; i < n_steps; i++)
8080 {
81- sofa::simulation::getSimulation ()-> animate (n, dt); // Execute one timestep. If dt is 0, the dt parameter in the graph will be used
81+ sofa::simulation::node:: animate (n, dt); // Execute one timestep. If dt is 0, the dt parameter in the graph will be used
8282 }
8383 }, sofapython3::doc::simulation::animateNSteps, py::arg (" root_node" ), py::arg (" n_steps" ) = 1 , py::arg (" dt" ) = 0.0 );
84- simulation.def (" updateVisual" , [](Node* n){ sofa::simulation::getSimulation ()-> updateVisual (n); });
84+ simulation.def (" updateVisual" , [](Node* n){ sofa::simulation::node:: updateVisual (n); });
8585 simulation.def (" initTextures" , [](Node* n)
8686 {
87- sofa::simulation::getSimulation ()-> initTextures (n);
87+ sofa::simulation::node:: initTextures (n);
8888 });
8989}
9090
0 commit comments