Beispiel #1
0
        public virtual void SortOverlappingPairs(IDispatcher dispatcher)
        {
            ObjectArray <BroadphasePair> tmpPairs = new ObjectArray <BroadphasePair>();

            tmpPairs.AddRange(m_overlappingPairArray);
            for (int i = 0; i < tmpPairs.Count; i++)
            {
                RemoveOverlappingPair(tmpPairs[i].m_pProxy0, tmpPairs[i].m_pProxy1, dispatcher);
            }

            for (int i = 0; i < m_next.Count; i++)
            {
                m_next[i] = BT_NULL_PAIR;
            }

            tmpPairs.Sort();
            //tmpPairs.quickSort(btBroadphasePairSortPredicate());

            for (int i = 0; i < tmpPairs.Count; i++)
            {
                AddOverlappingPair(tmpPairs[i].m_pProxy0, tmpPairs[i].m_pProxy1);
            }
        }
        public virtual void SortOverlappingPairs(IDispatcher dispatcher)
        {
            ObjectArray<BroadphasePair> tmpPairs = new ObjectArray<BroadphasePair>();
            tmpPairs.AddRange(m_overlappingPairArray);
            for (int i = 0; i < tmpPairs.Count; i++)
            {
                RemoveOverlappingPair(tmpPairs[i].m_pProxy0, tmpPairs[i].m_pProxy1, dispatcher);
            }

            for (int i = 0; i < m_next.Count; i++)
            {
                m_next[i] = BT_NULL_PAIR;
            }

            tmpPairs.Sort();
            //tmpPairs.quickSort(btBroadphasePairSortPredicate());

            for (int i = 0; i < tmpPairs.Count; i++)
            {
                AddOverlappingPair(tmpPairs[i].m_pProxy0, tmpPairs[i].m_pProxy1);
            }
        }