[vtkusers] vtkOBB::InsideOrOutside question

Dominik Szczerba domi at vision.ee.ethz.ch
Mon Jul 30 09:57:00 EDT 2007


I need to determine if a point p0 is inside a closed polydata surface or

I employ vtkOBB::InsideOrOutside for that purpose and it does its job
only it is very slow (compared to another reference implementation).

To get it faster I tried the following: instead of InsideOrOutside use
IntersectWithLine using a line (p0,[inf,0,0]) and count the number of
returned points (outside/inside the number is even/odd). That works very
much faster.

Now for my peace of mind: do I miss anything on InsideOrOutside to make
it faster? (I tried different bucket sizes etc. to no luck). Is my
"trick" safe/robust to use?

thanks for any comments,

Dominik Szczerba, Ph.D.
Computer Vision Lab CH-8092 Zurich

More information about the vtkusers mailing list