Make nanoflann a third party used for point locators

I did a rapid test. To do so, I tweaked a little this example from nanoflann.

I tried on both nanoflann and VTK (Release build) to build a kdtree with one million random points, and then did one million random queries on the 10 nearest neighbors. I used rand() for the random number generator, with same 3D extent.

Results are:

  • VTK - kdtree build time is 134ms, search is 7,319ms
  • nanoflann - kdtree build time is 278ms, search is 554ms
1 Like