| 1 |
diff --git a/thirdparty/misc/polypartition.cpp b/thirdparty/misc/polypartition.cpp |
| 2 |
index 3a8a6efa83..a725125ed0 100644 |
| 3 |
--- a/thirdparty/misc/polypartition.cpp |
| 4 |
+++ b/thirdparty/misc/polypartition.cpp |
| 5 |
@@ -26,7 +26,6 @@ |
| 6 |
#include <math.h> |
| 7 |
#include <string.h> |
| 8 |
#include <algorithm> |
| 9 |
-#include <vector> |
| 10 |
|
| 11 |
TPPLPoly::TPPLPoly() { |
| 12 |
hole = false; |
| 13 |
@@ -186,7 +185,7 @@ int TPPLPartition::Intersects(TPPLPoint &p11, TPPLPoint &p12, TPPLPoint &p21, TP |
| 14 |
// Removes holes from inpolys by merging them with non-holes. |
| 15 |
int TPPLPartition::RemoveHoles(TPPLPolyList *inpolys, TPPLPolyList *outpolys) { |
| 16 |
TPPLPolyList polys; |
| 17 |
- TPPLPolyList::iterator holeiter, polyiter, iter, iter2; |
| 18 |
+ TPPLPolyList::Element *holeiter, *polyiter, *iter, *iter2; |
| 19 |
long i, i2, holepointindex, polypointindex; |
| 20 |
TPPLPoint holepoint, polypoint, bestpolypoint; |
| 21 |
TPPLPoint linep1, linep2; |
| 22 |
@@ -198,15 +197,15 @@ int TPPLPartition::RemoveHoles(TPPLPolyList *inpolys, TPPLPolyList *outpolys) { |
| 23 |
|
| 24 |
// Check for the trivial case of no holes. |
| 25 |
hasholes = false; |
| 26 |
- for (iter = inpolys->begin(); iter != inpolys->end(); iter++) { |
| 27 |
- if (iter->IsHole()) { |
| 28 |
+ for (iter = inpolys->front(); iter; iter = iter->next()) { |
| 29 |
+ if (iter->get().IsHole()) { |
| 30 |
hasholes = true; |
| 31 |
break; |
| 32 |
} |
| 33 |
} |
| 34 |
if (!hasholes) { |
| 35 |
- for (iter = inpolys->begin(); iter != inpolys->end(); iter++) { |
| 36 |
- outpolys->push_back(*iter); |
| 37 |
+ for (iter = inpolys->front(); iter; iter = iter->next()) { |
| 38 |
+ outpolys->push_back(iter->get()); |
| 39 |
} |
| 40 |
return 1; |
| 41 |
} |
| 42 |
@@ -216,8 +215,8 @@ int TPPLPartition::RemoveHoles(TPPLPolyList *inpolys, TPPLPolyList *outpolys) { |
| 43 |
while (1) { |
| 44 |
// Find the hole point with the largest x. |
| 45 |
hasholes = false; |
| 46 |
- for (iter = polys.begin(); iter != polys.end(); iter++) { |
| 47 |
- if (!iter->IsHole()) { |
| 48 |
+ for (iter = polys.front(); iter; iter = iter->next()) { |
| 49 |
+ if (!iter->get().IsHole()) { |
| 50 |
continue; |
| 51 |
} |
| 52 |
|
| 53 |
@@ -227,8 +226,8 @@ int TPPLPartition::RemoveHoles(TPPLPolyList *inpolys, TPPLPolyList *outpolys) { |
| 54 |
holepointindex = 0; |
| 55 |
} |
| 56 |
|
| 57 |
- for (i = 0; i < iter->GetNumPoints(); i++) { |
| 58 |
- if (iter->GetPoint(i).x > holeiter->GetPoint(holepointindex).x) { |
| 59 |
+ for (i = 0; i < iter->get().GetNumPoints(); i++) { |
| 60 |
+ if (iter->get().GetPoint(i).x > holeiter->get().GetPoint(holepointindex).x) { |
| 61 |
holeiter = iter; |
| 62 |
holepointindex = i; |
| 63 |
} |
| 64 |
@@ -237,24 +236,24 @@ int TPPLPartition::RemoveHoles(TPPLPolyList *inpolys, TPPLPolyList *outpolys) { |
| 65 |
if (!hasholes) { |
| 66 |
break; |
| 67 |
} |
| 68 |
- holepoint = holeiter->GetPoint(holepointindex); |
| 69 |
+ holepoint = holeiter->get().GetPoint(holepointindex); |
| 70 |
|
| 71 |
pointfound = false; |
| 72 |
- for (iter = polys.begin(); iter != polys.end(); iter++) { |
| 73 |
- if (iter->IsHole()) { |
| 74 |
+ for (iter = polys.front(); iter; iter = iter->next()) { |
| 75 |
+ if (iter->get().IsHole()) { |
| 76 |
continue; |
| 77 |
} |
| 78 |
- for (i = 0; i < iter->GetNumPoints(); i++) { |
| 79 |
- if (iter->GetPoint(i).x <= holepoint.x) { |
| 80 |
+ for (i = 0; i < iter->get().GetNumPoints(); i++) { |
| 81 |
+ if (iter->get().GetPoint(i).x <= holepoint.x) { |
| 82 |
continue; |
| 83 |
} |
| 84 |
- if (!InCone(iter->GetPoint((i + iter->GetNumPoints() - 1) % (iter->GetNumPoints())), |
| 85 |
- iter->GetPoint(i), |
| 86 |
- iter->GetPoint((i + 1) % (iter->GetNumPoints())), |
| 87 |
+ if (!InCone(iter->get().GetPoint((i + iter->get().GetNumPoints() - 1) % (iter->get().GetNumPoints())), |
| 88 |
+ iter->get().GetPoint(i), |
| 89 |
+ iter->get().GetPoint((i + 1) % (iter->get().GetNumPoints())), |
| 90 |
holepoint)) { |
| 91 |
continue; |
| 92 |
} |
| 93 |
- polypoint = iter->GetPoint(i); |
| 94 |
+ polypoint = iter->get().GetPoint(i); |
| 95 |
if (pointfound) { |
| 96 |
v1 = Normalize(polypoint - holepoint); |
| 97 |
v2 = Normalize(bestpolypoint - holepoint); |
| 98 |
@@ -263,13 +262,13 @@ int TPPLPartition::RemoveHoles(TPPLPolyList *inpolys, TPPLPolyList *outpolys) { |
| 99 |
} |
| 100 |
} |
| 101 |
pointvisible = true; |
| 102 |
- for (iter2 = polys.begin(); iter2 != polys.end(); iter2++) { |
| 103 |
- if (iter2->IsHole()) { |
| 104 |
+ for (iter2 = polys.front(); iter2; iter2 = iter2->next()) { |
| 105 |
+ if (iter2->get().IsHole()) { |
| 106 |
continue; |
| 107 |
} |
| 108 |
- for (i2 = 0; i2 < iter2->GetNumPoints(); i2++) { |
| 109 |
- linep1 = iter2->GetPoint(i2); |
| 110 |
- linep2 = iter2->GetPoint((i2 + 1) % (iter2->GetNumPoints())); |
| 111 |
+ for (i2 = 0; i2 < iter2->get().GetNumPoints(); i2++) { |
| 112 |
+ linep1 = iter2->get().GetPoint(i2); |
| 113 |
+ linep2 = iter2->get().GetPoint((i2 + 1) % (iter2->get().GetNumPoints())); |
| 114 |
if (Intersects(holepoint, polypoint, linep1, linep2)) { |
| 115 |
pointvisible = false; |
| 116 |
break; |
| 117 |
@@ -292,18 +291,18 @@ int TPPLPartition::RemoveHoles(TPPLPolyList *inpolys, TPPLPolyList *outpolys) { |
| 118 |
return 0; |
| 119 |
} |
| 120 |
|
| 121 |
- newpoly.Init(holeiter->GetNumPoints() + polyiter->GetNumPoints() + 2); |
| 122 |
+ newpoly.Init(holeiter->get().GetNumPoints() + polyiter->get().GetNumPoints() + 2); |
| 123 |
i2 = 0; |
| 124 |
for (i = 0; i <= polypointindex; i++) { |
| 125 |
- newpoly[i2] = polyiter->GetPoint(i); |
| 126 |
+ newpoly[i2] = polyiter->get().GetPoint(i); |
| 127 |
i2++; |
| 128 |
} |
| 129 |
- for (i = 0; i <= holeiter->GetNumPoints(); i++) { |
| 130 |
- newpoly[i2] = holeiter->GetPoint((i + holepointindex) % holeiter->GetNumPoints()); |
| 131 |
+ for (i = 0; i <= holeiter->get().GetNumPoints(); i++) { |
| 132 |
+ newpoly[i2] = holeiter->get().GetPoint((i + holepointindex) % holeiter->get().GetNumPoints()); |
| 133 |
i2++; |
| 134 |
} |
| 135 |
- for (i = polypointindex; i < polyiter->GetNumPoints(); i++) { |
| 136 |
- newpoly[i2] = polyiter->GetPoint(i); |
| 137 |
+ for (i = polypointindex; i < polyiter->get().GetNumPoints(); i++) { |
| 138 |
+ newpoly[i2] = polyiter->get().GetPoint(i); |
| 139 |
i2++; |
| 140 |
} |
| 141 |
|
| 142 |
@@ -312,8 +311,8 @@ int TPPLPartition::RemoveHoles(TPPLPolyList *inpolys, TPPLPolyList *outpolys) { |
| 143 |
polys.push_back(newpoly); |
| 144 |
} |
| 145 |
|
| 146 |
- for (iter = polys.begin(); iter != polys.end(); iter++) { |
| 147 |
- outpolys->push_back(*iter); |
| 148 |
+ for (iter = polys.front(); iter; iter = iter->next()) { |
| 149 |
+ outpolys->push_back(iter->get()); |
| 150 |
} |
| 151 |
|
| 152 |
return 1; |
| 153 |
@@ -524,13 +523,13 @@ int TPPLPartition::Triangulate_EC(TPPLPoly *poly, TPPLPolyList *triangles) { |
| 154 |
|
| 155 |
int TPPLPartition::Triangulate_EC(TPPLPolyList *inpolys, TPPLPolyList *triangles) { |
| 156 |
TPPLPolyList outpolys; |
| 157 |
- TPPLPolyList::iterator iter; |
| 158 |
+ TPPLPolyList::Element *iter; |
| 159 |
|
| 160 |
if (!RemoveHoles(inpolys, &outpolys)) { |
| 161 |
return 0; |
| 162 |
} |
| 163 |
- for (iter = outpolys.begin(); iter != outpolys.end(); iter++) { |
| 164 |
- if (!Triangulate_EC(&(*iter), triangles)) { |
| 165 |
+ for (iter = outpolys.front(); iter; iter = iter->next()) { |
| 166 |
+ if (!Triangulate_EC(&(iter->get()), triangles)) { |
| 167 |
return 0; |
| 168 |
} |
| 169 |
} |
| 170 |
@@ -543,7 +542,7 @@ int TPPLPartition::ConvexPartition_HM(TPPLPoly *poly, TPPLPolyList *parts) { |
| 171 |
} |
| 172 |
|
| 173 |
TPPLPolyList triangles; |
| 174 |
- TPPLPolyList::iterator iter1, iter2; |
| 175 |
+ TPPLPolyList::Element *iter1, *iter2; |
| 176 |
TPPLPoly *poly1 = NULL, *poly2 = NULL; |
| 177 |
TPPLPoly newpoly; |
| 178 |
TPPLPoint d1, d2, p1, p2, p3; |
| 179 |
@@ -578,19 +577,19 @@ int TPPLPartition::ConvexPartition_HM(TPPLPoly *poly, TPPLPolyList *parts) { |
| 180 |
return 0; |
| 181 |
} |
| 182 |
|
| 183 |
- for (iter1 = triangles.begin(); iter1 != triangles.end(); iter1++) { |
| 184 |
- poly1 = &(*iter1); |
| 185 |
+ for (iter1 = triangles.front(); iter1; iter1 = iter1->next()) { |
| 186 |
+ poly1 = &(iter1->get()); |
| 187 |
for (i11 = 0; i11 < poly1->GetNumPoints(); i11++) { |
| 188 |
d1 = poly1->GetPoint(i11); |
| 189 |
i12 = (i11 + 1) % (poly1->GetNumPoints()); |
| 190 |
d2 = poly1->GetPoint(i12); |
| 191 |
|
| 192 |
isdiagonal = false; |
| 193 |
- for (iter2 = iter1; iter2 != triangles.end(); iter2++) { |
| 194 |
+ for (iter2 = iter1; iter2; iter2 = iter2->next()) { |
| 195 |
if (iter1 == iter2) { |
| 196 |
continue; |
| 197 |
} |
| 198 |
- poly2 = &(*iter2); |
| 199 |
+ poly2 = &(iter2->get()); |
| 200 |
|
| 201 |
for (i21 = 0; i21 < poly2->GetNumPoints(); i21++) { |
| 202 |
if ((d2.x != poly2->GetPoint(i21).x) || (d2.y != poly2->GetPoint(i21).y)) { |
| 203 |
@@ -660,16 +659,16 @@ int TPPLPartition::ConvexPartition_HM(TPPLPoly *poly, TPPLPolyList *parts) { |
| 204 |
} |
| 205 |
|
| 206 |
triangles.erase(iter2); |
| 207 |
- *iter1 = newpoly; |
| 208 |
- poly1 = &(*iter1); |
| 209 |
+ iter1->get() = newpoly; |
| 210 |
+ poly1 = &(iter1->get()); |
| 211 |
i11 = -1; |
| 212 |
|
| 213 |
continue; |
| 214 |
} |
| 215 |
} |
| 216 |
|
| 217 |
- for (iter1 = triangles.begin(); iter1 != triangles.end(); iter1++) { |
| 218 |
- parts->push_back(*iter1); |
| 219 |
+ for (iter1 = triangles.front(); iter1; iter1 = iter1->next()) { |
| 220 |
+ parts->push_back(iter1->get()); |
| 221 |
} |
| 222 |
|
| 223 |
return 1; |
| 224 |
@@ -677,13 +676,13 @@ int TPPLPartition::ConvexPartition_HM(TPPLPoly *poly, TPPLPolyList *parts) { |
| 225 |
|
| 226 |
int TPPLPartition::ConvexPartition_HM(TPPLPolyList *inpolys, TPPLPolyList *parts) { |
| 227 |
TPPLPolyList outpolys; |
| 228 |
- TPPLPolyList::iterator iter; |
| 229 |
+ TPPLPolyList::Element *iter; |
| 230 |
|
| 231 |
if (!RemoveHoles(inpolys, &outpolys)) { |
| 232 |
return 0; |
| 233 |
} |
| 234 |
- for (iter = outpolys.begin(); iter != outpolys.end(); iter++) { |
| 235 |
- if (!ConvexPartition_HM(&(*iter), parts)) { |
| 236 |
+ for (iter = outpolys.front(); iter; iter = iter->next()) { |
| 237 |
+ if (!ConvexPartition_HM(&(iter->get()), parts)) { |
| 238 |
return 0; |
| 239 |
} |
| 240 |
} |
| 241 |
@@ -824,8 +823,8 @@ int TPPLPartition::Triangulate_OPT(TPPLPoly *poly, TPPLPolyList *triangles) { |
| 242 |
newdiagonal.index1 = 0; |
| 243 |
newdiagonal.index2 = n - 1; |
| 244 |
diagonals.push_back(newdiagonal); |
| 245 |
- while (!diagonals.empty()) { |
| 246 |
- diagonal = *(diagonals.begin()); |
| 247 |
+ while (!diagonals.is_empty()) { |
| 248 |
+ diagonal = diagonals.front()->get(); |
| 249 |
diagonals.pop_front(); |
| 250 |
bestvertex = dpstates[diagonal.index2][diagonal.index1].bestvertex; |
| 251 |
if (bestvertex == -1) { |
| 252 |
@@ -873,10 +872,10 @@ void TPPLPartition::UpdateState(long a, long b, long w, long i, long j, DPState2 |
| 253 |
pairs->push_front(newdiagonal); |
| 254 |
dpstates[a][b].weight = w; |
| 255 |
} else { |
| 256 |
- if ((!pairs->empty()) && (i <= pairs->begin()->index1)) { |
| 257 |
+ if ((!pairs->is_empty()) && (i <= pairs->front()->get().index1)) { |
| 258 |
return; |
| 259 |
} |
| 260 |
- while ((!pairs->empty()) && (pairs->begin()->index2 >= j)) { |
| 261 |
+ while ((!pairs->is_empty()) && (pairs->front()->get().index2 >= j)) { |
| 262 |
pairs->pop_front(); |
| 263 |
} |
| 264 |
pairs->push_front(newdiagonal); |
| 265 |
@@ -885,7 +884,7 @@ void TPPLPartition::UpdateState(long a, long b, long w, long i, long j, DPState2 |
| 266 |
|
| 267 |
void TPPLPartition::TypeA(long i, long j, long k, PartitionVertex *vertices, DPState2 **dpstates) { |
| 268 |
DiagonalList *pairs = NULL; |
| 269 |
- DiagonalList::iterator iter, lastiter; |
| 270 |
+ DiagonalList::Element *iter, *lastiter; |
| 271 |
long top; |
| 272 |
long w; |
| 273 |
|
| 274 |
@@ -902,23 +901,23 @@ void TPPLPartition::TypeA(long i, long j, long k, PartitionVertex *vertices, DPS |
| 275 |
} |
| 276 |
if (j - i > 1) { |
| 277 |
pairs = &(dpstates[i][j].pairs); |
| 278 |
- iter = pairs->end(); |
| 279 |
- lastiter = pairs->end(); |
| 280 |
- while (iter != pairs->begin()) { |
| 281 |
+ iter = pairs->back(); |
| 282 |
+ lastiter = pairs->back(); |
| 283 |
+ while (iter != pairs->front()) { |
| 284 |
iter--; |
| 285 |
- if (!IsReflex(vertices[iter->index2].p, vertices[j].p, vertices[k].p)) { |
| 286 |
+ if (!IsReflex(vertices[iter->get().index2].p, vertices[j].p, vertices[k].p)) { |
| 287 |
lastiter = iter; |
| 288 |
} else { |
| 289 |
break; |
| 290 |
} |
| 291 |
} |
| 292 |
- if (lastiter == pairs->end()) { |
| 293 |
+ if (lastiter == pairs->back()) { |
| 294 |
w++; |
| 295 |
} else { |
| 296 |
- if (IsReflex(vertices[k].p, vertices[i].p, vertices[lastiter->index1].p)) { |
| 297 |
+ if (IsReflex(vertices[k].p, vertices[i].p, vertices[lastiter->get().index1].p)) { |
| 298 |
w++; |
| 299 |
} else { |
| 300 |
- top = lastiter->index1; |
| 301 |
+ top = lastiter->get().index1; |
| 302 |
} |
| 303 |
} |
| 304 |
} |
| 305 |
@@ -927,7 +926,7 @@ void TPPLPartition::TypeA(long i, long j, long k, PartitionVertex *vertices, DPS |
| 306 |
|
| 307 |
void TPPLPartition::TypeB(long i, long j, long k, PartitionVertex *vertices, DPState2 **dpstates) { |
| 308 |
DiagonalList *pairs = NULL; |
| 309 |
- DiagonalList::iterator iter, lastiter; |
| 310 |
+ DiagonalList::Element *iter, *lastiter; |
| 311 |
long top; |
| 312 |
long w; |
| 313 |
|
| 314 |
@@ -946,21 +945,21 @@ void TPPLPartition::TypeB(long i, long j, long k, PartitionVertex *vertices, DPS |
| 315 |
if (k - j > 1) { |
| 316 |
pairs = &(dpstates[j][k].pairs); |
| 317 |
|
| 318 |
- iter = pairs->begin(); |
| 319 |
- if ((!pairs->empty()) && (!IsReflex(vertices[i].p, vertices[j].p, vertices[iter->index1].p))) { |
| 320 |
+ iter = pairs->front(); |
| 321 |
+ if ((!pairs->is_empty()) && (!IsReflex(vertices[i].p, vertices[j].p, vertices[iter->get().index1].p))) { |
| 322 |
lastiter = iter; |
| 323 |
- while (iter != pairs->end()) { |
| 324 |
- if (!IsReflex(vertices[i].p, vertices[j].p, vertices[iter->index1].p)) { |
| 325 |
+ while (iter) { |
| 326 |
+ if (!IsReflex(vertices[i].p, vertices[j].p, vertices[iter->get().index1].p)) { |
| 327 |
lastiter = iter; |
| 328 |
- iter++; |
| 329 |
+ iter = iter->next(); |
| 330 |
} else { |
| 331 |
break; |
| 332 |
} |
| 333 |
} |
| 334 |
- if (IsReflex(vertices[lastiter->index2].p, vertices[k].p, vertices[i].p)) { |
| 335 |
+ if (IsReflex(vertices[lastiter->get().index2].p, vertices[k].p, vertices[i].p)) { |
| 336 |
w++; |
| 337 |
} else { |
| 338 |
- top = lastiter->index2; |
| 339 |
+ top = lastiter->get().index2; |
| 340 |
} |
| 341 |
} else { |
| 342 |
w++; |
| 343 |
@@ -981,11 +980,11 @@ int TPPLPartition::ConvexPartition_OPT(TPPLPoly *poly, TPPLPolyList *parts) { |
| 344 |
DiagonalList diagonals, diagonals2; |
| 345 |
Diagonal diagonal, newdiagonal; |
| 346 |
DiagonalList *pairs = NULL, *pairs2 = NULL; |
| 347 |
- DiagonalList::iterator iter, iter2; |
| 348 |
+ DiagonalList::Element *iter, *iter2; |
| 349 |
int ret; |
| 350 |
TPPLPoly newpoly; |
| 351 |
- std::vector<long> indices; |
| 352 |
- std::vector<long>::iterator iiter; |
| 353 |
+ List<long> indices; |
| 354 |
+ List<long>::Element *iiter; |
| 355 |
bool ijreal, jkreal; |
| 356 |
|
| 357 |
n = poly->GetNumPoints(); |
| 358 |
@@ -1110,35 +1109,35 @@ int TPPLPartition::ConvexPartition_OPT(TPPLPoly *poly, TPPLPolyList *parts) { |
| 359 |
newdiagonal.index1 = 0; |
| 360 |
newdiagonal.index2 = n - 1; |
| 361 |
diagonals.push_front(newdiagonal); |
| 362 |
- while (!diagonals.empty()) { |
| 363 |
- diagonal = *(diagonals.begin()); |
| 364 |
+ while (!diagonals.is_empty()) { |
| 365 |
+ diagonal = diagonals.front()->get(); |
| 366 |
diagonals.pop_front(); |
| 367 |
if ((diagonal.index2 - diagonal.index1) <= 1) { |
| 368 |
continue; |
| 369 |
} |
| 370 |
pairs = &(dpstates[diagonal.index1][diagonal.index2].pairs); |
| 371 |
- if (pairs->empty()) { |
| 372 |
+ if (pairs->is_empty()) { |
| 373 |
ret = 0; |
| 374 |
break; |
| 375 |
} |
| 376 |
if (!vertices[diagonal.index1].isConvex) { |
| 377 |
- iter = pairs->end(); |
| 378 |
+ iter = pairs->back(); |
| 379 |
iter--; |
| 380 |
- j = iter->index2; |
| 381 |
+ j = iter->get().index2; |
| 382 |
newdiagonal.index1 = j; |
| 383 |
newdiagonal.index2 = diagonal.index2; |
| 384 |
diagonals.push_front(newdiagonal); |
| 385 |
if ((j - diagonal.index1) > 1) { |
| 386 |
- if (iter->index1 != iter->index2) { |
| 387 |
+ if (iter->get().index1 != iter->get().index2) { |
| 388 |
pairs2 = &(dpstates[diagonal.index1][j].pairs); |
| 389 |
while (1) { |
| 390 |
- if (pairs2->empty()) { |
| 391 |
+ if (pairs2->is_empty()) { |
| 392 |
ret = 0; |
| 393 |
break; |
| 394 |
} |
| 395 |
- iter2 = pairs2->end(); |
| 396 |
+ iter2 = pairs2->back(); |
| 397 |
iter2--; |
| 398 |
- if (iter->index1 != iter2->index1) { |
| 399 |
+ if (iter->get().index1 != iter2->get().index1) { |
| 400 |
pairs2->pop_back(); |
| 401 |
} else { |
| 402 |
break; |
| 403 |
@@ -1153,21 +1152,21 @@ int TPPLPartition::ConvexPartition_OPT(TPPLPoly *poly, TPPLPolyList *parts) { |
| 404 |
diagonals.push_front(newdiagonal); |
| 405 |
} |
| 406 |
} else { |
| 407 |
- iter = pairs->begin(); |
| 408 |
- j = iter->index1; |
| 409 |
+ iter = pairs->front(); |
| 410 |
+ j = iter->get().index1; |
| 411 |
newdiagonal.index1 = diagonal.index1; |
| 412 |
newdiagonal.index2 = j; |
| 413 |
diagonals.push_front(newdiagonal); |
| 414 |
if ((diagonal.index2 - j) > 1) { |
| 415 |
- if (iter->index1 != iter->index2) { |
| 416 |
+ if (iter->get().index1 != iter->get().index2) { |
| 417 |
pairs2 = &(dpstates[j][diagonal.index2].pairs); |
| 418 |
while (1) { |
| 419 |
- if (pairs2->empty()) { |
| 420 |
+ if (pairs2->is_empty()) { |
| 421 |
ret = 0; |
| 422 |
break; |
| 423 |
} |
| 424 |
- iter2 = pairs2->begin(); |
| 425 |
- if (iter->index2 != iter2->index2) { |
| 426 |
+ iter2 = pairs2->front(); |
| 427 |
+ if (iter->get().index2 != iter2->get().index2) { |
| 428 |
pairs2->pop_front(); |
| 429 |
} else { |
| 430 |
break; |
| 431 |
@@ -1197,8 +1196,8 @@ int TPPLPartition::ConvexPartition_OPT(TPPLPoly *poly, TPPLPolyList *parts) { |
| 432 |
newdiagonal.index1 = 0; |
| 433 |
newdiagonal.index2 = n - 1; |
| 434 |
diagonals.push_front(newdiagonal); |
| 435 |
- while (!diagonals.empty()) { |
| 436 |
- diagonal = *(diagonals.begin()); |
| 437 |
+ while (!diagonals.is_empty()) { |
| 438 |
+ diagonal = diagonals.front()->get(); |
| 439 |
diagonals.pop_front(); |
| 440 |
if ((diagonal.index2 - diagonal.index1) <= 1) { |
| 441 |
continue; |
| 442 |
@@ -1210,8 +1209,8 @@ int TPPLPartition::ConvexPartition_OPT(TPPLPoly *poly, TPPLPolyList *parts) { |
| 443 |
indices.push_back(diagonal.index2); |
| 444 |
diagonals2.push_front(diagonal); |
| 445 |
|
| 446 |
- while (!diagonals2.empty()) { |
| 447 |
- diagonal = *(diagonals2.begin()); |
| 448 |
+ while (!diagonals2.is_empty()) { |
| 449 |
+ diagonal = diagonals2.front()->get(); |
| 450 |
diagonals2.pop_front(); |
| 451 |
if ((diagonal.index2 - diagonal.index1) <= 1) { |
| 452 |
continue; |
| 453 |
@@ -1220,16 +1219,16 @@ int TPPLPartition::ConvexPartition_OPT(TPPLPoly *poly, TPPLPolyList *parts) { |
| 454 |
jkreal = true; |
| 455 |
pairs = &(dpstates[diagonal.index1][diagonal.index2].pairs); |
| 456 |
if (!vertices[diagonal.index1].isConvex) { |
| 457 |
- iter = pairs->end(); |
| 458 |
+ iter = pairs->back(); |
| 459 |
iter--; |
| 460 |
- j = iter->index2; |
| 461 |
- if (iter->index1 != iter->index2) { |
| 462 |
+ j = iter->get().index2; |
| 463 |
+ if (iter->get().index1 != iter->get().index2) { |
| 464 |
ijreal = false; |
| 465 |
} |
| 466 |
} else { |
| 467 |
- iter = pairs->begin(); |
| 468 |
- j = iter->index1; |
| 469 |
- if (iter->index1 != iter->index2) { |
| 470 |
+ iter = pairs->front(); |
| 471 |
+ j = iter->get().index1; |
| 472 |
+ if (iter->get().index1 != iter->get().index2) { |
| 473 |
jkreal = false; |
| 474 |
} |
| 475 |
} |
| 476 |
@@ -1253,11 +1252,12 @@ int TPPLPartition::ConvexPartition_OPT(TPPLPoly *poly, TPPLPolyList *parts) { |
| 477 |
indices.push_back(j); |
| 478 |
} |
| 479 |
|
| 480 |
- std::sort(indices.begin(), indices.end()); |
| 481 |
+ //std::sort(indices.begin(), indices.end()); |
| 482 |
+ indices.sort(); |
| 483 |
newpoly.Init((long)indices.size()); |
| 484 |
k = 0; |
| 485 |
- for (iiter = indices.begin(); iiter != indices.end(); iiter++) { |
| 486 |
- newpoly[k] = vertices[*iiter].p; |
| 487 |
+ for (iiter = indices.front(); iiter != indices.back(); iiter = iiter->next()) { |
| 488 |
+ newpoly[k] = vertices[iiter->get()].p; |
| 489 |
k++; |
| 490 |
} |
| 491 |
parts->push_back(newpoly); |
| 492 |
@@ -1281,7 +1281,7 @@ int TPPLPartition::ConvexPartition_OPT(TPPLPoly *poly, TPPLPolyList *parts) { |
| 493 |
// "Computational Geometry: Algorithms and Applications" |
| 494 |
// by Mark de Berg, Otfried Cheong, Marc van Kreveld, and Mark Overmars. |
| 495 |
int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monotonePolys) { |
| 496 |
- TPPLPolyList::iterator iter; |
| 497 |
+ TPPLPolyList::Element *iter; |
| 498 |
MonotoneVertex *vertices = NULL; |
| 499 |
long i, numvertices, vindex, vindex2, newnumvertices, maxnumvertices; |
| 500 |
long polystartindex, polyendindex; |
| 501 |
@@ -1291,11 +1291,8 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto |
| 502 |
bool error = false; |
| 503 |
|
| 504 |
numvertices = 0; |
| 505 |
- for (iter = inpolys->begin(); iter != inpolys->end(); iter++) { |
| 506 |
- if (!iter->Valid()) { |
| 507 |
- return 0; |
| 508 |
- } |
| 509 |
- numvertices += iter->GetNumPoints(); |
| 510 |
+ for (iter = inpolys->front(); iter; iter = iter->next()) { |
| 511 |
+ numvertices += iter->get().GetNumPoints(); |
| 512 |
} |
| 513 |
|
| 514 |
maxnumvertices = numvertices * 3; |
| 515 |
@@ -1303,8 +1300,8 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto |
| 516 |
newnumvertices = numvertices; |
| 517 |
|
| 518 |
polystartindex = 0; |
| 519 |
- for (iter = inpolys->begin(); iter != inpolys->end(); iter++) { |
| 520 |
- poly = &(*iter); |
| 521 |
+ for (iter = inpolys->front(); iter; iter = iter->next()) { |
| 522 |
+ poly = &(iter->get()); |
| 523 |
polyendindex = polystartindex + poly->GetNumPoints() - 1; |
| 524 |
for (i = 0; i < poly->GetNumPoints(); i++) { |
| 525 |
vertices[i + polystartindex].p = poly->GetPoint(i); |
| 526 |
@@ -1360,14 +1357,14 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto |
| 527 |
// Note that while set doesn't actually have to be implemented as |
| 528 |
// a tree, complexity requirements for operations are the same as |
| 529 |
// for the balanced binary search tree. |
| 530 |
- std::set<ScanLineEdge> edgeTree; |
| 531 |
+ RBSet<ScanLineEdge> edgeTree; |
| 532 |
// Store iterators to the edge tree elements. |
| 533 |
// This makes deleting existing edges much faster. |
| 534 |
- std::set<ScanLineEdge>::iterator *edgeTreeIterators, edgeIter; |
| 535 |
- edgeTreeIterators = new std::set<ScanLineEdge>::iterator[maxnumvertices]; |
| 536 |
- std::pair<std::set<ScanLineEdge>::iterator, bool> edgeTreeRet; |
| 537 |
+ RBSet<ScanLineEdge>::Element **edgeTreeIterators, *edgeIter; |
| 538 |
+ edgeTreeIterators = new RBSet<ScanLineEdge>::Element *[maxnumvertices]; |
| 539 |
+ //Pair<RBSet<ScanLineEdge>::iterator, bool> edgeTreeRet; |
| 540 |
for (i = 0; i < numvertices; i++) { |
| 541 |
- edgeTreeIterators[i] = edgeTree.end(); |
| 542 |
+ edgeTreeIterators[i] = nullptr; |
| 543 |
} |
| 544 |
|
| 545 |
// For each vertex. |
| 546 |
@@ -1387,13 +1384,14 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto |
| 547 |
newedge.p1 = v->p; |
| 548 |
newedge.p2 = vertices[v->next].p; |
| 549 |
newedge.index = vindex; |
| 550 |
- edgeTreeRet = edgeTree.insert(newedge); |
| 551 |
- edgeTreeIterators[vindex] = edgeTreeRet.first; |
| 552 |
+ //edgeTreeRet = edgeTree.insert(newedge); |
| 553 |
+ //edgeTreeIterators[vindex] = edgeTreeRet.first; |
| 554 |
+ edgeTreeIterators[vindex] = edgeTree.insert(newedge); |
| 555 |
helpers[vindex] = vindex; |
| 556 |
break; |
| 557 |
|
| 558 |
case TPPL_VERTEXTYPE_END: |
| 559 |
- if (edgeTreeIterators[v->previous] == edgeTree.end()) { |
| 560 |
+ if (edgeTreeIterators[v->previous] == edgeTree.back()) { |
| 561 |
error = true; |
| 562 |
break; |
| 563 |
} |
| 564 |
@@ -1412,29 +1410,30 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto |
| 565 |
newedge.p1 = v->p; |
| 566 |
newedge.p2 = v->p; |
| 567 |
edgeIter = edgeTree.lower_bound(newedge); |
| 568 |
- if (edgeIter == edgeTree.begin()) { |
| 569 |
+ if (edgeIter == nullptr || edgeIter == edgeTree.front()) { |
| 570 |
error = true; |
| 571 |
break; |
| 572 |
} |
| 573 |
edgeIter--; |
| 574 |
// Insert the diagonal connecting vi to helper(e_j) in D. |
| 575 |
- AddDiagonal(vertices, &newnumvertices, vindex, helpers[edgeIter->index], |
| 576 |
+ AddDiagonal(vertices, &newnumvertices, vindex, helpers[edgeIter->get().index], |
| 577 |
vertextypes, edgeTreeIterators, &edgeTree, helpers); |
| 578 |
vindex2 = newnumvertices - 2; |
| 579 |
v2 = &(vertices[vindex2]); |
| 580 |
// helper(e_j) in v_i. |
| 581 |
- helpers[edgeIter->index] = vindex; |
| 582 |
+ helpers[edgeIter->get().index] = vindex; |
| 583 |
// Insert e_i in T and set helper(e_i) to v_i. |
| 584 |
newedge.p1 = v2->p; |
| 585 |
newedge.p2 = vertices[v2->next].p; |
| 586 |
newedge.index = vindex2; |
| 587 |
- edgeTreeRet = edgeTree.insert(newedge); |
| 588 |
- edgeTreeIterators[vindex2] = edgeTreeRet.first; |
| 589 |
+ //edgeTreeRet = edgeTree.insert(newedge); |
| 590 |
+ //edgeTreeIterators[vindex2] = edgeTreeRet.first; |
| 591 |
+ edgeTreeIterators[vindex2] = edgeTree.insert(newedge); |
| 592 |
helpers[vindex2] = vindex2; |
| 593 |
break; |
| 594 |
|
| 595 |
case TPPL_VERTEXTYPE_MERGE: |
| 596 |
- if (edgeTreeIterators[v->previous] == edgeTree.end()) { |
| 597 |
+ if (edgeTreeIterators[v->previous] == edgeTree.back()) { |
| 598 |
error = true; |
| 599 |
break; |
| 600 |
} |
| 601 |
@@ -1452,25 +1451,25 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto |
| 602 |
newedge.p1 = v->p; |
| 603 |
newedge.p2 = v->p; |
| 604 |
edgeIter = edgeTree.lower_bound(newedge); |
| 605 |
- if (edgeIter == edgeTree.begin()) { |
| 606 |
+ if (edgeIter == nullptr || edgeIter == edgeTree.front()) { |
| 607 |
error = true; |
| 608 |
break; |
| 609 |
} |
| 610 |
edgeIter--; |
| 611 |
// If helper(e_j) is a merge vertex. |
| 612 |
- if (vertextypes[helpers[edgeIter->index]] == TPPL_VERTEXTYPE_MERGE) { |
| 613 |
+ if (vertextypes[helpers[edgeIter->get().index]] == TPPL_VERTEXTYPE_MERGE) { |
| 614 |
// Insert the diagonal connecting v_i to helper(e_j) in D. |
| 615 |
- AddDiagonal(vertices, &newnumvertices, vindex2, helpers[edgeIter->index], |
| 616 |
+ AddDiagonal(vertices, &newnumvertices, vindex2, helpers[edgeIter->get().index], |
| 617 |
vertextypes, edgeTreeIterators, &edgeTree, helpers); |
| 618 |
} |
| 619 |
// helper(e_j) <- v_i |
| 620 |
- helpers[edgeIter->index] = vindex2; |
| 621 |
+ helpers[edgeIter->get().index] = vindex2; |
| 622 |
break; |
| 623 |
|
| 624 |
case TPPL_VERTEXTYPE_REGULAR: |
| 625 |
// If the interior of P lies to the right of v_i. |
| 626 |
if (Below(v->p, vertices[v->previous].p)) { |
| 627 |
- if (edgeTreeIterators[v->previous] == edgeTree.end()) { |
| 628 |
+ if (edgeTreeIterators[v->previous] == edgeTree.back()) { |
| 629 |
error = true; |
| 630 |
break; |
| 631 |
} |
| 632 |
@@ -1488,27 +1487,28 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto |
| 633 |
newedge.p1 = v2->p; |
| 634 |
newedge.p2 = vertices[v2->next].p; |
| 635 |
newedge.index = vindex2; |
| 636 |
- edgeTreeRet = edgeTree.insert(newedge); |
| 637 |
- edgeTreeIterators[vindex2] = edgeTreeRet.first; |
| 638 |
+ //edgeTreeRet = edgeTree.insert(newedge); |
| 639 |
+ //edgeTreeIterators[vindex2] = edgeTreeRet.first; |
| 640 |
+ edgeTreeIterators[vindex2] = edgeTree.insert(newedge); |
| 641 |
helpers[vindex2] = vindex; |
| 642 |
} else { |
| 643 |
// Search in T to find the edge e_j directly left of v_i. |
| 644 |
newedge.p1 = v->p; |
| 645 |
newedge.p2 = v->p; |
| 646 |
edgeIter = edgeTree.lower_bound(newedge); |
| 647 |
- if (edgeIter == edgeTree.begin()) { |
| 648 |
+ if (edgeIter == nullptr || edgeIter == edgeTree.front()) { |
| 649 |
error = true; |
| 650 |
break; |
| 651 |
} |
| 652 |
- edgeIter--; |
| 653 |
+ edgeIter = edgeIter->prev(); |
| 654 |
// If helper(e_j) is a merge vertex. |
| 655 |
- if (vertextypes[helpers[edgeIter->index]] == TPPL_VERTEXTYPE_MERGE) { |
| 656 |
+ if (vertextypes[helpers[edgeIter->get().index]] == TPPL_VERTEXTYPE_MERGE) { |
| 657 |
// Insert the diagonal connecting v_i to helper(e_j) in D. |
| 658 |
- AddDiagonal(vertices, &newnumvertices, vindex, helpers[edgeIter->index], |
| 659 |
+ AddDiagonal(vertices, &newnumvertices, vindex, helpers[edgeIter->get().index], |
| 660 |
vertextypes, edgeTreeIterators, &edgeTree, helpers); |
| 661 |
} |
| 662 |
// helper(e_j) <- v_i. |
| 663 |
- helpers[edgeIter->index] = vindex; |
| 664 |
+ helpers[edgeIter->get().index] = vindex; |
| 665 |
} |
| 666 |
break; |
| 667 |
} |
| 668 |
@@ -1569,8 +1569,8 @@ int TPPLPartition::MonotonePartition(TPPLPolyList *inpolys, TPPLPolyList *monoto |
| 669 |
|
| 670 |
// Adds a diagonal to the doubly-connected list of vertices. |
| 671 |
void TPPLPartition::AddDiagonal(MonotoneVertex *vertices, long *numvertices, long index1, long index2, |
| 672 |
- TPPLVertexType *vertextypes, std::set<ScanLineEdge>::iterator *edgeTreeIterators, |
| 673 |
- std::set<ScanLineEdge> *edgeTree, long *helpers) { |
| 674 |
+ TPPLVertexType *vertextypes, RBSet<ScanLineEdge>::Element **edgeTreeIterators, |
| 675 |
+ RBSet<ScanLineEdge> *edgeTree, long *helpers) { |
| 676 |
long newindex1, newindex2; |
| 677 |
|
| 678 |
newindex1 = *numvertices; |
| 679 |
@@ -1597,14 +1597,14 @@ void TPPLPartition::AddDiagonal(MonotoneVertex *vertices, long *numvertices, lon |
| 680 |
vertextypes[newindex1] = vertextypes[index1]; |
| 681 |
edgeTreeIterators[newindex1] = edgeTreeIterators[index1]; |
| 682 |
helpers[newindex1] = helpers[index1]; |
| 683 |
- if (edgeTreeIterators[newindex1] != edgeTree->end()) { |
| 684 |
- edgeTreeIterators[newindex1]->index = newindex1; |
| 685 |
+ if (edgeTreeIterators[newindex1] != edgeTree->back()) { |
| 686 |
+ edgeTreeIterators[newindex1]->get().index = newindex1; |
| 687 |
} |
| 688 |
vertextypes[newindex2] = vertextypes[index2]; |
| 689 |
edgeTreeIterators[newindex2] = edgeTreeIterators[index2]; |
| 690 |
helpers[newindex2] = helpers[index2]; |
| 691 |
- if (edgeTreeIterators[newindex2] != edgeTree->end()) { |
| 692 |
- edgeTreeIterators[newindex2]->index = newindex2; |
| 693 |
+ if (edgeTreeIterators[newindex2] != edgeTree->back()) { |
| 694 |
+ edgeTreeIterators[newindex2]->get().index = newindex2; |
| 695 |
} |
| 696 |
} |
| 697 |
|
| 698 |
@@ -1830,13 +1830,13 @@ int TPPLPartition::TriangulateMonotone(TPPLPoly *inPoly, TPPLPolyList *triangles |
| 699 |
|
| 700 |
int TPPLPartition::Triangulate_MONO(TPPLPolyList *inpolys, TPPLPolyList *triangles) { |
| 701 |
TPPLPolyList monotone; |
| 702 |
- TPPLPolyList::iterator iter; |
| 703 |
+ TPPLPolyList::Element *iter; |
| 704 |
|
| 705 |
if (!MonotonePartition(inpolys, &monotone)) { |
| 706 |
return 0; |
| 707 |
} |
| 708 |
- for (iter = monotone.begin(); iter != monotone.end(); iter++) { |
| 709 |
- if (!TriangulateMonotone(&(*iter), triangles)) { |
| 710 |
+ for (iter = monotone.front(); iter; iter = iter->next()) { |
| 711 |
+ if (!TriangulateMonotone(&(iter->get()), triangles)) { |
| 712 |
return 0; |
| 713 |
} |
| 714 |
} |
| 715 |
diff --git a/thirdparty/misc/polypartition.h b/thirdparty/misc/polypartition.h |
| 716 |
index e1df6cef9e..c084bdf74c 100644 |
| 717 |
--- a/thirdparty/misc/polypartition.h |
| 718 |
+++ b/thirdparty/misc/polypartition.h |
| 719 |
@@ -24,8 +24,9 @@ |
| 720 |
#ifndef POLYPARTITION_H |
| 721 |
#define POLYPARTITION_H |
| 722 |
|
| 723 |
-#include <list> |
| 724 |
-#include <set> |
| 725 |
+#include "core/math/vector2.h" |
| 726 |
+#include "core/templates/list.h" |
| 727 |
+#include "core/templates/rb_set.h" |
| 728 |
|
| 729 |
typedef double tppl_float; |
| 730 |
|
| 731 |
@@ -44,49 +45,7 @@ enum TPPLVertexType { |
| 732 |
}; |
| 733 |
|
| 734 |
// 2D point structure. |
| 735 |
-struct TPPLPoint { |
| 736 |
- tppl_float x; |
| 737 |
- tppl_float y; |
| 738 |
- // User-specified vertex identifier. Note that this isn't used internally |
| 739 |
- // by the library, but will be faithfully copied around. |
| 740 |
- int id; |
| 741 |
- |
| 742 |
- TPPLPoint operator+(const TPPLPoint &p) const { |
| 743 |
- TPPLPoint r; |
| 744 |
- r.x = x + p.x; |
| 745 |
- r.y = y + p.y; |
| 746 |
- return r; |
| 747 |
- } |
| 748 |
- |
| 749 |
- TPPLPoint operator-(const TPPLPoint &p) const { |
| 750 |
- TPPLPoint r; |
| 751 |
- r.x = x - p.x; |
| 752 |
- r.y = y - p.y; |
| 753 |
- return r; |
| 754 |
- } |
| 755 |
- |
| 756 |
- TPPLPoint operator*(const tppl_float f) const { |
| 757 |
- TPPLPoint r; |
| 758 |
- r.x = x * f; |
| 759 |
- r.y = y * f; |
| 760 |
- return r; |
| 761 |
- } |
| 762 |
- |
| 763 |
- TPPLPoint operator/(const tppl_float f) const { |
| 764 |
- TPPLPoint r; |
| 765 |
- r.x = x / f; |
| 766 |
- r.y = y / f; |
| 767 |
- return r; |
| 768 |
- } |
| 769 |
- |
| 770 |
- bool operator==(const TPPLPoint &p) const { |
| 771 |
- return ((x == p.x) && (y == p.y)); |
| 772 |
- } |
| 773 |
- |
| 774 |
- bool operator!=(const TPPLPoint &p) const { |
| 775 |
- return !((x == p.x) && (y == p.y)); |
| 776 |
- } |
| 777 |
-}; |
| 778 |
+typedef Vector2 TPPLPoint; |
| 779 |
|
| 780 |
// Polygon implemented as an array of points with a "hole" flag. |
| 781 |
class TPPLPoly { |
| 782 |
@@ -168,9 +127,9 @@ class TPPLPoly { |
| 783 |
}; |
| 784 |
|
| 785 |
#ifdef TPPL_ALLOCATOR |
| 786 |
-typedef std::list<TPPLPoly, TPPL_ALLOCATOR(TPPLPoly)> TPPLPolyList; |
| 787 |
+typedef List<TPPLPoly, TPPL_ALLOCATOR(TPPLPoly)> TPPLPolyList; |
| 788 |
#else |
| 789 |
-typedef std::list<TPPLPoly> TPPLPolyList; |
| 790 |
+typedef List<TPPLPoly> TPPLPolyList; |
| 791 |
#endif |
| 792 |
|
| 793 |
class TPPLPartition { |
| 794 |
@@ -209,9 +168,9 @@ public: |
| 795 |
}; |
| 796 |
|
| 797 |
#ifdef TPPL_ALLOCATOR |
| 798 |
- typedef std::list<Diagonal, TPPL_ALLOCATOR(Diagonal)> DiagonalList; |
| 799 |
+ typedef List<Diagonal, TPPL_ALLOCATOR(Diagonal)> DiagonalList; |
| 800 |
#else |
| 801 |
- typedef std::list<Diagonal> DiagonalList; |
| 802 |
+ typedef List<Diagonal> DiagonalList; |
| 803 |
#endif |
| 804 |
|
| 805 |
// Dynamic programming state for minimum-weight triangulation. |
| 806 |
@@ -265,8 +224,8 @@ public: |
| 807 |
// Helper functions for MonotonePartition. |
| 808 |
bool Below(TPPLPoint &p1, TPPLPoint &p2); |
| 809 |
void AddDiagonal(MonotoneVertex *vertices, long *numvertices, long index1, long index2, |
| 810 |
- TPPLVertexType *vertextypes, std::set<ScanLineEdge>::iterator *edgeTreeIterators, |
| 811 |
- std::set<ScanLineEdge> *edgeTree, long *helpers); |
| 812 |
+ TPPLVertexType *vertextypes, RBSet<ScanLineEdge>::Element **edgeTreeIterators, |
| 813 |
+ RBSet<ScanLineEdge> *edgeTree, long *helpers); |
| 814 |
|
| 815 |
// Triangulates a monotone polygon, used in Triangulate_MONO. |
| 816 |
int TriangulateMonotone(TPPLPoly *inPoly, TPPLPolyList *triangles); |