|
![](/i/fill.gif) |
Christoph Hormann wrote:
>
> Paul Jones wrote:
> >
> > How can I create a collision detection routine? More specifically, what
> > do I look at to determine if two objects have collided in pov-space ? I
> > can figure it out with...say... unit spheres, that is easy, but what
> > about rotated cubes and more oddly shaped objects??
> >
>
> In general that's a very difficult task, one method would be doing a lot
> of tests with 'trace'.
>
> Finding out whether two boxes collide could for example be done by
> 'tracing' along all their edges.
You can limit the number of traces necessary if you first find the
min_extent and max_extent of your objects. If these don't overlap, then
your objects don't touch one another. If they do, then you have to
start tracing along the side(s) where the bounding boxes overlap.
Note: You need MegaPOV to do this.
--
Francois Labreque | //\\ Wear an ASCII ribbon!
flabreque | || ||
@ | \\// Support the campain
videotron.ca \\ against HTML e-mail
//\\ and news!
Post a reply to this message
|
![](/i/fill.gif) |