-
Notifications
You must be signed in to change notification settings - Fork 53
Description
We currently use an early abort if the central axis of the beam does not intersect with the beam, based on the axis-aligned bounding box (AABB) of the scene, see
helios/src/scanner/detector/FullWaveformPulseRunnable.cpp
Lines 56 to 69 in 7ea62bd
// Early abort if central axis of the beam does not intersect with the scene: | |
vector<double> const tMinMax = | |
scene.getAABB()->getRayIntersection(pulse.getOriginRef(), beamDir); | |
#if DATA_ANALYTICS >= 2 | |
HDA_GV.incrementGeneratedRaysBeforeEarlyAbortCount(); | |
#endif | |
if (checkEarlyAbort(tMinMax)) { | |
logging::DEBUG("Early abort - beam does not intersect with the scene"); | |
scanner->setLastPulseWasHit(false, pulse.getDeviceIndex()); | |
return; | |
} | |
#if DATA_ANALYTICS >= 2 | |
HDA_GV.incrementGeneratedRaysAfterEarlyAbortCount(); | |
#endif |
The AABB is calculated based on the static scene parts, i.e., without evaluating dynamic motions.
For dynamic scenes, the swept bounding box will often be larger than the bounding box of the initial static scene. With the current implementation, simulations of dynamic scenes are therefore restricted to the initial scene bounding box, potentially missing out large parts of the actual dynamic scene. Therefore, we should calculate the swept bounding box and use this for the early abort check in case of dynamic scenes.
In the meantime, as a workaround, users have to add some scene part (sphere/cube) as bounding volume around their area of interest to ensure that no pulses get lost due to the early abort.
@wialb Feel free to add in case I forgot sth.