Game Development Reference
In-Depth Information
Figure 13.7 Using the quadrant method to determine whether a point is inside a
polygon.
Table 13.1 Truth table of points inside a polygon
using the quadrant method
q 1\ q 2
0
1
2
3
0
0
-1
X
1
1
1
0
-1
X
2
X
1
0
-1
3
-1
X
1
0
Edge
Count
P 1 P 2
1
P 2 P 3
2
P 3 P 4
2
P 4 P 5
2
P 5 P 6
3
P 6 P 7
2
P 7 P 8
3
P 8 P 9
4
P 9 P 10
5
P 10 P 1
4
 
Search Nedrilad ::




Custom Search