Fermat
CUGAR
BVH Module
This
module
implements data-structures and functions to store, build and manipulate BVHs.
Bvh_node
Bvh_node_3d
Bvh
Bvh_builder
Bvh_sah_builder
cuda::LBVH_builder
As an example, consider the following code to create an LBVH tree over a set of points, in parallel, on the device:
#include <
cugar/bvh/cuda/lbvh_builder.h
>
thrust::device_vector<Vector3f> points;
...
// code to fill the input vector of points
thrust::device_vector<Bvh_node> bvh_nodes;
thrust::device_vector<uint32> bvh_index;
cugar::cuda::LBVH_builder<uint64>
builder( &bvh_nodes, &bvh_index );
builder.build(
Bbox3f( Vector3f(0.0f), Vector3f(1.0f) ),
// suppose all bboxes are in [0,1]^3
points.begin(),
// begin iterator
points.end(),
// end iterator
4 );
// target 4 objects per leaf
Generated by
1.8.13