Fermat
|
This module defines generic binary tree concepts and objects, such as node representations and visitor patterns.
Modules | |
Radix Trees | |
Functions | |
template<> | |
struct | cugar::CUGAR_ALIGN_BEGIN (8) Bintree_node< leaf_range_tag > |
template<typename bvh_visitor_type > | |
void | cugar::check_tree_rec (const uint32 node_id, const uint32 parent_id, const bvh_visitor_type &visitor, const uint32 n_prims, const uint32 max_leaf_size) |
template<typename node_type , typename leaf_type > | |
void | cugar::check_tree (const Bintree_visitor< node_type, leaf_type > &visitor, const uint32 n_prims, const uint32 max_leaf_size=uint32(-1)) |
void cugar::check_tree | ( | const Bintree_visitor< node_type, leaf_type > & | visitor, |
const uint32 | n_prims, | ||
const uint32 | max_leaf_size = uint32(-1) |
||
) |
A function to check a host binary tree
struct cugar::CUGAR_ALIGN_BEGIN | ( | 8 | ) |
A "fat" binary tree node, specifying a whole primitive range per leaf. A node can either be a leaf and have no children, or be an internal split node. If a split node, it can either have one or two children. The ability for an internal node to have one children is useful to represent singletons in a radix trie.
empty constructor
full constructor
child0 | first child activation predicate |
child1 | second child activation predicate |
index | child index |
leaf constructor
index | leaf range begin |
index | leaf range end |
is a leaf?
get offset of the first child
get leaf offset
get range size
get leaf range
get leaf size
get child count
get i-th child (among the active ones)
i | child index |
is the i-th child active?
i | child index |
get left partition (or kInvalid if not active)
get right partition (or kInvalid if not active)