3-D sweep and prune with only one axis?
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. >_>
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
You just test for overlap on each axis given the min/max of each bounding box.
--noone
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement