Wildmeshing Toolkit
CollapseSoftEnergyBeforeInvariant.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 #include "Invariant.hpp"
5 
6 namespace wmtk::invariants {
8 {
9 public:
11  const Mesh& m,
14  const attribute::TypedAttributeHandle<double>& edge_length,
15  const attribute::TypedAttributeHandle<double>& target_edge_length,
16  int64_t collapse_type = 0,
17  double eps = 0.1);
19 
20  bool before(const simplex::Simplex& s) const override;
21 
22 private:
27  const int64_t m_collapse_type; // 0: collapse to v0, 1: collapse to v1, 2: collapse to midpoint
28  const double m_eps;
29 };
30 } // namespace wmtk::invariants
Handle that represents attributes for some mesh.
const attribute::TypedAttributeHandle< Rational > m_coordinate_handle
const attribute::TypedAttributeHandle< double > m_target_edge_length_handle
const attribute::TypedAttributeHandle< double > m_energy_handle
CollapseSoftEnergyBeforeInvariant(const Mesh &m, const attribute::TypedAttributeHandle< Rational > &coordinate, const attribute::TypedAttributeHandle< double > &energy, const attribute::TypedAttributeHandle< double > &edge_length, const attribute::TypedAttributeHandle< double > &target_edge_length, int64_t collapse_type=0, double eps=0.1)
const attribute::TypedAttributeHandle< double > m_edge_length_handle
Invariant(const Mesh &m)
Definition: Invariant.cpp:10