We can now export the animation data from the 3D modeling package of our choice, but before we actually make use of them, let's take a quick look at the new file types that we've just generated.
A SKEL file contains all the information pertaining to the skeleton of our animation. The file first defines an instance of a CIwAnimSkel
class, which is a wrapper for a number of CIwAnimBone
instances.
The CIwAnimSkel
instance is derived from the CIwResource
class and therefore has a name associated with it so that it can be looked up in the resource manager. The name of the instance is taken from the filename of a SKEL file, which in turn comes from the name of the root bone of the skeleton.
Each of the CIwAnimBone
instances have a name, position, and rotation associated with it, which defines the bind pose of the animation. The position is just a vector in model space, while the rotation is stored as a quaternion. Except for the first bone, which...