|
Wildmeshing Toolkit
|
The history types by name, for headers that only hold them (History.hpp defines them). More...
Classes | |
| class | BasicRecorder |
| Collects the edits of operations that may commit concurrently. More... | |
| class | BasicReplay |
| A complex driven by the edits of a History: a surface (N = 3) or a curve network (N = 2). More... | |
| struct | Edit |
| One committed operation. More... | |
| struct | History |
| A complex and the edits it went through, in commit order. More... | |
| struct | SurfaceKey |
| class | TrackedRecorder |
| Records a tracked complex: some of the faces of a mesh, or some of its edges, which the mesh gives no ids of their own – the tracked faces of a tet mesh (N = 3), the tracked edges of a triangle mesh (N = 2). More... | |
| struct | VertexMove |
| struct | VolumeCapture |
| struct | VolumeEdit |
| One operation that changed the tracked surface of a tet mesh, as the tets around it saw it: the tets before and after, their regions, and where their vertices were. More... | |
| struct | VolumeHistory |
| The tets around every operation that changed a tet mesh's tracked surface, which, with the surface history, is what a map of the volume needs: every other operation leaves each region where it is in space. More... | |
| class | VolumeRecorder |
| Records a VolumeHistory alongside a TrackedSurfaceRecorder. An operation captures the tets around it before it changes the mesh and at its commit point (TetMesh does both), and commits them here with the range of surface edits its surface commit made; one that made none is not recorded. Commits may come concurrently: they are kept, encoded, in the order they come, and ordered by surface edit when read. The mesh's vertices get ids of their own here, which a consolidation (renumber) does not change, so a vertex's position is written again only when it moved. More... | |
Typedefs | |
| using | SurfaceHistory = History< 3 > |
| A surface: faces are triangles. | |
| using | CurveHistory = History< 2 > |
| A curve network: faces are segments. | |
| using | Recorder = BasicRecorder< 3 > |
| using | CurveRecorder = BasicRecorder< 2 > |
| using | Replay = BasicReplay< 3 > |
| using | CurveReplay = BasicReplay< 2 > |
| using | TrackedSurfaceRecorder = TrackedRecorder< 3 > |
| using | TrackedCurveRecorder = TrackedRecorder< 2 > |
Enumerations | |
| enum class | EditKind : uint8_t { split_edge = 1 , split_face = 2 , collapse_edge = 3 , swap_edge = 4 , move_vertices = 5 , consolidate = 6 , replace_faces = 7 , relabel = 8 , embed = 9 } |
| The kinds of edit a complex goes through. More... | |
| enum class | VolumeOp : uint8_t { collapse = 0 , swap_32 = 1 , swap_44 = 2 , swap_56 = 3 , swap_23 = 4 , smooth = 5 } |
| The tet operations a volume history records. | |
Functions | |
| template<int N> | |
| bool | append (History< N > &h, const History< N > &next) |
The history of a pipeline: h, then next, which starts where h ends – the same complex, ids and positions included (a mesh built from h's last state, recording from there). Appends next's edits. False, appending nothing, if next does not start there. | |
| template<int N> | |
| void | append_embedded (History< N > &h, const History< N > &next, const std::vector< std::vector< uint64_t > > &sources) |
h, then next, which starts on a complex lying on h's last state: the same surface or curves, cut differently (an insertion into a tet mesh, an arrangement). Appends an embed edit onto next's first state – sources[f] the faces of h's last state that next's face f lies on, every one where they overlap – then next's edits. Every face and vertex of next's first state must be alive. | |
| std::vector< uint8_t > | read_history (const std::filesystem::path &path) |
| The bytes of a history file, as History::from_bytes takes them – or VolumeHistory::from_bytes, for a volume history (volume_history_output): io::read_mesh for a history. Only the header is checked – that it is a history of a surface, of a curve network or of a volume, this build reads – not the rest, which loading checks. | |
| void | write_history (const std::filesystem::path &path, const std::vector< uint8_t > &bytes) |
| int | face_size (const std::vector< uint8_t > &bytes) |
| int | face_size (const std::string &path) |
| template bool | append (History< 2 > &, const History< 2 > &) |
| template bool | append (History< 3 > &, const History< 3 > &) |
| template void | append_embedded (History< 2 > &, const History< 2 > &, const std::vector< std::vector< uint64_t > > &) |
| template void | append_embedded (History< 3 > &, const History< 3 > &, const std::vector< std::vector< uint64_t > > &) |
| SurfaceHistory | from_input (const io::ReadProvenance &read, const std::vector< Eigen::Vector3d > &welded, const SurfaceHistory &recorded) |
| A surface application's history from its input file as read. | |
| CurveHistory | curves_from_input (const io::ReadProvenance &read, const MatrixXd &V_in, const MatrixXi &E_in, const std::vector< Edit > &collapses, const MatrixXd &V_out, const MatrixXi &E_out, const std::vector< int > &surviving_vertices) |
| A curve application's history from its input files as read, to the network it inserts. | |
| bool | is_volume_history (const std::vector< uint8_t > &bytes, const std::string &name) |
| SurfaceKey | surface_key (const SurfaceHistory &h) |
Variables | |
| constexpr uint64_t | kNoVertex = uint64_t(-1) |
| No vertex: in a relabel, the slot of one that goes. | |
The history types by name, for headers that only hold them (History.hpp defines them).
|
strong |
The kinds of edit a complex goes through.
A complex is a surface, made of triangles, or a curve network, made of segments (see History); either way its cells are called faces here. Every kind is described on the complex alone – vertex and face ids, positions – never on the mesh class that performed it, so a tet mesh can report the changes to its tracked surface, and a triangle mesh the changes to its tracked curves, in the same terms as a TriMesh reports its own. The ids are the recording mesh's slots: a split names the slots it was handed, and a consolidation renumbers every live vertex and face by rank, as the meshes do.
| CurveHistory wmtk::history::curves_from_input | ( | const io::ReadProvenance & | read, |
| const MatrixXd & | V_in, | ||
| const MatrixXi & | E_in, | ||
| const std::vector< Edit > & | collapses, | ||
| const MatrixXd & | V_out, | ||
| const MatrixXi & | E_out, | ||
| const std::vector< int > & | surviving_vertices | ||
| ) |
A curve application's history from its input files as read, to the network it inserts.
The files' segments, as io::read_edge_mesh read them; a relabel to the welded network the application ran on; the input simplification's collapses on that network; and a relabel onto the rows the simplification left. A user's point on the input is then a segment of the files themselves. The feature points are the welded network's vertices with other than two segments – curve ends, junctions, input points – each named by the first vertex of the files that became it.
| read | the files as read – the curve files' vertices and segments, then the point files' vertices – and where each went in V_in, E_in |
| V_in,E_in | the welded network (two or three columns; z is dropped) |
| collapses | utils::simplify_segments' collapses on V_in, E_in; empty if it did not run |
| V_out,E_out | the network the simplification left, the one inserted |
| surviving_vertices | for each row of V_out, its row of V_in |
| if | the collapses do not leave E_out's segments |
| int wmtk::history::face_size | ( | const std::string & | path | ) |
The number of corners of a face of the history saved at path, or held by bytes: 3 for a surface, 2 for a curve network. Throws if they hold no history, or a volume history.
| SurfaceHistory wmtk::history::from_input | ( | const io::ReadProvenance & | read, |
| const std::vector< Eigen::Vector3d > & | welded, | ||
| const SurfaceHistory & | recorded | ||
| ) |
A surface application's history from its input file as read.
The file's triangles, as io::read_triangle_mesh read them; a relabel to the welded mesh the application ran on; then the history the application's mesh recorded from it (TriMesh:: start_history right after create_mesh). A user's point on the input is then a triangle of the file itself. The recorded history's feature edges are taken back onto the file's vertices, where the relabel carries them over.
| read | what read_triangle_mesh returned as provenance |
| welded | the positions of the mesh it returned, the one the application ran on |
| recorded | the history recorded from that mesh |
| if | recorded does not start at the welded mesh |
| bool wmtk::history::is_volume_history | ( | const std::vector< uint8_t > & | bytes, |
| const std::string & | name = "the history given" |
||
| ) |
Whether bytes are a volume history's, by their header – what read_history and write_history take as well as a surface's or curves' history. Throws, name in the message, for a volume history of a version this build does not read.
| SurfaceKey wmtk::history::surface_key | ( | const SurfaceHistory & | h | ) |
The key of a surface history: its number of edits, and a hash of them and of the size of its snapshot – the same for a history and the one saved from it and loaded.
| void wmtk::history::write_history | ( | const std::filesystem::path & | path, |
| const std::vector< uint8_t > & | bytes | ||
| ) |
Writes the bytes of a history (History::to_bytes, VolumeHistory::to_bytes) to a file: io::write_mesh for a history. Refuses bytes whose header is not a history's.