| 1 |
//########################################################################## |
| 2 |
//# # |
| 3 |
//# CLOUDCOMPARE PLUGIN: qFacets # |
| 4 |
//# # |
| 5 |
//# This program is free software; you can redistribute it and/or modify # |
| 6 |
//# it under the terms of the GNU General Public License as published by # |
| 7 |
//# the Free Software Foundation; version 2 or later of the License. # |
| 8 |
//# # |
| 9 |
//# This program is distributed in the hope that it will be useful, # |
| 10 |
//# but WITHOUT ANY WARRANTY; without even the implied warranty of # |
| 11 |
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
| 12 |
//# GNU General Public License for more details. # |
| 13 |
//# # |
| 14 |
//# COPYRIGHT: Thomas Dewez, BRGM # |
| 15 |
//# # |
| 16 |
//########################################################################## |
| 17 |
|
| 18 |
#ifndef QFACET_KD_TREE_BASED_FACET_EXTRACTION_HEADER |
| 19 |
#define QFACET_KD_TREE_BASED_FACET_EXTRACTION_HEADER |
| 20 |
|
| 21 |
//qCC_db |
| 22 |
#include <ccKdTree.h> |
| 23 |
|
| 24 |
class ccKdTreeForFacetExtraction |
| 25 |
{ |
| 26 |
public: |
| 27 |
|
| 28 |
//! Default constructor |
| 29 |
ccKdTreeForFacetExtraction(); |
| 30 |
|
| 31 |
//! Fuses cells |
| 32 |
/** Creates a new scalar fields with the groups indexes. |
| 33 |
\param kdTree Kd-tree |
| 34 |
\param maxError max error after fusion (see errorMeasure) |
| 35 |
\param errorMeasure error measure type |
| 36 |
\param maxAngle_deg maximum angle between two sets to allow fusion (in degrees) |
| 37 |
\param overlapCoef maximum relative distance between two sets to accept fusion (1 = no distance, < 1 = overlap, > 1 = gap) |
| 38 |
\param closestFirst |
| 39 |
\param progressCb for progress notifications (optional) |
| 40 |
**/ |
| 41 |
static bool FuseCells( ccKdTree* kdTree, |
| 42 |
double maxError, |
| 43 |
CCCoreLib::DistanceComputationTools::ERROR_MEASURES errorMeasure, |
| 44 |
double maxAngle_deg, |
| 45 |
PointCoordinateType overlapCoef = 1, |
| 46 |
bool closestFirst = true, |
| 47 |
CCCoreLib::GenericProgressCallback* progressCb = nullptr); |
| 48 |
|
| 49 |
}; |
| 50 |
|
| 51 |
#endif //QFACET_KD_TREE_BASED_FACET_EXTRACTION_HEADER |