This version of my program partitions a unit cube and places them in a BVH tree. It renders the resulting bounding boxes (cubes) whose nodes have the desired tree depth.
I used this for timing. When generating and rendering a tree with a total depth of 6, it took ~14 - 20 seconds (for rendering boxes of depth one vs. depth six). A total depth of three took about 2-3 seconds, regardless of how many boxes I rendered. It seems strange that it should take so long.
I believe the ability to view by layer will help me debug my code as I develop an algorithm to group geometric shapes.
Silly Errors Along the way:
- Swapping min and max corners when declaring boxes
- Not overloading operators (like = )
- Not returning anything for a non-void function.
No comments:
Post a Comment