poserAnimator derived from ygNode Example Source Header

Description: allows the loading and animation of poser motion file

notes:
Category: Transformation
Author: Shalini Venkataraman
Revision: 11/01/01

to define the different channel types a particular joint may have
depending on the degree of freedom it has
no channel
scale (X Y Z) only
translation only (X Y Z)
rotation (X Y Z)
rotation (X Z Y)
rotation (Y X Z)
rotation (Y Z X)
rotation (Z Y X)
rotation (Z X Y)
translation (X Z Y), (X Y Z) and scale(X Y Z)
translation (X Y Z) and rotation (X Y Z)
translation (X Y Z) and rotation(X Z Y)
translation (X Y Z) and rotation (Y X Z)
translation (X Y Z) and rotation (Y Z X)
translation (X Y Z) and rotation (Z Y X)
translation (X Y Z) and rotation (Z X Y)
the no of data required to store info corresponding to the above types
Read a line from a given file and parse it
putting all the individual tokens in words and no of tokens parsed in cnt
divide a given string in its words; buffer is the string given and
words will contains the divided strings; cnt has the no of words parsed
    Messages
bvhfile file load a file with joint hierarchy
mapfile file load a file to map joints to models
frame [integer] set the frame number
set float set the percentage along the motion path
position float set the percentage along the motion path
    Comments

constructor poserAnimator

destructor ~poserAnimator

method reset

method message

1 load a file with joint hierarchy
1.1 load a poser file
2 load a file to map joints to models
2.1 correlate the joints to their corresponding model file
3 set the frame number
4 set the percentage along the motion path

method loadMapFile

method parseMapFile

1 loads the parts in the map file for each of the joints that they correspond to
1.0.1 only if model was defined
1.0.2 mat.makeIdent();
1.0.0.1 only do if posertranform

method loadPoserFile

0.1 search for the HEIRARCHY Messageword. thats where the whole body starts
0.2 now load all the hierarchy information
0.3 search for motion Messageword
0.4 get no of frames in Animation
0.4.1 get the frame time, but it is not being used right now
0.4.2 Load individual frame data
0.4.1 error, can not find the animation information

method handlePoserHierarchy

1
    
        Get the Heirarchy information and build the skeleton recursively as a tree of ygNodes
        parent is the ygNode to which nodes will be added when they are parsed
        This part is responsible for interpreting the skeleton as well as the type of 
        constraint imposed on each joint - called the channel
        the dimension of the channel will affect the amount of numbers each joint requires
        in every frame
        eg - a joint constrained to only rotation&scaling and no translation will require 6 floats
    

1.1 begining of a joint. call handlePoserHierarchy on this joint after attaching it to the tree
1.2 the offset of each joint from its parent
1.3 the channel information contained in each joint
1.4 end of reading all the info, do nothing

method handlePoserChannel

1 handle channel information; the dimensions of the joint transformation as well as order of rotation

method handlePoserData

1
        Reads the frame by frame data and puts it into the tree of ygNodes
        bone is the joint
        words is the array of words read in earlier
        index is index within the float array of all the transformation data
        curFrame is the cur Frame no
        numFrames is the total no of frames
    

2 go through all the children
2.0.0.1 only do if pfDCS

method setFrame

1 go through all the children
1.0.0.1 only do if pfDCS

method setTransformation

1 fptr points are given in opengl coordinate space and transformed to Performer space
2 opengl Z ->performer -Y
3 opengl X -> performer X
4 opengl Y -> performer Z