Easy3D 2.6.1
Loading...
Searching...
No Matches
TriangleMeshKdTree Class Reference

A k-d tree for triangular surface meshes. More...

#include <easy3d/algo/triangle_mesh_kdtree.h>

Classes

struct  NearestNeighbor
 Nearest neighbor information. More...
 

Public Member Functions

 TriangleMeshKdTree (const SurfaceMesh *mesh, unsigned int max_faces=10, unsigned int max_depth=30)
 Construct with mesh.
 
 ~TriangleMeshKdTree ()
 Destructor.
 
NearestNeighbor nearest (const vec3 &p) const
 Return handle of the nearest neighbor.
 

Detailed Description

A k-d tree for triangular surface meshes.

Constructor & Destructor Documentation

◆ TriangleMeshKdTree()

TriangleMeshKdTree ( const SurfaceMesh * mesh,
unsigned int max_faces = 10,
unsigned int max_depth = 30 )
explicit

Construct with mesh.

Parameters
meshThe surface mesh to build the k-d tree from.
max_facesThe maximum number of faces in a leaf node. Default is 10.
max_depthThe maximum depth of the tree. Default is 30.

Member Function Documentation

◆ nearest()

TriangleMeshKdTree::NearestNeighbor nearest ( const vec3 & p) const

Return handle of the nearest neighbor.

Parameters
pThe query point.
Returns
The nearest neighbor information.

The documentation for this class was generated from the following files: