QGIS API Documentation  3.8.0-Zanzibar (11aff65)
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
DualEdgeTriangulation Class Reference

DualEdgeTriangulation is an implementation of a triangulation class based on the dual edge data structure. More...

#include <DualEdgeTriangulation.h>

Inheritance diagram for DualEdgeTriangulation:
Inheritance graph
[legend]

Public Member Functions

 DualEdgeTriangulation ()
 
 DualEdgeTriangulation (int nop, Triangulation *decorator)
 
 ~DualEdgeTriangulation () override
 
void addLine (const QVector< QgsPoint > &points, QgsInterpolator::SourceType lineType) override
 Adds a line (e.g. More...
 
int addPoint (const QgsPoint &p) override
 Adds a point to the triangulation. More...
 
bool calcNormal (double x, double y, Vector3D *result) override
 Calculates the normal at a point on the surface. More...
 
bool calcPoint (double x, double y, QgsPoint &result) override
 Calculates x-, y and z-value of the point on the surface and assigns it to 'result'. More...
 
void eliminateHorizontalTriangles () override
 Eliminates the horizontal triangles by swapping or by insertion of new points. More...
 
int getNumberOfPoints () const override
 Returns the number of points. More...
 
int getOppositePoint (int p1, int p2) override
 Returns the number of the point opposite to the triangle points p1, p2 (which have to be on a halfedge). More...
 
QgsPointgetPoint (int i) const override
 Draws the points, edges and the forced lines. More...
 
QList< int > * getPointsAroundEdge (double x, double y) override
 Returns a value list with the numbers of the four points, which would be affected by an edge swap. This function is e.g. needed by NormVecDecorator to know the points, for which the normals have to be recalculated. The returned ValueList has to be deleted by the code which calls the method. More...
 
QList< int > getSurroundingTriangles (int pointno) override
 Returns a pointer to a value list with the information of the triangles surrounding (counterclockwise) a point. More...
 
bool getTriangle (double x, double y, QgsPoint &p1, int &n1, QgsPoint &p2, int &n2, QgsPoint &p3, int &n3) override
 Finds out in which triangle the point with coordinates x and y is and assigns the numbers of the vertices to 'n1', 'n2' and 'n3' and the vertices to 'p1', 'p2' and 'p3'. More...
 
bool getTriangle (double x, double y, QgsPoint &p1, QgsPoint &p2, QgsPoint &p3) override
 Finds out, in which triangle the point with coordinates x and y is and assigns the points at the vertices to 'p1', 'p2' and 'p3. More...
 
double getXMax () const override
 Returns the largest x-coordinate value of the bounding box. More...
 
double getXMin () const override
 Returns the smallest x-coordinate value of the bounding box. More...
 
double getYMax () const override
 Returns the largest y-coordinate value of the bounding box. More...
 
double getYMin () const override
 Returns the smallest x-coordinate value of the bounding box. More...
 
void performConsistencyTest () override
 Performs a consistency check, remove this later. More...
 
bool pointInside (double x, double y) override
 Returns true, if the point with coordinates x and y is inside the convex hull and false otherwise. More...
 
void ruppertRefinement () override
 Adds points to make the triangles better shaped (algorithm of ruppert) More...
 
bool saveTriangulation (QgsFeatureSink *sink, QgsFeedback *feedback=nullptr) const override
 Saves the triangulation features to a feature sink. More...
 
void setBreakEdgeColor (int r, int g, int b) override
 Sets the color of the breaklines. More...
 
void setDecorator (Triangulation *d)
 
void setEdgeColor (int r, int g, int b) override
 Sets the color of the normal edges. More...
 
void setForcedCrossBehavior (Triangulation::ForcedCrossBehavior b) override
 Sets the behavior of the triangulation in case of crossing forced lines. More...
 
void setForcedEdgeColor (int r, int g, int b) override
 Sets the color of the forced edges. More...
 
void setTriangleInterpolator (TriangleInterpolator *interpolator) override
 Sets an interpolator object. More...
 
bool swapEdge (double x, double y) override
 Reads the dual edge structure of a taff file. More...
 
- Public Member Functions inherited from Triangulation
virtual ~Triangulation ()=default
 

Protected Member Functions

int baseEdgeOfPoint (int point)
 Returns the number of an edge which points to the point with number 'point' or -1 if there is an error. More...
 
int baseEdgeOfTriangle (const QgsPoint &point)
 Returns the number of a HalfEdge from a triangle in which 'point' is in. If the number -10 is returned, this means, that 'point' is outside the convex hull. If -5 is returned, then numerical problems with the leftOfTest occurred (and the value of the possible edge is stored in the variable 'mUnstableEdge'. -20 means, that the inserted point is exactly on an edge (the number is stored in the variable 'mEdgeWithPoint'). -25 means, that the point is already in the triangulation (the number of the point is stored in the member 'mTwiceInsPoint'. If -100 is returned, this means that something else went wrong. More...
 
bool checkSwap (unsigned int edge, unsigned int recursiveDeep)
 Checks, if 'edge' has to be swapped because of the empty circle criterion. If so, doSwap(...) is called. More...
 
void doOnlySwap (unsigned int edge)
 Swaps 'edge' and does no recursiv testing. More...
 
void doSwap (unsigned int edge, unsigned int recursiveDeep)
 Swaps 'edge' and test recursively for other swaps (delaunay criterion) More...
 
bool edgeOnConvexHull (int edge)
 Returns true, if a half edge is on the convex hull and false otherwise. More...
 
void evaluateInfluenceRegion (QgsPoint *point, int edge, QSet< int > &set)
 Function needed for the ruppert algorithm. Tests, if point is in the circle through both endpoints of edge and the endpoint of edge->dual->next->point. If so, the function calls itself recursively for edge->next and edge->next->next. Stops, if it finds a forced edge or a convex hull edge. More...
 
bool halfEdgeBBoxTest (int edge, double xlowleft, double ylowleft, double xupright, double yupright) const
 Tests, if the bounding box of the halfedge with index i intersects the specified bounding box. The main purpose for this method is the drawing of the triangulation. More...
 
unsigned int insertEdge (int dual, int next, int point, bool mbreak, bool forced)
 Inserts an edge and makes sure, everything is OK with the storage of the edge. The number of the HalfEdge is returned. More...
 
int insertForcedSegment (int p1, int p2, QgsInterpolator::SourceType segmentType)
 Inserts a forced segment between the points with the numbers p1 and p2 into the triangulation and returns the number of a HalfEdge belonging to this forced edge or -100 in case of failure. More...
 
int splitHalfEdge (int edge, float position)
 Inserts a new point on the halfedge with number 'edge'. The position can have a value from 0 to 1 (e.g. 0.5 would be in the middle). The return value is the number of the new inserted point. tin is the triangulation, which should be used to calculate the elevation of the inserted point. More...
 
double swapMinAngle (int edge) const
 Calculates the minimum angle, which would be present, if the specified halfedge would be swapped. More...
 
bool swapPossible (unsigned int edge)
 Returns true, if it is possible to swap an edge, otherwise false(concave quad or edge on (or outside) the convex hull) More...
 
void triangulatePolygon (QList< int > *poly, QList< int > *free, int mainedge)
 Divides a polygon in a triangle and two polygons and calls itself recursively for these two polygons. 'poly' is a pointer to a list with the numbers of the edges of the polygon, 'free' is a pointer to a list of free halfedges, and 'mainedge' is the number of the edge, towards which the new triangle is inserted. Mainedge has to be the same as poly->begin(), otherwise the recursion does not work. More...
 

Protected Attributes

QColor mBreakEdgeColor
 Color to paint the breaklines. More...
 
TriangulationmDecorator = nullptr
 Pointer to the decorator using this triangulation. It it is used directly, mDecorator equals this. More...
 
QColor mEdgeColor
 Color to paint the normal edges. More...
 
unsigned int mEdgeInside = 0
 Number of an edge which does not point to the virtual point. It continuously updated for a fast search. More...
 
unsigned int mEdgeOutside = 0
 Number of an edge on the outside of the convex hull. It is updated in method 'baseEdgeOfTriangle' to enable insertion of points outside the convex hull. More...
 
unsigned int mEdgeWithPoint = 0
 If an inserted point is exactly on an existing edge, 'baseEdgeOfTriangle' returns -20 and sets the variable 'mEdgeWithPoint'. More...
 
Triangulation::ForcedCrossBehavior mForcedCrossBehavior = Triangulation::DeleteFirst
 Member to store the behavior in case of crossing forced segments. More...
 
QColor mForcedEdgeColor
 Color to paint the forced edges. More...
 
QVector< HalfEdge * > mHalfEdge
 Stores pointers to the HalfEdges. More...
 
QVector< QgsPoint * > mPointVector
 Stores pointers to all points in the triangulations (including the points contained in the lines) More...
 
TriangleInterpolatormTriangleInterpolator = nullptr
 Association to an interpolator object. More...
 
int mTwiceInsPoint = 0
 If a point has been inserted twice, its number is stored in this member. More...
 
unsigned int mUnstableEdge = 0
 If an instability occurs in 'baseEdgeOfTriangle', mUnstableEdge is set to the value of the current edge. More...
 
double xMax = 0
 X-coordinate of the upper right corner of the bounding box. More...
 
double xMin = 0
 X-coordinate of the lower left corner of the bounding box. More...
 
double yMax = 0
 Y-coordinate of the upper right corner of the bounding box. More...
 
double yMin = 0
 Y-coordinate of the lower left corner of the bounding box. More...
 

Static Protected Attributes

static const unsigned int DEFAULT_STORAGE_FOR_HALF_EDGES = 300006
 Default value for the number of storable HalfEdges at the beginning. More...
 
static const unsigned int DEFAULT_STORAGE_FOR_POINTS = 100000
 Default value for the number of storable points at the beginning. More...
 
static const int MAX_BASE_ITERATIONS = 300000
 Threshold for the leftOfTest to handle numerical instabilities. More...
 

Friends

class TestQgsInterpolator
 

Additional Inherited Members

- Public Types inherited from Triangulation
enum  ForcedCrossBehavior { SnappingTypeVertex, DeleteFirst, InsertVertex }
 Enumeration describing the behavior, if two forced lines cross. More...
 
- Static Public Member Functions inherited from Triangulation
static QgsFields triangulationFields ()
 Returns the fields output by features when calling saveTriangulation(). More...
 

Detailed Description

DualEdgeTriangulation is an implementation of a triangulation class based on the dual edge data structure.

Note
Not available in Python bindings.

Definition at line 47 of file DualEdgeTriangulation.h.

Constructor & Destructor Documentation

◆ DualEdgeTriangulation() [1/2]

DualEdgeTriangulation::DualEdgeTriangulation ( )
inline

Definition at line 183 of file DualEdgeTriangulation.h.

◆ DualEdgeTriangulation() [2/2]

DualEdgeTriangulation::DualEdgeTriangulation ( int  nop,
Triangulation decorator 
)
inline

Definition at line 193 of file DualEdgeTriangulation.h.

◆ ~DualEdgeTriangulation()

DualEdgeTriangulation::~DualEdgeTriangulation ( )
override

Definition at line 28 of file DualEdgeTriangulation.cpp.

Member Function Documentation

◆ addLine()

void DualEdgeTriangulation::addLine ( const QVector< QgsPoint > &  points,
QgsInterpolator::SourceType  lineType 
)
overridevirtual

Adds a line (e.g.

a break-, structure- or an isoline) to the triangulation, by specifying a list of source points.

Implements Triangulation.

Definition at line 69 of file DualEdgeTriangulation.cpp.

◆ addPoint()

int DualEdgeTriangulation::addPoint ( const QgsPoint point)
overridevirtual

Adds a point to the triangulation.

The point should have a z-value matching the value to interpolate.

Implements Triangulation.

Definition at line 101 of file DualEdgeTriangulation.cpp.

◆ baseEdgeOfPoint()

int DualEdgeTriangulation::baseEdgeOfPoint ( int  point)
protected

Returns the number of an edge which points to the point with number 'point' or -1 if there is an error.

Definition at line 372 of file DualEdgeTriangulation.cpp.

◆ baseEdgeOfTriangle()

int DualEdgeTriangulation::baseEdgeOfTriangle ( const QgsPoint point)
protected

Returns the number of a HalfEdge from a triangle in which 'point' is in. If the number -10 is returned, this means, that 'point' is outside the convex hull. If -5 is returned, then numerical problems with the leftOfTest occurred (and the value of the possible edge is stored in the variable 'mUnstableEdge'. -20 means, that the inserted point is exactly on an edge (the number is stored in the variable 'mEdgeWithPoint'). -25 means, that the point is already in the triangulation (the number of the point is stored in the member 'mTwiceInsPoint'. If -100 is returned, this means that something else went wrong.

Definition at line 444 of file DualEdgeTriangulation.cpp.

◆ calcNormal()

bool DualEdgeTriangulation::calcNormal ( double  x,
double  y,
Vector3D result 
)
overridevirtual

Calculates the normal at a point on the surface.

Implements Triangulation.

Definition at line 621 of file DualEdgeTriangulation.cpp.

◆ calcPoint()

bool DualEdgeTriangulation::calcPoint ( double  x,
double  y,
QgsPoint result 
)
overridevirtual

Calculates x-, y and z-value of the point on the surface and assigns it to 'result'.

Returns true in case of success and false in case of failure

Implements Triangulation.

Definition at line 634 of file DualEdgeTriangulation.cpp.

◆ checkSwap()

bool DualEdgeTriangulation::checkSwap ( unsigned int  edge,
unsigned int  recursiveDeep 
)
protected

Checks, if 'edge' has to be swapped because of the empty circle criterion. If so, doSwap(...) is called.

Definition at line 647 of file DualEdgeTriangulation.cpp.

◆ doOnlySwap()

void DualEdgeTriangulation::doOnlySwap ( unsigned int  edge)
protected

Swaps 'edge' and does no recursiv testing.

Definition at line 664 of file DualEdgeTriangulation.cpp.

◆ doSwap()

void DualEdgeTriangulation::doSwap ( unsigned int  edge,
unsigned int  recursiveDeep 
)
protected

Swaps 'edge' and test recursively for other swaps (delaunay criterion)

Definition at line 682 of file DualEdgeTriangulation.cpp.

◆ edgeOnConvexHull()

bool DualEdgeTriangulation::edgeOnConvexHull ( int  edge)
protected

Returns true, if a half edge is on the convex hull and false otherwise.

Definition at line 3136 of file DualEdgeTriangulation.cpp.

◆ eliminateHorizontalTriangles()

void DualEdgeTriangulation::eliminateHorizontalTriangles ( )
overridevirtual

Eliminates the horizontal triangles by swapping or by insertion of new points.

Implements Triangulation.

Definition at line 1535 of file DualEdgeTriangulation.cpp.

◆ evaluateInfluenceRegion()

void DualEdgeTriangulation::evaluateInfluenceRegion ( QgsPoint point,
int  edge,
QSet< int > &  set 
)
protected

Function needed for the ruppert algorithm. Tests, if point is in the circle through both endpoints of edge and the endpoint of edge->dual->next->point. If so, the function calls itself recursively for edge->next and edge->next->next. Stops, if it finds a forced edge or a convex hull edge.

Definition at line 3141 of file DualEdgeTriangulation.cpp.

◆ getNumberOfPoints()

int DualEdgeTriangulation::getNumberOfPoints ( ) const
inlineoverridevirtual

Returns the number of points.

Implements Triangulation.

Definition at line 203 of file DualEdgeTriangulation.h.

◆ getOppositePoint()

int DualEdgeTriangulation::getOppositePoint ( int  p1,
int  p2 
)
overridevirtual

Returns the number of the point opposite to the triangle points p1, p2 (which have to be on a halfedge).

Returns -1 if point is a virtual point. Returns -10 if point crosses over edges.

Implements Triangulation.

Definition at line 856 of file DualEdgeTriangulation.cpp.

◆ getPoint()

QgsPoint * DualEdgeTriangulation::getPoint ( int  i) const
inlineoverridevirtual

Draws the points, edges and the forced lines.

Returns a pointer to the point with number i

Implements Triangulation.

Definition at line 208 of file DualEdgeTriangulation.h.

◆ getPointsAroundEdge()

QList< int > * DualEdgeTriangulation::getPointsAroundEdge ( double  x,
double  y 
)
overridevirtual

Returns a value list with the numbers of the four points, which would be affected by an edge swap. This function is e.g. needed by NormVecDecorator to know the points, for which the normals have to be recalculated. The returned ValueList has to be deleted by the code which calls the method.

Implements Triangulation.

Definition at line 2915 of file DualEdgeTriangulation.cpp.

◆ getSurroundingTriangles()

QList< int > DualEdgeTriangulation::getSurroundingTriangles ( int  pointno)
overridevirtual

Returns a pointer to a value list with the information of the triangles surrounding (counterclockwise) a point.

Four integer values describe a triangle, the first three are the number of the half edges of the triangle and the fourth is -10, if the third (and most counterclockwise) edge is a breakline, and -20 otherwise. Any virtual point needs to have the number -1

Implements Triangulation.

Definition at line 890 of file DualEdgeTriangulation.cpp.

◆ getTriangle() [1/2]

bool DualEdgeTriangulation::getTriangle ( double  x,
double  y,
QgsPoint p1,
int &  n1,
QgsPoint p2,
int &  n2,
QgsPoint p3,
int &  n3 
)
overridevirtual

Finds out in which triangle the point with coordinates x and y is and assigns the numbers of the vertices to 'n1', 'n2' and 'n3' and the vertices to 'p1', 'p2' and 'p3'.

Implements Triangulation.

Definition at line 926 of file DualEdgeTriangulation.cpp.

◆ getTriangle() [2/2]

bool DualEdgeTriangulation::getTriangle ( double  x,
double  y,
QgsPoint p1,
QgsPoint p2,
QgsPoint p3 
)
overridevirtual

Finds out, in which triangle the point with coordinates x and y is and assigns the points at the vertices to 'p1', 'p2' and 'p3.

Implements Triangulation.

Definition at line 1034 of file DualEdgeTriangulation.cpp.

◆ getXMax()

double DualEdgeTriangulation::getXMax ( ) const
inlineoverridevirtual

Returns the largest x-coordinate value of the bounding box.

Implements Triangulation.

Definition at line 70 of file DualEdgeTriangulation.h.

◆ getXMin()

double DualEdgeTriangulation::getXMin ( ) const
inlineoverridevirtual

Returns the smallest x-coordinate value of the bounding box.

Implements Triangulation.

Definition at line 72 of file DualEdgeTriangulation.h.

◆ getYMax()

double DualEdgeTriangulation::getYMax ( ) const
inlineoverridevirtual

Returns the largest y-coordinate value of the bounding box.

Implements Triangulation.

Definition at line 74 of file DualEdgeTriangulation.h.

◆ getYMin()

double DualEdgeTriangulation::getYMin ( ) const
inlineoverridevirtual

Returns the smallest x-coordinate value of the bounding box.

Implements Triangulation.

Definition at line 76 of file DualEdgeTriangulation.h.

◆ halfEdgeBBoxTest()

bool DualEdgeTriangulation::halfEdgeBBoxTest ( int  edge,
double  xlowleft,
double  ylowleft,
double  xupright,
double  yupright 
) const
inlineprotected

Tests, if the bounding box of the halfedge with index i intersects the specified bounding box. The main purpose for this method is the drawing of the triangulation.

Definition at line 216 of file DualEdgeTriangulation.h.

◆ insertEdge()

unsigned int DualEdgeTriangulation::insertEdge ( int  dual,
int  next,
int  point,
bool  mbreak,
bool  forced 
)
protected

Inserts an edge and makes sure, everything is OK with the storage of the edge. The number of the HalfEdge is returned.

Definition at line 1132 of file DualEdgeTriangulation.cpp.

◆ insertForcedSegment()

int DualEdgeTriangulation::insertForcedSegment ( int  p1,
int  p2,
QgsInterpolator::SourceType  segmentType 
)
protected

Inserts a forced segment between the points with the numbers p1 and p2 into the triangulation and returns the number of a HalfEdge belonging to this forced edge or -100 in case of failure.

Definition at line 1140 of file DualEdgeTriangulation.cpp.

◆ performConsistencyTest()

void DualEdgeTriangulation::performConsistencyTest ( )
overridevirtual

Performs a consistency check, remove this later.

Implements Triangulation.

Definition at line 49 of file DualEdgeTriangulation.cpp.

◆ pointInside()

bool DualEdgeTriangulation::pointInside ( double  x,
double  y 
)
overridevirtual

Returns true, if the point with coordinates x and y is inside the convex hull and false otherwise.

Implements Triangulation.

Definition at line 2488 of file DualEdgeTriangulation.cpp.

◆ ruppertRefinement()

void DualEdgeTriangulation::ruppertRefinement ( )
overridevirtual

Adds points to make the triangles better shaped (algorithm of ruppert)

Implements Triangulation.

Definition at line 1624 of file DualEdgeTriangulation.cpp.

◆ saveTriangulation()

bool DualEdgeTriangulation::saveTriangulation ( QgsFeatureSink sink,
QgsFeedback feedback = nullptr 
) const
overridevirtual

Saves the triangulation features to a feature sink.

The sink must be setup to accept LineString features, with fields matching those returned by triangulationFields().

Returns
true in case of success
See also
triangulationFields()
Since
QGIS 3.0

Implements Triangulation.

Definition at line 2978 of file DualEdgeTriangulation.cpp.

◆ setBreakEdgeColor()

void DualEdgeTriangulation::setBreakEdgeColor ( int  r,
int  g,
int  b 
)
overridevirtual

Sets the color of the breaklines.

Implements Triangulation.

Definition at line 1525 of file DualEdgeTriangulation.cpp.

◆ setDecorator()

void DualEdgeTriangulation::setDecorator ( Triangulation d)
inline

Definition at line 53 of file DualEdgeTriangulation.h.

◆ setEdgeColor()

void DualEdgeTriangulation::setEdgeColor ( int  r,
int  g,
int  b 
)
overridevirtual

Sets the color of the normal edges.

Implements Triangulation.

Definition at line 1515 of file DualEdgeTriangulation.cpp.

◆ setForcedCrossBehavior()

void DualEdgeTriangulation::setForcedCrossBehavior ( Triangulation::ForcedCrossBehavior  b)
overridevirtual

Sets the behavior of the triangulation in case of crossing forced lines.

Implements Triangulation.

Definition at line 1510 of file DualEdgeTriangulation.cpp.

◆ setForcedEdgeColor()

void DualEdgeTriangulation::setForcedEdgeColor ( int  r,
int  g,
int  b 
)
overridevirtual

Sets the color of the forced edges.

Implements Triangulation.

Definition at line 1520 of file DualEdgeTriangulation.cpp.

◆ setTriangleInterpolator()

void DualEdgeTriangulation::setTriangleInterpolator ( TriangleInterpolator interpolator)
overridevirtual

Sets an interpolator object.

Implements Triangulation.

Definition at line 1530 of file DualEdgeTriangulation.cpp.

◆ splitHalfEdge()

int DualEdgeTriangulation::splitHalfEdge ( int  edge,
float  position 
)
protected

Inserts a new point on the halfedge with number 'edge'. The position can have a value from 0 to 1 (e.g. 0.5 would be in the middle). The return value is the number of the new inserted point. tin is the triangulation, which should be used to calculate the elevation of the inserted point.

Definition at line 3081 of file DualEdgeTriangulation.cpp.

◆ swapEdge()

bool DualEdgeTriangulation::swapEdge ( double  x,
double  y 
)
overridevirtual

Reads the dual edge structure of a taff file.

Saves the dual edge structure to a taff file Swaps the edge which is closest to the point with x and y coordinates (if this is possible)

Implements Triangulation.

Definition at line 2854 of file DualEdgeTriangulation.cpp.

◆ swapMinAngle()

double DualEdgeTriangulation::swapMinAngle ( int  edge) const
protected

Calculates the minimum angle, which would be present, if the specified halfedge would be swapped.

Definition at line 3041 of file DualEdgeTriangulation.cpp.

◆ swapPossible()

bool DualEdgeTriangulation::swapPossible ( unsigned int  edge)
protected

Returns true, if it is possible to swap an edge, otherwise false(concave quad or edge on (or outside) the convex hull)

Definition at line 2314 of file DualEdgeTriangulation.cpp.

◆ triangulatePolygon()

void DualEdgeTriangulation::triangulatePolygon ( QList< int > *  poly,
QList< int > *  free,
int  mainedge 
)
protected

Divides a polygon in a triangle and two polygons and calls itself recursively for these two polygons. 'poly' is a pointer to a list with the numbers of the edges of the polygon, 'free' is a pointer to a list of free halfedges, and 'mainedge' is the number of the edge, towards which the new triangle is inserted. Mainedge has to be the same as poly->begin(), otherwise the recursion does not work.

Definition at line 2351 of file DualEdgeTriangulation.cpp.

Friends And Related Function Documentation

◆ TestQgsInterpolator

friend class TestQgsInterpolator
friend

Definition at line 178 of file DualEdgeTriangulation.h.

Member Data Documentation

◆ DEFAULT_STORAGE_FOR_HALF_EDGES

const unsigned int DualEdgeTriangulation::DEFAULT_STORAGE_FOR_HALF_EDGES = 300006
staticprotected

Default value for the number of storable HalfEdges at the beginning.

Definition at line 120 of file DualEdgeTriangulation.h.

◆ DEFAULT_STORAGE_FOR_POINTS

const unsigned int DualEdgeTriangulation::DEFAULT_STORAGE_FOR_POINTS = 100000
staticprotected

Default value for the number of storable points at the beginning.

Definition at line 116 of file DualEdgeTriangulation.h.

◆ MAX_BASE_ITERATIONS

const int DualEdgeTriangulation::MAX_BASE_ITERATIONS = 300000
staticprotected

Threshold for the leftOfTest to handle numerical instabilities.

Security to prevent endless loops in 'baseEdgeOfTriangle'. It there are more iteration then this number, the point will not be inserted

Definition at line 142 of file DualEdgeTriangulation.h.

◆ mBreakEdgeColor

QColor DualEdgeTriangulation::mBreakEdgeColor
protected

Color to paint the breaklines.

Definition at line 132 of file DualEdgeTriangulation.h.

◆ mDecorator

Triangulation* DualEdgeTriangulation::mDecorator = nullptr
protected

Pointer to the decorator using this triangulation. It it is used directly, mDecorator equals this.

Definition at line 134 of file DualEdgeTriangulation.h.

◆ mEdgeColor

QColor DualEdgeTriangulation::mEdgeColor
protected

Color to paint the normal edges.

Definition at line 128 of file DualEdgeTriangulation.h.

◆ mEdgeInside

unsigned int DualEdgeTriangulation::mEdgeInside = 0
protected

Number of an edge which does not point to the virtual point. It continuously updated for a fast search.

Definition at line 154 of file DualEdgeTriangulation.h.

◆ mEdgeOutside

unsigned int DualEdgeTriangulation::mEdgeOutside = 0
protected

Number of an edge on the outside of the convex hull. It is updated in method 'baseEdgeOfTriangle' to enable insertion of points outside the convex hull.

Definition at line 156 of file DualEdgeTriangulation.h.

◆ mEdgeWithPoint

unsigned int DualEdgeTriangulation::mEdgeWithPoint = 0
protected

If an inserted point is exactly on an existing edge, 'baseEdgeOfTriangle' returns -20 and sets the variable 'mEdgeWithPoint'.

Definition at line 158 of file DualEdgeTriangulation.h.

◆ mForcedCrossBehavior

Triangulation::ForcedCrossBehavior DualEdgeTriangulation::mForcedCrossBehavior = Triangulation::DeleteFirst
protected

Member to store the behavior in case of crossing forced segments.

Definition at line 126 of file DualEdgeTriangulation.h.

◆ mForcedEdgeColor

QColor DualEdgeTriangulation::mForcedEdgeColor
protected

Color to paint the forced edges.

Definition at line 130 of file DualEdgeTriangulation.h.

◆ mHalfEdge

QVector<HalfEdge *> DualEdgeTriangulation::mHalfEdge
protected

Stores pointers to the HalfEdges.

Definition at line 122 of file DualEdgeTriangulation.h.

◆ mPointVector

QVector<QgsPoint *> DualEdgeTriangulation::mPointVector
protected

Stores pointers to all points in the triangulations (including the points contained in the lines)

Definition at line 118 of file DualEdgeTriangulation.h.

◆ mTriangleInterpolator

TriangleInterpolator* DualEdgeTriangulation::mTriangleInterpolator = nullptr
protected

Association to an interpolator object.

Definition at line 124 of file DualEdgeTriangulation.h.

◆ mTwiceInsPoint

int DualEdgeTriangulation::mTwiceInsPoint = 0
protected

If a point has been inserted twice, its number is stored in this member.

Definition at line 162 of file DualEdgeTriangulation.h.

◆ mUnstableEdge

unsigned int DualEdgeTriangulation::mUnstableEdge = 0
protected

If an instability occurs in 'baseEdgeOfTriangle', mUnstableEdge is set to the value of the current edge.

Definition at line 160 of file DualEdgeTriangulation.h.

◆ xMax

double DualEdgeTriangulation::xMax = 0
protected

X-coordinate of the upper right corner of the bounding box.

Definition at line 108 of file DualEdgeTriangulation.h.

◆ xMin

double DualEdgeTriangulation::xMin = 0
protected

X-coordinate of the lower left corner of the bounding box.

Definition at line 110 of file DualEdgeTriangulation.h.

◆ yMax

double DualEdgeTriangulation::yMax = 0
protected

Y-coordinate of the upper right corner of the bounding box.

Definition at line 112 of file DualEdgeTriangulation.h.

◆ yMin

double DualEdgeTriangulation::yMin = 0
protected

Y-coordinate of the lower left corner of the bounding box.

Definition at line 114 of file DualEdgeTriangulation.h.


The documentation for this class was generated from the following files: