isLonely method

bool isLonely()

Get whether the rigid body has not any connection with others.

Implementation

bool isLonely() {
  return numJoints==0 && numContacts==0;
}