3-D sweep and prune with only one axis?

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

• Forum Statistics

• Total Topics
627785
• Total Posts
2979029

• 11
• 10
• 10
• 23
• 9