Hello,
After the axis sweep 3 process, the heapsort is useful to remove all duplicated pair.
As the axis sweep 3 add overlapping pair only in case of swapping on aabb edge, this doesn't create duplicated pair ? so, is the heapsort really necessary ?
Thanks,
Fred.
Broadphase
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Broadphase
Yes,fred wrote:Hello,
After the axis sweep 3 process, the heapsort is useful to remove all duplicated pair.
As the axis sweep 3 add overlapping pair only in case of swapping on aabb edge, this doesn't create duplicated pair ? so, is the heapsort really necessary ?
Fred.
Bullet avoids doing the removal of objects during the sweep stage. This causes duplicate pairs. However, overall the performance is better, avoiding the random-access search for pairs. So instead of a random access pair deletion during the sweep and prune, an additional overlap check is done for all overlapping pairs, while dealing with duplicate neighbours.
It is just an optimizations to make things more cache friendly.
Hope this helps,
Erwin