MCPcopy Create free account
hub / github.com/AngusJohnson/Clipper2 / RecursiveCheckOwners

Method RecursiveCheckOwners

CPP/Clipper2Lib/src/clipper.engine.cpp:2969–2992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2967 }
2968
2969 void ClipperBase::RecursiveCheckOwners(OutRec* outrec, PolyPath* polypath)
2970 {
2971 // pre-condition: outrec will have valid bounds
2972 // post-condition: if a valid path, outrec will have a polypath
2973
2974 if (outrec->polypath || outrec->bounds.IsEmpty()) return;
2975 while (outrec->owner)
2976 {
2977 if (outrec->owner->splits && CheckSplitOwner(outrec, outrec->owner->splits)) break;
2978 if (outrec->owner->pts && CheckBounds(outrec->owner) &&
2979 outrec->owner->bounds.Contains(outrec->bounds) &&
2980 Path2ContainsPath1(outrec->pts, outrec->owner->pts)) break;
2981 outrec->owner = outrec->owner->owner;
2982 }
2983
2984 if (outrec->owner)
2985 {
2986 if (!outrec->owner->polypath)
2987 RecursiveCheckOwners(outrec->owner, polypath);
2988 outrec->polypath = outrec->owner->polypath->AddChild(outrec->path);
2989 }
2990 else
2991 outrec->polypath = polypath->AddChild(outrec->path);
2992 }
2993
2994 void Clipper64::BuildPaths64(Paths64& solutionClosed, Paths64* solutionOpen)
2995 {

Callers

nothing calls this directly

Calls 4

Path2ContainsPath1Function · 0.70
IsEmptyMethod · 0.45
ContainsMethod · 0.45
AddChildMethod · 0.45

Tested by

no test coverage detected