don't use multisap yet in basic demo.
fix crash in multi sap (due to new pair manager)
This commit is contained in:
@@ -14,7 +14,7 @@ subject to the following restrictions:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//#define USE_GROUND_BOX 1
|
#define USE_GROUND_BOX 1
|
||||||
//#define PRINT_CONTACT_STATISTICS 1
|
//#define PRINT_CONTACT_STATISTICS 1
|
||||||
//#define CHECK_MEMORY_LEAKS 1
|
//#define CHECK_MEMORY_LEAKS 1
|
||||||
//#define USE_PARALLEL_DISPATCHER 1
|
//#define USE_PARALLEL_DISPATCHER 1
|
||||||
@@ -160,8 +160,8 @@ void BasicDemo::initPhysics()
|
|||||||
#define maxProxies 8192
|
#define maxProxies 8192
|
||||||
btVector3 worldAabbMin(-10000,-10000,-10000);
|
btVector3 worldAabbMin(-10000,-10000,-10000);
|
||||||
btVector3 worldAabbMax(10000,10000,10000);
|
btVector3 worldAabbMax(10000,10000,10000);
|
||||||
//m_overlappingPairCache = new btAxisSweep3(worldAabbMin,worldAabbMax,maxProxies);
|
m_overlappingPairCache = new btAxisSweep3(worldAabbMin,worldAabbMax,maxProxies);
|
||||||
m_overlappingPairCache = new btMultiSapBroadphase();
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ void btMultiSapBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
|
|||||||
|
|
||||||
btBroadphasePairArray& overlappingPairArray = m_overlappingPairs->getOverlappingPairArray();
|
btBroadphasePairArray& overlappingPairArray = m_overlappingPairs->getOverlappingPairArray();
|
||||||
|
|
||||||
|
#ifndef USE_HASH_PAIRCACHE
|
||||||
|
|
||||||
//perform a sort, to find duplicates and to sort 'invalid' pairs to the end
|
//perform a sort, to find duplicates and to sort 'invalid' pairs to the end
|
||||||
overlappingPairArray.heapSort(btBroadphasePairSortPredicate());
|
overlappingPairArray.heapSort(btBroadphasePairSortPredicate());
|
||||||
|
|
||||||
@@ -172,6 +174,8 @@ void btMultiSapBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
|
|||||||
m_invalidPair = 0;
|
m_invalidPair = 0;
|
||||||
#endif//CLEAN_INVALID_PAIRS
|
#endif//CLEAN_INVALID_PAIRS
|
||||||
|
|
||||||
|
#endif //USE_HASH_PAIRCACHE
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user