Wildmeshing Toolkit
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
wmtk::history::BasicReplay< N > Class Template Reference

A complex driven by the edits of a History: a surface (N = 3) or a curve network (N = 2). More...

#include <Replay.hpp>

Public Types

using Face = typename History< N >::Face
 
using Feature = typename History< N >::Feature
 

Public Member Functions

 BasicReplay (const History< N > &h)
 
void apply (const Edit &e)
 
void apply_all (const History< N > &h)
 Applies every edit of h, which must be the history this was built from.
 
const std::vector< Eigen::Vector3d > & vertices () const
 
const std::vector< uint8_t > & vertex_alive () const
 
const std::vector< Face > & faces () const
 
const std::vector< uint8_t > & face_alive () const
 
const std::vector< uint64_t > & faces_of (uint64_t v) const
 The live faces at vertex v, sorted.
 
std::set< Feature > features () const
 The features (see History::features), each with its vertices sorted.
 
bool is_feature (Feature f) const
 

Private Member Functions

void split_edge (const Edit &e)
 
void split_face (const Edit &e)
 
void collapse_edge (const Edit &e)
 
void swap_edge (const Edit &e)
 
void replace_faces (const Edit &e)
 
void relabel (const Edit &e)
 
void embed (const Edit &e)
 
void consolidate ()
 
void grow_vertices (uint64_t vid)
 
void grow_faces (uint64_t fid)
 
void link (uint64_t v, uint64_t f)
 
void unlink (uint64_t v, uint64_t f)
 
void rename_in_face (uint64_t f, uint64_t from, uint64_t to)
 
void retire_bare (const std::vector< uint64_t > &vs)
 
void add_feature (const Feature &f)
 
bool remove_feature (const Feature &f)
 
void rename_features (uint64_t from, uint64_t to)
 Every feature at from now at to instead; an edge left with one vertex goes.
 
void drop_features (uint64_t v)
 Removes every feature at v.
 

Private Attributes

std::vector< Eigen::Vector3d > m_vertices
 
std::vector< uint8_t > m_vertex_alive
 
std::vector< Face > m_faces
 
std::vector< uint8_t > m_face_alive
 
std::vector< std::vector< uint64_t > > m_vertex_faces
 Live faces at each vertex, sorted.
 
std::vector< std::vector< uint64_t > > m_feature_nbrs
 

Detailed Description

template<int N>
class wmtk::history::BasicReplay< N >

A complex driven by the edits of a History: a surface (N = 3) or a curve network (N = 2).

Starts from the history's snapshot and applies edits one at a time, with the semantics the meshes give their operations (see EditKind), so after the k-th edit it holds exactly the recording mesh's state after its k-th committed operation: the same vertex and face ids, the same corner order in every face, the same positions.

Member Function Documentation

◆ retire_bare()

template<int N>
void wmtk::history::BasicReplay< N >::retire_bare ( const std::vector< uint64_t > &  vs)
private

Retires each of vs that has no face left – and, on a curve, carries no feature point – with its features.

Member Data Documentation

◆ m_feature_nbrs

template<int N>
std::vector<std::vector<uint64_t> > wmtk::history::BasicReplay< N >::m_feature_nbrs
private

The features at each vertex: on a surface, its neighbours across feature edges; on a curve, itself if it is a feature point.


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