#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_2.h>
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
#include <CGAL/point_generators_2.h>
#include <cassert>
#include <vector>
typedef Delaunay::Point Point;
typedef Delaunay::Face_handle Face_handle;
int main()
{
Delaunay T;
CGAL::Random_points_in_iso_rectangle_2<Point> rnd(Point(0, 0), Point(1, 1));
T.insert(Point(0, 0));
T.insert(Point(.1, 0));
T.insert(Point(0, .1));
for (int i = 0; i != 100; ++i)
{
Point p = (*rnd++);
Delaunay::Locate_type lt;
int li;
Face_handle f = T.locate(p, lt, li);
if (lt == Delaunay::VERTEX)
continue;
std::vector<Face_handle> V;
T.get_conflicts(p, std::back_inserter(V), f);
}
std::cout << "Final triangulation has " << T.number_of_vertices()
<< " vertices." << std::endl;
return 0;
}
The class Periodic_2_Delaunay_triangulation_2 represents a Delaunay triangulation in two-dimensional ...
Definition: Periodic_2_Delaunay_triangulation_2.h:52
The class Periodic_2_Delaunay_triangulation_traits_2is designed as a default traits class for the cla...
Definition: Periodic_2_Delaunay_triangulation_traits_2.h:29