Add specializations for Surface_mesh and Polyhedron_3

This commit is contained in:
Mael Rouxel-Labbé 2023-07-19 13:48:34 +02:00
parent a69a2f54c6
commit 146f9ecb21
3 changed files with 16 additions and 2 deletions

View File

@ -945,6 +945,9 @@ void swap_edges(const typename boost::graph_traits<FaceGraph>::halfedge_descript
* \link MutableHalfedgeGraph `remove_edge()`\endlink, and
* \link MutableFaceGraph `remove_face()`\endlink, for each vertex, edge, and face.
*
* Note that some graphs have a specialized version of this function to improve
* complexity.
*
* @warning This function does not perform anything more than what is advertised above. It is
* up to the user to e.g. clean garbage or remove internal property maps (if relevant, and desired).
*

View File

@ -310,6 +310,12 @@ set_halfedge(typename boost::graph_traits< CGAL::Polyhedron_3<Gt,I,HDS,A> >::ver
static_cast<Sneak&>(*v).set_halfedge(h);
}
template<class Gt, class I, CGAL_HDS_PARAM_, class A>
void
remove_all_elements(CGAL::Polyhedron_3<Gt,I,HDS,A>& g)
{
g.clear();
}
//
// HalfedgeGraph

View File

@ -472,7 +472,6 @@ remove_vertex(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descr
sm.remove_vertex(v);
}
template <typename P>
void
remove_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::vertex_descriptor u,
@ -491,7 +490,6 @@ remove_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_descripto
sm.remove_edge(e);
}
template <typename P>
void
remove_edge(typename boost::graph_traits<CGAL::Surface_mesh<P> >::edge_iterator eiter,
@ -508,6 +506,13 @@ remove_face(typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descripto
sm.remove_face(f);
}
template<typename P>
void
remove_all_elements(CGAL::Surface_mesh<P>& sm)
{
sm.clear_without_removing_property_maps();
}
template<typename P>
typename boost::graph_traits<CGAL::Surface_mesh<P> >::face_descriptor
add_face(CGAL::Surface_mesh<P>& sm)