diff options
Diffstat (limited to '')
14 files changed, 2095 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile new file mode 100644 index 0000000..f57ae4d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile | |||
@@ -0,0 +1,519 @@ | |||
1 | # Makefile.in generated by automake 1.10.1 from Makefile.am. | ||
2 | # plugins/import/imp_ldraw/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_ldraw | ||
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_ldraw_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_ldraw_la_OBJECTS = imp_ldraw.lo imp_ldraw_part.lo \ | ||
59 | imp_ldraw_library.lo imp_ldraw_color.lo imp_ldraw_mpd.lo | ||
60 | imp_ldraw_la_OBJECTS = $(am_imp_ldraw_la_OBJECTS) | ||
61 | DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d | ||
62 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
63 | am__depfiles_maybe = depfiles | ||
64 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
65 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
66 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
67 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
68 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
69 | CCLD = $(CC) | ||
70 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
71 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
72 | $(LDFLAGS) -o $@ | ||
73 | SOURCES = $(imp_ldraw_la_SOURCES) | ||
74 | DIST_SOURCES = $(imp_ldraw_la_SOURCES) | ||
75 | ETAGS = etags | ||
76 | CTAGS = ctags | ||
77 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
78 | ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10 | ||
79 | AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar | ||
80 | AR = ar | ||
81 | AS = as | ||
82 | AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf | ||
83 | AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader | ||
84 | AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10 | ||
85 | AWK = gawk | ||
86 | CC = gcc | ||
87 | CCDEPMODE = depmode=gcc3 | ||
88 | CFLAGS = -g -O2 | ||
89 | CPP = gcc -E | ||
90 | CPPFLAGS = | ||
91 | CXX = g++ | ||
92 | CXXCPP = g++ -E | ||
93 | CXXDEPMODE = depmode=gcc3 | ||
94 | CXXFLAGS = -g -O2 | ||
95 | CYGPATH_W = echo | ||
96 | DBG_CFLAGS = -O2 | ||
97 | DEBUG = 0 | ||
98 | DEFS = -DHAVE_CONFIG_H | ||
99 | DEPDIR = .deps | ||
100 | DLLTOOL = dlltool | ||
101 | ECHO = echo | ||
102 | ECHO_C = | ||
103 | ECHO_N = -n | ||
104 | ECHO_T = | ||
105 | EGREP = /bin/grep -E | ||
106 | EXEEXT = | ||
107 | F77 = | ||
108 | FFLAGS = | ||
109 | 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 | ||
110 | 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 | ||
111 | GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include | ||
112 | GLIB_GENMARSHAL = glib-genmarshal | ||
113 | GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
114 | GLIB_MKENUMS = glib-mkenums | ||
115 | GOBJECT_QUERY = gobject-query | ||
116 | GREP = /bin/grep | ||
117 | GTKDOC_CHECK = /usr/bin/gtkdoc-check | ||
118 | 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 | ||
119 | 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 | ||
120 | HTML_DIR = ${datadir}/gtk-doc/html | ||
121 | INSTALL = /usr/bin/install -c | ||
122 | INSTALL_DATA = ${INSTALL} -m 644 | ||
123 | INSTALL_PROGRAM = ${INSTALL} | ||
124 | INSTALL_SCRIPT = ${INSTALL} | ||
125 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s | ||
126 | LDFLAGS = | ||
127 | LEX = flex | ||
128 | LEXLIB = -lfl | ||
129 | LEX_OUTPUT_ROOT = lex.yy | ||
130 | 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 | ||
131 | LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0 | ||
132 | LIBOBJS = | ||
133 | LIBS = -lm | ||
134 | LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet | ||
135 | LIBXML2_CFLAGS = -I/usr/include/libxml2 | ||
136 | LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
137 | LN_S = ln -s | ||
138 | LTLIBOBJS = | ||
139 | LTVERSION = 0:8:0 | ||
140 | MAGIC_LIBS = -lmagic | ||
141 | MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo | ||
142 | MATH_LIBS = -lm | ||
143 | MKDIR_P = /bin/mkdir -p | ||
144 | OBJDUMP = objdump | ||
145 | OBJEXT = o | ||
146 | PACKAGE = libg3d | ||
147 | PACKAGE_BUGREPORT = | ||
148 | PACKAGE_NAME = | ||
149 | PACKAGE_STRING = | ||
150 | PACKAGE_TARNAME = | ||
151 | PACKAGE_VERSION = | ||
152 | PATH_SEPARATOR = : | ||
153 | PKG_CONFIG = /usr/bin/pkg-config | ||
154 | PLUGINS_LDFLAGS = -avoid-version -export-dynamic | ||
155 | RANLIB = ranlib | ||
156 | SET_MAKE = | ||
157 | SHELL = /bin/bash | ||
158 | STRIP = strip | ||
159 | VERSION = 0.0.8 | ||
160 | XML2_CONFIG = /usr/bin/xml2-config | ||
161 | XML_CPPFLAGS = -I/usr/include/libxml2 | ||
162 | XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
163 | Z_CFLAGS = | ||
164 | Z_LIBS = -lz | ||
165 | abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw | ||
166 | abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw | ||
167 | abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
168 | abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
169 | ac_ct_CC = gcc | ||
170 | ac_ct_CXX = g++ | ||
171 | ac_ct_F77 = | ||
172 | am__include = include | ||
173 | am__leading_dot = . | ||
174 | am__quote = | ||
175 | am__tar = ${AMTAR} chof - "$$tardir" | ||
176 | am__untar = ${AMTAR} xf - | ||
177 | bindir = ${exec_prefix}/bin | ||
178 | build = x86_64-unknown-linux-gnu | ||
179 | build_alias = | ||
180 | build_cpu = x86_64 | ||
181 | build_os = linux-gnu | ||
182 | build_vendor = unknown | ||
183 | builddir = . | ||
184 | datadir = ${datarootdir} | ||
185 | datarootdir = ${prefix}/share | ||
186 | docdir = ${datarootdir}/doc/${PACKAGE} | ||
187 | dvidir = ${docdir} | ||
188 | exec_prefix = ${prefix} | ||
189 | host = x86_64-unknown-linux-gnu | ||
190 | host_alias = | ||
191 | host_cpu = x86_64 | ||
192 | host_os = linux-gnu | ||
193 | host_vendor = unknown | ||
194 | htmldir = ${docdir} | ||
195 | includedir = ${prefix}/include | ||
196 | infodir = ${datarootdir}/info | ||
197 | install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh | ||
198 | libdir = ${exec_prefix}/lib | ||
199 | libexecdir = ${exec_prefix}/libexec | ||
200 | localedir = ${datarootdir}/locale | ||
201 | localstatedir = ${prefix}/var | ||
202 | mandir = ${datarootdir}/man | ||
203 | mkdir_p = /bin/mkdir -p | ||
204 | oldincludedir = /usr/include | ||
205 | pdfdir = ${docdir} | ||
206 | prefix = /usr/local | ||
207 | program_transform_name = s,x,x, | ||
208 | psdir = ${docdir} | ||
209 | sbindir = ${exec_prefix}/sbin | ||
210 | sharedstatedir = ${prefix}/com | ||
211 | srcdir = . | ||
212 | sysconfdir = ${prefix}/etc | ||
213 | target_alias = | ||
214 | top_builddir = ../../.. | ||
215 | top_srcdir = ../../.. | ||
216 | pluginimpdir = $(pkglibdir)/plugins/import | ||
217 | pluginimp_LTLIBRARIES = imp_ldraw.la | ||
218 | AM_CFLAGS = \ | ||
219 | -Wall -ansi -pedantic \ | ||
220 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
221 | -O2 -DDEBUG=0 \ | ||
222 | -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include | ||
223 | |||
224 | INCLUDES = -I$(top_srcdir)/include | ||
225 | AM_LDFLAGS = \ | ||
226 | -no-undefined -module \ | ||
227 | -avoid-version -export-dynamic | ||
228 | |||
229 | imp_ldraw_la_SOURCES = imp_ldraw.c imp_ldraw_misc.h imp_ldraw_types.h \ | ||
230 | imp_ldraw_part.c imp_ldraw_part.h \ | ||
231 | imp_ldraw_library.c imp_ldraw_library.h \ | ||
232 | imp_ldraw_color.c imp_ldraw_color.h \ | ||
233 | imp_ldraw_mpd.c imp_ldraw_mpd.h | ||
234 | |||
235 | imp_ldraw_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
236 | all: all-am | ||
237 | |||
238 | .SUFFIXES: | ||
239 | .SUFFIXES: .c .lo .o .obj | ||
240 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
241 | @for dep in $?; do \ | ||
242 | case '$(am__configure_deps)' in \ | ||
243 | *$$dep*) \ | ||
244 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
245 | && exit 0; \ | ||
246 | exit 1;; \ | ||
247 | esac; \ | ||
248 | done; \ | ||
249 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_ldraw/Makefile'; \ | ||
250 | cd $(top_srcdir) && \ | ||
251 | $(AUTOMAKE) --gnu plugins/import/imp_ldraw/Makefile | ||
252 | .PRECIOUS: Makefile | ||
253 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
254 | @case '$?' in \ | ||
255 | *config.status*) \ | ||
256 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
257 | *) \ | ||
258 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
259 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
260 | esac; | ||
261 | |||
262 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
263 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
264 | |||
265 | $(top_srcdir)/configure: $(am__configure_deps) | ||
266 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
267 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
268 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
269 | install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) | ||
270 | @$(NORMAL_INSTALL) | ||
271 | test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" | ||
272 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
273 | if test -f $$p; then \ | ||
274 | f=$(am__strip_dir) \ | ||
275 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ | ||
276 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ | ||
277 | else :; fi; \ | ||
278 | done | ||
279 | |||
280 | uninstall-pluginimpLTLIBRARIES: | ||
281 | @$(NORMAL_UNINSTALL) | ||
282 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
283 | p=$(am__strip_dir) \ | ||
284 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ | ||
285 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ | ||
286 | done | ||
287 | |||
288 | clean-pluginimpLTLIBRARIES: | ||
289 | -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) | ||
290 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
291 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
292 | test "$$dir" != "$$p" || dir=.; \ | ||
293 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
294 | rm -f "$${dir}/so_locations"; \ | ||
295 | done | ||
296 | imp_ldraw.la: $(imp_ldraw_la_OBJECTS) $(imp_ldraw_la_DEPENDENCIES) | ||
297 | $(LINK) -rpath $(pluginimpdir) $(imp_ldraw_la_OBJECTS) $(imp_ldraw_la_LIBADD) $(LIBS) | ||
298 | |||
299 | mostlyclean-compile: | ||
300 | -rm -f *.$(OBJEXT) | ||
301 | |||
302 | distclean-compile: | ||
303 | -rm -f *.tab.c | ||
304 | |||
305 | include ./$(DEPDIR)/imp_ldraw.Plo | ||
306 | include ./$(DEPDIR)/imp_ldraw_color.Plo | ||
307 | include ./$(DEPDIR)/imp_ldraw_library.Plo | ||
308 | include ./$(DEPDIR)/imp_ldraw_mpd.Plo | ||
309 | include ./$(DEPDIR)/imp_ldraw_part.Plo | ||
310 | |||
311 | .c.o: | ||
312 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
313 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
314 | # source='$<' object='$@' libtool=no \ | ||
315 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
316 | # $(COMPILE) -c $< | ||
317 | |||
318 | .c.obj: | ||
319 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
320 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
321 | # source='$<' object='$@' libtool=no \ | ||
322 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
323 | # $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
324 | |||
325 | .c.lo: | ||
326 | $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
327 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
328 | # source='$<' object='$@' libtool=yes \ | ||
329 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
330 | # $(LTCOMPILE) -c -o $@ $< | ||
331 | |||
332 | mostlyclean-libtool: | ||
333 | -rm -f *.lo | ||
334 | |||
335 | clean-libtool: | ||
336 | -rm -rf .libs _libs | ||
337 | |||
338 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
339 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
340 | unique=`for i in $$list; do \ | ||
341 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
342 | done | \ | ||
343 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
344 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
345 | mkid -fID $$unique | ||
346 | tags: TAGS | ||
347 | |||
348 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
349 | $(TAGS_FILES) $(LISP) | ||
350 | tags=; \ | ||
351 | here=`pwd`; \ | ||
352 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
353 | unique=`for i in $$list; do \ | ||
354 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
355 | done | \ | ||
356 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
357 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
358 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
359 | test -n "$$unique" || unique=$$empty_fix; \ | ||
360 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
361 | $$tags $$unique; \ | ||
362 | fi | ||
363 | ctags: CTAGS | ||
364 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
365 | $(TAGS_FILES) $(LISP) | ||
366 | tags=; \ | ||
367 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
368 | unique=`for i in $$list; do \ | ||
369 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
370 | done | \ | ||
371 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
372 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
373 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
374 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
375 | $$tags $$unique | ||
376 | |||
377 | GTAGS: | ||
378 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
379 | && cd $(top_srcdir) \ | ||
380 | && gtags -i $(GTAGS_ARGS) $$here | ||
381 | |||
382 | distclean-tags: | ||
383 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
384 | |||
385 | distdir: $(DISTFILES) | ||
386 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
387 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
388 | list='$(DISTFILES)'; \ | ||
389 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
390 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
391 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
392 | case $$dist_files in \ | ||
393 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
394 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
395 | sort -u` ;; \ | ||
396 | esac; \ | ||
397 | for file in $$dist_files; do \ | ||
398 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
399 | if test -d $$d/$$file; then \ | ||
400 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
401 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
402 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
403 | fi; \ | ||
404 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
405 | else \ | ||
406 | test -f $(distdir)/$$file \ | ||
407 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
408 | || exit 1; \ | ||
409 | fi; \ | ||
410 | done | ||
411 | check-am: all-am | ||
412 | check: check-am | ||
413 | all-am: Makefile $(LTLIBRARIES) | ||
414 | installdirs: | ||
415 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
416 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
417 | done | ||
418 | install: install-am | ||
419 | install-exec: install-exec-am | ||
420 | install-data: install-data-am | ||
421 | uninstall: uninstall-am | ||
422 | |||
423 | install-am: all-am | ||
424 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
425 | |||
426 | installcheck: installcheck-am | ||
427 | install-strip: | ||
428 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
429 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
430 | `test -z '$(STRIP)' || \ | ||
431 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
432 | mostlyclean-generic: | ||
433 | |||
434 | clean-generic: | ||
435 | |||
436 | distclean-generic: | ||
437 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
438 | |||
439 | maintainer-clean-generic: | ||
440 | @echo "This command is intended for maintainers to use" | ||
441 | @echo "it deletes files that may require special tools to rebuild." | ||
442 | clean: clean-am | ||
443 | |||
444 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
445 | mostlyclean-am | ||
446 | |||
447 | distclean: distclean-am | ||
448 | -rm -rf ./$(DEPDIR) | ||
449 | -rm -f Makefile | ||
450 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
451 | distclean-tags | ||
452 | |||
453 | dvi: dvi-am | ||
454 | |||
455 | dvi-am: | ||
456 | |||
457 | html: html-am | ||
458 | |||
459 | info: info-am | ||
460 | |||
461 | info-am: | ||
462 | |||
463 | install-data-am: install-pluginimpLTLIBRARIES | ||
464 | |||
465 | install-dvi: install-dvi-am | ||
466 | |||
467 | install-exec-am: | ||
468 | |||
469 | install-html: install-html-am | ||
470 | |||
471 | install-info: install-info-am | ||
472 | |||
473 | install-man: | ||
474 | |||
475 | install-pdf: install-pdf-am | ||
476 | |||
477 | install-ps: install-ps-am | ||
478 | |||
479 | installcheck-am: | ||
480 | |||
481 | maintainer-clean: maintainer-clean-am | ||
482 | -rm -rf ./$(DEPDIR) | ||
483 | -rm -f Makefile | ||
484 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
485 | |||
486 | mostlyclean: mostlyclean-am | ||
487 | |||
488 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
489 | mostlyclean-libtool | ||
490 | |||
491 | pdf: pdf-am | ||
492 | |||
493 | pdf-am: | ||
494 | |||
495 | ps: ps-am | ||
496 | |||
497 | ps-am: | ||
498 | |||
499 | uninstall-am: uninstall-pluginimpLTLIBRARIES | ||
500 | |||
501 | .MAKE: install-am install-strip | ||
502 | |||
503 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
504 | clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ | ||
505 | distclean-compile distclean-generic distclean-libtool \ | ||
506 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
507 | install install-am install-data install-data-am install-dvi \ | ||
508 | install-dvi-am install-exec install-exec-am install-html \ | ||
509 | install-html-am install-info install-info-am install-man \ | ||
510 | install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ | ||
511 | install-ps install-ps-am install-strip installcheck \ | ||
512 | installcheck-am installdirs maintainer-clean \ | ||
513 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
514 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
515 | tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES | ||
516 | |||
517 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
518 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
519 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile.am new file mode 100644 index 0000000..f27cd09 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile.am | |||
@@ -0,0 +1,24 @@ | |||
1 | pluginimpdir = $(pkglibdir)/plugins/import | ||
2 | |||
3 | pluginimp_LTLIBRARIES = imp_ldraw.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_ldraw_la_SOURCES = imp_ldraw.c imp_ldraw_misc.h imp_ldraw_types.h \ | ||
20 | imp_ldraw_part.c imp_ldraw_part.h \ | ||
21 | imp_ldraw_library.c imp_ldraw_library.h \ | ||
22 | imp_ldraw_color.c imp_ldraw_color.h \ | ||
23 | imp_ldraw_mpd.c imp_ldraw_mpd.h | ||
24 | imp_ldraw_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile.in new file mode 100644 index 0000000..94985b2 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile.in | |||
@@ -0,0 +1,519 @@ | |||
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_ldraw | ||
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_ldraw_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_ldraw_la_OBJECTS = imp_ldraw.lo imp_ldraw_part.lo \ | ||
59 | imp_ldraw_library.lo imp_ldraw_color.lo imp_ldraw_mpd.lo | ||
60 | imp_ldraw_la_OBJECTS = $(am_imp_ldraw_la_OBJECTS) | ||
61 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d | ||
62 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
63 | am__depfiles_maybe = depfiles | ||
64 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
65 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
66 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
67 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
68 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
69 | CCLD = $(CC) | ||
70 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
71 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
72 | $(LDFLAGS) -o $@ | ||
73 | SOURCES = $(imp_ldraw_la_SOURCES) | ||
74 | DIST_SOURCES = $(imp_ldraw_la_SOURCES) | ||
75 | ETAGS = etags | ||
76 | CTAGS = ctags | ||
77 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
78 | ACLOCAL = @ACLOCAL@ | ||
79 | AMTAR = @AMTAR@ | ||
80 | AR = @AR@ | ||
81 | AS = @AS@ | ||
82 | AUTOCONF = @AUTOCONF@ | ||
83 | AUTOHEADER = @AUTOHEADER@ | ||
84 | AUTOMAKE = @AUTOMAKE@ | ||
85 | AWK = @AWK@ | ||
86 | CC = @CC@ | ||
87 | CCDEPMODE = @CCDEPMODE@ | ||
88 | CFLAGS = @CFLAGS@ | ||
89 | CPP = @CPP@ | ||
90 | CPPFLAGS = @CPPFLAGS@ | ||
91 | CXX = @CXX@ | ||
92 | CXXCPP = @CXXCPP@ | ||
93 | CXXDEPMODE = @CXXDEPMODE@ | ||
94 | CXXFLAGS = @CXXFLAGS@ | ||
95 | CYGPATH_W = @CYGPATH_W@ | ||
96 | DBG_CFLAGS = @DBG_CFLAGS@ | ||
97 | DEBUG = @DEBUG@ | ||
98 | DEFS = @DEFS@ | ||
99 | DEPDIR = @DEPDIR@ | ||
100 | DLLTOOL = @DLLTOOL@ | ||
101 | ECHO = @ECHO@ | ||
102 | ECHO_C = @ECHO_C@ | ||
103 | ECHO_N = @ECHO_N@ | ||
104 | ECHO_T = @ECHO_T@ | ||
105 | EGREP = @EGREP@ | ||
106 | EXEEXT = @EXEEXT@ | ||
107 | F77 = @F77@ | ||
108 | FFLAGS = @FFLAGS@ | ||
109 | GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ | ||
110 | GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ | ||
111 | GLIB_CFLAGS = @GLIB_CFLAGS@ | ||
112 | GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ | ||
113 | GLIB_LIBS = @GLIB_LIBS@ | ||
114 | GLIB_MKENUMS = @GLIB_MKENUMS@ | ||
115 | GOBJECT_QUERY = @GOBJECT_QUERY@ | ||
116 | GREP = @GREP@ | ||
117 | GTKDOC_CHECK = @GTKDOC_CHECK@ | ||
118 | GTK_CFLAGS = @GTK_CFLAGS@ | ||
119 | GTK_LIBS = @GTK_LIBS@ | ||
120 | HTML_DIR = @HTML_DIR@ | ||
121 | INSTALL = @INSTALL@ | ||
122 | INSTALL_DATA = @INSTALL_DATA@ | ||
123 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
124 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
125 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
126 | LDFLAGS = @LDFLAGS@ | ||
127 | LEX = @LEX@ | ||
128 | LEXLIB = @LEXLIB@ | ||
129 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
130 | LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ | ||
131 | LIBGSF_LIBS = @LIBGSF_LIBS@ | ||
132 | LIBOBJS = @LIBOBJS@ | ||
133 | LIBS = @LIBS@ | ||
134 | LIBTOOL = @LIBTOOL@ --quiet | ||
135 | LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ | ||
136 | LIBXML2_LIBS = @LIBXML2_LIBS@ | ||
137 | LN_S = @LN_S@ | ||
138 | LTLIBOBJS = @LTLIBOBJS@ | ||
139 | LTVERSION = @LTVERSION@ | ||
140 | MAGIC_LIBS = @MAGIC_LIBS@ | ||
141 | MAKEINFO = @MAKEINFO@ | ||
142 | MATH_LIBS = @MATH_LIBS@ | ||
143 | MKDIR_P = @MKDIR_P@ | ||
144 | OBJDUMP = @OBJDUMP@ | ||
145 | OBJEXT = @OBJEXT@ | ||
146 | PACKAGE = @PACKAGE@ | ||
147 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
148 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
149 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
150 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
151 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
152 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
153 | PKG_CONFIG = @PKG_CONFIG@ | ||
154 | PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@ | ||
155 | RANLIB = @RANLIB@ | ||
156 | SET_MAKE = @SET_MAKE@ | ||
157 | SHELL = @SHELL@ | ||
158 | STRIP = @STRIP@ | ||
159 | VERSION = @VERSION@ | ||
160 | XML2_CONFIG = @XML2_CONFIG@ | ||
161 | XML_CPPFLAGS = @XML_CPPFLAGS@ | ||
162 | XML_LIBS = @XML_LIBS@ | ||
163 | Z_CFLAGS = @Z_CFLAGS@ | ||
164 | Z_LIBS = @Z_LIBS@ | ||
165 | abs_builddir = @abs_builddir@ | ||
166 | abs_srcdir = @abs_srcdir@ | ||
167 | abs_top_builddir = @abs_top_builddir@ | ||
168 | abs_top_srcdir = @abs_top_srcdir@ | ||
169 | ac_ct_CC = @ac_ct_CC@ | ||
170 | ac_ct_CXX = @ac_ct_CXX@ | ||
171 | ac_ct_F77 = @ac_ct_F77@ | ||
172 | am__include = @am__include@ | ||
173 | am__leading_dot = @am__leading_dot@ | ||
174 | am__quote = @am__quote@ | ||
175 | am__tar = @am__tar@ | ||
176 | am__untar = @am__untar@ | ||
177 | bindir = @bindir@ | ||
178 | build = @build@ | ||
179 | build_alias = @build_alias@ | ||
180 | build_cpu = @build_cpu@ | ||
181 | build_os = @build_os@ | ||
182 | build_vendor = @build_vendor@ | ||
183 | builddir = @builddir@ | ||
184 | datadir = @datadir@ | ||
185 | datarootdir = @datarootdir@ | ||
186 | docdir = @docdir@ | ||
187 | dvidir = @dvidir@ | ||
188 | exec_prefix = @exec_prefix@ | ||
189 | host = @host@ | ||
190 | host_alias = @host_alias@ | ||
191 | host_cpu = @host_cpu@ | ||
192 | host_os = @host_os@ | ||
193 | host_vendor = @host_vendor@ | ||
194 | htmldir = @htmldir@ | ||
195 | includedir = @includedir@ | ||
196 | infodir = @infodir@ | ||
197 | install_sh = @install_sh@ | ||
198 | libdir = @libdir@ | ||
199 | libexecdir = @libexecdir@ | ||
200 | localedir = @localedir@ | ||
201 | localstatedir = @localstatedir@ | ||
202 | mandir = @mandir@ | ||
203 | mkdir_p = @mkdir_p@ | ||
204 | oldincludedir = @oldincludedir@ | ||
205 | pdfdir = @pdfdir@ | ||
206 | prefix = @prefix@ | ||
207 | program_transform_name = @program_transform_name@ | ||
208 | psdir = @psdir@ | ||
209 | sbindir = @sbindir@ | ||
210 | sharedstatedir = @sharedstatedir@ | ||
211 | srcdir = @srcdir@ | ||
212 | sysconfdir = @sysconfdir@ | ||
213 | target_alias = @target_alias@ | ||
214 | top_builddir = @top_builddir@ | ||
215 | top_srcdir = @top_srcdir@ | ||
216 | pluginimpdir = $(pkglibdir)/plugins/import | ||
217 | pluginimp_LTLIBRARIES = imp_ldraw.la | ||
218 | AM_CFLAGS = \ | ||
219 | -Wall -ansi -pedantic \ | ||
220 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
221 | @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ | ||
222 | @GLIB_CFLAGS@ | ||
223 | |||
224 | INCLUDES = -I$(top_srcdir)/include | ||
225 | AM_LDFLAGS = \ | ||
226 | -no-undefined -module \ | ||
227 | @PLUGINS_LDFLAGS@ | ||
228 | |||
229 | imp_ldraw_la_SOURCES = imp_ldraw.c imp_ldraw_misc.h imp_ldraw_types.h \ | ||
230 | imp_ldraw_part.c imp_ldraw_part.h \ | ||
231 | imp_ldraw_library.c imp_ldraw_library.h \ | ||
232 | imp_ldraw_color.c imp_ldraw_color.h \ | ||
233 | imp_ldraw_mpd.c imp_ldraw_mpd.h | ||
234 | |||
235 | imp_ldraw_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
236 | all: all-am | ||
237 | |||
238 | .SUFFIXES: | ||
239 | .SUFFIXES: .c .lo .o .obj | ||
240 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
241 | @for dep in $?; do \ | ||
242 | case '$(am__configure_deps)' in \ | ||
243 | *$$dep*) \ | ||
244 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
245 | && exit 0; \ | ||
246 | exit 1;; \ | ||
247 | esac; \ | ||
248 | done; \ | ||
249 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_ldraw/Makefile'; \ | ||
250 | cd $(top_srcdir) && \ | ||
251 | $(AUTOMAKE) --gnu plugins/import/imp_ldraw/Makefile | ||
252 | .PRECIOUS: Makefile | ||
253 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
254 | @case '$?' in \ | ||
255 | *config.status*) \ | ||
256 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
257 | *) \ | ||
258 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
259 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
260 | esac; | ||
261 | |||
262 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
263 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
264 | |||
265 | $(top_srcdir)/configure: $(am__configure_deps) | ||
266 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
267 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
268 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
269 | install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) | ||
270 | @$(NORMAL_INSTALL) | ||
271 | test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" | ||
272 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
273 | if test -f $$p; then \ | ||
274 | f=$(am__strip_dir) \ | ||
275 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ | ||
276 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ | ||
277 | else :; fi; \ | ||
278 | done | ||
279 | |||
280 | uninstall-pluginimpLTLIBRARIES: | ||
281 | @$(NORMAL_UNINSTALL) | ||
282 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
283 | p=$(am__strip_dir) \ | ||
284 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ | ||
285 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ | ||
286 | done | ||
287 | |||
288 | clean-pluginimpLTLIBRARIES: | ||
289 | -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) | ||
290 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
291 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
292 | test "$$dir" != "$$p" || dir=.; \ | ||
293 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
294 | rm -f "$${dir}/so_locations"; \ | ||
295 | done | ||
296 | imp_ldraw.la: $(imp_ldraw_la_OBJECTS) $(imp_ldraw_la_DEPENDENCIES) | ||
297 | $(LINK) -rpath $(pluginimpdir) $(imp_ldraw_la_OBJECTS) $(imp_ldraw_la_LIBADD) $(LIBS) | ||
298 | |||
299 | mostlyclean-compile: | ||
300 | -rm -f *.$(OBJEXT) | ||
301 | |||
302 | distclean-compile: | ||
303 | -rm -f *.tab.c | ||
304 | |||
305 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw.Plo@am__quote@ | ||
306 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw_color.Plo@am__quote@ | ||
307 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw_library.Plo@am__quote@ | ||
308 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw_mpd.Plo@am__quote@ | ||
309 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw_part.Plo@am__quote@ | ||
310 | |||
311 | .c.o: | ||
312 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
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 $< | ||
317 | |||
318 | .c.obj: | ||
319 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
320 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
321 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
322 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
323 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
324 | |||
325 | .c.lo: | ||
326 | @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
327 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
328 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
329 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
330 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
331 | |||
332 | mostlyclean-libtool: | ||
333 | -rm -f *.lo | ||
334 | |||
335 | clean-libtool: | ||
336 | -rm -rf .libs _libs | ||
337 | |||
338 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
339 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
340 | unique=`for i in $$list; do \ | ||
341 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
342 | done | \ | ||
343 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
344 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
345 | mkid -fID $$unique | ||
346 | tags: TAGS | ||
347 | |||
348 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
349 | $(TAGS_FILES) $(LISP) | ||
350 | tags=; \ | ||
351 | here=`pwd`; \ | ||
352 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
353 | unique=`for i in $$list; do \ | ||
354 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
355 | done | \ | ||
356 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
357 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
358 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
359 | test -n "$$unique" || unique=$$empty_fix; \ | ||
360 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
361 | $$tags $$unique; \ | ||
362 | fi | ||
363 | ctags: CTAGS | ||
364 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
365 | $(TAGS_FILES) $(LISP) | ||
366 | tags=; \ | ||
367 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
368 | unique=`for i in $$list; do \ | ||
369 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
370 | done | \ | ||
371 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
372 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
373 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
374 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
375 | $$tags $$unique | ||
376 | |||
377 | GTAGS: | ||
378 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
379 | && cd $(top_srcdir) \ | ||
380 | && gtags -i $(GTAGS_ARGS) $$here | ||
381 | |||
382 | distclean-tags: | ||
383 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
384 | |||
385 | distdir: $(DISTFILES) | ||
386 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
387 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
388 | list='$(DISTFILES)'; \ | ||
389 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
390 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
391 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
392 | case $$dist_files in \ | ||
393 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
394 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
395 | sort -u` ;; \ | ||
396 | esac; \ | ||
397 | for file in $$dist_files; do \ | ||
398 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
399 | if test -d $$d/$$file; then \ | ||
400 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
401 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
402 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
403 | fi; \ | ||
404 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
405 | else \ | ||
406 | test -f $(distdir)/$$file \ | ||
407 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
408 | || exit 1; \ | ||
409 | fi; \ | ||
410 | done | ||
411 | check-am: all-am | ||
412 | check: check-am | ||
413 | all-am: Makefile $(LTLIBRARIES) | ||
414 | installdirs: | ||
415 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
416 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
417 | done | ||
418 | install: install-am | ||
419 | install-exec: install-exec-am | ||
420 | install-data: install-data-am | ||
421 | uninstall: uninstall-am | ||
422 | |||
423 | install-am: all-am | ||
424 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
425 | |||
426 | installcheck: installcheck-am | ||
427 | install-strip: | ||
428 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
429 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
430 | `test -z '$(STRIP)' || \ | ||
431 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
432 | mostlyclean-generic: | ||
433 | |||
434 | clean-generic: | ||
435 | |||
436 | distclean-generic: | ||
437 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
438 | |||
439 | maintainer-clean-generic: | ||
440 | @echo "This command is intended for maintainers to use" | ||
441 | @echo "it deletes files that may require special tools to rebuild." | ||
442 | clean: clean-am | ||
443 | |||
444 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
445 | mostlyclean-am | ||
446 | |||
447 | distclean: distclean-am | ||
448 | -rm -rf ./$(DEPDIR) | ||
449 | -rm -f Makefile | ||
450 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
451 | distclean-tags | ||
452 | |||
453 | dvi: dvi-am | ||
454 | |||
455 | dvi-am: | ||
456 | |||
457 | html: html-am | ||
458 | |||
459 | info: info-am | ||
460 | |||
461 | info-am: | ||
462 | |||
463 | install-data-am: install-pluginimpLTLIBRARIES | ||
464 | |||
465 | install-dvi: install-dvi-am | ||
466 | |||
467 | install-exec-am: | ||
468 | |||
469 | install-html: install-html-am | ||
470 | |||
471 | install-info: install-info-am | ||
472 | |||
473 | install-man: | ||
474 | |||
475 | install-pdf: install-pdf-am | ||
476 | |||
477 | install-ps: install-ps-am | ||
478 | |||
479 | installcheck-am: | ||
480 | |||
481 | maintainer-clean: maintainer-clean-am | ||
482 | -rm -rf ./$(DEPDIR) | ||
483 | -rm -f Makefile | ||
484 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
485 | |||
486 | mostlyclean: mostlyclean-am | ||
487 | |||
488 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
489 | mostlyclean-libtool | ||
490 | |||
491 | pdf: pdf-am | ||
492 | |||
493 | pdf-am: | ||
494 | |||
495 | ps: ps-am | ||
496 | |||
497 | ps-am: | ||
498 | |||
499 | uninstall-am: uninstall-pluginimpLTLIBRARIES | ||
500 | |||
501 | .MAKE: install-am install-strip | ||
502 | |||
503 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
504 | clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ | ||
505 | distclean-compile distclean-generic distclean-libtool \ | ||
506 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
507 | install install-am install-data install-data-am install-dvi \ | ||
508 | install-dvi-am install-exec install-exec-am install-html \ | ||
509 | install-html-am install-info install-info-am install-man \ | ||
510 | install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ | ||
511 | install-ps install-ps-am install-strip installcheck \ | ||
512 | installcheck-am installdirs maintainer-clean \ | ||
513 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
514 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
515 | tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES | ||
516 | |||
517 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
518 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
519 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw.c new file mode 100644 index 0000000..09a013d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw.c | |||
@@ -0,0 +1,112 @@ | |||
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 | #include <stdio.h> | ||
25 | |||
26 | #include <g3d/types.h> | ||
27 | #include <g3d/stream.h> | ||
28 | #include <g3d/matrix.h> | ||
29 | #include <g3d/object.h> | ||
30 | |||
31 | #include "imp_ldraw_types.h" | ||
32 | #include "imp_ldraw_part.h" | ||
33 | #include "imp_ldraw_library.h" | ||
34 | #include "imp_ldraw_mpd.h" | ||
35 | |||
36 | static gboolean ldraw_load_simple(G3DStream *stream, G3DModel *model, | ||
37 | LDrawLibrary *lib); | ||
38 | |||
39 | |||
40 | EAPI | ||
41 | gpointer plugin_init(G3DContext *context) | ||
42 | { | ||
43 | return ldraw_library_init(); | ||
44 | } | ||
45 | |||
46 | EAPI | ||
47 | void plugin_cleanup(gpointer user_data) | ||
48 | { | ||
49 | LDrawLibrary *lib = user_data; | ||
50 | |||
51 | ldraw_library_cleanup(lib); | ||
52 | } | ||
53 | |||
54 | EAPI | ||
55 | gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, | ||
56 | G3DModel *model, gpointer user_data) | ||
57 | { | ||
58 | LDrawLibrary *lib = user_data; | ||
59 | |||
60 | g_return_val_if_fail(lib != NULL, FALSE); | ||
61 | if(lib->libdir == NULL) { | ||
62 | g_warning("LDraw: library not found, please set LDRAWDIR"); | ||
63 | return FALSE; | ||
64 | } | ||
65 | |||
66 | lib->context = context; | ||
67 | |||
68 | if(g_ascii_strcasecmp(stream->uri + strlen(stream->uri) - 4, ".mpd") == 0) | ||
69 | return ldraw_mpd_load(stream, model, lib); | ||
70 | else | ||
71 | return ldraw_load_simple(stream, model, lib); | ||
72 | |||
73 | return TRUE; | ||
74 | } | ||
75 | |||
76 | EAPI | ||
77 | gchar *plugin_description(void) | ||
78 | { | ||
79 | return g_strdup("LDraw models."); | ||
80 | } | ||
81 | |||
82 | EAPI | ||
83 | gchar **plugin_extensions(void) | ||
84 | { | ||
85 | return g_strsplit("ldr:mpd:dat", ":", 0); | ||
86 | } | ||
87 | |||
88 | /*****************************************************************************/ | ||
89 | |||
90 | static gboolean ldraw_load_simple(G3DStream *stream, G3DModel *model, | ||
91 | LDrawLibrary *lib) | ||
92 | { | ||
93 | LDrawPart *part; | ||
94 | G3DObject *object; | ||
95 | G3DFloat m[16]; | ||
96 | |||
97 | part = g_new0(LDrawPart, 1); | ||
98 | part->name = g_path_get_basename(stream->uri); | ||
99 | part->stream = stream; | ||
100 | part->master = TRUE; | ||
101 | |||
102 | object = ldraw_part_get_object(part, lib); | ||
103 | if(object == NULL) | ||
104 | return FALSE; | ||
105 | |||
106 | g3d_matrix_identity(m); | ||
107 | g3d_matrix_rotate_xyz(0.0, 0.0, G_PI, m); | ||
108 | g3d_object_transform(object, m); | ||
109 | model->objects = g_slist_append(model->objects, object); | ||
110 | return TRUE; | ||
111 | } | ||
112 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_color.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_color.c new file mode 100644 index 0000000..6b76e50 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_color.c | |||
@@ -0,0 +1,124 @@ | |||
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 <g3d/material.h> | ||
23 | |||
24 | #include "imp_ldraw_types.h" | ||
25 | |||
26 | typedef struct { | ||
27 | gint32 id; | ||
28 | const gchar *name; | ||
29 | G3DFloat r; | ||
30 | G3DFloat g; | ||
31 | G3DFloat b; | ||
32 | G3DFloat a; | ||
33 | } LDrawColorDef; | ||
34 | |||
35 | static LDrawColorDef ldraw_colors[] = { | ||
36 | { 0, "Black", 0.13, 0.13, 0.13, 1.0 }, | ||
37 | { 1, "Blue", 0.00, 0.20, 0.70, 1.0 }, | ||
38 | { 2, "Green", 0.00, 0.55, 0.08, 1.0 }, | ||
39 | { 3, "Teal", 0.00, 0.60, 0.62, 1.0 }, | ||
40 | { 4, "Red", 0.77, 0.00, 0.15, 1.0 }, | ||
41 | { 5, "Dark Pink", 0.87, 0.40, 0.58, 1.0 }, | ||
42 | { 6, "Brown", 0.36, 0.13, 0.00, 1.0 }, | ||
43 | { 7, "Gray", 0.76, 0.76, 0.76, 1.0 }, | ||
44 | { 8, "Dark Gray", 0.39, 0.37, 0.32, 1.0 }, | ||
45 | { 9, "Light Blue", 0.42, 0.67, 0.86, 1.0 }, | ||
46 | { 10, "Bright Green", 0.42, 0.93, 0.56, 1.0 }, | ||
47 | { 11, "Cyan", 0.20, 0.65, 0.65, 1.0 }, | ||
48 | { 12, "Light Red", 1.00, 0.52, 0.48, 1.0 }, | ||
49 | { 13, "Pink", 0.98, 0.64, 0.78, 1.0 }, | ||
50 | { 14, "Yellow", 1.00, 0.86, 0.00, 1.0 }, | ||
51 | { 15, "White", 1.00, 1.00, 1.00, 1.0 }, | ||
52 | |||
53 | { 17, "Light Green", 0.73, 1.00, 0.81, 1.0 }, | ||
54 | { 18, "Light Yellow", 0.99, 0.91, 0.59, 1.0 }, | ||
55 | { 20, "Light Violet", 0.84, 0.77, 0.90, 1.0 }, | ||
56 | { 28, "Dark Tan", 0.77, 0.59, 0.31, 1.0 }, | ||
57 | { 32, "Trans Gray", 0.39, 0.37, 0.32, 0.9 }, | ||
58 | { 33, "Trans Blue", 0.00, 0.13, 0.63, 0.9 }, | ||
59 | { 36, "Trans Red", 0.77, 0.00, 0.15, 0.9 }, | ||
60 | { 39, "Trans Light Gray", 0.76, 0.76, 0.76, 0.9 }, /* FIXME */ | ||
61 | { 40, "Trans Gray", 0.39, 0.37, 0.32, 0.9 }, | ||
62 | { 41, "Trans Light Cyan", 0.68, 0.94, 0.93, 0.95 }, | ||
63 | { 46, "Trans Yellow", 0.79, 0.69, 0.00, 0.9 }, | ||
64 | { 47, "Clear (trans white)", 1.00, 1.00, 1.00, 0.9 }, | ||
65 | { 72, "Dark Stone Gray", 0.39, 0.37, 0.38, 1.0 }, | ||
66 | { 272, "Dark Blue", 0.00, 0.11, 0.41, 1.0 }, | ||
67 | { 288, "Dark Green", 0.15, 0.27, 0.17, 1.0 }, | ||
68 | { 320, "Dark Red", 0.47, 0.00, 0.11, 1.0 }, | ||
69 | { 334, "Chrome Gold", 0.88, 0.43, 0.07, 1.0 }, | ||
70 | { 336, "Earth Orange", 0.82, 0.51, 0.02, 1.0 }, | ||
71 | { 383, "Chrome Silver", 0.88, 0.88, 0.88, 1.0 }, | ||
72 | { 431, "Light Green", 0.73, 1.00, 0.81, 1.0 }, | ||
73 | { 463, "Light Red", 1.00, 0.52, 0.48, 1.0 }, | ||
74 | { 484, "Dark Orange", 0.70, 0.24, 0.00, 1.0 }, | ||
75 | { 494, "Electric Contact", 0.82, 0.82, 0.82, 1.0 }, | ||
76 | { 495, "Light Yellow", 0.99, 0.91, 0.59, 1.0 }, | ||
77 | { 503, "Light Gray", 0.90, 0.89, 0.85, 1.0 }, | ||
78 | |||
79 | { -1, NULL, 0,0,0,0 } | ||
80 | }; | ||
81 | |||
82 | gboolean ldraw_color_init(LDrawLibrary *lib) | ||
83 | { | ||
84 | G3DMaterial *material; | ||
85 | gint32 i; | ||
86 | |||
87 | lib->colordb = g_hash_table_new(g_int_hash, g_int_equal); | ||
88 | |||
89 | for(i = 0; ldraw_colors[i].id >= 0; i ++) { | ||
90 | material = g3d_material_new(); | ||
91 | material->name = g_strdup(ldraw_colors[i].name); | ||
92 | material->r = ldraw_colors[i].r; | ||
93 | material->g = ldraw_colors[i].g; | ||
94 | material->b = ldraw_colors[i].b; | ||
95 | material->a = ldraw_colors[i].a; | ||
96 | g_hash_table_insert(lib->colordb, &(ldraw_colors[i].id), material); | ||
97 | lib->colorlist = g_slist_append(lib->colorlist, material); | ||
98 | #if DEBUG > 2 | ||
99 | g_debug("LDraw: adding color '%s' with id %d", | ||
100 | ldraw_colors[i].name, ldraw_colors[i].id); | ||
101 | #endif | ||
102 | } | ||
103 | return TRUE; | ||
104 | } | ||
105 | |||
106 | G3DMaterial *ldraw_color_lookup(LDrawLibrary *lib, guint32 colid) | ||
107 | { | ||
108 | G3DMaterial *material; | ||
109 | guint32 fbid = 0; | ||
110 | |||
111 | /* current color */ | ||
112 | if(colid == 16) | ||
113 | return NULL; | ||
114 | |||
115 | material = g_hash_table_lookup(lib->colordb, &colid); | ||
116 | if(material == NULL) { /* fall back */ | ||
117 | #if DEBUG > 0 | ||
118 | g_debug("LDraw: failed to lookup color %u", colid); | ||
119 | #endif | ||
120 | material = g_hash_table_lookup(lib->colordb, &fbid); | ||
121 | } | ||
122 | return material; | ||
123 | } | ||
124 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_color.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_color.h new file mode 100644 index 0000000..e5844de --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_color.h | |||
@@ -0,0 +1,30 @@ | |||
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_LDRAW_COLOR_H | ||
23 | #define _IMP_LDRAW_COLOR_H | ||
24 | |||
25 | #include "imp_ldraw_types.h" | ||
26 | |||
27 | gboolean ldraw_color_init(LDrawLibrary *lib); | ||
28 | G3DMaterial *ldraw_color_lookup(LDrawLibrary *lib, guint32 colid); | ||
29 | |||
30 | #endif /* _IMP_LDRAW_COLOR_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_library.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_library.c new file mode 100644 index 0000000..aa07cdb --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_library.c | |||
@@ -0,0 +1,175 @@ | |||
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 <string.h> | ||
23 | |||
24 | #include <g3d/object.h> | ||
25 | |||
26 | #include "imp_ldraw_types.h" | ||
27 | #include "imp_ldraw_part.h" | ||
28 | #include "imp_ldraw_color.h" | ||
29 | #include "imp_ldraw_misc.h" | ||
30 | |||
31 | static gboolean ldraw_library_add_dir(LDrawLibrary *lib, const gchar *subdir) | ||
32 | { | ||
33 | LDrawPart *part; | ||
34 | const gchar *filename; | ||
35 | gchar *partdir, *strup; | ||
36 | GDir *dir; | ||
37 | GError *error; | ||
38 | gboolean prefix = FALSE; | ||
39 | |||
40 | partdir = g_strdup_printf("%s%c%s", lib->libdir, G_DIR_SEPARATOR, subdir); | ||
41 | dir = g_dir_open(partdir, 0, &error); | ||
42 | if(dir == NULL) { | ||
43 | g_warning("LDraw: failed to open directory '%s': %s", partdir, | ||
44 | error->message); | ||
45 | g_error_free(error); | ||
46 | g_free(partdir); | ||
47 | return FALSE; | ||
48 | } | ||
49 | |||
50 | if(path_sep(subdir)) | ||
51 | prefix = TRUE; | ||
52 | |||
53 | filename = g_dir_read_name(dir); | ||
54 | while(filename) { | ||
55 | if(g_ascii_strcasecmp(filename + strlen(filename) - 4, ".dat") == 0) { | ||
56 | #if DEBUG > 3 | ||
57 | g_debug("LDraw: Library: adding '%s'", filename); | ||
58 | #endif | ||
59 | part = g_new0(LDrawPart, 1); | ||
60 | part->filename = g_strdup_printf("%s%c%s", | ||
61 | partdir, G_DIR_SEPARATOR, filename); | ||
62 | strup = g_ascii_strup(filename, -1); | ||
63 | if(prefix) | ||
64 | part->name = g_strdup_printf("%s%c%s", | ||
65 | path_sep(subdir) + 1, | ||
66 | G_DIR_SEPARATOR, strup); | ||
67 | else | ||
68 | part->name = g_strdup(strup); | ||
69 | g_free(strup); | ||
70 | g_hash_table_insert(lib->partdb, part->name, part); | ||
71 | lib->partlist = g_slist_append(lib->partlist, part); | ||
72 | } | ||
73 | filename = g_dir_read_name(dir); | ||
74 | } | ||
75 | g_dir_close(dir); | ||
76 | g_free(partdir); | ||
77 | |||
78 | return TRUE; | ||
79 | } | ||
80 | |||
81 | LDrawLibrary *ldraw_library_init(void) | ||
82 | { | ||
83 | LDrawLibrary *lib; | ||
84 | const gchar *lddir; | ||
85 | |||
86 | lib = g_new0(LDrawLibrary, 1); | ||
87 | lib->partdb = g_hash_table_new(g_str_hash, g_str_equal); | ||
88 | |||
89 | ldraw_color_init(lib); | ||
90 | |||
91 | lddir = g_getenv("LDRAWDIR"); | ||
92 | if(lddir == NULL) /* warning is issued when trying to load a model */ | ||
93 | return lib; | ||
94 | |||
95 | lib->libdir = g_strdup(lddir); | ||
96 | |||
97 | ldraw_library_add_dir(lib, "PARTS"); | ||
98 | ldraw_library_add_dir(lib, "PARTS" G_DIR_SEPARATOR_S "S"); | ||
99 | ldraw_library_add_dir(lib, "P"); | ||
100 | ldraw_library_add_dir(lib, "P" G_DIR_SEPARATOR_S "48"); | ||
101 | |||
102 | return lib; | ||
103 | } | ||
104 | |||
105 | void ldraw_library_cleanup(LDrawLibrary *lib) | ||
106 | { | ||
107 | GSList *item; | ||
108 | LDrawPart *part; | ||
109 | |||
110 | item = lib->partlist; | ||
111 | while(item != NULL) { | ||
112 | part = item->data; | ||
113 | item = g_slist_remove(item, part); | ||
114 | ldraw_part_free(part); | ||
115 | } | ||
116 | g_hash_table_destroy(lib->partdb); | ||
117 | g_free(lib); | ||
118 | } | ||
119 | |||
120 | void ldraw_library_insert(LDrawLibrary *lib, gchar *name, gpointer data) | ||
121 | { | ||
122 | g_hash_table_insert(lib->partdb, name, data); | ||
123 | } | ||
124 | |||
125 | G3DObject *ldraw_library_lookup(LDrawLibrary *lib, const gchar *name) | ||
126 | { | ||
127 | LDrawPart *part; | ||
128 | gchar *strc; | ||
129 | |||
130 | part = g_hash_table_lookup(lib->partdb, name); | ||
131 | if(part == NULL) { | ||
132 | strc = g_ascii_strup(name, -1); | ||
133 | g_strdelimit(strc, "/\\", G_DIR_SEPARATOR); | ||
134 | part = g_hash_table_lookup(lib->partdb, strc); | ||
135 | g_free(strc); | ||
136 | } | ||
137 | #if 0 | ||
138 | if(part == NULL) { | ||
139 | strc = g_ascii_strdown(name, -1); | ||
140 | g_strdelimit(strc, "/\\", G_DIR_SEPARATOR); | ||
141 | part = g_hash_table_lookup(lib->partdb, strc); | ||
142 | g_free(strc); | ||
143 | } | ||
144 | #endif | ||
145 | if(part == NULL) { | ||
146 | g_warning("LDraw: failed to find '%s' in library", name); | ||
147 | return NULL; | ||
148 | } | ||
149 | if(part->object == NULL) { | ||
150 | if(part->stream) { | ||
151 | /* MPD loader has a custom stream */ | ||
152 | part->object = ldraw_part_get_object(part, lib); | ||
153 | } else if(part->filename) { | ||
154 | /* try to load part from standard library */ | ||
155 | part->stream = g3d_stream_open_file(part->filename, "r"); | ||
156 | if(part->stream) { | ||
157 | part->object = ldraw_part_get_object(part, lib); | ||
158 | g3d_stream_close(part->stream); | ||
159 | part->stream = NULL; | ||
160 | } else { | ||
161 | g_warning("LDraw: failed to open stream for '%s'", | ||
162 | part->filename); | ||
163 | } | ||
164 | } else { | ||
165 | g_warning("LDraw: don't know how to open part '%s'", part->name); | ||
166 | } | ||
167 | |||
168 | if(part->object == NULL) { | ||
169 | g_warning("LDraw: failed to load part '%s'", part->name); | ||
170 | return NULL; | ||
171 | } | ||
172 | } | ||
173 | return g3d_object_duplicate(part->object); | ||
174 | } | ||
175 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_library.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_library.h new file mode 100644 index 0000000..39fa0f9 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_library.h | |||
@@ -0,0 +1,32 @@ | |||
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_LDRAW_LIBRARY_H | ||
23 | #define _IMP_LDRAW_LIBRARY_H | ||
24 | |||
25 | #include "imp_ldraw_types.h" | ||
26 | |||
27 | LDrawLibrary *ldraw_library_init(void); | ||
28 | void ldraw_library_cleanup(LDrawLibrary *lib); | ||
29 | void ldraw_library_insert(LDrawLibrary *lib, gchar *name, gpointer data); | ||
30 | G3DObject *ldraw_library_lookup(LDrawLibrary *lib, const gchar *name); | ||
31 | |||
32 | #endif | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_misc.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_misc.h new file mode 100644 index 0000000..16651d5 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_misc.h | |||
@@ -0,0 +1,36 @@ | |||
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_LDRAW_MISC_H | ||
23 | #define _IMP_LDRAW_MISC_H | ||
24 | |||
25 | #include <string.h> | ||
26 | #include <glib.h> | ||
27 | |||
28 | static inline gchar *path_sep(const gchar *text) | ||
29 | { | ||
30 | gchar *p = strchr(text, '/'); | ||
31 | if(p != NULL) | ||
32 | return p; | ||
33 | return strchr(text, '\\'); | ||
34 | } | ||
35 | |||
36 | #endif | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_mpd.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_mpd.c new file mode 100644 index 0000000..a699f2a --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_mpd.c | |||
@@ -0,0 +1,121 @@ | |||
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 <string.h> | ||
23 | #include <stdio.h> | ||
24 | |||
25 | #include <g3d/types.h> | ||
26 | #include <g3d/matrix.h> | ||
27 | #include <g3d/object.h> | ||
28 | |||
29 | #include "imp_ldraw_types.h" | ||
30 | #include "imp_ldraw_part.h" | ||
31 | #include "imp_ldraw_library.h" | ||
32 | |||
33 | static inline void ldraw_create_subpart(LDrawLibrary *lib, gchar *name, | ||
34 | gchar *buffer, GSList **partsp) | ||
35 | { | ||
36 | G3DStream *substream; | ||
37 | LDrawPart *part; | ||
38 | |||
39 | #if DEBUG > 2 | ||
40 | g_debug("LDraw: adding sub-file %s to library", name); | ||
41 | #endif | ||
42 | |||
43 | substream = g3d_stream_from_buffer((guint8 *)buffer, strlen(buffer), | ||
44 | name, TRUE); | ||
45 | if(substream == NULL) { | ||
46 | g_warning("LDraw: failed to create stream for %s", name); | ||
47 | return; | ||
48 | } | ||
49 | part = g_new0(LDrawPart, 1); | ||
50 | part->name = g_ascii_strup(name, -1); | ||
51 | part->stream = substream; | ||
52 | |||
53 | ldraw_library_insert(lib, part->name, part); | ||
54 | *partsp = g_slist_append(*partsp, part); | ||
55 | } | ||
56 | |||
57 | gboolean ldraw_mpd_load(G3DStream *stream, G3DModel *model, | ||
58 | LDrawLibrary *lib) | ||
59 | { | ||
60 | G3DObject *object = NULL; | ||
61 | GSList *parts = NULL, *item; | ||
62 | LDrawPart *part; | ||
63 | gchar buffer[1024], name[256], *streambuf = NULL; | ||
64 | gsize size; | ||
65 | goffset off; | ||
66 | G3DFloat m[16]; | ||
67 | |||
68 | while(!g3d_stream_eof(stream)) { | ||
69 | memset(buffer, 0, 1024); | ||
70 | g3d_stream_read_line(stream, buffer, 1023); | ||
71 | if(strncmp(buffer, "0 FILE ", 7) == 0) { | ||
72 | if(streambuf) { | ||
73 | ldraw_create_subpart(lib, name, streambuf, &parts); | ||
74 | streambuf = NULL; | ||
75 | } | ||
76 | memset(name, 0, 256); | ||
77 | if(sscanf(buffer + 7, "%255s", name) == 1) | ||
78 | streambuf = g_strdup(""); | ||
79 | } else if(strncmp(buffer, "0 NOFILE", 8) == 0) { | ||
80 | if(streambuf) { | ||
81 | ldraw_create_subpart(lib, name, streambuf, &parts); | ||
82 | streambuf = NULL; | ||
83 | } | ||
84 | break; | ||
85 | } else if(streambuf) { | ||
86 | /* append line to buffer */ | ||
87 | size = strlen(buffer) + strlen(streambuf) + 1; | ||
88 | off = strlen(streambuf); | ||
89 | streambuf = g_realloc(streambuf, size * sizeof(gchar)); | ||
90 | strcpy(streambuf + off, buffer); | ||
91 | } | ||
92 | } /* !eof */ | ||
93 | |||
94 | if(streambuf) | ||
95 | ldraw_create_subpart(lib, name, streambuf, &parts); | ||
96 | |||
97 | if(parts) { | ||
98 | part = parts->data; | ||
99 | part->master = TRUE; | ||
100 | object = ldraw_part_get_object(part, lib); | ||
101 | if(object != NULL) { | ||
102 | g3d_matrix_identity(m); | ||
103 | g3d_matrix_rotate_xyz(0.0, 0.0, G_PI, m); | ||
104 | g3d_object_transform(object, m); | ||
105 | model->objects = g_slist_append(model->objects, object); | ||
106 | } | ||
107 | } | ||
108 | |||
109 | #if 1 | ||
110 | /* close open streams */ | ||
111 | for(item = parts; item != NULL; item = item->next) { | ||
112 | part = item->data; | ||
113 | if(part->stream) { | ||
114 | g3d_stream_close(part->stream); | ||
115 | part->stream = NULL; | ||
116 | } | ||
117 | } | ||
118 | #endif | ||
119 | return (object != NULL); | ||
120 | } | ||
121 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_mpd.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_mpd.h new file mode 100644 index 0000000..75a5f11 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_mpd.h | |||
@@ -0,0 +1,33 @@ | |||
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_LDRAW_MPD_H | ||
23 | #define _IMP_LDRAW_MPD_H | ||
24 | |||
25 | #include <g3d/types.h> | ||
26 | #include <g3d/stream.h> | ||
27 | |||
28 | #include "imp_ldraw_types.h" | ||
29 | |||
30 | gboolean ldraw_mpd_load(G3DStream *stream, G3DModel *model, | ||
31 | LDrawLibrary *lib); | ||
32 | |||
33 | #endif /* _IMP_LDRAW_MPD_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_part.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_part.c new file mode 100644 index 0000000..9f7f608 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_part.c | |||
@@ -0,0 +1,291 @@ | |||
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 <stdio.h> | ||
23 | #include <string.h> | ||
24 | |||
25 | #include <g3d/types.h> | ||
26 | #include <g3d/context.h> | ||
27 | #include <g3d/stream.h> | ||
28 | #include <g3d/material.h> | ||
29 | #include <g3d/matrix.h> | ||
30 | #include <g3d/object.h> | ||
31 | |||
32 | #include "imp_ldraw_types.h" | ||
33 | #include "imp_ldraw_part.h" | ||
34 | #include "imp_ldraw_library.h" | ||
35 | #include "imp_ldraw_color.h" | ||
36 | #include "imp_ldraw_misc.h" | ||
37 | |||
38 | static gboolean ldraw_part_parse_meta(G3DObject *object, gchar *buffer) | ||
39 | { | ||
40 | if(object->name == NULL) { | ||
41 | object->name = g_strdup(buffer); | ||
42 | return TRUE; | ||
43 | } | ||
44 | #if DEBUG > 2 | ||
45 | g_debug("META: %s", buffer); | ||
46 | #endif | ||
47 | return TRUE; | ||
48 | } | ||
49 | |||
50 | static void ldraw_part_replace_material(G3DObject *object, | ||
51 | G3DMaterial *material) | ||
52 | { | ||
53 | GSList *item; | ||
54 | G3DObject *sub; | ||
55 | G3DFace *face; | ||
56 | |||
57 | for(item = object->faces; item != NULL; item = item->next) { | ||
58 | face = item->data; | ||
59 | if(face->material == NULL) | ||
60 | face->material = material; | ||
61 | } | ||
62 | for(item = object->objects; item != NULL; item = item->next) { | ||
63 | sub = item->data; | ||
64 | ldraw_part_replace_material(sub, material); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | static gboolean ldraw_part_parse_ref(G3DObject *object, gchar *buffer, | ||
69 | LDrawLibrary *lib) | ||
70 | { | ||
71 | G3DObject *subobj; | ||
72 | G3DMaterial *material; | ||
73 | G3DFloat m[16], x, y, z; | ||
74 | guint32 colid; | ||
75 | gchar fname[256], *strp; | ||
76 | |||
77 | g3d_matrix_identity(m); | ||
78 | memset(fname, 0, 256); | ||
79 | |||
80 | if(sscanf(buffer, "%u " | ||
81 | G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " | ||
82 | G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " | ||
83 | G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " %255s", | ||
84 | &colid, &x, &y, &z, | ||
85 | m + 0 * 4 + 0, m + 1 * 4 + 0, m + 2 * 4 + 0, | ||
86 | m + 0 * 4 + 1, m + 1 * 4 + 1, m + 2 * 4 + 1, | ||
87 | m + 0 * 4 + 2, m + 1 * 4 + 2, m + 2 * 4 + 2, | ||
88 | fname) == 14) { | ||
89 | |||
90 | strp = path_sep(fname); | ||
91 | if(strp != NULL) | ||
92 | strp[0] = G_DIR_SEPARATOR; | ||
93 | |||
94 | subobj = ldraw_part_from_file(lib, fname); | ||
95 | if(!subobj) | ||
96 | subobj = ldraw_library_lookup(lib, fname); | ||
97 | if(subobj != NULL) { | ||
98 | g3d_object_transform(subobj, m); | ||
99 | g3d_matrix_identity(m); | ||
100 | g3d_matrix_translate(x, y, z, m); | ||
101 | g3d_object_transform(subobj, m); | ||
102 | if(colid != 16) { | ||
103 | material = ldraw_color_lookup(lib, colid); | ||
104 | ldraw_part_replace_material(subobj, material); | ||
105 | } | ||
106 | object->objects = g_slist_append(object->objects, subobj); | ||
107 | return TRUE; | ||
108 | } | ||
109 | } | ||
110 | #if DEBUG > 1 | ||
111 | g_warning("LDraw: failed to parse/process reference: %s", buffer); | ||
112 | #endif | ||
113 | return FALSE; | ||
114 | } | ||
115 | |||
116 | static gboolean ldraw_part_parse_tri(G3DObject *object, gchar *buffer, | ||
117 | LDrawLibrary *lib) | ||
118 | { | ||
119 | guint32 off, colid; | ||
120 | G3DFace *face; | ||
121 | |||
122 | off = object->vertex_count; | ||
123 | object->vertex_count += 3; | ||
124 | object->vertex_data = g_realloc(object->vertex_data, | ||
125 | object->vertex_count * 3 * sizeof(G3DFloat)); | ||
126 | if(sscanf(buffer, "%u " | ||
127 | G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " | ||
128 | G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " | ||
129 | G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT, | ||
130 | &colid, | ||
131 | object->vertex_data + (off + 0) * 3 + 0, | ||
132 | object->vertex_data + (off + 0) * 3 + 1, | ||
133 | object->vertex_data + (off + 0) * 3 + 2, | ||
134 | object->vertex_data + (off + 1) * 3 + 0, | ||
135 | object->vertex_data + (off + 1) * 3 + 1, | ||
136 | object->vertex_data + (off + 1) * 3 + 2, | ||
137 | object->vertex_data + (off + 2) * 3 + 0, | ||
138 | object->vertex_data + (off + 2) * 3 + 1, | ||
139 | object->vertex_data + (off + 2) * 3 + 2) == 10) { | ||
140 | |||
141 | face = g_new0(G3DFace, 1); | ||
142 | face->material = ldraw_color_lookup(lib, colid); | ||
143 | face->vertex_count = 3; | ||
144 | face->vertex_indices = g_new0(guint32, 3); | ||
145 | face->vertex_indices[0] = off + 0; | ||
146 | face->vertex_indices[1] = off + 1; | ||
147 | face->vertex_indices[2] = off + 2; | ||
148 | object->faces = g_slist_append(object->faces, face); | ||
149 | return TRUE; | ||
150 | } | ||
151 | return FALSE; | ||
152 | } | ||
153 | |||
154 | static gboolean ldraw_part_parse_quad(G3DObject *object, gchar *buffer, | ||
155 | LDrawLibrary *lib) | ||
156 | { | ||
157 | guint32 off, colid; | ||
158 | G3DFace *face; | ||
159 | |||
160 | off = object->vertex_count; | ||
161 | object->vertex_count += 4; | ||
162 | object->vertex_data = g_realloc(object->vertex_data, | ||
163 | object->vertex_count * 3 * sizeof(G3DFloat)); | ||
164 | if(sscanf(buffer, "%u " | ||
165 | G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " | ||
166 | G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " | ||
167 | G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT, | ||
168 | &colid, | ||
169 | object->vertex_data + (off + 0) * 3 + 0, | ||
170 | object->vertex_data + (off + 0) * 3 + 1, | ||
171 | object->vertex_data + (off + 0) * 3 + 2, | ||
172 | object->vertex_data + (off + 1) * 3 + 0, | ||
173 | object->vertex_data + (off + 1) * 3 + 1, | ||
174 | object->vertex_data + (off + 1) * 3 + 2, | ||
175 | object->vertex_data + (off + 2) * 3 + 0, | ||
176 | object->vertex_data + (off + 2) * 3 + 1, | ||
177 | object->vertex_data + (off + 2) * 3 + 2, | ||
178 | object->vertex_data + (off + 3) * 3 + 0, | ||
179 | object->vertex_data + (off + 3) * 3 + 1, | ||
180 | object->vertex_data + (off + 3) * 3 + 2) == 13) { | ||
181 | |||
182 | face = g_new0(G3DFace, 1); | ||
183 | face->material = ldraw_color_lookup(lib, colid); | ||
184 | face->vertex_count = 4; | ||
185 | face->vertex_indices = g_new0(guint32, 4); | ||
186 | face->vertex_indices[0] = off + 0; | ||
187 | face->vertex_indices[1] = off + 1; | ||
188 | face->vertex_indices[2] = off + 2; | ||
189 | face->vertex_indices[3] = off + 3; | ||
190 | object->faces = g_slist_append(object->faces, face); | ||
191 | return TRUE; | ||
192 | } | ||
193 | return FALSE; | ||
194 | } | ||
195 | |||
196 | static inline G3DObject *ldraw_part_open_file(LDrawLibrary *lib, | ||
197 | const gchar *filename) | ||
198 | { | ||
199 | LDrawPart *part; | ||
200 | |||
201 | part = g_new0(LDrawPart, 1); | ||
202 | part->name = g_strdup(filename); | ||
203 | part->stream = g3d_stream_open_file(filename, "r"); | ||
204 | if(part->stream == NULL) { | ||
205 | g_free(part); | ||
206 | return NULL; | ||
207 | } | ||
208 | part->object = ldraw_part_get_object(part, lib); | ||
209 | g3d_stream_close(part->stream); | ||
210 | part->stream = NULL; | ||
211 | |||
212 | ldraw_library_insert(lib, part->name, part); | ||
213 | |||
214 | return part->object; | ||
215 | } | ||
216 | |||
217 | G3DObject *ldraw_part_from_file(LDrawLibrary *lib, const gchar *filename) | ||
218 | { | ||
219 | G3DObject *object; | ||
220 | gchar *path; | ||
221 | |||
222 | if(g_file_test(filename, G_FILE_TEST_EXISTS)) | ||
223 | return ldraw_part_open_file(lib, filename); | ||
224 | path = g_ascii_strdown(filename, -1); | ||
225 | if(g_file_test(path, G_FILE_TEST_EXISTS)) { | ||
226 | object = ldraw_part_open_file(lib, path); | ||
227 | g_free(path); | ||
228 | return object; | ||
229 | } | ||
230 | g_free(path); | ||
231 | return NULL; | ||
232 | } | ||
233 | |||
234 | G3DObject *ldraw_part_get_object(LDrawPart *part, LDrawLibrary *lib) | ||
235 | { | ||
236 | G3DObject *object; | ||
237 | G3DMaterial *material; | ||
238 | gchar buffer[1024]; | ||
239 | |||
240 | object = g_new0(G3DObject, 1); | ||
241 | material = g3d_material_new(); | ||
242 | material->name = g_strdup("default material"); | ||
243 | object->materials = g_slist_append(object->materials, material); | ||
244 | |||
245 | while(!g3d_stream_eof(part->stream)) { | ||
246 | memset(buffer, 0, 1024); | ||
247 | g3d_stream_read_line(part->stream, buffer, 1023); | ||
248 | g_strstrip(buffer); | ||
249 | if(strlen(buffer) == 0) | ||
250 | continue; | ||
251 | switch(buffer[0] - 0x30) { | ||
252 | case 0: /* meta data */ | ||
253 | ldraw_part_parse_meta(object, buffer + 2); | ||
254 | break; | ||
255 | case 1: /* sub-file reference */ | ||
256 | ldraw_part_parse_ref(object, buffer + 2, lib); | ||
257 | break; | ||
258 | case 2: /* line */ | ||
259 | break; | ||
260 | case 3: /* triangle */ | ||
261 | ldraw_part_parse_tri(object, buffer + 2, lib); | ||
262 | break; | ||
263 | case 4: /* quadrilateral */ | ||
264 | ldraw_part_parse_quad(object, buffer + 2, lib); | ||
265 | break; | ||
266 | case 5: /* optional line */ | ||
267 | break; | ||
268 | default: | ||
269 | g_warning("LDraw: unknown type of line: %s", buffer); | ||
270 | break; | ||
271 | } | ||
272 | if(part->master) { | ||
273 | g3d_context_update_progress_bar(lib->context, | ||
274 | (G3DFloat)g3d_stream_tell(part->stream) / | ||
275 | (G3DFloat)g3d_stream_size(part->stream), TRUE); | ||
276 | g3d_context_update_interface(lib->context); | ||
277 | } | ||
278 | } | ||
279 | |||
280 | return object; | ||
281 | } | ||
282 | |||
283 | void ldraw_part_free(LDrawPart *part) | ||
284 | { | ||
285 | if(part->stream) | ||
286 | g3d_stream_close(part->stream); | ||
287 | if(part->filename) | ||
288 | g_free(part->filename); | ||
289 | g_free(part->name); | ||
290 | g_free(part); | ||
291 | } | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_part.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_part.h new file mode 100644 index 0000000..8bd758d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_part.h | |||
@@ -0,0 +1,31 @@ | |||
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_LDRAW_PART_H | ||
23 | #define _IMP_LDRAW_PART_H | ||
24 | |||
25 | #include "imp_ldraw_types.h" | ||
26 | |||
27 | G3DObject *ldraw_part_from_file(LDrawLibrary *lib, const gchar *filename); | ||
28 | G3DObject *ldraw_part_get_object(LDrawPart *part, LDrawLibrary *lib); | ||
29 | void ldraw_part_free(LDrawPart *part); | ||
30 | |||
31 | #endif /* _IMP_LDRAW_PART_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_types.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_types.h new file mode 100644 index 0000000..56805db --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_types.h | |||
@@ -0,0 +1,48 @@ | |||
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_LDRAW_TYPES_H | ||
23 | #define _IMP_LDRAW_TYPES_H | ||
24 | |||
25 | #include <glib.h> | ||
26 | |||
27 | #include <g3d/types.h> | ||
28 | #include <g3d/stream.h> | ||
29 | |||
30 | typedef struct { | ||
31 | gchar *name; | ||
32 | gchar *filename; | ||
33 | G3DObject *object; | ||
34 | G3DStream *stream; | ||
35 | gboolean failed; | ||
36 | gboolean master; | ||
37 | } LDrawPart; | ||
38 | |||
39 | typedef struct { | ||
40 | G3DContext *context; | ||
41 | gchar *libdir; | ||
42 | GHashTable *partdb; | ||
43 | GSList *partlist; | ||
44 | GHashTable *colordb; | ||
45 | GSList *colorlist; | ||
46 | } LDrawLibrary; | ||
47 | |||
48 | #endif /* _IMP_LDRAW_TYPES_H */ | ||