ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ScalarFieldCollector.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // ##########################################################################
11 // # #
12 // # ACLOUDVIEWER PLUGIN: q3DMASC #
13 // # #
14 // # This program is free software; you can redistribute it and/or modify #
15 // # it under the terms of the GNU General Public License as published by #
16 // # the Free Software Foundation; version 2 or later of the License. #
17 // # #
18 // # This program is distributed in the hope that it will be useful, #
19 // # but WITHOUT ANY WARRANTY; without even the implied warranty of #
20 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
21 // # GNU General Public License for more details. #
22 // # #
23 // # COPYRIGHT: Dimitri Lague / CNRS / UEB #
24 // # #
25 // ##########################################################################
26 
27 // Qt
28 #include <QMap>
29 
30 // system
31 #include <set>
32 
33 class ccPointCloud;
34 
35 namespace cloudViewer {
36 class ScalarField;
37 };
38 
40 
42 class SFCollector {
43 public:
45 
46  void push(ccPointCloud* cloud,
48  Behavior behavior);
49 
50  void releaseSFs(bool keepByDefault);
51 
52  bool setBehavior(cloudViewer::ScalarField* sf, Behavior behavior);
53 
54  struct SFDesc {
55  ccPointCloud* cloud = nullptr;
58  };
59 
60  using Map = QMap<cloudViewer::ScalarField*, SFDesc>;
62 };
SF collector.
void push(ccPointCloud *cloud, cloudViewer::ScalarField *sf, Behavior behavior)
bool setBehavior(cloudViewer::ScalarField *sf, Behavior behavior)
QMap< cloudViewer::ScalarField *, SFDesc > Map
void releaseSFs(bool keepByDefault)
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
A simple scalar field (to be associated to a point cloud)
Definition: ScalarField.h:25
Generic file read and write utility for python interface.
cloudViewer::ScalarField * sf