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>
44 const SurfaceMesh<Scalar, Index>& mesh,
45 std::string_view name,
46 BitField<AttributeElement> expected_element,
48 size_t expected_channels);
69template <
typename ExpectedValueType,
typename Scalar,
typename Index>
71 const SurfaceMesh<Scalar, Index>& mesh,
73 BitField<AttributeElement> expected_element,
75 size_t expected_channels);
93template <
typename ExpectedValueType,
typename Scalar,
typename Index>
95 const SurfaceMesh<Scalar, Index>& mesh,
96 std::string_view name,
97 BitField<AttributeElement> expected_element,
99 size_t expected_channels);
119template <
typename ExpectedValueType,
typename Scalar,
typename Index>
121 SurfaceMesh<Scalar, Index>& mesh,
122 std::string_view name,
125 size_t expected_channels,
126 ResetToDefault reset_tag);
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
::nonstd::span< T, Extent > span
A bounds-safe view for sequences of objects.
Definition span.h:27
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:160
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:97
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:185