iterating over leaf nodes

iterating over leaf nodes

Hi,Is there a way to iterate over all leaf nodes (leaf nodes only) in the BVH tree to access some parameters (such as size, id1, id2, etc)?I'm trying to write a function that loops over leaf nodes in the tree and extracts some properties of these nodes, but kinda lost so far.any hints and directions are greatly appreciated.Thank you!

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Have a look at this function:

float BVH4::computeStatistics(nodeId_t nodeID, float ap)

check what it does to collect statistics by traversing the tree.
You cannot loop torugh the triangle4 array directly, it might contain unused, uninitialized items in the middle.


Leave a Comment

Please sign in to add a comment. Not a member? Join today