nphysics
nphysics copied to clipboard
Iterating over parts of a body
Processing bodies generically (for example, in a force generator) may requires access to body part specific information, such as center of mass. Presently there doesn't appear to be any way to traverse the parts of a body of statically unknown body type. To correct this, Body could be extended with something like fn parts_len(&self) -> usize to guide use of Body::part.