[vtkusers] Is it possible to have a "bounding sphere" for an actor

Elvis Dowson elvis.dowson at mac.com
Sat Nov 8 08:56:47 EST 2008

Hi Dave,
                     Would you happen to know how the vtkBoundingBox  
class is used, for computing intersection tests?  I tried going  
through the docs and a bit through the sources, but could only find a  
single dependency to vtkBox.

I'm looking for a small bounding box intersection test example, to  
study how vtkBoundingBox is used, in order to experiment with trying  
to compute a bounding sphere. Later on, I want to be able to extend  
this to an implicit function, so that I can create say an ellipsoidal  
bounding area and align it with the actor, and then try to see if they  

I'm trying to model electromagnetic sensor ranges, so the simplest way  
was to create a sphere bounding box around an actor, and then compute  
intersection tests. Later on, replace the bounding box with a more  
complex function. I know replacing it with a complex function may  
increase the computational resources required, but at that stage, I  
will try to perform parallel processing and off-load all the  
intersection tests as a separate process on a couple of vector  
processors. So, in the end, I'll try to get portions of VTK to run on  
a vector processor.

Best regards,

Elvis Dowson

On Nov 8, 2008, at 3:41 PM, David E DeMarle wrote:

> Using bounding boxes is sufficient to compute intersection tests, but
> depending on the data sets geometry, an acceleration structure based
> on spheres may be more or less efficient. If you use bbox min and max
> points (extreme corners) to calculate your center and radius, you will
> create a sphere that contains the entire bounding box and additional
> empty space.
> Which primitive is better in practice is a function of how long it
> takes to create the bounding primitive (sphere or box), how long it
> takes to test for intersection against the primitive, and how much
> empty space (source of false positive tests) is contained by the
> primitive.
> Good luck. I'm looking forward to seeing what you come up with,
> Dave DeMarle

More information about the vtkusers mailing list