Each part of the body has a set of x-,
y-,
and z-minimum and rest rotation angles defined. Each
part of the actor has a color, ambient, diffuse, specular,
shininess,
and emission material property defined for it. The eye has
three parts, the pupil, iris, and main, for which
all the material properties above are defined. The head has five
parts for which all the material properties above are defined. These
are the face (skin), lip, nostril, eyebrow,
and hair. The breasts inherit the material properties of the
middle part of the torso. All information about each part is stored
in an ascii text file, called the actor-data file.
There are convenience functions defined for each
part of the body. These can be found at the end of this report.
These functions take a direction, the number of degrees the programmer
wants the part to rotate, along with three times. The number of degrees
is always positive. The value of the degrees will be negated if necessary.
The possible values for the head, eyes and neck directions are shown in
Figure
9. The possible direction values for the torso, arms and hands
are shown in Figure 10. The possible values
for the fingers and thumbs are shown in Figure 11.
Finally, the possible directions for the legs, feet and toes are shown
in Figure 12. If the number of degrees passed
is greater than the limit, then the value is clamped to the min or max
angle assigned. Notice that not all parts are above, below or centered
around the axes. Each part was created at the point of rotation.
For example, the head rotates around the bottom vertex; whereas, the eye
rotates around the center of the three axes. There are functions
which will place the part at any angle within the limitations assigned.
These functions take both negative and positive angles.
Figure
13 shows the three axes along with the positive rotation directions.
This coordinate system applies in the OpenGL CAVETM library
and 0,0,0 is at the center of the floor.
Figure 9 Possible directions for the head, eyes and neck.
Figure 10 Possible directions for the torso, arms and hands.
Figure 11 Possible directions for the fingers and thumbs.
Figure 12 Possible directions for the legs, feet and toes.
Figure 13 The coordinate system and positive rotation directions.