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

Method BuildResult

TheForceEngine/TFE_Polygon/clipper.cpp:3199–3217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3197//------------------------------------------------------------------------------
3198
3199void Clipper::BuildResult(Paths &polys)
3200{
3201 polys.reserve(m_PolyOuts.size());
3202 for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
3203 {
3204 if (!m_PolyOuts[i]->Pts) continue;
3205 Path pg;
3206 OutPt* p = m_PolyOuts[i]->Pts->Prev;
3207 int cnt = PointCount(p);
3208 if (cnt < 2) continue;
3209 pg.reserve(cnt);
3210 for (int i = 0; i < cnt; ++i)
3211 {
3212 pg.push_back(p->Pt);
3213 p = p->Prev;
3214 }
3215 polys.push_back(pg);
3216 }
3217}
3218//------------------------------------------------------------------------------
3219
3220void Clipper::BuildResult2(PolyTree& polytree)

Callers

nothing calls this directly

Calls 4

PointCountFunction · 0.85
reserveMethod · 0.80
push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected