We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55305e5 commit 62f863fCopy full SHA for 62f863f
Libs/Mesh/MeshWarper.cpp
@@ -56,6 +56,9 @@ vtkSmartPointer<vtkPolyData> MeshWarper::build_mesh(const Eigen::MatrixXd& parti
56
//---------------------------------------------------------------------------
57
void MeshWarper::set_reference_mesh(vtkSmartPointer<vtkPolyData> reference_mesh,
58
const Eigen::MatrixXd& reference_particles, const Eigen::MatrixXd& landmarks) {
59
+ // lock so that we don't swap out the reference mesh while we are using it
60
+ std::scoped_lock lock(mutex);
61
+
62
if (this->incoming_reference_mesh_ == reference_mesh) {
63
if (this->reference_particles_.size() == reference_particles.size()) {
64
if (this->reference_particles_ == reference_particles && landmarks_points_ == landmarks) {
0 commit comments