You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/analysis/interpolation/CloughTocherInterpolator.h
+38-22
Original file line number
Diff line number
Diff line change
@@ -33,27 +33,43 @@ class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
33
33
//! Tolerance of the barycentric coordinates at the borders of the triangles (to prevent errors because of very small negativ baricentric coordinates)
34
34
doublemEdgeTolerance;
35
35
//! First point of the triangle in x-,y-,z-coordinates
36
-
QgsPoint point1;
36
+
QgsPoint point1 = QgsPoint( 0, 0, 0 );
37
37
//! Second point of the triangle in x-,y-,z-coordinates
38
-
QgsPoint point2;
38
+
QgsPoint point2 = QgsPoint( 0, 0, 0 );
39
39
//! Third point of the triangle in x-,y-,z-coordinates
40
-
QgsPoint point3;
41
-
QgsPoint cp1;
42
-
QgsPoint cp2;
43
-
QgsPoint cp3;
44
-
QgsPoint cp4;
45
-
QgsPoint cp5;
46
-
QgsPoint cp6;
47
-
QgsPoint cp7;
48
-
QgsPoint cp8;
49
-
QgsPoint cp9;
50
-
QgsPoint cp10;
51
-
QgsPoint cp11;
52
-
QgsPoint cp12;
53
-
QgsPoint cp13;
54
-
QgsPoint cp14;
55
-
QgsPoint cp15;
56
-
QgsPoint cp16;
40
+
QgsPoint point3 = QgsPoint( 0, 0, 0 );
41
+
//! Control point 1
42
+
QgsPoint cp1 = QgsPoint( 0, 0, 0 );
43
+
//! Control point 2
44
+
QgsPoint cp2 = QgsPoint( 0, 0, 0 );
45
+
//! Control point 3
46
+
QgsPoint cp3 = QgsPoint( 0, 0, 0 );
47
+
//! Control point 4
48
+
QgsPoint cp4 = QgsPoint( 0, 0, 0 );
49
+
//! Control point 5
50
+
QgsPoint cp5 = QgsPoint( 0, 0, 0 );
51
+
//! Control point 6
52
+
QgsPoint cp6 = QgsPoint( 0, 0, 0 );
53
+
//! Control point 7
54
+
QgsPoint cp7 = QgsPoint( 0, 0, 0 );
55
+
//! Control point 8
56
+
QgsPoint cp8 = QgsPoint( 0, 0, 0 );
57
+
//! Control point 9
58
+
QgsPoint cp9 = QgsPoint( 0, 0, 0 );
59
+
//! Control point 10
60
+
QgsPoint cp10 = QgsPoint( 0, 0, 0 );
61
+
//! Control point 11
62
+
QgsPoint cp11 = QgsPoint( 0, 0, 0 );
63
+
//! Control point 12
64
+
QgsPoint cp12 = QgsPoint( 0, 0, 0 );
65
+
//! Control point 13
66
+
QgsPoint cp13 = QgsPoint( 0, 0, 0 );
67
+
//! Control point 14
68
+
QgsPoint cp14 = QgsPoint( 0, 0, 0 );
69
+
//! Control point 15
70
+
QgsPoint cp15 = QgsPoint( 0, 0, 0 );
71
+
//! Control point 16
72
+
QgsPoint cp16 = QgsPoint( 0, 0, 0 );
57
73
//! Derivative in x-direction at point1
58
74
double der1X;
59
75
//! Derivative in y-direction at point1
@@ -67,11 +83,11 @@ class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
67
83
//! Derivative in y-direction at point3
68
84
double der3Y;
69
85
//! Stores point1 of the last run
70
-
QgsPoint lpoint1;
86
+
QgsPoint lpoint1 = QgsPoint( 0, 0, 0 );
71
87
//! Stores point2 of the last run
72
-
QgsPoint lpoint2;
88
+
QgsPoint lpoint2 = QgsPoint( 0, 0, 0 );
73
89
//! Stores point3 of the last run
74
-
QgsPoint lpoint3;
90
+
QgsPoint lpoint3 = QgsPoint( 0, 0, 0 );
75
91
//! Finds out, in which triangle the point with the coordinates x and y is
76
92
voidinit( double x, double y );
77
93
//! Calculates the Bernsteinpolynomials to calculate the Beziertriangle. 'n' is three in the cubical case, 'i', 'j', 'k' are the indices of the controllpoint and 'u', 'v', 'w' are the barycentric coordinates of the point
QgsDebugMsg( QString( "problems: the edge is: %1" ).arg( edge ) );
1182
1179
returnfalse;
1183
1180
}
1184
1181
}
1185
1182
1186
1183
else
1187
1184
{
1188
-
QgsDebugMsg( "warning, null pointer" );
1189
1185
returnfalse;
1190
1186
}
1191
1187
}
@@ -1270,7 +1266,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )
1270
1266
{
1271
1267
if ( mHalfEdge[mHalfEdge[actedge]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::SnappingTypeVertex )//if the crossed edge is a forced edge, we have to snap the forced line to the next node
@@ -1292,7 +1288,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )
1292
1288
}
1293
1289
elseif ( mHalfEdge[mHalfEdge[actedge]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::InsertVertex )//if the crossed edge is a forced edge, we have to insert a new vertice on this edge
@@ -1358,7 +1354,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )
1358
1354
{
1359
1355
if ( mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::SnappingTypeVertex )//if the crossed edge is a forced edge and mForcedCrossBehavior is SnappingType_VERTICE, we have to snap the forced line to the next node
@@ -1380,7 +1376,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )
1380
1376
}
1381
1377
elseif ( mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::InsertVertex )//if the crossed edge is a forced edge, we have to insert a new vertice on this edge
@@ -1405,7 +1401,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )
1405
1401
{
1406
1402
if ( mHalfEdge[mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::SnappingTypeVertex )//if the crossed edge is a forced edge and mForcedCrossBehavior is SnappingType_VERTICE, we have to snap the forced line to the next node
@@ -1427,7 +1423,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )
1427
1423
}
1428
1424
elseif ( mHalfEdge[mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::InsertVertex )//if the crossed edge is a forced edge, we have to insert a new vertice on this edge
/*******otherwise, try to add the circumcenter to the triangulation************************************************************************************************/
2207
2203
2208
-
QgsPoint *p = newQgsPoint();
2204
+
QgsPoint *p = newQgsPoint(0, 0, 0);
2209
2205
mDecorator->calcPoint( circumcenter.x(), circumcenter.y(), p );
2210
2206
int pointno = mDecorator->addPoint( p );
2211
2207
@@ -3218,7 +3214,7 @@ int DualEdgeTriangulation::splitHalfEdge( int edge, float position )
0 commit comments