An Introduction to Collision Detection
Welcome to Chapter 8! In the previous chapter, we extended the instance animation system. We started by adding lookup tables for the animation transforms and moved the computations to the GPU. Next, we added movement states and UI controls to the application to create mappings between states and animation clips. As the last step, we updated the YAML parser to save and restore the animation clip mappings.
In this chapter, we will implement a two-tier collision detection for the instances. We will start with an exploration of the complexity of collision detection, and how to lower the complexity by removing instances based on their distance and by simplifying the representation of the instances. Then, we will discuss methods to simplify the instances to minimize the number of intersection checks even more. Next, we will implement a quadtree to limit the number of instances to check, and finally, we will add bounding spheres to the instances...