O'Reilly logo

Beginning 3D Game Programming by Tom Miller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading a Tank Hierarchy

That seems pretty simple, doesn't it? Unfortunately, nothing is ever as simple as it seems because outside of storing the device variable and setting a property, you haven't covered any of the other methods before. The animation root frame object is completely new. In the Direct3D API, the mesh hierarchies are commonly used to facilitate animation (and technically, that's what you're doing as well). The primary function of the mesh hierarchy is skeletal animation, but your tank doesn't have any bones. The only thing you care about is the frame hierarchy, which maintains the child/sibling relationship for the data in the frame. After that frame is loaded, you can use a method on the frame class to get the bounding sphere ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required