Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
6 Views

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!
0 Kudos
1 Reply
Highlighted
Beginner
6 Views

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.

Cheers,
Max
0 Kudos