diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index f152db4440d..cf2734ff25c 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -153,7 +153,7 @@ struct Propagate_normal_orientation typedef typename MST_graph::vertex_descriptor vertex_descriptor; // Gets source normal - vertex_descriptor source_vertex = boost::source(edge, mst_graph); + vertex_descriptor source_vertex = source(edge, mst_graph); #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 const Vector source_normal = get(mst_graph.m_normal_pmap, mst_graph[source_vertex].input_point); #else @@ -161,7 +161,7 @@ struct Propagate_normal_orientation #endif const bool source_normal_is_oriented = mst_graph[source_vertex].is_oriented; // Gets target normal - vertex_descriptor target_vertex = boost::target(edge, mst_graph); + vertex_descriptor target_vertex = target(edge, mst_graph); #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 const Vector& target_normal = get( mst_graph.m_normal_pmap, mst_graph[target_vertex].input_point); #else @@ -394,9 +394,9 @@ create_riemannian_graph( // Add edge typename boost::graph_traits::edge_descriptor e; bool inserted; - boost::tie(e, inserted) = boost::add_edge(boost::vertex(it_index, riemannian_graph), - boost::vertex(neighbor_index, riemannian_graph), - riemannian_graph); + boost::tie(e, inserted) = add_edge(vertex(it_index, riemannian_graph), + vertex(neighbor_index, riemannian_graph), + riemannian_graph); CGAL_point_set_processing_assertion(inserted); // -> -> @@ -472,7 +472,7 @@ create_mst_graph( CGAL_point_set_processing_precondition(first != beyond); // Number of input points - const std::size_t num_input_points = boost::num_vertices(riemannian_graph); + const std::size_t num_input_points = num_vertices(riemannian_graph); std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE(" %ld Mb allocated\n", memory>>20); CGAL_TRACE(" Calls boost::prim_minimum_spanning_tree()\n"); @@ -484,7 +484,7 @@ create_mst_graph( PredecessorMap predecessor(num_input_points); boost::prim_minimum_spanning_tree(riemannian_graph, &predecessor[0], weight_map( riemannian_graph_weight_map ) - .root_vertex( boost::vertex(source_point_index, riemannian_graph) )); + .root_vertex( vertex(source_point_index, riemannian_graph) )); memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE(" %ld Mb allocated\n", memory>>20); CGAL_TRACE(" Creates MST Graph\n"); @@ -514,9 +514,9 @@ create_mst_graph( // check that bi-directed graph is useless CGAL_point_set_processing_assertion(predecessor[predecessor[i]] != i); - boost::add_edge(boost::vertex(predecessor[i], mst_graph), - boost::vertex(i, mst_graph), - mst_graph); + add_edge(vertex(predecessor[i], mst_graph), + vertex(i, mst_graph), + mst_graph); } } @@ -631,7 +631,7 @@ mst_orient_normals( Propagate_normal_orientation orienter; std::size_t source_point_index = get(index_pmap, source_point); boost::breadth_first_search(mst_graph, - boost::vertex(source_point_index, mst_graph), // source + vertex(source_point_index, mst_graph), // source visitor(boost::make_bfs_visitor(orienter))); // Copy points with robust normal orientation to oriented_points[], the others to unoriented_points[]. @@ -639,7 +639,7 @@ mst_orient_normals( for (ForwardIterator it = first; it != beyond; it++) { std::size_t it_index = get(index_pmap,it); - typename MST_graph::vertex_descriptor v = boost::vertex(it_index, mst_graph); + typename MST_graph::vertex_descriptor v = vertex(it_index, mst_graph); if (mst_graph[v].is_oriented) oriented_points.push_back(*it); else diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h index 121c7f92332..0e1fd674c6a 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h @@ -1459,7 +1459,7 @@ private: { vertex_iterator current, end; - for (boost::tie(current, end) = boost::vertices(m_graph); current != end; ++current) + for (boost::tie(current, end) = vertices(m_graph); current != end; ++current) { std::size_t vertexIndex = get(m_vertexIndexMap, *current); @@ -1832,7 +1832,7 @@ private: std::size_t numVertices = 0; - for (boost::tie(current,end) = boost::vertices(m_graph); current != end; ++current) + for (boost::tie(current,end) = vertices(m_graph); current != end; ++current) { std::cout << "Vertex#" << numVertices << ": p = " << get(m_vertexPointMap,*current) << " , Saddle Vertex: " << (is_saddle_vertex(*current) ? "yes" : "no") << " , Boundary Vertex: " << (is_boundary_vertex(*current) ? "yes" : "no") << std::endl; ++numVertices; @@ -1855,7 +1855,7 @@ private: do { - std::cout << get(m_vertexIndexMap, boost::source(faceEdgesCurrent, m_graph)); + std::cout << get(m_vertexIndexMap, source(faceEdgesCurrent, m_graph)); faceEdgesCurrent = next(faceEdgesCurrent, m_graph); diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h index a40f4f1a4d6..dce0129b03c 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h @@ -37,7 +37,7 @@ Triangle_3 triangle_from_halfedge(typename boost::graph_traits::h halfedge_descriptor e0 = edge; halfedge_descriptor e1 = next(edge, g); - return Triangle_3(get(vertexPointMap, boost::source(e0, g)), get(vertexPointMap, boost::target(e0, g)), get(vertexPointMap, boost::target(e1, g))); + return Triangle_3(get(vertexPointMap, source(e0, g)), get(vertexPointMap, target(e0, g)), get(vertexPointMap, target(e1, g))); } template diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp index b933dd35431..e1d653ec3e9 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp @@ -30,6 +30,7 @@ int main(int argc, char* argv[]) { typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron_3; + typedef CGAL::Surface_mesh_shortest_path_traits Traits; typedef Traits::Barycentric_coordinate Barycentric_coordinate; typedef Traits::FT FT; @@ -43,6 +44,8 @@ int main(int argc, char* argv[]) typedef boost::property_map::type HIM; typedef boost::property_map::type FIM; + + Traits traits; std::string mesh(argv[1]); @@ -74,7 +77,7 @@ int main(int argc, char* argv[]) std::vector vertices; - boost::tie(verticesStart, verticesEnd) = boost::vertices(polyhedron); + boost::tie(verticesStart, verticesEnd) = CGAL::vertices(polyhedron); for (vertex_iterator it = verticesStart; it != verticesEnd; ++it) { @@ -168,7 +171,7 @@ int main(int argc, char* argv[]) { if (items[d].type == CGAL::test::SEQUENCE_ITEM_EDGE) { - std::cout << "\t" << names[d] << "(edge): " << vertexIndexMap[CGAL::source(items[d].halfedge, polyhedron)] << " , " << vertexIndexMap[CGAL::target(items[d].halfedge, polyhedron)] << " : " << items[d].edgeAlpha << std::endl; + std::cout << "\t" << names[d] << "(edge): " << vertexIndexMap[source(items[d].halfedge, polyhedron)] << " , " << vertexIndexMap[target(items[d].halfedge, polyhedron)] << " : " << items[d].edgeAlpha << std::endl; } else if (items[d].type == CGAL::test::SEQUENCE_ITEM_VERTEX) { @@ -266,6 +269,7 @@ int main(int argc, char* argv[]) } } } + return 0; } diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp index adc630cf80f..1e53b2a703f 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp @@ -71,7 +71,7 @@ int main(int argc, char* argv[]) Surface_mesh_shortest_path shortestPaths(polyhedron, traits); face_iterator facesBegin, facesEnd; - boost::tie(facesBegin, facesEnd) = CGAL::faces(polyhedron); + boost::tie(facesBegin, facesEnd) = faces(polyhedron); std::vector facesList; @@ -90,7 +90,7 @@ int main(int argc, char* argv[]) size_t faceIndex = random.get_int(0, facesList.size()); face_descriptor face = facesList[faceIndex]; - Triangle_3 faceTriangle = CGAL::internal::triangle_from_halfedge(CGAL::halfedge(face, polyhedron), polyhedron, vertexPointMap); + Triangle_3 faceTriangle = CGAL::internal::triangle_from_halfedge(halfedge(face, polyhedron), polyhedron, vertexPointMap); Barycentric_coordinate location = CGAL::test::random_coordinate(random); diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp index 2d61528138a..cf9f43e4772 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp @@ -74,7 +74,7 @@ int main(int argc, char* argv[]) Surface_mesh_shortest_path shortestPaths(polyhedron, traits); face_iterator facesBegin, facesEnd; - boost::tie(facesBegin, facesEnd) = CGAL::faces(polyhedron); + boost::tie(facesBegin, facesEnd) = faces(polyhedron); std::vector facesList; @@ -89,14 +89,14 @@ int main(int argc, char* argv[]) typedef boost::property_map::type FIM; FIM faceIndexMap(get(boost::face_index, polyhedron)); - VPM vertexPointMap(CGAL::get(CGAL::vertex_point, polyhedron)); + VPM vertexPointMap(get(CGAL::vertex_point, polyhedron)); for (size_t i = 0; i < numTrials; ++i) { size_t faceIndex = random.get_int(0, facesList.size()); face_descriptor face = facesList[faceIndex]; - Triangle_3 faceTriangle = CGAL::internal::triangle_from_halfedge(CGAL::halfedge(face, polyhedron), polyhedron, vertexPointMap); + Triangle_3 faceTriangle = CGAL::internal::triangle_from_halfedge(halfedge(face, polyhedron), polyhedron, vertexPointMap); Barycentric_coordinate location = CGAL::test::random_coordinate(random); @@ -113,7 +113,7 @@ int main(int argc, char* argv[]) } vertex_iterator startVertexIt, endVertexIt; - boost::tie(startVertexIt, endVertexIt) = boost::vertices(polyhedron); + boost::tie(startVertexIt, endVertexIt) = vertices(polyhedron); bool first = true; diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits_test.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits_test.cpp index 4e0a285b82b..bff06828ba2 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits_test.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits_test.cpp @@ -285,7 +285,7 @@ void detect_is_saddle_vertex() vertex_iterator currentVertex; vertex_iterator endVertex; - for (boost::tie(currentVertex, endVertex) = boost::vertices(P); currentVertex != endVertex; ++currentVertex) + for (boost::tie(currentVertex, endVertex) = vertices(P); currentVertex != endVertex; ++currentVertex) { if (currentVertexIndex <= 3 || currentVertexIndex == 7) { diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp index 3ada5dd7d00..96b92a5bb65 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp @@ -112,7 +112,7 @@ struct TestMeshProgramInstance size_t x, y; double alpha; std::cin >> x >> y >> alpha; - std::pair he = CGAL::halfedge(vertices[x], vertices[y], polyhedron); + std::pair he = halfedge(vertices[x], vertices[y], polyhedron); assert(he.second); return shortestPath.face_location(he.first, FT(alpha)); } @@ -121,8 +121,8 @@ struct TestMeshProgramInstance size_t x, y; double alpha0, alpha1, alpha2; std::cin >> x >> y >> alpha0 >> alpha1 >> alpha2; - std::pair he = CGAL::halfedge(vertices[x], vertices[y], polyhedron); - return Face_location(CGAL::face(he.first, polyhedron), construct_barycentric_coordinate(FT(alpha0), FT(alpha1), FT(alpha2))); + std::pair he = halfedge(vertices[x], vertices[y], polyhedron); + return Face_location(face(he.first, polyhedron), construct_barycentric_coordinate(FT(alpha0), FT(alpha1), FT(alpha2))); } return Face_location(Graph_traits::null_face(), construct_barycentric_coordinate(FT(0.0), FT(0.0), FT(0.0))); @@ -156,7 +156,7 @@ struct TestMeshProgramInstance CGAL::set_halfedgeds_items_id(polyhedron); - numVertices = boost::num_vertices(polyhedron); + numVertices = num_vertices(polyhedron); VIM vertexIndexMap(get(boost::vertex_index, polyhedron)); HIM halfedgeIndexMap(get(boost::halfedge_index, polyhedron)); @@ -167,7 +167,7 @@ struct TestMeshProgramInstance std::vector vertices; - boost::tie(verticesStart, verticesEnd) = boost::vertices(polyhedron); + boost::tie(verticesStart, verticesEnd) = CGAL::vertices(polyhedron); for (vertex_iterator it = verticesStart; it != verticesEnd; ++it) { @@ -192,7 +192,7 @@ struct TestMeshProgramInstance Surface_mesh_shortest_path endToStartShortestPaths(polyhedron, traits); endToStartShortestPaths.m_debugOutput = debugMode; - std::cout << "Mesh: " << meshName << " " << boost::num_vertices(polyhedron) << " " << CGAL::num_faces(polyhedron) << " " << CGAL::num_halfedges(polyhedron) << std::endl; + std::cout << "Mesh: " << meshName << " " << num_vertices(polyhedron) << " " << num_faces(polyhedron) << " " << num_halfedges(polyhedron) << std::endl; std::cout << std::setprecision(20); @@ -250,7 +250,7 @@ struct TestMeshProgramInstance if (seqItem.type == CGAL::test::SEQUENCE_ITEM_EDGE) { - std::cout << vertexIndexMap[CGAL::source(seqItem.halfedge, polyhedron)] << " , " << vertexIndexMap[CGAL::target(seqItem.halfedge, polyhedron)] << " : " << seqItem.edgeAlpha << std::endl; + std::cout << vertexIndexMap[source(seqItem.halfedge, polyhedron)] << " , " << vertexIndexMap[target(seqItem.halfedge, polyhedron)] << " : " << seqItem.edgeAlpha << std::endl; } else if (seqItem.type == CGAL::test::SEQUENCE_ITEM_VERTEX) { diff --git a/Surface_modeling/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp b/Surface_modeling/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp index 6286c34b816..240e4119ae8 100644 --- a/Surface_modeling/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp +++ b/Surface_modeling/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp @@ -43,7 +43,7 @@ int main(int argc,char** argv) // Definition of the region of interest (use the whole mesh) vertex_iterator vb,ve; - boost::tie(vb, ve) = boost::vertices(mesh); + boost::tie(vb, ve) = vertices(mesh); //the selection is set by a file input.open(argv[2]);