March 2017
Intermediate to advanced
480 pages
11h 3m
English
In order to benefit from the Octree, we must integrate it with the scene as an acceleration structure. The OctreeNode structure and its helper functions should not be used outside of the Scene class.
First, we are going to modify the Scene class to hold an Octree. This means dealing with some dynamic memory, so we also need to add a destructor. The copy constructor and assignment operator will be disabled. If an acceleration structure is present, we should forward operations such as raycasting to the accelerator. Of course, the original code needs to stay in place as the acceleration structure is optional.
Follow these steps to integrate the octree into the scene:
Scene class declared ...Read now
Unlock full access