[vtkusers] vtkPointLocator, Insertion and Moving Points

Mike Jackson imikejackson at gmail.com
Wed Jun 4 15:24:42 EDT 2008


I have a filter that I am am writing the does point insertion. In  
order to make sure that I do not add duplicate points I am using a  
vtkPointLocator.

The problem I am having is that after insertion I need to "move" some  
of the points. By "move" I mean I need to get the xyz coordinates and  
adjust them to a new location. The problem I am having is that after  
I move them to a new location, calling:

double[3] point0;
vtkIdType pts;
int wasUnique = locator->InsertUniquePoint( point0, pts);

while point0 is set to the _exact_ same values will actually insert a  
whole NEW point with a new PointID. Digging through the source I see  
some uses of Hashtables and such (which I will pretend to  
understand). After debugging this most of the afternoon I am coming  
to the conclusion (probably and obvious conclusion) that  I need to  
"rehash" the vtkPointLocator instance. I looked through the docs but  
I don't really see anything that might do that? What would be the  
preferred way to solve this issue? Or am I completely off on how to  
do what I am doing?

Thanks for any help
--
Mike Jackson
imikejackson & gmail * com




More information about the vtkusers mailing list