123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- #ifndef __MODEL_MD3_H__
- #define __MODEL_MD3_H__
- #define MD3_IDENT (('3'<<24)+('P'<<16)+('D'<<8)+'I')
- #define MD3_VERSION 15
- #define SHADER_MAX_VERTEXES 1000
- #define SHADER_MAX_INDEXES (6*SHADER_MAX_VERTEXES)
- #define MD3_MAX_LODS 4
- #define MD3_MAX_TRIANGLES 8192 // per surface
- #define MD3_MAX_VERTS 4096 // per surface
- #define MD3_MAX_SHADERS 256 // per surface
- #define MD3_MAX_FRAMES 1024 // per model
- #define MD3_MAX_SURFACES 32 // per model
- #define MD3_MAX_TAGS 16 // per frame
- #define MAX_MD3PATH 64 // from quake3
- #define MD3_XYZ_SCALE (1.0/64)
- typedef struct md3Frame_s {
- idVec3 bounds[2];
- idVec3 localOrigin;
- float radius;
- char name[16];
- } md3Frame_t;
- typedef struct md3Tag_s {
- char name[MAX_MD3PATH];
- idVec3 origin;
- idVec3 axis[3];
- } md3Tag_t;
- typedef struct md3Surface_s {
- int ident;
- char name[MAX_MD3PATH];
- int flags;
- int numFrames;
- int numShaders;
- int numVerts;
- int numTriangles;
- int ofsTriangles;
- int ofsShaders;
- int ofsSt;
- int ofsXyzNormals;
- int ofsEnd;
- } md3Surface_t;
- typedef struct {
- char name[MAX_MD3PATH];
- const idMaterial * shader;
- } md3Shader_t;
- typedef struct {
- int indexes[3];
- } md3Triangle_t;
- typedef struct {
- float st[2];
- } md3St_t;
- typedef struct {
- short xyz[3];
- short normal;
- } md3XyzNormal_t;
- typedef struct md3Header_s {
- int ident;
- int version;
- char name[MAX_MD3PATH];
- int flags;
- int numFrames;
- int numTags;
- int numSurfaces;
- int numSkins;
- int ofsFrames;
- int ofsTags;
- int ofsSurfaces;
- int ofsEnd;
- } md3Header_t;
- #endif /* !__MODEL_MD3_H__ */
|