CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.99k stars 1.39k forks source link

Vononoi Diagram in Cgal #2364

Closed YaoQii closed 7 years ago

YaoQii commented 7 years ago

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

sgiraudot commented 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: