poserAnimator derived from ygNode | Example | Source | Header |
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 file2 load a file to map joints to models
2.1 correlate the joints to their corresponding model file3 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
1Get 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
1Reads 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