aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/route_obstacles.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/fparkan-runtime/src/route_obstacles.rs')
-rw-r--r--crates/fparkan-runtime/src/route_obstacles.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/route_obstacles.rs b/crates/fparkan-runtime/src/route_obstacles.rs
index 1ee46c7c..eb29b680 100644
--- a/crates/fparkan-runtime/src/route_obstacles.rs
+++ b/crates/fparkan-runtime/src/route_obstacles.rs
@@ -64,8 +64,17 @@ impl BuildingFootprints {
}
pub(super) fn with_clearance(&self, radius: f32) -> Vec<Footprint> {
+ self.with_clearance_except(radius, None)
+ }
+
+ pub(super) fn with_clearance_except(
+ &self,
+ radius: f32,
+ skip: Option<ObjectHandle>,
+ ) -> Vec<Footprint> {
self.entries
.values()
+ .filter(|(handle, _, _)| Some(*handle) != skip)
.filter_map(|(_, _, footprint)| footprint.map(|bounds| bounds.expanded(radius)))
.collect()
}