|
Wildmeshing Toolkit
|
Collects the edits of operations that may commit concurrently. More...
#include <History.hpp>
Public Member Functions | |
| BasicRecorder (History< N > start) | |
| void | append (Edit &&e) |
| void | rebase (std::vector< Eigen::Vector3d > positions) |
| const History< N > & | history () const |
| Not synchronised: read it once the recording mesh is done. | |
| History< N > & | history () |
Private Attributes | |
| std::mutex | m_mutex |
| History< N > | m_history |
| std::vector< Eigen::Vector3d > | m_known |
| std::vector< uint8_t > | m_known_valid |
Collects the edits of operations that may commit concurrently.
A mesh appends while it still holds the locks of the operation it is committing, so two operations whose regions overlap append in the order they committed, and the order of the edits is a valid serial order of the run.
A mesh reports every vertex an operation wrote, which includes vertices it only read through non-const access. The recorder keeps the last position it saw for every vertex and drops the moves that leave a vertex where it was, and an edit that only moved vertices and moved none.
| void wmtk::history::BasicRecorder< N >::rebase | ( | std::vector< Eigen::Vector3d > | positions | ) |
The ids were renumbered (a consolidation): positions holds every live vertex's position under its new id, and every other id is unknown.