Hello, <br><br>I happened to find there is an octree implementation documented here: <br><br><a href="http://www.vtk.org/doc/nightly/html/classvtkOctreePointLocator.html#a75655811e8c055aa39bf0d3ba59099c5">http://www.vtk.org/doc/nightly/html/classvtkOctreePointLocator.html#a75655811e8c055aa39bf0d3ba59099c5</a><br>
<br>I&#39;m curious how to find a closest data point if the query point is inside a leaf node.  From vtkOctreePointLocator.cxx, function &quot;FindClosestPoint( double x, double y, double z, double &amp;dist2)&quot; detects this situation and do a further search if the distance to the closest data point is bigger than the distance to the leaf boundary,  which is conducted by another function &quot;FindClosestPointInSphere&quot;. <br>
<br>However, this  &quot;FindClosestPointInSphere&quot; seems only search within child nodes, and stops if no child nodes exist, which seems a bit suspicious since first, leaf node won&#39;t have children and second, there should be a search within neighbours if a boundary situation detected in the above &quot;FindClosestPoint&quot; function, shouldn&#39;t it?<br>
<br>Sorry I might miss something since I didn&#39;t have a proper test cases and run the code. Any feedback would be appreciated. <br><br>Regards,<br>Xiao Xian<br>