14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/utils/BitField.h>
75template <
typename Scalar,
typename Index>
98template <
typename Scalar,
typename Index>
static constexpr BitField all()
Named constructor returning a bitfield set to 1.
Definition: BitField.h:76
SurfaceMesh< Scalar, Index > filter_attributes(SurfaceMesh< Scalar, Index > source_mesh, const AttributeFilter &options={})
Filters the attributes of mesh according to user specifications.
Definition: filter_attributes.cpp:116
std::vector< AttributeId > filtered_attribute_ids(const SurfaceMesh< Scalar, Index > &mesh, const AttributeFilter &options)
Create a list of attribute ids corresponding to the given filter.
Definition: filter_attributes.cpp:95
Main namespace for Lagrange.
Definition: AABBIGL.h:30
Helper object to filter attributes based on name, id, usage or element type.
Definition: filter_attributes.h:37
std::vector< AttributeFilter > or_filters
If set, match all attributes that satisfy any of the filters in this list.
Definition: filter_attributes.h:56
std::optional< std::vector< AttributeNameOrId > > excluded_attributes
Optional list of attributes to exclude. If not provided, no attribute is excluded.
Definition: filter_attributes.h:45
BitField< AttributeElement > included_element_types
List of attribute element types to include. By default, all element types are included.
Definition: filter_attributes.h:51
BitField< AttributeUsage > included_usages
List of attribute usages to include. By default, all usages are included.
Definition: filter_attributes.h:48
std::variant< AttributeId, std::string > AttributeNameOrId
Variant identifying an attribute by its name or id.
Definition: filter_attributes.h:39
std::optional< std::vector< AttributeNameOrId > > included_attributes
Optional list of attributes to include. If not provided, all attributes are included.
Definition: filter_attributes.h:42
std::vector< AttributeFilter > and_filters
If set, match all attributes that satisfy all of the filters in this list.
Definition: filter_attributes.h:61