2 Copyright (C) 2003, 2010 - Wolfire Games
4 This file is part of Lugaru.
6 Lugaru is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 See the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #include "Quaternions.h"
27 #include "Constants.h"
30 /**> HEADER FILES <**/
32 #include "Quaternions.h"
88 int numverticesclothes;
98 void DoConstraint(bool spinny);
99 float rotate1,rotate2,rotate3;
100 float lastrotate1,lastrotate2,lastrotate3;
101 float oldrotate1,oldrotate2,oldrotate3;
102 float newrotate1,newrotate2,newrotate3;
135 Animation & operator = (const Animation & ani);
137 void Load(const char *fileName, int aheight, int aattack);
145 const int max_joints = 50;
151 //Joint joints[max_joints];
156 //Muscle muscles[max_muscles];
162 int forwardjoints[3];
167 int lowforwardjoints[3];
170 XYZ specialforward[5];
171 int jointlabels[max_joints];
180 Model drawmodelclothes;
185 GLubyte skinText[512*512*3];
199 void FindForwardsfirst();
200 float DoConstraints(XYZ *coords,float *scale);
201 void DoGravity(float *scale);
204 void Draw(int muscleview);
205 void AddJoint(float x, float y, float z, int which);
206 void SetJoint(float x, float y, float z, int which, int whichjoint);
207 void DeleteJoint(int whichjoint);
208 void AddMuscle(int attach1,int attach2,float maxlength,float minlength,int type);
209 void DeleteMuscle(int whichmuscle);
210 void FindRotationJoint(int which);
211 void FindRotationJointSameTwist(int which);
212 void FindRotationMuscle(int which, int animation);
213 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);