From cb3716ffb584fe0f593b6f1669a8efdba1305104 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 29 Mar 2016 02:16:55 +1000 Subject: Added my version of libg3d and friends. --- .../libg3d-0.0.8/plugins/import/imp_ldraw/Makefile | 519 +++++++++++++++++++++ .../plugins/import/imp_ldraw/Makefile.am | 24 + .../plugins/import/imp_ldraw/Makefile.in | 519 +++++++++++++++++++++ .../plugins/import/imp_ldraw/imp_ldraw.c | 112 +++++ .../plugins/import/imp_ldraw/imp_ldraw_color.c | 124 +++++ .../plugins/import/imp_ldraw/imp_ldraw_color.h | 30 ++ .../plugins/import/imp_ldraw/imp_ldraw_library.c | 175 +++++++ .../plugins/import/imp_ldraw/imp_ldraw_library.h | 32 ++ .../plugins/import/imp_ldraw/imp_ldraw_misc.h | 36 ++ .../plugins/import/imp_ldraw/imp_ldraw_mpd.c | 121 +++++ .../plugins/import/imp_ldraw/imp_ldraw_mpd.h | 33 ++ .../plugins/import/imp_ldraw/imp_ldraw_part.c | 291 ++++++++++++ .../plugins/import/imp_ldraw/imp_ldraw_part.h | 31 ++ .../plugins/import/imp_ldraw/imp_ldraw_types.h | 48 ++ 14 files changed, 2095 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_color.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_color.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_library.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_library.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_misc.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_mpd.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_mpd.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_part.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_part.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw/imp_ldraw_types.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw') 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 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_ldraw/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/libg3d +pkglibdir = $(libdir)/libg3d +pkgincludedir = $(includedir)/libg3d +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = plugins/import/imp_ldraw +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/g3d/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pluginimpdir)" +pluginimpLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pluginimp_LTLIBRARIES) +imp_ldraw_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_ldraw_la_OBJECTS = imp_ldraw.lo imp_ldraw_part.lo \ + imp_ldraw_library.lo imp_ldraw_color.lo imp_ldraw_mpd.lo +imp_ldraw_la_OBJECTS = $(am_imp_ldraw_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(imp_ldraw_la_SOURCES) +DIST_SOURCES = $(imp_ldraw_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar +AR = ar +AS = as +AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf +AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader +AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DBG_CFLAGS = -O2 +DEBUG = 0 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = dlltool +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +F77 = +FFLAGS = +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 +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 +GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include +GLIB_GENMARSHAL = glib-genmarshal +GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 +GLIB_MKENUMS = glib-mkenums +GOBJECT_QUERY = gobject-query +GREP = /bin/grep +GTKDOC_CHECK = /usr/bin/gtkdoc-check +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 +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 +HTML_DIR = ${datadir}/gtk-doc/html +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LEX = flex +LEXLIB = -lfl +LEX_OUTPUT_ROOT = lex.yy +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 +LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0 +LIBOBJS = +LIBS = -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet +LIBXML2_CFLAGS = -I/usr/include/libxml2 +LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 +LN_S = ln -s +LTLIBOBJS = +LTVERSION = 0:8:0 +MAGIC_LIBS = -lmagic +MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo +MATH_LIBS = -lm +MKDIR_P = /bin/mkdir -p +OBJDUMP = objdump +OBJEXT = o +PACKAGE = libg3d +PACKAGE_BUGREPORT = +PACKAGE_NAME = +PACKAGE_STRING = +PACKAGE_TARNAME = +PACKAGE_VERSION = +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +PLUGINS_LDFLAGS = -avoid-version -export-dynamic +RANLIB = ranlib +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 0.0.8 +XML2_CONFIG = /usr/bin/xml2-config +XML_CPPFLAGS = -I/usr/include/libxml2 +XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 +Z_CFLAGS = +Z_LIBS = -lz +abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_ldraw +abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 +abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = ../../.. +top_srcdir = ../../.. +pluginimpdir = $(pkglibdir)/plugins/import +pluginimp_LTLIBRARIES = imp_ldraw.la +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + -O2 -DDEBUG=0 \ + -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include + +INCLUDES = -I$(top_srcdir)/include +AM_LDFLAGS = \ + -no-undefined -module \ + -avoid-version -export-dynamic + +imp_ldraw_la_SOURCES = imp_ldraw.c imp_ldraw_misc.h imp_ldraw_types.h \ + imp_ldraw_part.c imp_ldraw_part.h \ + imp_ldraw_library.c imp_ldraw_library.h \ + imp_ldraw_color.c imp_ldraw_color.h \ + imp_ldraw_mpd.c imp_ldraw_mpd.h + +imp_ldraw_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_ldraw/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_ldraw/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pluginimpLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ + done + +clean-pluginimpLTLIBRARIES: + -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +imp_ldraw.la: $(imp_ldraw_la_OBJECTS) $(imp_ldraw_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_ldraw_la_OBJECTS) $(imp_ldraw_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_ldraw.Plo +include ./$(DEPDIR)/imp_ldraw_color.Plo +include ./$(DEPDIR)/imp_ldraw_library.Plo +include ./$(DEPDIR)/imp_ldraw_mpd.Plo +include ./$(DEPDIR)/imp_ldraw_part.Plo + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pluginimpdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pluginimpLTLIBRARIES + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pluginimpLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.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 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +pluginimp_LTLIBRARIES = imp_ldraw.la + +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ + @GLIB_CFLAGS@ + +INCLUDES = -I$(top_srcdir)/include + +AM_LDFLAGS = \ + -no-undefined -module \ + @PLUGINS_LDFLAGS@ + +LIBTOOL += --quiet + +imp_ldraw_la_SOURCES = imp_ldraw.c imp_ldraw_misc.h imp_ldraw_types.h \ + imp_ldraw_part.c imp_ldraw_part.h \ + imp_ldraw_library.c imp_ldraw_library.h \ + imp_ldraw_color.c imp_ldraw_color.h \ + imp_ldraw_mpd.c imp_ldraw_mpd.h +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 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/import/imp_ldraw +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/g3d/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pluginimpdir)" +pluginimpLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pluginimp_LTLIBRARIES) +imp_ldraw_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_ldraw_la_OBJECTS = imp_ldraw.lo imp_ldraw_part.lo \ + imp_ldraw_library.lo imp_ldraw_color.lo imp_ldraw_mpd.lo +imp_ldraw_la_OBJECTS = $(am_imp_ldraw_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(imp_ldraw_la_SOURCES) +DIST_SOURCES = $(imp_ldraw_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBG_CFLAGS = @DBG_CFLAGS@ +DEBUG = @DEBUG@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ +GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ --quiet +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LTVERSION = @LTVERSION@ +MAGIC_LIBS = @MAGIC_LIBS@ +MAKEINFO = @MAKEINFO@ +MATH_LIBS = @MATH_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_CFLAGS = @Z_CFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pluginimpdir = $(pkglibdir)/plugins/import +pluginimp_LTLIBRARIES = imp_ldraw.la +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ + @GLIB_CFLAGS@ + +INCLUDES = -I$(top_srcdir)/include +AM_LDFLAGS = \ + -no-undefined -module \ + @PLUGINS_LDFLAGS@ + +imp_ldraw_la_SOURCES = imp_ldraw.c imp_ldraw_misc.h imp_ldraw_types.h \ + imp_ldraw_part.c imp_ldraw_part.h \ + imp_ldraw_library.c imp_ldraw_library.h \ + imp_ldraw_color.c imp_ldraw_color.h \ + imp_ldraw_mpd.c imp_ldraw_mpd.h + +imp_ldraw_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_ldraw/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_ldraw/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pluginimpLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ + done + +clean-pluginimpLTLIBRARIES: + -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +imp_ldraw.la: $(imp_ldraw_la_OBJECTS) $(imp_ldraw_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_ldraw_la_OBJECTS) $(imp_ldraw_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw_color.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw_library.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw_mpd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_ldraw_part.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pluginimpdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pluginimpLTLIBRARIES + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pluginimpLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.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 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include + +#include +#include +#include +#include + +#include "imp_ldraw_types.h" +#include "imp_ldraw_part.h" +#include "imp_ldraw_library.h" +#include "imp_ldraw_mpd.h" + +static gboolean ldraw_load_simple(G3DStream *stream, G3DModel *model, + LDrawLibrary *lib); + + +EAPI +gpointer plugin_init(G3DContext *context) +{ + return ldraw_library_init(); +} + +EAPI +void plugin_cleanup(gpointer user_data) +{ + LDrawLibrary *lib = user_data; + + ldraw_library_cleanup(lib); +} + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model, gpointer user_data) +{ + LDrawLibrary *lib = user_data; + + g_return_val_if_fail(lib != NULL, FALSE); + if(lib->libdir == NULL) { + g_warning("LDraw: library not found, please set LDRAWDIR"); + return FALSE; + } + + lib->context = context; + + if(g_ascii_strcasecmp(stream->uri + strlen(stream->uri) - 4, ".mpd") == 0) + return ldraw_mpd_load(stream, model, lib); + else + return ldraw_load_simple(stream, model, lib); + + return TRUE; +} + +EAPI +gchar *plugin_description(void) +{ + return g_strdup("LDraw models."); +} + +EAPI +gchar **plugin_extensions(void) +{ + return g_strsplit("ldr:mpd:dat", ":", 0); +} + +/*****************************************************************************/ + +static gboolean ldraw_load_simple(G3DStream *stream, G3DModel *model, + LDrawLibrary *lib) +{ + LDrawPart *part; + G3DObject *object; + G3DFloat m[16]; + + part = g_new0(LDrawPart, 1); + part->name = g_path_get_basename(stream->uri); + part->stream = stream; + part->master = TRUE; + + object = ldraw_part_get_object(part, lib); + if(object == NULL) + return FALSE; + + g3d_matrix_identity(m); + g3d_matrix_rotate_xyz(0.0, 0.0, G_PI, m); + g3d_object_transform(object, m); + model->objects = g_slist_append(model->objects, object); + return TRUE; +} + 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 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include + +#include "imp_ldraw_types.h" + +typedef struct { + gint32 id; + const gchar *name; + G3DFloat r; + G3DFloat g; + G3DFloat b; + G3DFloat a; +} LDrawColorDef; + +static LDrawColorDef ldraw_colors[] = { + { 0, "Black", 0.13, 0.13, 0.13, 1.0 }, + { 1, "Blue", 0.00, 0.20, 0.70, 1.0 }, + { 2, "Green", 0.00, 0.55, 0.08, 1.0 }, + { 3, "Teal", 0.00, 0.60, 0.62, 1.0 }, + { 4, "Red", 0.77, 0.00, 0.15, 1.0 }, + { 5, "Dark Pink", 0.87, 0.40, 0.58, 1.0 }, + { 6, "Brown", 0.36, 0.13, 0.00, 1.0 }, + { 7, "Gray", 0.76, 0.76, 0.76, 1.0 }, + { 8, "Dark Gray", 0.39, 0.37, 0.32, 1.0 }, + { 9, "Light Blue", 0.42, 0.67, 0.86, 1.0 }, + { 10, "Bright Green", 0.42, 0.93, 0.56, 1.0 }, + { 11, "Cyan", 0.20, 0.65, 0.65, 1.0 }, + { 12, "Light Red", 1.00, 0.52, 0.48, 1.0 }, + { 13, "Pink", 0.98, 0.64, 0.78, 1.0 }, + { 14, "Yellow", 1.00, 0.86, 0.00, 1.0 }, + { 15, "White", 1.00, 1.00, 1.00, 1.0 }, + + { 17, "Light Green", 0.73, 1.00, 0.81, 1.0 }, + { 18, "Light Yellow", 0.99, 0.91, 0.59, 1.0 }, + { 20, "Light Violet", 0.84, 0.77, 0.90, 1.0 }, + { 28, "Dark Tan", 0.77, 0.59, 0.31, 1.0 }, + { 32, "Trans Gray", 0.39, 0.37, 0.32, 0.9 }, + { 33, "Trans Blue", 0.00, 0.13, 0.63, 0.9 }, + { 36, "Trans Red", 0.77, 0.00, 0.15, 0.9 }, + { 39, "Trans Light Gray", 0.76, 0.76, 0.76, 0.9 }, /* FIXME */ + { 40, "Trans Gray", 0.39, 0.37, 0.32, 0.9 }, + { 41, "Trans Light Cyan", 0.68, 0.94, 0.93, 0.95 }, + { 46, "Trans Yellow", 0.79, 0.69, 0.00, 0.9 }, + { 47, "Clear (trans white)", 1.00, 1.00, 1.00, 0.9 }, + { 72, "Dark Stone Gray", 0.39, 0.37, 0.38, 1.0 }, + { 272, "Dark Blue", 0.00, 0.11, 0.41, 1.0 }, + { 288, "Dark Green", 0.15, 0.27, 0.17, 1.0 }, + { 320, "Dark Red", 0.47, 0.00, 0.11, 1.0 }, + { 334, "Chrome Gold", 0.88, 0.43, 0.07, 1.0 }, + { 336, "Earth Orange", 0.82, 0.51, 0.02, 1.0 }, + { 383, "Chrome Silver", 0.88, 0.88, 0.88, 1.0 }, + { 431, "Light Green", 0.73, 1.00, 0.81, 1.0 }, + { 463, "Light Red", 1.00, 0.52, 0.48, 1.0 }, + { 484, "Dark Orange", 0.70, 0.24, 0.00, 1.0 }, + { 494, "Electric Contact", 0.82, 0.82, 0.82, 1.0 }, + { 495, "Light Yellow", 0.99, 0.91, 0.59, 1.0 }, + { 503, "Light Gray", 0.90, 0.89, 0.85, 1.0 }, + + { -1, NULL, 0,0,0,0 } +}; + +gboolean ldraw_color_init(LDrawLibrary *lib) +{ + G3DMaterial *material; + gint32 i; + + lib->colordb = g_hash_table_new(g_int_hash, g_int_equal); + + for(i = 0; ldraw_colors[i].id >= 0; i ++) { + material = g3d_material_new(); + material->name = g_strdup(ldraw_colors[i].name); + material->r = ldraw_colors[i].r; + material->g = ldraw_colors[i].g; + material->b = ldraw_colors[i].b; + material->a = ldraw_colors[i].a; + g_hash_table_insert(lib->colordb, &(ldraw_colors[i].id), material); + lib->colorlist = g_slist_append(lib->colorlist, material); +#if DEBUG > 2 + g_debug("LDraw: adding color '%s' with id %d", + ldraw_colors[i].name, ldraw_colors[i].id); +#endif + } + return TRUE; +} + +G3DMaterial *ldraw_color_lookup(LDrawLibrary *lib, guint32 colid) +{ + G3DMaterial *material; + guint32 fbid = 0; + + /* current color */ + if(colid == 16) + return NULL; + + material = g_hash_table_lookup(lib->colordb, &colid); + if(material == NULL) { /* fall back */ +#if DEBUG > 0 + g_debug("LDraw: failed to lookup color %u", colid); +#endif + material = g_hash_table_lookup(lib->colordb, &fbid); + } + return material; +} + 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 @@ +/* $Id:$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_LDRAW_COLOR_H +#define _IMP_LDRAW_COLOR_H + +#include "imp_ldraw_types.h" + +gboolean ldraw_color_init(LDrawLibrary *lib); +G3DMaterial *ldraw_color_lookup(LDrawLibrary *lib, guint32 colid); + +#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 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include + +#include + +#include "imp_ldraw_types.h" +#include "imp_ldraw_part.h" +#include "imp_ldraw_color.h" +#include "imp_ldraw_misc.h" + +static gboolean ldraw_library_add_dir(LDrawLibrary *lib, const gchar *subdir) +{ + LDrawPart *part; + const gchar *filename; + gchar *partdir, *strup; + GDir *dir; + GError *error; + gboolean prefix = FALSE; + + partdir = g_strdup_printf("%s%c%s", lib->libdir, G_DIR_SEPARATOR, subdir); + dir = g_dir_open(partdir, 0, &error); + if(dir == NULL) { + g_warning("LDraw: failed to open directory '%s': %s", partdir, + error->message); + g_error_free(error); + g_free(partdir); + return FALSE; + } + + if(path_sep(subdir)) + prefix = TRUE; + + filename = g_dir_read_name(dir); + while(filename) { + if(g_ascii_strcasecmp(filename + strlen(filename) - 4, ".dat") == 0) { +#if DEBUG > 3 + g_debug("LDraw: Library: adding '%s'", filename); +#endif + part = g_new0(LDrawPart, 1); + part->filename = g_strdup_printf("%s%c%s", + partdir, G_DIR_SEPARATOR, filename); + strup = g_ascii_strup(filename, -1); + if(prefix) + part->name = g_strdup_printf("%s%c%s", + path_sep(subdir) + 1, + G_DIR_SEPARATOR, strup); + else + part->name = g_strdup(strup); + g_free(strup); + g_hash_table_insert(lib->partdb, part->name, part); + lib->partlist = g_slist_append(lib->partlist, part); + } + filename = g_dir_read_name(dir); + } + g_dir_close(dir); + g_free(partdir); + + return TRUE; +} + +LDrawLibrary *ldraw_library_init(void) +{ + LDrawLibrary *lib; + const gchar *lddir; + + lib = g_new0(LDrawLibrary, 1); + lib->partdb = g_hash_table_new(g_str_hash, g_str_equal); + + ldraw_color_init(lib); + + lddir = g_getenv("LDRAWDIR"); + if(lddir == NULL) /* warning is issued when trying to load a model */ + return lib; + + lib->libdir = g_strdup(lddir); + + ldraw_library_add_dir(lib, "PARTS"); + ldraw_library_add_dir(lib, "PARTS" G_DIR_SEPARATOR_S "S"); + ldraw_library_add_dir(lib, "P"); + ldraw_library_add_dir(lib, "P" G_DIR_SEPARATOR_S "48"); + + return lib; +} + +void ldraw_library_cleanup(LDrawLibrary *lib) +{ + GSList *item; + LDrawPart *part; + + item = lib->partlist; + while(item != NULL) { + part = item->data; + item = g_slist_remove(item, part); + ldraw_part_free(part); + } + g_hash_table_destroy(lib->partdb); + g_free(lib); +} + +void ldraw_library_insert(LDrawLibrary *lib, gchar *name, gpointer data) +{ + g_hash_table_insert(lib->partdb, name, data); +} + +G3DObject *ldraw_library_lookup(LDrawLibrary *lib, const gchar *name) +{ + LDrawPart *part; + gchar *strc; + + part = g_hash_table_lookup(lib->partdb, name); + if(part == NULL) { + strc = g_ascii_strup(name, -1); + g_strdelimit(strc, "/\\", G_DIR_SEPARATOR); + part = g_hash_table_lookup(lib->partdb, strc); + g_free(strc); + } +#if 0 + if(part == NULL) { + strc = g_ascii_strdown(name, -1); + g_strdelimit(strc, "/\\", G_DIR_SEPARATOR); + part = g_hash_table_lookup(lib->partdb, strc); + g_free(strc); + } +#endif + if(part == NULL) { + g_warning("LDraw: failed to find '%s' in library", name); + return NULL; + } + if(part->object == NULL) { + if(part->stream) { + /* MPD loader has a custom stream */ + part->object = ldraw_part_get_object(part, lib); + } else if(part->filename) { + /* try to load part from standard library */ + part->stream = g3d_stream_open_file(part->filename, "r"); + if(part->stream) { + part->object = ldraw_part_get_object(part, lib); + g3d_stream_close(part->stream); + part->stream = NULL; + } else { + g_warning("LDraw: failed to open stream for '%s'", + part->filename); + } + } else { + g_warning("LDraw: don't know how to open part '%s'", part->name); + } + + if(part->object == NULL) { + g_warning("LDraw: failed to load part '%s'", part->name); + return NULL; + } + } + return g3d_object_duplicate(part->object); +} + 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 @@ +/* $Id:$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_LDRAW_LIBRARY_H +#define _IMP_LDRAW_LIBRARY_H + +#include "imp_ldraw_types.h" + +LDrawLibrary *ldraw_library_init(void); +void ldraw_library_cleanup(LDrawLibrary *lib); +void ldraw_library_insert(LDrawLibrary *lib, gchar *name, gpointer data); +G3DObject *ldraw_library_lookup(LDrawLibrary *lib, const gchar *name); + +#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 @@ +/* $Id:$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_LDRAW_MISC_H +#define _IMP_LDRAW_MISC_H + +#include +#include + +static inline gchar *path_sep(const gchar *text) +{ + gchar *p = strchr(text, '/'); + if(p != NULL) + return p; + return strchr(text, '\\'); +} + +#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 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include +#include + +#include +#include +#include + +#include "imp_ldraw_types.h" +#include "imp_ldraw_part.h" +#include "imp_ldraw_library.h" + +static inline void ldraw_create_subpart(LDrawLibrary *lib, gchar *name, + gchar *buffer, GSList **partsp) +{ + G3DStream *substream; + LDrawPart *part; + +#if DEBUG > 2 + g_debug("LDraw: adding sub-file %s to library", name); +#endif + + substream = g3d_stream_from_buffer((guint8 *)buffer, strlen(buffer), + name, TRUE); + if(substream == NULL) { + g_warning("LDraw: failed to create stream for %s", name); + return; + } + part = g_new0(LDrawPart, 1); + part->name = g_ascii_strup(name, -1); + part->stream = substream; + + ldraw_library_insert(lib, part->name, part); + *partsp = g_slist_append(*partsp, part); +} + +gboolean ldraw_mpd_load(G3DStream *stream, G3DModel *model, + LDrawLibrary *lib) +{ + G3DObject *object = NULL; + GSList *parts = NULL, *item; + LDrawPart *part; + gchar buffer[1024], name[256], *streambuf = NULL; + gsize size; + goffset off; + G3DFloat m[16]; + + while(!g3d_stream_eof(stream)) { + memset(buffer, 0, 1024); + g3d_stream_read_line(stream, buffer, 1023); + if(strncmp(buffer, "0 FILE ", 7) == 0) { + if(streambuf) { + ldraw_create_subpart(lib, name, streambuf, &parts); + streambuf = NULL; + } + memset(name, 0, 256); + if(sscanf(buffer + 7, "%255s", name) == 1) + streambuf = g_strdup(""); + } else if(strncmp(buffer, "0 NOFILE", 8) == 0) { + if(streambuf) { + ldraw_create_subpart(lib, name, streambuf, &parts); + streambuf = NULL; + } + break; + } else if(streambuf) { + /* append line to buffer */ + size = strlen(buffer) + strlen(streambuf) + 1; + off = strlen(streambuf); + streambuf = g_realloc(streambuf, size * sizeof(gchar)); + strcpy(streambuf + off, buffer); + } + } /* !eof */ + + if(streambuf) + ldraw_create_subpart(lib, name, streambuf, &parts); + + if(parts) { + part = parts->data; + part->master = TRUE; + object = ldraw_part_get_object(part, lib); + if(object != NULL) { + g3d_matrix_identity(m); + g3d_matrix_rotate_xyz(0.0, 0.0, G_PI, m); + g3d_object_transform(object, m); + model->objects = g_slist_append(model->objects, object); + } + } + +#if 1 + /* close open streams */ + for(item = parts; item != NULL; item = item->next) { + part = item->data; + if(part->stream) { + g3d_stream_close(part->stream); + part->stream = NULL; + } + } +#endif + return (object != NULL); +} + 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 @@ +/* $Id:$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_LDRAW_MPD_H +#define _IMP_LDRAW_MPD_H + +#include +#include + +#include "imp_ldraw_types.h" + +gboolean ldraw_mpd_load(G3DStream *stream, G3DModel *model, + LDrawLibrary *lib); + +#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 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "imp_ldraw_types.h" +#include "imp_ldraw_part.h" +#include "imp_ldraw_library.h" +#include "imp_ldraw_color.h" +#include "imp_ldraw_misc.h" + +static gboolean ldraw_part_parse_meta(G3DObject *object, gchar *buffer) +{ + if(object->name == NULL) { + object->name = g_strdup(buffer); + return TRUE; + } +#if DEBUG > 2 + g_debug("META: %s", buffer); +#endif + return TRUE; +} + +static void ldraw_part_replace_material(G3DObject *object, + G3DMaterial *material) +{ + GSList *item; + G3DObject *sub; + G3DFace *face; + + for(item = object->faces; item != NULL; item = item->next) { + face = item->data; + if(face->material == NULL) + face->material = material; + } + for(item = object->objects; item != NULL; item = item->next) { + sub = item->data; + ldraw_part_replace_material(sub, material); + } +} + +static gboolean ldraw_part_parse_ref(G3DObject *object, gchar *buffer, + LDrawLibrary *lib) +{ + G3DObject *subobj; + G3DMaterial *material; + G3DFloat m[16], x, y, z; + guint32 colid; + gchar fname[256], *strp; + + g3d_matrix_identity(m); + memset(fname, 0, 256); + + if(sscanf(buffer, "%u " + G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " + G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " + G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " %255s", + &colid, &x, &y, &z, + m + 0 * 4 + 0, m + 1 * 4 + 0, m + 2 * 4 + 0, + m + 0 * 4 + 1, m + 1 * 4 + 1, m + 2 * 4 + 1, + m + 0 * 4 + 2, m + 1 * 4 + 2, m + 2 * 4 + 2, + fname) == 14) { + + strp = path_sep(fname); + if(strp != NULL) + strp[0] = G_DIR_SEPARATOR; + + subobj = ldraw_part_from_file(lib, fname); + if(!subobj) + subobj = ldraw_library_lookup(lib, fname); + if(subobj != NULL) { + g3d_object_transform(subobj, m); + g3d_matrix_identity(m); + g3d_matrix_translate(x, y, z, m); + g3d_object_transform(subobj, m); + if(colid != 16) { + material = ldraw_color_lookup(lib, colid); + ldraw_part_replace_material(subobj, material); + } + object->objects = g_slist_append(object->objects, subobj); + return TRUE; + } + } +#if DEBUG > 1 + g_warning("LDraw: failed to parse/process reference: %s", buffer); +#endif + return FALSE; +} + +static gboolean ldraw_part_parse_tri(G3DObject *object, gchar *buffer, + LDrawLibrary *lib) +{ + guint32 off, colid; + G3DFace *face; + + off = object->vertex_count; + object->vertex_count += 3; + object->vertex_data = g_realloc(object->vertex_data, + object->vertex_count * 3 * sizeof(G3DFloat)); + if(sscanf(buffer, "%u " + G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " + G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " + G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT, + &colid, + object->vertex_data + (off + 0) * 3 + 0, + object->vertex_data + (off + 0) * 3 + 1, + object->vertex_data + (off + 0) * 3 + 2, + object->vertex_data + (off + 1) * 3 + 0, + object->vertex_data + (off + 1) * 3 + 1, + object->vertex_data + (off + 1) * 3 + 2, + object->vertex_data + (off + 2) * 3 + 0, + object->vertex_data + (off + 2) * 3 + 1, + object->vertex_data + (off + 2) * 3 + 2) == 10) { + + face = g_new0(G3DFace, 1); + face->material = ldraw_color_lookup(lib, colid); + face->vertex_count = 3; + face->vertex_indices = g_new0(guint32, 3); + face->vertex_indices[0] = off + 0; + face->vertex_indices[1] = off + 1; + face->vertex_indices[2] = off + 2; + object->faces = g_slist_append(object->faces, face); + return TRUE; + } + return FALSE; +} + +static gboolean ldraw_part_parse_quad(G3DObject *object, gchar *buffer, + LDrawLibrary *lib) +{ + guint32 off, colid; + G3DFace *face; + + off = object->vertex_count; + object->vertex_count += 4; + object->vertex_data = g_realloc(object->vertex_data, + object->vertex_count * 3 * sizeof(G3DFloat)); + if(sscanf(buffer, "%u " + G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " + G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " + G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT " " G3D_SCANF_FLOAT, + &colid, + object->vertex_data + (off + 0) * 3 + 0, + object->vertex_data + (off + 0) * 3 + 1, + object->vertex_data + (off + 0) * 3 + 2, + object->vertex_data + (off + 1) * 3 + 0, + object->vertex_data + (off + 1) * 3 + 1, + object->vertex_data + (off + 1) * 3 + 2, + object->vertex_data + (off + 2) * 3 + 0, + object->vertex_data + (off + 2) * 3 + 1, + object->vertex_data + (off + 2) * 3 + 2, + object->vertex_data + (off + 3) * 3 + 0, + object->vertex_data + (off + 3) * 3 + 1, + object->vertex_data + (off + 3) * 3 + 2) == 13) { + + face = g_new0(G3DFace, 1); + face->material = ldraw_color_lookup(lib, colid); + face->vertex_count = 4; + face->vertex_indices = g_new0(guint32, 4); + face->vertex_indices[0] = off + 0; + face->vertex_indices[1] = off + 1; + face->vertex_indices[2] = off + 2; + face->vertex_indices[3] = off + 3; + object->faces = g_slist_append(object->faces, face); + return TRUE; + } + return FALSE; +} + +static inline G3DObject *ldraw_part_open_file(LDrawLibrary *lib, + const gchar *filename) +{ + LDrawPart *part; + + part = g_new0(LDrawPart, 1); + part->name = g_strdup(filename); + part->stream = g3d_stream_open_file(filename, "r"); + if(part->stream == NULL) { + g_free(part); + return NULL; + } + part->object = ldraw_part_get_object(part, lib); + g3d_stream_close(part->stream); + part->stream = NULL; + + ldraw_library_insert(lib, part->name, part); + + return part->object; +} + +G3DObject *ldraw_part_from_file(LDrawLibrary *lib, const gchar *filename) +{ + G3DObject *object; + gchar *path; + + if(g_file_test(filename, G_FILE_TEST_EXISTS)) + return ldraw_part_open_file(lib, filename); + path = g_ascii_strdown(filename, -1); + if(g_file_test(path, G_FILE_TEST_EXISTS)) { + object = ldraw_part_open_file(lib, path); + g_free(path); + return object; + } + g_free(path); + return NULL; +} + +G3DObject *ldraw_part_get_object(LDrawPart *part, LDrawLibrary *lib) +{ + G3DObject *object; + G3DMaterial *material; + gchar buffer[1024]; + + object = g_new0(G3DObject, 1); + material = g3d_material_new(); + material->name = g_strdup("default material"); + object->materials = g_slist_append(object->materials, material); + + while(!g3d_stream_eof(part->stream)) { + memset(buffer, 0, 1024); + g3d_stream_read_line(part->stream, buffer, 1023); + g_strstrip(buffer); + if(strlen(buffer) == 0) + continue; + switch(buffer[0] - 0x30) { + case 0: /* meta data */ + ldraw_part_parse_meta(object, buffer + 2); + break; + case 1: /* sub-file reference */ + ldraw_part_parse_ref(object, buffer + 2, lib); + break; + case 2: /* line */ + break; + case 3: /* triangle */ + ldraw_part_parse_tri(object, buffer + 2, lib); + break; + case 4: /* quadrilateral */ + ldraw_part_parse_quad(object, buffer + 2, lib); + break; + case 5: /* optional line */ + break; + default: + g_warning("LDraw: unknown type of line: %s", buffer); + break; + } + if(part->master) { + g3d_context_update_progress_bar(lib->context, + (G3DFloat)g3d_stream_tell(part->stream) / + (G3DFloat)g3d_stream_size(part->stream), TRUE); + g3d_context_update_interface(lib->context); + } + } + + return object; +} + +void ldraw_part_free(LDrawPart *part) +{ + if(part->stream) + g3d_stream_close(part->stream); + if(part->filename) + g_free(part->filename); + g_free(part->name); + g_free(part); +} 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 @@ +/* $Id:$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_LDRAW_PART_H +#define _IMP_LDRAW_PART_H + +#include "imp_ldraw_types.h" + +G3DObject *ldraw_part_from_file(LDrawLibrary *lib, const gchar *filename); +G3DObject *ldraw_part_get_object(LDrawPart *part, LDrawLibrary *lib); +void ldraw_part_free(LDrawPart *part); + +#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 @@ +/* $Id:$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_LDRAW_TYPES_H +#define _IMP_LDRAW_TYPES_H + +#include + +#include +#include + +typedef struct { + gchar *name; + gchar *filename; + G3DObject *object; + G3DStream *stream; + gboolean failed; + gboolean master; +} LDrawPart; + +typedef struct { + G3DContext *context; + gchar *libdir; + GHashTable *partdb; + GSList *partlist; + GHashTable *colordb; + GSList *colorlist; +} LDrawLibrary; + +#endif /* _IMP_LDRAW_TYPES_H */ -- cgit v1.1