
262 Chapter 12 Collision Detection
/**
* Checks the potential contacts from this node downward in
* the hierarchy, writing them to the given array (up to the
* given limit). Returns the number of potential contacts it
* found.
*/
unsigned getPotentialContacts(PotentialContact* contacts,
unsigned limit) const;
};
// Note that because we’re dealing with a template here, we
// need to have the implementations accessible to anything that
// imports this header.
template<class BoundingVolumeClass>
bool BVHNode<BoundingVolumeClass>::overlaps(
const BVHNode<BoundingVolumeClass> * other
) const
{
return volume->overlaps(other->volume);
}
template<class BoundingVolumeCl ...