
686 Chapter 15 Intersection Methods
the midst of a picking operation, grazing pick-rays are not of much interest. You tend
to pick an object by clicking on a pixel well inside the object. Another example is
firing a laser gun at an opponent’s character. Who is to say that a grazing laser strike
really hit the character? Simply require that the character must be struck firmly inside
his boundaries. That said, if you want to handle the grazing contact, then
Exercise
15.1
Modify the line-triangle intersection code to handle the case when the line and trian-
gle are coplanar.
Similar pseudocode may be extracted from the distance functions in Sections
14.4