BEPUphysics.NarrowPhaseSystems.NarrowPhaseHelper.Intersecting C# (CSharp) Method

Intersecting() public static method

Tests the pair of collidables for intersection without regard for collision rules.
public static Intersecting ( CollidablePair &pair ) : bool
pair CollidablePair Pair to test.
return bool
        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;
        }
    }