Geom Software - C++ Programming and Geometry Libraries
Fade2.5D Documentation pages v1.56
EfficientModel.h
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"
24 
25 
26 
27 namespace GEOM_FADE25D {
28 
29 struct EMData; // FWD
30 
31 
44 class CLASS_DECLSPEC EfficientModel
45 {
46 public:
47  explicit EfficientModel(const std::vector<Point2>& vPoints);
48  ~EfficientModel();
49 
50  void go();
51 
63  void extract(double maxError,std::vector<Point2>& vEfficientPointsOut);
64 
65 protected:
66  void part1_extractFC();
67  void part2_setWeights();
68 
69  void sortVtx(std::vector<Point2*>& vVtx);
70  int insertKeepError(double maxErr,std::vector<Point2*>& vA,std::vector<Point2*>& vB);
71  void insertMinHull();
72  void show(const std::string& name);
73 
74  EMData* pEMData;
75 private:
77 };
78 
79 } // NAMESPACE
80 
81 // up to here: if GEOM_PSEUDO3D==GEOM_TRUE
82 #elif GEOM_PSEUDO3D==GEOM_FALSE
83  namespace GEOM_FADE2D {
84 #else
85  #error GEOM_PSEUDO3D is not defined
86 #endif
EfficientModel.
Definition: EfficientModel.h:44
Definition: Bbox2.h:23