- int num_joints;
- //Joint joints[max_joints];
- //Joint *joints;
- Joint* joints;
-
- int num_muscles;
- //Muscle muscles[max_muscles];
- //Muscle *muscles;
- Muscle* muscles;
-
- int selected;
-
- int forwardjoints[3];
- XYZ forward;
-
- int id;
-
- int lowforwardjoints[3];
- XYZ lowforward;
-
- XYZ specialforward[5];
- int jointlabels[max_joints];
-
- Model model[7];
- Model modellow;
- Model modelclothes;
- int num_models;
-
- Model drawmodel;
- Model drawmodellow;
- Model drawmodelclothes;
-
- bool clothes;
- bool spinny;
-
- GLubyte skinText[512*512*3];
- int skinsize;
-
- float checkdelay;
-
- float longdead;
- bool broken;
-
- int free;
- int oldfree;
- float freetime;
- bool freefall;
-
- void FindForwards();
- void FindForwardsfirst();
- float DoConstraints(XYZ *coords,float *scale);
- void DoGravity(float *scale);
- void DoBalance();
- void MusclesSet();
- void Draw(int muscleview);
- void AddJoint(float x, float y, float z, int which);
- void SetJoint(float x, float y, float z, int which, int whichjoint);
- void DeleteJoint(int whichjoint);
- void AddMuscle(int attach1,int attach2,float maxlength,float minlength,int type);
- void DeleteMuscle(int whichmuscle);
- void FindRotationJoint(int which);
- void FindRotationJointSameTwist(int which);
- void FindRotationMuscle(int which, int animation);
- void Load(const char *fileName,const char *lowfileName,const char *clothesfileName,const char *modelfileName,const char *model2fileName,const char *model3fileName,const char *model4fileName,const char *model5fileNamee,const char *model6fileName,const char *model7fileName,const char *modellowfileName,const char *modelclothesfileName, bool aclothes);
-
- Skeleton();
-
- ~Skeleton();
+ int num_joints;
+ //Joint joints[max_joints];
+ //Joint *joints;
+ Joint* joints;
+
+ int num_muscles;
+ //Muscle muscles[max_muscles];
+ //Muscle *muscles;
+ Muscle* muscles;
+
+ int selected;
+
+ int forwardjoints[3];
+ XYZ forward;
+
+ int id;
+
+ int lowforwardjoints[3];
+ XYZ lowforward;
+
+ XYZ specialforward[5];
+ int jointlabels[max_joints];
+
+ Model model[7];
+ Model modellow;
+ Model modelclothes;
+ int num_models;
+
+ Model drawmodel;
+ Model drawmodellow;
+ Model drawmodelclothes;
+
+ bool clothes;
+ bool spinny;
+
+ GLubyte skinText[512 * 512 * 3];
+ int skinsize;
+
+ float checkdelay;
+
+ float longdead;
+ bool broken;
+
+ int free;
+ int oldfree;
+ float freetime;
+ bool freefall;
+
+ void FindForwards();
+ float DoConstraints(XYZ *coords, float *scale);
+ void DoGravity(float *scale);
+ void FindRotationJoint(int which);
+ void FindRotationJointSameTwist(int which);
+ void FindRotationMuscle(int which, int animation);
+ void Load(const char *fileName, const char *lowfileName, const char *clothesfileName, const char *modelfileName, const char *model2fileName, const char *model3fileName, const char *model4fileName, const char *model5fileNamee, const char *model6fileName, const char *model7fileName, const char *modellowfileName, const char *modelclothesfileName, bool aclothes);
+
+ /*
+ // unused
+ void FindForwardsfirst();
+ void Draw(int muscleview);
+ void AddJoint(float x, float y, float z, int which);
+ void SetJoint(float x, float y, float z, int which, int whichjoint);
+ void DeleteJoint(int whichjoint);
+ void AddMuscle(int attach1, int attach2, float maxlength, float minlength, int type);
+ void DeleteMuscle(int whichmuscle);
+ void DoBalance();
+ void MusclesSet();
+ */
+
+ Skeleton();
+ ~Skeleton();
+
+private:
+ // convenience functions
+ // only for Skeleton.cpp
+ inline Joint& joint(int bodypart) { return joints[jointlabels[bodypart]]; }
+ inline XYZ& jointPos(int bodypart) { return joint(bodypart).position; }
+ inline XYZ& jointVel(int bodypart) { return joint(bodypart).velocity; }
+