示例#1
0
        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);
        }
示例#2
0
        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);
        }