14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/utils/BitField.h>
16#include <lagrange/utils/span.h>
22enum class ResetToDefault { Yes, No };
42template <
typename ExpectedValueType,
typename Scalar,
typename Index>
45 std::string_view name,
46 BitField<AttributeElement> expected_element,
48 size_t expected_channels);
69template <
typename ExpectedValueType,
typename Scalar,
typename Index>
72 span<const AttributeId> selected_ids,
73 BitField<AttributeElement> expected_element,
75 size_t expected_channels);
93template <
typename ExpectedValueType,
typename Scalar,
typename Index>
96 std::string_view name,
97 BitField<AttributeElement> expected_element,
99 size_t expected_channels);
119template <
typename ExpectedValueType,
typename Scalar,
typename Index>
122 std::string_view name,
125 size_t expected_channels,
126 ResetToDefault reset_tag);
A general purpose polygonal mesh class.
Definition: SurfaceMesh.h:66
uint32_t AttributeId
Identified to be used to access an attribute.
Definition: AttributeFwd.h:73
AttributeUsage
Usage tag indicating how the attribute should behave under mesh transformations.
Definition: AttributeFwd.h:54
AttributeElement
Type of element to which the attribute is attached.
Definition: AttributeFwd.h:26
nullptr_t, size_t, ptrdiff_t basic_ostream bad_weak_ptr extent, remove_extent, is_array,...
Definition: attribute_string_utils.h:21
AttributeId find_attribute(const SurfaceMesh< Scalar, Index > &mesh, std::string_view name, BitField< AttributeElement > expected_element, AttributeUsage expected_usage, size_t expected_channels)
Find an attribute with a given name, ensuring the usage and element type match an expected target.
Definition: find_attribute_utils.cpp:144
AttributeId find_matching_attribute(const SurfaceMesh< Scalar, Index > &mesh, std::string_view name, BitField< AttributeElement > expected_element, AttributeUsage expected_usage, size_t expected_channels)
Find an attribute with a given name, ensuring the usage and element type match an expected target.
Definition: find_attribute_utils.cpp:82
AttributeId find_or_create_attribute(SurfaceMesh< Scalar, Index > &mesh, std::string_view name, AttributeElement expected_element, AttributeUsage expected_usage, size_t expected_channels, ResetToDefault reset_tag)
Either retrieve or create an attribute with a prescribed name, element type and usage.
Definition: find_attribute_utils.cpp:168