DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
model_iqm.h
Go to the documentation of this file.
1#ifndef __MODEL_IQM_H__
2#define __MODEL_IQM_H__
3
4typedef struct iqmheader_s
5{
6 char id[16];
7 unsigned int version;
8 unsigned int filesize;
9 unsigned int flags;
10 unsigned int num_text, ofs_text;
11 unsigned int num_meshes, ofs_meshes;
14 unsigned int num_joints, ofs_joints;
15 unsigned int num_poses, ofs_poses;
16 unsigned int num_anims, ofs_anims;
18 unsigned int num_comment, ofs_comment;
20}
22
23typedef struct iqmmesh_s
24{
25 unsigned int name;
26 unsigned int material;
29}
31
32#define IQM_POSITION 0
33#define IQM_TEXCOORD 1
34#define IQM_NORMAL 2
35#define IQM_TANGENT 3
36#define IQM_BLENDINDEXES 4
37#define IQM_BLENDWEIGHTS 5
38#define IQM_COLOR 6
39#define IQM_CUSTOM 0x10
40
41#define IQM_BYTE 0
42#define IQM_UBYTE 1
43#define IQM_SHORT 2
44#define IQM_USHORT 3
45#define IQM_INT 4
46#define IQM_UINT 5
47#define IQM_HALF 6
48#define IQM_FLOAT 7
49#define IQM_DOUBLE 8
50
51// animflags
52#define IQM_LOOP 1
53
54typedef struct iqmtriangle_s
55{
56 unsigned int vertex[3];
57}
59
60typedef struct iqmjoint1_s
61{
62 unsigned int name;
63 signed int parent;
64 float origin[3], rotation[3], scale[3];
65}
67
68typedef struct iqmjoint_s
69{
70 unsigned int name;
71 signed int parent;
72 float origin[3], rotation[4], scale[3];
73}
75
76typedef struct iqmpose1_s
77{
78 signed int parent;
79 unsigned int channelmask;
81}
83
84typedef struct iqmpose_s
85{
86 signed int parent;
87 unsigned int channelmask;
89}
91
92typedef struct iqmanim_s
93{
94 unsigned int name;
95 unsigned int first_frame, num_frames;
96 float framerate;
97 unsigned int flags;
98}
100
101typedef struct iqmvertexarray_s
102{
103 unsigned int type;
104 unsigned int flags;
105 unsigned int format;
106 unsigned int size;
107 unsigned int offset;
108}
110
111typedef struct iqmextension_s
112{
113 unsigned int name;
114 unsigned int num_data, ofs_data;
115 unsigned int ofs_extensions; // pointer to next extension
116}
118
119typedef struct iqmbounds_s
120{
121 float mins[3], maxs[3];
123}
125
126#endif
127
float framerate
Definition model_iqm.h:96
unsigned int first_frame
Definition model_iqm.h:95
unsigned int name
Definition model_iqm.h:94
unsigned int flags
Definition model_iqm.h:97
unsigned int num_frames
Definition model_iqm.h:95
float maxs[3]
Definition model_iqm.h:121
float xyradius
Definition model_iqm.h:122
float mins[3]
Definition model_iqm.h:121
float radius
Definition model_iqm.h:122
unsigned int ofs_extensions
Definition model_iqm.h:115
unsigned int ofs_data
Definition model_iqm.h:114
unsigned int num_data
Definition model_iqm.h:114
unsigned int name
Definition model_iqm.h:113
unsigned int ofs_extensions
Definition model_iqm.h:19
unsigned int ofs_frames
Definition model_iqm.h:17
unsigned int ofs_anims
Definition model_iqm.h:16
unsigned int ofs_vertexarrays
Definition model_iqm.h:12
unsigned int filesize
Definition model_iqm.h:8
unsigned int ofs_text
Definition model_iqm.h:10
unsigned int num_frames
Definition model_iqm.h:17
unsigned int num_comment
Definition model_iqm.h:18
unsigned int ofs_joints
Definition model_iqm.h:14
unsigned int num_triangles
Definition model_iqm.h:13
unsigned int num_vertexarrays
Definition model_iqm.h:12
unsigned int num_text
Definition model_iqm.h:10
unsigned int ofs_bounds
Definition model_iqm.h:17
unsigned int num_framechannels
Definition model_iqm.h:17
unsigned int num_anims
Definition model_iqm.h:16
unsigned int ofs_neighbors
Definition model_iqm.h:13
unsigned int num_joints
Definition model_iqm.h:14
unsigned int num_vertexes
Definition model_iqm.h:12
unsigned int ofs_meshes
Definition model_iqm.h:11
unsigned int ofs_poses
Definition model_iqm.h:15
unsigned int num_poses
Definition model_iqm.h:15
unsigned int flags
Definition model_iqm.h:9
unsigned int ofs_comment
Definition model_iqm.h:18
unsigned int num_meshes
Definition model_iqm.h:11
unsigned int version
Definition model_iqm.h:7
unsigned int num_extensions
Definition model_iqm.h:19
unsigned int ofs_triangles
Definition model_iqm.h:13
float rotation[3]
Definition model_iqm.h:64
float origin[3]
Definition model_iqm.h:64
float scale[3]
Definition model_iqm.h:64
signed int parent
Definition model_iqm.h:63
unsigned int name
Definition model_iqm.h:62
float scale[3]
Definition model_iqm.h:72
float origin[3]
Definition model_iqm.h:72
unsigned int name
Definition model_iqm.h:70
signed int parent
Definition model_iqm.h:71
float rotation[4]
Definition model_iqm.h:72
unsigned int num_triangles
Definition model_iqm.h:28
unsigned int num_vertexes
Definition model_iqm.h:27
unsigned int material
Definition model_iqm.h:26
unsigned int name
Definition model_iqm.h:25
unsigned int first_vertex
Definition model_iqm.h:27
unsigned int first_triangle
Definition model_iqm.h:28
unsigned int channelmask
Definition model_iqm.h:79
float channeloffset[9]
Definition model_iqm.h:80
float channelscale[9]
Definition model_iqm.h:80
signed int parent
Definition model_iqm.h:78
unsigned int channelmask
Definition model_iqm.h:87
float channelscale[10]
Definition model_iqm.h:88
signed int parent
Definition model_iqm.h:86
float channeloffset[10]
Definition model_iqm.h:88
unsigned int vertex[3]
Definition model_iqm.h:56
unsigned int type
Definition model_iqm.h:103
unsigned int flags
Definition model_iqm.h:104
unsigned int offset
Definition model_iqm.h:107
unsigned int format
Definition model_iqm.h:105
unsigned int size
Definition model_iqm.h:106