public MultiSapBroadphase(int maxProxies, IOverlappingPairCache pairCache)
        {
            m_overlappingPairs  = pairCache;
            m_optimizedAabbTree = null;
            m_ownsPairCache     = false;
            m_invalidPair       = 0;

            if (m_overlappingPairs == null)
            {
                m_ownsPairCache    = true;
                m_overlappingPairs = new SortedOverlappingPairCache();
            }
            m_filterCallback = new MultiSapOverlapFilterCallback();

            m_overlappingPairs.SetOverlapFilterCallback(m_filterCallback);
            //	mem = btAlignedAlloc(sizeof(btSimpleBroadphase),16);
            //	m_simpleBroadphase = new (mem) btSimpleBroadphase(maxProxies,m_overlappingPairs);
            m_simpleBroadphase = new SimpleBroadphase(maxProxies, m_overlappingPairs);
        }
 public virtual bool ProcessOverlap(BroadphasePair pair)
 {
     return(!SimpleBroadphase.AabbOverlap((SimpleBroadphaseProxy)(pair.m_pProxy0), (SimpleBroadphaseProxy)(pair.m_pProxy1)));
 }