revert quickSort change in commit http://code.google.com/p/bullet/source/detail?r=2527 and fix the underlying sort issue

in VoronoiFractureDemo (store intermediate values in memory to avoid problems)
@todo: rewrite the island management to avoid sort for better performance
Thanks to Peter Kyme for the report, fixes Issue 607
This commit is contained in:
erwin.coumans
2012-03-14 03:52:29 +00:00
parent 52f9f6ed09
commit 76375afff2
3 changed files with 33 additions and 38 deletions

View File

@@ -377,8 +377,10 @@ void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher,
int numManifolds = int (m_islandmanifold.size());
//we should do radix sort, it it much faster (O(n) instead of O (n log2(n))
//tried a radix sort, but quicksort/heapsort seems still faster
//@todo rewrite island management
m_islandmanifold.quickSort(btPersistentManifoldSortPredicate());
//m_islandmanifold.heapSort(btPersistentManifoldSortPredicate());
//now process all active islands (sets of manifolds for now)