Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
bvh::v2::TopDownSahBuilder< Node > Class Template Referenceabstract

template<typename Node>
class bvh::v2::TopDownSahBuilder< Node >

Base class for all SAH-based, top-down builders.

Definition at line 24 of file top_down_sah_builder.h.

Classes

struct  Config
 
struct  WorkItem
 

Protected Types

using BBox = bvh::v2::BBox< Scalar, Node::dimension >
 
using Scalar = typename Node::Scalar
 
using Vec = bvh::v2::Vec< Scalar, Node::dimension >
 

Protected Member Functions

BVH_ALWAYS_INLINE TopDownSahBuilder (std::span< const BBox > bboxes, std::span< const Vec > centers, const Config &config)
 
Bvh< Nodebuild ()
 
BVH_ALWAYS_INLINE BBox compute_bbox (size_t begin, size_t end) const
 
BVH_ALWAYS_INLINE const std::vector< size_t > & get_prim_ids () const
 
virtual std::vector< size_t > & get_prim_ids ()=0
 
virtual std::optional< size_t > try_split (const BBox &bbox, size_t begin, size_t end)=0
 

Protected Attributes

std::span< const BBoxbboxes_
 
std::span< const Veccenters_
 
const Configconfig_
 

#include <bvh/v2/top_down_sah_builder.h>

Inheritance diagram for bvh::v2::TopDownSahBuilder< Node >:
[legend]

Member Typedef Documentation

◆ BBox

template<typename Node >
using bvh::v2::TopDownSahBuilder< Node >::BBox = bvh::v2::BBox<Scalar, Node::dimension>
protected

Definition at line 28 of file top_down_sah_builder.h.

◆ Scalar

template<typename Node >
using bvh::v2::TopDownSahBuilder< Node >::Scalar = typename Node::Scalar
protected

Definition at line 26 of file top_down_sah_builder.h.

◆ Vec

template<typename Node >
using bvh::v2::TopDownSahBuilder< Node >::Vec = bvh::v2::Vec<Scalar, Node::dimension>
protected

Definition at line 27 of file top_down_sah_builder.h.

Constructor & Destructor Documentation

◆ TopDownSahBuilder()

template<typename Node >
BVH_ALWAYS_INLINE bvh::v2::TopDownSahBuilder< Node >::TopDownSahBuilder ( std::span< const BBox bboxes,
std::span< const Vec centers,
const Config config 
)
inlineprotected

Definition at line 59 of file top_down_sah_builder.h.

Member Function Documentation

◆ build()

template<typename Node >
Bvh< Node > bvh::v2::TopDownSahBuilder< Node >::build ( )
inlineprotected

Definition at line 78 of file top_down_sah_builder.h.

◆ compute_bbox()

template<typename Node >
BVH_ALWAYS_INLINE BBox bvh::v2::TopDownSahBuilder< Node >::compute_bbox ( size_t  begin,
size_t  end 
) const
inlineprotected

Definition at line 137 of file top_down_sah_builder.h.

◆ get_prim_ids() [1/2]

template<typename Node >
BVH_ALWAYS_INLINE const std::vector< size_t > & bvh::v2::TopDownSahBuilder< Node >::get_prim_ids ( ) const
inlineprotected

Definition at line 74 of file top_down_sah_builder.h.

◆ get_prim_ids() [2/2]

template<typename Node >
virtual std::vector< size_t > & bvh::v2::TopDownSahBuilder< Node >::get_prim_ids ( )
protectedpure virtual

◆ try_split()

template<typename Node >
virtual std::optional< size_t > bvh::v2::TopDownSahBuilder< Node >::try_split ( const BBox bbox,
size_t  begin,
size_t  end 
)
protectedpure virtual

Member Data Documentation

◆ bboxes_

template<typename Node >
std::span<const BBox> bvh::v2::TopDownSahBuilder< Node >::bboxes_
protected

Definition at line 55 of file top_down_sah_builder.h.

◆ centers_

template<typename Node >
std::span<const Vec> bvh::v2::TopDownSahBuilder< Node >::centers_
protected

Definition at line 56 of file top_down_sah_builder.h.

◆ config_

template<typename Node >
const Config& bvh::v2::TopDownSahBuilder< Node >::config_
protected

Definition at line 57 of file top_down_sah_builder.h.

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