[vtk-developers] vtkCellLocator IntersectWithLine like vtkOBBTree
T.R.Shashwath
trshash at gmail.com
Tue Oct 28 23:09:33 EDT 2008
Hi everyone,
I'm trying to use vtkCellLocator and vtkOBBTree to intersect lines with poly
data. vtkOBBTree has an overload to IntersectWithLine that reports all the
points, while vtkCellLocator has only the single point overload, which returns
the "best fit" point. (i.e.,
int IntersectWithLine( double *, double *, vtkPoints *, vtkIdList *) which I
call the "Multiple points method" and
int IntersectWithLine( double *, double *, double, double&, double *, double
*, int &) which I call the "Single points method").
The problem I'm facing with the function that returns a single point is this:
If the starting point of the line is directly on the surface, the cell locator
returns the _same_ point, instead of the point on the opposite surface (which
is actually what I need). My starting point will almost always be on the
surface, so this is a major limitation for me.
I would like to implement the multiple points version in vtkCellLocator as it
seems to have better performance in my case. In vtkCellLocator.h, this method
is declared as a stub that does nothing. I also found a post dating back to
2001 (http://public.kitware.com/pipermail/vtk-developers/2001-
June/000550.html) where this was first discussed, and it appears to me that
there were plans to do this in vtkCellLocator also. If so, does anyone know if
it has been done already? If not, are there any other things I should keep in
mind while working on this problem?
Thanks,
Shash
More information about the vtk-developers
mailing list