Closed YaoQii closed 7 years ago
The locate()
function gives you a simplex of the Voronoi Diagram (which is the dual of the Delaunay Triangulation whose vertices are you sites). From here, you have three possibilities:
Face
, this is the simplest case as your query is inside a Voronoi face: in that case, you can get the corresponding site by calling the method face_handle->dual()
(one closest site)Edge
, then you have two closest sites: you need to access each of the two facets adjacent to the edge and use the method dual of each of these facesVertex
, then you have N closest sites: you need to iterate on the adjacent faces of this vertex and get the dual of each of these faces
In the Manual CGAL 4.10 - 2D Voronoi Diagram Adaptor, you said that "Given a query point, the nearest site functor should return information related to how many and which sites of the Voronoi diagram are at equal and minimal distance from the query point." In the example Voronoi_diagram_2/vd_2_point_location.cpp, we can get the query point is closest to a single site, the vertex or face, but how can get the nearest site? can I get which sites of the Voronoi diagram are at equal and minimal distance from the query point?
Environment