Open joeyame opened 2 years ago
Accidentally discovered this while tackling #4. Found a much more cohesive way to convert python objects to rust. Code went from
Ok( Rc::<ForceEffector>::new( input.extract()? ) )
This requires using the pyo3::FromPyObject derive trait on the ForceEffector struct, and automatically maps all the inputs to the rust structure!
Right now, the simulation is defined within the Python infrastructure, and then Rust Structs are created to match. There isn't too much cohesion though. I want to explore directly setting a rust object equal to a python object, and see if this can be done in a more idiomatic way.