Geom Software - C++ Programming and Geometry Libraries
Fade2.5D Documentation pages v1.58
IsoContours.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 
19 #pragma once
20 #if GEOM_PSEUDO3D==GEOM_TRUE
21 
22 #include "Segment2.h"
23 #include <map>
24 
25 #include "common.h"
26 #if GEOM_PSEUDO3D==GEOM_TRUE
27  namespace GEOM_FADE25D {
28 #elif GEOM_PSEUDO3D==GEOM_FALSE
29  namespace GEOM_FADE2D {
30 #else
31  #error GEOM_PSEUDO3D is not defined
32 #endif
33 
34 
35 struct TriNode; // FWD
36 class Triangle2; // FWD
37 class GeomTest; // FWD
38 class Segment2; // FWD
39 
40 typedef std::multimap<Point2,Segment2*> MMPS;
41 typedef MMPS::iterator MMPSIt;
42 
49 {
50 
51 public:
52 
53  CLASS_DECLSPEC
54  explicit IsoContours(std::vector<Triangle2*>& vTriangles);
55 
56  CLASS_DECLSPEC
57  ~IsoContours();
62  CLASS_DECLSPEC
63  double getMinHeight();
68  CLASS_DECLSPEC
69  double getMaxHeight();
75  CLASS_DECLSPEC
76  bool getContours(double height,std::vector<std::vector<Segment2> >& vvContours,bool bVerbose);
77 protected:
79  CLASS_DECLSPEC
80  bool getIntersectionSegments(double height,std::vector<Segment2*>& vIntersectionSegments);
82  void createContours(MMPS& mmPS,std::vector<std::vector<Segment2> >& vvContours);
84  void getIntersection(Triangle2* pT,double height,int i,std::vector<Point2>& vIntersectionPoints);
86  TriNode* pTree;
87  std::vector<Triangle2*> vTriangles;
89  GeomTest* pGeomPredicates;
91  std::set<double> sForbiddenHeights;
92 
93 private:
95  IsoContours(const IsoContours& ){};
96 };
97 
98 
99 } // NAMESPACE FADE2D
100 
101 
102 #endif
103 
104 
IsoContours uses a fast datastructure to compute intersections of horizontal planes with a given list...
Definition: IsoContours.h:48
Triangle.
Definition: Triangle2.h:48
Definition: Bbox2.h:23