Fade2.5D Documentation pages v2.16.8
Delaunay Features
EfficientModel.h
Go to the documentation of this file.
1 // Copyright (C) Geom Software e.U, Bernhard Kornberger, Graz/Austria
2 //
3 // This file is part of the Fade2D library. The student license is free
4 // of charge and covers personal, non-commercial research. Licensees
5 // holding a commercial license may use this file in accordance with
6 // the Commercial License Agreement.
7 //
8 // This software is provided AS IS with NO WARRANTY OF ANY KIND,
9 // INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
10 // FOR A PARTICULAR PURPOSE.
11 //
12 // Please contact the author if any conditions of this licensing are
13 // unclear to you.
14 //
15 // Support: https://www.geom.at/contact/
16 // Project: https://www.geom.at/fade2d/html/
17 
18 #pragma once
22 #include "common.h"
23 #if GEOM_PSEUDO3D==GEOM_TRUE
24 
25 #include "Point2.h"
32 {
37 };
38 
39 
40 namespace GEOM_FADE25D {
41 struct EMData; // FWD
42 struct Candidate;// FWD
43 
44 
52 class CLASS_DECLSPEC EfficientModel
53 {
54 public:
55  explicit EfficientModel(const std::vector<Point2>& vPoints);
56  ~EfficientModel();
57 
69  void zSmoothing(int numIterations,double maxDifferencePerIteration,SmoothingStrategy sms);
70 
71 
90  void extract(double maxError,std::vector<Point2>& vEfficientPointsOut);
91 
92 protected:
93  void solveCand(Candidate* pCand,double maxErr);
94  void go();
95  void part1_extractFC();
96  void part2_setWeights();
97 
98  void sortVtx(std::vector<Point2*>& vVtx);
99  int insertKeepError(
100  double factor,
101  double err,
102  std::vector<Point2*>& vIn,
103  std::vector<Point2*>& vNeedlessBigError,
104  std::vector<Point2*>& vNeedlessSmallError
105  );
106  void insertMinHull();
107  void show(const char* name);
108 
110  EMData* pEMData;
111 private:
113  EfficientModel& operator=(const EfficientModel&);
114 };
115 
116 } // NAMESPACE
117 
118 // up to here: if GEOM_PSEUDO3D==GEOM_TRUE
119 #elif GEOM_PSEUDO3D==GEOM_FALSE
120  namespace GEOM_FADE2D {
121 #else
122  #error GEOM_PSEUDO3D is not defined
123 #endif
SmoothingStrategy
SmoothingStrategy.
Definition: EfficientModel.h:32
@ SMST_MINIMUM
Assign the minimum height.
Definition: EfficientModel.h:33
@ SMST_MEDIAN
Assign the median height.
Definition: EfficientModel.h:35
@ SMST_AVERAGE
Assign the average height.
Definition: EfficientModel.h:36
@ SMST_MAXIMUM
Assign the maximum height.
Definition: EfficientModel.h:34
Deprecated class EfficientModel (use CloudPrepare instead).
Definition: EfficientModel.h:53
void zSmoothing(int numIterations, double maxDifferencePerIteration, SmoothingStrategy sms)
Smoothing.
void extract(double maxError, std::vector< Point2 > &vEfficientPointsOut)
Extract a subset of points.