// This is the top level collision call for the time step. Here
// all the narrow phase collision is processed for the world
// contact list.
public void Collide()
{
// Update awake contacts.
for (Contact c = _world._contactList; c != null; c = c.GetNext())
{
Body body1 = c.GetShape1().GetBody();
Body body2 = c.GetShape2().GetBody();
if (body1.IsSleeping() && body2.IsSleeping())
{
continue;
}
c.Update(_world._contactListener);
}
}