Intersection Of Bounding Boxes

Hi,

Given two vectors taken from `exactWorldBoundingBox' of two meshes,
How do I know if both objects' bounding boxes intersect?

10x

CODE
$bb1=exactWorldBoundingBox nurbsSphere1;
$bb2=exactWorldBoundingBox nurbsSphere2;
if (!( ($bb1[0]>$bb2[3]) || ($bb2[0]>$bb1[3])
    || ($bb1[1]>$bb2[4]) || ($bb2[1]>$bb1[4])
    || ($bb1[2]>$bb2[5]) || ($bb2[2]>$bb1[5]) ))
  print "intersects";
else
  print "does not intersect";

refeer to:

http://en.wikipedia.org/wiki/Bounding\_volume

True. But only if the bbox is not rotated, isn't it?

Yes only if it isnt rotated, but the one you get with that command isnt. Tough unlike what i think of bounding boxes the exact command yelds the bb world form the axis oriented bounding box not the exact geometry. Wich makes this a bit of a weird name for a command.

10x, it'll do the job..
do you think doing this calculation (should it occur very often and rapidly) should be made in API?
The MBoundingBox returns the object's local bounding box so it is not as straight forward as I first thought.

QUOTE(barbq @ 02/19/08, 10:48 AM) [snapback]281348[/snapback]
do you think doing this calculation (should it occur very often and rapidly) should be made in API?

Yes.

Thanks, could you assist on how to acquire the right vectors for this purpose?