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

Function Path2ContainsPath1

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

Source from the content-addressed store, hash-verified

574 }
575
576 inline bool Path2ContainsPath1(OutPt* op1, OutPt* op2)
577 {
578 // this function accommodates rounding errors that
579 // can cause path micro intersections
580 PointInPolygonResult pip = PointInPolygonResult::IsOn;
581 OutPt* op = op1;
582 do {
583 switch (PointInOpPolygon(op->pt, op2))
584 {
585 case PointInPolygonResult::IsOutside:
586 if (pip == PointInPolygonResult::IsOutside) return false;
587 pip = PointInPolygonResult::IsOutside;
588 break;
589 case PointInPolygonResult::IsInside:
590 if (pip == PointInPolygonResult::IsInside) return true;
591 pip = PointInPolygonResult::IsInside;
592 break;
593 default: break;
594 }
595 op = op->next;
596 } while (op != op1);
597 // result unclear, so try again using cleaned paths
598 return Path2ContainsPath1(GetCleanPath(op1), GetCleanPath(op2)); // (#973)
599 }
600
601 void AddLocMin(LocalMinimaList& list,
602 Vertex& vert, PathType polytype, bool is_open)

Callers 4

DoSplitOpMethod · 0.70
ProcessHorzJoinsMethod · 0.70
CheckSplitOwnerMethod · 0.70
RecursiveCheckOwnersMethod · 0.70

Calls 2

PointInOpPolygonFunction · 0.85
GetCleanPathFunction · 0.85

Tested by

no test coverage detected