Subject: CGAL users discussion list
List archive
- From: 박정현 <>
- To: <>
- Subject: Errors in compiling a source code
- Date: Tue, 20 Feb 2007 13:42:41 +0900
Hello. I’m implementing a segment
Voronoi diagram using CGAL. Here is my source : ----------------------------------------------------------------------------- //
examples/Voronoi_diagram_2/point_location.C #include <CGAL/basic.h> // standard includes #include <iostream> #include <fstream> #include <cassert> // define the kernel #include
<CGAL/Simple_cartesian.h> #include
<CGAL/Filtered_kernel.h> typedef CGAL::Simple_cartesian<double>
CK; typedef
CGAL::Filtered_kernel<CK>
Kernel; //#include
<CGAL/Exact_predicates_inexact_constructions_kernel.h> // typedefs for the traits
and the algorithm #include
<CGAL/Segment_Delaunay_graph_traits_2.h> #include
<CGAL/Segment_Delaunay_graph_2.h> typedef
CGAL::Segment_Delaunay_graph_traits_2<Kernel> Gt; typedef
CGAL::Segment_Delaunay_graph_2<Gt>
SDG2; #include
<CGAL/Voronoi_diagram_2.h> #include
<CGAL/Segment_Delaunay_graph_adaptation_traits_2.h> #include
<CGAL/Segment_Delaunay_graph_adaptation_policies_2.h> /* // includes for defining the
Voronoi diagram adaptor #include
<CGAL/Exact_predicates_inexact_constructions_kernel.h> #include
<CGAL/Delaunay_triangulation_2.h> #include
<CGAL/Voronoi_diagram_2.h> #include
<CGAL/Delaunay_triangulation_adaptation_traits_2.h> #include
<CGAL/Delaunay_triangulation_adaptation_policies_2.h> */ typedef
CGAL::Segment_Delaunay_graph_adaptation_traits_2<SDG2>
AT; typedef
CGAL::Segment_Delaunay_graph_caching_degeneracy_removal_policy_2<SDG2>
AP; typedef
CGAL::Voronoi_diagram_2<SDG2,AT,AP>
VD; // typedef for the result
type of the point location typedef
AT::Site_2
Site_2; typedef
AT::Point_2
Point_2; typedef VD::Locate_result
Locate_result; typedef VD::Vertex_handle
Vertex_handle; typedef
VD::Face_handle
Face_handle; typedef
VD::Halfedge_handle
Halfedge_handle; typedef
VD::Ccb_halfedge_circulator Ccb_halfedge_circulator; void
print_endpoint(Halfedge_handle e, bool
is_src) { std::cout << "\t"; if
( is_src ) { if ( e->has_source() ) std::cout
<< e->source()->point() << std::endl; else std::cout << "point at
infinity" << std::endl; } else
{ if ( e->has_target() ) std::cout
<< e->target()->point() << std::endl; else std::cout << "point at
infinity" << std::endl; } } int main() { std::ifstream
ifs("data/data1.dt.cin"); assert( ifs ); VD vd; Site_2 t; while
( ifs >> t ) { vd.insert(t); } ifs.close(); assert( vd.is_valid() ); std::ifstream
ifq("data/queries1.dt.cin"); assert( ifq ); Point_2 p; while
( ifq >> p ) { std::cout << "Query point
(" << p.x() << "," << p.y()
<< ") lies on a Voronoi " << std::flush; Locate_result lr = vd.locate(p); if ( Vertex_handle* v =
boost::get<Vertex_handle>(&lr) ) { std::cout <<
"vertex." << std::endl; std::cout <<
"The Voronoi vertex is:" << std::endl; std::cout <<
"\t" << (*v)->point() << std::endl; } else if
( Halfedge_handle* e = boost::get<Halfedge_handle>(&lr) ) { std::cout <<
"edge." << std::endl; std::cout <<
"The source and target vertices "
<< "of the Voronoi edge are:" << std::endl; print_endpoint(*e, true); print_endpoint(*e, false); } else if
( Face_handle* f = boost::get<Face_handle>(&lr) ) { std::cout <<
"face." << std::endl; std::cout <<
"The vertices of the Voronoi face are"
<< " (in counterclockwise order):" << std::endl; Ccb_halfedge_circulator
ec_start = (*f)->outer_ccb(); Ccb_halfedge_circulator
ec = ec_start; do {
print_endpoint(ec, false); } while ( ++ec != ec_start ); } std::cout << std::endl; } ifq.close(); return
0; } ----------------------------------------------------------------------------- I modified the example of
Voronoi adaptor by replacing Delaunay_Triangulation class with
Segment_Delaunay_Graph. But, several linking errors
occur in compiling the source code with Visual Studio 2003. The following is
error message : ----------------------------------------------------------------------------- C:\Program
Files\CGAL-3.2.1\include\CGAL\Voronoi_diagram_2.h(748): error C3861:
'INSERT_IS_NOT_SUPPORTED': identifier not found, even with argument-dependent
lookup ----------------------------------------------------------------------------- What is wrong in my source
code? Thank you in advance. |
- Errors in compiling a source code, 박정현, 02/20/2007
Archive powered by MHonArc 2.6.16.