[4057] added: Line of sight (vmaps) [part 2] (last part)
[mangos-git.git] / contrib / vmap_extractor_v2 / vmapextract / model.h
blobfa8281c1d40c21198c0410357d72534839dbe8f3
1 #ifndef MODEL_H
2 #define MODEL_H
4 #include "vec3d.h"
5 #include "mpq.h"
6 #include "modelheaders.h"
7 //#include "quaternion.h"
8 #include <vector>
10 class Model;
11 class WMOInstance;
13 Vec3D fixCoordSystem(Vec3D v);
18 class Model
20 public:
21 ModelHeader header;
22 ModelAnimation *anims;
23 int *globalSequences;
25 public:
26 bool animGeometry,animTextures,animBones;
27 bool animated;
29 bool isAnimated(MPQFile &f);
30 ModelVertex *origVertices;
31 Vec3D *vertices, *normals;
32 uint16 *indices;
33 size_t nIndices;
35 bool open();
36 bool ConvertToVMAPModel(char * outfilename);
38 public:
40 bool ok;
41 bool ind;
43 float rad;
44 float trans;
45 bool animcalc;
46 int anim, animtime;
48 Model(std::string &filename);
49 ~Model();
51 private:
52 std::string filename;
53 char outfilename;
56 class ModelInstance
58 public:
59 Model *model;
61 int id;
63 Vec3D pos, rot;
64 unsigned int d1, scale;
66 float frot,w,sc;
68 int light;
69 Vec3D ldir;
70 Vec3D lcol;
72 ModelInstance() {}
73 ModelInstance(MPQFile &f,const char* ModelInstName,const char*MapName, FILE *pDirfile);
77 #endif