diff options
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_types.h')
-rw-r--r-- | src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_types.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_types.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_types.h new file mode 100644 index 0000000..b2d9573 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_types.h | |||
@@ -0,0 +1,100 @@ | |||
1 | /* $Id:$ */ | ||
2 | |||
3 | /* | ||
4 | libg3d - 3D object loading library | ||
5 | |||
6 | Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de> | ||
7 | |||
8 | This library is free software; you can redistribute it and/or | ||
9 | modify it under the terms of the GNU Lesser General Public | ||
10 | License as published by the Free Software Foundation; either | ||
11 | version 2.1 of the License, or (at your option) any later version. | ||
12 | |||
13 | This library is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | Lesser General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU Lesser General Public | ||
19 | License along with this library; if not, write to the Free Software | ||
20 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | */ | ||
22 | #ifndef _IMP_BLEND_TYPES_H | ||
23 | #define _IMP_BLEND_TYPES_H | ||
24 | |||
25 | #include <g3d/types.h> | ||
26 | |||
27 | typedef struct { | ||
28 | gchar *name; | ||
29 | const gchar *tname; | ||
30 | guint32 tid; | ||
31 | gsize tsize; | ||
32 | gsize nitems; | ||
33 | gboolean ptr; | ||
34 | } BlendSdnaProperty; | ||
35 | |||
36 | typedef struct { | ||
37 | const gchar *name; | ||
38 | guint32 tid; | ||
39 | gsize size; | ||
40 | GSList *properties; | ||
41 | } BlendSdnaStruct; | ||
42 | |||
43 | typedef struct { | ||
44 | const BlendSdnaStruct *sstruct; | ||
45 | GHashTable *prophash; | ||
46 | } BlendSdnaData; | ||
47 | |||
48 | typedef enum { | ||
49 | T_CHAR = 0, | ||
50 | T_UCHAR = 1, | ||
51 | T_SHORT = 2, | ||
52 | T_USHORT = 3, | ||
53 | T_INT = 4, | ||
54 | T_LONG = 5, | ||
55 | T_ULONG = 6, | ||
56 | T_FLOAT = 7, | ||
57 | T_DOUBLE = 8, | ||
58 | T_VOID = 9, | ||
59 | T_STRUCT = 0xFF | ||
60 | } BlendSdnaPropType; | ||
61 | |||
62 | typedef struct { | ||
63 | gchar *name; | ||
64 | BlendSdnaPropType type; | ||
65 | BlendSdnaProperty *sprop; | ||
66 | guint32 *uval; /* unsigned integer value */ | ||
67 | gint32 *ival; /* signed integer value */ | ||
68 | G3DFloat *fval; /* floating point value */ | ||
69 | guint32 *pval; /* pointer value */ | ||
70 | BlendSdnaData *structval; /* struct value */ | ||
71 | } BlendSdnaPropData; | ||
72 | |||
73 | typedef struct { | ||
74 | guint32 n_names; | ||
75 | gchar **names; | ||
76 | guint32 n_types; | ||
77 | gchar **type_names; | ||
78 | guint32 *type_sizes; | ||
79 | GSList *structs; | ||
80 | } BlendSdna; | ||
81 | |||
82 | typedef struct { | ||
83 | G3DContext *context; | ||
84 | G3DModel *model; | ||
85 | G3DStream *stream; | ||
86 | guint32 flags; | ||
87 | BlendSdna *sdna; | ||
88 | } BlendGlobal; | ||
89 | |||
90 | typedef struct { | ||
91 | guint32 id; | ||
92 | guint32 len; | ||
93 | G3DObject *object; | ||
94 | G3DObject *grpobject; | ||
95 | guint32 object_id; | ||
96 | guint32 ndata; | ||
97 | BlendSdnaData **data; | ||
98 | } BlendLocal; | ||
99 | |||
100 | #endif | ||