Subject: CGAL users discussion list
List archive
- From: "Vu, Khuong" <>
- To: "" <>
- Subject: [cgal-discuss] need you help on segment voronoi diagram
- Date: Mon, 16 Mar 2009 14:19:27 -0500
- Accept-language: en-US
- Acceptlanguage: en-US
Hello all,
I'm trying to construct a segment VD. However, the compiler threw a bunch of
errors that I'm sure that non-readable by human :) ! Below is my code. I
would appreciate if you guys can give me some advices.
All the best,
Khuong
==========================================================
#include <CGAL/basic.h>
// standard includes
#include <iostream>
#include <fstream>
#include <cassert>
// define the kernels
#include <CGAL/Simple_cartesian.h>
typedef CGAL::Simple_cartesian<double> CK;
typedef CGAL::Simple_cartesian<ENT> EK;
// typedefs for the traits and the algorithm
#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
#include <CGAL/Segment_Delaunay_graph_2.h>
#include <CGAL/Voronoi_diagram_2.h>
#include <CGAL/Segment_Delaunay_graph_adaptation_traits_2.h>
#include <CGAL/Segment_Delaunay_graph_traits_2.h>
#include <CGAL/Segment_Delaunay_graph_adaptation_policies_2.h>
typedef CGAL::Segment_Delaunay_graph_traits_2<CK, CGAL::Field_with_sqrt_tag>
Gt;
typedef CGAL::Segment_Delaunay_graph_2<Gt> SDG2;
typedef CGAL::Segment_Delaunay_graph_degeneracy_removal_policy_2<SDG2> AP;
typedef CGAL::Segment_Delaunay_graph_adaptation_traits_2<SDG2>
AT;
typedef CGAL::Voronoi_diagram_2<SDG2, AP, AT> VD;
typedef AT::Site_2 Site_2;
using namespace std;
int main() {
ifstream ifs("data/sitesx.cin");
assert( ifs );
Site_2 site;
VD vd;
while ( ifs >> site ) { vd.insert( site ); }
ifs.close();
assert( vd.is_valid() );
cout << endl << endl;
return 0;
}
- [cgal-discuss] need you help on segment voronoi diagram, Vu, Khuong, 03/16/2009
- Re: [cgal-discuss] need you help on segment voronoi diagram, Fernando Cacciola, 03/16/2009
Archive powered by MHonArc 2.6.16.