MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / FixupOutPolyline

Method FixupOutPolyline

TheForceEngine/TFE_Polygon/clipper.cpp:3116–3140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3114//------------------------------------------------------------------------------
3115
3116void Clipper::FixupOutPolyline(OutRec &outrec)
3117{
3118 OutPt *pp = outrec.Pts;
3119 OutPt *lastPP = pp->Prev;
3120 while (pp != lastPP)
3121 {
3122 pp = pp->Next;
3123 if (pp->Pt == pp->Prev->Pt)
3124 {
3125 if (pp == lastPP) lastPP = pp->Prev;
3126 OutPt *tmpPP = pp->Prev;
3127 tmpPP->Next = pp->Next;
3128 pp->Next->Prev = tmpPP;
3129 delete pp;
3130 pp = tmpPP;
3131 }
3132 }
3133
3134 if (pp == pp->Prev)
3135 {
3136 DisposeOutPts(pp);
3137 outrec.Pts = 0;
3138 return;
3139 }
3140}
3141//------------------------------------------------------------------------------
3142
3143void Clipper::FixupOutPolygon(OutRec &outrec)

Callers

nothing calls this directly

Calls 1

DisposeOutPtsFunction · 0.85

Tested by

no test coverage detected