1#ifndef BVH_V2_SPLIT_HEURISTIC_H
2#define BVH_V2_SPLIT_HEURISTIC_H
32 return bbox.get_half_area() *
static_cast<T
>(
get_prim_count(end - begin));
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
BVH_ALWAYS_INLINE size_t get_prim_count(size_t size) const
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.
BVH_ALWAYS_INLINE T get_leaf_cost(size_t begin, size_t end, const BBox< T, N > &bbox) const
BVH_ALWAYS_INLINE T get_non_split_cost(size_t begin, size_t end, const BBox< T, N > &bbox) const
BVH_ALWAYS_INLINE constexpr T make_bitmask(size_t bits)
Generates a bitmask with the given number of bits.