// ASF.h #include "Matrix.h" #include #include #include #include "Point3.h" #include #define PI 3.141596536 class Bone { public: int id; char name[30]; float direction[3]; float length; // distance to translate local origin float orientation[3]; // angles to rotate local coordinate system char axisOrder[10]; // order of roations (ignored for now) int numberOfDOFs; // number of DOFs of joint char dof[3][10]; // names of DOFs (ignored for now) float *dofPtr; // pointer into dofValue list float *dofValues[3]; // DOF values (from .AMC file) float limit[3][3]; // limits on DOFs Bone *next; // linear linked list of bones Bone *child; // child of this bone Bone *sibling; // sibling of this bone float position[3]; // origin of local coordinate system Matrix tucs; // (local) transformed unit coordinate system void printBoneNames(void); void printBone(Bone *); void printRoot(void); void printSubTree(int, Bone *,float *,Matrix,int,Bone *,FILE *); void printBoneHierarchy(); void printBoneSubTree(int, Bone *); private: }; class Root { public: char order[30]; char axisOrder[10]; float *position[3]; float *orientation[3]; Bone *child; }; //===================================================== // class ASFskeleton { public: Bone *bones; Root root; FILE *ASFfile; int numberOfBones; int numberOfFrames; int getASF(void); int getAMC(void); Bone *findBone(char *); int getNumberOfBones(); int splitString(char *,char *,char *); void drawStickFigure(int frame,int inplace); void drawStickSubFigure(int level, Bone* ,Point3 ,Matrix,int frame); };