Game Development Reference
In-Depth Information
11.5 Summary
We can construct complex triangle meshes using 3D modeling pro-
grams and either export or convert them to XFiles. Then, using the
D3DXLoadMeshFromX function, we can load the mesh data in an
XFile into an ID3DXMesh object that we can use in our
applications.
Progressive meshes, represented by the ID3DXPMesh interface,
can be used to control the level of detail of a mesh; that is, we can
adjust the detail of the mesh dynamically. This is useful because we
will often want to adjust the detail of the mesh based on how prom-
inent it is in the scene. For example, a mesh closer to the viewer
should be rendered with more detail than a mesh far away from the
viewer.
We can compute the bounding sphere and bounding box using the
D3DXComputeBoundingSphere and D3DXComputeBounding-
Box functions, respectively. Bounding volumes are useful because
they approximate the volume of a mesh and can therefore be used
to speed up calculations related to the volume of space that a mesh
occupies.
Search WWH ::




Custom Search