Skip to main content

combine

Function combine 

Source
pub fn combine<'a>(bodies: impl IntoIterator<Item = &'a Body> + Clone) -> Body
Expand description

Adds bodies by the parallel axis theorem: total mass, common CG and the tensor about it. Bodies without mass are skipped; no mass at all gives the empty body (mass 0 at the origin).