MCPcopy Create free account
hub / github.com/cinder/Cinder / AddPolyNodeToPaths

Function AddPolyNodeToPaths

blocks/Clipper/src/clipper.cpp:4562–4572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4560enum NodeType {ntAny, ntOpen, ntClosed};
4561
4562void AddPolyNodeToPaths(const PolyNode& polynode, NodeType nodetype, Paths& paths)
4563{
4564 bool match = true;
4565 if (nodetype == ntClosed) match = !polynode.IsOpen();
4566 else if (nodetype == ntOpen) return;
4567
4568 if (!polynode.Contour.empty() && match)
4569 paths.push_back(polynode.Contour);
4570 for (int i = 0; i < polynode.ChildCount(); ++i)
4571 AddPolyNodeToPaths(*polynode.Childs[i], nodetype, paths);
4572}
4573//------------------------------------------------------------------------------
4574
4575void PolyTreeToPaths(const PolyTree& polytree, Paths& paths)

Callers 2

PolyTreeToPathsFunction · 0.85
ClosedPathsFromPolyTreeFunction · 0.85

Calls 4

IsOpenMethod · 0.80
ChildCountMethod · 0.80
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected