nphysics icon indicating copy to clipboard operation
nphysics copied to clipboard

Iterating over parts of a body

Open Ralith opened this issue 6 years ago • 0 comments

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.

Ralith avatar Apr 21 '19 21:04 Ralith