Initial version of smart auto placement intended to replace autocenter.

This commit is contained in:
tamasmeszaros
2019-01-22 17:50:33 +01:00
parent a85db038be
commit 4628ba5767
14 changed files with 793 additions and 122 deletions
@@ -36,11 +36,19 @@ public:
store_.clear();
store_.reserve(last-first);
packed_bins_.clear();
std::vector<Placer> placers;
placers.reserve(last-first);
// If the packed_items array is not empty we have to create as many
// placers as there are elements in packed bins and preload each item
// into the appropriate placer
for(ItemGroup& ig : packed_bins_) {
placers.emplace_back(bin);
placers.back().configure(pconfig);
placers.back().preload({ig.begin(), ig.end()});
}
std::copy(first, last, std::back_inserter(store_));
auto sortfunc = [](Item& i1, Item& i2) {