X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAnimation%2FSkeleton.h;h=db03e75af512cbf9fba57349ee90ea27cc3d8108;hb=3455f3a84eef6a73f39a4267da445c7998c3515e;hp=7c482f911c638cd8a89812ef427fadb60dbe3449;hpb=4d0ec1838440e55f24e8ec9501a62348cd9e2ec3;p=lugaru.git
diff --git a/Source/Animation/Skeleton.h b/Source/Animation/Skeleton.h
index 7c482f9..db03e75 100644
--- a/Source/Animation/Skeleton.h
+++ b/Source/Animation/Skeleton.h
@@ -22,8 +22,6 @@ along with Lugaru. If not, see .
#define _SKELETON_H_
#include "Models.h"
-#include "Quaternions.h"
-
/**> HEADER FILES <**/
#include "gamegl.h"
@@ -32,100 +30,17 @@ along with Lugaru. If not, see .
#include "Sprite.h"
#include "binio.h"
#include "Animation/Animation.h"
-
-enum bodyparts {
- head, neck,
- leftshoulder, leftelbow, leftwrist, lefthand,
- rightshoulder, rightelbow, rightwrist, righthand,
- abdomen, lefthip, righthip, groin,
- leftknee, leftankle, leftfoot,
- rightknee, rightankle, rightfoot
-};
-
-class Joint
-{
-public:
- XYZ position;
- XYZ oldposition;
- XYZ realoldposition;
- XYZ velocity;
- XYZ oldvelocity;
- XYZ startpos;
- float blurred;
- float length;
- float mass;
- bool lower;
- bool hasparent;
- bool locked;
- int modelnum;
- bool visible;
- Joint* parent;
- bool sametwist;
- int label;
- int hasgun;
- float delay;
- XYZ velchange;
-
- Joint() {
- blurred = 0;
- length = 0;
- mass = 0;
- lower = 0;
- hasparent = 0;
- locked = 0;
- modelnum = 0;
- visible = 0;
- parent = 0;
- sametwist = 0;
- label = 0;
- hasgun = 0;
- delay = 0;
- }
-};
-
-class Muscle
-{
-public:
- int numvertices;
- int* vertices;
- int numverticeslow;
- int* verticeslow;
- int numverticesclothes;
- int* verticesclothes;
- float length;
- float targetlength;
- Joint* parent1;
- Joint* parent2;
- float maxlength;
- float minlength;
- int type;
- bool visible;
- float rotate1, rotate2, rotate3;
- float lastrotate1, lastrotate2, lastrotate3;
- float oldrotate1, oldrotate2, oldrotate3;
- float newrotate1, newrotate2, newrotate3;
-
- float strength;
-
- Muscle();
- ~Muscle();
- void DoConstraint(bool spinny);
-};
+#include "Animation/Joint.h"
+#include "Animation/Muscle.h"
const int max_joints = 50;
class Skeleton
{
public:
- int num_joints;
- //Joint joints[max_joints];
- //Joint *joints;
- Joint* joints;
+ std::vector joints;
- int num_muscles;
- //Muscle muscles[max_muscles];
- //Muscle *muscles;
- Muscle* muscles;
+ std::vector muscles;
int selected;
@@ -173,21 +88,7 @@ public:
void FindRotationMuscle(int which, int animation);
void Load(const std::string& fileName, const std::string& lowfileName, const std::string& clothesfileName, const std::string& modelfileName, const std::string& model2fileName, const std::string& model3fileName, const std::string& model4fileName, const std::string& model5fileNamee, const std::string& model6fileName, const std::string& model7fileName, const std::string& modellowfileName, const std::string& 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