Skip to content

Commit

Permalink
VOXEDIT: optimized region size reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Feb 23, 2025
1 parent 23c006c commit 7450c3c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tools/voxedit/modules/voxedit-util/SceneManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,10 @@ void SceneManager::nodeResize(int nodeId, const voxel::Region &region) {
// we don't have to re-extract a mesh if only new empty voxels were added.
modified(nodeId, voxel::Region::InvalidRegion);
} else {
// TODO: assemble the 6 surroundings to optimize this for big volumes
modified(nodeId, newVolume->region());
const core::DynamicArray<voxel::Region> &regions = voxel::Region::subtract(oldRegion, region);
for (const voxel::Region &r : regions) {
modified(nodeId, r);
}
}

if (activeNode() == nodeId) {
Expand Down

0 comments on commit 7450c3c

Please sign in to comment.