4#ifndef MRMESH_NO_OPENVDB
7#include <openvdb/util/NullInterrupter.h>
18 , progressThreadId_{ std::this_thread::get_id() } {}
23 if ( cb_ && progressThreadId_ == std::this_thread::get_id() )
24 wasInterrupted_ = !cb_(
float( std::clamp( percent, 0, 100 ) ) / 100.0f );
25 return wasInterrupted_;
30 bool wasInterrupted_{
false };
32 std::thread::id progressThreadId_;
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:589
Definition MRCameraOrientationPlugin.h:7
Definition MRVDBProgressInterrupter.h:16
bool getWasInterrupted() const
Definition MRVDBProgressInterrupter.h:27
virtual bool wasInterrupted(int percent=-1) override
Definition MRVDBProgressInterrupter.h:19
ProgressInterrupter(ProgressCallback cb)
Definition MRVDBProgressInterrupter.h:17