17 #ifndef DUALEDGETRIANGULATION_H
18 #define DUALEDGETRIANGULATION_H
29 #include <QTextStream>
30 #include <QMessageBox>
34 #include <QStringList>
35 #include <QProgressDialog>
80 void removeLine(
int i );
82 void removePoint(
int i );
104 virtual bool swapEdge(
double x,
double y );
121 const static unsigned int mDefaultStorageForPoints = 100000;
125 const static unsigned int mDefaultStorageForHalfEdges = 300006;
141 unsigned int insertEdge(
int dual,
int next,
int point,
bool mbreak,
bool forced );
143 int insertForcedSegment(
int p1,
int p2,
bool breakline );
147 const static int nBaseOfRuns = 300000;
149 int baseEdgeOfPoint(
int point );
151 int baseEdgeOfTriangle(
Point3D* point );
153 bool checkSwap(
unsigned int edge );
155 void doSwap(
unsigned int edge );
157 void doOnlySwap(
unsigned int edge );
169 bool swapPossible(
unsigned int edge );
171 void triangulatePolygon( QList<int>* poly, QList<int>* free,
int mainedge );
173 bool halfEdgeBBoxTest(
int edge,
double xlowleft,
double ylowleft,
double xupright,
double yupright )
const;
175 double swapMinAngle(
int edge )
const;
177 int splitHalfEdge(
int edge,
float position );
179 bool edgeOnConvexHull(
int edge );
181 void evaluateInfluenceRegion(
Point3D* point,
int edge, std::set<int>*
set );
184 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 )
190 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 )