Overview
Sweep and prune maintains sorted interval endpoints for object bounds. Only objects whose intervals overlap on every tested axis are passed to narrow-phase collision checks.
Reduces collision candidates by sorting bounding-box intervals along one or more axes.
Compact metadata for implementation and discovery.
Sweep and prune maintains sorted interval endpoints for object bounds. Only objects whose intervals overlap on every tested axis are passed to narrow-phase collision checks.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n log n + k)
Worst
O(n^2)
Space
O(n)
a_min <= b_max and b_min <= a_maxTests whether two projected bounds overlap on one axis.
Show state updates, constraints, and error correction over simulation steps.
Sweep and prune is a broad-phase method; it should never be the final collision test.
What each reference supports for this entry.
Collision detection reference for the geometric or broad-phase/narrow-phase behavior of Sweep and Prune.
Good next jumps from the relationship graph, ranked for useful discovery.
Sweep and prune sorts bounding interval endpoints for AABBs.
Sweep and prune is a specific broad-phase collision method.