|
Wildmeshing Toolkit
|
A complex and the edits it went through, in commit order. More...
#include <History.hpp>
Public Types | |
| using | Face = std::array< uint64_t, N > |
| A face's corners: a triangle's three, a segment's two. | |
| using | Feature = std::array< uint64_t, N - 1 > |
Public Member Functions | |
| void | save (const std::string &path) const |
| std::vector< uint8_t > | to_bytes () const |
| The bytes of a history file, in memory: what a component's memory route returns. | |
Static Public Member Functions | |
| static History | load (const std::string &path) |
| static History | from_bytes (const std::vector< uint8_t > &bytes) |
Public Attributes | |
| std::vector< Eigen::Vector3d > | vertices |
| The snapshot: every vertex and face slot, live or not. | |
| std::vector< uint8_t > | vertex_alive |
| std::vector< Face > | faces |
| std::vector< uint8_t > | face_alive |
| std::vector< Feature > | features |
| std::vector< Edit > | edits |
| std::string | metadata |
| Free-form text saved with the history; the recording application's parameters, say. | |
| std::vector< uint64_t > | output_vertex_ids |
| std::vector< uint64_t > | input_vertex_ids |
A complex and the edits it went through, in commit order.
Two kinds of complex, by the number of corners N of a face:
Replaying the edits from the snapshot (Replay.hpp) reproduces every later state, ids included, which is what a map between the first and the last state is built from. SurfaceHistory and CurveHistory name the two (Fwd.hpp).
| using wmtk::history::History< N >::Feature = std::array<uint64_t, N - 1> |
A feature: a cell one dimension down from the faces, which the operations keep – an edge of a surface, a point of a curve network.
| void wmtk::history::History< N >::save | ( | const std::string & | path | ) | const |
To and from a history file (read_history, write_history). Loading throws if the file holds the other kind of complex (see face_size()).
| std::vector<Feature> wmtk::history::History< N >::features |
Features, which a map must take onto themselves, each with its vertices sorted. The edits carry them along by fixed rules, so only the snapshot lists them:
| std::vector<uint64_t> wmtk::history::History< N >::input_vertex_ids |
The id the mesh the history starts from gives each vertex of the first state – for a history that starts at a tet mesh's tracked surface rather than at input files, so that a point on it is named by the mesh's three vertices, as output_vertex_ids names one on the last. Empty when the first state is the input files' faces, as read.
| std::vector<uint64_t> wmtk::history::History< N >::output_vertex_ids |
The id the application's output gives each vertex of the last state, kNoVertex for one it does not write – for an application whose output numbers vertices its own way: a tet mesh's, whose tracked surface is no element of the output, so a point on it is named by the output's three vertices; a triangle mesh's, whose tracked curves are named by two. Empty when the last state's ids are the output's own, as a TriMesh application's are.