Fade2D Documentation pages v1.89
Delaunay Features
Voronoi2.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 
19 
25 #pragma once
26 #include "common.h"
27 #include "VoroVertex2.h"
28 #include "VoroCell2.h"
29 
30 #if GEOM_PSEUDO3D==GEOM_TRUE
31  namespace GEOM_FADE25D {
32 #elif GEOM_PSEUDO3D==GEOM_FALSE
33  namespace GEOM_FADE2D {
34 #else
35  #error GEOM_PSEUDO3D is not defined
36 #endif
37 
38 
39 class Dt2; // FWD
40 class Voronoi2Impl; // FWD
41 class Visualizer2; // FWD
42 
54 class CLASS_DECLSPEC Voronoi2
55 {
56 public:
58  explicit Voronoi2(Dt2* pDt);
60  ~Voronoi2();
61 
62 
63 
69  bool isValid() const;
70 
78  void getVoronoiCells(std::vector<VoroCell2*>& vVoronoiCells);
89  VoroCell2* getVoronoiCell(Point2* pSite);
90 
104  void show(
105  const char* filename,
106  bool bVoronoi=true,
107  bool bCellColors=true,
108  bool bSites=true,
109  bool bDelaunay=true,
110  bool bCellLabels=false
111  );
112 
126  void show(
127  Visualizer2* pVisualizer,
128  bool bVoronoi=true,
129  bool bCellColors=true,
130  bool bSites=true,
131  bool bDelaunay=true,
132  bool bCellLabels=false
133  );
134 
145  VoroCell2* locateVoronoiCell(const Point2& queryPoint);
146 
155  VoroVertex2* getVoronoiVertex(Triangle2* pT) ;
156 protected:
157  Voronoi2Impl* pImpl;
158 private:
159  Voronoi2(Voronoi2&);
160  Voronoi2& operator=(Voronoi2&);
161 
162 };
163 
164 
165 } // (namespace)
GEOM_FADE2D::Triangle2
Triangle.
Definition: Triangle2.h:58
GEOM_FADE2D::Point2
Point.
Definition: Point2.h:42
VoroVertex2.h
GEOM_FADE2D::Visualizer2
Visualizer2 is a general Postscript writer. It draws the objects Point2, Segment2,...
Definition: Visualizer2.h:55
GEOM_FADE2D::Voronoi2
Voronoi diagram.
Definition: Voronoi2.h:54
VoroCell2.h
GEOM_FADE2D::VoroVertex2
Voronoi vertex.
Definition: VoroVertex2.h:43
GEOM_FADE2D::VoroCell2
Voronoi cell.
Definition: VoroCell2.h:44