Fade2.5D Documentation pages v2.12
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 // not clear to you.
14 //
15 // Author: Bernhard Kornberger, bkorn (at) geom.at
16 // http://www.geom.at
17 
18 #pragma once
19 
20 #include "common.h"
21 #if GEOM_PSEUDO3D==GEOM_TRUE
22 
23 #include "Point2.h"
25 {
30 };
31 
35 namespace GEOM_FADE25D {
36 
37 struct EMData; // FWD
38 struct Candidate;// FWD
39 
40 
41 
49 class CLASS_DECLSPEC EfficientModel
50 {
51 public:
52  explicit EfficientModel(const std::vector<Point2>& vPoints);
53  ~EfficientModel();
54 
64  void zSmoothing(int numIterations,double maxDifferencePerIteration,SmoothingStrategy sms);
65 
66 
83  void extract(double maxError,std::vector<Point2>& vEfficientPointsOut);
84 
85 
86  //void extract2(double maxError,std::vector<Point2>& vEfficientPointsOut);
87 protected:
88  void solveCand(Candidate* pCand,double maxErr);
89  //void assignT();
90  void go();
91  void part1_extractFC();
92  void part2_setWeights();
93 
94  void sortVtx(std::vector<Point2*>& vVtx);
95  int insertKeepError(
96  double factor,
97  double err,
98  std::vector<Point2*>& vIn,
99  std::vector<Point2*>& vNeedlessBigError,
100  std::vector<Point2*>& vNeedlessSmallError
101  );
102 
103 
104  void insertMinHull();
105  void show(const char* name);
106 
108  EMData* pEMData;
109 private:
111  EfficientModel& operator=(const EfficientModel&);
112 
113 };
114 
115 } // NAMESPACE
116 
117 // up to here: if GEOM_PSEUDO3D==GEOM_TRUE
118 #elif GEOM_PSEUDO3D==GEOM_FALSE
119  namespace GEOM_FADE2D {
120 #else
121  #error GEOM_PSEUDO3D is not defined
122 #endif
SmoothingStrategy
Definition: EfficientModel.h:25
@ SMST_MINIMUM
Assign the minimum height.
Definition: EfficientModel.h:26
@ SMST_MEDIAN
Assign the median height.
Definition: EfficientModel.h:28
@ SMST_AVERAGE
Assign the average height.
Definition: EfficientModel.h:29
@ SMST_MAXIMUM
Assign the maximum height.
Definition: EfficientModel.h:27
EfficientModel (DEPRECATED in favor of the new CloudPrepare class)
Definition: EfficientModel.h:50
void zSmoothing(int numIterations, double maxDifferencePerIteration, SmoothingStrategy sms)
Smoothing.
void extract(double maxError, std::vector< Point2 > &vEfficientPointsOut)
Extract a subset of points.