mirror of
https://github.com/farmakis/qVoxFall.git
synced 2026-08-30 16:40:24 +08:00
Fix linux compilation
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "qVoxFallProcess.h"
|
||||
|
||||
//system
|
||||
#include <atomic>
|
||||
#include <unordered_set>
|
||||
|
||||
//local
|
||||
@@ -287,7 +288,7 @@ bool ClusterEmptySpace(int maxThreads, int voxelCount, GenericProgressCallback*
|
||||
bool ComputeClusterVolume(int maxThreads, int clusterCount, ccHObject* clusterGroup = nullptr)
|
||||
{
|
||||
|
||||
bool error = false;
|
||||
std::atomic<bool> error(false);
|
||||
CCVector3 minBound = s_VoxFallParams.maxBound;
|
||||
CCVector3 maxBound = s_VoxFallParams.minBound;
|
||||
int count = 0;
|
||||
@@ -303,6 +304,10 @@ bool ComputeClusterVolume(int maxThreads, int clusterCount, ccHObject* clusterGr
|
||||
{
|
||||
int index = s_VoxFallParams.clusterIndices[i];
|
||||
|
||||
if(error) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::unordered_set<unsigned int> nbs_next(s_VoxFallParams.nbs[index].begin(), s_VoxFallParams.nbs[index].end());
|
||||
while (!nbs_next.empty())
|
||||
{
|
||||
@@ -346,9 +351,7 @@ bool ComputeClusterVolume(int maxThreads, int clusterCount, ccHObject* clusterGr
|
||||
if (!s_VoxFallParams.nProgress->oneStep())
|
||||
{
|
||||
error = true;
|
||||
break;
|
||||
}
|
||||
if (error) break;
|
||||
}
|
||||
|
||||
if (s_VoxFallParams.exportLossGain)
|
||||
@@ -439,7 +442,7 @@ bool qVoxFallProcess::Compute(const qVoxFallDialog& dlg, QString& errorMessage,
|
||||
s_VoxFallParams.isEmptyBefore.resize(voxelGrid.innerCellCount(), true);
|
||||
if (s_VoxFallParams.exportBlocksAsMeshes)
|
||||
{
|
||||
s_VoxFallParams.clusters.resize(voxelGrid.innerCellCount(), NULL);
|
||||
s_VoxFallParams.clusters.resize(voxelGrid.innerCellCount(), 0);
|
||||
}
|
||||
|
||||
//allocate cluster ID SF
|
||||
|
||||
Reference in New Issue
Block a user