diff options
author | David Walter Seikel | 2016-03-29 02:16:55 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-03-29 02:16:55 +1000 |
commit | cb3716ffb584fe0f593b6f1669a8efdba1305104 (patch) | |
tree | 5d1ebc4b6fc17b30f4b34e7e64a2d9514893459b /src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf | |
parent | Add Prosody build script. (diff) | |
download | SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.zip SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.gz SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.bz2 SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.xz |
Added my version of libg3d and friends.
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf')
7 files changed, 1851 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile new file mode 100644 index 0000000..f8edad7 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile | |||
@@ -0,0 +1,512 @@ | |||
1 | # Makefile.in generated by automake 1.10.1 from Makefile.am. | ||
2 | # plugins/import/imp_3dmf/Makefile. Generated from Makefile.in by configure. | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
6 | # This Makefile.in is free software; the Free Software Foundation | ||
7 | # gives unlimited permission to copy and/or distribute it, | ||
8 | # with or without modifications, as long as this notice is preserved. | ||
9 | |||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
13 | # PARTICULAR PURPOSE. | ||
14 | |||
15 | |||
16 | |||
17 | |||
18 | pkgdatadir = $(datadir)/libg3d | ||
19 | pkglibdir = $(libdir)/libg3d | ||
20 | pkgincludedir = $(includedir)/libg3d | ||
21 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
22 | install_sh_DATA = $(install_sh) -c -m 644 | ||
23 | install_sh_PROGRAM = $(install_sh) -c | ||
24 | install_sh_SCRIPT = $(install_sh) -c | ||
25 | INSTALL_HEADER = $(INSTALL_DATA) | ||
26 | transform = $(program_transform_name) | ||
27 | NORMAL_INSTALL = : | ||
28 | PRE_INSTALL = : | ||
29 | POST_INSTALL = : | ||
30 | NORMAL_UNINSTALL = : | ||
31 | PRE_UNINSTALL = : | ||
32 | POST_UNINSTALL = : | ||
33 | build_triplet = x86_64-unknown-linux-gnu | ||
34 | host_triplet = x86_64-unknown-linux-gnu | ||
35 | subdir = plugins/import/imp_3dmf | ||
36 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
37 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
38 | am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ | ||
39 | $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ | ||
40 | $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
41 | $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ | ||
42 | $(top_srcdir)/configure.in | ||
43 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
44 | $(ACLOCAL_M4) | ||
45 | mkinstalldirs = $(install_sh) -d | ||
46 | CONFIG_HEADER = $(top_builddir)/include/g3d/config.h | ||
47 | CONFIG_CLEAN_FILES = | ||
48 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
49 | am__vpath_adj = case $$p in \ | ||
50 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
51 | *) f=$$p;; \ | ||
52 | esac; | ||
53 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | ||
54 | am__installdirs = "$(DESTDIR)$(pluginimpdir)" | ||
55 | pluginimpLTLIBRARIES_INSTALL = $(INSTALL) | ||
56 | LTLIBRARIES = $(pluginimp_LTLIBRARIES) | ||
57 | imp_3dmf_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_3dmf_la_OBJECTS = imp_3dmf.lo imp_3dmf_callbacks.lo | ||
59 | imp_3dmf_la_OBJECTS = $(am_imp_3dmf_la_OBJECTS) | ||
60 | DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d | ||
61 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
62 | am__depfiles_maybe = depfiles | ||
63 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
64 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
65 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
66 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
67 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
68 | CCLD = $(CC) | ||
69 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
70 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
71 | $(LDFLAGS) -o $@ | ||
72 | SOURCES = $(imp_3dmf_la_SOURCES) | ||
73 | DIST_SOURCES = $(imp_3dmf_la_SOURCES) | ||
74 | ETAGS = etags | ||
75 | CTAGS = ctags | ||
76 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
77 | ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10 | ||
78 | AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar | ||
79 | AR = ar | ||
80 | AS = as | ||
81 | AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf | ||
82 | AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader | ||
83 | AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10 | ||
84 | AWK = gawk | ||
85 | CC = gcc | ||
86 | CCDEPMODE = depmode=gcc3 | ||
87 | CFLAGS = -g -O2 | ||
88 | CPP = gcc -E | ||
89 | CPPFLAGS = | ||
90 | CXX = g++ | ||
91 | CXXCPP = g++ -E | ||
92 | CXXDEPMODE = depmode=gcc3 | ||
93 | CXXFLAGS = -g -O2 | ||
94 | CYGPATH_W = echo | ||
95 | DBG_CFLAGS = -O2 | ||
96 | DEBUG = 0 | ||
97 | DEFS = -DHAVE_CONFIG_H | ||
98 | DEPDIR = .deps | ||
99 | DLLTOOL = dlltool | ||
100 | ECHO = echo | ||
101 | ECHO_C = | ||
102 | ECHO_N = -n | ||
103 | ECHO_T = | ||
104 | EGREP = /bin/grep -E | ||
105 | EXEEXT = | ||
106 | F77 = | ||
107 | FFLAGS = | ||
108 | GDKPIXBUF_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 | ||
109 | GDKPIXBUF_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 | ||
110 | GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include | ||
111 | GLIB_GENMARSHAL = glib-genmarshal | ||
112 | GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
113 | GLIB_MKENUMS = glib-mkenums | ||
114 | GOBJECT_QUERY = gobject-query | ||
115 | GREP = /bin/grep | ||
116 | GTKDOC_CHECK = /usr/bin/gtkdoc-check | ||
117 | GTK_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 | ||
118 | GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 | ||
119 | HTML_DIR = ${datadir}/gtk-doc/html | ||
120 | INSTALL = /usr/bin/install -c | ||
121 | INSTALL_DATA = ${INSTALL} -m 644 | ||
122 | INSTALL_PROGRAM = ${INSTALL} | ||
123 | INSTALL_SCRIPT = ${INSTALL} | ||
124 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s | ||
125 | LDFLAGS = | ||
126 | LEX = flex | ||
127 | LEXLIB = -lfl | ||
128 | LEX_OUTPUT_ROOT = lex.yy | ||
129 | LIBGSF_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libgsf-1 | ||
130 | LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0 | ||
131 | LIBOBJS = | ||
132 | LIBS = -lm | ||
133 | LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet | ||
134 | LIBXML2_CFLAGS = -I/usr/include/libxml2 | ||
135 | LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
136 | LN_S = ln -s | ||
137 | LTLIBOBJS = | ||
138 | LTVERSION = 0:8:0 | ||
139 | MAGIC_LIBS = -lmagic | ||
140 | MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo | ||
141 | MATH_LIBS = -lm | ||
142 | MKDIR_P = /bin/mkdir -p | ||
143 | OBJDUMP = objdump | ||
144 | OBJEXT = o | ||
145 | PACKAGE = libg3d | ||
146 | PACKAGE_BUGREPORT = | ||
147 | PACKAGE_NAME = | ||
148 | PACKAGE_STRING = | ||
149 | PACKAGE_TARNAME = | ||
150 | PACKAGE_VERSION = | ||
151 | PATH_SEPARATOR = : | ||
152 | PKG_CONFIG = /usr/bin/pkg-config | ||
153 | PLUGINS_LDFLAGS = -avoid-version -export-dynamic | ||
154 | RANLIB = ranlib | ||
155 | SET_MAKE = | ||
156 | SHELL = /bin/bash | ||
157 | STRIP = strip | ||
158 | VERSION = 0.0.8 | ||
159 | XML2_CONFIG = /usr/bin/xml2-config | ||
160 | XML_CPPFLAGS = -I/usr/include/libxml2 | ||
161 | XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
162 | Z_CFLAGS = | ||
163 | Z_LIBS = -lz | ||
164 | abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf | ||
165 | abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf | ||
166 | abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
167 | abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
168 | ac_ct_CC = gcc | ||
169 | ac_ct_CXX = g++ | ||
170 | ac_ct_F77 = | ||
171 | am__include = include | ||
172 | am__leading_dot = . | ||
173 | am__quote = | ||
174 | am__tar = ${AMTAR} chof - "$$tardir" | ||
175 | am__untar = ${AMTAR} xf - | ||
176 | bindir = ${exec_prefix}/bin | ||
177 | build = x86_64-unknown-linux-gnu | ||
178 | build_alias = | ||
179 | build_cpu = x86_64 | ||
180 | build_os = linux-gnu | ||
181 | build_vendor = unknown | ||
182 | builddir = . | ||
183 | datadir = ${datarootdir} | ||
184 | datarootdir = ${prefix}/share | ||
185 | docdir = ${datarootdir}/doc/${PACKAGE} | ||
186 | dvidir = ${docdir} | ||
187 | exec_prefix = ${prefix} | ||
188 | host = x86_64-unknown-linux-gnu | ||
189 | host_alias = | ||
190 | host_cpu = x86_64 | ||
191 | host_os = linux-gnu | ||
192 | host_vendor = unknown | ||
193 | htmldir = ${docdir} | ||
194 | includedir = ${prefix}/include | ||
195 | infodir = ${datarootdir}/info | ||
196 | install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh | ||
197 | libdir = ${exec_prefix}/lib | ||
198 | libexecdir = ${exec_prefix}/libexec | ||
199 | localedir = ${datarootdir}/locale | ||
200 | localstatedir = ${prefix}/var | ||
201 | mandir = ${datarootdir}/man | ||
202 | mkdir_p = /bin/mkdir -p | ||
203 | oldincludedir = /usr/include | ||
204 | pdfdir = ${docdir} | ||
205 | prefix = /usr/local | ||
206 | program_transform_name = s,x,x, | ||
207 | psdir = ${docdir} | ||
208 | sbindir = ${exec_prefix}/sbin | ||
209 | sharedstatedir = ${prefix}/com | ||
210 | srcdir = . | ||
211 | sysconfdir = ${prefix}/etc | ||
212 | target_alias = | ||
213 | top_builddir = ../../.. | ||
214 | top_srcdir = ../../.. | ||
215 | pluginimpdir = $(pkglibdir)/plugins/import | ||
216 | pluginimp_LTLIBRARIES = imp_3dmf.la | ||
217 | AM_CFLAGS = \ | ||
218 | -Wall -ansi -pedantic \ | ||
219 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
220 | -O2 -DDEBUG=0 \ | ||
221 | -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include | ||
222 | |||
223 | INCLUDES = -I$(top_srcdir)/include | ||
224 | AM_LDFLAGS = \ | ||
225 | -no-undefined -module \ | ||
226 | -avoid-version -export-dynamic | ||
227 | |||
228 | imp_3dmf_la_SOURCES = imp_3dmf.c imp_3dmf_chunks.h \ | ||
229 | imp_3dmf_callbacks.c imp_3dmf_callbacks.h | ||
230 | |||
231 | imp_3dmf_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
232 | all: all-am | ||
233 | |||
234 | .SUFFIXES: | ||
235 | .SUFFIXES: .c .lo .o .obj | ||
236 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
237 | @for dep in $?; do \ | ||
238 | case '$(am__configure_deps)' in \ | ||
239 | *$$dep*) \ | ||
240 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
241 | && exit 0; \ | ||
242 | exit 1;; \ | ||
243 | esac; \ | ||
244 | done; \ | ||
245 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_3dmf/Makefile'; \ | ||
246 | cd $(top_srcdir) && \ | ||
247 | $(AUTOMAKE) --gnu plugins/import/imp_3dmf/Makefile | ||
248 | .PRECIOUS: Makefile | ||
249 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
250 | @case '$?' in \ | ||
251 | *config.status*) \ | ||
252 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
253 | *) \ | ||
254 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
255 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
256 | esac; | ||
257 | |||
258 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
259 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
260 | |||
261 | $(top_srcdir)/configure: $(am__configure_deps) | ||
262 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
263 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
264 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
265 | install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) | ||
266 | @$(NORMAL_INSTALL) | ||
267 | test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" | ||
268 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
269 | if test -f $$p; then \ | ||
270 | f=$(am__strip_dir) \ | ||
271 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ | ||
272 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ | ||
273 | else :; fi; \ | ||
274 | done | ||
275 | |||
276 | uninstall-pluginimpLTLIBRARIES: | ||
277 | @$(NORMAL_UNINSTALL) | ||
278 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
279 | p=$(am__strip_dir) \ | ||
280 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ | ||
281 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ | ||
282 | done | ||
283 | |||
284 | clean-pluginimpLTLIBRARIES: | ||
285 | -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) | ||
286 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
287 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
288 | test "$$dir" != "$$p" || dir=.; \ | ||
289 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
290 | rm -f "$${dir}/so_locations"; \ | ||
291 | done | ||
292 | imp_3dmf.la: $(imp_3dmf_la_OBJECTS) $(imp_3dmf_la_DEPENDENCIES) | ||
293 | $(LINK) -rpath $(pluginimpdir) $(imp_3dmf_la_OBJECTS) $(imp_3dmf_la_LIBADD) $(LIBS) | ||
294 | |||
295 | mostlyclean-compile: | ||
296 | -rm -f *.$(OBJEXT) | ||
297 | |||
298 | distclean-compile: | ||
299 | -rm -f *.tab.c | ||
300 | |||
301 | include ./$(DEPDIR)/imp_3dmf.Plo | ||
302 | include ./$(DEPDIR)/imp_3dmf_callbacks.Plo | ||
303 | |||
304 | .c.o: | ||
305 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
306 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
307 | # source='$<' object='$@' libtool=no \ | ||
308 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
309 | # $(COMPILE) -c $< | ||
310 | |||
311 | .c.obj: | ||
312 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
313 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
314 | # source='$<' object='$@' libtool=no \ | ||
315 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
316 | # $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
317 | |||
318 | .c.lo: | ||
319 | $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
320 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
321 | # source='$<' object='$@' libtool=yes \ | ||
322 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
323 | # $(LTCOMPILE) -c -o $@ $< | ||
324 | |||
325 | mostlyclean-libtool: | ||
326 | -rm -f *.lo | ||
327 | |||
328 | clean-libtool: | ||
329 | -rm -rf .libs _libs | ||
330 | |||
331 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
332 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
333 | unique=`for i in $$list; do \ | ||
334 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
335 | done | \ | ||
336 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
337 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
338 | mkid -fID $$unique | ||
339 | tags: TAGS | ||
340 | |||
341 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
342 | $(TAGS_FILES) $(LISP) | ||
343 | tags=; \ | ||
344 | here=`pwd`; \ | ||
345 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
346 | unique=`for i in $$list; do \ | ||
347 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
348 | done | \ | ||
349 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
350 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
351 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
352 | test -n "$$unique" || unique=$$empty_fix; \ | ||
353 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
354 | $$tags $$unique; \ | ||
355 | fi | ||
356 | ctags: CTAGS | ||
357 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
358 | $(TAGS_FILES) $(LISP) | ||
359 | tags=; \ | ||
360 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
361 | unique=`for i in $$list; do \ | ||
362 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
363 | done | \ | ||
364 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
365 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
366 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
367 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
368 | $$tags $$unique | ||
369 | |||
370 | GTAGS: | ||
371 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
372 | && cd $(top_srcdir) \ | ||
373 | && gtags -i $(GTAGS_ARGS) $$here | ||
374 | |||
375 | distclean-tags: | ||
376 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
377 | |||
378 | distdir: $(DISTFILES) | ||
379 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
380 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
381 | list='$(DISTFILES)'; \ | ||
382 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
383 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
384 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
385 | case $$dist_files in \ | ||
386 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
387 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
388 | sort -u` ;; \ | ||
389 | esac; \ | ||
390 | for file in $$dist_files; do \ | ||
391 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
392 | if test -d $$d/$$file; then \ | ||
393 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
394 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
395 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
396 | fi; \ | ||
397 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
398 | else \ | ||
399 | test -f $(distdir)/$$file \ | ||
400 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
401 | || exit 1; \ | ||
402 | fi; \ | ||
403 | done | ||
404 | check-am: all-am | ||
405 | check: check-am | ||
406 | all-am: Makefile $(LTLIBRARIES) | ||
407 | installdirs: | ||
408 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
409 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
410 | done | ||
411 | install: install-am | ||
412 | install-exec: install-exec-am | ||
413 | install-data: install-data-am | ||
414 | uninstall: uninstall-am | ||
415 | |||
416 | install-am: all-am | ||
417 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
418 | |||
419 | installcheck: installcheck-am | ||
420 | install-strip: | ||
421 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
422 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
423 | `test -z '$(STRIP)' || \ | ||
424 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
425 | mostlyclean-generic: | ||
426 | |||
427 | clean-generic: | ||
428 | |||
429 | distclean-generic: | ||
430 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
431 | |||
432 | maintainer-clean-generic: | ||
433 | @echo "This command is intended for maintainers to use" | ||
434 | @echo "it deletes files that may require special tools to rebuild." | ||
435 | clean: clean-am | ||
436 | |||
437 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
438 | mostlyclean-am | ||
439 | |||
440 | distclean: distclean-am | ||
441 | -rm -rf ./$(DEPDIR) | ||
442 | -rm -f Makefile | ||
443 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
444 | distclean-tags | ||
445 | |||
446 | dvi: dvi-am | ||
447 | |||
448 | dvi-am: | ||
449 | |||
450 | html: html-am | ||
451 | |||
452 | info: info-am | ||
453 | |||
454 | info-am: | ||
455 | |||
456 | install-data-am: install-pluginimpLTLIBRARIES | ||
457 | |||
458 | install-dvi: install-dvi-am | ||
459 | |||
460 | install-exec-am: | ||
461 | |||
462 | install-html: install-html-am | ||
463 | |||
464 | install-info: install-info-am | ||
465 | |||
466 | install-man: | ||
467 | |||
468 | install-pdf: install-pdf-am | ||
469 | |||
470 | install-ps: install-ps-am | ||
471 | |||
472 | installcheck-am: | ||
473 | |||
474 | maintainer-clean: maintainer-clean-am | ||
475 | -rm -rf ./$(DEPDIR) | ||
476 | -rm -f Makefile | ||
477 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
478 | |||
479 | mostlyclean: mostlyclean-am | ||
480 | |||
481 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
482 | mostlyclean-libtool | ||
483 | |||
484 | pdf: pdf-am | ||
485 | |||
486 | pdf-am: | ||
487 | |||
488 | ps: ps-am | ||
489 | |||
490 | ps-am: | ||
491 | |||
492 | uninstall-am: uninstall-pluginimpLTLIBRARIES | ||
493 | |||
494 | .MAKE: install-am install-strip | ||
495 | |||
496 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
497 | clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ | ||
498 | distclean-compile distclean-generic distclean-libtool \ | ||
499 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
500 | install install-am install-data install-data-am install-dvi \ | ||
501 | install-dvi-am install-exec install-exec-am install-html \ | ||
502 | install-html-am install-info install-info-am install-man \ | ||
503 | install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ | ||
504 | install-ps install-ps-am install-strip installcheck \ | ||
505 | installcheck-am installdirs maintainer-clean \ | ||
506 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
507 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
508 | tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES | ||
509 | |||
510 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
511 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
512 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.am new file mode 100644 index 0000000..a21a13a --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.am | |||
@@ -0,0 +1,21 @@ | |||
1 | pluginimpdir = $(pkglibdir)/plugins/import | ||
2 | |||
3 | pluginimp_LTLIBRARIES = imp_3dmf.la | ||
4 | |||
5 | AM_CFLAGS = \ | ||
6 | -Wall -ansi -pedantic \ | ||
7 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
8 | @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ | ||
9 | @GLIB_CFLAGS@ | ||
10 | |||
11 | INCLUDES = -I$(top_srcdir)/include | ||
12 | |||
13 | AM_LDFLAGS = \ | ||
14 | -no-undefined -module \ | ||
15 | @PLUGINS_LDFLAGS@ | ||
16 | |||
17 | LIBTOOL += --quiet | ||
18 | |||
19 | imp_3dmf_la_SOURCES = imp_3dmf.c imp_3dmf_chunks.h \ | ||
20 | imp_3dmf_callbacks.c imp_3dmf_callbacks.h | ||
21 | imp_3dmf_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.in new file mode 100644 index 0000000..ac192df --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.in | |||
@@ -0,0 +1,512 @@ | |||
1 | # Makefile.in generated by automake 1.10.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
6 | # This Makefile.in is free software; the Free Software Foundation | ||
7 | # gives unlimited permission to copy and/or distribute it, | ||
8 | # with or without modifications, as long as this notice is preserved. | ||
9 | |||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
13 | # PARTICULAR PURPOSE. | ||
14 | |||
15 | @SET_MAKE@ | ||
16 | |||
17 | VPATH = @srcdir@ | ||
18 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
19 | pkglibdir = $(libdir)/@PACKAGE@ | ||
20 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
21 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
22 | install_sh_DATA = $(install_sh) -c -m 644 | ||
23 | install_sh_PROGRAM = $(install_sh) -c | ||
24 | install_sh_SCRIPT = $(install_sh) -c | ||
25 | INSTALL_HEADER = $(INSTALL_DATA) | ||
26 | transform = $(program_transform_name) | ||
27 | NORMAL_INSTALL = : | ||
28 | PRE_INSTALL = : | ||
29 | POST_INSTALL = : | ||
30 | NORMAL_UNINSTALL = : | ||
31 | PRE_UNINSTALL = : | ||
32 | POST_UNINSTALL = : | ||
33 | build_triplet = @build@ | ||
34 | host_triplet = @host@ | ||
35 | subdir = plugins/import/imp_3dmf | ||
36 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
37 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
38 | am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ | ||
39 | $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ | ||
40 | $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
41 | $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ | ||
42 | $(top_srcdir)/configure.in | ||
43 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
44 | $(ACLOCAL_M4) | ||
45 | mkinstalldirs = $(install_sh) -d | ||
46 | CONFIG_HEADER = $(top_builddir)/include/g3d/config.h | ||
47 | CONFIG_CLEAN_FILES = | ||
48 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
49 | am__vpath_adj = case $$p in \ | ||
50 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
51 | *) f=$$p;; \ | ||
52 | esac; | ||
53 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | ||
54 | am__installdirs = "$(DESTDIR)$(pluginimpdir)" | ||
55 | pluginimpLTLIBRARIES_INSTALL = $(INSTALL) | ||
56 | LTLIBRARIES = $(pluginimp_LTLIBRARIES) | ||
57 | imp_3dmf_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_3dmf_la_OBJECTS = imp_3dmf.lo imp_3dmf_callbacks.lo | ||
59 | imp_3dmf_la_OBJECTS = $(am_imp_3dmf_la_OBJECTS) | ||
60 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d | ||
61 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
62 | am__depfiles_maybe = depfiles | ||
63 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
64 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
65 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
66 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
67 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
68 | CCLD = $(CC) | ||
69 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
70 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
71 | $(LDFLAGS) -o $@ | ||
72 | SOURCES = $(imp_3dmf_la_SOURCES) | ||
73 | DIST_SOURCES = $(imp_3dmf_la_SOURCES) | ||
74 | ETAGS = etags | ||
75 | CTAGS = ctags | ||
76 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
77 | ACLOCAL = @ACLOCAL@ | ||
78 | AMTAR = @AMTAR@ | ||
79 | AR = @AR@ | ||
80 | AS = @AS@ | ||
81 | AUTOCONF = @AUTOCONF@ | ||
82 | AUTOHEADER = @AUTOHEADER@ | ||
83 | AUTOMAKE = @AUTOMAKE@ | ||
84 | AWK = @AWK@ | ||
85 | CC = @CC@ | ||
86 | CCDEPMODE = @CCDEPMODE@ | ||
87 | CFLAGS = @CFLAGS@ | ||
88 | CPP = @CPP@ | ||
89 | CPPFLAGS = @CPPFLAGS@ | ||
90 | CXX = @CXX@ | ||
91 | CXXCPP = @CXXCPP@ | ||
92 | CXXDEPMODE = @CXXDEPMODE@ | ||
93 | CXXFLAGS = @CXXFLAGS@ | ||
94 | CYGPATH_W = @CYGPATH_W@ | ||
95 | DBG_CFLAGS = @DBG_CFLAGS@ | ||
96 | DEBUG = @DEBUG@ | ||
97 | DEFS = @DEFS@ | ||
98 | DEPDIR = @DEPDIR@ | ||
99 | DLLTOOL = @DLLTOOL@ | ||
100 | ECHO = @ECHO@ | ||
101 | ECHO_C = @ECHO_C@ | ||
102 | ECHO_N = @ECHO_N@ | ||
103 | ECHO_T = @ECHO_T@ | ||
104 | EGREP = @EGREP@ | ||
105 | EXEEXT = @EXEEXT@ | ||
106 | F77 = @F77@ | ||
107 | FFLAGS = @FFLAGS@ | ||
108 | GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ | ||
109 | GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ | ||
110 | GLIB_CFLAGS = @GLIB_CFLAGS@ | ||
111 | GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ | ||
112 | GLIB_LIBS = @GLIB_LIBS@ | ||
113 | GLIB_MKENUMS = @GLIB_MKENUMS@ | ||
114 | GOBJECT_QUERY = @GOBJECT_QUERY@ | ||
115 | GREP = @GREP@ | ||
116 | GTKDOC_CHECK = @GTKDOC_CHECK@ | ||
117 | GTK_CFLAGS = @GTK_CFLAGS@ | ||
118 | GTK_LIBS = @GTK_LIBS@ | ||
119 | HTML_DIR = @HTML_DIR@ | ||
120 | INSTALL = @INSTALL@ | ||
121 | INSTALL_DATA = @INSTALL_DATA@ | ||
122 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
123 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
124 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
125 | LDFLAGS = @LDFLAGS@ | ||
126 | LEX = @LEX@ | ||
127 | LEXLIB = @LEXLIB@ | ||
128 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
129 | LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ | ||
130 | LIBGSF_LIBS = @LIBGSF_LIBS@ | ||
131 | LIBOBJS = @LIBOBJS@ | ||
132 | LIBS = @LIBS@ | ||
133 | LIBTOOL = @LIBTOOL@ --quiet | ||
134 | LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ | ||
135 | LIBXML2_LIBS = @LIBXML2_LIBS@ | ||
136 | LN_S = @LN_S@ | ||
137 | LTLIBOBJS = @LTLIBOBJS@ | ||
138 | LTVERSION = @LTVERSION@ | ||
139 | MAGIC_LIBS = @MAGIC_LIBS@ | ||
140 | MAKEINFO = @MAKEINFO@ | ||
141 | MATH_LIBS = @MATH_LIBS@ | ||
142 | MKDIR_P = @MKDIR_P@ | ||
143 | OBJDUMP = @OBJDUMP@ | ||
144 | OBJEXT = @OBJEXT@ | ||
145 | PACKAGE = @PACKAGE@ | ||
146 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
147 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
148 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
149 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
150 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
151 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
152 | PKG_CONFIG = @PKG_CONFIG@ | ||
153 | PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@ | ||
154 | RANLIB = @RANLIB@ | ||
155 | SET_MAKE = @SET_MAKE@ | ||
156 | SHELL = @SHELL@ | ||
157 | STRIP = @STRIP@ | ||
158 | VERSION = @VERSION@ | ||
159 | XML2_CONFIG = @XML2_CONFIG@ | ||
160 | XML_CPPFLAGS = @XML_CPPFLAGS@ | ||
161 | XML_LIBS = @XML_LIBS@ | ||
162 | Z_CFLAGS = @Z_CFLAGS@ | ||
163 | Z_LIBS = @Z_LIBS@ | ||
164 | abs_builddir = @abs_builddir@ | ||
165 | abs_srcdir = @abs_srcdir@ | ||
166 | abs_top_builddir = @abs_top_builddir@ | ||
167 | abs_top_srcdir = @abs_top_srcdir@ | ||
168 | ac_ct_CC = @ac_ct_CC@ | ||
169 | ac_ct_CXX = @ac_ct_CXX@ | ||
170 | ac_ct_F77 = @ac_ct_F77@ | ||
171 | am__include = @am__include@ | ||
172 | am__leading_dot = @am__leading_dot@ | ||
173 | am__quote = @am__quote@ | ||
174 | am__tar = @am__tar@ | ||
175 | am__untar = @am__untar@ | ||
176 | bindir = @bindir@ | ||
177 | build = @build@ | ||
178 | build_alias = @build_alias@ | ||
179 | build_cpu = @build_cpu@ | ||
180 | build_os = @build_os@ | ||
181 | build_vendor = @build_vendor@ | ||
182 | builddir = @builddir@ | ||
183 | datadir = @datadir@ | ||
184 | datarootdir = @datarootdir@ | ||
185 | docdir = @docdir@ | ||
186 | dvidir = @dvidir@ | ||
187 | exec_prefix = @exec_prefix@ | ||
188 | host = @host@ | ||
189 | host_alias = @host_alias@ | ||
190 | host_cpu = @host_cpu@ | ||
191 | host_os = @host_os@ | ||
192 | host_vendor = @host_vendor@ | ||
193 | htmldir = @htmldir@ | ||
194 | includedir = @includedir@ | ||
195 | infodir = @infodir@ | ||
196 | install_sh = @install_sh@ | ||
197 | libdir = @libdir@ | ||
198 | libexecdir = @libexecdir@ | ||
199 | localedir = @localedir@ | ||
200 | localstatedir = @localstatedir@ | ||
201 | mandir = @mandir@ | ||
202 | mkdir_p = @mkdir_p@ | ||
203 | oldincludedir = @oldincludedir@ | ||
204 | pdfdir = @pdfdir@ | ||
205 | prefix = @prefix@ | ||
206 | program_transform_name = @program_transform_name@ | ||
207 | psdir = @psdir@ | ||
208 | sbindir = @sbindir@ | ||
209 | sharedstatedir = @sharedstatedir@ | ||
210 | srcdir = @srcdir@ | ||
211 | sysconfdir = @sysconfdir@ | ||
212 | target_alias = @target_alias@ | ||
213 | top_builddir = @top_builddir@ | ||
214 | top_srcdir = @top_srcdir@ | ||
215 | pluginimpdir = $(pkglibdir)/plugins/import | ||
216 | pluginimp_LTLIBRARIES = imp_3dmf.la | ||
217 | AM_CFLAGS = \ | ||
218 | -Wall -ansi -pedantic \ | ||
219 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
220 | @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ | ||
221 | @GLIB_CFLAGS@ | ||
222 | |||
223 | INCLUDES = -I$(top_srcdir)/include | ||
224 | AM_LDFLAGS = \ | ||
225 | -no-undefined -module \ | ||
226 | @PLUGINS_LDFLAGS@ | ||
227 | |||
228 | imp_3dmf_la_SOURCES = imp_3dmf.c imp_3dmf_chunks.h \ | ||
229 | imp_3dmf_callbacks.c imp_3dmf_callbacks.h | ||
230 | |||
231 | imp_3dmf_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
232 | all: all-am | ||
233 | |||
234 | .SUFFIXES: | ||
235 | .SUFFIXES: .c .lo .o .obj | ||
236 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
237 | @for dep in $?; do \ | ||
238 | case '$(am__configure_deps)' in \ | ||
239 | *$$dep*) \ | ||
240 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
241 | && exit 0; \ | ||
242 | exit 1;; \ | ||
243 | esac; \ | ||
244 | done; \ | ||
245 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_3dmf/Makefile'; \ | ||
246 | cd $(top_srcdir) && \ | ||
247 | $(AUTOMAKE) --gnu plugins/import/imp_3dmf/Makefile | ||
248 | .PRECIOUS: Makefile | ||
249 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
250 | @case '$?' in \ | ||
251 | *config.status*) \ | ||
252 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
253 | *) \ | ||
254 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
255 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
256 | esac; | ||
257 | |||
258 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
259 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
260 | |||
261 | $(top_srcdir)/configure: $(am__configure_deps) | ||
262 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
263 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
264 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
265 | install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) | ||
266 | @$(NORMAL_INSTALL) | ||
267 | test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" | ||
268 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
269 | if test -f $$p; then \ | ||
270 | f=$(am__strip_dir) \ | ||
271 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ | ||
272 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ | ||
273 | else :; fi; \ | ||
274 | done | ||
275 | |||
276 | uninstall-pluginimpLTLIBRARIES: | ||
277 | @$(NORMAL_UNINSTALL) | ||
278 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
279 | p=$(am__strip_dir) \ | ||
280 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ | ||
281 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ | ||
282 | done | ||
283 | |||
284 | clean-pluginimpLTLIBRARIES: | ||
285 | -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) | ||
286 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
287 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
288 | test "$$dir" != "$$p" || dir=.; \ | ||
289 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
290 | rm -f "$${dir}/so_locations"; \ | ||
291 | done | ||
292 | imp_3dmf.la: $(imp_3dmf_la_OBJECTS) $(imp_3dmf_la_DEPENDENCIES) | ||
293 | $(LINK) -rpath $(pluginimpdir) $(imp_3dmf_la_OBJECTS) $(imp_3dmf_la_LIBADD) $(LIBS) | ||
294 | |||
295 | mostlyclean-compile: | ||
296 | -rm -f *.$(OBJEXT) | ||
297 | |||
298 | distclean-compile: | ||
299 | -rm -f *.tab.c | ||
300 | |||
301 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_3dmf.Plo@am__quote@ | ||
302 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_3dmf_callbacks.Plo@am__quote@ | ||
303 | |||
304 | .c.o: | ||
305 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
306 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
307 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
308 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
309 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
310 | |||
311 | .c.obj: | ||
312 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
313 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
314 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
315 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
316 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
317 | |||
318 | .c.lo: | ||
319 | @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
320 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
321 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
322 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
323 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
324 | |||
325 | mostlyclean-libtool: | ||
326 | -rm -f *.lo | ||
327 | |||
328 | clean-libtool: | ||
329 | -rm -rf .libs _libs | ||
330 | |||
331 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
332 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
333 | unique=`for i in $$list; do \ | ||
334 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
335 | done | \ | ||
336 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
337 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
338 | mkid -fID $$unique | ||
339 | tags: TAGS | ||
340 | |||
341 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
342 | $(TAGS_FILES) $(LISP) | ||
343 | tags=; \ | ||
344 | here=`pwd`; \ | ||
345 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
346 | unique=`for i in $$list; do \ | ||
347 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
348 | done | \ | ||
349 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
350 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
351 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
352 | test -n "$$unique" || unique=$$empty_fix; \ | ||
353 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
354 | $$tags $$unique; \ | ||
355 | fi | ||
356 | ctags: CTAGS | ||
357 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
358 | $(TAGS_FILES) $(LISP) | ||
359 | tags=; \ | ||
360 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
361 | unique=`for i in $$list; do \ | ||
362 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
363 | done | \ | ||
364 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
365 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
366 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
367 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
368 | $$tags $$unique | ||
369 | |||
370 | GTAGS: | ||
371 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
372 | && cd $(top_srcdir) \ | ||
373 | && gtags -i $(GTAGS_ARGS) $$here | ||
374 | |||
375 | distclean-tags: | ||
376 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
377 | |||
378 | distdir: $(DISTFILES) | ||
379 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
380 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
381 | list='$(DISTFILES)'; \ | ||
382 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
383 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
384 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
385 | case $$dist_files in \ | ||
386 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
387 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
388 | sort -u` ;; \ | ||
389 | esac; \ | ||
390 | for file in $$dist_files; do \ | ||
391 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
392 | if test -d $$d/$$file; then \ | ||
393 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
394 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
395 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
396 | fi; \ | ||
397 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
398 | else \ | ||
399 | test -f $(distdir)/$$file \ | ||
400 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
401 | || exit 1; \ | ||
402 | fi; \ | ||
403 | done | ||
404 | check-am: all-am | ||
405 | check: check-am | ||
406 | all-am: Makefile $(LTLIBRARIES) | ||
407 | installdirs: | ||
408 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
409 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
410 | done | ||
411 | install: install-am | ||
412 | install-exec: install-exec-am | ||
413 | install-data: install-data-am | ||
414 | uninstall: uninstall-am | ||
415 | |||
416 | install-am: all-am | ||
417 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
418 | |||
419 | installcheck: installcheck-am | ||
420 | install-strip: | ||
421 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
422 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
423 | `test -z '$(STRIP)' || \ | ||
424 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
425 | mostlyclean-generic: | ||
426 | |||
427 | clean-generic: | ||
428 | |||
429 | distclean-generic: | ||
430 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
431 | |||
432 | maintainer-clean-generic: | ||
433 | @echo "This command is intended for maintainers to use" | ||
434 | @echo "it deletes files that may require special tools to rebuild." | ||
435 | clean: clean-am | ||
436 | |||
437 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
438 | mostlyclean-am | ||
439 | |||
440 | distclean: distclean-am | ||
441 | -rm -rf ./$(DEPDIR) | ||
442 | -rm -f Makefile | ||
443 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
444 | distclean-tags | ||
445 | |||
446 | dvi: dvi-am | ||
447 | |||
448 | dvi-am: | ||
449 | |||
450 | html: html-am | ||
451 | |||
452 | info: info-am | ||
453 | |||
454 | info-am: | ||
455 | |||
456 | install-data-am: install-pluginimpLTLIBRARIES | ||
457 | |||
458 | install-dvi: install-dvi-am | ||
459 | |||
460 | install-exec-am: | ||
461 | |||
462 | install-html: install-html-am | ||
463 | |||
464 | install-info: install-info-am | ||
465 | |||
466 | install-man: | ||
467 | |||
468 | install-pdf: install-pdf-am | ||
469 | |||
470 | install-ps: install-ps-am | ||
471 | |||
472 | installcheck-am: | ||
473 | |||
474 | maintainer-clean: maintainer-clean-am | ||
475 | -rm -rf ./$(DEPDIR) | ||
476 | -rm -f Makefile | ||
477 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
478 | |||
479 | mostlyclean: mostlyclean-am | ||
480 | |||
481 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
482 | mostlyclean-libtool | ||
483 | |||
484 | pdf: pdf-am | ||
485 | |||
486 | pdf-am: | ||
487 | |||
488 | ps: ps-am | ||
489 | |||
490 | ps-am: | ||
491 | |||
492 | uninstall-am: uninstall-pluginimpLTLIBRARIES | ||
493 | |||
494 | .MAKE: install-am install-strip | ||
495 | |||
496 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
497 | clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ | ||
498 | distclean-compile distclean-generic distclean-libtool \ | ||
499 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
500 | install install-am install-data install-data-am install-dvi \ | ||
501 | install-dvi-am install-exec install-exec-am install-html \ | ||
502 | install-html-am install-info install-info-am install-man \ | ||
503 | install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ | ||
504 | install-ps install-ps-am install-strip installcheck \ | ||
505 | installcheck-am installdirs maintainer-clean \ | ||
506 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
507 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
508 | tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES | ||
509 | |||
510 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
511 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
512 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf.c new file mode 100644 index 0000000..82a46d3 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf.c | |||
@@ -0,0 +1,646 @@ | |||
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 | |||
23 | #include <string.h> | ||
24 | |||
25 | #include <g3d/types.h> | ||
26 | #include <g3d/context.h> | ||
27 | #include <g3d/stream.h> | ||
28 | #include <g3d/object.h> | ||
29 | #include <g3d/vector.h> | ||
30 | #include <g3d/matrix.h> | ||
31 | #include <g3d/material.h> | ||
32 | #include <g3d/iff.h> | ||
33 | #include <g3d/debug.h> | ||
34 | |||
35 | #include "imp_3dmf_chunks.h" | ||
36 | |||
37 | #define X3DMF_CHUNK_CHAR(id, shift) \ | ||
38 | ((((id) >> (shift)) & 0xFF) == 0) ? \ | ||
39 | ' ' : ((id) >> (shift)) & 0xFF | ||
40 | |||
41 | typedef struct { | ||
42 | guint32 id; | ||
43 | guint32 offset; | ||
44 | guint32 type; | ||
45 | } | ||
46 | X3dmfTocEntry; | ||
47 | |||
48 | typedef struct { | ||
49 | guint32 num_entries; | ||
50 | X3dmfTocEntry *entries; | ||
51 | } | ||
52 | X3dmfToc; | ||
53 | |||
54 | |||
55 | static gboolean x3dmf_read_container(G3DStream *stream, guint32 length, | ||
56 | G3DModel *model, G3DObject *object, guint32 level, X3dmfToc *toc, | ||
57 | G3DContext *context); | ||
58 | static X3dmfToc *x3dmf_read_toc(G3DStream *stream, X3dmfToc *prev_toc, | ||
59 | G3DContext *context); | ||
60 | |||
61 | EAPI | ||
62 | gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, | ||
63 | G3DModel *model, gpointer user_data) | ||
64 | { | ||
65 | guint32 id, flags, tocloc, pos; | ||
66 | gsize len; | ||
67 | guint16 ver_min, ver_maj; | ||
68 | gchar txthead[10]; | ||
69 | X3dmfToc *toc = NULL; | ||
70 | |||
71 | g3d_iff_read_chunk(stream, &id, &len, 0); | ||
72 | if((id != G3D_IFF_MKID('3', 'D', 'M', 'F')) || (len != 16)) { | ||
73 | g3d_stream_seek(stream, 0, G_SEEK_SET); | ||
74 | g3d_stream_read(stream, txthead, 10); | ||
75 | if(strncmp(txthead, "3DMetafile", 10) == 0) { | ||
76 | g_warning("file %s is an ASCII 3D Metafile (unhandled)\n", | ||
77 | stream->uri); | ||
78 | } else { | ||
79 | g_warning("file %s is not a 3D Metafile\n", stream->uri); | ||
80 | } | ||
81 | return FALSE; | ||
82 | } | ||
83 | |||
84 | ver_maj = g3d_stream_read_int16_be(stream); | ||
85 | ver_min = g3d_stream_read_int16_be(stream); | ||
86 | |||
87 | flags = g3d_stream_read_int32_be(stream); | ||
88 | |||
89 | g3d_stream_skip(stream, 4); /* FIXME: 64bit file offsets */ | ||
90 | tocloc = g3d_stream_read_int32_be(stream); | ||
91 | |||
92 | /* read TOC if available */ | ||
93 | if(tocloc > 0) { | ||
94 | pos = g3d_stream_tell(stream); | ||
95 | g3d_stream_seek(stream, tocloc, G_SEEK_SET); | ||
96 | toc = x3dmf_read_toc(stream, NULL, context); | ||
97 | g3d_stream_seek(stream, pos, G_SEEK_SET); | ||
98 | } | ||
99 | |||
100 | #if DEBUG > 0 | ||
101 | g_debug("3DMF: version %d.%d (0x%08x) TOC @ 0x%08x", | ||
102 | ver_maj, ver_min, flags, tocloc); | ||
103 | #endif | ||
104 | |||
105 | x3dmf_read_container(stream, (guint32) -1, model, NULL, 0, toc, context); | ||
106 | |||
107 | return TRUE; | ||
108 | } | ||
109 | |||
110 | EAPI | ||
111 | gchar *plugin_description(void) | ||
112 | { | ||
113 | return g_strdup("3D Metafiles."); | ||
114 | } | ||
115 | |||
116 | EAPI | ||
117 | gchar **plugin_extensions(void) | ||
118 | { | ||
119 | return g_strsplit("b3d:3mf:3dmf", ":", 0); | ||
120 | } | ||
121 | |||
122 | /****************************************************************************** | ||
123 | * 3DMF specific | ||
124 | */ | ||
125 | |||
126 | static X3dmfChunkDesc *x3dmf_get_chunk_info(guint32 id) | ||
127 | { | ||
128 | gint32 i; | ||
129 | |||
130 | for(i = 0; x3dmf_chunks[i].id != 0; i ++) | ||
131 | if(x3dmf_chunks[i].id == id) | ||
132 | return &(x3dmf_chunks[i]); | ||
133 | return NULL; | ||
134 | } | ||
135 | |||
136 | static X3dmfToc *x3dmf_read_toc(G3DStream *stream, X3dmfToc *prev_toc, | ||
137 | G3DContext *context) | ||
138 | { | ||
139 | X3dmfToc *toc; | ||
140 | guint32 off_next_toc, typeseed, refseed, entrytype, entrysize, nentries; | ||
141 | guint32 noff, i; | ||
142 | |||
143 | if(prev_toc) | ||
144 | toc = prev_toc; | ||
145 | else | ||
146 | toc = g_new0(X3dmfToc, 1); | ||
147 | |||
148 | /* skip tag and size (FIXME) */ | ||
149 | g3d_stream_skip(stream, 8); | ||
150 | |||
151 | g3d_stream_skip(stream, 4); /* FIXME: 64bit file offsets */ | ||
152 | off_next_toc = g3d_stream_read_int32_be(stream); | ||
153 | typeseed = g3d_stream_read_int32_be(stream); | ||
154 | refseed = g3d_stream_read_int32_be(stream); | ||
155 | entrytype = g3d_stream_read_int32_be(stream); | ||
156 | entrysize = g3d_stream_read_int32_be(stream); | ||
157 | nentries = g3d_stream_read_int32_be(stream); | ||
158 | |||
159 | /* resize entry array */ | ||
160 | noff = toc->num_entries; | ||
161 | toc->num_entries += nentries; | ||
162 | toc->entries = (X3dmfTocEntry *)g_realloc(toc->entries, | ||
163 | toc->num_entries * sizeof(X3dmfTocEntry)); | ||
164 | |||
165 | /* read TOC entries */ | ||
166 | for(i = 0; i < nentries; i ++) { | ||
167 | toc->entries[noff + i].id = g3d_stream_read_int32_be(stream); | ||
168 | g3d_stream_skip(stream, 4); /* FIXME: 64bit file offsets */ | ||
169 | toc->entries[noff + i].offset = g3d_stream_read_int32_be(stream); | ||
170 | |||
171 | if((entrytype == 1) && (entrysize == 16)) { | ||
172 | toc->entries[noff + i].type = g3d_stream_read_int32_be(stream); | ||
173 | } | ||
174 | #if DEBUG > 0 | ||
175 | g_debug("3DMF: TOC: %06d @ 0x%08x", | ||
176 | toc->entries[noff + i].id, | ||
177 | toc->entries[noff + i].offset); | ||
178 | #endif | ||
179 | } | ||
180 | |||
181 | /* read next toc */ | ||
182 | if(off_next_toc > 0) { | ||
183 | g3d_stream_seek(stream, off_next_toc, SEEK_SET); | ||
184 | toc = x3dmf_read_toc(stream, toc, context); | ||
185 | } | ||
186 | |||
187 | return toc; | ||
188 | } | ||
189 | |||
190 | static guint32 x3dmf_read_mesh(G3DStream *stream, G3DObject *object, | ||
191 | G3DContext *context) | ||
192 | { | ||
193 | guint32 i, j, nconts, nfaces, nbytes = 0, ncverts, offv; | ||
194 | G3DFace *face; | ||
195 | |||
196 | g_return_val_if_fail(object != NULL, FALSE); | ||
197 | |||
198 | offv = object->vertex_count; | ||
199 | object->vertex_count += g3d_stream_read_int32_be(stream); | ||
200 | object->vertex_data = g_realloc(object->vertex_data, | ||
201 | object->vertex_count * 3 * sizeof(G3DFloat)); | ||
202 | nbytes += 4; | ||
203 | |||
204 | for(i = offv; i < object->vertex_count; i ++) { | ||
205 | for(j = 0; j < 3; j ++) | ||
206 | object->vertex_data[i * 3 + j] = g3d_stream_read_float_be(stream); | ||
207 | nbytes += 12; | ||
208 | |||
209 | g3d_context_update_interface(context); | ||
210 | } | ||
211 | |||
212 | nfaces = g3d_stream_read_int32_be(stream); | ||
213 | nconts = g3d_stream_read_int32_be(stream); | ||
214 | nbytes += 8; | ||
215 | |||
216 | #if DEBUG > 0 | ||
217 | g_debug("|%u verts, %u faces, %u conts", object->vertex_count, | ||
218 | nfaces, nconts); | ||
219 | #endif | ||
220 | |||
221 | for(i = 0; i < nfaces; i ++) { | ||
222 | face = g_new0(G3DFace, 1); | ||
223 | |||
224 | face->vertex_count = g3d_stream_read_int32_be(stream); | ||
225 | nbytes += 4; | ||
226 | face->vertex_indices = g_new0(guint32, face->vertex_count); | ||
227 | |||
228 | for(j = 0; j < face->vertex_count; j ++) { | ||
229 | face->vertex_indices[j] = offv + g3d_stream_read_int32_be(stream); | ||
230 | nbytes += 4; | ||
231 | if(face->vertex_indices[j] >= object->vertex_count) { | ||
232 | g_warning("face index wrong: %u >= %u", | ||
233 | face->vertex_indices[j], object->vertex_count); | ||
234 | face->vertex_indices[j] = 0; | ||
235 | } | ||
236 | } | ||
237 | |||
238 | #if DEBUG > 3 | ||
239 | g_debug("|face %u: %u %u %u", i, face->vertex_indices[0], | ||
240 | face->vertex_indices[1], face->vertex_indices[2]); | ||
241 | #endif | ||
242 | |||
243 | face->material = g_slist_nth_data(object->materials, 0); | ||
244 | object->faces = g_slist_prepend(object->faces, face); | ||
245 | |||
246 | g3d_context_update_interface(context); | ||
247 | } | ||
248 | |||
249 | /* contours */ | ||
250 | for(i = 0; i < nconts; i ++) { | ||
251 | ncverts = g3d_stream_read_int32_be(stream); | ||
252 | nbytes += 4; | ||
253 | for(j = 0; j < ncverts; j ++) { | ||
254 | g3d_stream_read_int32_be(stream); | ||
255 | nbytes += 4; | ||
256 | } | ||
257 | } | ||
258 | |||
259 | return nbytes; | ||
260 | } | ||
261 | |||
262 | static G3DObject *x3dmf_object_new(G3DStream *stream, G3DModel *model) | ||
263 | { | ||
264 | G3DObject *object; | ||
265 | G3DMaterial *material; | ||
266 | |||
267 | object = g_new0(G3DObject, 1); | ||
268 | material = g3d_material_new(); | ||
269 | |||
270 | object->name = g_strdup_printf("container @ 0x%08x", | ||
271 | (guint32)g3d_stream_tell(stream) - 8); | ||
272 | model->objects = g_slist_append(model->objects, object); | ||
273 | object->materials = g_slist_append(object->materials, material); | ||
274 | |||
275 | return object; | ||
276 | } | ||
277 | |||
278 | static guint32 x3dmf_read_packed(G3DStream *stream, guint32 maxx, | ||
279 | guint32 *nread) | ||
280 | { | ||
281 | if(maxx > 0xFFFE) { | ||
282 | if(nread) | ||
283 | (*nread) += 4; | ||
284 | return g3d_stream_read_int32_be(stream); | ||
285 | } else if(maxx > 0xFE) { | ||
286 | if(nread) | ||
287 | (*nread) += 2; | ||
288 | return g3d_stream_read_int16_be(stream); | ||
289 | } else { | ||
290 | if(nread) | ||
291 | (*nread) += 1; | ||
292 | return g3d_stream_read_int8(stream); | ||
293 | } | ||
294 | } | ||
295 | |||
296 | /* | ||
297 | [tmsh] - TriMesh | ||
298 | http://developer.apple.com/documentation/QuickTime/QD3D/qd3dmetafile.33.htm | ||
299 | |||
300 | Uns32 numTriangles | ||
301 | Uns32 numTriangleAttributeTypes | ||
302 | Uns32 numEdges | ||
303 | Uns32 numEdgeAttributeTypes | ||
304 | Uns32 numPoints | ||
305 | Uns32 numVertexAttributeTypes | ||
306 | TriMeshTriangleData triangles[numTriangles] | ||
307 | TriMeshEdgeData edges[numEdges] | ||
308 | Point3D points[numPoints] | ||
309 | BoundingBox bBox | ||
310 | */ | ||
311 | |||
312 | static guint32 x3dmf_read_tmsh(G3DStream *stream, G3DObject *object, | ||
313 | G3DContext *context) | ||
314 | { | ||
315 | G3DFace *face; | ||
316 | guint32 nread = 0, nfaces, nverts, nedges; | ||
317 | gint32 i, j; | ||
318 | |||
319 | nfaces = g3d_stream_read_int32_be(stream); /* numTriangles */ | ||
320 | nread += 4; | ||
321 | |||
322 | g3d_stream_read_int32_be(stream); /* numTriangleAttributeTypes */ | ||
323 | nread += 4; | ||
324 | |||
325 | nedges = g3d_stream_read_int32_be(stream); /* numEdges */ | ||
326 | nread += 4; | ||
327 | |||
328 | g3d_stream_read_int32_be(stream); /* numEdgeAttributeTypes */ | ||
329 | nread += 4; | ||
330 | |||
331 | nverts = g3d_stream_read_int32_be(stream); /* numPoints */ | ||
332 | nread += 4; | ||
333 | |||
334 | g3d_stream_read_int32_be(stream); /* numVertexAttributeTypes */ | ||
335 | nread += 4; | ||
336 | |||
337 | #if DEBUG > 3 | ||
338 | g_debug("3DMF: [tmsh] %d faces, %d edges, %d vertices", | ||
339 | nfaces, nedges, nverts); | ||
340 | #endif | ||
341 | |||
342 | /* triangles */ | ||
343 | for(i = 0; i < nfaces; i ++) { | ||
344 | face = g_new0(G3DFace, 1); | ||
345 | |||
346 | face->vertex_count = 3; | ||
347 | face->vertex_indices = g_new0(guint32, 3); | ||
348 | for(j = 0; j < 3; j ++) { | ||
349 | face->vertex_indices[j] = | ||
350 | x3dmf_read_packed(stream, nfaces, &nread); | ||
351 | if(face->vertex_indices[j] >= nverts) { | ||
352 | g_warning("face index error: %u >= %u", | ||
353 | face->vertex_indices[j], nverts); | ||
354 | face->vertex_indices[j] = 0; | ||
355 | } | ||
356 | } | ||
357 | |||
358 | #if DEBUG > 3 | ||
359 | g_debug("face %u (packed): %u %u %u", i, face->vertex_indices[0], | ||
360 | face->vertex_indices[1], face->vertex_indices[2]); | ||
361 | #endif | ||
362 | |||
363 | face->material = g_slist_nth_data(object->materials, 0); | ||
364 | object->faces = g_slist_prepend(object->faces, face); | ||
365 | } | ||
366 | |||
367 | /* edges */ | ||
368 | for(i = 0; i < nedges; i ++) { | ||
369 | /* pointIndices */ | ||
370 | x3dmf_read_packed(stream, nedges, &nread); | ||
371 | x3dmf_read_packed(stream, nedges, &nread); | ||
372 | /* triangleIndices */ | ||
373 | x3dmf_read_packed(stream, nedges, &nread); | ||
374 | x3dmf_read_packed(stream, nedges, &nread); | ||
375 | } | ||
376 | |||
377 | /* points */ | ||
378 | object->vertex_count = nverts; | ||
379 | object->vertex_data = g_new0(G3DFloat, 3 * nverts); | ||
380 | for(i = 0; i < nverts; i ++) { | ||
381 | object->vertex_data[i * 3 + 0] = g3d_stream_read_float_be(stream); | ||
382 | object->vertex_data[i * 3 + 1] = g3d_stream_read_float_be(stream); | ||
383 | object->vertex_data[i * 3 + 2] = g3d_stream_read_float_be(stream); | ||
384 | nread += 12; | ||
385 | } | ||
386 | |||
387 | /* bBox */ | ||
388 | /* Point3D min */ | ||
389 | g3d_stream_read_float_be(stream); | ||
390 | g3d_stream_read_float_be(stream); | ||
391 | g3d_stream_read_float_be(stream); | ||
392 | nread += 12; | ||
393 | /* Point3D max */ | ||
394 | g3d_stream_read_float_be(stream); | ||
395 | g3d_stream_read_float_be(stream); | ||
396 | g3d_stream_read_float_be(stream); | ||
397 | nread += 12; | ||
398 | /* boolean isEmpty */ | ||
399 | g3d_stream_read_int32_be(stream); | ||
400 | nread += 4; | ||
401 | |||
402 | return nread; | ||
403 | } | ||
404 | |||
405 | static gboolean x3dmf_read_rfrn(G3DStream *stream, G3DModel *model, | ||
406 | X3dmfToc *toc, G3DContext *context) | ||
407 | { | ||
408 | G3DObject *object; | ||
409 | guint32 id, i, refid, savedoffset; | ||
410 | gsize len; | ||
411 | X3dmfTocEntry *tocentry = NULL; | ||
412 | |||
413 | refid = g3d_stream_read_int32_be(stream); | ||
414 | if(refid == 0) { | ||
415 | /* FIXME */ | ||
416 | return FALSE; | ||
417 | } | ||
418 | |||
419 | if(toc == NULL) { | ||
420 | return FALSE; | ||
421 | } | ||
422 | |||
423 | /* find reference object */ | ||
424 | for(i = 0; i < toc->num_entries; i ++) | ||
425 | if(toc->entries[i].id == refid) | ||
426 | tocentry = &(toc->entries[i]); | ||
427 | |||
428 | g_return_val_if_fail(tocentry != NULL, FALSE); | ||
429 | |||
430 | savedoffset = g3d_stream_tell(stream); | ||
431 | g3d_stream_seek(stream, tocentry->offset, G_SEEK_SET); | ||
432 | |||
433 | object = x3dmf_object_new(stream, model); | ||
434 | |||
435 | g3d_iff_read_chunk(stream, &id, &len, 0); | ||
436 | switch(id) { | ||
437 | case G3D_IFF_MKID('c', 't', 'n', 'r'): | ||
438 | x3dmf_read_container(stream, len, model, NULL, 0xFF, toc, context); | ||
439 | break; | ||
440 | |||
441 | default: | ||
442 | break; | ||
443 | } | ||
444 | |||
445 | g3d_stream_seek(stream, savedoffset, G_SEEK_SET); | ||
446 | |||
447 | return TRUE; | ||
448 | } | ||
449 | |||
450 | static gboolean x3dmf_read_container(G3DStream *stream, guint32 length, | ||
451 | G3DModel *model, G3DObject *object, guint32 level, X3dmfToc *toc, | ||
452 | G3DContext *context) | ||
453 | { | ||
454 | G3DMaterial *material = NULL; | ||
455 | X3dmfChunkDesc *chunkdesc; | ||
456 | guint32 id, chk, i; | ||
457 | gsize len; | ||
458 | G3DFloat matrix[16]; | ||
459 | |||
460 | g3d_matrix_identity(matrix); | ||
461 | |||
462 | while(length > 0) { | ||
463 | if(g3d_stream_eof(stream)) | ||
464 | break; | ||
465 | |||
466 | g3d_iff_read_chunk(stream, &id, &len, 0); | ||
467 | length -= 8; | ||
468 | |||
469 | if(id == 0) | ||
470 | return FALSE; | ||
471 | |||
472 | chunkdesc = x3dmf_get_chunk_info(id); | ||
473 | |||
474 | #if DEBUG > 0 | ||
475 | g_debug("\\%s[%c%c%c%c]: %s (%d bytes)", debug_pad(level), | ||
476 | X3DMF_CHUNK_CHAR(id, 24), X3DMF_CHUNK_CHAR(id, 16), | ||
477 | X3DMF_CHUNK_CHAR(id, 8), X3DMF_CHUNK_CHAR(id, 0), | ||
478 | chunkdesc ? chunkdesc->description : "unknown chunk", | ||
479 | len); | ||
480 | #endif | ||
481 | length -= len; | ||
482 | |||
483 | switch(id) { | ||
484 | case G3D_IFF_MKID('c', 'n', 't', 'r'): | ||
485 | /* container */ | ||
486 | #if DEBUG > 0 | ||
487 | g_debug("|%snew container @ 0x%x (%d bytes)", | ||
488 | debug_pad(level - 1), | ||
489 | (guint32)g3d_stream_tell(stream) - 8, len); | ||
490 | #endif | ||
491 | x3dmf_read_container(stream, len, model, object, level + 1, | ||
492 | toc, context); | ||
493 | break; | ||
494 | |||
495 | case G3D_IFF_MKID('k', 'd', 'i', 'f'): | ||
496 | /* diffuse color */ | ||
497 | if(object) { | ||
498 | #if DEBUG > 2 | ||
499 | g_debug("3DMF: kdif: got object"); | ||
500 | #endif | ||
501 | material = g_slist_nth_data(object->materials, 0); | ||
502 | material->r = g3d_stream_read_float_be(stream); | ||
503 | material->g = g3d_stream_read_float_be(stream); | ||
504 | material->b = g3d_stream_read_float_be(stream); | ||
505 | } else { | ||
506 | g3d_stream_skip(stream, len); | ||
507 | } | ||
508 | break; | ||
509 | |||
510 | case G3D_IFF_MKID('k', 's', 'p', 'c'): | ||
511 | /* specular color */ | ||
512 | if(object) { | ||
513 | #if DEBUG > 2 | ||
514 | g_debug("3DMF: kspc: got object"); | ||
515 | #endif | ||
516 | material = g_slist_nth_data(object->materials, 0); | ||
517 | material->specular[0] = g3d_stream_read_float_be(stream); | ||
518 | material->specular[1] = g3d_stream_read_float_be(stream); | ||
519 | material->specular[2] = g3d_stream_read_float_be(stream); | ||
520 | } else { | ||
521 | g3d_stream_skip(stream, len); | ||
522 | } | ||
523 | break; | ||
524 | |||
525 | case G3D_IFF_MKID('k', 'x', 'p', 'r'): | ||
526 | /* transparency color */ | ||
527 | if(object) { | ||
528 | /* use average as alpha */ | ||
529 | material = g_slist_nth_data(object->materials, 0); | ||
530 | material->a = 1.0 - | ||
531 | (g3d_stream_read_float_be(stream) + | ||
532 | g3d_stream_read_float_be(stream) + | ||
533 | g3d_stream_read_float_be(stream)) / 3.0; | ||
534 | |||
535 | if(material->a < 0.1) | ||
536 | material->a = 0.1; | ||
537 | } else { | ||
538 | g3d_stream_skip(stream, len); | ||
539 | } | ||
540 | break; | ||
541 | |||
542 | case G3D_IFF_MKID('m', 'e', 's', 'h'): | ||
543 | /* mesh */ | ||
544 | if(object == NULL) | ||
545 | object = x3dmf_object_new(stream, model); | ||
546 | material = g_slist_nth_data(object->materials, 0); | ||
547 | |||
548 | chk = x3dmf_read_mesh(stream, object, context); | ||
549 | g3d_object_transform(object, matrix); | ||
550 | if(chk != len) { | ||
551 | g_warning("3DMF: mesh: wrong length (%u != %u)\n", | ||
552 | chk, (unsigned int) len); | ||
553 | return FALSE; | ||
554 | } | ||
555 | break; | ||
556 | |||
557 | case G3D_IFF_MKID('m', 't', 'r', 'x'): | ||
558 | /* matrix */ | ||
559 | for(i = 0; i < 16; i ++) | ||
560 | matrix[i] = g3d_stream_read_float_be(stream); | ||
561 | if(object) { | ||
562 | #if DEBUG > 2 | ||
563 | g_debug("3DMF: mtrx: object is set"); | ||
564 | #endif | ||
565 | g3d_object_transform(object, matrix); | ||
566 | } | ||
567 | #if DEBUG > 3 | ||
568 | for(i = 0; i < 4; i ++) | ||
569 | g_debug("3DMF: mtrx: %+1.2f %+1.2f %+1.2f %+1.2f", | ||
570 | matrix[i * 4 + 0], matrix[i * 4 + 1], | ||
571 | matrix[i * 4 + 2], matrix[i * 4 + 3]); | ||
572 | #endif | ||
573 | break; | ||
574 | |||
575 | case G3D_IFF_MKID('r', 'f', 'r', 'n'): | ||
576 | /* reference */ | ||
577 | x3dmf_read_rfrn(stream, model, toc, context); | ||
578 | break; | ||
579 | |||
580 | case G3D_IFF_MKID('s', 'e', 't', ' '): | ||
581 | /* ??: skip this cntr chunk */ | ||
582 | g3d_stream_skip(stream, length); | ||
583 | length = 0; | ||
584 | break; | ||
585 | |||
586 | case G3D_IFF_MKID('t', 'm', 's', 'h'): | ||
587 | /* triangle mesh */ | ||
588 | if(object == NULL) | ||
589 | object = x3dmf_object_new(stream, model); | ||
590 | material = g_slist_nth_data(object->materials, 0); | ||
591 | |||
592 | chk = x3dmf_read_tmsh(stream, object, context); | ||
593 | g3d_object_transform(object, matrix); | ||
594 | if(chk != len) { | ||
595 | #if DEBUG > 0 | ||
596 | g_debug("3DMF: tmsh: offset %d bytes", len - chk); | ||
597 | #endif | ||
598 | g3d_stream_skip(stream, len - chk); | ||
599 | } | ||
600 | break; | ||
601 | |||
602 | case G3D_IFF_MKID('t', 'r', 'n', 's'): | ||
603 | /* translate */ | ||
604 | if(object) { | ||
605 | G3DFloat x,y,z; | ||
606 | G3DFloat matrix[16]; | ||
607 | |||
608 | x = g3d_stream_read_float_be(stream); | ||
609 | y = g3d_stream_read_float_be(stream); | ||
610 | z = g3d_stream_read_float_be(stream); | ||
611 | |||
612 | g3d_matrix_identity(matrix); | ||
613 | g3d_matrix_translate(x, y, z, matrix); | ||
614 | |||
615 | g3d_object_transform(object, matrix); | ||
616 | } else { | ||
617 | #if DEBUG > 0 | ||
618 | g_warning("3DMF: [trns] no object"); | ||
619 | #endif | ||
620 | g3d_stream_skip(stream, 12); | ||
621 | } | ||
622 | break; | ||
623 | |||
624 | default: | ||
625 | if(chunkdesc) { | ||
626 | g3d_stream_skip(stream, len); | ||
627 | } else { | ||
628 | #if DEBUG > 0 | ||
629 | g_warning("3DMF: Container: unknown chunk '%c%c%c%c'/" | ||
630 | "0x%02X%02X%02X%02X @ 0x%08x " | ||
631 | "(%d bytes)", | ||
632 | X3DMF_CHUNK_CHAR(id, 24), X3DMF_CHUNK_CHAR(id, 16), | ||
633 | X3DMF_CHUNK_CHAR(id, 8), X3DMF_CHUNK_CHAR(id, 0), | ||
634 | X3DMF_CHUNK_CHAR(id, 24), X3DMF_CHUNK_CHAR(id, 16), | ||
635 | X3DMF_CHUNK_CHAR(id, 8), X3DMF_CHUNK_CHAR(id, 0), | ||
636 | (guint32)g3d_stream_tell(stream) - 8, len); | ||
637 | #endif | ||
638 | g3d_stream_skip(stream, len); | ||
639 | } | ||
640 | break; | ||
641 | } | ||
642 | } | ||
643 | |||
644 | return TRUE; | ||
645 | } | ||
646 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.c new file mode 100644 index 0000000..1c76249 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.c | |||
@@ -0,0 +1,23 @@ | |||
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 | #include "imp_3dmf_callbacks.h" | ||
23 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.h new file mode 100644 index 0000000..5cb37a6 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.h | |||
@@ -0,0 +1,42 @@ | |||
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_3DMF_CALLBACKS_H | ||
23 | #define _IMP_3DMF_CALLBACKS_H | ||
24 | |||
25 | #include <g3d/types.h> | ||
26 | #include <g3d/stream.h> | ||
27 | |||
28 | typedef struct { | ||
29 | G3DContext *context; | ||
30 | G3DStream *stream; | ||
31 | } X3dmfGlobal; | ||
32 | |||
33 | typedef struct { | ||
34 | guint32 id; | ||
35 | guint32 parentid; | ||
36 | guint32 level; | ||
37 | G3DObject *object; | ||
38 | } X3dmfLocal; | ||
39 | |||
40 | typedef gboolean (* X3dmfCallback)(X3dmfGlobal *global, X3dmfLocal *local); | ||
41 | |||
42 | #endif /* _IMP_3DMF_CALLBACKS_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_chunks.h new file mode 100644 index 0000000..471a14c --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_chunks.h | |||
@@ -0,0 +1,95 @@ | |||
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_3DMF_CHUNKS_H | ||
23 | #define _IMP_3DMF_CHUNKS_H | ||
24 | |||
25 | #include <g3d/iff.h> | ||
26 | #include "imp_3dmf_callbacks.h" | ||
27 | |||
28 | typedef struct { | ||
29 | guint32 id; | ||
30 | const gchar *description; | ||
31 | X3dmfCallback callback; | ||
32 | } X3dmfChunkDesc; | ||
33 | |||
34 | #define ID G3D_IFF_MKID | ||
35 | |||
36 | static X3dmfChunkDesc x3dmf_chunks[] = { | ||
37 | { ID('a', 'm', 'b', 'n'), "ambient light", NULL }, | ||
38 | { ID('a', 't', 'a', 'r'), "(registered unknown)", NULL }, | ||
39 | { ID('a', 't', 't', 'r'), "attribute set", NULL }, | ||
40 | { ID('b', 'g', 'n', 'g'), "begin group", NULL }, | ||
41 | { ID('c', 'a', 'm', 'b'), "ambient coefficient", NULL }, | ||
42 | { ID('c', 'm', 'p', 'l'), "camera placement", NULL }, | ||
43 | { ID('c', 'm', 'r', 'g'), "camera range", NULL }, | ||
44 | { ID('c', 'm', 'v', 'p'), "camera viewport", NULL }, | ||
45 | { ID('c', 'n', 't', 'r'), "container", NULL }, | ||
46 | { ID('c', 's', 'g', 'e'), "(registered unknown)", NULL }, | ||
47 | { ID('c', 's', 'p', 'c'), "specular control", NULL }, | ||
48 | { ID('c', 't', 'w', 'n'), "interactive renderer", NULL }, | ||
49 | { ID('d', 'b', 'b', 'p'), "(registered unknown)", NULL }, | ||
50 | { ID('d', 'r', 'c', 't'), "directional light", NULL }, | ||
51 | { ID('e', 'n', 'd', 'g'), "end group", NULL }, | ||
52 | { ID('h', 'l', 's', 't'), "highlight state", NULL }, | ||
53 | { ID('i', 'm', 'c', 'c'), "image clear color", NULL }, | ||
54 | { ID('i', 'm', 'd', 'm'), "image dimensions", NULL }, | ||
55 | { ID('k', 'd', 'i', 'f'), "diffuse color", NULL }, | ||
56 | { ID('k', 's', 'p', 'c'), "specular color", NULL }, | ||
57 | { ID('k', 'x', 'p', 'r'), "transparency color", NULL }, | ||
58 | { ID('l', 'g', 'h', 't'), "light data", NULL }, | ||
59 | { ID('m', 'e', 's', 'h'), "mesh", NULL }, | ||
60 | { ID('m', 't', 'r', 'x'), "matrix", NULL }, | ||
61 | { ID('n', 'r', 'm', 'l'), "normal", NULL }, | ||
62 | { ID('p', 'n', 't', 'l'), "point light", NULL }, | ||
63 | { ID('r', 'f', 'r', 'n'), "reference", NULL }, | ||
64 | { ID('r', 'v', 'h', 'n'), "(registered unknown)", NULL }, | ||
65 | { ID('r', 'v', 't', 'x'), "(registered unknown)", NULL }, | ||
66 | { ID('s', 'e', 't', ' '), "set", NULL }, | ||
67 | { ID('s', 't', 'r', 'c'), "C string", NULL }, | ||
68 | { ID('t', 'm', 's', 'h'), "triangle mesh", NULL }, | ||
69 | { ID('t', 'o', 'c', ' '), "tabe of contents", NULL }, | ||
70 | { ID('t', 'r', 'n', 's'), "translation", NULL }, | ||
71 | { ID('t', 'y', 'p', 'e'), "type definition", NULL }, | ||
72 | { ID('v', 'a', 'n', 'a'), "view angle aspect cam", NULL }, | ||
73 | { ID('v', 'a', 's', 'l'), "vertex attr set list", NULL }, | ||
74 | { ID('v', 'n', 'i', 'd'), "(registered unknown)", NULL }, | ||
75 | { ID('v', 'w', 'h', 'n'), "view hints", NULL }, | ||
76 | { ID('v', 'w', 'p', 'l'), "view plane camera", NULL }, | ||
77 | |||
78 | { ID(0xFF, 0xFF, 0xFF, 0xE5), "0xFFFFFFE5", NULL }, | ||
79 | { ID(0xFF, 0xFF, 0xFF, 0xE7), "0xFFFFFFE7", NULL }, | ||
80 | { ID(0xFF, 0xFF, 0xFF, 0xE9), "0xFFFFFFE9", NULL }, | ||
81 | { ID(0xFF, 0xFF, 0xFF, 0xEA), "0xFFFFFFEA", NULL }, | ||
82 | { ID(0xFF, 0xFF, 0xFF, 0xEB), "0xFFFFFFEB", NULL }, | ||
83 | { ID(0xFF, 0xFF, 0xFF, 0xEC), "0xFFFFFFEC", NULL }, | ||
84 | { ID(0xFF, 0xFF, 0xFF, 0xEF), "0xFFFFFFEF (EoC?)", NULL }, | ||
85 | { ID(0xFF, 0xFF, 0xFF, 0xF1), "0xFFFFFFF1", NULL }, | ||
86 | { ID(0xFF, 0xFF, 0xFF, 0xF4), "0xFFFFFFF4", NULL }, | ||
87 | { ID(0xFF, 0xFF, 0xFF, 0xF6), "0xFFFFFFF6", NULL }, | ||
88 | { ID(0xFF, 0xFF, 0xFF, 0xFD), "0xFFFFFFFD", NULL }, | ||
89 | |||
90 | { 0, NULL, NULL } | ||
91 | }; | ||
92 | |||
93 | #undef ID | ||
94 | |||
95 | #endif /* _IMP_3DMF_CHUNKS_H */ | ||