EBGeometry  1.0
Classes | Namespaces | Typedefs | Enumerations | Variables
EBGeometry_BVH.hpp File Reference

Declaration of a bounding volume hierarchy (BVH) class. More...

#include <memory>
#include <vector>
#include <array>
#include <functional>
#include <queue>
#include "EBGeometry_Vec.hpp"
#include "EBGeometry_SFC.hpp"
#include "EBGeometry_NamespaceHeader.hpp"
#include "EBGeometry_NamespaceFooter.hpp"
#include "EBGeometry_BVHImplem.hpp"
Include dependency graph for EBGeometry_BVH.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BVH::NodeT< T, P, BV, K >
 Forward declare the BVH node since it is needed for the polymorphic lambdas. More...
 
class  BVH::LinearNodeT< T, P, BV, K >
 Forward declare linear node class. More...
 
class  BVH::LinearBVH< T, P, BV, K >
 Forward declare linear BVH class. More...
 

Namespaces

 BVH
 Namespace for various bounding volume hierarchy (BVH) functionality.
 

Typedefs

template<class P >
using BVH::PrimitiveListT = std::vector< std::shared_ptr< const P > >
 List of primitives. More...
 
template<class P , class BV >
using BVH::PrimAndBV = std::pair< std::shared_ptr< const P >, BV >
 Alias for a list geometric primitive and BV.
 
template<class P , class BV >
using BVH::PrimAndBVListT = std::vector< PrimAndBV< P, BV > >
 List of primitives and their bounding volumes. More...
 
template<class P , class BV , size_t K>
using BVH::PartitionerT = std::function< std::array< PrimAndBVListT< P, BV >, K >(const PrimAndBVListT< P, BV > &a_primsAndBVs)>
 Polymorphic partitioner for splitting a list of primitives and BVs into K new subsets. More...
 
template<class T , class P , class BV , size_t K>
using BVH::StopFunctionT = std::function< bool(const NodeT< T, P, BV, K > &a_node)>
 Stop function for deciding when a BVH node can't be divided into sub-volumes. More...
 
template<class P >
using BVH::Updater = std::function< void(const PrimitiveListT< P > &a_primitives)>
 Updater for tree traversal. More...
 
template<class NodeType , class Meta >
using BVH::Visiter = std::function< bool(const NodeType &a_node, const Meta &a_meta)>
 Visiter pattern for LinearBVH::traverse. Must return true if we should visit the node and false otherwise. More...
 
template<class NodeType , class Meta , size_t K>
using BVH::Sorter = std::function< void(std::array< std::pair< std::shared_ptr< const NodeType >, Meta >, K > &a_children)>
 Sorting criterion for which child node to visit first. This takes an input list of child nodes and sorts it. When further into the sub-tree, the first node is investigated first, then the second, etc. The Meta template parameter is a door left open to the user for attaching additional data to the sorter/visiter pattern.
 
template<class NodeType , class Meta >
using BVH::MetaUpdater = std::function< Meta(const NodeType &a_node)>
 Updater for when user wants to add some meta-data to his BVH traversal.
 

Enumerations

enum class  BVH::Build { TopDown , Morton , Nested }
 Enum for specifying whether or not the construction is top-down or bottom-up.
 

Variables

template<class X , size_t K>
auto BVH::equalCounts
 Function for splitting a vector of some size into K almost-equal chunks. This is a utility function. More...
 
template<class T , class P , class BV , size_t K>
auto BVH::PrimitiveCentroidPartitioner
 Simple partitioner which sorts the primitives based on their centroids, and then splits into K pieces. More...
 
template<class T , class P , class BV , size_t K>
auto BVH::BVCentroidPartitioner
 Simple partitioner which sorts the BVs based on their bounding volume centroids, and then splits into K pieces. More...
 
template<class T , class P , class BV , size_t K>
auto BVH::DefaultStopFunction
 Simple stop function which ends the recursion when there aren't enough primitives in the node. More...
 

Detailed Description

Declaration of a bounding volume hierarchy (BVH) class.

Author
Robert Marskar