1 #ifndef __MODEL_IQM_H__
2 #define __MODEL_IQM_H__
4 typedef struct iqmheader_s
10 unsigned int num_text, ofs_text;
11 unsigned int num_meshes, ofs_meshes;
12 unsigned int num_vertexarrays, num_vertexes, ofs_vertexarrays;
13 unsigned int num_triangles, ofs_triangles, ofs_neighbors;
14 unsigned int num_joints, ofs_joints;
15 unsigned int num_poses, ofs_poses;
16 unsigned int num_anims, ofs_anims;
17 unsigned int num_frames, num_framechannels, ofs_frames, ofs_bounds;
18 unsigned int num_comment, ofs_comment;
19 unsigned int num_extensions, ofs_extensions;
23 typedef struct iqmmesh_s
26 unsigned int material;
27 unsigned int first_vertex, num_vertexes;
28 unsigned int first_triangle, num_triangles;
32 #define IQM_POSITION 0
33 #define IQM_TEXCOORD 1
36 #define IQM_BLENDINDEXES 4
37 #define IQM_BLENDWEIGHTS 5
39 #define IQM_CUSTOM 0x10
54 typedef struct iqmtriangle_s
56 unsigned int vertex[3];
60 typedef struct iqmjoint_s
64 float origin[3], rotation[3], scale[3];
68 typedef struct iqmpose_s
71 unsigned int channelmask;
72 float channeloffset[9], channelscale[9];
76 typedef struct iqmanim_s
79 unsigned int first_frame, num_frames;
85 typedef struct iqmvertexarray_s
95 typedef struct iqmextension_s
98 unsigned int num_data, ofs_data;
99 unsigned int ofs_extensions; // pointer to next extension
103 typedef struct iqmbounds_s
105 float mins[3], maxs[3];
106 float xyradius, radius;