Fermat
Public Types | Public Methods | Public Members | List of all members
nih::cuda::Binned_sah_builder Struct Reference

Detailed description

GPU-based binned SAH BVH builder.

This builders provides the context to generate a bounding volume hierarchy using the binned Surface Area Heuristic out of a generic set of unsorted bounding boxes.

#include <binned_sah_builder.h>

Public Types

typedef binned_sah::Bin Bin
 
typedef binned_sah::Bbox Bbox
 
typedef binned_sah::Split Split
 
typedef binned_sah::Queue Queue
 
typedef binned_sah::Objects Objects
 
typedef binned_sah::Bins Bins
 

Public Methods

 Binned_sah_builder (thrust::device_vector< Bvh_node > &nodes, thrust::device_vector< uint2 > &leaves, thrust::device_vector< uint32 > &index)
 
template<typename Iterator >
void build (const uint32 BINS, const Bbox3f bbox, const Iterator bbox_begin, const Iterator bbox_end, const Iterator h_bbox_begin, const uint32 max_leaf_size, const float max_cost=1.8f)
 

Public Members

thrust::device_vector< Bvh_node > * m_nodes
 
thrust::device_vector< uint2 > * m_leaves
 
thrust::device_vector< uint32 > * m_index
 
uint32 m_levels [128]
 
uint32 m_level_count
 
Bbox3f m_bbox
 
uint32 m_node_count
 
uint32 m_leaf_count
 
float m_init_bins_time
 
float m_update_bins_time
 
float m_sah_split_time
 
float m_distribute_objects_time
 
thrust::device_vector< float3 > m_bin_bmin
 
thrust::device_vector< float3 > m_bin_bmax
 
thrust::device_vector< int32 > m_bin_size
 
thrust::device_vector< Binm_queue_bins
 
thrust::device_vector< Splitm_queue_splits
 
thrust::device_vector< uint32 > m_queue_offsets
 
thrust::device_vector< int4 > m_bin_ids
 
thrust::device_vector< int32 > m_split_ids
 
thrust::device_vector< int32 > m_node_ids
 
thrust::device_vector< uint32 > m_new_pos
 
thrust::device_vector< uint32 > m_counters
 

Constructor & Destructor Documentation

◆ Binned_sah_builder()

nih::cuda::Binned_sah_builder::Binned_sah_builder ( thrust::device_vector< Bvh_node > &  nodes,
thrust::device_vector< uint2 > &  leaves,
thrust::device_vector< uint32 > &  index 
)
inline

constructor

Parameters
nodesoutput nodes array
leavesoutput leaf array
indexoutput index array

Member Function Documentation

◆ build()

template<typename Iterator >
void nih::cuda::Binned_sah_builder::build ( const uint32  BINS,
const Bbox3f  bbox,
const Iterator  bbox_begin,
const Iterator  bbox_end,
const Iterator  h_bbox_begin,
const uint32  max_leaf_size,
const float  max_cost = 1.8f 
)

build a bvh given a set of bboxes

Parameters
BINSnumber of bins to use
bboxglobal bbox
bbox_beginbeginning of the bbox sequence
bbox_endend of the bbox sequence
max_leaf_sizemaximum leaf size
max_costmaximum cost relative to the parent

The documentation for this struct was generated from the following files: