14 #include <boost/graph/graph_traits.hpp>
15 #include <boost/graph/properties.hpp>
16 #include <CGAL/boost/graph/iterator.h>
20 template<
typename HalfedgeGraph,
23 typename halfedge_descriptor =
typename boost::graph_traits<
24 HalfedgeGraph >::halfedge_descriptor >
29 std::set< halfedge_descriptor > &forbidden_edges)
31 boost::iterator_range<
32 CGAL::Halfedge_around_target_iterator< HalfedgeGraph > >
33 iterator_range = CGAL::halfedges_around_target(v, g);
34 for(
auto h_v : iterator_range)
36 forbidden_edges.insert(h_v);
37 forbidden_edges.insert(
opposite(h_v, g));
41 template<
typename HalfedgeGraph,
44 typename halfedge_descriptor =
typename boost::graph_traits<
45 HalfedgeGraph >::halfedge_descriptor >
49 std::set< vertex_descriptor > &forbidden_vertices)
51 boost::iterator_range<
52 CGAL::Halfedge_around_target_iterator< HalfedgeGraph > >
53 iterator_range = CGAL::halfedges_around_target(v, g);
54 forbidden_vertices.insert(v);
55 for(
auto h_v : iterator_range)
58 forbidden_vertices.insert(src_h);
63 template<
typename HalfedgeGraph,
66 typename halfedge_descriptor =
typename boost::graph_traits<
67 HalfedgeGraph >::halfedge_descriptor >
71 std::set< halfedge_descriptor > &forbidden_edges)
73 std::set< vertex_descriptor > forbidden_vertices;
85 template<
typename HalfedgeGraph,
88 typename halfedge_descriptor =
typename boost::graph_traits<
89 HalfedgeGraph >::halfedge_descriptor >
93 std::set< halfedge_descriptor > &forbidden_edges,
94 std::vector< halfedge_descriptor > &edges_to_color)
96 boost::iterator_range<
97 CGAL::Halfedge_around_target_iterator< HalfedgeGraph > >
98 iterator_range = CGAL::halfedges_around_target(v, g);
99 for(
auto h_v : iterator_range)
101 forbidden_edges.insert(h_v);
102 forbidden_edges.insert(
opposite(h_v, g));
104 edges_to_color.push_back(h_v);
105 edges_to_color.push_back(
opposite(h_v, g));
109 forbidden_edges.insert(next_h);
110 halfedge_descriptor opp_next_h =
opposite(next_h, g);
111 forbidden_edges.insert(opp_next_h);
112 edges_to_color.push_back(next_h);
113 edges_to_color.push_back(opp_next_h);
116 if(!CGAL::is_border(opp_next_h, g) &&
117 !CGAL::is_border(next_h, g))
121 forbidden_edges.insert(
next(opp_next_h, g));
123 boost::iterator_range<
124 CGAL::Halfedge_around_target_iterator< HalfedgeGraph > >
125 iterator_range2 = CGAL::halfedges_around_target(vv, g);
126 for(
auto h_v2 : iterator_range2)
128 forbidden_edges.insert(h_v2);
129 forbidden_edges.insert(
opposite(h_v2, g));
131 forbidden_edges.insert(
opposite(
next(opp_next_h, g), g));
133 edges_to_color.push_back(
next(opp_next_h, g));
134 edges_to_color.push_back(
opposite(
next(opp_next_h, g), g));
136 forbidden_edges.insert(
next(
next(opp_next_h, g), g));
139 edges_to_color.push_back(
next(
next(opp_next_h, g), g));