cgv
Loading...
Searching...
No Matches
cgv::data::bvh_node Struct Reference

A single node of a bounding volume hierarchy. More...

#include <bvh.h>

Public Attributes

cgv::box3 bounds = {}
 The node's axis aligned bounding box.
 
std::vector< size_t > primitive_indices
 The list of primitive indices contained in this node. After building the tree, only leaf nodes will have a non-empty list.
 
std::unique_ptr< bvh_nodechild_a
 The first child node of this node.
 
std::unique_ptr< bvh_nodechild_b
 The second child node of this node.
 

Detailed Description

A single node of a bounding volume hierarchy.

Each node may hold pointers to two child nodes.

Definition at line 48 of file bvh.h.

Member Data Documentation

◆ bounds

cgv::box3 cgv::data::bvh_node::bounds = {}

The node's axis aligned bounding box.

Definition at line 50 of file bvh.h.

◆ child_a

std::unique_ptr<bvh_node> cgv::data::bvh_node::child_a

The first child node of this node.

Definition at line 54 of file bvh.h.

◆ child_b

std::unique_ptr<bvh_node> cgv::data::bvh_node::child_b

The second child node of this node.

Definition at line 56 of file bvh.h.

◆ primitive_indices

std::vector<size_t> cgv::data::bvh_node::primitive_indices

The list of primitive indices contained in this node. After building the tree, only leaf nodes will have a non-empty list.

Definition at line 52 of file bvh.h.


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