#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Delaunay_mesh_face_base_2.h>
#include <CGAL/Delaunay_mesh_size_criteria_2.h>
#include <CGAL/Delaunay_mesher_2.h>
#include <CGAL/Triangulation_face_base_with_info_2.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/point_generators_2.h>
#include <iostream>
#include <fstream>
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
typedef CDT::Point Point;
typedef CGAL::Polygon_2<K> Polygon_2;
int main()
{
std::vector<Point> points;
::Polygon_2 polygon1;
polygon1.push_back(Point(0,0));
polygon1.push_back(Point(2,0));
polygon1.push_back(Point(2,2));
polygon1.push_back(Point(0,2));
::Polygon_2 polygon2;
polygon2.push_back(Point(4.0,-2.0));
polygon2.push_back(Point(4.0,2.0));
polygon2.push_back(Point(6.0,0.0));
CDT cdt;
cdt.insert_constraint(polygon1.vertices_begin(), polygon1.vertices_end(), true);
cdt.insert_constraint(polygon2.vertices_begin(), polygon2.vertices_end(), true);
Mesh_2_criteria criteria(0.125, 0.5);
std::copy_n(g, 100, std::back_inserter(points));
assert(points.size() == 100);
std::cout << points[0] << std::endl;
return 0;
}
The class Random_points_in_triangle_mesh_2 is an input iterator creating points uniformly distributed...
Definition: point_generators_2.h:362
void refine_Delaunay_mesh_2(CDT &t, const NamedParameters &np)