#include #include #include #include #include #include typedef CGAL::Simple_cartesian Kernel; typedef CGAL::Linear_cell_complex_traits<3, Kernel> MyTraits; typedef CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper <2, 3, MyTraits>::type LCC; typedef boost::graph_traits< LCC > Traits; typedef Traits::edge_descriptor edge_descriptor; typedef Traits::halfedge_descriptor halfedge_descriptor; typedef Traits::vertex_descriptor vertex_descriptor; typedef Traits::face_descriptor face_descriptor; typedef LCC::Traits::Point Point_3; template void concept_check_polyhedron() { boost::function_requires< boost::GraphConcept >(); boost::function_requires< boost::AdjacencyGraphConcept >(); boost::function_requires< boost::VertexListGraphConcept >(); boost::function_requires< boost::EdgeListGraphConcept >(); boost::function_requires< boost::IncidenceGraphConcept >(); boost::function_requires< boost::AdjacencyMatrixConcept >(); boost::function_requires< boost::BidirectionalGraphConcept >(); boost::function_requires< CGAL::HalfedgeGraphConcept >(); boost::function_requires< CGAL::HalfedgeListGraphConcept >(); boost::function_requires< CGAL::FaceGraphConcept >(); boost::function_requires< CGAL::FaceListGraphConcept >(); boost::function_requires< CGAL::MutableHalfedgeGraphConcept >(); boost::function_requires< CGAL::MutableFaceGraphConcept >(); boost::function_requires< boost::concepts::PropertyGraph< LCC, halfedge_descriptor, boost::halfedge_index_t> >(); boost::function_requires< boost::concepts::ReadablePropertyGraph< LCC, edge_descriptor, boost::edge_index_t> >(); boost::function_requires< boost::concepts::ReadablePropertyGraph< LCC, edge_descriptor, boost::edge_weight_t> >(); boost::function_requires< boost::PropertyGraphConcept< LCC, vertex_descriptor, boost::vertex_point_t> >(); boost::function_requires< boost::concepts::PropertyGraph< LCC, vertex_descriptor, boost::vertex_index_t> >(); boost::function_requires< boost::concepts::PropertyGraph< LCC, face_descriptor, boost::face_index_t> >(); // null boost::graph_traits::null_vertex(); boost::graph_traits::null_halfedge(); boost::graph_traits::null_face(); } template void runtime_check_halfedgegraph() { // u v // +--------+ // |\ /| // | \ f2 / | // | \y / | // | f3\/ f1| // | /\ | // | / \ | // | / f4 \ | // |/ \| // +--------+ // w x LCC p; vertex_descriptor u = add_vertex(Point_3(0,2,0), p), v = add_vertex(Point_3(2,2,0), p), w = add_vertex(Point_3(0,0,0), p), x = add_vertex(Point_3(2,0,0), p), y = add_vertex(Point_3(1,1,0), p); std::vector face; face.push_back(v); face.push_back(u); face.push_back(y); CGAL::Euler::add_face(face, p); face.clear(); face.push_back(v); face.push_back(y); face.push_back(x); CGAL::Euler::add_face(face, p); face.clear(); face.push_back(x); face.push_back(y); face.push_back(w); CGAL::Euler::add_face(face, p); face.clear(); face.push_back(w); face.push_back(y); face.push_back(u); CGAL::Euler::add_face(face, p); std::cout<<"num_edges(p)"<(); runtime_check_halfedgegraph(); std::cerr << "done\n"; return 0; }