17 #ifndef DUALEDGETRIANGULATION_H
18 #define DUALEDGETRIANGULATION_H
29 #include <QTextStream>
30 #include <QMessageBox>
33 #include <QStringList>
34 #include <QProgressDialog>
79 void removeLine(
int i );
81 void removePoint(
int i );
103 virtual bool swapEdge(
double x,
double y );
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 );
154 void doSwap(
unsigned int edge );
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 );
183 inline DualEdgeTriangulation::DualEdgeTriangulation() : xMax( 0 ), xMin( 0 ), yMax( 0 ), yMin( 0 ), mTriangleInterpolator( 0 ), mForcedCrossBehaviour(
Triangulation::DELETE_FIRST ), mEdgeColor( 0, 255, 0 ), mForcedEdgeColor( 0, 0, 255 ), mBreakEdgeColor( 100, 100, 0 ), mDecorator( this )
189 inline DualEdgeTriangulation::DualEdgeTriangulation(
int nop,
Triangulation* decorator ): xMax( 0 ), xMin( 0 ), yMax( 0 ), yMin( 0 ), mTriangleInterpolator( 0 ), mForcedCrossBehaviour(
Triangulation::DELETE_FIRST ), mEdgeColor( 0, 255, 0 ), mForcedEdgeColor( 0, 0, 255 ), mBreakEdgeColor( 100, 100, 0 ), mDecorator( decorator )