Go to the documentation of this file.
16 #include <boost/graph/graph_traits.hpp>
17 #include <boost/graph/properties.hpp>
18 #include <CGAL/boost/graph/helpers.h>
38 template<
typename FaceGraph,
48 typedef boost::graph_traits< FaceGraph > GraphTraits;
50 typedef typename GraphTraits::halfedge_descriptor halfedge_descriptor;
53 std::map< vertex_descriptor, int > d;
56 std::size_t current_index = 0;
58 while(current_index < qv.size() && (dist_v = d[qv[current_index]]) < k)
60 v = qv[current_index++];
61 halfedge_descriptor h =
halfedge(v, g), hend = h;
70 if(d.insert(std::make_pair(new_v, dist_v + 1)).second)
77 boost::graph_traits< FaceGraph >::null_face())
79 if(d.insert(std::make_pair(
target(
next(h, g), g), dist_v + 1)).second)
85 }
while(!(h == hend));
104 template<
typename FaceGraph >
110 typename boost::graph_traits< FaceGraph >::halfedge_descriptor > &qh)
112 typedef boost::graph_traits< FaceGraph > GraphTraits;
114 typedef typename GraphTraits::halfedge_descriptor halfedge_descriptor;
119 halfedge_descriptor h =
halfedge(v, g), hend = h;
129 boost::graph_traits< FaceGraph >::null_face())
133 qh.erase(qh.begin());
137 qh.push_back(
next(h, g));
152 halfedge_descriptor last = h;
161 }
while(!CGAL::is_border(
172 }
while(!(h == hend));
190 template<
typename FaceGraph,
199 Operators::extract_k_ring< FaceGraph, GeometryTraits >(v, g, 1, qv);
200 qv.erase(qv.begin());
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor next(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the next halfedge around its face.
void extract_1_ring_not_including_v(typename boost::graph_traits< FaceGraph >::vertex_descriptor v, const FaceGraph &g, std::vector< typename boost::graph_traits< FaceGraph >::vertex_descriptor > &qv)
Extract vertices which are at exactly 1 far from vertex v in the graph of edges.
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor opposite(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the halfedge with source and target swapped.
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor source(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the source vertex of e.
void extract_k_ring(typename boost::graph_traits< FaceGraph >::vertex_descriptor v, const FaceGraph &g, int k, std::vector< typename boost::graph_traits< FaceGraph >::vertex_descriptor > &qv)
Extract vertices which are at most k (inclusive) far from vertex v in the graph of edges.
Interfaces for plugins These interfaces will be used for different plugins.
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor halfedge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor v, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns a halfedge with target v.
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor target(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the target vertex of e.
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor prev(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the previous halfedge around its face.
boost::graph_traits< MeshT >::vertex_descriptor vertex_descriptor
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::face_descriptor face(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the face incident to halfedge h.
void extract_vertex_star(typename boost::graph_traits< FaceGraph >::vertex_descriptor v, const FaceGraph &g, std::vector< typename boost::graph_traits< FaceGraph >::halfedge_descriptor > &qh)
Extract halfedges which have v as target vertex. All extracted halfedges are associated to a face,...