4.3. Skeletons and Bones

The Cal3D library is designed as a skeletal-based animation system. This means that all the mesh vertices of the animated model are attached to one or more bones of an underlying skeleton structure. This makes it very easy to animate the whole model, you only need to adjust the skeleton pose and the model meshes are automatically deformed. This method of attaching meshes to a bone hierarchy is known as 'skinning'.

Figure 4-5. The skinned Cally model

A bone is defined as a relative transformation to the parent bone. This transformation is split into two separate parts: The relative translation stored in a vector, and the relative rotation stored in a quaternion. The absolute transformation of a bone is recursively calculated after each animation step.

Following the concept of shared data, the core skeleton and its core bones contain data such as the initial skeleton pose, the bone names and the hierarchy itself. Whereas the skeleton and the bones of the model instances have only the current transformation and a link to the corresponding skeleton or bone stored.