Wildmeshing Toolkit
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
wmtk::components::tracking::SurfaceMap Class Reference

The map between the first and the last state of a SurfaceHistory. More...

#include <SurfaceMap.hpp>

Classes

struct  Cell
 One flattened patch: the faces it covers before and after an edit, in a shared domain. More...
 
struct  Embedding
 
struct  Face
 
struct  Step
 

Public Member Functions

 SurfaceMap (const history::SurfaceHistory &h, const SurfaceMapOptions &options={})
 
std::vector< SurfacePoint > to_input (std::vector< SurfacePoint > points, MapWarnings *warnings=nullptr) const
 
std::vector< SurfacePoint > to_output (std::vector< SurfacePoint > points, MapWarnings *warnings=nullptr) const
 Points on the first state, mapped onto the last; see to_input.
 
const MapWarnings & build_warnings () const
 What building the map found.
 
const std::vector< size_t > & warned_edits () const
 The edits (indices into the history) whose local map raised a build warning.
 
std::vector< const Cell * > cells_of (size_t edit) const
 
const std::vector< Eigen::Vector3d > & input_vertices () const
 The complex at the start and at the end, every slot, as the history holds them.
 
const std::vector< std::array< uint64_t, 3 > > & input_faces () const
 
const std::vector< uint8_t > & input_face_alive () const
 
const std::vector< Eigen::Vector3d > & output_vertices () const
 
const std::vector< std::array< uint64_t, 3 > > & output_faces () const
 
const std::vector< uint8_t > & output_face_alive () const
 
const std::set< std::array< uint64_t, 2 > > & output_feature_edges () const
 The feature edges at the end, smaller vertex id first.
 
const std::array< size_t, 16 > & cells_by_kind () const
 How many operations needed a local map, by kind (index: history::EditKind).
 
size_t curve_collapses () const
 
size_t kept_moves () const
 
size_t folded_cells () const
 

Private Member Functions

std::vector< SurfacePoint > map (std::vector< SurfacePoint > points, bool forward, MapWarnings *warnings) const
 

Private Attributes

std::vector< Step > m_steps
 
MapWarnings m_build_warnings
 
std::vector< size_t > m_warned_edits
 
std::array< size_t, 16 > m_cells_by_kind = {}
 
size_t m_curve_collapses = 0
 
size_t m_kept_moves = 0
 
size_t m_folded_cells = 0
 
std::vector< Eigen::Vector3d > m_in_vertices
 
std::vector< Eigen::Vector3d > m_out_vertices
 
std::vector< std::array< uint64_t, 3 > > m_in_faces
 
std::vector< std::array< uint64_t, 3 > > m_out_faces
 
std::vector< uint8_t > m_in_face_alive
 
std::vector< uint8_t > m_out_face_alive
 
std::set< std::array< uint64_t, 2 > > m_out_features
 

Detailed Description

The map between the first and the last state of a SurfaceHistory.

Built from the history alone, one local map per operation (BijectiveRemesh). A split maps its new faces affinely onto the face they subdivide, with the new vertex where the history put it; a collapse and a swap map through a joint embedding of the faces they touch, before and after, on a shared outline, Tutte's lowered in distortion by SLIM within a scaffold (see Scaffold); a vertex move follows the options' smoothing (see Smoothing). A consolidation renumbers faces.

Member Function Documentation

◆ cells_of()

std::vector< const SurfaceMap::Cell * > wmtk::components::tracking::SurfaceMap::cells_of ( size_t  edit) const

The local maps of history edit edit, one cell per patch flattened (a collapse or a move has one per side of the curves through it); none for an edit that needed none. A cell maps a point of a face before to the same point of the domain, on a face after.

◆ curve_collapses()

size_t wmtk::components::tracking::SurfaceMap::curve_collapses ( ) const
inline

Sides of collapses that removed a vertex on the boundary or on a feature curve. Its two edges along the curve become one; the map splits the triangle holding that new edge virtually where the removed vertex was, so both sides keep their area.

◆ folded_cells()

size_t wmtk::components::tracking::SurfaceMap::folded_cells ( ) const
inline

Local maps between patches one of which is folded over in 3D: a bijection still, but stretched, since no flat layout matches a fold.

◆ kept_moves()

size_t wmtk::components::tracking::SurfaceMap::kept_moves ( ) const
inline

Vertex moves whose points keep their barycentric coordinates instead of their place: a vertex on more than one curve, or whose star is not a disk.

◆ to_input()

std::vector< SurfacePoint > wmtk::components::tracking::SurfaceMap::to_input ( std::vector< SurfacePoint >  points,
MapWarnings *  warnings = nullptr 
) const

Points on the last state, mapped onto the first. warnings, if given, gets what this call found. The map is not changed: any number of threads may map through it at once.


The documentation for this class was generated from the following files: