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 iqmjoint1_s
64 float origin[3], rotation[3], scale[3];
68 typedef struct iqmjoint_s
72 float origin[3], rotation[4], scale[3];
76 typedef struct iqmpose1_s
79 unsigned int channelmask;
80 float channeloffset[9], channelscale[9];
84 typedef struct iqmpose_s
87 unsigned int channelmask;
88 float channeloffset[10], channelscale[10];
92 typedef struct iqmanim_s
95 unsigned int first_frame, num_frames;
101 typedef struct iqmvertexarray_s
111 typedef struct iqmextension_s
114 unsigned int num_data, ofs_data;
115 unsigned int ofs_extensions; // pointer to next extension
119 typedef struct iqmbounds_s
121 float mins[3], maxs[3];
122 float xyradius, radius;