Ejemplo n.º 1
0
        public override void RefreshOverlappingPairs()
        {
            for (int i = 0; i < _proxies.Count; i++)
            {
                SimpleBroadphaseProxy proxyA = _proxies[i];

                for (int j = i + 1; j < _proxies.Count; j++)
                {
                    SimpleBroadphaseProxy proxyB = _proxies[j];

                    if (AabbOverlap(proxyA, proxyB))
                    {
                        if (FindPair(proxyA, proxyB) == null)
                        {
                            AddOverlappingPair(proxyA, proxyB);
                        }
                    }
                }
            }

            CheckOverlapCallback check = new CheckOverlapCallback();

            ProcessAllOverlappingPairs(check);
        }
Ejemplo n.º 2
0
        public override void RefreshOverlappingPairs()
        {
            for (int i = 0; i < _proxies.Count; i++)
            {
                SimpleBroadphaseProxy proxyA = _proxies[i];

                for (int j = i + 1; j < _proxies.Count; j++)
                {
                    SimpleBroadphaseProxy proxyB = _proxies[j];

                    if (AabbOverlap(proxyA, proxyB))
                    {
                        if (FindPair(proxyA, proxyB) == null)
                        {
                            AddOverlappingPair(proxyA, proxyB);
                        }
                    }
                }
            }

            CheckOverlapCallback check = new CheckOverlapCallback();
            ProcessAllOverlappingPairs(check);
        }