offset = endoffset;
offset.y = 0;
}
-
-Animation::~Animation()
-{
-}
Animation();
Animation(const std::string& fileName, anim_height_type aheight, anim_attack_type aattack);
- ~Animation();
};
#endif
visible(false),
parent(nullptr),
sametwist(false),
- label(0),
+ label(head),
hasgun(0),
delay(0)
{
#include "Quaternions.h"
#include <vector>
+enum bodypart {
+ head, neck,
+ leftshoulder, leftelbow, leftwrist, lefthand,
+ rightshoulder, rightelbow, rightwrist, righthand,
+ abdomen, lefthip, righthip, groin,
+ leftknee, leftankle, leftfoot,
+ rightknee, rightankle, rightfoot
+};
+
class Joint
{
public:
bool visible;
Joint* parent;
bool sametwist;
- int label;
+ bodypart label;
int hasgun;
float delay;
XYZ velchange;
strength = 0;
}
-Muscle::~Muscle()
-{
-}
-
void Muscle::load(FILE* tfile, int vertexNum, std::vector<Joint>& joints)
{
int numvertices, vertice, parentID;
float strength;
Muscle();
- ~Muscle();
void load(FILE* tfile, int vertexNum, std::vector<Joint>& joints);
void loadVerticesLow(FILE* tfile, int vertexNum);
void loadVerticesClothes(FILE* tfile, int vertexNum);
extern bool visibleloading;
-Skeleton::Skeleton()
+Skeleton::Skeleton() :
+ selected(0),
+ id(0),
+ num_models(0),
+ clothes(false),
+ spinny(false),
+ skinsize(0),
+ checkdelay(0),
+ longdead(0),
+ broken(false),
+ free(0),
+ oldfree(0),
+ freetime(0),
+ freefall(false)
{
- selected = 0;
-
memset(forwardjoints, 0, sizeof(forwardjoints));
-
- id = 0;
-
memset(lowforwardjoints, 0, sizeof(lowforwardjoints));
-
memset(jointlabels, 0, sizeof(jointlabels));
-
- num_models = 0;
-
- clothes = 0;
- spinny = 0;
-
memset(skinText, 0, sizeof(skinText));
- skinsize = 0;
-
- checkdelay = 0;
-
- longdead = 0;
- broken = 0;
-
- free = 0;
- oldfree = 0;
- freetime = 0;
- freefall = 0;
-}
-
-Skeleton::~Skeleton()
-{
}
/* EFFECT
#include "Animation/Joint.h"
#include "Animation/Muscle.h"
-enum bodyparts {
- head, neck,
- leftshoulder, leftelbow, leftwrist, lefthand,
- rightshoulder, rightelbow, rightwrist, righthand,
- abdomen, lefthip, righthip, groin,
- leftknee, leftankle, leftfoot,
- rightknee, rightankle, rightfoot
-};
-
const int max_joints = 50;
class Skeleton
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);
Skeleton();
- ~Skeleton();
private:
// convenience functions
/* EFFECT
*/
-void Person::FootLand(bodyparts whichfoot, float opacity)
+void Person::FootLand(bodypart whichfoot, float opacity)
{
if ((whichfoot != leftfoot) && (whichfoot != rightfoot)) {
cerr << "FootLand called on wrong bodypart" << endl;
int SphereCheck(XYZ *p1, float radius, XYZ *p, XYZ *move, float *rotate, Model *model);
int DrawSkeleton();
void Puff(int whichlabel);
- void FootLand(bodyparts whichfoot, float opacity);
+ void FootLand(bodypart whichfoot, float opacity);
void DoStuff();
void setAnimation(int);
void DoAnimations();