March 2017
Intermediate to advanced
480 pages
11h 3m
English
Sometimes a containing circle or a containing rectangle alone is not accurate enough for collision detection. When this happens we can use several simple shapes to approximate a complex shape:

We are going to create a new structure called BoundingShape. This new structure will hold an array of circles and an array of rectangles. It's assumed that the structure does not own the memory it is referencing. We can implement several primitive tests by looping through all the primitives that BoundingShape contains.
Follow these steps to create a class which represents a complex shape. A complex shape is ...
Read now
Unlock full access