Whether the body is connected to the joint
bool containsBody(Body body) => body == bodyA || body == bodyB;