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 ...
Get Beginning 3D Game Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.