![]() |
Project
|
#include <O2BVHAssembly.h>
Inherits TGeoShapeAssembly.
Public Member Functions | |
| O2BVHAssembly () | |
| O2BVHAssembly (TGeoVolumeAssembly *volume) | |
| Build over the daughters volume has now; later daughters trigger a lazy rebuild. | |
| ~O2BVHAssembly () override | |
| O2BVHAssembly (const O2BVHAssembly &)=delete | |
| O2BVHAssembly & | operator= (const O2BVHAssembly &)=delete |
| void | BuildBVH () |
| (Re)build the acceleration structure from the volume's current daughter list. | |
| int | GetNbuilt () const |
| Number of daughter placements the current BVH covers, -1 if it was never built. | |
| size_t | GetBVHMemory () const |
| Bytes held by the BVH nodes and the primitive-index permutation. | |
| Bool_t | Contains (const Double_t *point) const override |
| Contains. | |
| Double_t | DistFromOutside (const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override |
| DistFromOutside – daughters are queried with the fixed query bound, so the answer is visit-order independent. | |
| Double_t | Safety (const Double_t *point, Bool_t in=kTRUE) const override |
| Safety – from inside as ROOT; from outside a nearest-daughter descent of the BVH. | |
| Bool_t | Contains_Loop (const Double_t *point) const |
| Double_t | DistFromOutside_Loop (const Double_t *point, const Double_t *dir, Double_t step=TGeoShape::Big()) const |
| Double_t | Safety_Loop (const Double_t *point, Bool_t in=kTRUE) const |
Static Public Member Functions | |
| static O2BVHAssembly * | MakeBVHAssembly (TGeoVolumeAssembly *volume) |
| Replace volume's shape by an O2BVHAssembly and return it. | |
A BVH-accelerated drop-in for ROOT's TGeoShapeAssembly: a BVH over the daughter boxes answers Contains, DistFromOutside and Safety. Install it with MakeBVHAssembly(volume) after TGeoManager::CloseGeometry(), or construct it on the volume and call SetShape. Each query has a _Loop twin over all daughters in index order; the lowest-indexed daughter wins ties, as in ROOT. Unlike ROOT, DistFromOutside also answers from outside the bounding box of a voxelized assembly.
Definition at line 30 of file O2BVHAssembly.h.
| O2BVHAssembly::O2BVHAssembly | ( | ) |
Definition at line 113 of file O2BVHAssembly.cxx.
|
explicit |
Build over the daughters volume has now; later daughters trigger a lazy rebuild.
Definition at line 115 of file O2BVHAssembly.cxx.
|
override |
Definition at line 122 of file O2BVHAssembly.cxx.
|
delete |
| void O2BVHAssembly::BuildBVH | ( | ) |
(Re)build the acceleration structure from the volume's current daughter list.
BuildBVH – one primitive per daughter: its box in the assembly frame, widened and rounded outward in float.
Definition at line 140 of file O2BVHAssembly.cxx.
|
override |
Contains.
Definition at line 227 of file O2BVHAssembly.cxx.
| Bool_t O2BVHAssembly::Contains_Loop | ( | const Double_t * | point | ) | const |
Definition at line 286 of file O2BVHAssembly.cxx.
|
override |
DistFromOutside – daughters are queried with the fixed query bound, so the answer is visit-order independent.
Definition at line 311 of file O2BVHAssembly.cxx.
| Double_t O2BVHAssembly::DistFromOutside_Loop | ( | const Double_t * | point, |
| const Double_t * | dir, | ||
| Double_t | step = TGeoShape::Big() |
||
| ) | const |
Definition at line 373 of file O2BVHAssembly.cxx.
| size_t O2BVHAssembly::GetBVHMemory | ( | ) | const |
Bytes held by the BVH nodes and the primitive-index permutation.
Definition at line 128 of file O2BVHAssembly.cxx.
|
inline |
Number of daughter placements the current BVH covers, -1 if it was never built.
Definition at line 44 of file O2BVHAssembly.h.
|
static |
Replace volume's shape by an O2BVHAssembly and return it.
MakeBVHAssembly.
Definition at line 481 of file O2BVHAssembly.cxx.
|
delete |
|
override |
Safety – from inside as ROOT; from outside a nearest-daughter descent of the BVH.
Definition at line 403 of file O2BVHAssembly.cxx.
| Double_t O2BVHAssembly::Safety_Loop | ( | const Double_t * | point, |
| Bool_t | in = kTRUE |
||
| ) | const |
Definition at line 461 of file O2BVHAssembly.cxx.