GitHub link
PMP
The Polygon Mesh Processing Library
TriangleKdTree Class Reference

A k-d tree for triangles.

#include <pmp/algorithms/TriangleKdTree.h>

Classes

struct  NearestNeighbor
 nearest neighbor information More...
 

Public Member Functions

 TriangleKdTree (const SurfaceMesh &mesh, unsigned int max_faces=10, unsigned int max_depth=30)
 Construct with mesh.
 
 ~TriangleKdTree ()
 destructor
 
NearestNeighbor nearest (const Point &p) const
 Return handle of the nearest neighbor.