diff --git a/Core/src/Geometry/TrackingVolume.cpp b/Core/src/Geometry/TrackingVolume.cpp index bbe9b60fc98..6d3880bd4db 100644 --- a/Core/src/Geometry/TrackingVolume.cpp +++ b/Core/src/Geometry/TrackingVolume.cpp @@ -96,6 +96,13 @@ const TrackingVolume* TrackingVolume::lowestTrackingVolume( } } + // @TODO: Abstract this into an accelerateable structure + for (const auto& volume : volumes()) { + if (volume.inside(position, tol)) { + return volume.lowestTrackingVolume(gctx, position, tol); + } + } + // there is no lower sub structure return this; }