Fri Oct 06 09:57:09 2000 +0000
Initial revision
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/.cvsignore Fri Oct 06 09:57:09 2000 +0000 1.3 @@ -0,0 +1,1 @@ 1.4 +Makefile
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/Makefile.am Fri Oct 06 09:57:09 2000 +0000 2.3 @@ -0,0 +1,3 @@ 2.4 +## Process this file with automake to generate Makefile.in. 2.5 + 2.6 +SUBDIRS = ivcat ivhierarchy ivNodeKitStructure renderos
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/Makefile.in Fri Oct 06 09:57:09 2000 +0000 3.3 @@ -0,0 +1,323 @@ 3.4 +# Makefile.in generated automatically by automake 1.4a from Makefile.am 3.5 + 3.6 +# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc. 3.7 +# This Makefile.in is free software; the Free Software Foundation 3.8 +# gives unlimited permission to copy and/or distribute it, 3.9 +# with or without modifications, as long as this notice is preserved. 3.10 + 3.11 +# This program is distributed in the hope that it will be useful, 3.12 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 3.13 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 3.14 +# PARTICULAR PURPOSE. 3.15 + 3.16 +SHELL = @SHELL@ 3.17 + 3.18 +srcdir = @srcdir@ 3.19 +top_srcdir = @top_srcdir@ 3.20 +VPATH = @srcdir@ 3.21 +prefix = @prefix@ 3.22 +exec_prefix = @exec_prefix@ 3.23 + 3.24 +bindir = @bindir@ 3.25 +sbindir = @sbindir@ 3.26 +libexecdir = @libexecdir@ 3.27 +datadir = @datadir@ 3.28 +sysconfdir = @sysconfdir@ 3.29 +sharedstatedir = @sharedstatedir@ 3.30 +localstatedir = @localstatedir@ 3.31 +libdir = @libdir@ 3.32 +infodir = @infodir@ 3.33 +mandir = @mandir@ 3.34 +includedir = @includedir@ 3.35 +oldincludedir = /usr/include 3.36 + 3.37 +pkgdatadir = $(datadir)/@PACKAGE@ 3.38 +pkglibdir = $(libdir)/@PACKAGE@ 3.39 +pkgincludedir = $(includedir)/@PACKAGE@ 3.40 + 3.41 +top_builddir = .. 3.42 + 3.43 +ACLOCAL = @ACLOCAL@ 3.44 +AUTOCONF = @AUTOCONF@ 3.45 +AUTOMAKE = @AUTOMAKE@ 3.46 +AUTOHEADER = @AUTOHEADER@ 3.47 + 3.48 +INSTALL = @INSTALL@ 3.49 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ 3.50 +INSTALL_DATA = @INSTALL_DATA@ 3.51 +INSTALL_SCRIPT = @INSTALL_SCRIPT@ 3.52 +INSTALL_STRIP_FLAG = 3.53 +transform = @program_transform_name@ 3.54 + 3.55 +NORMAL_INSTALL = : 3.56 +PRE_INSTALL = : 3.57 +POST_INSTALL = : 3.58 +NORMAL_UNINSTALL = : 3.59 +PRE_UNINSTALL = : 3.60 +POST_UNINSTALL = : 3.61 + 3.62 +@SET_MAKE@ 3.63 +build_alias = @build_alias@ 3.64 +build_triplet = @build@ 3.65 +host_alias = @host_alias@ 3.66 +host_triplet = @host@ 3.67 +target_alias = @target_alias@ 3.68 +target_triplet = @target@ 3.69 +AMDEP = @AMDEP@ 3.70 +AMTAR = @AMTAR@ 3.71 +AS = @AS@ 3.72 +AWK = @AWK@ 3.73 +CC = @CC@ 3.74 +COIN_BINARY_AGE = @COIN_BINARY_AGE@ 3.75 +COIN_DOC_HTML = @COIN_DOC_HTML@ 3.76 +COIN_DOC_MAN = @COIN_DOC_MAN@ 3.77 +COIN_EXTRA_CPPFLAGS = @COIN_EXTRA_CPPFLAGS@ 3.78 +COIN_EXTRA_LDFLAGS = @COIN_EXTRA_LDFLAGS@ 3.79 +COIN_EXTRA_LIBS = @COIN_EXTRA_LIBS@ 3.80 +COIN_HACKING_LIBDIRS = @COIN_HACKING_LIBDIRS@ 3.81 +COIN_INTERFACE_AGE = @COIN_INTERFACE_AGE@ 3.82 +COIN_LIBNAME = @COIN_LIBNAME@ 3.83 +COIN_MAJOR_VERSION = @COIN_MAJOR_VERSION@ 3.84 +COIN_MICRO_VERSION = @COIN_MICRO_VERSION@ 3.85 +COIN_MINOR_VERSION = @COIN_MINOR_VERSION@ 3.86 +COIN_VERSION = @COIN_VERSION@ 3.87 +CPP = @CPP@ 3.88 +CXX = @CXX@ 3.89 +CXXCPP = @CXXCPP@ 3.90 +DEPDIR = @DEPDIR@ 3.91 +DLLTOOL = @DLLTOOL@ 3.92 +LIBTOOL = @LIBTOOL@ 3.93 +LN_S = @LN_S@ 3.94 +LT_AGE = @LT_AGE@ 3.95 +LT_CURRENT = @LT_CURRENT@ 3.96 +LT_RELEASE = @LT_RELEASE@ 3.97 +LT_REVISION = @LT_REVISION@ 3.98 +MAINT = @MAINT@ 3.99 +MAKEINFO = @MAKEINFO@ 3.100 +OBJDUMP = @OBJDUMP@ 3.101 +PACKAGE = @PACKAGE@ 3.102 +RANLIB = @RANLIB@ 3.103 +VERSION = @VERSION@ 3.104 +coin_build_dir = @coin_build_dir@ 3.105 +coin_configure_date = @coin_configure_date@ 3.106 +coin_include_dir = @coin_include_dir@ 3.107 +coin_lib_dir = @coin_lib_dir@ 3.108 +coin_src_dir = @coin_src_dir@ 3.109 +install_sh = @install_sh@ 3.110 +sim_ac_doxygen_exe = @sim_ac_doxygen_exe@ 3.111 +sim_ac_perl_exe = @sim_ac_perl_exe@ 3.112 +sim_ac_simage_configcmd = @sim_ac_simage_configcmd@ 3.113 + 3.114 + 3.115 +SUBDIRS = ivcat ivhierarchy ivNodeKitStructure renderos 3.116 +subdir = tools 3.117 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 3.118 +CONFIG_HEADER = ../config.h ../include/Inventor/SbBasic.h 3.119 +CONFIG_CLEAN_FILES = 3.120 +DIST_SOURCES = 3.121 +DIST_COMMON = Makefile.am Makefile.in 3.122 + 3.123 + 3.124 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 3.125 + 3.126 +GZIP_ENV = --best 3.127 +all: all-redirect 3.128 +.SUFFIXES: 3.129 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 3.130 + cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile 3.131 + 3.132 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 3.133 + cd $(top_builddir) \ 3.134 + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 3.135 + 3.136 + 3.137 +# This directory's subdirectories are mostly independent; you can cd 3.138 +# into them and run `make' without going through this Makefile. 3.139 +# To change the values of `make' variables: instead of editing Makefiles, 3.140 +# (1) if the variable is set in `config.status', edit `config.status' 3.141 +# (which will cause the Makefiles to be regenerated when you run `make'); 3.142 +# (2) otherwise, pass the desired values on the `make' command line. 3.143 + 3.144 +all-recursive install-data-recursive install-exec-recursive \ 3.145 +installdirs-recursive install-recursive uninstall-recursive \ 3.146 +check-recursive installcheck-recursive info-recursive dvi-recursive: 3.147 + @set fnord $(MAKEFLAGS); amf=$$2; \ 3.148 + dot_seen=no; \ 3.149 + target=`echo $@ | sed s/-recursive//`; \ 3.150 + list='$(SUBDIRS)'; for subdir in $$list; do \ 3.151 + echo "Making $$target in $$subdir"; \ 3.152 + if test "$$subdir" = "."; then \ 3.153 + dot_seen=yes; \ 3.154 + local_target="$$target-am"; \ 3.155 + else \ 3.156 + local_target="$$target"; \ 3.157 + fi; \ 3.158 + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 3.159 + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 3.160 + done; \ 3.161 + if test "$$dot_seen" = "no"; then \ 3.162 + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ 3.163 + fi; test -z "$$fail" 3.164 + 3.165 +mostlyclean-recursive clean-recursive distclean-recursive \ 3.166 +maintainer-clean-recursive: 3.167 + @set fnord $(MAKEFLAGS); amf=$$2; \ 3.168 + dot_seen=no; \ 3.169 + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ 3.170 + if test "$$subdir" = "."; then :; else \ 3.171 + rev="$$subdir $$rev"; \ 3.172 + fi; \ 3.173 + done; \ 3.174 + rev="$$rev ."; \ 3.175 + target=`echo $@ | sed s/-recursive//`; \ 3.176 + for subdir in $$rev; do \ 3.177 + echo "Making $$target in $$subdir"; \ 3.178 + if test "$$subdir" = "."; then \ 3.179 + local_target="$$target-am"; \ 3.180 + else \ 3.181 + local_target="$$target"; \ 3.182 + fi; \ 3.183 + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 3.184 + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 3.185 + done && test -z "$$fail" 3.186 +tags-recursive: 3.187 + list='$(SUBDIRS)'; for subdir in $$list; do \ 3.188 + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ 3.189 + done 3.190 + 3.191 +tags: TAGS 3.192 + 3.193 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 3.194 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 3.195 + unique=`for i in $$list; do \ 3.196 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 3.197 + done | \ 3.198 + $(AWK) ' { files[$$0] = 1; } \ 3.199 + END { for (i in files) print i; }'`; \ 3.200 + mkid -fID $$unique $(LISP) 3.201 + 3.202 +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 3.203 + $(TAGS_FILES) $(LISP) 3.204 + tags=; \ 3.205 + here=`pwd`; \ 3.206 + list='$(SUBDIRS)'; for subdir in $$list; do \ 3.207 + if test "$$subdir" = .; then :; else \ 3.208 + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ 3.209 + fi; \ 3.210 + done; \ 3.211 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 3.212 + unique=`for i in $$list; do \ 3.213 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 3.214 + done | \ 3.215 + $(AWK) ' { files[$$0] = 1; } \ 3.216 + END { for (i in files) print i; }'`; \ 3.217 + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ 3.218 + || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) 3.219 + 3.220 +mostlyclean-tags: 3.221 + 3.222 +clean-tags: 3.223 + 3.224 +distclean-tags: 3.225 + -rm -f TAGS ID 3.226 + 3.227 +maintainer-clean-tags: 3.228 + 3.229 +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) 3.230 + 3.231 +distdir: $(DISTFILES) 3.232 + @for file in $(DISTFILES); do \ 3.233 + d=$(srcdir); \ 3.234 + if test -d $$d/$$file; then \ 3.235 + cp -pR $$d/$$file $(distdir) \ 3.236 + || exit 1; \ 3.237 + else \ 3.238 + test -f $(distdir)/$$file \ 3.239 + || cp -p $$d/$$file $(distdir)/$$file \ 3.240 + || exit 1; \ 3.241 + fi; \ 3.242 + done 3.243 + for subdir in $(SUBDIRS); do \ 3.244 + if test "$$subdir" = .; then :; else \ 3.245 + test -d $(distdir)/$$subdir \ 3.246 + || mkdir $(distdir)/$$subdir \ 3.247 + || exit 1; \ 3.248 + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ 3.249 + || exit 1; \ 3.250 + fi; \ 3.251 + done 3.252 +info-am: 3.253 +info: info-recursive 3.254 +dvi-am: 3.255 +dvi: dvi-recursive 3.256 +check-am: all-am 3.257 +check: check-recursive 3.258 +installcheck-am: 3.259 +installcheck: installcheck-recursive 3.260 +install-exec-am: 3.261 +install-exec: install-exec-recursive 3.262 + 3.263 +install-data-am: 3.264 +install-data: install-data-recursive 3.265 + 3.266 +install-am: all-am 3.267 + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 3.268 +install: install-recursive 3.269 +uninstall-am: 3.270 +uninstall: uninstall-recursive 3.271 +all-am: Makefile 3.272 +all-redirect: all-recursive 3.273 +install-strip: 3.274 + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install 3.275 +installdirs: installdirs-recursive 3.276 +installdirs-am: 3.277 + 3.278 + 3.279 +mostlyclean-generic: 3.280 + 3.281 +clean-generic: 3.282 + 3.283 +distclean-generic: 3.284 + -rm -f Makefile $(CONFIG_CLEAN_FILES) 3.285 + -rm -f config.cache config.log stamp-h stamp-h[0-9]* 3.286 + 3.287 +maintainer-clean-generic: 3.288 + -rm -f Makefile.in 3.289 +mostlyclean-am: mostlyclean-tags mostlyclean-generic 3.290 + 3.291 +mostlyclean: mostlyclean-recursive 3.292 + 3.293 +clean-am: clean-tags clean-generic mostlyclean-am 3.294 + 3.295 +clean: clean-recursive 3.296 + 3.297 +distclean-am: distclean-tags distclean-generic clean-am 3.298 + -rm -f libtool 3.299 + 3.300 +distclean: distclean-recursive 3.301 + 3.302 +maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ 3.303 + distclean-am 3.304 + @echo "This command is intended for maintainers to use;" 3.305 + @echo "it deletes files that may require special tools to rebuild." 3.306 + 3.307 +maintainer-clean: maintainer-clean-recursive 3.308 + 3.309 +.PHONY: install-recursive uninstall-recursive install-data-recursive \ 3.310 +uninstall-data-recursive install-exec-recursive \ 3.311 +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ 3.312 +all-recursive check-recursive installcheck-recursive info-recursive \ 3.313 +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ 3.314 +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ 3.315 +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ 3.316 +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ 3.317 +install-exec install-data-am install-data install-am install \ 3.318 +uninstall-am uninstall all-redirect all-am all install-strip \ 3.319 +installdirs-am installdirs mostlyclean-generic distclean-generic \ 3.320 +clean-generic maintainer-clean-generic clean mostlyclean distclean \ 3.321 +maintainer-clean 3.322 + 3.323 + 3.324 +# Tell versions [3.59,3.63) of GNU make to not export all variables. 3.325 +# Otherwise a system limit (for SysV at least) may be exceeded. 3.326 +.NOEXPORT:
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/bootstrap Fri Oct 06 09:57:09 2000 +0000 4.3 @@ -0,0 +1,96 @@ 4.4 +#!/bin/sh 4.5 + 4.6 +# Regenerate all files which are constructed by the autoconf and automake 4.7 +# tool-chain. Note: only developers should need to use this script. 4.8 + 4.9 +# Author: Morten Eriksen, <mortene@sim.no>. 4.10 + 4.11 +# Makes it possible to run this script from any location. 4.12 +directory=`echo "$0" | sed -e 's/[^\/]*$//g'`; 4.13 +cd $directory 4.14 +if ! test -f ./bootstrap; then 4.15 + echo "unexpected problem with your shell - bailing out" 4.16 + exit 1 4.17 +fi 4.18 + 4.19 + 4.20 +DIE=false 4.21 + 4.22 +PROJECT=IvTools 4.23 +MACRODIR=conf-macros 4.24 +AUTOMAKE_ADD= 4.25 + 4.26 +if test "$1" = "--clean"; then 4.27 + rm -f aclocal.m4 \ 4.28 + config.guess \ 4.29 + config.h.in \ 4.30 + config.sub \ 4.31 + configure \ 4.32 + depcomp \ 4.33 + install-sh \ 4.34 + missing \ 4.35 + mkinstalldirs \ 4.36 + stamp-h* 4.37 + find . -name Makefile.in -print | xargs rm -f 4.38 + exit 0 4.39 +elif test "$1" = "--add"; then 4.40 + AUTOMAKE_ADD="--add-missing --copy" 4.41 +fi 4.42 + 4.43 +# required autoduo tool versions 4.44 +AUTOCONF_VER=2.49b # CVS development version 4.45 +AUTOMAKE_VER=1.4a # CVS development version 4.46 + 4.47 +echo "Checking the installed configuration tools..." 4.48 + 4.49 +if test -z "`autoconf --version | grep \" $AUTOCONF_VER\" 2> /dev/null`"; then 4.50 + cat <<EOF 4.51 + 4.52 + Invalid Version of Autoconf 4.53 + --------------------------- 4.54 + You must use the CVS development version of autoconf ($AUTOCONF_VER) 4.55 + to generate configure information and Makefiles for $PROJECT. 4.56 + 4.57 + The CVS autoconf repository can be fetched by running the following 4.58 + set of commands: 4.59 + 4.60 + $ cvs -d :pserver:anoncvs@subversions.gnu.org:/cvs login # (no password) 4.61 + $ cvs -d :pserver:anoncvs@subversions.gnu.org:/cvs co autoconf 4.62 + 4.63 +EOF 4.64 + DIE=true 4.65 +fi 4.66 + 4.67 +if test -z "`automake --version | grep \" $AUTOMAKE_VER\" 2> /dev/null`"; then 4.68 + cat <<EOF 4.69 + 4.70 + Invalid Version of Automake 4.71 + --------------------------- 4.72 + You must use the CVS development version of automake to ($AUTOMAKE_VER) 4.73 + to generate configure information and Makefiles for $PROJECT. 4.74 + 4.75 + The CVS automake repository can be fetched by running the following 4.76 + set of commands: 4.77 + 4.78 + $ cvs -d :pserver:anoncvs@anoncvs.cygnus.com:/cvs/automake login 4.79 + $ cvs -d :pserver:anoncvs@anoncvs.cygnus.com:/cvs/automake co automake 4.80 + 4.81 +EOF 4.82 + DIE=true 4.83 +fi 4.84 + 4.85 +$DIE && exit 1 4.86 + 4.87 +echo "Running aclocal (generating aclocal.m4)..." 4.88 +aclocal -I $MACRODIR 4.89 + 4.90 +echo "Running autoheader (generating config.h.in)..." 4.91 +autoheader 4.92 + 4.93 +echo "Running automake (generating the Makefile.in files)..." 4.94 +automake --foreign $AUTOMAKE_ADD 4.95 + 4.96 +echo "Running autoconf (generating the configure script)..." 4.97 +autoconf 4.98 + 4.99 +echo "Done."
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/configure.in Fri Oct 06 09:57:09 2000 +0000 5.3 @@ -0,0 +1,44 @@ 5.4 +# This can be any file in the package. 5.5 +AC_INIT(ivcat/ivcat.cpp) 5.6 + 5.7 +# Locate C++ compiler and set C++ as the default language to use 5.8 +# in tests. The configure script will automatically terminate if 5.9 +# it doesn't find a C++ compiler. 5.10 +AC_PROG_CXX 5.11 +AC_LANG_CPLUSPLUS 5.12 + 5.13 +AM_INIT_AUTOMAKE(IvTools, 0.9) 5.14 + 5.15 +# Files to cram results from the configure tests into. 5.16 +AM_CONFIG_HEADER(config.h) 5.17 + 5.18 +# Turn off default maintainer make-rules -- use ./bootstrap instead. 5.19 +AM_MAINTAINER_MODE 5.20 + 5.21 +if test x"$with_inventor" = xyes; then 5.22 + # If we want to compile and link against Inventor, we 5.23 + # need to check for a shitload of libraries. 5.24 + 5.25 + SIM_AC_CHECK_MATHLIB 5.26 + SIM_AC_CHECK_DL 5.27 + 5.28 + SIM_AC_CHECK_OPENGL( , AC_MSG_ERROR(needs an OpenGL-compatible development system installation)) 5.29 + SIM_AC_CHECK_GLU( , AC_MSG_ERROR(needs the OpenGL utility library)) 5.30 + SIM_CHECK_INVENTOR( , AC_MSG_ERROR(couldn't compile and link against Open Inventor)) 5.31 + 5.32 +else 5.33 + 5.34 + # Compile and link on top of Coin. 5.35 + SIM_AC_HAVE_COIN_IFELSE(, AC_MSG_ERROR(Couldn't build against Coin library)) 5.36 + CPPFLAGS="$CPPFLAGS $sim_ac_soxt_cppflags" 5.37 + LDFLAGS="$CPPFLAGS $sim_ac_soxt_ldflags" 5.38 + LIBS="$CPPFLAGS $sim_ac_soxt_libs" 5.39 +fi 5.40 + 5.41 +AC_OUTPUT([ 5.42 + Makefile 5.43 + ivNodeKitStructure/Makefile 5.44 + ivcat/Makefile 5.45 + ivhierarchy/Makefile 5.46 + renderos/Makefile 5.47 + ])
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/ivNodeKitStructure/.cvsignore Fri Oct 06 09:57:09 2000 +0000 6.3 @@ -0,0 +1,6 @@ 6.4 +.deps 6.5 +.libs 6.6 +Makefile 6.7 +ivNodeKitStructure 6.8 +ivNodeKitStructure.o 6.9 +ii_files
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/ivNodeKitStructure/Makefile.am Fri Oct 06 09:57:09 2000 +0000 7.3 @@ -0,0 +1,6 @@ 7.4 +## Process this file with automake to generate Makefile.in. 7.5 + 7.6 +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 7.7 +bin_PROGRAMS = ivNodeKitStructure 7.8 +ivNodeKitStructure_SOURCES = ivNodeKitStructure.cpp 7.9 +ivNodeKitStructure_LDADD = $(top_builddir)/src/libCoin.la @COIN_HACKING_LIBDIRS@ @COIN_EXTRA_LIBS@
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/ivNodeKitStructure/Makefile.in Fri Oct 06 09:57:09 2000 +0000 8.3 @@ -0,0 +1,368 @@ 8.4 +# Makefile.in generated automatically by automake 1.4a from Makefile.am 8.5 + 8.6 +# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc. 8.7 +# This Makefile.in is free software; the Free Software Foundation 8.8 +# gives unlimited permission to copy and/or distribute it, 8.9 +# with or without modifications, as long as this notice is preserved. 8.10 + 8.11 +# This program is distributed in the hope that it will be useful, 8.12 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 8.13 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 8.14 +# PARTICULAR PURPOSE. 8.15 + 8.16 +SHELL = @SHELL@ 8.17 + 8.18 +srcdir = @srcdir@ 8.19 +top_srcdir = @top_srcdir@ 8.20 +VPATH = @srcdir@ 8.21 +prefix = @prefix@ 8.22 +exec_prefix = @exec_prefix@ 8.23 + 8.24 +bindir = @bindir@ 8.25 +sbindir = @sbindir@ 8.26 +libexecdir = @libexecdir@ 8.27 +datadir = @datadir@ 8.28 +sysconfdir = @sysconfdir@ 8.29 +sharedstatedir = @sharedstatedir@ 8.30 +localstatedir = @localstatedir@ 8.31 +libdir = @libdir@ 8.32 +infodir = @infodir@ 8.33 +mandir = @mandir@ 8.34 +includedir = @includedir@ 8.35 +oldincludedir = /usr/include 8.36 + 8.37 +pkgdatadir = $(datadir)/@PACKAGE@ 8.38 +pkglibdir = $(libdir)/@PACKAGE@ 8.39 +pkgincludedir = $(includedir)/@PACKAGE@ 8.40 + 8.41 +top_builddir = ../.. 8.42 + 8.43 +ACLOCAL = @ACLOCAL@ 8.44 +AUTOCONF = @AUTOCONF@ 8.45 +AUTOMAKE = @AUTOMAKE@ 8.46 +AUTOHEADER = @AUTOHEADER@ 8.47 + 8.48 +INSTALL = @INSTALL@ 8.49 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ 8.50 +INSTALL_DATA = @INSTALL_DATA@ 8.51 +INSTALL_SCRIPT = @INSTALL_SCRIPT@ 8.52 +INSTALL_STRIP_FLAG = 8.53 +transform = @program_transform_name@ 8.54 + 8.55 +NORMAL_INSTALL = : 8.56 +PRE_INSTALL = : 8.57 +POST_INSTALL = : 8.58 +NORMAL_UNINSTALL = : 8.59 +PRE_UNINSTALL = : 8.60 +POST_UNINSTALL = : 8.61 + 8.62 +@SET_MAKE@ 8.63 +build_alias = @build_alias@ 8.64 +build_triplet = @build@ 8.65 +host_alias = @host_alias@ 8.66 +host_triplet = @host@ 8.67 +target_alias = @target_alias@ 8.68 +target_triplet = @target@ 8.69 +AMDEP = @AMDEP@ 8.70 +AMTAR = @AMTAR@ 8.71 +AS = @AS@ 8.72 +AWK = @AWK@ 8.73 +CC = @CC@ 8.74 +COIN_BINARY_AGE = @COIN_BINARY_AGE@ 8.75 +COIN_DOC_HTML = @COIN_DOC_HTML@ 8.76 +COIN_DOC_MAN = @COIN_DOC_MAN@ 8.77 +COIN_EXTRA_CPPFLAGS = @COIN_EXTRA_CPPFLAGS@ 8.78 +COIN_EXTRA_LDFLAGS = @COIN_EXTRA_LDFLAGS@ 8.79 +COIN_EXTRA_LIBS = @COIN_EXTRA_LIBS@ 8.80 +COIN_HACKING_LIBDIRS = @COIN_HACKING_LIBDIRS@ 8.81 +COIN_INTERFACE_AGE = @COIN_INTERFACE_AGE@ 8.82 +COIN_LIBNAME = @COIN_LIBNAME@ 8.83 +COIN_MAJOR_VERSION = @COIN_MAJOR_VERSION@ 8.84 +COIN_MICRO_VERSION = @COIN_MICRO_VERSION@ 8.85 +COIN_MINOR_VERSION = @COIN_MINOR_VERSION@ 8.86 +COIN_VERSION = @COIN_VERSION@ 8.87 +CPP = @CPP@ 8.88 +CXX = @CXX@ 8.89 +CXXCPP = @CXXCPP@ 8.90 +DEPDIR = @DEPDIR@ 8.91 +DLLTOOL = @DLLTOOL@ 8.92 +LIBTOOL = @LIBTOOL@ 8.93 +LN_S = @LN_S@ 8.94 +LT_AGE = @LT_AGE@ 8.95 +LT_CURRENT = @LT_CURRENT@ 8.96 +LT_RELEASE = @LT_RELEASE@ 8.97 +LT_REVISION = @LT_REVISION@ 8.98 +MAINT = @MAINT@ 8.99 +MAKEINFO = @MAKEINFO@ 8.100 +OBJDUMP = @OBJDUMP@ 8.101 +PACKAGE = @PACKAGE@ 8.102 +RANLIB = @RANLIB@ 8.103 +VERSION = @VERSION@ 8.104 +coin_build_dir = @coin_build_dir@ 8.105 +coin_configure_date = @coin_configure_date@ 8.106 +coin_include_dir = @coin_include_dir@ 8.107 +coin_lib_dir = @coin_lib_dir@ 8.108 +coin_src_dir = @coin_src_dir@ 8.109 +install_sh = @install_sh@ 8.110 +sim_ac_doxygen_exe = @sim_ac_doxygen_exe@ 8.111 +sim_ac_perl_exe = @sim_ac_perl_exe@ 8.112 +sim_ac_simage_configcmd = @sim_ac_simage_configcmd@ 8.113 + 8.114 + 8.115 +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 8.116 +bin_PROGRAMS = ivNodeKitStructure 8.117 +ivNodeKitStructure_SOURCES = ivNodeKitStructure.cpp 8.118 +ivNodeKitStructure_LDADD = $(top_builddir)/src/libCoin.la @COIN_HACKING_LIBDIRS@ @COIN_EXTRA_LIBS@ 8.119 +subdir = tools/ivNodeKitStructure 8.120 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 8.121 +CONFIG_HEADER = ../../config.h ../../include/Inventor/SbBasic.h 8.122 +CONFIG_CLEAN_FILES = 8.123 +PROGRAMS = $(bin_PROGRAMS) 8.124 + 8.125 + 8.126 +DEFS = @DEFS@ -I. -I$(srcdir) -I../.. -I../../include/Inventor 8.127 +CPPFLAGS = @CPPFLAGS@ 8.128 +LDFLAGS = @LDFLAGS@ 8.129 +LIBS = @LIBS@ 8.130 +X_CFLAGS = @X_CFLAGS@ 8.131 +X_LIBS = @X_LIBS@ 8.132 +X_EXTRA_LIBS = @X_EXTRA_LIBS@ 8.133 +X_PRE_LIBS = @X_PRE_LIBS@ 8.134 +am_ivNodeKitStructure_OBJECTS = ivNodeKitStructure.o 8.135 +ivNodeKitStructure_OBJECTS = $(am_ivNodeKitStructure_OBJECTS) 8.136 +ivNodeKitStructure_DEPENDENCIES = $(top_builddir)/src/libCoin.la 8.137 +ivNodeKitStructure_LDFLAGS = 8.138 +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 8.139 +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 8.140 +CXXFLAGS = @CXXFLAGS@ 8.141 +CXXLD = $(CXX) 8.142 +CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 8.143 +DIST_SOURCES = $(ivNodeKitStructure_SOURCES) 8.144 +depcomp = $(SHELL) $(top_srcdir)/depcomp 8.145 +DEP_FILES = @AMDEP@ $(DEPDIR)/ivNodeKitStructure.Po 8.146 +DIST_COMMON = Makefile.am Makefile.in 8.147 + 8.148 + 8.149 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 8.150 + 8.151 +GZIP_ENV = --best 8.152 +SOURCES = $(ivNodeKitStructure_SOURCES) 8.153 +OBJECTS = $(am_ivNodeKitStructure_OBJECTS) 8.154 + 8.155 +all: all-redirect 8.156 +.SUFFIXES: 8.157 +.SUFFIXES: .c .cpp .lo .o 8.158 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 8.159 + cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/ivNodeKitStructure/Makefile 8.160 + 8.161 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 8.162 + cd $(top_builddir) \ 8.163 + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 8.164 + 8.165 + 8.166 +mostlyclean-binPROGRAMS: 8.167 + 8.168 +clean-binPROGRAMS: 8.169 + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 8.170 + 8.171 +distclean-binPROGRAMS: 8.172 + 8.173 +maintainer-clean-binPROGRAMS: 8.174 + 8.175 +install-binPROGRAMS: $(bin_PROGRAMS) 8.176 + @$(NORMAL_INSTALL) 8.177 + $(mkinstalldirs) $(DESTDIR)$(bindir) 8.178 + @list='$(bin_PROGRAMS)'; for p in $$list; do \ 8.179 + if test -f $$p; then \ 8.180 + f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ 8.181 + echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f"; \ 8.182 + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \ 8.183 + else :; fi; \ 8.184 + done 8.185 + 8.186 +uninstall-binPROGRAMS: 8.187 + @$(NORMAL_UNINSTALL) 8.188 + @list='$(bin_PROGRAMS)'; for p in $$list; do \ 8.189 + f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ 8.190 + echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ 8.191 + rm -f $(DESTDIR)$(bindir)/$$f; \ 8.192 + done 8.193 + 8.194 +mostlyclean-compile: 8.195 + -rm -f *.o core *.core 8.196 + 8.197 +clean-compile: 8.198 + 8.199 +distclean-compile: 8.200 + -rm -f *.tab.c 8.201 + 8.202 +maintainer-clean-compile: 8.203 + 8.204 +mostlyclean-libtool: 8.205 + -rm -f *.lo 8.206 + 8.207 +clean-libtool: 8.208 + -rm -rf .libs _libs 8.209 + 8.210 +distclean-libtool: 8.211 + 8.212 +maintainer-clean-libtool: 8.213 + 8.214 +ivNodeKitStructure: $(ivNodeKitStructure_OBJECTS) $(ivNodeKitStructure_DEPENDENCIES) 8.215 + @rm -f ivNodeKitStructure 8.216 + $(CXXLINK) $(ivNodeKitStructure_LDFLAGS) $(ivNodeKitStructure_OBJECTS) $(ivNodeKitStructure_LDADD) $(LIBS) 8.217 + 8.218 +tags: TAGS 8.219 + 8.220 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 8.221 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 8.222 + unique=`for i in $$list; do \ 8.223 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 8.224 + done | \ 8.225 + $(AWK) ' { files[$$0] = 1; } \ 8.226 + END { for (i in files) print i; }'`; \ 8.227 + mkid -fID $$unique $(LISP) 8.228 + 8.229 +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 8.230 + $(TAGS_FILES) $(LISP) 8.231 + tags=; \ 8.232 + here=`pwd`; \ 8.233 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 8.234 + unique=`for i in $$list; do \ 8.235 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 8.236 + done | \ 8.237 + $(AWK) ' { files[$$0] = 1; } \ 8.238 + END { for (i in files) print i; }'`; \ 8.239 + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ 8.240 + || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) 8.241 + 8.242 +mostlyclean-tags: 8.243 + 8.244 +clean-tags: 8.245 + 8.246 +distclean-tags: 8.247 + -rm -f TAGS ID 8.248 + 8.249 +maintainer-clean-tags: 8.250 + 8.251 +@AMDEP@include $(DEPDIR)/ivNodeKitStructure.Po 8.252 + 8.253 +mostlyclean-depend: 8.254 + 8.255 +clean-depend: 8.256 + 8.257 +distclean-depend: 8.258 + -rm -rf $(DEPDIR) 8.259 + 8.260 +maintainer-clean-depend: 8.261 + 8.262 +@AMDEP@CXXDEPMODE = @CXXDEPMODE@ 8.263 + 8.264 +.cpp.o: 8.265 +@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 8.266 +@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ 8.267 +@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 8.268 + $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< 8.269 + 8.270 +.cpp.lo: 8.271 +@AMDEP@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 8.272 +@AMDEP@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ 8.273 +@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 8.274 + $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< 8.275 + 8.276 + 8.277 +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) 8.278 + 8.279 +distdir: $(DISTFILES) 8.280 + @for file in $(DISTFILES); do \ 8.281 + d=$(srcdir); \ 8.282 + if test -d $$d/$$file; then \ 8.283 + cp -pR $$d/$$file $(distdir) \ 8.284 + || exit 1; \ 8.285 + else \ 8.286 + test -f $(distdir)/$$file \ 8.287 + || cp -p $$d/$$file $(distdir)/$$file \ 8.288 + || exit 1; \ 8.289 + fi; \ 8.290 + done 8.291 +info-am: 8.292 +info: info-am 8.293 +dvi-am: 8.294 +dvi: dvi-am 8.295 +check-am: all-am 8.296 +check: check-am 8.297 +installcheck-am: 8.298 +installcheck: installcheck-am 8.299 +install-exec-am: install-binPROGRAMS 8.300 +install-exec: install-exec-am 8.301 + 8.302 +install-data-am: 8.303 +install-data: install-data-am 8.304 + 8.305 +install-am: all-am 8.306 + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 8.307 +install: install-am 8.308 +uninstall-am: uninstall-binPROGRAMS 8.309 +uninstall: uninstall-am 8.310 +all-am: Makefile $(PROGRAMS) 8.311 +all-redirect: all-am 8.312 +install-strip: 8.313 + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install 8.314 +installdirs: 8.315 + $(mkinstalldirs) $(DESTDIR)$(bindir) 8.316 + 8.317 + 8.318 +mostlyclean-generic: 8.319 + 8.320 +clean-generic: 8.321 + 8.322 +distclean-generic: 8.323 + -rm -f Makefile $(CONFIG_CLEAN_FILES) 8.324 + -rm -f config.cache config.log stamp-h stamp-h[0-9]* 8.325 + 8.326 +maintainer-clean-generic: 8.327 + -rm -f Makefile.in 8.328 +mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ 8.329 + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ 8.330 + mostlyclean-generic 8.331 + 8.332 +mostlyclean: mostlyclean-am 8.333 + 8.334 +clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \ 8.335 + clean-depend clean-generic mostlyclean-am 8.336 + 8.337 +clean: clean-am 8.338 + 8.339 +distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \ 8.340 + distclean-tags distclean-depend distclean-generic \ 8.341 + clean-am 8.342 + -rm -f libtool 8.343 + 8.344 +distclean: distclean-am 8.345 + 8.346 +maintainer-clean-am: maintainer-clean-binPROGRAMS \ 8.347 + maintainer-clean-compile maintainer-clean-libtool \ 8.348 + maintainer-clean-tags maintainer-clean-depend \ 8.349 + maintainer-clean-generic distclean-am 8.350 + @echo "This command is intended for maintainers to use;" 8.351 + @echo "it deletes files that may require special tools to rebuild." 8.352 + 8.353 +maintainer-clean: maintainer-clean-am 8.354 + 8.355 +.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ 8.356 +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ 8.357 +mostlyclean-compile distclean-compile clean-compile \ 8.358 +maintainer-clean-compile mostlyclean-libtool distclean-libtool \ 8.359 +clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ 8.360 +distclean-tags clean-tags maintainer-clean-tags mostlyclean-depend \ 8.361 +distclean-depend clean-depend maintainer-clean-depend distdir info-am \ 8.362 +info dvi-am dvi check check-am installcheck-am installcheck \ 8.363 +install-exec-am install-exec install-data-am install-data install-am \ 8.364 +install uninstall-am uninstall all-redirect all-am all install-strip \ 8.365 +installdirs mostlyclean-generic distclean-generic clean-generic \ 8.366 +maintainer-clean-generic clean mostlyclean distclean maintainer-clean 8.367 + 8.368 + 8.369 +# Tell versions [3.59,3.63) of GNU make to not export all variables. 8.370 +# Otherwise a system limit (for SysV at least) may be exceeded. 8.371 +.NOEXPORT:
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/ivNodeKitStructure/ivNodeKitStructure.cpp Fri Oct 06 09:57:09 2000 +0000 9.3 @@ -0,0 +1,99 @@ 9.4 +/**************************************************************************\ 9.5 + * 9.6 + * This file is part of the Coin 3D visualization library. 9.7 + * Copyright (C) 1998-2000 by Systems in Motion. All rights reserved. 9.8 + * 9.9 + * This library is free software; you can redistribute it and/or 9.10 + * modify it under the terms of the GNU Lesser General Public License 9.11 + * version 2.1 as published by the Free Software Foundation. See the 9.12 + * file LICENSE.LGPL at the root directory of the distribution for 9.13 + * more details. 9.14 + * 9.15 + * If you want to use Coin for applications not compatible with the 9.16 + * LGPL, please contact SIM to acquire a Professional Edition license. 9.17 + * 9.18 + * Systems in Motion, Prof Brochs gate 6, 7030 Trondheim, NORWAY 9.19 + * http://www.sim.no support@sim.no Voice: +47 22114160 Fax: +47 22207097 9.20 + * 9.21 +\**************************************************************************/ 9.22 + 9.23 +#include <Inventor/SoDB.h> 9.24 +#include <Inventor/nodekits/SoNodeKit.h> 9.25 +#include <Inventor/SoInteraction.h> 9.26 +#include <Inventor/nodekits/SoBaseKit.h> 9.27 +#include <stdio.h> 9.28 + 9.29 +// FIXME: do a proper check for this through configure. 9.30 +// 19991206 mortene. 9.31 +#ifndef _WIN32 9.32 +#define HAVE_GETOPT 1 9.33 +#endif // !_WIN32 9.34 + 9.35 +#if HAVE_GETOPT 9.36 +#include <unistd.h> 9.37 +/* These two externs are for interfacing against getopt(). */ 9.38 +extern int optind; 9.39 +extern char * optarg; 9.40 +#endif // HAVE_GETOPT 9.41 + 9.42 + 9.43 +void 9.44 +usage(const char * invname) 9.45 +{ 9.46 +#if HAVE_GETOPT 9.47 + fprintf(stderr, "\nUsage: %s [-h] <kitclassname>\n\n", invname); 9.48 + fprintf(stderr, "\t-h:\tshow usage\n\n"); 9.49 +#else // !HAVE_GETOPT 9.50 + fprintf(stderr, "\nUsage: %s <kitclassname>\n\n", invname); 9.51 +#endif // !HAVE_GETOPT 9.52 +} 9.53 + 9.54 +int 9.55 +main(int argc, char ** argv) 9.56 +{ 9.57 +#if HAVE_GETOPT 9.58 + /* Parse command line. */ 9.59 + int getoptchar; 9.60 + while ((getoptchar = getopt(argc, argv, "h")) != EOF) { 9.61 + char c = (char)getoptchar; 9.62 + switch (c) { 9.63 + case '?': 9.64 + case 'h': 9.65 + usage(argv[0]); 9.66 + exit(0); 9.67 + break; 9.68 + } 9.69 + } 9.70 + 9.71 + int i = optind; 9.72 +#else // !HAVE_GETOPT 9.73 + int i = 1; 9.74 +#endif // !HAVE_GETOPT 9.75 + 9.76 + if ((argc - i) != 1) { 9.77 + usage(argv[0]); 9.78 + exit(1); 9.79 + } 9.80 + 9.81 + SoDB::init(); 9.82 + SoNodeKit::init(); 9.83 + SoInteraction::init(); 9.84 + 9.85 + SoType kittype = SoType::fromName(argv[i]); 9.86 + if (kittype == SoType::badType()) { 9.87 + fprintf(stderr, "ERROR: unknown class type ``%s''.\n", argv[i]); 9.88 + exit(1); 9.89 + } 9.90 + else if (!kittype.isDerivedFrom(SoBaseKit::getClassTypeId())) { 9.91 + fprintf(stderr, "ERROR: type ``%s'' is not a nodekit.\n", argv[i]); 9.92 + exit(1); 9.93 + } 9.94 + 9.95 + SoBaseKit * bk = (SoBaseKit *)kittype.createInstance(); 9.96 + 9.97 + bk->printDiagram(); 9.98 + fprintf(stdout, "\n\n"); 9.99 + bk->printTable(); 9.100 + 9.101 + return 0; 9.102 +}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/ivcat/.cvsignore Fri Oct 06 09:57:09 2000 +0000 10.3 @@ -0,0 +1,5 @@ 10.4 +Makefile 10.5 +.deps 10.6 +.libs 10.7 +ivcat 10.8 +ii_files
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/ivcat/Makefile.am Fri Oct 06 09:57:09 2000 +0000 11.3 @@ -0,0 +1,6 @@ 11.4 +## Process this file with automake to generate Makefile.in. 11.5 + 11.6 +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 11.7 +bin_PROGRAMS = ivcat 11.8 +ivcat_SOURCES = ivcat.cpp 11.9 +ivcat_LDADD = $(top_builddir)/src/libCoin.la @COIN_HACKING_LIBDIRS@ @COIN_EXTRA_LIBS@
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/ivcat/Makefile.in Fri Oct 06 09:57:09 2000 +0000 12.3 @@ -0,0 +1,368 @@ 12.4 +# Makefile.in generated automatically by automake 1.4a from Makefile.am 12.5 + 12.6 +# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc. 12.7 +# This Makefile.in is free software; the Free Software Foundation 12.8 +# gives unlimited permission to copy and/or distribute it, 12.9 +# with or without modifications, as long as this notice is preserved. 12.10 + 12.11 +# This program is distributed in the hope that it will be useful, 12.12 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12.13 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12.14 +# PARTICULAR PURPOSE. 12.15 + 12.16 +SHELL = @SHELL@ 12.17 + 12.18 +srcdir = @srcdir@ 12.19 +top_srcdir = @top_srcdir@ 12.20 +VPATH = @srcdir@ 12.21 +prefix = @prefix@ 12.22 +exec_prefix = @exec_prefix@ 12.23 + 12.24 +bindir = @bindir@ 12.25 +sbindir = @sbindir@ 12.26 +libexecdir = @libexecdir@ 12.27 +datadir = @datadir@ 12.28 +sysconfdir = @sysconfdir@ 12.29 +sharedstatedir = @sharedstatedir@ 12.30 +localstatedir = @localstatedir@ 12.31 +libdir = @libdir@ 12.32 +infodir = @infodir@ 12.33 +mandir = @mandir@ 12.34 +includedir = @includedir@ 12.35 +oldincludedir = /usr/include 12.36 + 12.37 +pkgdatadir = $(datadir)/@PACKAGE@ 12.38 +pkglibdir = $(libdir)/@PACKAGE@ 12.39 +pkgincludedir = $(includedir)/@PACKAGE@ 12.40 + 12.41 +top_builddir = ../.. 12.42 + 12.43 +ACLOCAL = @ACLOCAL@ 12.44 +AUTOCONF = @AUTOCONF@ 12.45 +AUTOMAKE = @AUTOMAKE@ 12.46 +AUTOHEADER = @AUTOHEADER@ 12.47 + 12.48 +INSTALL = @INSTALL@ 12.49 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ 12.50 +INSTALL_DATA = @INSTALL_DATA@ 12.51 +INSTALL_SCRIPT = @INSTALL_SCRIPT@ 12.52 +INSTALL_STRIP_FLAG = 12.53 +transform = @program_transform_name@ 12.54 + 12.55 +NORMAL_INSTALL = : 12.56 +PRE_INSTALL = : 12.57 +POST_INSTALL = : 12.58 +NORMAL_UNINSTALL = : 12.59 +PRE_UNINSTALL = : 12.60 +POST_UNINSTALL = : 12.61 + 12.62 +@SET_MAKE@ 12.63 +build_alias = @build_alias@ 12.64 +build_triplet = @build@ 12.65 +host_alias = @host_alias@ 12.66 +host_triplet = @host@ 12.67 +target_alias = @target_alias@ 12.68 +target_triplet = @target@ 12.69 +AMDEP = @AMDEP@ 12.70 +AMTAR = @AMTAR@ 12.71 +AS = @AS@ 12.72 +AWK = @AWK@ 12.73 +CC = @CC@ 12.74 +COIN_BINARY_AGE = @COIN_BINARY_AGE@ 12.75 +COIN_DOC_HTML = @COIN_DOC_HTML@ 12.76 +COIN_DOC_MAN = @COIN_DOC_MAN@ 12.77 +COIN_EXTRA_CPPFLAGS = @COIN_EXTRA_CPPFLAGS@ 12.78 +COIN_EXTRA_LDFLAGS = @COIN_EXTRA_LDFLAGS@ 12.79 +COIN_EXTRA_LIBS = @COIN_EXTRA_LIBS@ 12.80 +COIN_HACKING_LIBDIRS = @COIN_HACKING_LIBDIRS@ 12.81 +COIN_INTERFACE_AGE = @COIN_INTERFACE_AGE@ 12.82 +COIN_LIBNAME = @COIN_LIBNAME@ 12.83 +COIN_MAJOR_VERSION = @COIN_MAJOR_VERSION@ 12.84 +COIN_MICRO_VERSION = @COIN_MICRO_VERSION@ 12.85 +COIN_MINOR_VERSION = @COIN_MINOR_VERSION@ 12.86 +COIN_VERSION = @COIN_VERSION@ 12.87 +CPP = @CPP@ 12.88 +CXX = @CXX@ 12.89 +CXXCPP = @CXXCPP@ 12.90 +DEPDIR = @DEPDIR@ 12.91 +DLLTOOL = @DLLTOOL@ 12.92 +LIBTOOL = @LIBTOOL@ 12.93 +LN_S = @LN_S@ 12.94 +LT_AGE = @LT_AGE@ 12.95 +LT_CURRENT = @LT_CURRENT@ 12.96 +LT_RELEASE = @LT_RELEASE@ 12.97 +LT_REVISION = @LT_REVISION@ 12.98 +MAINT = @MAINT@ 12.99 +MAKEINFO = @MAKEINFO@ 12.100 +OBJDUMP = @OBJDUMP@ 12.101 +PACKAGE = @PACKAGE@ 12.102 +RANLIB = @RANLIB@ 12.103 +VERSION = @VERSION@ 12.104 +coin_build_dir = @coin_build_dir@ 12.105 +coin_configure_date = @coin_configure_date@ 12.106 +coin_include_dir = @coin_include_dir@ 12.107 +coin_lib_dir = @coin_lib_dir@ 12.108 +coin_src_dir = @coin_src_dir@ 12.109 +install_sh = @install_sh@ 12.110 +sim_ac_doxygen_exe = @sim_ac_doxygen_exe@ 12.111 +sim_ac_perl_exe = @sim_ac_perl_exe@ 12.112 +sim_ac_simage_configcmd = @sim_ac_simage_configcmd@ 12.113 + 12.114 + 12.115 +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 12.116 +bin_PROGRAMS = ivcat 12.117 +ivcat_SOURCES = ivcat.cpp 12.118 +ivcat_LDADD = $(top_builddir)/src/libCoin.la @COIN_HACKING_LIBDIRS@ @COIN_EXTRA_LIBS@ 12.119 +subdir = tools/ivcat 12.120 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 12.121 +CONFIG_HEADER = ../../config.h ../../include/Inventor/SbBasic.h 12.122 +CONFIG_CLEAN_FILES = 12.123 +PROGRAMS = $(bin_PROGRAMS) 12.124 + 12.125 + 12.126 +DEFS = @DEFS@ -I. -I$(srcdir) -I../.. -I../../include/Inventor 12.127 +CPPFLAGS = @CPPFLAGS@ 12.128 +LDFLAGS = @LDFLAGS@ 12.129 +LIBS = @LIBS@ 12.130 +X_CFLAGS = @X_CFLAGS@ 12.131 +X_LIBS = @X_LIBS@ 12.132 +X_EXTRA_LIBS = @X_EXTRA_LIBS@ 12.133 +X_PRE_LIBS = @X_PRE_LIBS@ 12.134 +am_ivcat_OBJECTS = ivcat.o 12.135 +ivcat_OBJECTS = $(am_ivcat_OBJECTS) 12.136 +ivcat_DEPENDENCIES = $(top_builddir)/src/libCoin.la 12.137 +ivcat_LDFLAGS = 12.138 +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 12.139 +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 12.140 +CXXFLAGS = @CXXFLAGS@ 12.141 +CXXLD = $(CXX) 12.142 +CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 12.143 +DIST_SOURCES = $(ivcat_SOURCES) 12.144 +depcomp = $(SHELL) $(top_srcdir)/depcomp 12.145 +DEP_FILES = @AMDEP@ $(DEPDIR)/ivcat.Po 12.146 +DIST_COMMON = Makefile.am Makefile.in 12.147 + 12.148 + 12.149 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 12.150 + 12.151 +GZIP_ENV = --best 12.152 +SOURCES = $(ivcat_SOURCES) 12.153 +OBJECTS = $(am_ivcat_OBJECTS) 12.154 + 12.155 +all: all-redirect 12.156 +.SUFFIXES: 12.157 +.SUFFIXES: .c .cpp .lo .o 12.158 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 12.159 + cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/ivcat/Makefile 12.160 + 12.161 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 12.162 + cd $(top_builddir) \ 12.163 + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 12.164 + 12.165 + 12.166 +mostlyclean-binPROGRAMS: 12.167 + 12.168 +clean-binPROGRAMS: 12.169 + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 12.170 + 12.171 +distclean-binPROGRAMS: 12.172 + 12.173 +maintainer-clean-binPROGRAMS: 12.174 + 12.175 +install-binPROGRAMS: $(bin_PROGRAMS) 12.176 + @$(NORMAL_INSTALL) 12.177 + $(mkinstalldirs) $(DESTDIR)$(bindir) 12.178 + @list='$(bin_PROGRAMS)'; for p in $$list; do \ 12.179 + if test -f $$p; then \ 12.180 + f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ 12.181 + echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f"; \ 12.182 + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \ 12.183 + else :; fi; \ 12.184 + done 12.185 + 12.186 +uninstall-binPROGRAMS: 12.187 + @$(NORMAL_UNINSTALL) 12.188 + @list='$(bin_PROGRAMS)'; for p in $$list; do \ 12.189 + f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ 12.190 + echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ 12.191 + rm -f $(DESTDIR)$(bindir)/$$f; \ 12.192 + done 12.193 + 12.194 +mostlyclean-compile: 12.195 + -rm -f *.o core *.core 12.196 + 12.197 +clean-compile: 12.198 + 12.199 +distclean-compile: 12.200 + -rm -f *.tab.c 12.201 + 12.202 +maintainer-clean-compile: 12.203 + 12.204 +mostlyclean-libtool: 12.205 + -rm -f *.lo 12.206 + 12.207 +clean-libtool: 12.208 + -rm -rf .libs _libs 12.209 + 12.210 +distclean-libtool: 12.211 + 12.212 +maintainer-clean-libtool: 12.213 + 12.214 +ivcat: $(ivcat_OBJECTS) $(ivcat_DEPENDENCIES) 12.215 + @rm -f ivcat 12.216 + $(CXXLINK) $(ivcat_LDFLAGS) $(ivcat_OBJECTS) $(ivcat_LDADD) $(LIBS) 12.217 + 12.218 +tags: TAGS 12.219 + 12.220 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 12.221 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 12.222 + unique=`for i in $$list; do \ 12.223 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 12.224 + done | \ 12.225 + $(AWK) ' { files[$$0] = 1; } \ 12.226 + END { for (i in files) print i; }'`; \ 12.227 + mkid -fID $$unique $(LISP) 12.228 + 12.229 +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 12.230 + $(TAGS_FILES) $(LISP) 12.231 + tags=; \ 12.232 + here=`pwd`; \ 12.233 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 12.234 + unique=`for i in $$list; do \ 12.235 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 12.236 + done | \ 12.237 + $(AWK) ' { files[$$0] = 1; } \ 12.238 + END { for (i in files) print i; }'`; \ 12.239 + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ 12.240 + || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) 12.241 + 12.242 +mostlyclean-tags: 12.243 + 12.244 +clean-tags: 12.245 + 12.246 +distclean-tags: 12.247 + -rm -f TAGS ID 12.248 + 12.249 +maintainer-clean-tags: 12.250 + 12.251 +@AMDEP@include $(DEPDIR)/ivcat.Po 12.252 + 12.253 +mostlyclean-depend: 12.254 + 12.255 +clean-depend: 12.256 + 12.257 +distclean-depend: 12.258 + -rm -rf $(DEPDIR) 12.259 + 12.260 +maintainer-clean-depend: 12.261 + 12.262 +@AMDEP@CXXDEPMODE = @CXXDEPMODE@ 12.263 + 12.264 +.cpp.o: 12.265 +@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 12.266 +@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ 12.267 +@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 12.268 + $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< 12.269 + 12.270 +.cpp.lo: 12.271 +@AMDEP@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 12.272 +@AMDEP@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ 12.273 +@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 12.274 + $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< 12.275 + 12.276 + 12.277 +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) 12.278 + 12.279 +distdir: $(DISTFILES) 12.280 + @for file in $(DISTFILES); do \ 12.281 + d=$(srcdir); \ 12.282 + if test -d $$d/$$file; then \ 12.283 + cp -pR $$d/$$file $(distdir) \ 12.284 + || exit 1; \ 12.285 + else \ 12.286 + test -f $(distdir)/$$file \ 12.287 + || cp -p $$d/$$file $(distdir)/$$file \ 12.288 + || exit 1; \ 12.289 + fi; \ 12.290 + done 12.291 +info-am: 12.292 +info: info-am 12.293 +dvi-am: 12.294 +dvi: dvi-am 12.295 +check-am: all-am 12.296 +check: check-am 12.297 +installcheck-am: 12.298 +installcheck: installcheck-am 12.299 +install-exec-am: install-binPROGRAMS 12.300 +install-exec: install-exec-am 12.301 + 12.302 +install-data-am: 12.303 +install-data: install-data-am 12.304 + 12.305 +install-am: all-am 12.306 + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 12.307 +install: install-am 12.308 +uninstall-am: uninstall-binPROGRAMS 12.309 +uninstall: uninstall-am 12.310 +all-am: Makefile $(PROGRAMS) 12.311 +all-redirect: all-am 12.312 +install-strip: 12.313 + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install 12.314 +installdirs: 12.315 + $(mkinstalldirs) $(DESTDIR)$(bindir) 12.316 + 12.317 + 12.318 +mostlyclean-generic: 12.319 + 12.320 +clean-generic: 12.321 + 12.322 +distclean-generic: 12.323 + -rm -f Makefile $(CONFIG_CLEAN_FILES) 12.324 + -rm -f config.cache config.log stamp-h stamp-h[0-9]* 12.325 + 12.326 +maintainer-clean-generic: 12.327 + -rm -f Makefile.in 12.328 +mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ 12.329 + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ 12.330 + mostlyclean-generic 12.331 + 12.332 +mostlyclean: mostlyclean-am 12.333 + 12.334 +clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \ 12.335 + clean-depend clean-generic mostlyclean-am 12.336 + 12.337 +clean: clean-am 12.338 + 12.339 +distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \ 12.340 + distclean-tags distclean-depend distclean-generic \ 12.341 + clean-am 12.342 + -rm -f libtool 12.343 + 12.344 +distclean: distclean-am 12.345 + 12.346 +maintainer-clean-am: maintainer-clean-binPROGRAMS \ 12.347 + maintainer-clean-compile maintainer-clean-libtool \ 12.348 + maintainer-clean-tags maintainer-clean-depend \ 12.349 + maintainer-clean-generic distclean-am 12.350 + @echo "This command is intended for maintainers to use;" 12.351 + @echo "it deletes files that may require special tools to rebuild." 12.352 + 12.353 +maintainer-clean: maintainer-clean-am 12.354 + 12.355 +.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ 12.356 +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ 12.357 +mostlyclean-compile distclean-compile clean-compile \ 12.358 +maintainer-clean-compile mostlyclean-libtool distclean-libtool \ 12.359 +clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ 12.360 +distclean-tags clean-tags maintainer-clean-tags mostlyclean-depend \ 12.361 +distclean-depend clean-depend maintainer-clean-depend distdir info-am \ 12.362 +info dvi-am dvi check check-am installcheck-am installcheck \ 12.363 +install-exec-am install-exec install-data-am install-data install-am \ 12.364 +install uninstall-am uninstall all-redirect all-am all install-strip \ 12.365 +installdirs mostlyclean-generic distclean-generic clean-generic \ 12.366 +maintainer-clean-generic clean mostlyclean distclean maintainer-clean 12.367 + 12.368 + 12.369 +# Tell versions [3.59,3.63) of GNU make to not export all variables. 12.370 +# Otherwise a system limit (for SysV at least) may be exceeded. 12.371 +.NOEXPORT:
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/ivcat/ivcat.cpp Fri Oct 06 09:57:09 2000 +0000 13.3 @@ -0,0 +1,205 @@ 13.4 +/**************************************************************************\ 13.5 + * 13.6 + * This file is part of the Coin 3D visualization library. 13.7 + * Copyright (C) 1998-2000 by Systems in Motion. All rights reserved. 13.8 + * 13.9 + * This library is free software; you can redistribute it and/or 13.10 + * modify it under the terms of the GNU Lesser General Public License 13.11 + * version 2.1 as published by the Free Software Foundation. See the 13.12 + * file LICENSE.LGPL at the root directory of the distribution for 13.13 + * more details. 13.14 + * 13.15 + * If you want to use Coin for applications not compatible with the 13.16 + * LGPL, please contact SIM to acquire a Professional Edition license. 13.17 + * 13.18 + * Systems in Motion, Prof Brochs gate 6, 7030 Trondheim, NORWAY 13.19 + * http://www.sim.no support@sim.no Voice: +47 22114160 Fax: +47 22207097 13.20 + * 13.21 +\**************************************************************************/ 13.22 + 13.23 +#include <stdio.h> 13.24 +#include <Inventor/SoDB.h> 13.25 +#include <Inventor/SoInteraction.h> 13.26 +#include <Inventor/nodekits/SoNodeKit.h> 13.27 +#include <Inventor/SoInput.h> 13.28 +#include <Inventor/SoOutput.h> 13.29 +#include <Inventor/actions/SoWriteAction.h> 13.30 +#include <Inventor/nodes/SoSeparator.h> 13.31 + 13.32 +// FIXME: do proper checks for these through configure. 13.33 +// 19991206 mortene. 13.34 +#ifndef _WIN32 13.35 +#define HAVE_GETOPT 1 13.36 +#define HAVE_ISATTY 1 13.37 +#endif // !_WIN32 13.38 + 13.39 +#if HAVE_GETOPT 13.40 +#include <unistd.h> 13.41 +/* These two externs are for interfacing against getopt(). */ 13.42 +extern int optind; 13.43 +extern char * optarg; 13.44 +#endif // HAVE_GETOPT 13.45 + 13.46 + 13.47 +#if HAVE_GETOPT 13.48 +void 13.49 +usage(const char * argv_0) 13.50 +{ 13.51 + fprintf(stderr, "\nUsage: %s [-bfth] [-o filename] file ...\n", argv_0); 13.52 + 13.53 + fprintf(stderr, "\t-b:\twrite in binary format\n"); 13.54 + fprintf(stderr, "\t-f:\tflatten SoFile nodes\n"); 13.55 + fprintf(stderr, "\t-t:\tinline all textures\n"); 13.56 + fprintf(stderr, "\t-h:\tshow usage\n"); 13.57 + fprintf(stderr, "\t-o:\twrite to ``filename'' instead of stdout\n"); 13.58 + 13.59 + fprintf(stderr, 13.60 + "\n ``%s'' will read all files given on the command line,\n", 13.61 + argv_0); 13.62 + fprintf(stderr, 13.63 + " compile them into a single scene and write them back out\n"); 13.64 + fprintf(stderr, 13.65 + " again on stdout (unless the ``-o'' option is used).\n\n"); 13.66 + fprintf(stderr, 13.67 + " Use ``-'' or no input files to read from stdin.\n\n"); 13.68 +} 13.69 +#endif // !HAVE_GETOPT 13.70 + 13.71 + 13.72 +#if HAVE_ISATTY 13.73 +#define CHECK_TTY(fileptr) \ 13.74 + do { \ 13.75 + if (isatty(fileno(fileptr))) { \ 13.76 + usage(argv[0]); \ 13.77 + fprintf(stderr, "Trying to read from standard input, but standard " \ 13.78 + "input is a tty!\n\n"); \ 13.79 + exit(1); \ 13.80 + } \ 13.81 + } while (0) 13.82 +#else // !HAVE_ISATTY 13.83 +#define CHECK_TTY(fileptr) do { } while (0) 13.84 +#endif // !HAVE_ISATTY 13.85 + 13.86 + 13.87 + 13.88 +int 13.89 +main(int argc, char * argv[]) 13.90 +{ 13.91 + int writeasbinary = 0; 13.92 + int flattenfiles = 0; 13.93 + int flattentextures = 0; 13.94 + const char * outname = NULL; 13.95 + 13.96 +#if HAVE_GETOPT 13.97 + /* Parse command line. */ 13.98 + int getoptchar; 13.99 + while ((getoptchar = getopt(argc, argv, "bftho:")) != EOF) { 13.100 + char c = (char)getoptchar; 13.101 + switch (c) { 13.102 + case 'b': 13.103 + writeasbinary = 1; 13.104 + break; 13.105 + case 'f': 13.106 + flattenfiles = 1; 13.107 + break; 13.108 + case 't': 13.109 + flattentextures = 1; 13.110 + break; 13.111 + case 'h': 13.112 + usage(argv[0]); 13.113 + exit(0); 13.114 + break; 13.115 + case 'o': 13.116 + outname = optarg; 13.117 + if (!outname) { 13.118 + usage(argv[0]); 13.119 + exit(1); 13.120 + } 13.121 + break; 13.122 + case '?': 13.123 + usage(argv[0]); 13.124 + exit(1); 13.125 + break; 13.126 + } 13.127 + } 13.128 + int i = optind; 13.129 +#else // !HAVE_GETOPT 13.130 + int i = 1; 13.131 +#endif // !HAVE_GETOPT 13.132 + 13.133 + SoDB::init(); 13.134 + SoNodeKit::init(); 13.135 + SoInteraction::init(); 13.136 + 13.137 + SoInput stdinp; 13.138 + SoSeparator * root = new SoSeparator; 13.139 + 13.140 + if (i >= argc) { 13.141 + CHECK_TTY(stdin); 13.142 + /* No files specified, read from stdin only. */ 13.143 + SoSeparator * tmp = SoDB::readAll(&stdinp); 13.144 + if (tmp) root->addChild(tmp); 13.145 + else { 13.146 + fprintf(stderr, "Error: not a valid file on stdin.\n"); 13.147 + } 13.148 + } 13.149 + else { 13.150 + SoInput fileinp; 13.151 + 13.152 + for (; i < argc; i++) { 13.153 + SoInput * inp = NULL; 13.154 + 13.155 + if (strcmp("-", argv[i]) == 0) { 13.156 + CHECK_TTY(stdinp.getCurFile()); 13.157 + inp = &stdinp; 13.158 + } 13.159 + else if (fileinp.openFile(argv[i])) { 13.160 + inp = &fileinp; 13.161 + } 13.162 + else { 13.163 + fprintf(stderr, "Couldn't open file '%s' -- skipping.\n", argv[i]); 13.164 + } 13.165 + 13.166 + if (inp) { 13.167 + SoSeparator * tmproot = SoDB::readAll(inp); 13.168 + if (tmproot) { 13.169 + root->addChild(tmproot->getNumChildren() == 1 ? 13.170 + tmproot->getChild(0) : tmproot); 13.171 + } 13.172 + else { 13.173 + fprintf(stderr, "Couldn't read file '%s' -- skipping.\n", argv[i]); 13.174 + } 13.175 + 13.176 + if (inp == &fileinp) inp->closeFile(); 13.177 + } 13.178 + } 13.179 + } 13.180 + 13.181 + if (flattenfiles) { 13.182 + // FIXME: flatten SoFile nodes. 19991009 mortene. 13.183 + fprintf(stderr, "Warning: SoFile flattening not supported yet!\n"); 13.184 + } 13.185 + 13.186 + if (flattentextures) { 13.187 + // FIXME: inline SoTexture2 nodes. 19991009 mortene. 13.188 + fprintf(stderr, "Warning: texture inlining not supported yet!\n"); 13.189 + } 13.190 + 13.191 + if (root->getNumChildren() > 0) { 13.192 + SoOutput out; 13.193 + if (outname) { 13.194 + if (!out.openFile(outname)) { 13.195 + fprintf(stderr, "Couldn't write output to '%s'.\n", outname); 13.196 + exit(1); 13.197 + } 13.198 + } 13.199 + out.setBinary(writeasbinary); 13.200 + 13.201 + SoWriteAction wa(&out); 13.202 + for (int i=0; i < root->getNumChildren(); i++) { 13.203 + wa.apply(root->getChild(i)); 13.204 + } 13.205 + } 13.206 + 13.207 + return 0; 13.208 +}
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 14.2 +++ b/ivhierarchy/.cvsignore Fri Oct 06 09:57:09 2000 +0000 14.3 @@ -0,0 +1,6 @@ 14.4 +.deps 14.5 +.libs 14.6 +Makefile 14.7 +ivhierarchy 14.8 +ivhierarchy.o 14.9 +ii_files
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 15.2 +++ b/ivhierarchy/Makefile.am Fri Oct 06 09:57:09 2000 +0000 15.3 @@ -0,0 +1,6 @@ 15.4 +## Process this file with automake to generate Makefile.in. 15.5 + 15.6 +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 15.7 +bin_PROGRAMS = ivhierarchy 15.8 +ivhierarchy_SOURCES = ivhierarchy.cpp 15.9 +ivhierarchy_LDADD = $(top_builddir)/src/libCoin.la @COIN_HACKING_LIBDIRS@ @COIN_EXTRA_LIBS@
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 16.2 +++ b/ivhierarchy/Makefile.in Fri Oct 06 09:57:09 2000 +0000 16.3 @@ -0,0 +1,368 @@ 16.4 +# Makefile.in generated automatically by automake 1.4a from Makefile.am 16.5 + 16.6 +# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc. 16.7 +# This Makefile.in is free software; the Free Software Foundation 16.8 +# gives unlimited permission to copy and/or distribute it, 16.9 +# with or without modifications, as long as this notice is preserved. 16.10 + 16.11 +# This program is distributed in the hope that it will be useful, 16.12 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 16.13 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 16.14 +# PARTICULAR PURPOSE. 16.15 + 16.16 +SHELL = @SHELL@ 16.17 + 16.18 +srcdir = @srcdir@ 16.19 +top_srcdir = @top_srcdir@ 16.20 +VPATH = @srcdir@ 16.21 +prefix = @prefix@ 16.22 +exec_prefix = @exec_prefix@ 16.23 + 16.24 +bindir = @bindir@ 16.25 +sbindir = @sbindir@ 16.26 +libexecdir = @libexecdir@ 16.27 +datadir = @datadir@ 16.28 +sysconfdir = @sysconfdir@ 16.29 +sharedstatedir = @sharedstatedir@ 16.30 +localstatedir = @localstatedir@ 16.31 +libdir = @libdir@ 16.32 +infodir = @infodir@ 16.33 +mandir = @mandir@ 16.34 +includedir = @includedir@ 16.35 +oldincludedir = /usr/include 16.36 + 16.37 +pkgdatadir = $(datadir)/@PACKAGE@ 16.38 +pkglibdir = $(libdir)/@PACKAGE@ 16.39 +pkgincludedir = $(includedir)/@PACKAGE@ 16.40 + 16.41 +top_builddir = ../.. 16.42 + 16.43 +ACLOCAL = @ACLOCAL@ 16.44 +AUTOCONF = @AUTOCONF@ 16.45 +AUTOMAKE = @AUTOMAKE@ 16.46 +AUTOHEADER = @AUTOHEADER@ 16.47 + 16.48 +INSTALL = @INSTALL@ 16.49 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ 16.50 +INSTALL_DATA = @INSTALL_DATA@ 16.51 +INSTALL_SCRIPT = @INSTALL_SCRIPT@ 16.52 +INSTALL_STRIP_FLAG = 16.53 +transform = @program_transform_name@ 16.54 + 16.55 +NORMAL_INSTALL = : 16.56 +PRE_INSTALL = : 16.57 +POST_INSTALL = : 16.58 +NORMAL_UNINSTALL = : 16.59 +PRE_UNINSTALL = : 16.60 +POST_UNINSTALL = : 16.61 + 16.62 +@SET_MAKE@ 16.63 +build_alias = @build_alias@ 16.64 +build_triplet = @build@ 16.65 +host_alias = @host_alias@ 16.66 +host_triplet = @host@ 16.67 +target_alias = @target_alias@ 16.68 +target_triplet = @target@ 16.69 +AMDEP = @AMDEP@ 16.70 +AMTAR = @AMTAR@ 16.71 +AS = @AS@ 16.72 +AWK = @AWK@ 16.73 +CC = @CC@ 16.74 +COIN_BINARY_AGE = @COIN_BINARY_AGE@ 16.75 +COIN_DOC_HTML = @COIN_DOC_HTML@ 16.76 +COIN_DOC_MAN = @COIN_DOC_MAN@ 16.77 +COIN_EXTRA_CPPFLAGS = @COIN_EXTRA_CPPFLAGS@ 16.78 +COIN_EXTRA_LDFLAGS = @COIN_EXTRA_LDFLAGS@ 16.79 +COIN_EXTRA_LIBS = @COIN_EXTRA_LIBS@ 16.80 +COIN_HACKING_LIBDIRS = @COIN_HACKING_LIBDIRS@ 16.81 +COIN_INTERFACE_AGE = @COIN_INTERFACE_AGE@ 16.82 +COIN_LIBNAME = @COIN_LIBNAME@ 16.83 +COIN_MAJOR_VERSION = @COIN_MAJOR_VERSION@ 16.84 +COIN_MICRO_VERSION = @COIN_MICRO_VERSION@ 16.85 +COIN_MINOR_VERSION = @COIN_MINOR_VERSION@ 16.86 +COIN_VERSION = @COIN_VERSION@ 16.87 +CPP = @CPP@ 16.88 +CXX = @CXX@ 16.89 +CXXCPP = @CXXCPP@ 16.90 +DEPDIR = @DEPDIR@ 16.91 +DLLTOOL = @DLLTOOL@ 16.92 +LIBTOOL = @LIBTOOL@ 16.93 +LN_S = @LN_S@ 16.94 +LT_AGE = @LT_AGE@ 16.95 +LT_CURRENT = @LT_CURRENT@ 16.96 +LT_RELEASE = @LT_RELEASE@ 16.97 +LT_REVISION = @LT_REVISION@ 16.98 +MAINT = @MAINT@ 16.99 +MAKEINFO = @MAKEINFO@ 16.100 +OBJDUMP = @OBJDUMP@ 16.101 +PACKAGE = @PACKAGE@ 16.102 +RANLIB = @RANLIB@ 16.103 +VERSION = @VERSION@ 16.104 +coin_build_dir = @coin_build_dir@ 16.105 +coin_configure_date = @coin_configure_date@ 16.106 +coin_include_dir = @coin_include_dir@ 16.107 +coin_lib_dir = @coin_lib_dir@ 16.108 +coin_src_dir = @coin_src_dir@ 16.109 +install_sh = @install_sh@ 16.110 +sim_ac_doxygen_exe = @sim_ac_doxygen_exe@ 16.111 +sim_ac_perl_exe = @sim_ac_perl_exe@ 16.112 +sim_ac_simage_configcmd = @sim_ac_simage_configcmd@ 16.113 + 16.114 + 16.115 +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 16.116 +bin_PROGRAMS = ivhierarchy 16.117 +ivhierarchy_SOURCES = ivhierarchy.cpp 16.118 +ivhierarchy_LDADD = $(top_builddir)/src/libCoin.la @COIN_HACKING_LIBDIRS@ @COIN_EXTRA_LIBS@ 16.119 +subdir = tools/ivhierarchy 16.120 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 16.121 +CONFIG_HEADER = ../../config.h ../../include/Inventor/SbBasic.h 16.122 +CONFIG_CLEAN_FILES = 16.123 +PROGRAMS = $(bin_PROGRAMS) 16.124 + 16.125 + 16.126 +DEFS = @DEFS@ -I. -I$(srcdir) -I../.. -I../../include/Inventor 16.127 +CPPFLAGS = @CPPFLAGS@ 16.128 +LDFLAGS = @LDFLAGS@ 16.129 +LIBS = @LIBS@ 16.130 +X_CFLAGS = @X_CFLAGS@ 16.131 +X_LIBS = @X_LIBS@ 16.132 +X_EXTRA_LIBS = @X_EXTRA_LIBS@ 16.133 +X_PRE_LIBS = @X_PRE_LIBS@ 16.134 +am_ivhierarchy_OBJECTS = ivhierarchy.o 16.135 +ivhierarchy_OBJECTS = $(am_ivhierarchy_OBJECTS) 16.136 +ivhierarchy_DEPENDENCIES = $(top_builddir)/src/libCoin.la 16.137 +ivhierarchy_LDFLAGS = 16.138 +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 16.139 +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 16.140 +CXXFLAGS = @CXXFLAGS@ 16.141 +CXXLD = $(CXX) 16.142 +CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 16.143 +DIST_SOURCES = $(ivhierarchy_SOURCES) 16.144 +depcomp = $(SHELL) $(top_srcdir)/depcomp 16.145 +DEP_FILES = @AMDEP@ $(DEPDIR)/ivhierarchy.Po 16.146 +DIST_COMMON = Makefile.am Makefile.in 16.147 + 16.148 + 16.149 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 16.150 + 16.151 +GZIP_ENV = --best 16.152 +SOURCES = $(ivhierarchy_SOURCES) 16.153 +OBJECTS = $(am_ivhierarchy_OBJECTS) 16.154 + 16.155 +all: all-redirect 16.156 +.SUFFIXES: 16.157 +.SUFFIXES: .c .cpp .lo .o 16.158 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 16.159 + cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/ivhierarchy/Makefile 16.160 + 16.161 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 16.162 + cd $(top_builddir) \ 16.163 + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 16.164 + 16.165 + 16.166 +mostlyclean-binPROGRAMS: 16.167 + 16.168 +clean-binPROGRAMS: 16.169 + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 16.170 + 16.171 +distclean-binPROGRAMS: 16.172 + 16.173 +maintainer-clean-binPROGRAMS: 16.174 + 16.175 +install-binPROGRAMS: $(bin_PROGRAMS) 16.176 + @$(NORMAL_INSTALL) 16.177 + $(mkinstalldirs) $(DESTDIR)$(bindir) 16.178 + @list='$(bin_PROGRAMS)'; for p in $$list; do \ 16.179 + if test -f $$p; then \ 16.180 + f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ 16.181 + echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f"; \ 16.182 + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \ 16.183 + else :; fi; \ 16.184 + done 16.185 + 16.186 +uninstall-binPROGRAMS: 16.187 + @$(NORMAL_UNINSTALL) 16.188 + @list='$(bin_PROGRAMS)'; for p in $$list; do \ 16.189 + f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ 16.190 + echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ 16.191 + rm -f $(DESTDIR)$(bindir)/$$f; \ 16.192 + done 16.193 + 16.194 +mostlyclean-compile: 16.195 + -rm -f *.o core *.core 16.196 + 16.197 +clean-compile: 16.198 + 16.199 +distclean-compile: 16.200 + -rm -f *.tab.c 16.201 + 16.202 +maintainer-clean-compile: 16.203 + 16.204 +mostlyclean-libtool: 16.205 + -rm -f *.lo 16.206 + 16.207 +clean-libtool: 16.208 + -rm -rf .libs _libs 16.209 + 16.210 +distclean-libtool: 16.211 + 16.212 +maintainer-clean-libtool: 16.213 + 16.214 +ivhierarchy: $(ivhierarchy_OBJECTS) $(ivhierarchy_DEPENDENCIES) 16.215 + @rm -f ivhierarchy 16.216 + $(CXXLINK) $(ivhierarchy_LDFLAGS) $(ivhierarchy_OBJECTS) $(ivhierarchy_LDADD) $(LIBS) 16.217 + 16.218 +tags: TAGS 16.219 + 16.220 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 16.221 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 16.222 + unique=`for i in $$list; do \ 16.223 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 16.224 + done | \ 16.225 + $(AWK) ' { files[$$0] = 1; } \ 16.226 + END { for (i in files) print i; }'`; \ 16.227 + mkid -fID $$unique $(LISP) 16.228 + 16.229 +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 16.230 + $(TAGS_FILES) $(LISP) 16.231 + tags=; \ 16.232 + here=`pwd`; \ 16.233 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 16.234 + unique=`for i in $$list; do \ 16.235 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 16.236 + done | \ 16.237 + $(AWK) ' { files[$$0] = 1; } \ 16.238 + END { for (i in files) print i; }'`; \ 16.239 + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ 16.240 + || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) 16.241 + 16.242 +mostlyclean-tags: 16.243 + 16.244 +clean-tags: 16.245 + 16.246 +distclean-tags: 16.247 + -rm -f TAGS ID 16.248 + 16.249 +maintainer-clean-tags: 16.250 + 16.251 +@AMDEP@include $(DEPDIR)/ivhierarchy.Po 16.252 + 16.253 +mostlyclean-depend: 16.254 + 16.255 +clean-depend: 16.256 + 16.257 +distclean-depend: 16.258 + -rm -rf $(DEPDIR) 16.259 + 16.260 +maintainer-clean-depend: 16.261 + 16.262 +@AMDEP@CXXDEPMODE = @CXXDEPMODE@ 16.263 + 16.264 +.cpp.o: 16.265 +@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 16.266 +@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ 16.267 +@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 16.268 + $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< 16.269 + 16.270 +.cpp.lo: 16.271 +@AMDEP@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 16.272 +@AMDEP@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ 16.273 +@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 16.274 + $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< 16.275 + 16.276 + 16.277 +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) 16.278 + 16.279 +distdir: $(DISTFILES) 16.280 + @for file in $(DISTFILES); do \ 16.281 + d=$(srcdir); \ 16.282 + if test -d $$d/$$file; then \ 16.283 + cp -pR $$d/$$file $(distdir) \ 16.284 + || exit 1; \ 16.285 + else \ 16.286 + test -f $(distdir)/$$file \ 16.287 + || cp -p $$d/$$file $(distdir)/$$file \ 16.288 + || exit 1; \ 16.289 + fi; \ 16.290 + done 16.291 +info-am: 16.292 +info: info-am 16.293 +dvi-am: 16.294 +dvi: dvi-am 16.295 +check-am: all-am 16.296 +check: check-am 16.297 +installcheck-am: 16.298 +installcheck: installcheck-am 16.299 +install-exec-am: install-binPROGRAMS 16.300 +install-exec: install-exec-am 16.301 + 16.302 +install-data-am: 16.303 +install-data: install-data-am 16.304 + 16.305 +install-am: all-am 16.306 + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 16.307 +install: install-am 16.308 +uninstall-am: uninstall-binPROGRAMS 16.309 +uninstall: uninstall-am 16.310 +all-am: Makefile $(PROGRAMS) 16.311 +all-redirect: all-am 16.312 +install-strip: 16.313 + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install 16.314 +installdirs: 16.315 + $(mkinstalldirs) $(DESTDIR)$(bindir) 16.316 + 16.317 + 16.318 +mostlyclean-generic: 16.319 + 16.320 +clean-generic: 16.321 + 16.322 +distclean-generic: 16.323 + -rm -f Makefile $(CONFIG_CLEAN_FILES) 16.324 + -rm -f config.cache config.log stamp-h stamp-h[0-9]* 16.325 + 16.326 +maintainer-clean-generic: 16.327 + -rm -f Makefile.in 16.328 +mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ 16.329 + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ 16.330 + mostlyclean-generic 16.331 + 16.332 +mostlyclean: mostlyclean-am 16.333 + 16.334 +clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \ 16.335 + clean-depend clean-generic mostlyclean-am 16.336 + 16.337 +clean: clean-am 16.338 + 16.339 +distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \ 16.340 + distclean-tags distclean-depend distclean-generic \ 16.341 + clean-am 16.342 + -rm -f libtool 16.343 + 16.344 +distclean: distclean-am 16.345 + 16.346 +maintainer-clean-am: maintainer-clean-binPROGRAMS \ 16.347 + maintainer-clean-compile maintainer-clean-libtool \ 16.348 + maintainer-clean-tags maintainer-clean-depend \ 16.349 + maintainer-clean-generic distclean-am 16.350 + @echo "This command is intended for maintainers to use;" 16.351 + @echo "it deletes files that may require special tools to rebuild." 16.352 + 16.353 +maintainer-clean: maintainer-clean-am 16.354 + 16.355 +.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ 16.356 +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ 16.357 +mostlyclean-compile distclean-compile clean-compile \ 16.358 +maintainer-clean-compile mostlyclean-libtool distclean-libtool \ 16.359 +clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ 16.360 +distclean-tags clean-tags maintainer-clean-tags mostlyclean-depend \ 16.361 +distclean-depend clean-depend maintainer-clean-depend distdir info-am \ 16.362 +info dvi-am dvi check check-am installcheck-am installcheck \ 16.363 +install-exec-am install-exec install-data-am install-data install-am \ 16.364 +install uninstall-am uninstall all-redirect all-am all install-strip \ 16.365 +installdirs mostlyclean-generic distclean-generic clean-generic \ 16.366 +maintainer-clean-generic clean mostlyclean distclean maintainer-clean 16.367 + 16.368 + 16.369 +# Tell versions [3.59,3.63) of GNU make to not export all variables. 16.370 +# Otherwise a system limit (for SysV at least) may be exceeded. 16.371 +.NOEXPORT:
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 17.2 +++ b/ivhierarchy/ivhierarchy.cpp Fri Oct 06 09:57:09 2000 +0000 17.3 @@ -0,0 +1,138 @@ 17.4 +/**************************************************************************\ 17.5 + * 17.6 + * This file is part of the Coin 3D visualization library. 17.7 + * Copyright (C) 1998-2000 by Systems in Motion. All rights reserved. 17.8 + * 17.9 + * This library is free software; you can redistribute it and/or 17.10 + * modify it under the terms of the GNU Lesser General Public License 17.11 + * version 2.1 as published by the Free Software Foundation. See the 17.12 + * file LICENSE.LGPL at the root directory of the distribution for 17.13 + * more details. 17.14 + * 17.15 + * If you want to use Coin for applications not compatible with the 17.16 + * LGPL, please contact SIM to acquire a Professional Edition license. 17.17 + * 17.18 + * Systems in Motion, Prof Brochs gate 6, 7030 Trondheim, NORWAY 17.19 + * http://www.sim.no support@sim.no Voice: +47 22114160 Fax: +47 22207097 17.20 + * 17.21 +\**************************************************************************/ 17.22 + 17.23 +#include <Inventor/SoDB.h> 17.24 +#include <Inventor/nodekits/SoNodeKit.h> 17.25 +#include <Inventor/SoInteraction.h> 17.26 +#if defined(COIN_INTERNAL) 17.27 +#include <Inventor/lists/SbStringList.h> 17.28 +#include <Inventor/lists/SoTypeList.h> 17.29 +#else // Compiled outside the internal build process. 17.30 +#include <Inventor/SoLists.h> 17.31 +#include <Inventor/SbPList.h> 17.32 +#endif 17.33 +#include <stdio.h> 17.34 + 17.35 +const int INDENTSIZE = 2; 17.36 +static int indentation; 17.37 + 17.38 + 17.39 +void 17.40 +usage(const char * invocationname) 17.41 +{ 17.42 + fprintf(stderr, "\n"); 17.43 + fprintf(stderr, " Usage: %s [classname classname ...]\n\n", invocationname); 17.44 + fprintf(stderr, " List the full inheritance hierarchy below the\n"); 17.45 + fprintf(stderr, " given classnames and the list of parent classes\n"); 17.46 + fprintf(stderr, " leading down to each of the given classnames.\n\n"); 17.47 + fprintf(stderr, " EXAMPLES:\n\n"); 17.48 + fprintf(stderr, " $ %s SoEngine\n", invocationname); 17.49 + fprintf(stderr, " ...this will list the inheritance\n"); 17.50 + fprintf(stderr, " hierarchy for the engine classes.\n\n"); 17.51 + fprintf(stderr, " $ %s Base Field Event Element Error SoDetail SoAction\n", invocationname); 17.52 + fprintf(stderr, " ...this will list _all_ \"typed\" classes.\n\n"); 17.53 +} 17.54 + 17.55 +SbStringList 17.56 +sort_types(SoTypeList & typelist) 17.57 +{ 17.58 + SbStringList strlist; 17.59 + 17.60 + for (int i=0; i < typelist.getLength(); i++) { 17.61 + SbString * s = new SbString(typelist[i].getName().getString()); 17.62 + int j = 0; 17.63 + while ((j < strlist.getLength()) && 17.64 + (strcmp(strlist[j]->getString(), s->getString()) < 0)) j++; 17.65 + if (j < strlist.getLength()) strlist.insert(s, j); 17.66 + else strlist.append(s); 17.67 + } 17.68 + 17.69 + return strlist; 17.70 +} 17.71 + 17.72 +void 17.73 +print_type(SoType t, int marked) 17.74 +{ 17.75 + int i = 0; 17.76 + if (marked) i += fprintf(stdout, "->"); 17.77 + for (; i < indentation; i++) fprintf(stdout, " "); 17.78 + fprintf(stdout, "%s\n", t.getName().getString()); 17.79 +} 17.80 + 17.81 +void 17.82 +print_parent_tree(SoType t) 17.83 +{ 17.84 + if (t == SoType::badType()) return; 17.85 + print_parent_tree(t.getParent()); 17.86 + print_type(t, 0); 17.87 + indentation += INDENTSIZE; 17.88 +} 17.89 + 17.90 +void 17.91 +print_children_trees(SoType t) 17.92 +{ 17.93 + SoTypeList children; 17.94 + t.getAllDerivedFrom(t, children); 17.95 + 17.96 + SbStringList strlist = sort_types(children); 17.97 + for (int i=0; i < strlist.getLength(); i++) { 17.98 + SoType derived = SoType::fromName(strlist[i]->getString()); 17.99 + if ((derived != t) && (derived.getParent() == t)) { 17.100 + print_type(derived, 0); 17.101 + indentation += INDENTSIZE; 17.102 + print_children_trees(derived); 17.103 + indentation -= INDENTSIZE; 17.104 + } 17.105 + } 17.106 +} 17.107 + 17.108 + 17.109 +int 17.110 +main(int argc, char ** argv) 17.111 +{ 17.112 + if (argc == 1) { 17.113 + usage(argv[0]); 17.114 + exit(1); 17.115 + } 17.116 + 17.117 + SoDB::init(); 17.118 + SoNodeKit::init(); 17.119 + SoInteraction::init(); 17.120 + 17.121 + for (int i=1; i < argc; i++) { 17.122 + indentation = INDENTSIZE; 17.123 + 17.124 + SoType t = SoType::fromName(argv[i]); 17.125 + if (t == SoType::badType()) { 17.126 + fprintf(stderr, 17.127 + "\nCouldn't find a valid type identifier for ``%s''.\n\n", 17.128 + argv[i]); 17.129 + } 17.130 + else { 17.131 + print_parent_tree(t.getParent()); 17.132 + print_type(t, 1); 17.133 + indentation += INDENTSIZE; 17.134 + print_children_trees(t); 17.135 + } 17.136 + 17.137 + if (i < argc-1) fprintf(stdout, "\n"); 17.138 + } 17.139 + 17.140 + return 0; 17.141 +}
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 18.2 +++ b/renderos/.cvsignore Fri Oct 06 09:57:09 2000 +0000 18.3 @@ -0,0 +1,5 @@ 18.4 +renderos 18.5 +Makefile 18.6 +ii_files 18.7 +.deps 18.8 +.libs
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 19.2 +++ b/renderos/Makefile.am Fri Oct 06 09:57:09 2000 +0000 19.3 @@ -0,0 +1,6 @@ 19.4 +## Process this file with automake to generate Makefile.in. 19.5 + 19.6 +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 19.7 +bin_PROGRAMS = renderos 19.8 +renderos_SOURCES = renderos.cpp 19.9 +renderos_LDADD = $(top_builddir)/src/libCoin.la @COIN_HACKING_LIBDIRS@ @COIN_EXTRA_LIBS@
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 20.2 +++ b/renderos/Makefile.in Fri Oct 06 09:57:09 2000 +0000 20.3 @@ -0,0 +1,368 @@ 20.4 +# Makefile.in generated automatically by automake 1.4a from Makefile.am 20.5 + 20.6 +# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc. 20.7 +# This Makefile.in is free software; the Free Software Foundation 20.8 +# gives unlimited permission to copy and/or distribute it, 20.9 +# with or without modifications, as long as this notice is preserved. 20.10 + 20.11 +# This program is distributed in the hope that it will be useful, 20.12 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 20.13 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 20.14 +# PARTICULAR PURPOSE. 20.15 + 20.16 +SHELL = @SHELL@ 20.17 + 20.18 +srcdir = @srcdir@ 20.19 +top_srcdir = @top_srcdir@ 20.20 +VPATH = @srcdir@ 20.21 +prefix = @prefix@ 20.22 +exec_prefix = @exec_prefix@ 20.23 + 20.24 +bindir = @bindir@ 20.25 +sbindir = @sbindir@ 20.26 +libexecdir = @libexecdir@ 20.27 +datadir = @datadir@ 20.28 +sysconfdir = @sysconfdir@ 20.29 +sharedstatedir = @sharedstatedir@ 20.30 +localstatedir = @localstatedir@ 20.31 +libdir = @libdir@ 20.32 +infodir = @infodir@ 20.33 +mandir = @mandir@ 20.34 +includedir = @includedir@ 20.35 +oldincludedir = /usr/include 20.36 + 20.37 +pkgdatadir = $(datadir)/@PACKAGE@ 20.38 +pkglibdir = $(libdir)/@PACKAGE@ 20.39 +pkgincludedir = $(includedir)/@PACKAGE@ 20.40 + 20.41 +top_builddir = ../.. 20.42 + 20.43 +ACLOCAL = @ACLOCAL@ 20.44 +AUTOCONF = @AUTOCONF@ 20.45 +AUTOMAKE = @AUTOMAKE@ 20.46 +AUTOHEADER = @AUTOHEADER@ 20.47 + 20.48 +INSTALL = @INSTALL@ 20.49 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ 20.50 +INSTALL_DATA = @INSTALL_DATA@ 20.51 +INSTALL_SCRIPT = @INSTALL_SCRIPT@ 20.52 +INSTALL_STRIP_FLAG = 20.53 +transform = @program_transform_name@ 20.54 + 20.55 +NORMAL_INSTALL = : 20.56 +PRE_INSTALL = : 20.57 +POST_INSTALL = : 20.58 +NORMAL_UNINSTALL = : 20.59 +PRE_UNINSTALL = : 20.60 +POST_UNINSTALL = : 20.61 + 20.62 +@SET_MAKE@ 20.63 +build_alias = @build_alias@ 20.64 +build_triplet = @build@ 20.65 +host_alias = @host_alias@ 20.66 +host_triplet = @host@ 20.67 +target_alias = @target_alias@ 20.68 +target_triplet = @target@ 20.69 +AMDEP = @AMDEP@ 20.70 +AMTAR = @AMTAR@ 20.71 +AS = @AS@ 20.72 +AWK = @AWK@ 20.73 +CC = @CC@ 20.74 +COIN_BINARY_AGE = @COIN_BINARY_AGE@ 20.75 +COIN_DOC_HTML = @COIN_DOC_HTML@ 20.76 +COIN_DOC_MAN = @COIN_DOC_MAN@ 20.77 +COIN_EXTRA_CPPFLAGS = @COIN_EXTRA_CPPFLAGS@ 20.78 +COIN_EXTRA_LDFLAGS = @COIN_EXTRA_LDFLAGS@ 20.79 +COIN_EXTRA_LIBS = @COIN_EXTRA_LIBS@ 20.80 +COIN_HACKING_LIBDIRS = @COIN_HACKING_LIBDIRS@ 20.81 +COIN_INTERFACE_AGE = @COIN_INTERFACE_AGE@ 20.82 +COIN_LIBNAME = @COIN_LIBNAME@ 20.83 +COIN_MAJOR_VERSION = @COIN_MAJOR_VERSION@ 20.84 +COIN_MICRO_VERSION = @COIN_MICRO_VERSION@ 20.85 +COIN_MINOR_VERSION = @COIN_MINOR_VERSION@ 20.86 +COIN_VERSION = @COIN_VERSION@ 20.87 +CPP = @CPP@ 20.88 +CXX = @CXX@ 20.89 +CXXCPP = @CXXCPP@ 20.90 +DEPDIR = @DEPDIR@ 20.91 +DLLTOOL = @DLLTOOL@ 20.92 +LIBTOOL = @LIBTOOL@ 20.93 +LN_S = @LN_S@ 20.94 +LT_AGE = @LT_AGE@ 20.95 +LT_CURRENT = @LT_CURRENT@ 20.96 +LT_RELEASE = @LT_RELEASE@ 20.97 +LT_REVISION = @LT_REVISION@ 20.98 +MAINT = @MAINT@ 20.99 +MAKEINFO = @MAKEINFO@ 20.100 +OBJDUMP = @OBJDUMP@ 20.101 +PACKAGE = @PACKAGE@ 20.102 +RANLIB = @RANLIB@ 20.103 +VERSION = @VERSION@ 20.104 +coin_build_dir = @coin_build_dir@ 20.105 +coin_configure_date = @coin_configure_date@ 20.106 +coin_include_dir = @coin_include_dir@ 20.107 +coin_lib_dir = @coin_lib_dir@ 20.108 +coin_src_dir = @coin_src_dir@ 20.109 +install_sh = @install_sh@ 20.110 +sim_ac_doxygen_exe = @sim_ac_doxygen_exe@ 20.111 +sim_ac_perl_exe = @sim_ac_perl_exe@ 20.112 +sim_ac_simage_configcmd = @sim_ac_simage_configcmd@ 20.113 + 20.114 + 20.115 +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 20.116 +bin_PROGRAMS = renderos 20.117 +renderos_SOURCES = renderos.cpp 20.118 +renderos_LDADD = $(top_builddir)/src/libCoin.la @COIN_HACKING_LIBDIRS@ @COIN_EXTRA_LIBS@ 20.119 +subdir = tools/renderos 20.120 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 20.121 +CONFIG_HEADER = ../../config.h ../../include/Inventor/SbBasic.h 20.122 +CONFIG_CLEAN_FILES = 20.123 +PROGRAMS = $(bin_PROGRAMS) 20.124 + 20.125 + 20.126 +DEFS = @DEFS@ -I. -I$(srcdir) -I../.. -I../../include/Inventor 20.127 +CPPFLAGS = @CPPFLAGS@ 20.128 +LDFLAGS = @LDFLAGS@ 20.129 +LIBS = @LIBS@ 20.130 +X_CFLAGS = @X_CFLAGS@ 20.131 +X_LIBS = @X_LIBS@ 20.132 +X_EXTRA_LIBS = @X_EXTRA_LIBS@ 20.133 +X_PRE_LIBS = @X_PRE_LIBS@ 20.134 +am_renderos_OBJECTS = renderos.o 20.135 +renderos_OBJECTS = $(am_renderos_OBJECTS) 20.136 +renderos_DEPENDENCIES = $(top_builddir)/src/libCoin.la 20.137 +renderos_LDFLAGS = 20.138 +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 20.139 +LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 20.140 +CXXFLAGS = @CXXFLAGS@ 20.141 +CXXLD = $(CXX) 20.142 +CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 20.143 +DIST_SOURCES = $(renderos_SOURCES) 20.144 +depcomp = $(SHELL) $(top_srcdir)/depcomp 20.145 +DEP_FILES = @AMDEP@ $(DEPDIR)/renderos.Po 20.146 +DIST_COMMON = Makefile.am Makefile.in 20.147 + 20.148 + 20.149 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 20.150 + 20.151 +GZIP_ENV = --best 20.152 +SOURCES = $(renderos_SOURCES) 20.153 +OBJECTS = $(am_renderos_OBJECTS) 20.154 + 20.155 +all: all-redirect 20.156 +.SUFFIXES: 20.157 +.SUFFIXES: .c .cpp .lo .o 20.158 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 20.159 + cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/renderos/Makefile 20.160 + 20.161 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 20.162 + cd $(top_builddir) \ 20.163 + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 20.164 + 20.165 + 20.166 +mostlyclean-binPROGRAMS: 20.167 + 20.168 +clean-binPROGRAMS: 20.169 + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 20.170 + 20.171 +distclean-binPROGRAMS: 20.172 + 20.173 +maintainer-clean-binPROGRAMS: 20.174 + 20.175 +install-binPROGRAMS: $(bin_PROGRAMS) 20.176 + @$(NORMAL_INSTALL) 20.177 + $(mkinstalldirs) $(DESTDIR)$(bindir) 20.178 + @list='$(bin_PROGRAMS)'; for p in $$list; do \ 20.179 + if test -f $$p; then \ 20.180 + f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ 20.181 + echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f"; \ 20.182 + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \ 20.183 + else :; fi; \ 20.184 + done 20.185 + 20.186 +uninstall-binPROGRAMS: 20.187 + @$(NORMAL_UNINSTALL) 20.188 + @list='$(bin_PROGRAMS)'; for p in $$list; do \ 20.189 + f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \ 20.190 + echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ 20.191 + rm -f $(DESTDIR)$(bindir)/$$f; \ 20.192 + done 20.193 + 20.194 +mostlyclean-compile: 20.195 + -rm -f *.o core *.core 20.196 + 20.197 +clean-compile: 20.198 + 20.199 +distclean-compile: 20.200 + -rm -f *.tab.c 20.201 + 20.202 +maintainer-clean-compile: 20.203 + 20.204 +mostlyclean-libtool: 20.205 + -rm -f *.lo 20.206 + 20.207 +clean-libtool: 20.208 + -rm -rf .libs _libs 20.209 + 20.210 +distclean-libtool: 20.211 + 20.212 +maintainer-clean-libtool: 20.213 + 20.214 +renderos: $(renderos_OBJECTS) $(renderos_DEPENDENCIES) 20.215 + @rm -f renderos 20.216 + $(CXXLINK) $(renderos_LDFLAGS) $(renderos_OBJECTS) $(renderos_LDADD) $(LIBS) 20.217 + 20.218 +tags: TAGS 20.219 + 20.220 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 20.221 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 20.222 + unique=`for i in $$list; do \ 20.223 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 20.224 + done | \ 20.225 + $(AWK) ' { files[$$0] = 1; } \ 20.226 + END { for (i in files) print i; }'`; \ 20.227 + mkid -fID $$unique $(LISP) 20.228 + 20.229 +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 20.230 + $(TAGS_FILES) $(LISP) 20.231 + tags=; \ 20.232 + here=`pwd`; \ 20.233 + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ 20.234 + unique=`for i in $$list; do \ 20.235 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 20.236 + done | \ 20.237 + $(AWK) ' { files[$$0] = 1; } \ 20.238 + END { for (i in files) print i; }'`; \ 20.239 + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ 20.240 + || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) 20.241 + 20.242 +mostlyclean-tags: 20.243 + 20.244 +clean-tags: 20.245 + 20.246 +distclean-tags: 20.247 + -rm -f TAGS ID 20.248 + 20.249 +maintainer-clean-tags: 20.250 + 20.251 +@AMDEP@include $(DEPDIR)/renderos.Po 20.252 + 20.253 +mostlyclean-depend: 20.254 + 20.255 +clean-depend: 20.256 + 20.257 +distclean-depend: 20.258 + -rm -rf $(DEPDIR) 20.259 + 20.260 +maintainer-clean-depend: 20.261 + 20.262 +@AMDEP@CXXDEPMODE = @CXXDEPMODE@ 20.263 + 20.264 +.cpp.o: 20.265 +@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 20.266 +@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ 20.267 +@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 20.268 + $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< 20.269 + 20.270 +.cpp.lo: 20.271 +@AMDEP@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 20.272 +@AMDEP@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ 20.273 +@AMDEP@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 20.274 + $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< 20.275 + 20.276 + 20.277 +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) 20.278 + 20.279 +distdir: $(DISTFILES) 20.280 + @for file in $(DISTFILES); do \ 20.281 + d=$(srcdir); \ 20.282 + if test -d $$d/$$file; then \ 20.283 + cp -pR $$d/$$file $(distdir) \ 20.284 + || exit 1; \ 20.285 + else \ 20.286 + test -f $(distdir)/$$file \ 20.287 + || cp -p $$d/$$file $(distdir)/$$file \ 20.288 + || exit 1; \ 20.289 + fi; \ 20.290 + done 20.291 +info-am: 20.292 +info: info-am 20.293 +dvi-am: 20.294 +dvi: dvi-am 20.295 +check-am: all-am 20.296 +check: check-am 20.297 +installcheck-am: 20.298 +installcheck: installcheck-am 20.299 +install-exec-am: install-binPROGRAMS 20.300 +install-exec: install-exec-am 20.301 + 20.302 +install-data-am: 20.303 +install-data: install-data-am 20.304 + 20.305 +install-am: all-am 20.306 + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 20.307 +install: install-am 20.308 +uninstall-am: uninstall-binPROGRAMS 20.309 +uninstall: uninstall-am 20.310 +all-am: Makefile $(PROGRAMS) 20.311 +all-redirect: all-am 20.312 +install-strip: 20.313 + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install 20.314 +installdirs: 20.315 + $(mkinstalldirs) $(DESTDIR)$(bindir) 20.316 + 20.317 + 20.318 +mostlyclean-generic: 20.319 + 20.320 +clean-generic: 20.321 + 20.322 +distclean-generic: 20.323 + -rm -f Makefile $(CONFIG_CLEAN_FILES) 20.324 + -rm -f config.cache config.log stamp-h stamp-h[0-9]* 20.325 + 20.326 +maintainer-clean-generic: 20.327 + -rm -f Makefile.in 20.328 +mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ 20.329 + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ 20.330 + mostlyclean-generic 20.331 + 20.332 +mostlyclean: mostlyclean-am 20.333 + 20.334 +clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \ 20.335 + clean-depend clean-generic mostlyclean-am 20.336 + 20.337 +clean: clean-am 20.338 + 20.339 +distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \ 20.340 + distclean-tags distclean-depend distclean-generic \ 20.341 + clean-am 20.342 + -rm -f libtool 20.343 + 20.344 +distclean: distclean-am 20.345 + 20.346 +maintainer-clean-am: maintainer-clean-binPROGRAMS \ 20.347 + maintainer-clean-compile maintainer-clean-libtool \ 20.348 + maintainer-clean-tags maintainer-clean-depend \ 20.349 + maintainer-clean-generic distclean-am 20.350 + @echo "This command is intended for maintainers to use;" 20.351 + @echo "it deletes files that may require special tools to rebuild." 20.352 + 20.353 +maintainer-clean: maintainer-clean-am 20.354 + 20.355 +.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ 20.356 +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ 20.357 +mostlyclean-compile distclean-compile clean-compile \ 20.358 +maintainer-clean-compile mostlyclean-libtool distclean-libtool \ 20.359 +clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ 20.360 +distclean-tags clean-tags maintainer-clean-tags mostlyclean-depend \ 20.361 +distclean-depend clean-depend maintainer-clean-depend distdir info-am \ 20.362 +info dvi-am dvi check check-am installcheck-am installcheck \ 20.363 +install-exec-am install-exec install-data-am install-data install-am \ 20.364 +install uninstall-am uninstall all-redirect all-am all install-strip \ 20.365 +installdirs mostlyclean-generic distclean-generic clean-generic \ 20.366 +maintainer-clean-generic clean mostlyclean distclean maintainer-clean 20.367 + 20.368 + 20.369 +# Tell versions [3.59,3.63) of GNU make to not export all variables. 20.370 +# Otherwise a system limit (for SysV at least) may be exceeded. 20.371 +.NOEXPORT:
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 21.2 +++ b/renderos/renderos.cpp Fri Oct 06 09:57:09 2000 +0000 21.3 @@ -0,0 +1,173 @@ 21.4 +/**************************************************************************\ 21.5 + * 21.6 + * This file is part of the Coin 3D visualization library. 21.7 + * Copyright (C) 1998-2000 by Systems in Motion. All rights reserved. 21.8 + * 21.9 + * This library is free software; you can redistribute it and/or 21.10 + * modify it under the terms of the GNU Lesser General Public License 21.11 + * version 2.1 as published by the Free Software Foundation. See the 21.12 + * file LICENSE.LGPL at the root directory of the distribution for 21.13 + * more details. 21.14 + * 21.15 + * If you want to use Coin for applications not compatible with the 21.16 + * LGPL, please contact SIM to acquire a Professional Edition license. 21.17 + * 21.18 + * Systems in Motion, Prof Brochs gate 6, 7030 Trondheim, NORWAY 21.19 + * http://www.sim.no support@sim.no Voice: +47 22114160 Fax: +47 22207097 21.20 + * 21.21 +\**************************************************************************/ 21.22 + 21.23 +#include <Inventor/SoDB.h> 21.24 +#include <Inventor/SoInput.h> 21.25 +#include <Inventor/SoInteraction.h> 21.26 +#include <Inventor/SoOffscreenRenderer.h> 21.27 +#include <Inventor/nodekits/SoNodeKit.h> 21.28 +#include <Inventor/nodes/SoDirectionalLight.h> 21.29 +#include <Inventor/nodes/SoPerspectiveCamera.h> 21.30 +#include <Inventor/nodes/SoSeparator.h> 21.31 +#include <stdio.h> 21.32 +#include <assert.h> 21.33 + 21.34 +// FIXME: do a proper check for this through configure. 21.35 +// 19991206 mortene. 21.36 +#ifndef _WIN32 21.37 +#define HAVE_GETOPT 1 21.38 +#endif // !_WIN32 21.39 + 21.40 +#if HAVE_GETOPT 21.41 +#include <unistd.h> 21.42 +/* These two externs are for interfacing against getopt(). */ 21.43 +extern int optind; 21.44 +extern char * optarg; 21.45 +#endif // HAVE_GETOPT 21.46 + 21.47 + 21.48 +void 21.49 +usage(const char * invname) 21.50 +{ 21.51 +#if HAVE_GETOPT 21.52 + fprintf(stderr, "\nUsage: %s [-h] [-x width] [-y height] [-c components] <modelfile.iv> <snapshot.rgb>\n\n", invname); 21.53 + fprintf(stderr, "\t-h:\tshow usage\n"); 21.54 + fprintf(stderr, "\t-x:\tset width in pixels (default 640)\n"); 21.55 + fprintf(stderr, "\t-y:\tset height in pixels (default 480)\n"); 21.56 + fprintf(stderr, "\t-c:\tset components in image\n"); 21.57 + fprintf(stderr, "\t\t\t1 = LUMINANCE\n"); 21.58 + fprintf(stderr, "\t\t\t2 = LUMINANCE with transparency\n"); 21.59 + fprintf(stderr, "\t\t\t3 = RGB\n"); 21.60 + fprintf(stderr, "\t\t\t4 = RGB with transparency\n"); 21.61 + fprintf(stderr, "\t\t(default is RGB)\n"); 21.62 + fprintf(stderr, "\n"); 21.63 +#else // !HAVE_GETOPT 21.64 + fprintf(stderr, "\nUsage: %s <modelfile.iv> <snapshot.rgb>\n\n", invname); 21.65 +#endif // !HAVE_GETOPT 21.66 +} 21.67 + 21.68 +int 21.69 +main(int argc, char ** argv) 21.70 +{ 21.71 + int width = 640; 21.72 + int height = 480; 21.73 + SoOffscreenRenderer::Components components = SoOffscreenRenderer::RGB; 21.74 + 21.75 +#if HAVE_GETOPT 21.76 + /* Parse command line. */ 21.77 + int getoptchar; 21.78 + while ((getoptchar = getopt(argc, argv, "?hx:y:c:")) != EOF) { 21.79 + char c = (char)getoptchar; 21.80 + switch (c) { 21.81 + case '?': 21.82 + case 'h': 21.83 + usage(argv[0]); 21.84 + exit(0); 21.85 + break; 21.86 + case 'x': 21.87 + width = atoi(optarg); 21.88 + break; 21.89 + case 'y': 21.90 + height = atoi(optarg); 21.91 + break; 21.92 + case 'c': 21.93 + components = (SoOffscreenRenderer::Components)atoi(optarg); 21.94 + if (components < 1 || components > 4) { 21.95 + (void)fprintf(stderr, "Invalid number of components: %d\n", 21.96 + components); 21.97 + exit(1); 21.98 + } 21.99 + break; 21.100 + default: 21.101 + assert(FALSE); 21.102 + break; 21.103 + } 21.104 + } 21.105 + 21.106 + int i = optind; 21.107 +#else // !HAVE_GETOPT 21.108 + int i = 1; 21.109 +#endif // !HAVE_GETOPT 21.110 + 21.111 + if ((argc - i) != 2) { 21.112 + usage(argv[0]); 21.113 + exit(1); 21.114 + } 21.115 + 21.116 + const char * modelfile = argv[i++]; 21.117 + const char * snapshotdump = argv[i++]; 21.118 + 21.119 + SoDB::init(); 21.120 + SoNodeKit::init(); 21.121 + SoInteraction::init(); 21.122 + 21.123 + SoInput in; 21.124 + if (!in.openFile(modelfile)) { 21.125 + (void)fprintf(stderr, "Couldn't open file '%s'.\n", modelfile); 21.126 + exit(1); 21.127 + } 21.128 + 21.129 + SoSeparator * fileroot = SoDB::readAll(&in); 21.130 + if (!fileroot) { 21.131 + (void)fprintf(stderr, "Couldn't read file '%s'.\n", modelfile); 21.132 + exit(1); 21.133 + } 21.134 + 21.135 + SoSeparator * root = new SoSeparator; 21.136 + root->ref(); 21.137 + 21.138 + SoPerspectiveCamera * camera = new SoPerspectiveCamera; 21.139 + root->addChild(camera); 21.140 + 21.141 + SoDirectionalLight * light = new SoDirectionalLight; 21.142 + light->direction.setValue(0.5, 0.5, -0.8); 21.143 + root->addChild(light); 21.144 + 21.145 + root->addChild(fileroot); 21.146 + 21.147 + SbViewportRegion vp(width, height); 21.148 + camera->viewAll(root, vp); 21.149 + 21.150 + SoOffscreenRenderer osr(vp); 21.151 + osr.setComponents(components); 21.152 + SbBool wasrendered = osr.render(root); 21.153 + root->unref(); 21.154 + 21.155 + if (!wasrendered) { 21.156 + (void)fprintf(stderr, "Couldn't render buffer (functionality not available?).\n"); 21.157 + exit(1); 21.158 + } 21.159 + 21.160 + FILE * snapfp = fopen(snapshotdump, "wb"); 21.161 + if (!snapfp) { 21.162 + (void)fprintf(stderr, "Couldn't open file '%s'.\n", snapshotdump); 21.163 + exit(1); 21.164 + } 21.165 + 21.166 + if (!osr.writeToRGB(snapfp)) { 21.167 + (void)fprintf(stderr, "Couldn't write file '%s'.\n", snapshotdump); 21.168 + } 21.169 + else { 21.170 + (void)fprintf(stdout, "Bitmap file in SGI RGB format written to '%s'.\n", 21.171 + snapshotdump); 21.172 + } 21.173 + 21.174 + (void)fclose(snapfp); 21.175 + return 0; 21.176 +}