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...
#include <VolumeHistory.hpp>
|
|
void | commit (VolumeOp op, std::array< size_t, 2 > surface_edits, const std::vector< size_t > &op_vertices, const Capture &before, const Capture &after) |
| |
|
void | renumber (const std::vector< size_t > &old_to_new) |
| | The mesh renumbered its vertices: old_to_new[v], size_t(-1) for a vertex gone.
|
| |
|
VolumeHistory | history () const |
| | What was recorded, decoded, sorted by surface edit.
|
| |
| std::vector< uint8_t > | to_bytes (uint64_t surface_edit_offset, const SurfaceKey &surface, const std::map< int64_t, std::string > &tag_names) const |
| |
|
size_t | size () const |
| | The edits recorded, and the bytes they take.
|
| |
|
size_t | bytes () const |
| |
|
|
uint32_t | region_of (const std::vector< int64_t > &tags) |
| | The region of a set of tags, sorted, each once; a new one if it is new. Under the lock.
|
| |
|
|
std::mutex | m_mutex |
| |
|
std::vector< std::vector< int64_t > > | m_regions |
| |
|
std::vector< uint64_t > | m_id_of |
| | Mesh vertex -> the recorder's id of it.
|
| |
|
uint64_t | m_next_id = 0 |
| |
|
std::vector< uint8_t > | m_bytes |
| | The edits, encoded in the order they came (see VolumeHistory.cpp).
|
| |
|
size_t | m_count = 0 |
| |
|
std::unique_ptr< Encoder > | m_encoder |
| |
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.
◆ to_bytes()
| std::vector< uint8_t > wmtk::history::VolumeRecorder::to_bytes |
( |
uint64_t |
surface_edit_offset, |
|
|
const SurfaceKey & |
surface, |
|
|
const std::map< int64_t, std::string > & |
tag_names |
|
) |
| const |
The bytes of what was recorded, as VolumeHistory::to_bytes gives them, with the offset of its surface edits in the surface history recorded alongside, that history's key, and the tag names.
The documentation for this class was generated from the following files: