17 #ifndef DUALEDGETRIANGULATION_H
18 #define DUALEDGETRIANGULATION_H
29 #include <QTextStream>
30 #include <QMessageBox>
33 #include <QStringList>
34 #include <QProgressDialog>
69 virtual double getXMax()
const override {
return xMax; }
71 virtual double getXMin()
const override {
return xMin; }
73 virtual double getYMax()
const override {
return yMax; }
75 virtual double getYMin()
const override {
return yMin; }
79 void removeLine(
int i );
81 void removePoint(
int i );
85 virtual void setEdgeColor(
int r,
int g,
int b )
override;
103 virtual bool swapEdge(
double x,
double y )
override;
108 virtual bool saveAsShapefile(
const QString& fileName )
const override;
120 const static unsigned int mDefaultStorageForPoints = 100000;
124 const static unsigned int mDefaultStorageForHalfEdges = 300006;
140 unsigned int insertEdge(
int dual,
int next,
int point,
bool mbreak,
bool forced );
142 int insertForcedSegment(
int p1,
int p2,
bool breakline );
146 const static int nBaseOfRuns = 300000;
148 int baseEdgeOfPoint(
int point );
150 int baseEdgeOfTriangle(
Point3D* point );
152 bool checkSwap(
unsigned int edge,
unsigned int recursiveDeep );
154 void doSwap(
unsigned int edge,
unsigned int recursiveDeep );
156 void doOnlySwap(
unsigned int edge );
168 bool swapPossible(
unsigned int edge );
170 void triangulatePolygon( QList<int>* poly, QList<int>* free,
int mainedge );
172 bool halfEdgeBBoxTest(
int edge,
double xlowleft,
double ylowleft,
double xupright,
double yupright )
const;
174 double swapMinAngle(
int edge )
const;
176 int splitHalfEdge(
int edge,
float position );
178 bool edgeOnConvexHull(
int edge );
180 void evaluateInfluenceRegion(
Point3D* point,
int edge, QSet<int> &
set );
188 , mTriangleInterpolator( 0 )
190 , mEdgeColor( 0, 255, 0 )
191 , mForcedEdgeColor( 0, 0, 255 )
192 , mBreakEdgeColor( 100, 100, 0 )
196 , mEdgeWithPoint( 0 )
198 , mTwiceInsPoint( 0 )
209 , mTriangleInterpolator( 0 )
211 , mEdgeColor( 0, 255, 0 )
212 , mForcedEdgeColor( 0, 0, 255 )
213 , mBreakEdgeColor( 100, 100, 0 )
214 , mDecorator( decorator ? decorator : this )
217 , mEdgeWithPoint( 0 )
219 , mTwiceInsPoint( 0 )