Files
q3DMASC/ScalarFieldCollector.h
T

56 lines
1.8 KiB
C++
Raw Normal View History

#pragma once
//##########################################################################
//# #
//# CLOUDCOMPARE PLUGIN: q3DMASC #
//# #
//# This program is free software; you can redistribute it and/or modify #
//# it under the terms of the GNU General Public License as published by #
//# the Free Software Foundation; version 2 or later of the License. #
//# #
//# This program is distributed in the hope that it will be useful, #
//# but WITHOUT ANY WARRANTY; without even the implied warranty of #
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
//# GNU General Public License for more details. #
//# #
//# COPYRIGHT: Dimitri Lague / CNRS / UEB #
//# #
//##########################################################################
//Qt
#include <QMap>
//system
#include <set>
class ccPointCloud;
2020-06-04 00:32:27 +02:00
namespace CCCoreLib
{
class ScalarField;
};
//! SF collector
/** For tracking the creation and removing a set of scalar fields
**/
2019-05-03 23:52:33 +02:00
class SFCollector
{
public:
2019-05-03 23:52:33 +02:00
enum Behavior { ALWAYS_KEEP, CAN_REMOVE, ALWAYS_REMOVE };
2020-06-04 00:32:27 +02:00
void push(ccPointCloud* cloud, CCCoreLib::ScalarField* sf, Behavior behavior);
2019-05-03 23:52:33 +02:00
void releaseSFs(bool keepByDefault);
struct SFDesc
{
ccPointCloud* cloud = nullptr;
2020-06-04 00:32:27 +02:00
CCCoreLib::ScalarField* sf = nullptr;
2019-05-03 23:52:33 +02:00
Behavior behavior = CAN_REMOVE;
};
2020-06-04 00:32:27 +02:00
using Map = QMap< CCCoreLib::ScalarField*, SFDesc >;
2019-05-03 23:52:33 +02:00
Map scalarFields;
};