CGAL 6.1.1 - 2D Voronoi Diagram Adaptor

Loading...
Searching...
No Matches
Voronoi_diagram_2/draw_voronoi_diagram_2.cpp
// standard includes
#include <fstream>
// includes for drawing the Voronoi Diagram
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Voronoi_diagram_2.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Delaunay_triangulation_adaptation_traits_2.h>
#include <CGAL/Delaunay_triangulation_adaptation_policies_2.h>
#include <CGAL/draw_voronoi_diagram_2.h>
// typedefs for defining the adaptor
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Delaunay_triangulation_2<K> DT;
typedef CGAL::Delaunay_triangulation_adaptation_traits_2<DT> AT;
typedef CGAL::Delaunay_triangulation_caching_degeneracy_removal_policy_2<DT> AP;
typedef CGAL::Voronoi_diagram_2<DT,AT,AP> VD;
// typedef for the result type of the point location
typedef AT::Site_2 Site_2;
int main(int argc, char* argv[])
{
VD vd;
std::ifstream ifs((argc>1)?argv[1]:"data/data4.dt.cin");
if(ifs)
{
Site_2 t;
while ( ifs >> t ) { vd.insert(t); }
ifs.close();
assert( vd.is_valid() );
CGAL::draw(vd);
}
return EXIT_SUCCESS;
}
CGAL::Delaunay_triangulation_2
CGAL::Exact_predicates_inexact_constructions_kernel
CGAL::Voronoi_diagram_2
The class Voronoi_diagram_2 provides an adaptor that enables us to view a triangulated Delaunay graph...
Definition: Voronoi_diagram_2.h:30
CGAL::draw
void draw(const T2 &at2, const GSOptions &gso)
CGAL::Delaunay_triangulation_adaptation_traits_2
The class Delaunay_triangulation_adaptation_traits_2 provides a model for the AdaptationTraits_2 conc...
Definition: Delaunay_triangulation_adaptation_traits_2.h:21
CGAL::Delaunay_triangulation_caching_degeneracy_removal_policy_2
The class Delaunay_triangulation_caching_degeneracy_removal_policy_2 provides a model for the Adaptat...
Definition: Delaunay_triangulation_adaptation_policies_2.h:25