![]() |
Shamrock 2025.10.0
Astrophysical Code
|
A Compressed Leaf Bounding Volume Hierarchy (CLBVH) for neighborhood queries. More...
#include <shamtree/include/shamtree/CompressedLeafBVH.hpp>
Collaboration diagram for shamtree::CompressedLeafBVH< Tmorton, Tvec, dim >:Public Member Functions | |
| u32 | get_total_cell_count () |
| Get internal cell count. | |
| u32 | get_internal_cell_count () |
| Get internal cell count. | |
| bool | is_root_leaf () const |
| is the root a leaf ? | |
| u32 | get_leaf_cell_count () |
| Get leaf cell count. | |
| CompressedLeafBVH (MortonReducedSet< Tmorton, Tvec, dim > &&reduced_morton_set, KarrasRadixTree &&structure, KarrasRadixTreeAABB< Tvec > &&aabbs) | |
| Construct a new CompressedLeafBVH from a MortonReducedSet, a KarrasRadixTree, and a KarrasRadixTreeAABB. | |
| bool | is_empty () const |
| is the BVH empty ? | |
| void | rebuild_from_positions (sham::DeviceBuffer< Tvec > &positions, const shammath::AABB< Tvec > &bounding_box, u32 compression_level) |
| rebuild the BVH from the given positions | |
| void | rebuild_from_positions (sham::DeviceBuffer< Tvec > &positions, u32 obj_cnt, const shammath::AABB< Tvec > &bounding_box, u32 compression_level) |
| rebuild the BVH from the given positions | |
| void | rebuild_from_position_range (sham::DeviceBuffer< Tvec > &min, sham::DeviceBuffer< Tvec > &max, u32 obj_cnt, shammath::AABB< Tvec > &bounding_box, u32 compression_level) |
| void | rebuild_from_position_range (sham::DeviceBuffer< Tvec > &min, sham::DeviceBuffer< Tvec > &max, shammath::AABB< Tvec > &bounding_box, u32 compression_level) |
| shamtree::CLBVHTraverser< Tmorton, Tvec, dim > | get_traverser () const |
| shamtree::CLBVHTraverserHost< Tmorton, Tvec, dim > | get_traverser_host () const |
| shamtree::CLBVHObjectIterator< Tmorton, Tvec, dim > | get_object_iterator () const |
| Retrieves an iterator for traversing objects in the BVH. | |
| shamtree::CLBVHObjectIteratorHost< Tmorton, Tvec, dim > | get_object_iterator_host () const |
| CellIterator | get_cell_iterator () const |
| CellIteratorHost | get_cell_iterator_host () const |
Static Public Member Functions | |
| static CompressedLeafBVH | make_empty (sham::DeviceScheduler_ptr dev_sched) |
| make an empty BVH | |
Public Attributes | |
| MortonReducedSet< Tmorton, Tvec, dim > | reduced_morton_set |
| The reduced set of Morton codes. | |
| KarrasRadixTree | structure |
| The tree structure. | |
| KarrasRadixTreeAABB< Tvec > | aabbs |
| The bounding box of the tree cells. | |
A Compressed Leaf Bounding Volume Hierarchy (CLBVH) for neighborhood queries.
A Compressed Leaf Bounding Volume Hierarchy (CLBVH) is a hierarchical data structure used for efficient collision detection. It is composed of a MortonReducedSet to store the reduced set of Morton codes (Compressed aspect of the tree), a KarrasRadixTree to represent the tree structure, and a KarrasRadixTreeAABB to store the bounding boxes of the tree cells.
| Tmorton | The type used to represent the Morton codes. |
| Tvec | The type used to represent the 3D vector positions. |
| dim | The number of dimensions (3 for 3D). |
Definition at line 46 of file CompressedLeafBVH.hpp.
|
inline |
Construct a new CompressedLeafBVH from a MortonReducedSet, a KarrasRadixTree, and a KarrasRadixTreeAABB.
| [in] | reduced_morton_set | the MortonReducedSet to take ownership of |
| [in] | structure | the KarrasRadixTree to take ownership of |
| [in] | aabbs | the KarrasRadixTreeAABB to take ownership of |
Definition at line 84 of file CompressedLeafBVH.hpp.
|
inline |
Definition at line 168 of file CompressedLeafBVH.hpp.
|
inline |
Definition at line 173 of file CompressedLeafBVH.hpp.
|
inline |
Get internal cell count.
Definition at line 59 of file CompressedLeafBVH.hpp.
Here is the call graph for this function:
|
inline |
Get leaf cell count.
Definition at line 65 of file CompressedLeafBVH.hpp.
Here is the call graph for this function:
|
inline |
Retrieves an iterator for traversing objects in the BVH.
This function returns a CLBVHObjectIterator configured to traverse the objects in the compressed leaf BVH. The iterator is initialized using the cell iterator from the reduced Morton set, the structure traverser from the Karras Radix Tree structure, and the minimum and maximum AABB buffers.
Definition at line 160 of file CompressedLeafBVH.hpp.
|
inline |
Definition at line 164 of file CompressedLeafBVH.hpp.
|
inline |
Get internal cell count.
Definition at line 56 of file CompressedLeafBVH.hpp.
|
inline |
Definition at line 138 of file CompressedLeafBVH.hpp.
|
inline |
Definition at line 142 of file CompressedLeafBVH.hpp.
|
inline |
is the BVH empty ?
Definition at line 97 of file CompressedLeafBVH.hpp.
|
inline |
is the root a leaf ?
Definition at line 62 of file CompressedLeafBVH.hpp.
Here is the call graph for this function:
|
static |
make an empty BVH
Definition at line 22 of file CompressedLeafBVH.cpp.
| void shamtree::CompressedLeafBVH< Tmorton, Tvec, dim >::rebuild_from_position_range | ( | sham::DeviceBuffer< Tvec > & | min, |
| sham::DeviceBuffer< Tvec > & | max, | ||
| shammath::AABB< Tvec > & | bounding_box, | ||
| u32 | compression_level | ||
| ) |
Definition at line 126 of file CompressedLeafBVH.cpp.
| void shamtree::CompressedLeafBVH< Tmorton, Tvec, dim >::rebuild_from_position_range | ( | sham::DeviceBuffer< Tvec > & | min, |
| sham::DeviceBuffer< Tvec > & | max, | ||
| u32 | obj_cnt, | ||
| shammath::AABB< Tvec > & | bounding_box, | ||
| u32 | compression_level | ||
| ) |
Definition at line 98 of file CompressedLeafBVH.cpp.
| void shamtree::CompressedLeafBVH< Tmorton, Tvec, dim >::rebuild_from_positions | ( | sham::DeviceBuffer< Tvec > & | positions, |
| const shammath::AABB< Tvec > & | bounding_box, | ||
| u32 | compression_level | ||
| ) |
rebuild the BVH from the given positions
| [in] | positions | the positions of the particles |
| [in] | bounding_box | the bounding box of the particles |
| [in] | compression_level | the compression level of the BVH |
Definition at line 118 of file CompressedLeafBVH.cpp.
Here is the call graph for this function:| void shamtree::CompressedLeafBVH< Tmorton, Tvec, dim >::rebuild_from_positions | ( | sham::DeviceBuffer< Tvec > & | positions, |
| u32 | obj_cnt, | ||
| const shammath::AABB< Tvec > & | bounding_box, | ||
| u32 | compression_level | ||
| ) |
rebuild the BVH from the given positions
| [in] | positions | the positions of the particles |
| [in] | obj_cnt | the number of particles |
| [in] | bounding_box | the bounding box of the particles |
| [in] | compression_level | the compression level of the BVH |
Definition at line 79 of file CompressedLeafBVH.cpp.
Here is the call graph for this function:| KarrasRadixTreeAABB<Tvec> shamtree::CompressedLeafBVH< Tmorton, Tvec, dim >::aabbs |
The bounding box of the tree cells.
Definition at line 74 of file CompressedLeafBVH.hpp.
| MortonReducedSet<Tmorton, Tvec, dim> shamtree::CompressedLeafBVH< Tmorton, Tvec, dim >::reduced_morton_set |
The reduced set of Morton codes.
Definition at line 68 of file CompressedLeafBVH.hpp.
| KarrasRadixTree shamtree::CompressedLeafBVH< Tmorton, Tvec, dim >::structure |
The tree structure.
Definition at line 71 of file CompressedLeafBVH.hpp.