POV-Ray : Newsgroups : povray.general : Collision Detection : Collision Detection Server Time
3 Aug 2024 18:16:32 EDT (-0400)
  Collision Detection  
From: Andrew McKay
Date: 10 Dec 2003 00:53:26
Message: <3fd6b4d6@news.povray.org>
I'm working on some collision detection routines for a physics module I am
writing for POV.  Right now I'm writing a coarse collision detection routine
that basicall finds the bounding box for the objects, and sees if the
bounding boxes are intersecting.  ie.
        #local bounding_box1 = phylib_get_bounding_box(obj1)
       #local bounding_box2 = phylib_get_bounding_box(obj2)
       #local overlap = intersection{ object{bounding_box1}
object{bounding_box2} }

When the boxes are overlaping, I get an object returned, otherwise there is
shouldn't be an object.  How can I check if the variable 'overlap' actually
contains an object or not.  If I find the bounding_box for the 'overlap'
object when the boxes don't intersect, I get a box with corners at:
<-10000000000.0, -10000000000.0, -10000000000.0> and <10000000000.0,
10000000000.0, 10000000000.0>, otherwise I get a much smaller bounding box.

Will this be true for all objects that don't intersect?  Or is there another
way for me to check if the boxes are intersecting.  I could always write a
my own macro that took in the bounding boxes and checked to see if they were
intersecting instead of relying on the object returned by the intersection.


Post a reply to this message

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