EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
EBGeometry_BVHRefit.hpp File Reference

Refitting a PackedBVH where its pool is: one tree level at a time on a device, the host's sweep otherwise. More...

#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <vector>
#include "EBGeometry_GPUTransform.hpp"
#include "EBGeometry_Macros.hpp"
#include "EBGeometry_PODVector.hpp"
#include "EBGeometry_PackedBVH.hpp"
#include "EBGeometry_Pool.hpp"
#include "EBGeometry_BVHRefitImplem.hpp"
Include dependency graph for EBGeometry_BVHRefit.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EBGeometry::BVH::RefitSchedule
 A PackedBVH's nodes grouped by tree depth, deepest level first: the order in which BVH::refit() refits them, one level at a time. More...
 

Namespaces

namespace  EBGeometry
 Namespace containing all of EBGeometry's functionality.
 
namespace  EBGeometry::BVH
 Namespace for various bounding volume hierarchy (BVH) functionalities.
 
namespace  EBGeometry::BVH::RefitDetail
 Implementation details of refit() and RefitSchedule (EBGeometry_BVHRefit.hpp).
 

Functions

template<class T , class P , size_t K, class BVConstructor >
void EBGeometry::BVH::refit (Pool &a_pool, const PackedBVH< T, P, K > &a_bvh, const RefitSchedule &a_schedule, const BVConstructor &a_bvConstructor)
 Refit the copy of a_bvh that lives in a_pool, after its primitives have moved: every box becomes the union of what it encloses again, with each primitive's current box from a_bvConstructor.
 

Detailed Description

Refitting a PackedBVH where its pool is: one tree level at a time on a device, the host's sweep otherwise.

PackedBVH::refit() is one sequential sweep, which on a device would run on a single thread. BVH::refit() refits the same boxes a level at a time, deepest first, one thread per node, through GPU::parallelFor(): within a level every node is independent. The order it needs, the nodes grouped by depth, is computed once on the host by BVH::RefitSchedule, since it depends only on the tree's shape, which a refit never changes.

Author
Robert Marskar