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_skp/Makefile | 516 +++++++++++++++++ .../plugins/import/imp_skp/Makefile.am | 24 + .../plugins/import/imp_skp/Makefile.in | 516 +++++++++++++++++ .../libg3d-0.0.8/plugins/import/imp_skp/imp_skp.c | 218 ++++++++ .../libg3d-0.0.8/plugins/import/imp_skp/imp_skp.h | 25 + .../plugins/import/imp_skp/imp_skp_callbacks.c | 614 +++++++++++++++++++++ .../plugins/import/imp_skp/imp_skp_callbacks.h | 59 ++ .../plugins/import/imp_skp/imp_skp_chunks.h | 62 +++ .../plugins/import/imp_skp/imp_skp_read.c | 114 ++++ .../plugins/import/imp_skp/imp_skp_read.h | 35 ++ .../plugins/import/imp_skp/imp_skp_types.h | 33 ++ 11 files changed, 2216 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_chunks.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_types.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp') diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile new file mode 100644 index 0000000..0a8e16c --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile @@ -0,0 +1,516 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_skp/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_skp +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_skp_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_skp_la_OBJECTS = imp_skp.lo imp_skp_callbacks.lo \ + imp_skp_read.lo +imp_skp_la_OBJECTS = $(am_imp_skp_la_OBJECTS) +#am_imp_skp_la_rpath = -rpath $(pluginimpdir) +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_skp_la_SOURCES) +DIST_SOURCES = $(imp_skp_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_skp +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp +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_skp.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_skp_la_SOURCES = imp_skp.c imp_skp.h imp_skp_types.h \ + imp_skp_chunks.h imp_skp_callbacks.h imp_skp_callbacks.c \ + imp_skp_read.c imp_skp_read.h + +imp_skp_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_skp/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_skp/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_skp.la: $(imp_skp_la_OBJECTS) $(imp_skp_la_DEPENDENCIES) + $(LINK) $(am_imp_skp_la_rpath) $(imp_skp_la_OBJECTS) $(imp_skp_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_skp.Plo +include ./$(DEPDIR)/imp_skp_callbacks.Plo +include ./$(DEPDIR)/imp_skp_read.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_skp/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.am new file mode 100644 index 0000000..5aa678f --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.am @@ -0,0 +1,24 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +if EXPERIMENTAL +pluginimp_LTLIBRARIES = imp_skp.la +endif + +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_skp_la_SOURCES = imp_skp.c imp_skp.h imp_skp_types.h \ + imp_skp_chunks.h imp_skp_callbacks.h imp_skp_callbacks.c \ + imp_skp_read.c imp_skp_read.h +imp_skp_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.in new file mode 100644 index 0000000..ace9150 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/Makefile.in @@ -0,0 +1,516 @@ +# 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_skp +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_skp_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_skp_la_OBJECTS = imp_skp.lo imp_skp_callbacks.lo \ + imp_skp_read.lo +imp_skp_la_OBJECTS = $(am_imp_skp_la_OBJECTS) +@EXPERIMENTAL_TRUE@am_imp_skp_la_rpath = -rpath $(pluginimpdir) +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_skp_la_SOURCES) +DIST_SOURCES = $(imp_skp_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 +@EXPERIMENTAL_TRUE@pluginimp_LTLIBRARIES = imp_skp.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_skp_la_SOURCES = imp_skp.c imp_skp.h imp_skp_types.h \ + imp_skp_chunks.h imp_skp_callbacks.h imp_skp_callbacks.c \ + imp_skp_read.c imp_skp_read.h + +imp_skp_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_skp/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_skp/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_skp.la: $(imp_skp_la_OBJECTS) $(imp_skp_la_DEPENDENCIES) + $(LINK) $(am_imp_skp_la_rpath) $(imp_skp_la_OBJECTS) $(imp_skp_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_skp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_skp_callbacks.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_skp_read.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_skp/imp_skp.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.c new file mode 100644 index 0000000..64b74c8 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.c @@ -0,0 +1,218 @@ +/* $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_skp.h" +#include "imp_skp_read.h" +#include "imp_skp_chunks.h" + +static gboolean skp_parse_version_map(G3DStream *stream, guint32 *max_nlen, + guint32 *max_version); +static gchar *skp_find_section(G3DStream *stream, guint32 max_nlen, + guint32 max_version, guint32 *version); +static SkpChunkDesc *skp_get_chunk_desc(gchar *cname); + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model, gpointer user_data) +{ + gchar *smagic, *sversion, *stmp, *ssection; + guint32 max_nlen = 0, max_version = 0, version = 0; + SkpChunkDesc *desc; + SkpGlobalData *global; + SkpLocalData *local; + + smagic = skp_read_wchar(stream); + if(smagic == NULL) { + g_warning("not a valid .skp file: '%s'", stream->uri); + return FALSE; + } + sversion = skp_read_wchar(stream); + if(sversion == NULL) { + g_warning("failed to read version from '%s'", stream->uri); + g_free(smagic); + return FALSE; + } + + g_debug("SKP: magic: '%s', version: '%s'", smagic, sversion); + g_free(smagic); + g_free(sversion); + + g3d_stream_seek(stream, 16, G_SEEK_CUR); + stmp = skp_read_wchar(stream); + if(stmp != NULL) + g_free(stmp); + g3d_stream_read_int32_le(stream); + + ssection = skp_read_char(stream); + if(ssection) { + if(strcmp(ssection, "CVersionMap") == 0) + g_debug("\\CVersionMap"); + skp_parse_version_map(stream, &max_nlen, &max_version); + g_free(ssection); + } + + global = g_new0(SkpGlobalData, 1); + global->context = context; + global->model = model; + global->stream = stream; + + ssection = skp_find_section(stream, max_nlen, max_version, &version); + while(ssection != NULL) { + desc = skp_get_chunk_desc(ssection); + if(desc == NULL) { + g_warning("SKP: unknown chunk type '%s'", ssection); + } else { + if((version > desc->max_ver) || (version < desc->min_ver)) { + g_warning("SKP: %s: unhandled version %u (%u - %u)", + ssection, version, desc->min_ver, desc->max_ver); + } else { + if(desc->callback) { + local = g_new0(SkpLocalData, 1); + local->id = desc->id; + local->version = version; + + desc->callback(global, local); + + g_free(local); + } + } /* version check */ + } /* has desc */ + + ssection = skp_find_section(stream, max_nlen, max_version, &version); + } /* sections */ + + /* clean up */ + g_free(global); + + return TRUE; +} + +EAPI +gchar *plugin_description(void) +{ + return g_strdup("SketchUp models."); +} + +EAPI +gchar **plugin_extensions(void) +{ + return g_strsplit("skp", ":", 0); +} + + +/*****************************************************************************/ + +static gboolean skp_parse_version_map(G3DStream *stream, guint32 *max_nlen, + guint32 *max_version) +{ + gchar *part; + guint32 version; + + while(TRUE) { + part = skp_read_wchar(stream); + if(part == NULL) + return FALSE; + version = g3d_stream_read_int32_le(stream); +#if DEBUG > 1 + g_debug("\t%-30s %u", part, version); +#endif + if(strcmp(part, "End-Of-Version-Map") == 0) { + g_free(part); + return TRUE; + } + + if(version > *max_version) + *max_version = version; + if(strlen(part) > *max_nlen) + *max_nlen = strlen(part); + + g_free(part); + } + return FALSE; +} + +static gchar *skp_find_section(G3DStream *stream, guint32 max_nlen, + guint32 max_version, guint32 *version) +{ + goffset offset; + guint32 ver, nlen; + guint16 w1; + gchar *name; + + while(!g3d_stream_eof(stream) && (g3d_stream_read_int8(stream) != 0xFF)); + + if(g3d_stream_eof(stream)) + return NULL; + + offset = g3d_stream_tell(stream); + if(g3d_stream_read_int8(stream) != 0xFF) { + g3d_stream_seek(stream, offset, G_SEEK_SET); + return skp_find_section(stream, max_nlen, max_version, version); + } + + ver = g3d_stream_read_int16_le(stream); + if(ver > max_version) { + g3d_stream_seek(stream, offset, G_SEEK_SET); + return skp_find_section(stream, max_nlen, max_version, version); + } + + nlen = g3d_stream_read_int16_le(stream); + if(nlen > max_nlen) { + g3d_stream_seek(stream, offset, G_SEEK_SET); + return skp_find_section(stream, max_nlen, max_version, version); + } + + name = g_new0(gchar, nlen + 1); + g3d_stream_read(stream, name, nlen); + if(name[0] != 'C') { + g_free(name); + g3d_stream_seek(stream, offset, G_SEEK_SET); + return skp_find_section(stream, max_nlen, max_version, version); + } + *version = ver; + + w1 = g3d_stream_read_int16_le(stream); + g3d_stream_seek(stream, -2, G_SEEK_CUR); + + g_debug("\\%-30s v%-2u @ 0x%08x (0x%04x)", name, ver, + (guint32)g3d_stream_tell(stream), w1); + + return name; +} + +static SkpChunkDesc *skp_get_chunk_desc(gchar *cname) +{ + guint32 i; + + for(i = 0; skp_chunks[i].id != NULL; i ++) { + if(strcmp(cname, skp_chunks[i].id) == 0) + return &(skp_chunks[i]); + } + return NULL; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.h new file mode 100644 index 0000000..037b50b --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp.h @@ -0,0 +1,25 @@ +/* $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_SKB_H +#define _IMP_SKB_H + +#endif /* _IMP_SKB_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.c new file mode 100644 index 0000000..938a93c --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.c @@ -0,0 +1,614 @@ +/* $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_skp.h" +#include "imp_skp_callbacks.h" +#include "imp_skp_read.h" +#include "imp_skp_types.h" + +gboolean skp_cb_arc_curve(SkpGlobalData *global, SkpLocalData *local) +{ + guint16 w1; + + w1 = g3d_stream_read_int16_le(global->stream); + g_return_val_if_fail(w1 == 0x0000, FALSE); + + return TRUE; +} + +/*****************************************************************************/ + +gboolean skp_cb_attribute_container(SkpGlobalData *global, SkpLocalData *local) +{ + guint16 w1; + + w1 = g3d_stream_read_int16_le(global->stream); + g_return_val_if_fail(w1 == 0x0000, FALSE); + + return TRUE; +} + +/*****************************************************************************/ + +gboolean skp_cb_attribute_named(SkpGlobalData *global, SkpLocalData *local) +{ + guint32 x1; + guint16 w1, w2, w3; + guint8 u1, u2; + gdouble d1; + gchar *name, *val, *tmp; + + w1 = g3d_stream_read_int16_le(global->stream); + w2 = g3d_stream_read_int16_le(global->stream); + w3 = g3d_stream_read_int16_le(global->stream); + + name = skp_read_wchar(global->stream); + while(name != NULL) { + tmp = skp_read_wchar(global->stream); + if(tmp != NULL) { + /* got a section */ +#if DEBUG > 1 + g_debug("\t%s", name); +#endif + g_free(name); + name = tmp; + continue; + } + u1 = g3d_stream_read_int8(global->stream); + switch(u1) { + case 0x00: /* end of CAttributeNamed */ + g_free(name); + return TRUE; + break; + case 0x04: /* 32-bit */ + x1 = g3d_stream_read_int32_le(global->stream); +#if DEBUG > 1 + g_debug("\t\t%-20s: 0x%08x", name, x1); +#endif + break; + case 0x06: /* double */ + d1 = g3d_stream_read_double_le(global->stream); +#if DEBUG > 1 + g_debug("\t\t%-20s: %.4f", name, d1); +#endif + break; + case 0x07: /* boolean */ + u2 = g3d_stream_read_int8(global->stream); +#if DEBUG > 1 + g_debug("\t\t%-20s: %s", name, (u2 ? "true" : "false")); +#endif + break; + case 0x09: /* end of section? */ + g3d_stream_seek(global->stream, 7, G_SEEK_CUR); +#if DEBUG > 1 + g_debug("\t\t%-20s: EOS", name); +#endif + break; + case 0x0A: /* string */ + val = skp_read_wchar(global->stream); + g_return_val_if_fail(val != NULL, FALSE); +#if DEBUG > 1 + g_debug("\t\t%-20s: %s", name, val); +#endif + g_free(val); + break; + default: + g_warning( + "SKP: CAttributeNamed: unknown attribute type: 0x%02X", + u1); + return FALSE; + break; + } + + g_free(name); + name = skp_read_wchar(global->stream); + } + return TRUE; +} + +/*****************************************************************************/ + +gboolean skp_cb_component_definition(SkpGlobalData *global, + SkpLocalData *local) +{ + SkpComponent *comp; + guint32 x1, w1; + gchar *s; + gdouble d1, d2; + + w1 = g3d_stream_read_int16_le(global->stream); + g_return_val_if_fail(w1 == 0x0000, FALSE); + + skp_read_10b(global->stream); + skp_read_10b(global->stream); + + x1 = g3d_stream_read_int32_le(global->stream); + g_debug("CComponentDefinition: %d", x1); + + w1 = g3d_stream_read_int16_le(global->stream); + if(!(w1 & 0x8000)) { + g_warning("CComponentDefinition: layerid=0x%04x", w1); + return FALSE; + } + w1 &= 0x7FFF; + g3d_stream_read_int16_le(global->stream); /* 0000 */ + + s = skp_read_wchar(global->stream); + if(s == NULL) { + g_warning("CComponentDefinition: s[0] == NULL"); + return FALSE; + } + g3d_stream_seek(global->stream, 3, G_SEEK_CUR); + s = skp_read_wchar(global->stream); + if(s == NULL) { + g_warning("CComponentDefinition: s[1] == NULL"); + return FALSE; + } + g3d_stream_seek(global->stream, 6, G_SEEK_CUR); + s = skp_read_wchar(global->stream); + if(s == NULL) { + g_warning("CComponentDefinition: s[2] == NULL"); + return FALSE; + } + + d1 = g3d_stream_read_double_le(global->stream); + d2 = g3d_stream_read_double_le(global->stream); + g_debug("CComponentDefinition: d1=%.2f, d2=%.2f", d1, d2); + + g3d_stream_seek(global->stream, 5, G_SEEK_CUR); + + comp = g_new0(SkpComponent, 1); + comp->layerid = w1; + + comp->id0 = g3d_stream_read_int16_le(global->stream); + g3d_stream_read_int32_le(global->stream); + g3d_stream_read_int8(global->stream); + comp->id1 = g3d_stream_read_int16_le(global->stream); + + g_debug("Component: 0x%02x, 0x%02x (0x%02x)", + comp->id0, comp->id1, comp->layerid); + + global->components = g_slist_append(global->components, comp); + + return TRUE; +} + +/*****************************************************************************/ + +static gboolean skp_read_5b(G3DStream *stream) +{ + guint32 w1, w2, u1; + + w1 = g3d_stream_read_int16_le(stream); + u1 = g3d_stream_read_int8(stream); + w2 = g3d_stream_read_int16_le(stream); + g_debug("\tread 5b: %04x %02x %04x", w1, u1, w2); + return TRUE; +} + +gboolean skp_cb_edge_use(SkpGlobalData *global, SkpLocalData *local) +{ + guint16 w1, w2; + guint32 x1; + gdouble d1, d2, d3, d4; + gboolean handled; + GSList *item; + SkpComponent *comp; + + w1 = g3d_stream_read_int16_le(global->stream); + g_return_val_if_fail(w1 == 0x0000, FALSE); + + skp_read_5b(global->stream); + + do { + w1 = g3d_stream_read_int16_le(global->stream); + handled = FALSE; + + g_debug("opcode: 0x%04x", w1); + if(w1 == 0xFFFF) { + g3d_stream_seek(global->stream, -2, G_SEEK_CUR); + return TRUE; + } + if(w1 & 0x8000) { + g3d_stream_read_int16_le(global->stream); + w1 &= 0x7FFF; + } + if(w1 == 0x0000) { + handled = TRUE; + } + + for(item = global->components; + (handled == FALSE) && (item != NULL); + item = item->next) { + + comp = item->data; + + switch(w1 - comp->id0) { + case 1: + skp_read_10b(global->stream); + w2 = g3d_stream_read_int16_le(global->stream); + handled = TRUE; + g_debug("\tw2=0x%04x", w2); + break; + case 3: + skp_read_dbl3(global->stream, &d1, &d2, &d3); + g_debug("\tvertex: %.4f, %.4f, %.4f", d1, d2, d3); + handled = TRUE; + break; + case 4: + case 5: + case 7: + g_debug("\tempty"); + handled = TRUE; + break; + default: + break; + } + if(handled) + break; + switch(w1 - comp->id1) { + case 0: + skp_read_10b(global->stream); + d1 = g3d_stream_read_double_le(global->stream); + d2 = g3d_stream_read_double_le(global->stream); + d3 = g3d_stream_read_double_le(global->stream); + d4 = g3d_stream_read_double_le(global->stream); + x1 = g3d_stream_read_int32_le(global->stream); + g_debug("\tid1+4: dbl4: %.2f, %.2f, %.2f, %.2f (%i)", + d1, d2, d3, d4, x1); + handled = TRUE; + break; + case 2: + w2 = g3d_stream_read_int16_le(global->stream); + g_debug("\ti16: 0x%04x", w2); + handled = TRUE; + break; + case 4: + skp_read_5b(global->stream); + handled = TRUE; + break; + case 5: + case 9: + case 17: + case 19: + g_debug("\tempty"); + handled = TRUE; + break; + default: + break; + } + } /* loop through known layers */ + + if(handled == FALSE) { + g_debug("vertex: unknown opcode %#04x (layer0: 0x%04x, 0x%04x)", + w1, + global->components ? + ((SkpComponent *)(global->components->data))->id0 : -1, + global->components ? + ((SkpComponent *)(global->components->data))->id1 : -1); + } + } while(TRUE); + + return FALSE; + +} + +/*****************************************************************************/ + +gboolean skp_cb_face_texture_coords(SkpGlobalData *global, SkpLocalData *local) +{ +#if DEBUG > 1 + gint32 i; + guint16 w1; + G3DFloat f1, f2, f3, f4; + + w1 = g3d_stream_read_int16_le(global->stream); + g_return_val_if_fail(w1 == 0x0000, FALSE); + + for(i = 0; i < 24; i ++) { + f1 = g3d_stream_read_float_le(global->stream); + f2 = g3d_stream_read_float_le(global->stream); + f3 = g3d_stream_read_float_le(global->stream); + f4 = g3d_stream_read_float_le(global->stream); + g_debug("\tf: %.4f, %.4f, %.4f, %.4f", f1, f2, f3, f4); + } +#endif + return TRUE; +} + +/*****************************************************************************/ + +gboolean skp_cb_layer(SkpGlobalData *global, SkpLocalData *local) +{ + guint32 x1; + guint16 w1; + guint8 u1, u2, u3; + gchar *s1, *s2; + + do { + w1 = g3d_stream_read_int16_le(global->stream); + g_return_val_if_fail(w1 == 0x0000, FALSE); + + s1 = skp_read_wchar(global->stream); + u1 = g3d_stream_read_int8(global->stream); + u2 = g3d_stream_read_int8(global->stream); + u3 = g3d_stream_read_int8(global->stream); + + g_debug("\\ %s (0x%02X, 0x%02X, 0x%02X)", s1, u1, u2, u3); + + s2 = skp_read_wchar(global->stream); + u1 = g3d_stream_read_int8(global->stream); + u2 = g3d_stream_read_int8(global->stream); + g_return_val_if_fail(u2 == 0x01, FALSE); + + /* layer color? */ + x1 = g3d_stream_read_int32_le(global->stream); + g_debug("\\ %s (0x%02X, 0x%02X, 0x%08x)", s2, u1, u2, x1); + + x1 = g3d_stream_read_int32_le(global->stream); + if(x1 == 0x00fffeff) + g3d_stream_seek(global->stream, 21, G_SEEK_CUR); + else if(x1 == 0xfffffeff) + g3d_stream_seek(global->stream, 20, G_SEEK_CUR); + else { + g_warning("CLayer: unexpected value 0x%08x @ 0x%08x", x1, + (guint32)g3d_stream_tell(global->stream) - 4); + return FALSE; + } + w1 = g3d_stream_read_int16_le(global->stream); + global->layers = g_slist_append(global->layers, + GINT_TO_POINTER(w1 & 0x7FFF)); + g_debug("CLayer ID: 0x%2x", w1 & 0x7FFF); + + if(s1) + g_free(s1); + if(s2) + g_free(s2); + + } while(w1 & 0x8000); + + x1 = g3d_stream_read_int32_le(global->stream); + g_debug("CLayer: last 0x%08x", x1); + + return TRUE; +} + +/*****************************************************************************/ + +gboolean skp_cb_material(SkpGlobalData *global, SkpLocalData *local) +{ + gchar *name, *tmp; + guint8 u1, u2, u3; + guint32 x1, type, size; + G3DFloat r, g, b, a; + G3DMaterial *material; + + g3d_stream_read_int16_le(global->stream); + + name = skp_read_wchar(global->stream); + while(name) { + tmp = NULL; + size = 0; + + material = g3d_material_new(); + material->name = g_strdup(name); + global->model->materials = g_slist_append(global->model->materials, + material); + + type = g3d_stream_read_int16_le(global->stream); + switch(type) { + case 0x0000: /* simple color */ + r = g3d_stream_read_int8(global->stream); + g = g3d_stream_read_int8(global->stream); + b = g3d_stream_read_int8(global->stream); + a = g3d_stream_read_int8(global->stream); + + material->r = r / 255.0; + material->g = g / 255.0; + material->b = b / 255.0; + material->a = a / 255.0; +#if DEBUG > 1 + g_debug( + "\tmaterial: %-30s 0x%04x, " + "color (%.1f, %.1f, %.1f)", + name, type, material->r, material->g, material->b); +#endif + break; + + case 0x0001: /* texture */ + u1 = g3d_stream_read_int8(global->stream); + u2 = g3d_stream_read_int8(global->stream); + u3 = g3d_stream_read_int8(global->stream); + if(u3 == 0x80) { + /* number of textures? */ + x1 = g3d_stream_read_int32_le(global->stream); + if(x1 > 0) { + size = g3d_stream_read_int32_le(global->stream); + g3d_stream_seek(global->stream, size, G_SEEK_CUR); + } + } else { + x1 = 0x0004; + } + switch(x1) { + case 0x0000: + g3d_stream_seek(global->stream, 12, G_SEEK_CUR); + break; + case 0x0001: + g3d_stream_seek(global->stream, 20, G_SEEK_CUR); + break; + case 0x0002: + g3d_stream_seek(global->stream, 16, G_SEEK_CUR); + break; + case 0x0004: + g3d_stream_seek(global->stream, 16, G_SEEK_CUR); + break; + default: + g3d_stream_seek(global->stream, 16, G_SEEK_CUR); + g_debug("SKP: mat0001: x1=%x: " + "%02X%02X %02X%02X %02X%02X %02X%02X", x1, + g3d_stream_read_int8(global->stream), + g3d_stream_read_int8(global->stream), + g3d_stream_read_int8(global->stream), + g3d_stream_read_int8(global->stream), + g3d_stream_read_int8(global->stream), + g3d_stream_read_int8(global->stream), + g3d_stream_read_int8(global->stream), + g3d_stream_read_int8(global->stream)); + break; + } + tmp = skp_read_wchar(global->stream); + g3d_stream_seek(global->stream, 8, G_SEEK_CUR); +#if DEBUG > 1 + g_debug( + "\tmaterial: %-30s 0x%04x, %02X, %02X, %02X, 0x%08x\n" + "\t\ttexture (%d bytes, 0x%08x):\n\t\t%s", + name, type, u1, u2, u3, x1, size, + (guint32)g3d_stream_tell(global->stream), tmp); +#endif + + break; + + case 0x0101: /* texture */ + /* number of textures? */ + x1 = g3d_stream_read_int32_le(global->stream); + size = g3d_stream_read_int32_le(global->stream); + g3d_stream_seek(global->stream, size, G_SEEK_CUR); + g3d_stream_seek(global->stream, 16, G_SEEK_CUR); + tmp = skp_read_wchar(global->stream); + g3d_stream_seek(global->stream, 8, G_SEEK_CUR); +#if DEBUG > 1 + g_debug( + "\tmaterial: %-30s 0x%04x, 0x%08x\n" + "\t\ttexture (%i bytes):\n\t\t%s", + name, type, x1, size, tmp); +#endif + break; + + default: + g_debug("SKP: material: unknown type 0x%04X @ 0x%08x", + type, (guint32)g3d_stream_tell(global->stream)); + return FALSE; + } + + x1 = g3d_stream_read_int32_be(global->stream); + switch(x1 & 0x00FFL) { + case 0x00: + g3d_stream_seek(global->stream, 21, G_SEEK_CUR); + break; + case 0xFF: + g3d_stream_seek(global->stream, 22, G_SEEK_CUR); + break; + default: + g_debug("x1: 0x%08x", x1); + break; + } + + /* clean up */ + if(tmp) + g_free(tmp); + g_free(name); + + /* next one */ + name = skp_read_wchar(global->stream); + } + return TRUE; +} + +/*****************************************************************************/ + +gboolean skp_cb_vertex(SkpGlobalData *global, SkpLocalData *local) +{ + guint16 w1; + gdouble d1, d2, d3; + gboolean handled; + GSList *item; + SkpComponent *comp; + + return FALSE; + + w1 = g3d_stream_read_int16_le(global->stream); + g_return_val_if_fail(w1 == 0x0000, FALSE); + + skp_read_dbl3(global->stream, &d1, &d2, &d3); + g_debug("\tvertex: %.4f, %.4f, %.4f", d1, d2, d3); + + do { + w1 = g3d_stream_read_int16_le(global->stream); + handled = FALSE; + + g_debug("opcode: 0x%04x", w1); + if(w1 == 0xFFFF) { + g3d_stream_seek(global->stream, -2, G_SEEK_CUR); + return TRUE; + } + if(w1 & 0x8000) { + g3d_stream_read_int16_le(global->stream); + w1 &= 0x7FFF; + } + if(w1 == 0x0000) { + handled = TRUE; + } + + for(item = global->components; + (handled == FALSE) && (item != NULL); + item = item->next) { + + comp = item->data; + + switch(w1 - comp->id0) { + case 1: + skp_read_10b(global->stream); + handled = TRUE; + break; + case 3: + skp_read_dbl3(global->stream, &d1, &d2, &d3); + g_debug("\tvertex: %.4f, %.4f, %.4f", d1, d2, d3); + handled = TRUE; + break; + case 4: + case 5: + case 7: + case 9: + case 11: + case 13: + g_debug("\tempty"); + handled = TRUE; + break; + default: + break; + } + } /* loop through known layers */ + + if(handled == FALSE) { + g_debug("vertex: unknown opcode %#04x (layer0: 0x%04x, 0x%04x)", + w1, + global->components ? + ((SkpComponent *)(global->components->data))->id0 : -1, + global->components ? + ((SkpComponent *)(global->components->data))->id1 : -1); + } + } while(TRUE); + + return FALSE; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.h new file mode 100644 index 0000000..92af752 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_callbacks.h @@ -0,0 +1,59 @@ +/* $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_SKP_CALLBACKS_H +#define _IMP_SKP_CALLBACKS_H + +#include + +typedef struct { + G3DContext *context; + G3DModel *model; + G3DStream *stream; + GSList *layers; + GSList *components; +} SkpGlobalData; + +typedef struct { + gchar *id; + guint32 version; + gpointer object; +} SkpLocalData; + +typedef gboolean (* SkpCallback)(SkpGlobalData *global, SkpLocalData *local); + +/* callbacks */ + +gboolean skp_cb_arc_curve(SkpGlobalData *global, SkpLocalData *local); +gboolean skp_cb_attribute_container(SkpGlobalData *global, + SkpLocalData *local); +gboolean skp_cb_attribute_named(SkpGlobalData *global, SkpLocalData *local); +gboolean skp_cb_component_definition(SkpGlobalData *global, + SkpLocalData *local); +gboolean skp_cb_edge_use(SkpGlobalData *global, SkpLocalData *local); +gboolean skp_cb_face_texture_coords(SkpGlobalData *global, + SkpLocalData *local); +gboolean skp_cb_layer(SkpGlobalData *global, SkpLocalData *local); +gboolean skp_cb_material(SkpGlobalData *global, SkpLocalData *local); +gboolean skp_cb_vertex(SkpGlobalData *global, SkpLocalData *local); + +#endif /* _IMP_SKP_CALLBACKS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_chunks.h new file mode 100644 index 0000000..bbee439 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_chunks.h @@ -0,0 +1,62 @@ +/* $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_SKP_CHUNKS_H +#define _IMP_SKP_CHUNKS_H + +#include "imp_skp_callbacks.h" + +typedef struct { + gchar *id; + guint32 min_ver; + guint32 max_ver; + SkpCallback callback; +} SkpChunkDesc; + +static SkpChunkDesc skp_chunks[] = { + { "CArcCurve", 1, 1, skp_cb_arc_curve }, + { "CAttributeContainer", 0, 0, skp_cb_attribute_container }, + { "CAttributeNamed", 0, 0, skp_cb_attribute_named }, + { "CCamera", 4, 5, NULL }, + { "CComponentDefinition", 10, 10, skp_cb_component_definition }, + { "CComponentInstance", 4, 4, NULL }, + { "CCurve", 4, 4, NULL }, + { "CDib", 2, 3, NULL }, + { "CEdge", 2, 2, NULL }, + { "CEdgeUse", 1, 1, skp_cb_edge_use }, + { "CFace", 3, 3, NULL }, + { "CFaceTextureCoords", 4, 4, skp_cb_face_texture_coords }, + { "CGroup", 1, 1, NULL }, + { "CLayer", 2, 2, skp_cb_layer }, + { "CLoop", 1, 1, NULL }, + { "CMaterial", 12, 12, skp_cb_material }, + { "CRelationship", 0, 0, NULL }, + { "CSkFont", 0, 1, NULL }, + { "CSkpStyle", 1, 1, NULL }, + { "CThumbnail", 1, 1, NULL }, + { "CVertex", 0, 0, skp_cb_vertex }, + { "CViewPage", 9, 11, NULL }, + + { NULL, 0, 0, NULL } +}; + +#endif /* _IMP_SKP_CHUNKS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.c new file mode 100644 index 0000000..7f95477 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.c @@ -0,0 +1,114 @@ +/* $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_skp.h" +#include "imp_skp_read.h" + +guint32 skp_read_xint16(G3DStream *stream) +{ + guint32 val; + + val = g3d_stream_read_int16_le(stream); + if(val & 0x8000L) { + val &= 0x7FFF; + val |= (g3d_stream_read_int16_le(stream) << 16); + } + return val; +} + +gchar *skp_read_char(G3DStream *stream) +{ + guint32 magic, n; + gchar *text; + + magic = g3d_stream_read_int32_be(stream); + if(magic != 0xffff0000) { + g_warning("SKP: wrong text magic: 0x%08x", magic); + return NULL; + } + n = g3d_stream_read_int16_le(stream); + + text = g_new0(gchar, n + 1); + g3d_stream_read(stream, text, n); + + return text; +} + +gchar *skp_read_wchar(G3DStream *stream) +{ + gint32 i; + guint32 magic, n; + gunichar2 *u16text; + gchar *text; + GError *error = NULL; + + magic = g3d_stream_read_int32_be(stream); + if((magic & 0xFFFFFF00) != 0xfffeff00) { +#if DEBUG > 1 + g_debug("SKP: wrong UTF-16 magic: 0x%08x", magic); +#endif + g3d_stream_seek(stream, -4, G_SEEK_CUR); + return NULL; + } + n = magic & 0x000000FF; + + u16text = g_new0(gunichar2, n + 1); + for(i = 0; i < n; i ++) { + u16text[i] = g3d_stream_read_int16_le(stream); + } + + text = g_utf16_to_utf8(u16text, n, NULL, NULL, &error); + if(error != NULL) { + g_warning("UTF-16 to UTF-8 conversion failed: %s", + error->message); + g_error_free(error); + } + g_free(u16text); + + return text; +} + +gboolean skp_read_dbl3(G3DStream *stream, + gdouble *d1, gdouble *d2, gdouble *d3) +{ + *d1 = g3d_stream_read_double_le(stream); + *d2 = g3d_stream_read_double_le(stream); + *d3 = g3d_stream_read_double_le(stream); + return TRUE; +} + +gboolean skp_read_10b(G3DStream *stream) +{ + guint32 x1, x2; + guint8 u1, u2; + + x1 = g3d_stream_read_int32_be(stream); + u1 = g3d_stream_read_int8(stream); + + if(((x1 & 0x00FFFFFF) != 0x0001) || (u1 != 0x01)) { + g_warning("skp_read_10b: %#08x, %#02x", x1, u1); + } + u2 = g3d_stream_read_int8(stream); + x2 = g3d_stream_read_int32_le(stream); + g_debug("\tread 10b: %08x %02x %02x %08x", x1, u1, u2, x2); + return TRUE; +} + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.h new file mode 100644 index 0000000..fc1dc4d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_read.h @@ -0,0 +1,35 @@ +#ifndef _IMP_SKP_READ_H +/* $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 +*/ +#define _IMP_SKP_READ_H + +#include + +guint32 skp_read_xint16(G3DStream *stream); +gchar *skp_read_char(G3DStream *stream); +gchar *skp_read_wchar(G3DStream *stream); + +gboolean skp_read_dbl3(G3DStream *stream, + gdouble *d1, gdouble *d2, gdouble *d3); +gboolean skp_read_10b(G3DStream *stream); + +#endif /* _IMP_SKP_READ_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_types.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_types.h new file mode 100644 index 0000000..a2a95c7 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_skp/imp_skp_types.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_SKP_TYPES_H +#define _IMP_SKP_TYPES_H + +#include + +typedef struct { + guint32 id0; + guint32 id1; + guint32 layerid; +} SkpComponent; + +#endif /* _IMP_SKP_TYPES_H */ -- cgit v1.1