Skip to content

Instantly share code, notes, and snippets.

@afabri
Created January 6, 2023 17:23
Show Gist options
  • Save afabri/5432ced5139e529bd8b9904dc9a86028 to your computer and use it in GitHub Desktop.
Save afabri/5432ced5139e529bd8b9904dc9a86028 to your computer and use it in GitHub Desktop.
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Constrained_triangulation_plus_2.h>
#include <CGAL/Timer.h>
#include <cassert>
#include <iostream>
#if 0
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, CGAL::Default, Itag> CDT;
typedef CGAL::Constrained_triangulation_plus_2<CDT> CDTplus;
#else
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef CGAL::Exact_intersections_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, CGAL::Default, Itag> CDT;
typedef CGAL::Constrained_triangulation_plus_2<CDT> CDTplus;
#endif
typedef CDT::Point Point;
int
main( )
{
CGAL::Timer t;
t.start();
CDT cdt;
cdt.insert_constraint(Point(0,0), Point(5,10000));
cdt.insert_constraint(Point(100,0), Point(5,10000));
for (int i = 1; i < 10000; ++i){
cdt.insert_constraint( Point(0,i), Point(100,i+1));
cdt.insert_constraint( Point(0,10000-i), Point(100,10000-(i+1)));
}
std::cout << t.time() << " sec." << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment