Fade2D Documentation pages v2.16.3
Delaunay Features
PolygonTree.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 
20 #pragma once
21 
22 #include "common.h"
23 #include "Segment2.h"
24 #include "Edge2.h"
25 #include "VertexPair2.h"
26 
27 #if GEOM_PSEUDO3D==GEOM_TRUE
28  namespace GEOM_FADE25D {
29 #elif GEOM_PSEUDO3D==GEOM_FALSE
30  namespace GEOM_FADE2D {
31 #else
32  #error GEOM_PSEUDO3D is not defined
33 #endif
34 
46 class CLASS_DECLSPEC PolygonTree
47 {
48 public:
54  explicit PolygonTree(int layer_);
55 
60 
72  int getLayer() const;
73 
79  std::vector<PolygonTree*>& getChildren();
80 
89  void getChildrenRecursive(std::vector<PolygonTree*>& vChildNodesRec);
111  void getSegments_regionOriented(std::vector<Segment2>& vSegments) const;
112 
121  void getSegments_CCW(std::vector<Segment2>& vSegments) const;
122 
131  void getSegments_CW(std::vector<Segment2>& vSegments) const;
132 
134  void setGeometrySortedPairs(std::vector<VertexPair2>& vGeometrySortedCW);
136  void getPointerSortedPairs(std::vector<VertexPair2>& vFromCW_sorted) const;
137 private:
139  // const std::vector<VertexPair2>& getGeometrySortedPairsCW();
140  explicit PolygonTree(const PolygonTree&);
141  PolygonTree& operator=(const PolygonTree&);
142  // DATA
143  struct Impl;
144  Impl* pImpl;
145 
146 };
147 
148 
149 
150 } // (namespace)
The PolygonTree class represents nested polygon layers as a hierarchical structure.
Definition: PolygonTree.h:47
int getLayer() const
Retrieves the layer number of this PolygonTree node.
void getSegments_regionOriented(std::vector< Segment2 > &vSegments) const
Retrieves region-oriented segments.
void getChildrenRecursive(std::vector< PolygonTree * > &vChildNodesRec)
Retrieves all child nodes recursively.
~PolygonTree()
Destructor for the PolygonTree class.
PolygonTree(int layer_)
Constructs a PolygonTree object.
void getSegments_CW(std::vector< Segment2 > &vSegments) const
Retrieves clockwise ordered and oriented segments.
std::vector< PolygonTree * > & getChildren()
Retrieves the child nodes of this PolygonTree node.
void getSegments_CCW(std::vector< Segment2 > &vSegments) const
Retrieves counter-clockwise ordered and oriented segments.