public static bool Intersecting(ref CollidablePair pair)
{
var pairHandler = GetPairHandler(ref pair);
if (pairHandler == null)
return false;
pairHandler.SuppressEvents = true;
pairHandler.UpdateCollision(0);
//Technically, contacts with negative depth do not count.
//The current implementation of collision detection does not generate
//negative depths on the first execution of UpdateCollision, though,
//so we don't need to worry about that- yet.
bool toReturn = pairHandler.ContactCount > 0;
pairHandler.SuppressEvents = false;
pairHandler.CleanUp();
pairHandler.Factory.GiveBack(pairHandler);
return toReturn;
}
}