Game Development Reference
In-Depth Information
Once the effective radius is known, we proceed in exactly the same manner as we
would to test an ellipsoid. For each frustum plane L , we calculate the 4D dot
product between the plane and the center Q of the bounding box. If for any plane
eff
L Q , then the box is not visible.
In the case that the length of R is much greater than the lengths of S and T , a
box may not be rejected in many situations when it lies far outside the view frus-
tum. An instance of this case is demonstrated in Figure 8.8. To circumvent this
problem, we can reduce the box intersection test to a line segment intersection, as
is done for cylinders.
In terms of the bounding box center Q and its primary axis R , we can express
the endpoints
≤−
r
Q and
Q of the line segment representing the box as
QQ R
Q
=+
=−
1
1
2
1
QR .
(8.48)
2
2
The effective radius eff
r
with respect to a plane having unit normal direction N is
given by
r
=⋅
(
SN
+⋅
TN ,
)
(8.49)
1
eff
2
S
R
Figure 8.8. This example demonstrates that using the point test for a box having one di-
mension much larger than the other two can result in the failure to reject a box that lies a
significant distance outside the view frustum.
Search Nedrilad ::

Custom Search