#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef CGAL::Simple_cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Arrangement_traits_2; typedef CGAL::Arrangement_2 Arrangement_2; typedef CGAL::Polyhedron_3 Polyhedron; typedef CGAL::Surface_mesh Surface_mesh; typedef CGAL::Triangulation_2 Triangulation_2; #ifdef CGAL_LINKED_WITH_TBB typedef CGAL::Triangulation_data_structure_3< CGAL::Triangulation_vertex_base_3, CGAL::Triangulation_cell_base_3, CGAL::Parallel_tag> Tds; typedef CGAL::Delaunay_triangulation_3 Triangulation_3; #endif typedef CGAL::Linear_cell_complex_for_combinatorial_map<3, 3> Linear_cell_complex_3_cmap; typedef CGAL::Linear_cell_complex_for_generalized_map<3, 3> Linear_cell_complex_3_gmap; template void fct(const P& ) { std::map M; Descriptor d; M.find(d); boost::unordered_map U; U[d] = 12; } template void fct2() { typedef typename LCC::Dart_handle dh; typedef typename LCC::Vertex_attribute_handle vh; { // For dart handle std::map M; dh e; M.find(e); boost::unordered_map U; U[e] = 12; } { // For vertex attribute handle std::map M; vh e; M.find(e); boost::unordered_map U; U[e] = 12; } } template void fct3(const P& ) { typedef typename P::Vertex_handle vertex_descriptor; std::map M; vertex_descriptor vd; M.find(vd); boost::unordered_map U; U[vd] = 12; } template void test_edge_hash_and_null(const P& p) { typedef boost::graph_traits

GT; typedef typename GT::halfedge_descriptor halfedge_descriptor; typedef typename GT::vertex_descriptor vertex_descriptor; typedef typename GT::face_descriptor face_descriptor; BOOST_FOREACH(halfedge_descriptor h, halfedges(p)) { assert( hash_value( edge(h,p) ) == hash_value( edge(opposite(h,p),p) ) ); } face_descriptor f1=GT::null_face(), f2=GT::null_face(); vertex_descriptor v1=GT::null_vertex(), v2=GT::null_vertex(); halfedge_descriptor h1=GT::null_halfedge(), h2=GT::null_halfedge(); assert(hash_value(f1)==hash_value(f2)); assert(hash_value(v1)==hash_value(v2)); assert(hash_value(h1)==hash_value(h2)); } template void fct4(const P& p) { fct::vertex_descriptor>(p); fct::halfedge_descriptor>(p); fct::edge_descriptor>(p); fct::face_descriptor>(p); test_edge_hash_and_null(p); } int main() { Arrangement_2 A; fct::vertex_descriptor>(A); fct::edge_descriptor>(A); Kernel::Point_3 p3; Polyhedron P; CGAL::make_triangle(p3,p3,p3,P); fct4(P); Surface_mesh S; CGAL::make_triangle(p3,p3,p3,S); fct4(S); Triangulation_2 T; T.insert(Kernel::Point_2(0,0)); T.insert(Kernel::Point_2(0,1)); T.insert(Kernel::Point_2(1,0)); T.insert(Kernel::Point_2(1,1)); fct4(T); fct2(); fct2(); #ifdef CGAL_LINKED_WITH_TBB Triangulation_3 T3; fct3(T3); #endif return 0; }