14#include <lagrange/AttributeFwd.h>
15#include <lagrange/SurfaceMesh.h>
16#include <lagrange/types/MappingPolicy.h>
17#include <lagrange/utils/span.h>
57template <AttributeElement element,
typename Scalar,
typename Index>
63 const MapAttributesOptions& options = {});
::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
void map_attributes(const SurfaceMesh< Scalar, Index > &source_mesh, SurfaceMesh< Scalar, Index > &target_mesh, span< const Index > mapping_data, span< const Index > mapping_offsets={}, const MapAttributesOptions &options={})
Map attributes from the source mesh to the target mesh.
Definition: map_attributes.cpp:26
MappingPolicy
Mapping policy control the behavior when two or more elements are mapped into the same output element...
Definition: MappingPolicy.h:21
@ KeepFirst
Keep the value of the first elements.
@ Average
Take the average of all involved elements.
Attribute mapping options.
Definition: map_attributes.h:23
MappingPolicy collision_policy_integral
Collision policy for integral valued attributes.
Definition: map_attributes.h:28
span< AttributeId > selected_attributes
Selected attribute ids. If empty, treat all attributes as selected.
Definition: map_attributes.h:31
MappingPolicy collision_policy_float
Collision policy for float or double valued attributes.
Definition: map_attributes.h:25