Fade2D Documentation pages v2.12
Delaunay Features
VoroCell2.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 
23 #pragma once
24 #include "common.h"
25 #include "Point2.h"
26 #include "Bbox2.h"
27 
28 #if GEOM_PSEUDO3D==GEOM_TRUE
29  namespace GEOM_FADE25D {
30 #elif GEOM_PSEUDO3D==GEOM_FALSE
31  namespace GEOM_FADE2D {
32 #else
33  #error GEOM_PSEUDO3D is not defined
34 #endif
35 
36 class Voronoi2Impl; // FWD
37 class VoroVertex2; // FWD
38 
44 class CLASS_DECLSPEC VoroCell2
45 {
46 public:
48  VoroCell2(Point2* pSite_,Voronoi2Impl* pOwner_);
49 
59  void setCustomCellIndex(int customCellIndex_);
67  int getCustomCellIndex() const;
68 
79  bool getVoronoiVertices(std::vector<VoroVertex2*>& vVoroVertices) const;
80 
99  std::vector<Point2>& vPoints,
100  std::vector<Vector2>* pvInfiniteDirections=NULL
101  ) const;
102 
114  bool getIncidentTriangles(std::vector<Triangle2*>& vIncTriangles) const;
122  bool getNeighborSites(std::vector<Point2*>& vSites) const;
130  bool getAdjacentVCells(std::vector<VoroCell2*>& vAdjacentCells) const;
135  bool isFinite() const;
141  Point2* getSite() const;
149  double getCentroid(Point2& centroid) const;
155  double getArea() const;
156 
157 protected:
159  Point2* pSite;
161  Voronoi2Impl* pOwner;
163  int customCellIndex;
164 
165 };
166 
167 
168 } // (namespace)
169 
170 
Point.
Definition: Point2.h:52
Voronoi cell.
Definition: VoroCell2.h:45
void setCustomCellIndex(int customCellIndex_)
bool getAdjacentVCells(std::vector< VoroCell2 * > &vAdjacentCells) const
Point2 * getSite() const
double getCentroid(Point2 &centroid) const
bool getBoundaryPoints(std::vector< Point2 > &vPoints, std::vector< Vector2 > *pvInfiniteDirections=NULL) const
bool getIncidentTriangles(std::vector< Triangle2 * > &vIncTriangles) const
int getCustomCellIndex() const
bool getVoronoiVertices(std::vector< VoroVertex2 * > &vVoroVertices) const
double getArea() const
bool getNeighborSites(std::vector< Point2 * > &vSites) const