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

Method BuildTree64

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

Source from the content-addressed store, hash-verified

3027 }
3028
3029 void Clipper64::BuildTree64(PolyPath64& polytree, Paths64& open_paths)
3030 {
3031 polytree.Clear();
3032 open_paths.resize(0);
3033 if (has_open_paths_)
3034 open_paths.reserve(outrec_list_.size());
3035
3036 // outrec_list_.size() is not static here because
3037 // CheckBounds below can indirectly add additional
3038 // OutRec (via FixOutRecPts & CleanCollinear)
3039 for (size_t i = 0; i < outrec_list_.size(); ++i)
3040 {
3041 OutRec* outrec = outrec_list_[i];
3042 if (!outrec || !outrec->pts) continue;
3043
3044 if (outrec->is_open)
3045 {
3046 Path64 path;
3047 if (BuildPath64(outrec->pts, reverse_solution_, true, path))
3048 open_paths.emplace_back(std::move(path));
3049 continue;
3050 }
3051
3052 if (CheckBounds(outrec))
3053 RecursiveCheckOwners(outrec, &polytree);
3054 }
3055 }
3056
3057 bool BuildPathD(OutPt* op, bool reverse, bool isOpen, PathD& path, double inv_scale)
3058 {

Callers

nothing calls this directly

Calls 2

BuildPath64Function · 0.85
ClearMethod · 0.45

Tested by

no test coverage detected