Game Development Reference
In-Depth Information
Figure 7.12 Possible values of the discriminant in swept sphere intersection.
Once we have the value of t , we can then see if the value is between the 0 and 1
range that we care about for the code implementation. Remember that a t value
greater than one is at a point after the current frame, and less than zero is prior to
the current frame. Therefore, values outside the range are not something the func-
tion should concern itself with. The code implementation for this is provided in
Listing 7.6 .
Listing 7.6 Swept Sphere Intersection
Click here to view code image
Search WWH ::




Custom Search