-
Notifications
You must be signed in to change notification settings - Fork 2
/
Model.h
86 lines (71 loc) · 1.24 KB
/
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef MODEL_H
#define MODEL_H
#include "quakedef.h"
class AliasShader {
public:
char name[64];
int index; //not used
int texnum;
};
class AliasSurfaceFrame {
public:
vec3_t *vertices;
vec3_t *normals;
};
class AliasTextureCoord {
public:
float s;
float t;
};
class AliasSurface {
public:
char name[64];
int flags; //not used yet
int numFrames;
int numShaders;
int numVerts;
int numIndices;
AliasShader *shaders;
vec3_t *indices;
AliasSurfaceFrame *vertexValues;
AliasTextureCoord *texCoords;
};
class AliasTag {
public:
char name[64];
vec3_t position;
vec3_t rotate[3];
};
class AliasFrame {
public:
vec3_t mins;
vec3_t maxs;
vec3_t position;
float radius;
char name[16];
};
class AliasHeader {
public:
char filename[64];
int flags; //not used (will be for particle trails etc)
int numFrames;
int numTags;
int numSurfaces;
int numSkins; //old model format leftovers, not used
AliasFrame *frames;
AliasTag *tags;
AliasSurface *surfaces;
};
typedef enum {
UNKNOWN, ALIAS, SPRITE, BRUSH
} ModelType;
class Model {
public:
ModelType type;
};
class AliasModel : public Model {
AliasHeader *data;
AliasModel();
static AliasModel *LoadMD3(void *buffer);
};
#endif /* MODEL_H */