Wildmeshing Toolkit
TriMeshOperationExecutor.hpp
Go to the documentation of this file.
1 #pragma once
3 #include <wmtk/utils/Logger.hpp>
4 #include "TriMesh.hpp"
5 #include "Tuple.hpp"
6 namespace wmtk {
7 
8 
10 {
11 public:
12  TriMeshOperationExecutor(TriMesh& m, const Tuple& operating_tuple);
13  void delete_simplices();
14 
15  std::array<attribute::FlagAccessor<TriMesh>, 3> flag_accessors;
21 
25  Tuple next_edge(const Tuple& tuple) const;
29  Tuple prev_edge(const Tuple& tuple) const;
30 
36  static const std::array<std::vector<int64_t>, 3> get_split_simplices_to_delete(
37  const Tuple& tuple,
38  const TriMesh& m);
39 
47  static const std::array<std::vector<int64_t>, 3> get_collapse_simplices_to_delete(
48  const Tuple& tuple,
49  const TriMesh& m);
50 
51 
52  void update_ids_in_ear(const EarData& ear, const int64_t new_fid, const int64_t old_fid);
53 
54  void connect_ears();
55 
56  // historical precompute tooling
57  void split_edge_precompute();
59 
60  void split_edge();
61  void collapse_edge();
62 
69  // return the two new fids in order
70  void replace_incident_face(IncidentFaceData& face_data);
72  void fill_split_facet_data();
74  std::vector<int64_t> request_simplex_indices(const PrimitiveType type, int64_t count);
75 
77 
78 
80 };
81 
82 } // namespace wmtk
static const std::array< std::vector< int64_t >, 3 > get_split_simplices_to_delete(const Tuple &tuple, const TriMesh &m)
gather all simplices that are deleted in a split
static const std::array< std::vector< int64_t >, 3 > get_collapse_simplices_to_delete(const Tuple &tuple, const TriMesh &m)
gather all simplices that are deleted in a collapse
TriMeshOperationExecutor(TriMesh &m, const Tuple &operating_tuple)
Tuple next_edge(const Tuple &tuple) const
jump to the next edge
std::vector< int64_t > request_simplex_indices(const PrimitiveType type, int64_t count)
attribute::Accessor< int64_t, TriMesh > & vf_accessor
std::array< attribute::FlagAccessor< TriMesh >, 3 > flag_accessors
attribute::Accessor< int64_t, TriMesh > & fv_accessor
Tuple prev_edge(const Tuple &tuple) const
jump to the previous edge
attribute::Accessor< int64_t, TriMesh > & ff_accessor
void replace_incident_face(IncidentFaceData &face_data)
attribute::Accessor< int64_t, TriMesh > & fe_accessor
void update_ids_in_ear(const EarData &ear, const int64_t new_fid, const int64_t old_fid)
handling the topology glueing of ear to non-ear face, transfering data from ear-oldface to ear-newfac...
attribute::Accessor< int64_t, TriMesh > & ef_accessor
A CachingAccessor that uses tuples for accessing attributes instead of indices.
Definition: Accessor.hpp:25
Definition: Accessor.hpp:6
An ear is a face that is adjacent to a face that is incident to the edge on which the operation is pe...
Data on the incident face relevant for performing operations.