ebvh_build_hierarchy
ebvh_build_hierarchy(bvh, unprocessed_nodes, input_node_count, node_pool, node_pool_offset, [sah_optimization_level]) ⇒ number
Given a set of leaves, build intermediate node hierarchy on top, all the way up to the root Assumes nodes are spatially sorted NOTE: unprocessed_nodes will be modified during execution to save memory
Kind: global function
Returns: number
- new root
Param | Type | Description |
---|---|---|
bvh | BVH | |
unprocessed_nodes | Array.<number> | Uint32Array | contains nodes that need to be built into a hierarchy, these must not be present in the BVH hierarchy |
input_node_count | number | |
node_pool | Array.<number> | Uint32Array | Contains node indices that can be used to build ancestry hierarchy, need to be pre-allocated before calling this method |
node_pool_offset | number | |
[sah_optimization_level] | number |