March 2017
Intermediate to advanced
480 pages
11h 3m
English
To check if a Sphere and an Axis Aligned Bounding Box (AABB) intercept, we must first find the closest point on the AABB to the Sphere. Once we have this point, we can figure out the distance between the Sphere and the closest point. Finally, we can compare this distance to the radius of the Sphere. If the distance between the closest point and the Sphere is less than the radius of the Sphere, the point is inside the Sphere:

We are going to implement a function to test if a Sphere and an AABB are intersecting. We will also use a #define macro to implement a convenience function to see if an AABB intercepts a sphere. This ...
Read now
Unlock full access