forked from mangos/MaNGOS
/
model.h
53 lines (40 loc) · 876 Bytes
/
model.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef MODEL_H
#define MODEL_H
#include "loadlib/loadlib.h"
#include "vec3d.h"
//#include "mpq.h"
#include "modelheaders.h"
#include <vector>
class Model;
class WMOInstance;
class MPQFile;
Vec3D fixCoordSystem(Vec3D v);
class Model
{
public:
ModelHeader header;
uint32 offsBB_vertices, offsBB_indices;
Vec3D *BB_vertices, *vertices;
uint16 *BB_indices, *indices;
size_t nIndices;
bool open();
bool ConvertToVMAPModel(char * outfilename);
bool ok;
Model(std::string &filename);
~Model();
private:
std::string filename;
char outfilename;
};
class ModelInstance
{
public:
Model *model;
uint32 id;
Vec3D pos, rot;
unsigned int d1, scale;
float w,sc;
ModelInstance() {}
ModelInstance(MPQFile &f,const char* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile);
};
#endif