Replies: 1 comment
-
Good idea! I suggest that the bounding box numerically lies outside the geometry, i.e., at least a floating point epsilon away from the geometry per se (ideally defied through a Bounding boxes would bevery useful for partitioning the geometry in kd-trees or other space segmentation schemes to speed up ray tracing. I reckon this is required for efficient transport in complex triangular meshes, in particular. Thinking out loud:
|
Beta Was this translation helpful? Give feedback.
-
This is a good first issue for someone looking to do some C++ coding and contribute to EGSnrc. If you decide to give it a go, comment below so we know you are working on it, and feel free to ask for help.
The idea is to add bounding boxes to the egs++ geometries, to facilitate checks on whether two geometries might intersect, among other things. The egs++ geometries are found in
HEN_HOUSE/egs++/geometries
.Here is my idea how it might be implemented:
For each geometry, add a new array
boundingBox
that will contain the min/max along each dimension. When the geometry is initialized, calculate the bounding box (might be tricky for some geometries). If it is a composite geometry (like a CD), use the bounding boxes of the components to estimate it. Add a newgetBoundingBox()
function for each geometry.Beta Was this translation helpful? Give feedback.
All reactions