MCPcopy Create free account
hub / github.com/axmolengine/axmol / AddLocalMinPoly

Method AddLocalMinPoly

3rdparty/clipper2/src/clipper.engine.cpp:1332–1377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1330
1331
1332 OutPt* ClipperBase::AddLocalMinPoly(Active& e1, Active& e2,
1333 const Point64& pt, bool is_new)
1334 {
1335 OutRec* outrec = NewOutRec();
1336 e1.outrec = outrec;
1337 e2.outrec = outrec;
1338
1339 if (IsOpen(e1))
1340 {
1341 outrec->owner = nullptr;
1342 outrec->is_open = true;
1343 if (e1.wind_dx > 0)
1344 SetSides(*outrec, e1, e2);
1345 else
1346 SetSides(*outrec, e2, e1);
1347 }
1348 else
1349 {
1350 Active* prevHotEdge = GetPrevHotEdge(e1);
1351 //e.windDx is the winding direction of the **input** paths
1352 //and unrelated to the winding direction of output polygons.
1353 //Output orientation is determined by e.outrec.frontE which is
1354 //the ascending edge (see AddLocalMinPoly).
1355 if (prevHotEdge)
1356 {
1357 if (using_polytree_)
1358 SetOwner(outrec, prevHotEdge->outrec);
1359 if (OutrecIsAscending(prevHotEdge) == is_new)
1360 SetSides(*outrec, e2, e1);
1361 else
1362 SetSides(*outrec, e1, e2);
1363 }
1364 else
1365 {
1366 outrec->owner = nullptr;
1367 if (is_new)
1368 SetSides(*outrec, e1, e2);
1369 else
1370 SetSides(*outrec, e2, e1);
1371 }
1372 }
1373
1374 OutPt* op = new OutPt(pt, outrec);
1375 outrec->pts = op;
1376 return op;
1377 }
1378
1379
1380 OutPt* ClipperBase::AddLocalMaxPoly(Active& e1, Active& e2, const Point64& pt)

Callers

nothing calls this directly

Calls 5

IsOpenFunction · 0.85
SetSidesFunction · 0.85
GetPrevHotEdgeFunction · 0.85
SetOwnerFunction · 0.85
OutrecIsAscendingFunction · 0.85

Tested by

no test coverage detected