Game Development Reference
In-Depth Information
Figure 13.1 A single mesh character running down a tunnel.
polygons. This would be very time consuming and for much of the time
totally unnecessary. The first stab at a solution to this problem involves
using axis-aligned bounding boxes (AABBs). The advantage of AABBs
is that they are easily handled. The screen grab is from the supplied
Toon3D application; the example can be found in Examples/Chapter13
as file Bug01.t3d. In Toon3D the developer can position and create
axis-aligned collision boxes and then set up actions to handle the
response when a collision occurs between two bounding boxes. The
bounding boxes for the set are static, while the bounding box for the
character is created from the minimum and maximum vertices for the
mesh at each time increment. Since the processor handles the trans-
formation of the character it is easy to determine which are the
minimum and maximum vertices in a mesh. Set the minimum and
maximum vertices to the first vertex values for x , y and z . As you
iterate through the vertices, if a component value is less than the
current minimum, then update the minimum, and if a component value
is greater than the maximum, then update the maximum.
Search Nedrilad ::




Custom Search