|
Fermat
|
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< Bin > | m_queue_bins |
| thrust::device_vector< Split > | m_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 |
|
inline |
constructor
| nodes | output nodes array |
| leaves | output leaf array |
| index | output index array |
| 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
| BINS | number of bins to use |
| bbox | global bbox |
| bbox_begin | beginning of the bbox sequence |
| bbox_end | end of the bbox sequence |
| max_leaf_size | maximum leaf size |
| max_cost | maximum cost relative to the parent |
1.8.13