Possible Bug in SweepAndPrune

Mar 29, 2010 at 5:13 PM

Hi, I had a look at your SweepAndPrune code and noticed that the insertionsort methods never get called. I think your intention is to call insertionsort if no new objects were added to the collisionsystem. ("_newItems" has to be set to zero somewhere). Nice coding by the way.



Mar 29, 2010 at 8:06 PM

Thanks so much for pointing that out - I will definitely have a look.

Apr 22, 2010 at 9:22 AM

FYI, this will be fixed in the next release.

I haven't found a good way to choose between quicksort vs. insertion sort yet, so I just choose quicksort when any new items are added (new items don't have the advantage of temporal coherence so they're almost guaranteed not to be nearly sorted). If anyone has any ideas around how to improve this, let me know!