9 const MeshAttributeHandle<double>& vertex_uv_handle,
10 const image::Image& image)
12 , m_pos_evaluator(image)
17 const MeshAttributeHandle<double>& vertex_uv_handle,
18 const wmtk::image::SamplingAnalyticFunction::FunctionType type,
23 , m_pos_evaluator(type, a, b, c)
31 ConstAccessor<double> pos = mesh().create_const_accessor(get_coordinate_attribute_handle());
33 const Tuple& tuple = simplex;
34 auto tuple_value = pos.const_vector_attribute(tuple);
37 uv0 = utils::as_DScalar<DScalar>(tuple_value);
42 Eigen::Vector2d uv2 = pos.const_vector_attribute(mesh().switch_tuples(tuple, {
PE,
PV}));
43 Eigen::Vector2d uv1 = pos.const_vector_attribute(mesh().switch_tuples(tuple, {
PV,
PE}));
DScalar get_value_autodiff(const Tuple &simplex) const override
PositionMapAMIPS2D(const TriMesh &mesh, const MeshAttributeHandle< double > &vertex_uv_handle, const image::Image &image)
This is the implementation of the AMIPS energy function of a triangle mesh that can be embedded in 2d...
auto amips(const Eigen::MatrixBase< Derived > &B)
constexpr PrimitiveType PV
Vector< double, 3 > Vector3d
constexpr PrimitiveType PE
Automatic differentiation scalar with first- and second-order derivatives.