Wildmeshing Toolkit
Loading...
Searching...
No Matches
slim2d.hpp
1#pragma once
2
3#include <Eigen/Core>
4
5#include <array>
6#include <vector>
7
8namespace wmtk::components::tracking {
9
19{
20 std::array<int, 3> v;
22 Eigen::Matrix2d rest_inv = Eigen::Matrix2d::Identity();
23 double weight = 0;
24};
25
28SlimElement slim_element(
29 const std::array<int, 3>& v,
30 const Eigen::Vector3d& p0,
31 const Eigen::Vector3d& p1,
32 const Eigen::Vector3d& p2,
33 double weight);
34
36SlimElement slim_element(
37 const std::array<int, 3>& v,
38 const Eigen::Vector2d& q0,
39 const Eigen::Vector2d& q1,
40 const Eigen::Vector2d& q2,
41 double weight);
42
44double slim_energy(const std::vector<Eigen::Vector2d>& x, const std::vector<SlimElement>& elements);
45
54double slim(
55 std::vector<Eigen::Vector2d>& x,
56 const std::vector<char>& fixed,
57 const std::vector<SlimElement>& elements,
58 int iterations);
59
60} // namespace wmtk::components::tracking
A triangle of a 2D layout and the shape it should keep.
Definition slim2d.hpp:19
Eigen::Matrix2d rest_inv
The inverse of the rest edge matrix [x1 - x0, x2 - x0].
Definition slim2d.hpp:22