Graphics Reference
In-Depth Information
Tightness of bound . A bounding volume should closely represent the
space that is occupied by the actual primitive.
Void space. Spaces that are
inside the bounding volume
but outside of the actual prim-
itive.
Directly related to these are the characteristics of collision with bounding vol-
umes.
Approximation . Bounding volumes can only approximate the bounds of
a primitive. For example, Figure 7.9 shows an example of bounding a line
primitive with a box, and Figure 7.10 shows bounding a line with three
circles.
Notice that in both cases, there are relatively large void spaces .
In general, bounding volume collision tests can only approximate collision
results. In Figure 7.9, a collision would be considered successful when
the bounding volume of another primitive is within the bound of the box.
Whereas in the Figure 7.10, a successful collision happens when overlap
occurs with any of the three bounding circles. Notice that in Figure 7.10,
because there are gaps between the bounding circles, it is actually possible
to intersect with the line primitive without causing a successful collision!
Figure 7.9. Bounding a
line with a bounding box.
Figure 7.10. Bounding
a line with three bounding
circles.
Collision point. The collision result is a boolean true or false. Since the
collision result is approximated, the bounding volume cannot pinpoint the
position where a collision would occur.
Tutorial 7.3. Collision Support
Tutorial 7.3.
Project Name:
D3D _ Collisions
Library Support:
UWBGL _ MFC _ Lib1
UWBGL _ D3D _ Lib6
Goals. Get experience with programming bounding volumes for graphics
primitives; understand approaches to approximating primitive collisions;
Approach. Using a bounding box as an example, study an implementation
and an approach to integrate bounding volumes into our primitive hierarchy.
Figure 7.11 is a screenshot of running Tutorial 7.3. This tutorial extends Tuto-
rial 7.2, where in addition to creating/editing primitives with motion, the primi-
tives are capable of colliding with each other and reacting with some defined be-
haviors. In this case, primitives react to collision by moving away from each other.
Once again, we will study this tutorial by first examining the library support, and
then we will look at how the library functionality is applied in the project.
Figure 7.11.
Tutorial
7.3.
Search WWH ::




Custom Search