Skip to content

Commit

Permalink
feat(geo): Add Gen3 hierarchy search to lowestTrackingVolume (#3818)
Browse files Browse the repository at this point in the history
This does not affect the existing Gen1 hierarchy search, and only kicks in when the Gen1 content is exhausted or not present at all. This is not optimal with many volumes, and I plan to develop a mechanism to implement volume local accelerated search.

Part of #3502
  • Loading branch information
paulgessinger authored Nov 18, 2024
1 parent 387d0ad commit c164dc0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Core/src/Geometry/TrackingVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c164dc0

Please sign in to comment.