Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
bvh::v2::SplitHeuristic< T > Class Template Reference

template<typename T>
class bvh::v2::SplitHeuristic< T >

Definition at line 12 of file split_heuristic.h.

Public Member Functions

BVH_ALWAYS_INLINE SplitHeuristic (size_t log_cluster_size=0, T cost_ratio=static_cast< T >(1.))
 Creates an SAH evaluator object, used by top-down builders to determine where to split.
 
template<size_t N>
BVH_ALWAYS_INLINEget_leaf_cost (size_t begin, size_t end, const BBox< T, N > &bbox) const
 
template<size_t N>
BVH_ALWAYS_INLINEget_non_split_cost (size_t begin, size_t end, const BBox< T, N > &bbox) const
 
BVH_ALWAYS_INLINE size_t get_prim_count (size_t size) const
 

Private Attributes

cost_ratio_
 
size_t log_cluster_size_
 
size_t prim_offset_
 

#include <bvh/v2/split_heuristic.h>

Constructor & Destructor Documentation

◆ SplitHeuristic()

template<typename T >
BVH_ALWAYS_INLINE bvh::v2::SplitHeuristic< T >::SplitHeuristic ( size_t  log_cluster_size = 0,
cost_ratio = static_cast<T>(1.) 
)
inline

Creates an SAH evaluator object, used by top-down builders to determine where to split.

The two parameters are the log of the size of primitive clusters in base 2, and the ratio of the cost of intersecting a node (a ray-box intersection) over the cost of intersecting a primitive.

Definition at line 18 of file split_heuristic.h.

Member Function Documentation

◆ get_leaf_cost()

template<typename T >
template<size_t N>
BVH_ALWAYS_INLINE T bvh::v2::SplitHeuristic< T >::get_leaf_cost ( size_t  begin,
size_t  end,
const BBox< T, N > &  bbox 
) const
inline

Definition at line 31 of file split_heuristic.h.

◆ get_non_split_cost()

template<typename T >
template<size_t N>
BVH_ALWAYS_INLINE T bvh::v2::SplitHeuristic< T >::get_non_split_cost ( size_t  begin,
size_t  end,
const BBox< T, N > &  bbox 
) const
inline

Definition at line 36 of file split_heuristic.h.

◆ get_prim_count()

template<typename T >
BVH_ALWAYS_INLINE size_t bvh::v2::SplitHeuristic< T >::get_prim_count ( size_t  size) const
inline

Definition at line 26 of file split_heuristic.h.

Member Data Documentation

◆ cost_ratio_

template<typename T >
T bvh::v2::SplitHeuristic< T >::cost_ratio_
private

Definition at line 43 of file split_heuristic.h.

◆ log_cluster_size_

template<typename T >
size_t bvh::v2::SplitHeuristic< T >::log_cluster_size_
private

Definition at line 41 of file split_heuristic.h.

◆ prim_offset_

template<typename T >
size_t bvh::v2::SplitHeuristic< T >::prim_offset_
private

Definition at line 42 of file split_heuristic.h.

  • geom/geom/inc/bvh/v2/split_heuristic.h