Content deleted Content added
→Broad phase: Cleaning to make the page more coherent after the previous big change. |
→Exploiting temporal coherence: Addressing issues with the section (lack of citations, non-encyclopedic tone and being too technical. |
||
Line 37:
{{Unreferenced section|date=July 2024}}|section=y}}
During the broad-phase, when the objects in the world move or deform, the data-structures used to cull collisions have to be updated. In cases where the changes between two frames or time-steps are small and the objects can approximated well with an [[axis-aligned bounding box]]es the [[sweep and prune]] algorithm<ref name=":0" /> can be a suitable approach.
Several key observation make the implementation efficient: Two bounding-boxes intersect [[If and only if|if, and only if]], there is overlap along all three axes; overlap can be determined, for each axis separately, by sorting the intervals for all the boxes; and lastly, between two frames updates are typically small. The algorithm keeps track of currently intersecting boxes, and as objects moves, re-sorting the intervals helps keep track of the status<ref>{{Cite book |last=Ericson |first=Christer |url=https://realtimecollisiondetection.net/books/rtcd/ |title=Real-time collision detection |date= |publisher=Elsevier |isbn=978-1-55860-732-3 |edition=Nachdr. |series=Morgan Kaufmann series in interactive 3D technology |___location=Amsterdam Heidelberg |pages=329–338}}</ref> - making sorting algorithms optimized for almost-sorted lists suitable for this application.
=== Pairwise pruning ===
|