14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/utils/span.h>
16#include <lagrange/types/ConnectivityType.h>
65template <
typename Scalar,
typename Index>
std::vector< SurfaceMesh< Scalar, Index > > separate_by_components(const SurfaceMesh< Scalar, Index > &mesh, const SeparateByComponentsOptions &options={})
Separate a mesh by connected components.
Definition: separate_by_components.cpp:21
Main namespace for Lagrange.
Definition: AABBIGL.h:30
ConnectivityType
This type defines the condition when two facets are considered as "connected".
Definition: ConnectivityType.h:19
@ Edge
Two facets are considered connected if they share an edge.
Option settings for separate_by_components.
Definition: separate_by_components.h:34
std::string_view source_facet_attr_name
The name of the output attribute holding source facet indices.
Definition: separate_by_components.h:43
bool map_attributes
Map all attributes over to submesh.
Definition: separate_by_components.h:46
std::string_view source_vertex_attr_name
The name of the output attribute holding source vertex indices.
Definition: separate_by_components.h:38
ConnectivityType connectivity_type
Connectivity type used for component computation.
Definition: separate_by_components.h:49