Refactored Lightning infill to get rid of unnecessary std::list and std::unordered_map, which was slow.

This commit is contained in:
Lukáš Hejl 2022-05-19 12:46:15 +02:00
parent 3e5272868d
commit 5205753787
3 changed files with 105 additions and 19 deletions

View file

@ -56,8 +56,9 @@ void Layer::generateNewTrees
// Until no more points need to be added to support all:
// Determine next point from tree/outline areas via distance-field
Point unsupported_location;
while (distance_field.tryGetNextPoint(&unsupported_location)) {
size_t unsupported_cell_idx = 0;
Point unsupported_location;
while (distance_field.tryGetNextPoint(&unsupported_location, &unsupported_cell_idx, unsupported_cell_idx)) {
throw_on_cancel_callback();
GroundingLocation grounding_loc = getBestGroundingLocation(
unsupported_location, current_outlines, current_outlines_bbox, outlines_locator, supporting_radius, wall_supporting_radius, tree_node_locator);