[vtkusers] whether a point lies outside or inside a vtkBoxWidget

Rashed Karim rashed.karim at gmail.com
Thu Aug 17 20:54:00 EDT 2006

Hi everyone,

I am trying to do something very basic: I have a vtkBoxWidget in a scene,
and I am trying to check if a point x,y,z lies inside or outside the box.
>From what I understand a box is a convex space bounded by 6 planes, and the
GetPlanes( ) function of vtkBoxWidget returns the convex space bounded by
the 6 planes.

So if i do this:

double pos[3];
double c = myVtkPlanes->FunctionValue(pos);

I was expecting c to be either +ve or -ve depending on whether a point
pos[3] is inside or outside the box, but that doesnt seem to be the case. Am
i doing something wrong?

Any help will be appreciated.

Thanks in advance,

Rashed karim
PhD student
Imperial College London
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060818/95563ef0/attachment.htm>

More information about the vtkusers mailing list