mirror of https://github.com/CGAL/cgal
Merge pull request #6065 from sloriot/BGL-FFG_complement
Add a function to use the complement
This commit is contained in:
commit
c1c7f4ad9a
|
|
@ -437,7 +437,7 @@ struct Face_filtered_graph
|
|||
initialize_halfedge_indices();
|
||||
}
|
||||
|
||||
/// changes the set of selected faces using a patch id
|
||||
/// changes the set of selected faces using a patch id.
|
||||
template<class FacePatchIndexMap>
|
||||
void set_selected_faces(typename boost::property_traits<FacePatchIndexMap>::value_type face_patch_id,
|
||||
FacePatchIndexMap face_patch_index_map)
|
||||
|
|
@ -506,7 +506,7 @@ struct Face_filtered_graph
|
|||
reset_indices();
|
||||
}
|
||||
|
||||
/// changes the set of selected faces using a range of face descriptors
|
||||
/// changes the set of selected faces using a range of face descriptors.
|
||||
template<class FaceRange>
|
||||
void set_selected_faces(const FaceRange& selection)
|
||||
{
|
||||
|
|
@ -570,7 +570,7 @@ struct Face_filtered_graph
|
|||
return selected_halfedges[get(himap, halfedge(e,_graph))];
|
||||
}
|
||||
|
||||
/// returns the number of selected faces
|
||||
/// returns the number of selected faces.
|
||||
size_type number_of_faces() const
|
||||
{
|
||||
return selected_faces.count();
|
||||
|
|
@ -661,6 +661,27 @@ struct Face_filtered_graph
|
|||
return true;
|
||||
}
|
||||
|
||||
/// inverts the selected status of faces.
|
||||
void invert_selection()
|
||||
{
|
||||
selected_faces=~selected_faces;
|
||||
selected_halfedges.reset();
|
||||
selected_vertices.reset();
|
||||
|
||||
for(face_descriptor fd : faces(_graph))
|
||||
{
|
||||
if (!selected_faces.test(get(fimap, fd))) continue;
|
||||
for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, _graph), _graph))
|
||||
{
|
||||
selected_halfedges.set(get(himap, hd));
|
||||
selected_halfedges.set(get(himap, opposite(hd, _graph)));
|
||||
selected_vertices.set(get(vimap, target(hd, _graph)));
|
||||
}
|
||||
}
|
||||
|
||||
reset_indices();
|
||||
}
|
||||
|
||||
private:
|
||||
Graph& _graph;
|
||||
FIM fimap;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@ Release date: June 2022
|
|||
|
||||
- Added an overload of the function `CGAL::convex_hull_3()`, which writes the result in an indexed triangle set.
|
||||
|
||||
### [CGAL and the Boost Graph Library (BGL)](https://doc.cgal.org/5.5/Manual/packages.html#PkgBGL)
|
||||
|
||||
- Added the function [`invert_selection()`](https://doc.cgal.org/5.5/BGL/structCGAL_1_1Face__filtered__graph.html#aa428541ebbdd35f9a6e9a3ffd60178df) in the class [`Face_filtered_graph`](https://doc.cgal.org/5.5/BGL/structCGAL_1_1Face__filtered__graph.html), which toggles the selected status of a graph: selected faces are deselected, and unselected faces are selected.
|
||||
|
||||
### Combinatorial Maps
|
||||
|
||||
- Removed old code deprecated in CGAL 4.9 and 4.10 (global fonctions, and information associated with darts).
|
||||
|
|
|
|||
Loading…
Reference in New Issue