POV-Ray : Newsgroups : povray.advanced-users : collision detection : Re: collision detection Server Time
29 Jul 2024 18:24:16 EDT (-0400)
  Re: collision detection  
From: Chris Huff
Date: 22 Feb 2001 11:07:27
Message: <chrishuff-67E254.11063222022001@news.povray.org>
In article <slr### [at] fwicom>, ron### [at] povrayorg 
wrote:

> Even that wouldn't see the special case where one box is entirely enclosed
> by the other box.

But you could use eval_pattern() with the object pattern to catch this 
case...you would still need to use trace() though, because there are 
cases when two boxes intersect but all of their corners are outside.

And if you use a similar method to do collision with meshes, you could 
tesselate (almost) any object with the tesselation patch and use the 
resulting mesh for collision testing. It would be slow (a patch might be 
needed to get a useable speed, like a "objects_intersect(ObjectA, 
ObjectB, ...ObjectX) function), but you could speed it up a little by 
using low-resolution meshes, either as a bounds test or for the actual 
collision detection.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.