# 3-D sweep and prune with only one axis?

This topic is 4474 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm not sure if this idea's come up before, though considering how simple it is it definitely feels like I've overlooked something while I was browsing around for collision detection algorithms. I've been reading around and it seems a lot of articles and sites talk about doing a sweep and prune on multiple axis. I was thinking, though, that a sweep and prune could be done one-dimensionally for an arbitrary number of dimensions via lexical sorting of a "minimum" and "maximum" pair of vertices for each bounding box. The basic idea is the same, except everything is compared on a single axis where whether two vertices are greater than/equal/less than each other is determined first by checking the X values, then by checking the Y values if the X values are equal, then by checking the Z values if the Y values are equal. The "start" vertex would be the minimum coordinates vertex, and the "end" vertex would be the maximum coordinates vertex. I've tried it on paper, and any overlap between start and end vertices in this scheme seems to guarantee (!) a bounding box intersection. Your thoughts? A complete dimensional reduction seems almost too good to be true. >_>

##### Share on other sites
How is that any different than the standard AABB collision test?
You just test for overlap on each axis given the min/max of each bounding box.

--noone

##### Share on other sites
The sorting criterion is supposed to be equivalent to the standard AABB test, just used in the context of finding the exact pairs of AABBs which intersect by iterating through a single sorted list.

1. 1
2. 2
Rutin
23
3. 3
JoeJ
20
4. 4
5. 5

• 28
• 40
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631737
• Total Posts
3001945
×