Game Development Reference
In-Depth Information
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 is the root bone, each bone will also list its parent bone, thus building up the
skeletal hierarchy.
The SKEL file gets exported into the models sub-directory alongside the GEO and
MTL files. An example of a SKEL file is as follows:
CIwAnimSkel
{
numBones 12
CIwAnimBone
{
name "FlagPoleBase"
pos {-0.38309,-1.27709,0}
rot {0.70711,0,0,0.70711}
}
CIwAnimBone
{
name "PoleA"
parent "FlagPoleBase"
pos {258.20248,0.00000,0}
rot {1,0,0,0}
}
CIwAnimBone
{
name "PoleB"
parent "PoleA"
pos {255.88675,0.00000,0}
rot {1.00000,0,0,-0.00200}
}
CIwAnimBone
{
name "PoleC"
parent "PoleB"
pos {257.60138,-0.00000,0}
rot {0.00000,0.99998,0.00615,0.00000}
}
 
Search WWH ::




Custom Search