createBody method
Create a rigid body given a definition. No reference to the definition is retained.
Warning: This function is locked during callbacks.
Implementation
Body createBody(BodyDef def) {
assert(!isLocked);
final body = Body(def, this);
bodies.add(body);
return body;
}