Game Development Reference
In-Depth Information
F IGURE 12.6
Working out a parent bounding sphere.
template<class BoundingVolumeClass>
class BVHNode
{
public:
// ... other BVHNode code as before ...
Removing an object from the hierarchy involves replacing its parent node with its
sibling and recalculating the bounding volumes farther up the hierarchy. Figure 12.7
illustrates this process. It can be implemented as
Excerpt from include/cyclone/collide_coarse.h
/**
* A base class for nodes in a bounding volume hierarchy.
*
* This class uses a binary tree to store the bounding volumes.
*/
template<class BoundingVolumeClass>
class BVHNode
{
public:
Search Nedrilad ::




Custom Search