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_3dmf/Makefile | 512 ++++++++++++++++ .../plugins/import/imp_3dmf/Makefile.am | 21 + .../plugins/import/imp_3dmf/Makefile.in | 512 ++++++++++++++++ .../plugins/import/imp_3dmf/imp_3dmf.c | 646 +++++++++++++++++++++ .../plugins/import/imp_3dmf/imp_3dmf_callbacks.c | 23 + .../plugins/import/imp_3dmf/imp_3dmf_callbacks.h | 42 ++ .../plugins/import/imp_3dmf/imp_3dmf_chunks.h | 95 +++ 7 files changed, 1851 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_chunks.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf') diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile new file mode 100644 index 0000000..f8edad7 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile @@ -0,0 +1,512 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_3dmf/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_3dmf +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_3dmf_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_3dmf_la_OBJECTS = imp_3dmf.lo imp_3dmf_callbacks.lo +imp_3dmf_la_OBJECTS = $(am_imp_3dmf_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_3dmf_la_SOURCES) +DIST_SOURCES = $(imp_3dmf_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_3dmf +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf +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_3dmf.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_3dmf_la_SOURCES = imp_3dmf.c imp_3dmf_chunks.h \ + imp_3dmf_callbacks.c imp_3dmf_callbacks.h + +imp_3dmf_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_3dmf/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_3dmf/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_3dmf.la: $(imp_3dmf_la_OBJECTS) $(imp_3dmf_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_3dmf_la_OBJECTS) $(imp_3dmf_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_3dmf.Plo +include ./$(DEPDIR)/imp_3dmf_callbacks.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_3dmf/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.am new file mode 100644 index 0000000..a21a13a --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.am @@ -0,0 +1,21 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +pluginimp_LTLIBRARIES = imp_3dmf.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_3dmf_la_SOURCES = imp_3dmf.c imp_3dmf_chunks.h \ + imp_3dmf_callbacks.c imp_3dmf_callbacks.h +imp_3dmf_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.in new file mode 100644 index 0000000..ac192df --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/Makefile.in @@ -0,0 +1,512 @@ +# 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_3dmf +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_3dmf_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_3dmf_la_OBJECTS = imp_3dmf.lo imp_3dmf_callbacks.lo +imp_3dmf_la_OBJECTS = $(am_imp_3dmf_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_3dmf_la_SOURCES) +DIST_SOURCES = $(imp_3dmf_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_3dmf.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_3dmf_la_SOURCES = imp_3dmf.c imp_3dmf_chunks.h \ + imp_3dmf_callbacks.c imp_3dmf_callbacks.h + +imp_3dmf_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_3dmf/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_3dmf/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_3dmf.la: $(imp_3dmf_la_OBJECTS) $(imp_3dmf_la_DEPENDENCIES) + $(LINK) -rpath $(pluginimpdir) $(imp_3dmf_la_OBJECTS) $(imp_3dmf_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_3dmf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_3dmf_callbacks.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_3dmf/imp_3dmf.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf.c new file mode 100644 index 0000000..82a46d3 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf.c @@ -0,0 +1,646 @@ +/* $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 +#include + +#include "imp_3dmf_chunks.h" + +#define X3DMF_CHUNK_CHAR(id, shift) \ + ((((id) >> (shift)) & 0xFF) == 0) ? \ + ' ' : ((id) >> (shift)) & 0xFF + +typedef struct { + guint32 id; + guint32 offset; + guint32 type; +} +X3dmfTocEntry; + +typedef struct { + guint32 num_entries; + X3dmfTocEntry *entries; +} +X3dmfToc; + + +static gboolean x3dmf_read_container(G3DStream *stream, guint32 length, + G3DModel *model, G3DObject *object, guint32 level, X3dmfToc *toc, + G3DContext *context); +static X3dmfToc *x3dmf_read_toc(G3DStream *stream, X3dmfToc *prev_toc, + G3DContext *context); + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model, gpointer user_data) +{ + guint32 id, flags, tocloc, pos; + gsize len; + guint16 ver_min, ver_maj; + gchar txthead[10]; + X3dmfToc *toc = NULL; + + g3d_iff_read_chunk(stream, &id, &len, 0); + if((id != G3D_IFF_MKID('3', 'D', 'M', 'F')) || (len != 16)) { + g3d_stream_seek(stream, 0, G_SEEK_SET); + g3d_stream_read(stream, txthead, 10); + if(strncmp(txthead, "3DMetafile", 10) == 0) { + g_warning("file %s is an ASCII 3D Metafile (unhandled)\n", + stream->uri); + } else { + g_warning("file %s is not a 3D Metafile\n", stream->uri); + } + return FALSE; + } + + ver_maj = g3d_stream_read_int16_be(stream); + ver_min = g3d_stream_read_int16_be(stream); + + flags = g3d_stream_read_int32_be(stream); + + g3d_stream_skip(stream, 4); /* FIXME: 64bit file offsets */ + tocloc = g3d_stream_read_int32_be(stream); + + /* read TOC if available */ + if(tocloc > 0) { + pos = g3d_stream_tell(stream); + g3d_stream_seek(stream, tocloc, G_SEEK_SET); + toc = x3dmf_read_toc(stream, NULL, context); + g3d_stream_seek(stream, pos, G_SEEK_SET); + } + +#if DEBUG > 0 + g_debug("3DMF: version %d.%d (0x%08x) TOC @ 0x%08x", + ver_maj, ver_min, flags, tocloc); +#endif + + x3dmf_read_container(stream, (guint32) -1, model, NULL, 0, toc, context); + + return TRUE; +} + +EAPI +gchar *plugin_description(void) +{ + return g_strdup("3D Metafiles."); +} + +EAPI +gchar **plugin_extensions(void) +{ + return g_strsplit("b3d:3mf:3dmf", ":", 0); +} + +/****************************************************************************** + * 3DMF specific + */ + +static X3dmfChunkDesc *x3dmf_get_chunk_info(guint32 id) +{ + gint32 i; + + for(i = 0; x3dmf_chunks[i].id != 0; i ++) + if(x3dmf_chunks[i].id == id) + return &(x3dmf_chunks[i]); + return NULL; +} + +static X3dmfToc *x3dmf_read_toc(G3DStream *stream, X3dmfToc *prev_toc, + G3DContext *context) +{ + X3dmfToc *toc; + guint32 off_next_toc, typeseed, refseed, entrytype, entrysize, nentries; + guint32 noff, i; + + if(prev_toc) + toc = prev_toc; + else + toc = g_new0(X3dmfToc, 1); + + /* skip tag and size (FIXME) */ + g3d_stream_skip(stream, 8); + + g3d_stream_skip(stream, 4); /* FIXME: 64bit file offsets */ + off_next_toc = g3d_stream_read_int32_be(stream); + typeseed = g3d_stream_read_int32_be(stream); + refseed = g3d_stream_read_int32_be(stream); + entrytype = g3d_stream_read_int32_be(stream); + entrysize = g3d_stream_read_int32_be(stream); + nentries = g3d_stream_read_int32_be(stream); + + /* resize entry array */ + noff = toc->num_entries; + toc->num_entries += nentries; + toc->entries = (X3dmfTocEntry *)g_realloc(toc->entries, + toc->num_entries * sizeof(X3dmfTocEntry)); + + /* read TOC entries */ + for(i = 0; i < nentries; i ++) { + toc->entries[noff + i].id = g3d_stream_read_int32_be(stream); + g3d_stream_skip(stream, 4); /* FIXME: 64bit file offsets */ + toc->entries[noff + i].offset = g3d_stream_read_int32_be(stream); + + if((entrytype == 1) && (entrysize == 16)) { + toc->entries[noff + i].type = g3d_stream_read_int32_be(stream); + } +#if DEBUG > 0 + g_debug("3DMF: TOC: %06d @ 0x%08x", + toc->entries[noff + i].id, + toc->entries[noff + i].offset); +#endif + } + + /* read next toc */ + if(off_next_toc > 0) { + g3d_stream_seek(stream, off_next_toc, SEEK_SET); + toc = x3dmf_read_toc(stream, toc, context); + } + + return toc; +} + +static guint32 x3dmf_read_mesh(G3DStream *stream, G3DObject *object, + G3DContext *context) +{ + guint32 i, j, nconts, nfaces, nbytes = 0, ncverts, offv; + G3DFace *face; + + g_return_val_if_fail(object != NULL, FALSE); + + offv = object->vertex_count; + object->vertex_count += g3d_stream_read_int32_be(stream); + object->vertex_data = g_realloc(object->vertex_data, + object->vertex_count * 3 * sizeof(G3DFloat)); + nbytes += 4; + + for(i = offv; i < object->vertex_count; i ++) { + for(j = 0; j < 3; j ++) + object->vertex_data[i * 3 + j] = g3d_stream_read_float_be(stream); + nbytes += 12; + + g3d_context_update_interface(context); + } + + nfaces = g3d_stream_read_int32_be(stream); + nconts = g3d_stream_read_int32_be(stream); + nbytes += 8; + +#if DEBUG > 0 + g_debug("|%u verts, %u faces, %u conts", object->vertex_count, + nfaces, nconts); +#endif + + for(i = 0; i < nfaces; i ++) { + face = g_new0(G3DFace, 1); + + face->vertex_count = g3d_stream_read_int32_be(stream); + nbytes += 4; + face->vertex_indices = g_new0(guint32, face->vertex_count); + + for(j = 0; j < face->vertex_count; j ++) { + face->vertex_indices[j] = offv + g3d_stream_read_int32_be(stream); + nbytes += 4; + if(face->vertex_indices[j] >= object->vertex_count) { + g_warning("face index wrong: %u >= %u", + face->vertex_indices[j], object->vertex_count); + face->vertex_indices[j] = 0; + } + } + +#if DEBUG > 3 + g_debug("|face %u: %u %u %u", i, face->vertex_indices[0], + face->vertex_indices[1], face->vertex_indices[2]); +#endif + + face->material = g_slist_nth_data(object->materials, 0); + object->faces = g_slist_prepend(object->faces, face); + + g3d_context_update_interface(context); + } + + /* contours */ + for(i = 0; i < nconts; i ++) { + ncverts = g3d_stream_read_int32_be(stream); + nbytes += 4; + for(j = 0; j < ncverts; j ++) { + g3d_stream_read_int32_be(stream); + nbytes += 4; + } + } + + return nbytes; +} + +static G3DObject *x3dmf_object_new(G3DStream *stream, G3DModel *model) +{ + G3DObject *object; + G3DMaterial *material; + + object = g_new0(G3DObject, 1); + material = g3d_material_new(); + + object->name = g_strdup_printf("container @ 0x%08x", + (guint32)g3d_stream_tell(stream) - 8); + model->objects = g_slist_append(model->objects, object); + object->materials = g_slist_append(object->materials, material); + + return object; +} + +static guint32 x3dmf_read_packed(G3DStream *stream, guint32 maxx, + guint32 *nread) +{ + if(maxx > 0xFFFE) { + if(nread) + (*nread) += 4; + return g3d_stream_read_int32_be(stream); + } else if(maxx > 0xFE) { + if(nread) + (*nread) += 2; + return g3d_stream_read_int16_be(stream); + } else { + if(nread) + (*nread) += 1; + return g3d_stream_read_int8(stream); + } +} + +/* + [tmsh] - TriMesh + http://developer.apple.com/documentation/QuickTime/QD3D/qd3dmetafile.33.htm + + Uns32 numTriangles + Uns32 numTriangleAttributeTypes + Uns32 numEdges + Uns32 numEdgeAttributeTypes + Uns32 numPoints + Uns32 numVertexAttributeTypes + TriMeshTriangleData triangles[numTriangles] + TriMeshEdgeData edges[numEdges] + Point3D points[numPoints] + BoundingBox bBox +*/ + +static guint32 x3dmf_read_tmsh(G3DStream *stream, G3DObject *object, + G3DContext *context) +{ + G3DFace *face; + guint32 nread = 0, nfaces, nverts, nedges; + gint32 i, j; + + nfaces = g3d_stream_read_int32_be(stream); /* numTriangles */ + nread += 4; + + g3d_stream_read_int32_be(stream); /* numTriangleAttributeTypes */ + nread += 4; + + nedges = g3d_stream_read_int32_be(stream); /* numEdges */ + nread += 4; + + g3d_stream_read_int32_be(stream); /* numEdgeAttributeTypes */ + nread += 4; + + nverts = g3d_stream_read_int32_be(stream); /* numPoints */ + nread += 4; + + g3d_stream_read_int32_be(stream); /* numVertexAttributeTypes */ + nread += 4; + +#if DEBUG > 3 + g_debug("3DMF: [tmsh] %d faces, %d edges, %d vertices", + nfaces, nedges, nverts); +#endif + + /* triangles */ + for(i = 0; i < nfaces; i ++) { + face = g_new0(G3DFace, 1); + + face->vertex_count = 3; + face->vertex_indices = g_new0(guint32, 3); + for(j = 0; j < 3; j ++) { + face->vertex_indices[j] = + x3dmf_read_packed(stream, nfaces, &nread); + if(face->vertex_indices[j] >= nverts) { + g_warning("face index error: %u >= %u", + face->vertex_indices[j], nverts); + face->vertex_indices[j] = 0; + } + } + +#if DEBUG > 3 + g_debug("face %u (packed): %u %u %u", i, face->vertex_indices[0], + face->vertex_indices[1], face->vertex_indices[2]); +#endif + + face->material = g_slist_nth_data(object->materials, 0); + object->faces = g_slist_prepend(object->faces, face); + } + + /* edges */ + for(i = 0; i < nedges; i ++) { + /* pointIndices */ + x3dmf_read_packed(stream, nedges, &nread); + x3dmf_read_packed(stream, nedges, &nread); + /* triangleIndices */ + x3dmf_read_packed(stream, nedges, &nread); + x3dmf_read_packed(stream, nedges, &nread); + } + + /* points */ + object->vertex_count = nverts; + object->vertex_data = g_new0(G3DFloat, 3 * nverts); + for(i = 0; i < nverts; i ++) { + object->vertex_data[i * 3 + 0] = g3d_stream_read_float_be(stream); + object->vertex_data[i * 3 + 1] = g3d_stream_read_float_be(stream); + object->vertex_data[i * 3 + 2] = g3d_stream_read_float_be(stream); + nread += 12; + } + + /* bBox */ + /* Point3D min */ + g3d_stream_read_float_be(stream); + g3d_stream_read_float_be(stream); + g3d_stream_read_float_be(stream); + nread += 12; + /* Point3D max */ + g3d_stream_read_float_be(stream); + g3d_stream_read_float_be(stream); + g3d_stream_read_float_be(stream); + nread += 12; + /* boolean isEmpty */ + g3d_stream_read_int32_be(stream); + nread += 4; + + return nread; +} + +static gboolean x3dmf_read_rfrn(G3DStream *stream, G3DModel *model, + X3dmfToc *toc, G3DContext *context) +{ + G3DObject *object; + guint32 id, i, refid, savedoffset; + gsize len; + X3dmfTocEntry *tocentry = NULL; + + refid = g3d_stream_read_int32_be(stream); + if(refid == 0) { + /* FIXME */ + return FALSE; + } + + if(toc == NULL) { + return FALSE; + } + + /* find reference object */ + for(i = 0; i < toc->num_entries; i ++) + if(toc->entries[i].id == refid) + tocentry = &(toc->entries[i]); + + g_return_val_if_fail(tocentry != NULL, FALSE); + + savedoffset = g3d_stream_tell(stream); + g3d_stream_seek(stream, tocentry->offset, G_SEEK_SET); + + object = x3dmf_object_new(stream, model); + + g3d_iff_read_chunk(stream, &id, &len, 0); + switch(id) { + case G3D_IFF_MKID('c', 't', 'n', 'r'): + x3dmf_read_container(stream, len, model, NULL, 0xFF, toc, context); + break; + + default: + break; + } + + g3d_stream_seek(stream, savedoffset, G_SEEK_SET); + + return TRUE; +} + +static gboolean x3dmf_read_container(G3DStream *stream, guint32 length, + G3DModel *model, G3DObject *object, guint32 level, X3dmfToc *toc, + G3DContext *context) +{ + G3DMaterial *material = NULL; + X3dmfChunkDesc *chunkdesc; + guint32 id, chk, i; + gsize len; + G3DFloat matrix[16]; + + g3d_matrix_identity(matrix); + + while(length > 0) { + if(g3d_stream_eof(stream)) + break; + + g3d_iff_read_chunk(stream, &id, &len, 0); + length -= 8; + + if(id == 0) + return FALSE; + + chunkdesc = x3dmf_get_chunk_info(id); + +#if DEBUG > 0 + g_debug("\\%s[%c%c%c%c]: %s (%d bytes)", debug_pad(level), + X3DMF_CHUNK_CHAR(id, 24), X3DMF_CHUNK_CHAR(id, 16), + X3DMF_CHUNK_CHAR(id, 8), X3DMF_CHUNK_CHAR(id, 0), + chunkdesc ? chunkdesc->description : "unknown chunk", + len); +#endif + length -= len; + + switch(id) { + case G3D_IFF_MKID('c', 'n', 't', 'r'): + /* container */ +#if DEBUG > 0 + g_debug("|%snew container @ 0x%x (%d bytes)", + debug_pad(level - 1), + (guint32)g3d_stream_tell(stream) - 8, len); +#endif + x3dmf_read_container(stream, len, model, object, level + 1, + toc, context); + break; + + case G3D_IFF_MKID('k', 'd', 'i', 'f'): + /* diffuse color */ + if(object) { +#if DEBUG > 2 + g_debug("3DMF: kdif: got object"); +#endif + material = g_slist_nth_data(object->materials, 0); + material->r = g3d_stream_read_float_be(stream); + material->g = g3d_stream_read_float_be(stream); + material->b = g3d_stream_read_float_be(stream); + } else { + g3d_stream_skip(stream, len); + } + break; + + case G3D_IFF_MKID('k', 's', 'p', 'c'): + /* specular color */ + if(object) { +#if DEBUG > 2 + g_debug("3DMF: kspc: got object"); +#endif + material = g_slist_nth_data(object->materials, 0); + material->specular[0] = g3d_stream_read_float_be(stream); + material->specular[1] = g3d_stream_read_float_be(stream); + material->specular[2] = g3d_stream_read_float_be(stream); + } else { + g3d_stream_skip(stream, len); + } + break; + + case G3D_IFF_MKID('k', 'x', 'p', 'r'): + /* transparency color */ + if(object) { + /* use average as alpha */ + material = g_slist_nth_data(object->materials, 0); + material->a = 1.0 - + (g3d_stream_read_float_be(stream) + + g3d_stream_read_float_be(stream) + + g3d_stream_read_float_be(stream)) / 3.0; + + if(material->a < 0.1) + material->a = 0.1; + } else { + g3d_stream_skip(stream, len); + } + break; + + case G3D_IFF_MKID('m', 'e', 's', 'h'): + /* mesh */ + if(object == NULL) + object = x3dmf_object_new(stream, model); + material = g_slist_nth_data(object->materials, 0); + + chk = x3dmf_read_mesh(stream, object, context); + g3d_object_transform(object, matrix); + if(chk != len) { + g_warning("3DMF: mesh: wrong length (%u != %u)\n", + chk, (unsigned int) len); + return FALSE; + } + break; + + case G3D_IFF_MKID('m', 't', 'r', 'x'): + /* matrix */ + for(i = 0; i < 16; i ++) + matrix[i] = g3d_stream_read_float_be(stream); + if(object) { +#if DEBUG > 2 + g_debug("3DMF: mtrx: object is set"); +#endif + g3d_object_transform(object, matrix); + } +#if DEBUG > 3 + for(i = 0; i < 4; i ++) + g_debug("3DMF: mtrx: %+1.2f %+1.2f %+1.2f %+1.2f", + matrix[i * 4 + 0], matrix[i * 4 + 1], + matrix[i * 4 + 2], matrix[i * 4 + 3]); +#endif + break; + + case G3D_IFF_MKID('r', 'f', 'r', 'n'): + /* reference */ + x3dmf_read_rfrn(stream, model, toc, context); + break; + + case G3D_IFF_MKID('s', 'e', 't', ' '): + /* ??: skip this cntr chunk */ + g3d_stream_skip(stream, length); + length = 0; + break; + + case G3D_IFF_MKID('t', 'm', 's', 'h'): + /* triangle mesh */ + if(object == NULL) + object = x3dmf_object_new(stream, model); + material = g_slist_nth_data(object->materials, 0); + + chk = x3dmf_read_tmsh(stream, object, context); + g3d_object_transform(object, matrix); + if(chk != len) { +#if DEBUG > 0 + g_debug("3DMF: tmsh: offset %d bytes", len - chk); +#endif + g3d_stream_skip(stream, len - chk); + } + break; + + case G3D_IFF_MKID('t', 'r', 'n', 's'): + /* translate */ + if(object) { + G3DFloat x,y,z; + G3DFloat matrix[16]; + + x = g3d_stream_read_float_be(stream); + y = g3d_stream_read_float_be(stream); + z = g3d_stream_read_float_be(stream); + + g3d_matrix_identity(matrix); + g3d_matrix_translate(x, y, z, matrix); + + g3d_object_transform(object, matrix); + } else { +#if DEBUG > 0 + g_warning("3DMF: [trns] no object"); +#endif + g3d_stream_skip(stream, 12); + } + break; + + default: + if(chunkdesc) { + g3d_stream_skip(stream, len); + } else { +#if DEBUG > 0 + g_warning("3DMF: Container: unknown chunk '%c%c%c%c'/" + "0x%02X%02X%02X%02X @ 0x%08x " + "(%d bytes)", + X3DMF_CHUNK_CHAR(id, 24), X3DMF_CHUNK_CHAR(id, 16), + X3DMF_CHUNK_CHAR(id, 8), X3DMF_CHUNK_CHAR(id, 0), + X3DMF_CHUNK_CHAR(id, 24), X3DMF_CHUNK_CHAR(id, 16), + X3DMF_CHUNK_CHAR(id, 8), X3DMF_CHUNK_CHAR(id, 0), + (guint32)g3d_stream_tell(stream) - 8, len); +#endif + g3d_stream_skip(stream, len); + } + break; + } + } + + return TRUE; +} + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.c new file mode 100644 index 0000000..1c76249 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.c @@ -0,0 +1,23 @@ +/* $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 "imp_3dmf_callbacks.h" + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.h new file mode 100644 index 0000000..5cb37a6 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_callbacks.h @@ -0,0 +1,42 @@ +/* $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_3DMF_CALLBACKS_H +#define _IMP_3DMF_CALLBACKS_H + +#include +#include + +typedef struct { + G3DContext *context; + G3DStream *stream; +} X3dmfGlobal; + +typedef struct { + guint32 id; + guint32 parentid; + guint32 level; + G3DObject *object; +} X3dmfLocal; + +typedef gboolean (* X3dmfCallback)(X3dmfGlobal *global, X3dmfLocal *local); + +#endif /* _IMP_3DMF_CALLBACKS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_chunks.h new file mode 100644 index 0000000..471a14c --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_3dmf/imp_3dmf_chunks.h @@ -0,0 +1,95 @@ +/* $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_3DMF_CHUNKS_H +#define _IMP_3DMF_CHUNKS_H + +#include +#include "imp_3dmf_callbacks.h" + +typedef struct { + guint32 id; + const gchar *description; + X3dmfCallback callback; +} X3dmfChunkDesc; + +#define ID G3D_IFF_MKID + +static X3dmfChunkDesc x3dmf_chunks[] = { + { ID('a', 'm', 'b', 'n'), "ambient light", NULL }, + { ID('a', 't', 'a', 'r'), "(registered unknown)", NULL }, + { ID('a', 't', 't', 'r'), "attribute set", NULL }, + { ID('b', 'g', 'n', 'g'), "begin group", NULL }, + { ID('c', 'a', 'm', 'b'), "ambient coefficient", NULL }, + { ID('c', 'm', 'p', 'l'), "camera placement", NULL }, + { ID('c', 'm', 'r', 'g'), "camera range", NULL }, + { ID('c', 'm', 'v', 'p'), "camera viewport", NULL }, + { ID('c', 'n', 't', 'r'), "container", NULL }, + { ID('c', 's', 'g', 'e'), "(registered unknown)", NULL }, + { ID('c', 's', 'p', 'c'), "specular control", NULL }, + { ID('c', 't', 'w', 'n'), "interactive renderer", NULL }, + { ID('d', 'b', 'b', 'p'), "(registered unknown)", NULL }, + { ID('d', 'r', 'c', 't'), "directional light", NULL }, + { ID('e', 'n', 'd', 'g'), "end group", NULL }, + { ID('h', 'l', 's', 't'), "highlight state", NULL }, + { ID('i', 'm', 'c', 'c'), "image clear color", NULL }, + { ID('i', 'm', 'd', 'm'), "image dimensions", NULL }, + { ID('k', 'd', 'i', 'f'), "diffuse color", NULL }, + { ID('k', 's', 'p', 'c'), "specular color", NULL }, + { ID('k', 'x', 'p', 'r'), "transparency color", NULL }, + { ID('l', 'g', 'h', 't'), "light data", NULL }, + { ID('m', 'e', 's', 'h'), "mesh", NULL }, + { ID('m', 't', 'r', 'x'), "matrix", NULL }, + { ID('n', 'r', 'm', 'l'), "normal", NULL }, + { ID('p', 'n', 't', 'l'), "point light", NULL }, + { ID('r', 'f', 'r', 'n'), "reference", NULL }, + { ID('r', 'v', 'h', 'n'), "(registered unknown)", NULL }, + { ID('r', 'v', 't', 'x'), "(registered unknown)", NULL }, + { ID('s', 'e', 't', ' '), "set", NULL }, + { ID('s', 't', 'r', 'c'), "C string", NULL }, + { ID('t', 'm', 's', 'h'), "triangle mesh", NULL }, + { ID('t', 'o', 'c', ' '), "tabe of contents", NULL }, + { ID('t', 'r', 'n', 's'), "translation", NULL }, + { ID('t', 'y', 'p', 'e'), "type definition", NULL }, + { ID('v', 'a', 'n', 'a'), "view angle aspect cam", NULL }, + { ID('v', 'a', 's', 'l'), "vertex attr set list", NULL }, + { ID('v', 'n', 'i', 'd'), "(registered unknown)", NULL }, + { ID('v', 'w', 'h', 'n'), "view hints", NULL }, + { ID('v', 'w', 'p', 'l'), "view plane camera", NULL }, + + { ID(0xFF, 0xFF, 0xFF, 0xE5), "0xFFFFFFE5", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xE7), "0xFFFFFFE7", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xE9), "0xFFFFFFE9", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xEA), "0xFFFFFFEA", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xEB), "0xFFFFFFEB", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xEC), "0xFFFFFFEC", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xEF), "0xFFFFFFEF (EoC?)", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xF1), "0xFFFFFFF1", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xF4), "0xFFFFFFF4", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xF6), "0xFFFFFFF6", NULL }, + { ID(0xFF, 0xFF, 0xFF, 0xFD), "0xFFFFFFFD", NULL }, + + { 0, NULL, NULL } +}; + +#undef ID + +#endif /* _IMP_3DMF_CHUNKS_H */ -- cgit v1.1