14#include <lagrange/utils/assert.h>
37template <
typename Derived,
typename Scalar,
typename Index>
39 Eigen::MatrixBase<Derived>& data,
48 using ValueType =
typename Derived::Scalar;
50 if constexpr (std::is_integral_v<ValueType>) {
51 data.row(row_to) = (data.row(row_from_1).
template cast<Scalar>() * (1 - t) +
58 data.row(row_to) = data.row(row_from_1) * (1 - t) + data.row(row_from_2) * t;
@ Scalar
Mesh attribute must have exactly 1 channel.
Definition AttributeFwd.h:56
SurfaceMesh< ToScalar, ToIndex > cast(const SurfaceMesh< FromScalar, FromIndex > &source_mesh, const AttributeFilter &convertible_attributes={}, std::vector< std::string > *converted_attributes_names=nullptr)
Cast a mesh to a mesh of different scalar and/or index type.
#define la_debug_assert(...)
Debug assertion check.
Definition assert.h:197
nullptr_t, size_t, ptrdiff_t basic_ostream bad_weak_ptr extent, remove_extent, is_array,...
Definition attribute_string_utils.h:21
void interpolate_attribute_row(Eigen::MatrixBase< Derived > &data, Index row_to, Index row_from_1, Index row_from_2, Scalar t)
Linearly interpolate row row_to from rows row_from_1 and row_from_2 of an attribute matrix: data....
Definition interpolate_attribute_row.h:38