[vtkusers] vtkOBB::InsideOrOutside question

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


Hi,

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

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


-- 
Dominik Szczerba, Ph.D.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list