CGAL 5.1 - 2D Triangulation
Triangulation_2/hierarchy.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_hierarchy_2.h>
#include <CGAL/point_generators_2.h>
#include <CGAL/algorithm.h>
#include <cassert>
typedef Triangulation::Point Point;
int main( )
{
std::cout << "insertion of 1000 random points" << std::endl;
Triangulation t;
CGAL::Random_points_in_square_2<Point,Creator> g(1.);
std::copy_n( g, 1000, std::back_inserter(t));
//verbose mode of is_valid ; shows the number of vertices at each level
std::cout << "The number of vertices at successive levels" << std::endl;
assert(t.is_valid(true));
return 0;
}
CGAL::Triangulation_hierarchy_vertex_base_2
Definition: Triangulation_hierarchy_2.h:100
CGAL::Exact_predicates_inexact_constructions_kernel
CGAL::Triangulation_vertex_base_2
Definition: Triangulation_vertex_base_2.h:34
CGAL::Triangulation_hierarchy_2
Definition: Triangulation_hierarchy_2.h:62
CGAL::Creator_uniform_2
CGAL::Delaunay_triangulation_2
Definition: Delaunay_triangulation_2.h:80
copy_n
OutputIterator copy_n(InputIterator first, Size n, OutputIterator result)
CGAL::Triangulation_data_structure_2
CGAL::Triangulation_face_base_2
Definition: Triangulation_face_base_2.h:31