]> git.xonotic.org Git - xonotic/netradiant.git/blob - tools/quake2/qdata_heretic2/qd_skeletons.h
transfer from internal tree r5311 branches/1.4-gpl
[xonotic/netradiant.git] / tools / quake2 / qdata_heretic2 / qd_skeletons.h
1 /*\r
2 Copyright (C) 1999-2007 id Software, Inc. and contributors.\r
3 For a list of contributors, see the accompanying CONTRIBUTORS file.\r
4 \r
5 This file is part of GtkRadiant.\r
6 \r
7 GtkRadiant is free software; you can redistribute it and/or modify\r
8 it under the terms of the GNU General Public License as published by\r
9 the Free Software Foundation; either version 2 of the License, or\r
10 (at your option) any later version.\r
11 \r
12 GtkRadiant is distributed in the hope that it will be useful,\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15 GNU General Public License for more details.\r
16 \r
17 You should have received a copy of the GNU General Public License\r
18 along with GtkRadiant; if not, write to the Free Software\r
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
20 */\r
21 \r
22 #ifndef QD_SKELETONS_H\r
23 #define QD_SKELETONS_H\r
24 \r
25 #include "placement.h"\r
26 \r
27 \r
28 typedef struct Placement_d_s\r
29 {\r
30         vec3d_t origin;\r
31         vec3d_t direction;\r
32         vec3d_t up;\r
33 } Placement_d_t;\r
34 \r
35 typedef struct QD_SkeletalJoint_s\r
36 {\r
37         Placement_d_t placement;\r
38         vec3d_t         rotation;\r
39 } QD_SkeletalJoint_t;\r
40 \r
41 #define NUM_CLUSTERS 8\r
42 \r
43 typedef struct IntListNode_s\r
44 {\r
45         int data;\r
46         struct IntListNode_s *next;\r
47 } IntListNode_t;  // gaak\r
48 \r
49 typedef struct Skeletalfmheader_s\r
50 {\r
51         int type;\r
52         int clustered;\r
53         int references;\r
54 \r
55         int *clusters[NUM_CLUSTERS];\r
56         IntListNode_t *vertLists[NUM_CLUSTERS];\r
57         int num_verts[NUM_CLUSTERS + 1];\r
58         int new_num_verts[NUM_CLUSTERS + 1];\r
59 \r
60         float scaling[3];\r
61         float rotation[3];\r
62         float translation[3];\r
63 } Skeletalfmheader_t;\r
64 \r
65 #define SKELETAL_NAME_MAX 32\r
66 \r
67 extern Skeletalfmheader_t g_skelModel;\r
68 \r
69 void ClearSkeletalModel();\r
70 void GrabModelTransform(char *frame);\r
71 void GrabSkeletalFrame(char *frame);\r
72 void GrabReferencedFrame(char *frame);\r
73 \r
74 // Reference Stuff\r
75 #define NUM_REFERENCES 8\r
76 \r
77 #define REF_MAX_POINTS  16\r
78 #define REF_MAX_STRLEN  32\r
79 \r
80 // We're assuming no more than 16 reference points, with no more than 32 characters in the name\r
81 extern char RefPointNameList[REF_MAX_POINTS][REF_MAX_STRLEN];\r
82 extern int      RefPointNum;\r
83 \r
84 #endif\r