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_vrml2/Makefile | 518 +++++++++++++++++ .../plugins/import/imp_vrml2/Makefile.am | 26 + .../plugins/import/imp_vrml2/Makefile.in | 518 +++++++++++++++++ .../plugins/import/imp_vrml2/imp_vrml2.c | 82 +++ .../plugins/import/imp_vrml2/imp_vrml2.h | 42 ++ .../plugins/import/imp_vrml2/imp_vrml2_nodes.h | 42 ++ .../plugins/import/imp_vrml2/imp_vrml2_types.c | 78 +++ .../plugins/import/imp_vrml2/imp_vrml2_types.h | 103 ++++ .../plugins/import/imp_vrml2/imp_vrml_read.c | 647 +++++++++++++++++++++ .../plugins/import/imp_vrml2/imp_vrml_read.h | 56 ++ .../plugins/import/imp_vrml2/imp_vrml_types.h | 88 +++ 11 files changed, 2200 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_nodes.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_types.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2') diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile new file mode 100644 index 0000000..a0d2345 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile @@ -0,0 +1,518 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_vrml2/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_vrml2 +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_vrml2_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_vrml2_la_OBJECTS = imp_vrml2.lo imp_vrml_read.lo \ + imp_vrml2_types.lo +imp_vrml2_la_OBJECTS = $(am_imp_vrml2_la_OBJECTS) +#am_imp_vrml2_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_vrml2_la_SOURCES) +DIST_SOURCES = $(imp_vrml2_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_vrml2 +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2 +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_vrml2.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_vrml2_la_SOURCES = imp_vrml2.c imp_vrml2.h \ + imp_vrml_read.c imp_vrml_read.h \ + imp_vrml_types.h \ + imp_vrml2_types.c imp_vrml2_types.h \ + imp_vrml2_nodes.h + +imp_vrml2_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_vrml2/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_vrml2/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_vrml2.la: $(imp_vrml2_la_OBJECTS) $(imp_vrml2_la_DEPENDENCIES) + $(LINK) $(am_imp_vrml2_la_rpath) $(imp_vrml2_la_OBJECTS) $(imp_vrml2_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_vrml2.Plo +include ./$(DEPDIR)/imp_vrml2_types.Plo +include ./$(DEPDIR)/imp_vrml_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_vrml2/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.am new file mode 100644 index 0000000..981cc62 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.am @@ -0,0 +1,26 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +if EXPERIMENTAL +pluginimp_LTLIBRARIES = imp_vrml2.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_vrml2_la_SOURCES = imp_vrml2.c imp_vrml2.h \ + imp_vrml_read.c imp_vrml_read.h \ + imp_vrml_types.h \ + imp_vrml2_types.c imp_vrml2_types.h \ + imp_vrml2_nodes.h +imp_vrml2_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.in new file mode 100644 index 0000000..5c08daa --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.in @@ -0,0 +1,518 @@ +# 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_vrml2 +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_vrml2_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_vrml2_la_OBJECTS = imp_vrml2.lo imp_vrml_read.lo \ + imp_vrml2_types.lo +imp_vrml2_la_OBJECTS = $(am_imp_vrml2_la_OBJECTS) +@EXPERIMENTAL_TRUE@am_imp_vrml2_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_vrml2_la_SOURCES) +DIST_SOURCES = $(imp_vrml2_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_vrml2.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_vrml2_la_SOURCES = imp_vrml2.c imp_vrml2.h \ + imp_vrml_read.c imp_vrml_read.h \ + imp_vrml_types.h \ + imp_vrml2_types.c imp_vrml2_types.h \ + imp_vrml2_nodes.h + +imp_vrml2_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_vrml2/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_vrml2/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_vrml2.la: $(imp_vrml2_la_OBJECTS) $(imp_vrml2_la_DEPENDENCIES) + $(LINK) $(am_imp_vrml2_la_rpath) $(imp_vrml2_la_OBJECTS) $(imp_vrml2_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_vrml2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_vrml2_types.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_vrml_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_vrml2/imp_vrml2.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.c new file mode 100644 index 0000000..f295175 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.c @@ -0,0 +1,82 @@ +/* $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 +*/ + +/* + * an experiment to parse VRML without flex, version 2 is tried as a starter, + * v1 and Inventor stuff will be added if successful. + */ + +#include +#include +#include + +#include +#include + +#include "imp_vrml2.h" +#include "imp_vrml_read.h" + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model, gpointer user_data) +{ + gchar buf[128]; + gboolean retval; + VrmlReader *reader; + + setlocale(LC_NUMERIC, "C"); + + buf[127] = '\0'; + g3d_stream_read_line(stream, buf, 127); + if(strncmp(buf, "#VRML V2.0 utf8", 15) != 0) { + g_warning("%s is not a valid VRML 2.0 UTF-8 stream", stream->uri); + return FALSE; + } + + reader = g_new0(VrmlReader, 1); + reader->max_bufsize = 2048; + reader->buffer = g_new0(gchar, reader->max_bufsize); + reader->bufp = reader->buffer; + reader->line = 2; + reader->stream = stream; + reader->model = model; + + retval = vrml_read_global(reader); + + g_free(reader); + + return retval; +} + +EAPI +gchar *plugin_description(void) +{ + return g_strdup("VRML v2 models."); +} + +EAPI +gchar **plugin_extensions(void) +{ + return g_strsplit("wrl", ":", 0); +} + +/*****************************************************************************/ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.h new file mode 100644 index 0000000..4946d6b --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.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_VRML2_H +#define _IMP_VRML2_H + +#include + +#include +#include + +typedef struct { + G3DStream *stream; + gchar *buffer; + gchar *bufp; + gsize bufsize; + gsize max_bufsize; + guint32 line; + + G3DModel *model; + G3DObject *object; +} VrmlReader; + +#endif diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_nodes.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_nodes.h new file mode 100644 index 0000000..837c728 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_nodes.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_VRML2_NODES_H +#define _IMP_VRML2_NODES_H + +#include "imp_vrml_types.h" + +static VrmlNodeDef vrml2_nodes[] = { + { "Appearence", NULL }, + { "Background", NULL }, + { "Color", NULL }, + { "Coordinate", NULL }, + { "IndexedFaceSet", NULL }, + { "Material", NULL }, + { "Normal", NULL }, + { "Shape", NULL }, + { "Transform", NULL }, + { "Viewpoint", NULL }, + + { NULL, NULL } +}; + +#endif diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.c new file mode 100644 index 0000000..3c10bf2 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.c @@ -0,0 +1,78 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include + +#include "imp_vrml_types.h" +#include "imp_vrml_read.h" + +VrmlType vrml2_type_cb__float3(VrmlReader *reader) +{ + if(!vrml_read_skip_ws(reader)) + return T_UNKNOWN; + if(*(reader->bufp) == '[') + return T_LIST_FLOAT3; + return T_FLOAT3; +} + +VrmlType vrml2_type_cb__int(VrmlReader *reader) +{ + if(!vrml_read_skip_ws(reader)) + return T_UNKNOWN; + if(*(reader->bufp) == '[') + return T_LIST_INT; + return T_INT; +} + +VrmlType vrml2_type_cb_field(VrmlReader *reader) +{ + gchar *id; + VrmlType t = T_UNKNOWN; + + id = vrml_read_id(reader); + if(!id) { + g_warning("VRML: vrml2_type_cb_field: failed to read id"); + return T_UNKNOWN; + } + if(strcmp(id, "SFFloat") == 0) + t = T_TOKEN2; /* data 0 */ + + g_free(id); + return t; +} + +VrmlType vrml2_type_cb_children(VrmlReader *reader) +{ + if(!vrml_read_skip_ws(reader)) + return T_UNKNOWN; + if(*(reader->bufp) == '[') + return T_LIST_OBJECT; + return T_OBJECT; +} + +VrmlType vrml2_type_cb_color(VrmlReader *reader) +{ + if(!vrml_read_skip_ws(reader)) + return T_UNKNOWN; + if(*(reader->bufp) == '[') + return T_LIST_FLOAT3; + return T_OBJECT; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.h new file mode 100644 index 0000000..a4747ec --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.h @@ -0,0 +1,103 @@ +/* $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_VRML2_TYPES_H +#define _IMP_VRML2_TYPES_H + +#include "imp_vrml2.h" +#include "imp_vrml_types.h" + +/* list or not list */ +VrmlType vrml2_type_cb__float3(VrmlReader *reader); +VrmlType vrml2_type_cb__int(VrmlReader *reader); + +VrmlType vrml2_type_cb_field(VrmlReader *reader); +VrmlType vrml2_type_cb_children(VrmlReader *reader); +VrmlType vrml2_type_cb_color(VrmlReader *reader); + +static VrmlTypeDef vrml2_types[] = { + { "ambientIntensity", T_FLOAT, NULL }, + { "appearance", T_OBJECT, NULL }, + { "autoOffset", T_BOOLEAN, NULL }, + { "ccw", T_BOOLEAN, NULL }, + { "center", T_FLOAT_X, NULL }, + { "children", T_UNKNOWN, vrml2_type_cb_children }, + { "color", T_UNKNOWN, vrml2_type_cb_color }, + { "colorIndex", T_LIST_INT, vrml2_type_cb__int }, + { "colorPerVertex", T_BOOLEAN, NULL }, + { "convex", T_BOOLEAN, NULL }, + { "coord", T_OBJECT, NULL }, + { "coordIndex", T_LIST_INT, NULL }, + { "creaseAngle", T_FLOAT, NULL }, + { "cycleInterval", T_INT, NULL }, + { "description", T_STRING, NULL }, + { "diffuseColor", T_FLOAT3, NULL }, + { "emissiveColor", T_FLOAT3, NULL }, + { "eventIn", T_TOKEN2, NULL }, + { "eventOut", T_TOKEN2, NULL }, + { "field", T_UNKNOWN, vrml2_type_cb_field }, + { "fieldOfView", T_FLOAT, NULL }, + { "geometry", T_OBJECT, NULL }, + { "groundAngle", T_LIST_FLOAT2, NULL }, + { "groundColor", T_LIST_FLOAT3, NULL }, + { "height", T_FLOAT, NULL }, + { "info", T_LIST_STRING, NULL }, + { "key", T_LIST_FLOAT, NULL }, + { "keyValue", T_LIST_FLOAT4, NULL }, + { "material", T_OBJECT, NULL }, + { "maxPosition", T_FLOAT_X, NULL }, + { "minPosition", T_FLOAT_X, NULL }, + { "normal", T_OBJECT, NULL }, + { "normalIndex", T_LIST_INT, NULL }, + { "normalPerVertex", T_BOOLEAN, NULL }, + { "offset", T_FLOAT_X, NULL }, + { "orientation", T_FLOAT4, NULL }, + { "parameter", T_STRING, NULL }, + { "point", T_LIST_FLOAT_X, NULL }, + { "position", T_FLOAT3, NULL }, + { "radius", T_FLOAT, NULL }, + { "repeatS", T_BOOLEAN, NULL }, + { "repeatT", T_BOOLEAN, NULL }, + { "rotation", T_FLOAT_X, NULL }, + { "scale", T_FLOAT_X, NULL }, + { "scaleOrientation", T_FLOAT_X, NULL }, + { "shininess", T_FLOAT, NULL }, + { "size", T_FLOAT3, NULL }, + { "skyAngle", T_LIST_FLOAT2, NULL }, + { "skyColor", T_LIST_FLOAT3, vrml2_type_cb__float3 }, + { "solid", T_BOOLEAN, NULL }, + { "specularColor", T_FLOAT3, NULL }, + { "startTime", T_INT, NULL }, + { "stopTime", T_INT, NULL }, + { "texCoord", T_OBJECT, NULL }, + { "texCoordIndex", T_LIST_INT, NULL }, + { "texture", T_OBJECT, NULL }, + { "textureTransform", T_OBJECT, NULL }, + { "translation", T_FLOAT3, NULL }, + { "transparency", T_FLOAT, NULL }, + { "type", T_STRING, NULL }, + { "url", T_STRING, NULL }, + { "vector", T_LIST_FLOAT3, NULL }, + + { NULL, T_UNKNOWN } +}; + +#endif /* _IMP_VRML2_TYPES_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.c new file mode 100644 index 0000000..580c5cd --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.c @@ -0,0 +1,647 @@ +/* $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_vrml_types.h" +#include "imp_vrml_read.h" + +#include "imp_vrml2_nodes.h" +#include "imp_vrml2_types.h" + +gboolean vrml_read_check_buffer(VrmlReader *reader) +{ + if(reader->bufsize > 0) + return TRUE; + if(g3d_stream_eof(reader->stream)) + return FALSE; + memset(reader->buffer, '\0', reader->max_bufsize); + g3d_stream_read_line(reader->stream, reader->buffer, + reader->max_bufsize - 1); + reader->line ++; + reader->bufsize = strlen(reader->buffer); + reader->bufp = reader->buffer; + return (reader->bufsize > 0); +} + +gboolean vrml_read_skip_ws(VrmlReader *reader) +{ + if(!vrml_read_check_buffer(reader)) + return FALSE; + while(g_ascii_isspace(*(reader->bufp))) { + vrml_read_dec(reader); + if(!vrml_read_check_buffer(reader)) + return FALSE; + } + return TRUE; +} + +gchar *vrml_read_token(VrmlReader *reader) +{ + gchar *s = NULL; + gsize len = 0; + + if(!vrml_read_skip_ws(reader)) + return NULL; + while(vrml_read_check_buffer(reader) && + !g_ascii_isspace(*(reader->bufp)) && + (*(reader->bufp) != ',')) { + len ++; + s = g_realloc(s, (len + 1) * sizeof(gchar)); + s[len - 1] = *(reader->bufp); + s[len - 0] = '\0'; + vrml_read_dec(reader); + } +#if DEBUG > 3 + g_debug("token: %s", s); +#endif + return s; +} + +gchar *vrml_read_numeric(VrmlReader *reader) +{ + gchar *s = NULL; + gsize len = 0; + gboolean first = TRUE; + + if(!vrml_read_skip_ws(reader)) + return NULL; + while(vrml_read_check_buffer(reader) && + (g_ascii_isdigit(*(reader->bufp)) || + strchr(".-e", *(reader->bufp)))) { + + if(first) { + if(*(reader->bufp) == 'e') + return NULL; + first = FALSE; + } + + len ++; + s = g_realloc(s, (len + 1) * sizeof(gchar)); + s[len - 1] = *(reader->bufp); + s[len - 0] = '\0'; + vrml_read_dec(reader); + } +#if DEBUG > 3 + g_debug("numeric: %s", s); +#endif + return s; +} + +gchar *vrml_read_id(VrmlReader *reader) +{ + gchar *buf; + gsize bufsize; + + if(!vrml_read_skip_ws(reader)) + return NULL; + if(!vrml_read_check_buffer(reader)) + return NULL; + bufsize = 2; + buf = g_new(gchar, 2 * sizeof(gchar)); + buf[0] = *(reader->bufp); + buf[1] = '\0'; + if(!(g_ascii_isalpha(buf[0]) || strchr("_", buf[0]))) { + g_free(buf); + return NULL; + } + vrml_read_dec(reader); + if(!vrml_read_check_buffer(reader)) + return buf; + while(g_ascii_isalnum(*(reader->bufp)) || strchr("_.", *(reader->bufp))) { + bufsize ++; + buf = g_realloc(buf, bufsize * sizeof(gchar)); + buf[bufsize - 2] = *(reader->bufp); + buf[bufsize - 1] = '\0'; + vrml_read_dec(reader); + if(!vrml_read_check_buffer(reader)) + return buf; + } + return buf; +} + +gchar *vrml_read_string(VrmlReader *reader) +{ + gchar *buf = NULL; + gsize bufsize = 0; + + if(!vrml_read_check_buffer(reader)) + return NULL; + while(*(reader->bufp) != '"') { + bufsize ++; + buf = g_realloc(buf, (bufsize + 1) * sizeof(gchar)); + buf[bufsize - 1] = *(reader->bufp); + buf[bufsize] = '\0'; + vrml_read_dec(reader); + if(!vrml_read_check_buffer(reader)) + return buf; + } + vrml_read_dec(reader); + return buf; +} + +gboolean vrml_read_skip_unknown(VrmlReader *reader) +{ + gchar c, *s; +#if DEBUG > 0 + g_debug("vrml: skipping unknown stuff in line %d", reader->line); +#endif + + while(vrml_read_check_buffer(reader)) { + c = *(reader->bufp); + vrml_read_dec(reader); + switch(c) { + case '"': + s = vrml_read_string(reader); + if(s) { + g_debug("found string '%s'", s); + g_free(s); + } + break; + case '{': + case '[': + vrml_read_skip_unknown(reader); + break; + case '}': + case ']': + return TRUE; + break; + default: + break; + } + } + return FALSE; +} + +gchar *vrml_read_nodeid(VrmlReader *reader) +{ + gchar *id; + id = vrml_read_id(reader); + if(id == NULL) + return NULL; + if(!g_ascii_isupper(id[0])) { + g_free(id); + return NULL; + } + return id; +} + +gboolean vrml_read_expect(VrmlReader *reader, const gchar c) +{ + gchar b; + if(!vrml_read_skip_ws(reader)) + return FALSE; + if(!vrml_read_check_buffer(reader)) + return FALSE; + b = *(reader->bufp); + vrml_read_dec(reader); + return (b == c); +} + +gboolean vrml_read_list(VrmlReader *reader, vrml_read_list_item_callback cb, + gpointer user_data) +{ + if(!vrml_read_expect(reader, '[')) + return FALSE; + + while(vrml_read_skip_ws(reader)) { + if(*(reader->bufp) == ']') { + vrml_read_dec(reader); + return TRUE; + } + if(!cb(reader, user_data)) + return FALSE; + + if(!vrml_read_skip_ws(reader)) + return FALSE; + if(*(reader->bufp) == ',') + vrml_read_dec(reader); + } + /* should not be reached */ + return vrml_read_expect(reader, ']'); +} + +/*****************************************************************************/ + +static VrmlObject *vrml_lookup_object(VrmlReader *reader, const gchar *id) +{ + VrmlObject *object; + + object = g_new0(VrmlObject, 1); + object->defid = g_strdup(id); + object->name = g_strdup("object from library"); + + return object; +} + +static gboolean vrml_read_float_n(VrmlReader *reader, G3DFloat *a, guint32 n) +{ + gint i; + gchar *s; + + for(i = 0; i < n; i ++) { + s = vrml_read_numeric(reader); + if(s) { + a[i] = atof(s); + g_free(s); + } else + return FALSE; + } + return TRUE; +} + +static gboolean vrml_read_token_n(VrmlReader *reader, VrmlProperty *property, + guint32 n) +{ + gchar *token; + gint32 i; + + for(i = 0; i < n; i ++) { + token = vrml_read_token(reader); +#if DEBUG > 2 + g_debug("Token: %s", token); +#endif + g_free(token); + } + + return TRUE; +} + +/* property list callbacks */ + +gboolean vrml_read_list_object_cb(VrmlReader *reader, gpointer data) +{ + VrmlProperty *property = data; + + property->n_items ++; + property->v_object = g_realloc(property->v_object, + property->n_items * sizeof(VrmlObject *)); + property->v_object[property->n_items - 1] = + vrml_read_object(reader, property->level + 1); + return (property->v_object[property->n_items - 1] != NULL); +} + +gboolean vrml_read_list_string_cb(VrmlReader *reader, gpointer data) +{ + VrmlProperty *property = data; + + if(!vrml_read_expect(reader, '"')) + return FALSE; + + property->n_items ++; + property->v_str = g_realloc(property->v_str, + property->n_items * sizeof(gchar *)); + property->v_str[property->n_items - 1] = + vrml_read_string(reader); + return TRUE; +} + +gboolean vrml_read_list_int_cb(VrmlReader *reader, gpointer data) +{ + VrmlProperty *property = data; + gchar *s; + + s = vrml_read_numeric(reader); + if(s) { + property->n_items ++; + property->v_int = g_realloc(property->v_int, + property->n_items * sizeof(gint32)); + property->v_int[property->n_items - 1] = atoi(s); + g_free(s); + return TRUE; + } + return FALSE; +} + +gboolean vrml_read_list_float_cb(VrmlReader *reader, gpointer data) +{ + VrmlProperty *property = data; + + property->n_items ++; + property->v_float = g_realloc(property->v_float, + property->n_items * sizeof(G3DFloat)); + return vrml_read_float_n(reader, + property->v_float + (property->n_items - 1), 1); +} + +gboolean vrml_read_list_float2_cb(VrmlReader *reader, gpointer data) +{ + VrmlProperty *property = data; + + property->n_items += 2; + property->v_float = g_realloc(property->v_float, + property->n_items * sizeof(G3DFloat)); + return vrml_read_float_n(reader, + property->v_float + (property->n_items - 2), 2); +} + +gboolean vrml_read_list_float3_cb(VrmlReader *reader, gpointer data) +{ + VrmlProperty *property = data; + + property->n_items += 3; + property->v_float = g_realloc(property->v_float, + property->n_items * sizeof(G3DFloat)); + return vrml_read_float_n(reader, + property->v_float + (property->n_items - 3), 3); +} + +gboolean vrml_read_list_float4_cb(VrmlReader *reader, gpointer data) +{ + VrmlProperty *property = data; + + property->n_items += 4; + property->v_float = g_realloc(property->v_float, + property->n_items * sizeof(G3DFloat)); + return vrml_read_float_n(reader, + property->v_float + (property->n_items - 4), 4); +} + +gboolean vrml_read_list_floatx_cb(VrmlReader *reader, gpointer data) +{ + VrmlProperty *property = data; + gchar *s; + + s = vrml_read_numeric(reader); + while(s) { + property->n_items ++; + property->v_float = g_realloc(property->v_float, + property->n_items * sizeof(G3DFloat)); + property->v_float[property->n_items - 1] = atof(s); + g_free(s); + s = vrml_read_numeric(reader); + } + return TRUE; +} + +/* property reader */ + +VrmlProperty *vrml_read_property(VrmlReader *reader, guint32 level) +{ + VrmlProperty *property; + VrmlTypeDef *type = NULL; + gint i; + gchar *id, *s; + + id = vrml_read_id(reader); + if(id == NULL) + return NULL; + + /* look up object */ + for(i = 0; vrml2_types[i].name != NULL; i ++) + if(strcmp(id, vrml2_types[i].name) == 0) { + type = &(vrml2_types[i]); + break; + } + if(type == NULL) { + g_warning("VRML: unknown type %s in line %d", id, reader->line); + return NULL; + } + property = g_new0(VrmlProperty, 1); + property->name = id; + if(type->detect != NULL) + property->id = type->detect(reader); + else + property->id = type->id; + property->level = level; + +#if DEBUG > 0 + g_debug("\\%sproperty '%s', type %d", + vrml_read_padding + strlen(vrml_read_padding) - 1 - level, + id, property->id); +#endif + + switch(property->id) { + case T_OBJECT: + property->n_items = 1; + property->v_object = g_new0(VrmlObject *, 1); + property->v_object[0] = vrml_read_object(reader, level + 1); + break; + case T_TOKEN2: + vrml_read_token_n(reader, property, 2); + break; + case T_TOKEN3: + vrml_read_token_n(reader, property, 3); + break; + case T_STRING: + property->n_items = 1; + if(!vrml_read_expect(reader, '"')) + return FALSE; + property->v_str = g_new0(gchar *, 1); + property->v_str[0] = vrml_read_string(reader); + break; + case T_BOOLEAN: + s = vrml_read_token(reader); + if(s) { + if(strcmp(s, "TRUE") == 0) + property->v_boolean = TRUE; + g_free(s); + } + break; + case T_INT: + s = vrml_read_numeric(reader); + if(s) { + property->n_items = 1; + property->v_int = g_new0(gint32, 1); + property->v_int[0] = atoi(s); + g_free(s); + } + break; + case T_FLOAT: + property->n_items = 1; + property->v_float = g_new0(G3DFloat, 1); + vrml_read_float_n(reader, property->v_float, 1); + break; + case T_FLOAT2: + property->n_items = 2; + property->v_float = g_new0(G3DFloat, 2); + vrml_read_float_n(reader, property->v_float, 2); + break; + case T_FLOAT3: + property->n_items = 3; + property->v_float = g_new0(G3DFloat, 3); + vrml_read_float_n(reader, property->v_float, 3); + break; + case T_FLOAT4: + property->n_items = 4; + property->v_float = g_new0(G3DFloat, 4); + vrml_read_float_n(reader, property->v_float, 4); + break; + case T_FLOAT_X: + s = vrml_read_numeric(reader); + while(s) { + property->n_items ++; + property->v_float = g_realloc(property->v_float, + property->n_items * sizeof(G3DFloat)); + property->v_float[property->n_items - 1] = atof(s); +#if DEBUG > 2 + g_debug("T_FLOAT_X: %i: %.2f", property->n_items, + property->v_float[property->n_items - 1]); +#endif + g_free(s); + s = vrml_read_numeric(reader); + } + break; + case T_LIST_OBJECT: + vrml_read_list(reader, vrml_read_list_object_cb, property); + break; + case T_LIST_STRING: + vrml_read_list(reader, vrml_read_list_string_cb, property); + break; + case T_LIST_INT: + vrml_read_list(reader, vrml_read_list_int_cb, property); + break; + case T_LIST_FLOAT: + vrml_read_list(reader, vrml_read_list_float_cb, property); + break; + case T_LIST_FLOAT2: + vrml_read_list(reader, vrml_read_list_float2_cb, property); + break; + case T_LIST_FLOAT3: + vrml_read_list(reader, vrml_read_list_float3_cb, property); + break; + case T_LIST_FLOAT4: + vrml_read_list(reader, vrml_read_list_float4_cb, property); + break; + case T_LIST_FLOAT_X: + vrml_read_list(reader, vrml_read_list_floatx_cb, property); + break; + + default: + g_free(property->name); + g_free(property); + return NULL; + break; + } + + return property; +} + +static VrmlObject *vrml_read_route_object(VrmlReader *reader, guint32 level) +{ + VrmlObject *object; + gchar *id; +#if DEBUG > 2 + g_debug("ROUTE object"); +#endif + id = vrml_read_id(reader); /* source */ + if(id == NULL) { + g_warning("ROUTE: could not get source"); + return NULL; + } + g_free(id); + id = vrml_read_id(reader); /* TO */ + if(id == NULL) { + g_warning("ROUTE: could not get TO"); + return NULL; + } + g_free(id); + id = vrml_read_id(reader); /* destination */ + if(id == NULL) { + g_warning("ROUTE: could not get destination"); + return NULL; + } + g_free(id); + object = g_new0(VrmlObject, 1); + object->name = g_strdup("ROUTE object"); + object->level = level; + return object; +} + +VrmlObject *vrml_read_object(VrmlReader *reader, guint32 level) +{ + VrmlObject *object; + VrmlProperty *property; + gchar *id, *defid = NULL; + gboolean define = FALSE; + + id = vrml_read_id(reader); + if(id == NULL) + return NULL; + if(strcmp(id, "NULL") == 0) { + return NULL; + } else if(strcmp(id, "DEF") == 0) { + define = TRUE; + defid = vrml_read_id(reader); + if(defid == NULL) + return NULL; + id = vrml_read_id(reader); + if(id == NULL) + return NULL; + } else if(strcmp(id, "USE") == 0) { + defid = vrml_read_id(reader); +#if DEBUG > 2 + g_debug("looking up '%s'", defid); +#endif + return vrml_lookup_object(reader, defid); + } else if(strcmp(id, "ROUTE") == 0) { + return vrml_read_route_object(reader, level); + } + + if(!vrml_read_expect(reader, '{')) { + g_warning("vrml_read_object: expected '{' in line %d", reader->line); + g_free(id); + if(defid) + g_free(defid); + return FALSE; + } +#if DEBUG > 0 + g_debug("\\%sobject '%s'", + vrml_read_padding + strlen(vrml_read_padding) - 1 - level, + id); +#endif + + object = g_new0(VrmlObject, 1); + object->name = id; + object->defid = defid; + object->define = define; + object->level = level; + + /* read properties */ + while(vrml_read_skip_ws(reader)) { +#if DEBUG > 2 + g_debug("O: '%c'", *(reader->bufp)); +#endif + if(*(reader->bufp) == '}') { + vrml_read_dec(reader); + return object; + } + property = vrml_read_property(reader, level + 1); + if(property != NULL) + object->properties = g_slist_append(object->properties, property); + else { + vrml_read_skip_unknown(reader); + return object; + } + } + vrml_read_expect(reader, '}'); + return object; +} + +gboolean vrml_read_global(VrmlReader *reader) +{ + while(vrml_read_skip_ws(reader)) { + if(!vrml_read_object(reader, 0)) + return FALSE; + } + return TRUE; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.h new file mode 100644 index 0000000..691eb57 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.h @@ -0,0 +1,56 @@ +/* $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_VRML_READ_H +#define _IMP_VRML_READ_H + +#include "imp_vrml2.h" +#include "imp_vrml_types.h" + +typedef gboolean (* vrml_read_list_item_callback)(VrmlReader *reader, + gpointer user_data); + +gboolean vrml_read_global(VrmlReader *reader); +gboolean vrml_read_check_buffer(VrmlReader *reader); +gboolean vrml_read_skip_ws(VrmlReader *reader); +gboolean vrml_read_skip_unknown(VrmlReader *reader); +gboolean vrml_read_expect(VrmlReader *reader, const gchar c); +gboolean vrml_read_list(VrmlReader *reader, vrml_read_list_item_callback cb, + gpointer user_data); + +gchar *vrml_read_token(VrmlReader *reader); +gchar *vrml_read_numeric(VrmlReader *reader); +gchar *vrml_read_id(VrmlReader *reader); +gchar *vrml_read_nodeid(VrmlReader *reader); +gchar *vrml_read_string(VrmlReader *reader); + +VrmlProperty *vrml_read_property(VrmlReader *reader, guint32 level); +VrmlObject *vrml_read_object(VrmlReader *reader, guint32 level); + +static inline void vrml_read_dec(VrmlReader *reader) +{ + reader->bufp ++; + reader->bufsize --; +} + +static gchar vrml_read_padding[] = " "; + +#endif /* _IMP_VRML_READ_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_types.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_types.h new file mode 100644 index 0000000..6ca2327 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_types.h @@ -0,0 +1,88 @@ +/* $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_VRML_TYPES_H +#define _IMP_VRML_TYPES_H + +#include "imp_vrml2.h" + +typedef enum { + T_UNKNOWN = 0, + T_SPECIAL, + T_OBJECT, + T_TOKEN2, + T_TOKEN3, + T_STRING, + T_BOOLEAN, + T_INT, + T_FLOAT, + T_FLOAT2, + T_FLOAT3, + T_FLOAT4, + T_FLOAT_X, + T_LIST_OBJECT, + T_LIST_STRING, + T_LIST_INT, + T_LIST_FLOAT, + T_LIST_FLOAT2, + T_LIST_FLOAT3, + T_LIST_FLOAT4, + T_LIST_FLOAT_X, + N_TYPES +} VrmlType; + +typedef struct { + gchar *name; + gchar *defid; + gboolean define; + guint32 level; + GSList *properties; +} VrmlObject; + +typedef struct { + gchar *name; + VrmlType id; + + gsize n_items; + VrmlObject **v_object; + gchar **v_str; + G3DFloat *v_float; + gint32 *v_int; + gboolean v_boolean; + guint32 level; +} VrmlProperty; + +typedef VrmlType (* VrmlTypeDetect)(VrmlReader *reader); + +typedef struct { + const gchar *name; + VrmlType id; + VrmlTypeDetect detect; +} VrmlTypeDef; + +typedef gboolean (* VrmlNodeCallback)(VrmlReader *reader, VrmlObject *object); + +typedef struct { + const gchar *name; + VrmlNodeCallback callback; +} VrmlNodeDef; + +#endif /* _IMP_VRML_TYPES_H */ -- cgit v1.1