The class Face_filtered_graph is an adaptor that creates a filtered view of a graph by restricting it to a subset of faces.
Contrary to boost::filtered_graph, this class only requires a way to access the selected faces and will automatically select the edges/halfedges and vertices present in the adapted graph. A vertex is selected if it is incident to at least one selected face. A edge is selected if it is incident to at least a selected face. A halfedge is selected if its edge is selected.
Since this class is a model of the FaceGraph concept, there is a restriction on the set of selected faces: the adapted graph must define a manifold mesh. In order to check that this condition is verified, you can use the function is_selection_valid().
There are two different ways to initialize this class. You can directly provide the set of faces selected, or if you have a face patch map, select the patches of faces. The latter option is convenient if you want to access some connected components of a graph after having called CGAL::Polygon_mesh_processing::connected_components().
The documented interface of this class is limited on purpose and free functions of the concept this class is a model of must be used to manipulate it.
A BGL-like named parameter mechanism is used in the constructors of this class. Default values are available but if you need to set them, you can pass for npCGAL::parameters::face_index_map(fim).halfedge_index_map(him).vertex_index_map(vim) where fim, him, and vim are the respective index maps. The order of the arguments is not important and any of them can be missing if the default is fine.
constructs an empty face filtered graph (no face is selected)
Template Parameters
NamedParameters
a sequence of named parameters
Parameters
graph
the underlying graph.
np
optional sequence of named parameters among the ones listed below
Optional Named Parameters
a property map associating to each vertex of graph a unique index between 0 and num_vertices(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
a property map associating to each halfedge of graph a unique index between 0 and num_halfedges(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::halfedge_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
a property map associating to each face of graph a unique index between 0 and num_faces(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::face_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
Constructor where the set of selected faces is specified as a range of patch ids.
Template Parameters
FacePatchIndexMap
a model of ReadablePropertyMap with face_descriptor as key type and graph_traits<Graph>::faces_size_type as value type.
FacePatchIndexRange
a model of ConstRange with boost::property_traits<FacePatchIndexMap>::value_type as value type.
NamedParameters
a sequence of named parameters
Parameters
graph
the underlying graph
face_patch_index_map
the property_map that assigns a patch index to each face
selected_face_patch_indices
a range of the face patch indices to select
np
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map associating to each vertex of graph a unique index between 0 and num_vertices(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
a property map associating to each halfedge of graph a unique index between 0 and num_halfedges(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::halfedge_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
a property map associating to each face of graph a unique index between 0 and num_faces(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::face_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
Constructor where the set of selected faces is specified as a patch id.
Template Parameters
FacePatchIndexMap
a model of ReadablePropertyMap with face_descriptor as key type and graph_traits<Graph>::faces_size_type as value type.
NamedParameters
a sequence of named parameters
Parameters
graph
the underlying graph.
face_patch_index_map
the property_map that assigns a patch index to each face
selected_face_patch_index
the index of the face patch selected
np
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map associating to each vertex of graph a unique index between 0 and num_vertices(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
a property map associating to each halfedge of graph a unique index between 0 and num_halfedges(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::halfedge_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
a property map associating to each face of graph a unique index between 0 and num_faces(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::face_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
Constructor where the set of selected faces is specified as a range of face descriptors.
Template Parameters
FaceRange
a model of ConstRange with face_descriptor as value type.
NamedParameters
a sequence of named parameters
Parameters
graph
the graph containing the wanted patch
selected_faces
the set of selected faces
np
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map associating to each vertex of graph a unique index between 0 and num_vertices(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
a property map associating to each halfedge of graph a unique index between 0 and num_halfedges(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::halfedge_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.
a property map associating to each face of graph a unique index between 0 and num_faces(graph) - 1
Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::face_descriptor as key type and std::size_t as value type
Default: an automatically indexed internal map
Extra: If this parameter is not passed, internal machinery will create and initialize a face index property map, either using the internal property map if it exists or using an external map. The latter might result in - slightly - worsened performance in case of non-constant complexity for index access.