Implementation of the TGeoTessellated navigation functionality #21095
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull request:
Introduce navigation functionality for TGeoTessellated using triangle-ray-intersection tests.
This is the navigation functionality as it is implemented for the historically grown, non-ROOT-implementation TGeoArbN.
To improve usability in VMC based simulations of meshes with high triangle count (>500), partitioning structures in the form of an Octree, as well as a BVH (using the bvh library included in root), are added. We found so far that the choice of partitioning structures seems to be mesh dependent (often BVH is best, however, for some particularly large meshes (~250k triangles) the Octree seems better). However, our BVH usage may be suboptimal.
As Dr. Sandro Wenzel opened a pull-request for his navigation implementation Add BVH-based navigation functions to TGeoTessellated #21045, we wanted to "offer" our implementation in parallel. Maybe something can be learned from it.
Tested using TGeoChecker CheckShape functionality (on a box mesh, the teddy.obj in tutorials/visualisation/geom/ contains triangle-intersections and hence is faulty), as well as by computing navigation information for 100 million random points for a box mesh and comparing results with TGeoBBox as quick test that no errors were introduced while translating our TGeoArbN to ROOT's TGeoTessellated.
Dr. Sandro Wenzel's 'rayTriangle' implementation was used to improve own implementation of Triangle ray intersection in TGeoTriangle.
Still required changes:
to compile for me, otherwise issues with std.span and modules