diff options
Diffstat (limited to 'SixenseSDK/src/sixense_simple3d/progs')
51 files changed, 10623 insertions, 0 deletions
diff --git a/SixenseSDK/src/sixense_simple3d/progs/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/Makefile.am new file mode 100755 index 0000000..7cb8ff3 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = demos diff --git a/SixenseSDK/src/sixense_simple3d/progs/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/Makefile.in new file mode 100755 index 0000000..2b0337c --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/Makefile.in @@ -0,0 +1,495 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = progs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = demos +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/CallbackMaker.c b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/CallbackMaker.c new file mode 100755 index 0000000..25e83dc --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/CallbackMaker.c @@ -0,0 +1,536 @@ +/* CallbackMaker.c */ +/* + * Program to invoke all the callbacks that "freeglut" supports + */ + + +#include <GL/freeglut.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> + +static int sequence_number = 0 ; + +int reshape_called = 0, key_called = 0, special_called = 0, visibility_called = 0, + keyup_called = 0, specialup_called = 0, joystick_called = 0, mouse_called = 0, + mousewheel_called = 0, motion_called = 0, passivemotion_called = 0, entry_called = 0, + close_called = 0, overlaydisplay_called = 0, windowstatus_called = 0, + spacemotion_called = 0, spacerotation_called = 0, spacebutton_called = 0, + buttonbox_called = 0, dials_called = 0, tabletmotion_called = 0, tabletbutton_called = 0, + menudestroy_called = 0, menustatus_called = 0 ; +int reshape_width = -1, reshape_height = -1, reshape_seq = -1 ; +int key_key = -1, key_x = -1, key_y = -1, key_seq = -1 ; +int special_key = -1, special_x = -1, special_y = -1, special_seq = -1 ; +int visibility_vis = -1, visibility_seq = -1 ; +int keyup_key = -1, keyup_x = -1, keyup_y = -1, keyup_seq = -1 ; +int specialup_key = -1, specialup_x = -1, specialup_y = -1, specialup_seq = -1 ; +int joystick_a = -1, joystick_b = -1, joystick_c = -1, joystick_d = -1, joystick_seq = -1 ; /* Need meaningful names */ +int mouse_button = -1, mouse_updown = -1, mouse_x = -1, mouse_y = -1, mouse_seq = -1 ; +int mousewheel_number = -1, mousewheel_direction = -1, mousewheel_x = -1, mousewheel_y = -1, mousewheel_seq = -1 ; +int motion_x = -1, motion_y = -1, motion_seq = -1 ; +int passivemotion_x = -1, passivemotion_y = -1, passivemotion_seq = -1 ; + +static void +bitmapPrintf (const char *fmt, ...) +{ + static char buf[256]; + va_list args; + + va_start(args, fmt); +#if defined(WIN32) && !defined(__CYGWIN__) + (void) _vsnprintf (buf, sizeof(buf), fmt, args); +#else + (void) vsnprintf (buf, sizeof(buf), fmt, args); +#endif + va_end(args); + glutBitmapString ( GLUT_BITMAP_HELVETICA_12, (unsigned char*)buf ) ; +} + + +static void +Display(void) +{ + int window = glutGetWindow () ; + glClear ( GL_COLOR_BUFFER_BIT ); + + glDisable ( GL_DEPTH_TEST ); + glMatrixMode ( GL_PROJECTION ); + glPushMatrix(); + glLoadIdentity(); + glOrtho(0, glutGet ( GLUT_WINDOW_WIDTH ), + 0, glutGet ( GLUT_WINDOW_HEIGHT ), -1, 1 ); + glMatrixMode ( GL_MODELVIEW ); + glPushMatrix (); + glLoadIdentity (); + glColor3ub ( 0, 0, 0 ); + glRasterPos2i ( 10, glutGet ( GLUT_WINDOW_HEIGHT ) - 10 ); + + if ( reshape_called ) + { + bitmapPrintf ( "Reshape %d: %d %d\n", reshape_seq, reshape_width, reshape_height ); + } + + if ( key_called ) + { + bitmapPrintf ( "Key %d: %d(%c) %d %d\n", key_seq, key_key, key_key, key_x, key_y ); + } + + if ( special_called ) + { + bitmapPrintf ( "Special %d: %d(%c) %d %d\n", special_seq, special_key, special_key, special_x, special_y ); + } + + if ( visibility_called ) + { + bitmapPrintf ( "Visibility %d: %d\n", visibility_seq, visibility_vis ); + } + + if ( keyup_called ) + { + bitmapPrintf ( "Key Up %d: %d(%c) %d %d\n", keyup_seq, keyup_key, keyup_key, keyup_x, keyup_y ); + } + + if ( specialup_called ) + { + bitmapPrintf ( "Special Up %d: %d(%c) %d %d\n", specialup_seq, specialup_key, specialup_key, specialup_x, specialup_y ); + } + + if ( joystick_called ) + { + bitmapPrintf ( "Joystick %d: %d %d %d %d\n", joystick_seq, joystick_a, joystick_b, joystick_c, joystick_d ); + } + + if ( mouse_called ) + { + bitmapPrintf ( "Mouse %d: %d %d %d %d\n", mouse_seq, mouse_button, mouse_updown, mouse_x, mouse_y ); + } + + if ( mousewheel_called ) + { + bitmapPrintf ( "Mouse Wheel %d: %d %d %d %d\n", mousewheel_seq, mousewheel_number, mousewheel_direction, mousewheel_x, mousewheel_y ); + } + + if ( motion_called ) + { + bitmapPrintf ( "Motion %d: %d %d\n", motion_seq, motion_x, motion_y ); + } + + if ( passivemotion_called ) + { + bitmapPrintf ( "Passive Motion %d: %d %d\n", passivemotion_seq, passivemotion_x, passivemotion_y ); + } + + glMatrixMode ( GL_PROJECTION ); + glPopMatrix (); + glMatrixMode ( GL_MODELVIEW ); + glPopMatrix (); + glEnable ( GL_DEPTH_TEST ); + + printf ( "%6d Window %d Display Callback\n", + ++sequence_number, window ) ; + glutSwapBuffers(); +} + +static void +Reshape(int width, int height) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Reshape Callback: %d %d\n", + ++sequence_number, window, width, height ) ; + reshape_called = 1 ; + reshape_width = width ; + reshape_height = height ; + reshape_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +Key(unsigned char key, int x, int y) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Keyboard Callback: %d %d %d\n", + ++sequence_number, window, key, x, y ) ; + key_called = 1 ; + key_key = key ; + key_x = x ; + key_y = y ; + key_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +Special(int key, int x, int y) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Special Key Callback: %d %d %d\n", + ++sequence_number, window, key, x, y ) ; + special_called = 1 ; + special_key = key ; + special_x = x ; + special_y = y ; + special_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +Visibility(int vis) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Visibility Callback: %d\n", + ++sequence_number, window, vis ) ; + visibility_called = 1 ; + visibility_vis = vis ; + visibility_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +KeyUp(unsigned char key, int x, int y) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Key Release Callback: %d %d %d\n", + ++sequence_number, window, key, x, y ) ; + keyup_called = 1 ; + keyup_key = key ; + keyup_x = x ; + keyup_y = y ; + keyup_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +SpecialUp(int key, int x, int y) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Special Key Release Callback: %d %d %d\n", + ++sequence_number, window, key, x, y ) ; + specialup_called = 1 ; + specialup_key = key ; + specialup_x = x ; + specialup_y = y ; + specialup_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +Joystick( unsigned int a, int b, int c, int d) /* Need meaningful names */ +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Joystick Callback: %d %d %d %d\n", + ++sequence_number, window, a, b, c, d ) ; + joystick_called = 1 ; + joystick_a = a ; + joystick_b = b ; + joystick_c = c ; + joystick_d = d ; + joystick_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +Mouse(int button, int updown, int x, int y) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Mouse Click Callback: %d %d %d %d\n", + ++sequence_number, window, button, updown, x, y ) ; + mouse_called = 1 ; + mouse_button = button ; + mouse_updown = updown ; + mouse_x = x ; + mouse_y = y ; + mouse_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +MouseWheel(int wheel_number, int direction, int x, int y) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Mouse Wheel Callback: %d %d %d %d\n", + ++sequence_number, window, wheel_number, direction, x, y ) ; + mousewheel_called = 1 ; + mousewheel_number = wheel_number ; + mousewheel_direction = direction ; + mousewheel_x = x ; + mousewheel_y = y ; + mousewheel_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +Motion(int x, int y) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Mouse Motion Callback: %d %d\n", + ++sequence_number, window, x, y ) ; + motion_called = 1 ; + motion_x = x ; + motion_y = y ; + motion_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +PassiveMotion(int x, int y) +{ + int window = glutGetWindow () ; + printf ( "%6d Window %d Mouse Passive Motion Callback: %d %d\n", + ++sequence_number, window, x, y ) ; + passivemotion_called = 1 ; + passivemotion_x = x ; + passivemotion_y = y ; + passivemotion_seq = sequence_number ; + glutPostRedisplay () ; +} + +static void +Entry(int state) +{ + int window = glutGetWindow () ; + entry_called = 1 ; + printf ( "%6d Window %d Entry Callback: %d\n", + ++sequence_number, window, state ) ; + glutPostRedisplay () ; +} + +static void +Close(void) +{ + int window = glutGetWindow () ; + close_called = 1 ; + printf ( "%6d Window %d Close Callback\n", + ++sequence_number, window ) ; +} + +static void +OverlayDisplay(void) +{ + int window = glutGetWindow () ; + overlaydisplay_called = 1 ; + printf ( "%6d Window %d OverlayDisplay Callback\n", + ++sequence_number, window ) ; + glutPostRedisplay () ; +} + +static void +WindowStatus(int state) +{ + int window = glutGetWindow () ; + windowstatus_called = 1 ; + printf ( "%6d Window %d WindowStatus Callback: %d\n", + ++sequence_number, window, state ) ; + glutPostRedisplay () ; +} + +static void +SpaceMotion(int x, int y, int z) +{ + int window = glutGetWindow () ; + spacemotion_called = 1 ; + printf ( "%6d Window %d SpaceMotion Callback: %d %d %d\n", + ++sequence_number, window, x, y, z ) ; + glutPostRedisplay () ; +} + +static void +SpaceRotation(int x, int y, int z) +{ + int window = glutGetWindow () ; + spacerotation_called = 1 ; + printf ( "%6d Window %d SpaceRotation Callback: %d %d %d\n", + ++sequence_number, window, x, y, z ) ; + glutPostRedisplay () ; +} + +static void +SpaceButton(int button, int updown) +{ + int window = glutGetWindow () ; + spacebutton_called = 1 ; + printf ( "%6d Window %d SpaceButton Callback: %d %d\n", + ++sequence_number, window, button, updown ) ; + glutPostRedisplay () ; +} + +static void +Dials(int x, int y) +{ + int window = glutGetWindow () ; + dials_called = 1 ; + printf ( "%6d Window %d Dials Callback: %d %d\n", + ++sequence_number, window, x, y ) ; + glutPostRedisplay () ; +} + +static void +ButtonBox(int button, int updown) +{ + int window = glutGetWindow () ; + buttonbox_called = 1 ; + printf ( "%6d Window %d ButtonBox Callback: %d %d\n", + ++sequence_number, window, button, updown ) ; + glutPostRedisplay () ; +} + +static void +TabletMotion(int x, int y) +{ + int window = glutGetWindow () ; + tabletmotion_called = 1 ; + printf ( "%6d Window %d TabletMotion Callback: %d %d\n", + ++sequence_number, window, x, y ) ; + glutPostRedisplay () ; +} + +static void +TabletButton(int button, int updown, int x, int y) +{ + int window = glutGetWindow () ; + tabletbutton_called = 1 ; + printf ( "%6d Window %d TabletButton Callback: %d %d %d %d\n", + ++sequence_number, window, button, updown, x, y ) ; + glutPostRedisplay () ; +} + +static void +MenuCallback ( int menuID ) +{ + int window = glutGetWindow () ; + printf( "%6d Window %d MenuCallback - menuID is %d\n", + ++sequence_number, window, menuID ); +} + +static void +MenuDestroy( void ) +{ + int window = glutGetWindow () ; + menudestroy_called = 1 ; + printf ( "%6d Window %d MenuDestroy Callback\n", + ++sequence_number, window ) ; + glutPostRedisplay () ; +} + +static void +MenuStatus( int status, int x, int y ) +{ + int window = glutGetWindow () ; + menudestroy_called = 1 ; + printf ( "%6d Window %d MenuStatus Callback: %d %d %d\n", + ++sequence_number, window, status, x, y ) ; + glutPostRedisplay () ; +} + +static void Idle ( void ) +{ + ++sequence_number ; +} + +int +main(int argc, char *argv[]) +{ +#define STRING_LENGTH 10 + int freeglut_window, aux_window ; + char dummy_string[STRING_LENGTH]; + + int menuID, subMenuA, subMenuB; + + glutInitWindowSize(500, 250); + glutInitWindowPosition ( 140, 140 ); + glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE ); + glutInit(&argc, argv); + + freeglut_window = glutCreateWindow( "Callback Demo" ); + printf ( "Creating window %d as 'Callback Demo'\n", freeglut_window ) ; + + glClearColor(1.0, 1.0, 1.0, 1.0); + + glutDisplayFunc( Display ); + glutReshapeFunc( Reshape ); + glutKeyboardFunc( Key ); + glutSpecialFunc( Special ); + glutVisibilityFunc( Visibility ); + glutKeyboardUpFunc( KeyUp ); + glutSpecialUpFunc( SpecialUp ); + glutJoystickFunc( Joystick, 100 ); + glutMouseFunc ( Mouse ) ; + glutMouseWheelFunc ( MouseWheel ) ; + glutMotionFunc ( Motion ) ; + glutPassiveMotionFunc ( PassiveMotion ) ; + glutEntryFunc ( Entry ) ; + glutCloseFunc ( Close ) ; + glutOverlayDisplayFunc ( OverlayDisplay ) ; + glutWindowStatusFunc ( WindowStatus ) ; + glutSpaceballMotionFunc ( SpaceMotion ) ; + glutSpaceballRotateFunc ( SpaceRotation ) ; + glutSpaceballButtonFunc ( SpaceButton ) ; + glutButtonBoxFunc ( ButtonBox ) ; + glutDialsFunc ( Dials ) ; + glutTabletMotionFunc ( TabletMotion ) ; + glutTabletButtonFunc ( TabletButton ) ; + glutMenuDestroyFunc ( MenuDestroy ); + glutMenuStatusFunc ( MenuStatus ); + glutSetKeyRepeat(GLUT_KEY_REPEAT_OFF) ; + + subMenuA = glutCreateMenu( MenuCallback ); + glutAddMenuEntry( "Sub menu A1 (01)", 1 ); + glutAddMenuEntry( "Sub menu A2 (02)", 2 ); + glutAddMenuEntry( "Sub menu A3 (03)", 3 ); + + subMenuB = glutCreateMenu( MenuCallback ); + glutAddMenuEntry( "Sub menu B1 (04)", 4 ); + glutAddMenuEntry( "Sub menu B2 (05)", 5 ); + glutAddMenuEntry( "Sub menu B3 (06)", 6 ); + glutAddSubMenu( "Going to sub menu A", subMenuA ); + + menuID = glutCreateMenu( MenuCallback ); + glutAddMenuEntry( "Entry one", 1 ); + glutAddMenuEntry( "Entry two", 2 ); + glutAddMenuEntry( "Entry three", 3 ); + glutAddMenuEntry( "Entry four", 4 ); + glutAddMenuEntry( "Entry five", 5 ); + glutAddSubMenu( "Enter sub menu A", subMenuA ); + glutAddSubMenu( "Enter sub menu B", subMenuB ); + + glutAttachMenu( GLUT_LEFT_BUTTON ); + + aux_window = glutCreateWindow( "Second Window" ); + printf ( "Creating window %d as 'Second Window'\n", aux_window ) ; + + glClearColor(1.0, 1.0, 1.0, 1.0); + + glutDisplayFunc( Display ); + glutReshapeFunc( Reshape ); + glutKeyboardFunc( Key ); + glutSpecialFunc( Special ); + glutVisibilityFunc( Visibility ); + glutKeyboardUpFunc( KeyUp ); + glutSpecialUpFunc( SpecialUp ); + /* glutJoystickFunc( Joystick, 100 ); */ + glutMouseFunc ( Mouse ) ; + glutMouseWheelFunc ( MouseWheel ) ; + glutMotionFunc ( Motion ) ; + glutPassiveMotionFunc ( PassiveMotion ) ; + glutEntryFunc ( Entry ) ; + glutCloseFunc ( Close ) ; + glutOverlayDisplayFunc ( OverlayDisplay ) ; + glutWindowStatusFunc ( WindowStatus ) ; + glutSpaceballMotionFunc ( SpaceMotion ) ; + glutSpaceballRotateFunc ( SpaceRotation ) ; + glutSpaceballButtonFunc ( SpaceButton ) ; + glutButtonBoxFunc ( ButtonBox ) ; + glutDialsFunc ( Dials ) ; + glutTabletMotionFunc ( TabletMotion ) ; + glutTabletButtonFunc ( TabletButton ) ; + glutSetKeyRepeat(GLUT_KEY_REPEAT_OFF) ; + + glutIdleFunc ( Idle ); + + printf ( "Please enter something to continue: " ); + fgets ( dummy_string, STRING_LENGTH, stdin ); + + glutMainLoop(); + + printf ( "Back from the 'freeglut' main loop\n" ) ; + + return 0; /* ANSI C requires main to return int. */ +} diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/CallbackMaker.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/CallbackMaker.dsp new file mode 100755 index 0000000..596082c --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/CallbackMaker.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="CallbackMaker" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=CallbackMaker - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CallbackMaker.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CallbackMaker.mak" CFG="CallbackMaker - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CallbackMaker - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "CallbackMaker - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CallbackMaker - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 /libpath:"../../../Release" + +!ELSEIF "$(CFG)" == "CallbackMaker - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../Debug" + +!ENDIF + +# Begin Target + +# Name "CallbackMaker - Win32 Release" +# Name "CallbackMaker - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\CallbackMaker.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/CallbackMakerStatic.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/CallbackMakerStatic.dsp new file mode 100755 index 0000000..9993deb --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/CallbackMakerStatic.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="CallbackMakerStatic" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=CallbackMakerStatic - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CallbackMakerStatic.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CallbackMakerStatic.mak" CFG="CallbackMakerStatic - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CallbackMakerStatic - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "CallbackMakerStatic - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CallbackMakerStatic - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "CallbackMakerStatic___Win32_Release" +# PROP BASE Intermediate_Dir "CallbackMakerStatic___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseStatic" +# PROP Intermediate_Dir "ReleaseStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ReleaseStatic" + +!ELSEIF "$(CFG)" == "CallbackMakerStatic - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "CallbackMakerStatic___Win32_Debug" +# PROP BASE Intermediate_Dir "CallbackMakerStatic___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugStatic" +# PROP Intermediate_Dir "DebugStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../DebugStatic" + +!ENDIF + +# Begin Target + +# Name "CallbackMakerStatic - Win32 Release" +# Name "CallbackMakerStatic - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\CallbackMaker.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/Makefile.am new file mode 100755 index 0000000..c70c398 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = CallbackMaker.c CallbackMaker.dsp +noinst_PROGRAMS = CallbackMaker +CallbackMaker_SOURCES = CallbackMaker.c +CallbackMaker_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +CallbackMaker_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/Makefile.in new file mode 100755 index 0000000..fa11bd4 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/CallbackMaker/Makefile.in @@ -0,0 +1,465 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = CallbackMaker$(EXEEXT) +subdir = progs/demos/CallbackMaker +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_CallbackMaker_OBJECTS = CallbackMaker-CallbackMaker.$(OBJEXT) +CallbackMaker_OBJECTS = $(am_CallbackMaker_OBJECTS) +CallbackMaker_LDADD = $(LDADD) +CallbackMaker_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(CallbackMaker_CFLAGS) \ + $(CFLAGS) $(CallbackMaker_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(CallbackMaker_SOURCES) +DIST_SOURCES = $(CallbackMaker_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = CallbackMaker.c CallbackMaker.dsp +CallbackMaker_SOURCES = CallbackMaker.c +CallbackMaker_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +CallbackMaker_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/demos/CallbackMaker/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/demos/CallbackMaker/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +CallbackMaker$(EXEEXT): $(CallbackMaker_OBJECTS) $(CallbackMaker_DEPENDENCIES) + @rm -f CallbackMaker$(EXEEXT) + $(CallbackMaker_LINK) $(CallbackMaker_OBJECTS) $(CallbackMaker_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CallbackMaker-CallbackMaker.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +CallbackMaker-CallbackMaker.o: CallbackMaker.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CallbackMaker_CFLAGS) $(CFLAGS) -MT CallbackMaker-CallbackMaker.o -MD -MP -MF $(DEPDIR)/CallbackMaker-CallbackMaker.Tpo -c -o CallbackMaker-CallbackMaker.o `test -f 'CallbackMaker.c' || echo '$(srcdir)/'`CallbackMaker.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/CallbackMaker-CallbackMaker.Tpo $(DEPDIR)/CallbackMaker-CallbackMaker.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='CallbackMaker.c' object='CallbackMaker-CallbackMaker.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CallbackMaker_CFLAGS) $(CFLAGS) -c -o CallbackMaker-CallbackMaker.o `test -f 'CallbackMaker.c' || echo '$(srcdir)/'`CallbackMaker.c + +CallbackMaker-CallbackMaker.obj: CallbackMaker.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CallbackMaker_CFLAGS) $(CFLAGS) -MT CallbackMaker-CallbackMaker.obj -MD -MP -MF $(DEPDIR)/CallbackMaker-CallbackMaker.Tpo -c -o CallbackMaker-CallbackMaker.obj `if test -f 'CallbackMaker.c'; then $(CYGPATH_W) 'CallbackMaker.c'; else $(CYGPATH_W) '$(srcdir)/CallbackMaker.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/CallbackMaker-CallbackMaker.Tpo $(DEPDIR)/CallbackMaker-CallbackMaker.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='CallbackMaker.c' object='CallbackMaker-CallbackMaker.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CallbackMaker_CFLAGS) $(CFLAGS) -c -o CallbackMaker-CallbackMaker.obj `if test -f 'CallbackMaker.c'; then $(CYGPATH_W) 'CallbackMaker.c'; else $(CYGPATH_W) '$(srcdir)/CallbackMaker.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/Fractals.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/Fractals.dsp new file mode 100755 index 0000000..fa991b6 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/Fractals.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="Fractals" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=Fractals - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Fractals.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Fractals.mak" CFG="Fractals - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Fractals - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "Fractals - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Fractals - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../Release" + +!ELSEIF "$(CFG)" == "Fractals - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Fractals___Win32_Debug" +# PROP BASE Intermediate_Dir "Fractals___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../Debug" + +!ENDIF + +# Begin Target + +# Name "Fractals - Win32 Release" +# Name "Fractals - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\fractals.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/FractalsStatic.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/FractalsStatic.dsp new file mode 100755 index 0000000..780f78e --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/FractalsStatic.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="FractalsStatic" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=FractalsStatic - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FractalsStatic.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FractalsStatic.mak" CFG="FractalsStatic - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FractalsStatic - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "FractalsStatic - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FractalsStatic - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "FractalsStatic___Win32_Release" +# PROP BASE Intermediate_Dir "FractalsStatic___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseStatic" +# PROP Intermediate_Dir "ReleaseStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ReleaseStatic" + +!ELSEIF "$(CFG)" == "FractalsStatic - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "FractalsStatic___Win32_Debug" +# PROP BASE Intermediate_Dir "FractalsStatic___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugStatic" +# PROP Intermediate_Dir "DebugStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../DebugStatic" + +!ENDIF + +# Begin Target + +# Name "FractalsStatic - Win32 Release" +# Name "FractalsStatic - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\fractals.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/Makefile.am new file mode 100755 index 0000000..8be8276 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = Fractals.dsp fractals.c fractals.dat +noinst_PROGRAMS = fractals +fractals_SOURCES = fractals.c +fractals_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +fractals_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/Makefile.in new file mode 100755 index 0000000..b67234d --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/Makefile.in @@ -0,0 +1,465 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = fractals$(EXEEXT) +subdir = progs/demos/Fractals +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_fractals_OBJECTS = fractals-fractals.$(OBJEXT) +fractals_OBJECTS = $(am_fractals_OBJECTS) +fractals_LDADD = $(LDADD) +fractals_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(fractals_CFLAGS) $(CFLAGS) \ + $(fractals_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fractals_SOURCES) +DIST_SOURCES = $(fractals_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = Fractals.dsp fractals.c fractals.dat +fractals_SOURCES = fractals.c +fractals_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +fractals_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/demos/Fractals/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/demos/Fractals/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +fractals$(EXEEXT): $(fractals_OBJECTS) $(fractals_DEPENDENCIES) + @rm -f fractals$(EXEEXT) + $(fractals_LINK) $(fractals_OBJECTS) $(fractals_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fractals-fractals.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +fractals-fractals.o: fractals.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fractals_CFLAGS) $(CFLAGS) -MT fractals-fractals.o -MD -MP -MF $(DEPDIR)/fractals-fractals.Tpo -c -o fractals-fractals.o `test -f 'fractals.c' || echo '$(srcdir)/'`fractals.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fractals-fractals.Tpo $(DEPDIR)/fractals-fractals.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fractals.c' object='fractals-fractals.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fractals_CFLAGS) $(CFLAGS) -c -o fractals-fractals.o `test -f 'fractals.c' || echo '$(srcdir)/'`fractals.c + +fractals-fractals.obj: fractals.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fractals_CFLAGS) $(CFLAGS) -MT fractals-fractals.obj -MD -MP -MF $(DEPDIR)/fractals-fractals.Tpo -c -o fractals-fractals.obj `if test -f 'fractals.c'; then $(CYGPATH_W) 'fractals.c'; else $(CYGPATH_W) '$(srcdir)/fractals.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fractals-fractals.Tpo $(DEPDIR)/fractals-fractals.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fractals.c' object='fractals-fractals.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fractals_CFLAGS) $(CFLAGS) -c -o fractals-fractals.obj `if test -f 'fractals.c'; then $(CYGPATH_W) 'fractals.c'; else $(CYGPATH_W) '$(srcdir)/fractals.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/fractals.c b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/fractals.c new file mode 100755 index 0000000..12d8989 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/fractals.c @@ -0,0 +1,336 @@ +/* fractals.c */ +/* + * Program to draw a fractal by Michael Barnsley's deterministic algorithm. + * Algorithm: + * (1) Define the affine transformations (of the form r(i+1) = A r(i) + b ) + * (2) Find the stationary point for each transformation + * (3) To draw: + * - If you are at the lowest level, draw lines connecting all the stationary points + * - If not, call the draw function recursively with each affine transformation applied + */ + +/* + * User Commands: + * +,- - increment/decrement number of levels + * PgUp, PgDn - increase/decrease scaling + * Arrow keys - translate viewing section + * r - reset view + * Escape - quit + */ + +#include <GL/freeglut.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> + +typedef struct +{ + double a00, a01, a10, a11 ; /* Transformation matrix */ + double b0, b1 ; /* Constant vector added on */ + double statx, staty ; /* Coordinates of the stationary point */ +} +AffineTrans ; + +/* Number of levels to draw the fractal */ +static int num_levels = 4 ; + +/* The definition of the fractal */ +static int num_trans ; +static AffineTrans *affine ; + +/* Flag telling us to keep executing the main loop */ +static int continue_in_main_loop = 1; + +/* the window title */ +char window_title [ 80 ] ; + +/* The amount the view is translated and scaled */ +double xwin = 0.0, ywin = 0.0 ; +double scale_factor = 1.0 ; + +static void draw_level ( int num, double m00, double m01, double m10, double m11, double n0, double n1 ) +{ + /* Draw a fractal transformed by "M", "N" as passed in */ + int i ; + + if ( num == 0 ) + { + double x0 = m00 * affine[0].statx + m01 * affine[0].staty + n0 ; + double y0 = m10 * affine[0].statx + m11 * affine[0].staty + n1 ; + + for ( i = 1; i < num_trans; i++ ) + { + double x1 = m00 * affine[i].statx + m01 * affine[i].staty + n0 ; + double y1 = m10 * affine[i].statx + m11 * affine[i].staty + n1 ; + + glVertex2d ( x0, y0 ) ; + glVertex2d ( x1, y1 ) ; + + x0 = x1 ; + y0 = y1 ; + } + } + else + { + /* Map each affine transformation in the fractal through the one passed in and call "draw_level" */ + + for ( i = 0; i < num_trans; i++ ) + { + draw_level ( num-1, m00*affine[i].a00+m01*affine[i].a10, m00*affine[i].a01+m01*affine[i].a11, + m10*affine[i].a00+m11*affine[i].a10, m10*affine[i].a01+m11*affine[i].a11, + m00*affine[i].b0 +m01*affine[i].b1 + n0, m10*affine[i].b0 +m11*affine[i].b1 + n1 ) ; + } + } +} + +static void +Display(void) +{ + glClear( GL_COLOR_BUFFER_BIT ); + + /* the curve */ + glPushMatrix(); + glScalef(2.5, 2.5, 2.5); + + glColor4f(0.0, 0.0, 0.0, 1.0); + glBegin ( GL_LINES ) ; + draw_level ( num_levels, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 ); + glEnd () ; + + glPopMatrix(); + glutSwapBuffers(); +} + +static void +Reshape(int width, int height) +{ + float ar; + glViewport ( 0, 0, width, height ) ; + glMatrixMode ( GL_PROJECTION ) ; + glLoadIdentity(); + ar = (float) width / (float) height ; + if( ar > 1 ) + glFrustum ( -ar, ar, -1.0, 1.0, 2.0, 100.0 ) ; + else + glFrustum ( -1.0, 1.0, -1/ar, 1/ar, 2.0, 100.0 ); + glMatrixMode ( GL_MODELVIEW ) ; + glLoadIdentity () ; + xwin = -1.0 ; + ywin = 0.0 ; + glTranslated ( xwin, ywin, -5.0 ) ; +} + +static void +Key(unsigned char key, int x, int y) +{ + int need_redisplay = 1; + + switch (key) { + case 27: /* Escape key */ + continue_in_main_loop = 0 ; + break; + + case '+' : + ++num_levels ; + break ; + + case '-' : + if ( num_levels > 0 ) + --num_levels ; + break ; + + case 'r' : case 'R' : + glMatrixMode ( GL_MODELVIEW ) ; + glLoadIdentity(); + xwin = -1.0 ; + ywin = 0.0 ; + glTranslated ( xwin, ywin, -5.0 ) ; + break ; + + default: + need_redisplay = 0; + break; + } + if (need_redisplay) + glutPostRedisplay(); +} + +static void +Special(int key, int x, int y) +{ + int need_redisplay = 1; + + switch (key) { + case GLUT_KEY_UP : + glMatrixMode ( GL_MODELVIEW ) ; + ywin += 0.1 * scale_factor ; + glTranslated ( 0.0, 0.1 * scale_factor, 0.0 ) ; + break ; + + case GLUT_KEY_DOWN : + glMatrixMode ( GL_MODELVIEW ) ; + ywin -= 0.1 * scale_factor ; + glTranslated ( 0.0, -0.1 * scale_factor, 0.0 ) ; + break ; + + case GLUT_KEY_LEFT : + glMatrixMode ( GL_MODELVIEW ) ; + xwin -= 0.1 * scale_factor ; + glTranslated ( -0.1 * scale_factor, 0.0, 0.0 ) ; + break ; + + case GLUT_KEY_RIGHT : + glMatrixMode ( GL_MODELVIEW ) ; + xwin += 0.1 * scale_factor ; + glTranslated ( 0.1 * scale_factor, 0.0, 0.0 ) ; + break ; + + case GLUT_KEY_PAGE_UP : + glMatrixMode ( GL_MODELVIEW ) ; + glTranslated ( -xwin, -ywin, 0.0 ) ; + glScaled ( 1.25, 1.25, 1.25 ) ; + glTranslated ( xwin, ywin, 0.0 ) ; + scale_factor *= 0.8 ; + break ; + + case GLUT_KEY_PAGE_DOWN : + glMatrixMode ( GL_MODELVIEW ) ; + glTranslated ( -xwin, -ywin, 0.0 ) ; + glScaled ( 0.8, 0.8, 0.8 ) ; + glTranslated ( xwin, ywin, 0.0 ) ; + scale_factor *= 1.25 ; + break ; + + default: + need_redisplay = 0; + break; + } + if (need_redisplay) + glutPostRedisplay(); +} + + +static void +checkedFGets ( char *s, int size, FILE *stream ) +{ + if ( fgets ( s, size, stream ) == NULL ) { + fprintf ( stderr, "fgets failed\n"); + exit ( EXIT_FAILURE ); + } +} + + +void readConfigFile ( char *fnme ) +{ + FILE *fptr = fopen ( fnme, "rt" ) ; + int i ; + char inputline [ 256 ] ; + + if ( fptr ) + { + /* Read a header line */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + + /* Read a comment line */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + + /* Read the window title */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + /* We assume here that this line will not exceed 79 characters plus a + newline (window_title is 80 characters long). That'll cause a buffer + overflow. For a simple program like this, though, we're letting it + slide! + */ + sscanf ( inputline, "%[a-zA-Z0-9!@#$%^&*()+=/\\_-\" ]", window_title ) ; + + /* Read a comment line */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + + /* Read the number of affine transformations */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + sscanf ( inputline, "%d", &num_trans ) ; + + affine = (AffineTrans *)malloc ( num_trans * sizeof(AffineTrans) ) ; + + /* Read a comment line */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + + for ( i = 0; i < num_trans; i++ ) + { + /* Read an affine transformation definition */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + sscanf ( inputline, "%lf %lf %lf %lf %lf %lf", &affine[i].a00, &affine[i].a01, + &affine[i].a10, &affine[i].a11, &affine[i].b0, &affine[i].b1 ) ; + } + } + else /* No data file, set a default */ + { + printf ( "ERROR opening file <%s>\n", fnme ) ; + strcpy ( window_title, "Cantor Dust" ) ; + num_trans = 2 ; + affine = (AffineTrans *)malloc ( num_trans * sizeof(AffineTrans) ) ; + affine[0].a00 = 0.25 ; affine[0].a01 = 0.00 ; affine[0].a10 = 0.00 ; affine[0].a11 = 0.25 ; + affine[0].b0 = 0.0 ; affine[0].b1 = 0.0 ; + affine[1].a00 = 0.25 ; affine[1].a01 = 0.00 ; affine[1].a10 = 0.00 ; affine[1].a11 = 0.25 ; + affine[1].b0 = 0.5 ; affine[1].b1 = 0.0 ; + } + + for ( i = 0; i < num_trans; i++ ) + { + double m00, m01, m10, m11 ; /* Matrix "I" minus "A" */ + double determ ; /* Determinant of this matrix */ + + /* Calculate the stationary point */ + + m00 = 1.0 - affine[i].a00 ; + m01 = - affine[i].a01 ; + m10 = - affine[i].a10 ; + m11 = 1.0 - affine[i].a11 ; + + determ = m00 * m11 - m01 * m10 ; + + if ( fabs ( determ ) > 1.e-6 ) + { + affine[i].statx = ( m11 * affine[i].b0 - m01 * affine[i].b1 ) / determ ; + affine[i].staty = ( -m10 * affine[i].b0 + m00 * affine[i].b1 ) / determ ; + } + else + affine[i].statx = affine[i].staty = 0.0 ; + } +} + +int +main(int argc, char *argv[]) +{ + int fractal_window ; + + glutInitWindowSize(500, 250); + glutInitWindowPosition ( 140, 140 ); + glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE ); + glutInit(&argc, argv); + + if ( argc > 1 ) + readConfigFile ( argv[1] ) ; + else + readConfigFile ( "fractals.dat" ) ; + + fractal_window = glutCreateWindow( window_title ); + + glClearColor(1.0, 1.0, 1.0, 1.0); + + glutReshapeFunc(Reshape); + glutKeyboardFunc(Key); + glutSpecialFunc(Special); + glutDisplayFunc(Display); + +#ifdef WIN32 +#endif + + while ( continue_in_main_loop ) + glutMainLoopEvent(); + + printf ( "Back from the 'freeglut' main loop\n" ) ; + + return 0; /* ANSI C requires main to return int. */ +} diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/fractals.dat b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/fractals.dat new file mode 100755 index 0000000..6a32de6 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals/fractals.dat @@ -0,0 +1,10 @@ +Koch Snowflake Fractal +Title of window +"Koch Snowflake" +Number of transformations +4 + A00 A01 A10 A11 B0 B1 +0.33333 0.0 0.0 0.33333 0.0 0.0 +0.16667 -.28868 0.28868 0.16667 0.33333 0.0 +0.16667 0.28868 -.28868 0.16667 0.5 0.28868 +0.33333 0.0 0.0 0.33333 0.66667 0.0 diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Fractals_random.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Fractals_random.dsp new file mode 100755 index 0000000..a19fb4e --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Fractals_random.dsp @@ -0,0 +1,101 @@ +# Microsoft Developer Studio Project File - Name="Fractals_random" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=Fractals_random - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Fractals_random.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Fractals_random.mak" CFG="Fractals_random - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Fractals_random - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "Fractals_random - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Fractals_random - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../Release" + +!ELSEIF "$(CFG)" == "Fractals_random - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../Debug" + +!ENDIF + +# Begin Target + +# Name "Fractals_random - Win32 Release" +# Name "Fractals_random - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\fractals_random.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Fractals_randomStatic.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Fractals_randomStatic.dsp new file mode 100755 index 0000000..49d0bf3 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Fractals_randomStatic.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="Fractals_randomStatic" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=Fractals_randomStatic - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Fractals_randomStatic.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Fractals_randomStatic.mak" CFG="Fractals_randomStatic - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Fractals_randomStatic - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "Fractals_randomStatic - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Fractals_randomStatic - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Fractals_randomStatic___Win32_Release" +# PROP BASE Intermediate_Dir "Fractals_randomStatic___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseStatic" +# PROP Intermediate_Dir "ReleaseStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ReleaseStatic" + +!ELSEIF "$(CFG)" == "Fractals_randomStatic - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Fractals_randomStatic___Win32_Debug" +# PROP BASE Intermediate_Dir "Fractals_randomStatic___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugStatic" +# PROP Intermediate_Dir "DebugStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../DebugStatic" + +!ENDIF + +# Begin Target + +# Name "Fractals_randomStatic - Win32 Release" +# Name "Fractals_randomStatic - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\fractals_random.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Makefile.am new file mode 100755 index 0000000..9dc66b9 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = Fractals_random.dsp fractals.dat fractals_random.c + +noinst_PROGRAMS = fractals_random +fractals_random_SOURCES = fractals_random.c +fractals_random_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +fractals_random_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Makefile.in new file mode 100755 index 0000000..4bf6a7c --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/Makefile.in @@ -0,0 +1,466 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = fractals_random$(EXEEXT) +subdir = progs/demos/Fractals_random +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_fractals_random_OBJECTS = \ + fractals_random-fractals_random.$(OBJEXT) +fractals_random_OBJECTS = $(am_fractals_random_OBJECTS) +fractals_random_LDADD = $(LDADD) +fractals_random_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(fractals_random_CFLAGS) \ + $(CFLAGS) $(fractals_random_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fractals_random_SOURCES) +DIST_SOURCES = $(fractals_random_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = Fractals_random.dsp fractals.dat fractals_random.c +fractals_random_SOURCES = fractals_random.c +fractals_random_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +fractals_random_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/demos/Fractals_random/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/demos/Fractals_random/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +fractals_random$(EXEEXT): $(fractals_random_OBJECTS) $(fractals_random_DEPENDENCIES) + @rm -f fractals_random$(EXEEXT) + $(fractals_random_LINK) $(fractals_random_OBJECTS) $(fractals_random_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fractals_random-fractals_random.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +fractals_random-fractals_random.o: fractals_random.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fractals_random_CFLAGS) $(CFLAGS) -MT fractals_random-fractals_random.o -MD -MP -MF $(DEPDIR)/fractals_random-fractals_random.Tpo -c -o fractals_random-fractals_random.o `test -f 'fractals_random.c' || echo '$(srcdir)/'`fractals_random.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fractals_random-fractals_random.Tpo $(DEPDIR)/fractals_random-fractals_random.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fractals_random.c' object='fractals_random-fractals_random.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fractals_random_CFLAGS) $(CFLAGS) -c -o fractals_random-fractals_random.o `test -f 'fractals_random.c' || echo '$(srcdir)/'`fractals_random.c + +fractals_random-fractals_random.obj: fractals_random.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fractals_random_CFLAGS) $(CFLAGS) -MT fractals_random-fractals_random.obj -MD -MP -MF $(DEPDIR)/fractals_random-fractals_random.Tpo -c -o fractals_random-fractals_random.obj `if test -f 'fractals_random.c'; then $(CYGPATH_W) 'fractals_random.c'; else $(CYGPATH_W) '$(srcdir)/fractals_random.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/fractals_random-fractals_random.Tpo $(DEPDIR)/fractals_random-fractals_random.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fractals_random.c' object='fractals_random-fractals_random.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fractals_random_CFLAGS) $(CFLAGS) -c -o fractals_random-fractals_random.obj `if test -f 'fractals_random.c'; then $(CYGPATH_W) 'fractals_random.c'; else $(CYGPATH_W) '$(srcdir)/fractals_random.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/fractals.dat b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/fractals.dat new file mode 100755 index 0000000..6a32de6 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/fractals.dat @@ -0,0 +1,10 @@ +Koch Snowflake Fractal +Title of window +"Koch Snowflake" +Number of transformations +4 + A00 A01 A10 A11 B0 B1 +0.33333 0.0 0.0 0.33333 0.0 0.0 +0.16667 -.28868 0.28868 0.16667 0.33333 0.0 +0.16667 0.28868 -.28868 0.16667 0.5 0.28868 +0.33333 0.0 0.0 0.33333 0.66667 0.0 diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/fractals_random.c b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/fractals_random.c new file mode 100755 index 0000000..176013f --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Fractals_random/fractals_random.c @@ -0,0 +1,387 @@ +/* fractals_random.c */ +/* This demo shows a single-buffering "freeglut" example. */ + +/* + * Program to draw a fractal by Michael Barnsley's stochastic algorithm. + * Algorithm: + * (1) Define the affine transformations (of the form r(i+1) = A r(i) + b ) + * (2) Find the stationary point for the first transformation + * (3) To draw: + * - Pick a random integer between 1 and the number of transformations (inclusive) + * - Send the current point through the transformation to create the new current point + * - Plot the new current point + */ + +/* + * User Commands: + * PgUp, PgDn - increase/decrease scaling + * Arrow keys - translate viewing section + * r - reset view + * Escape - quit + */ + +#include <GL/freeglut.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> +#ifdef _MSC_VER +/* DUMP MEMORY LEAKS */ +#include <crtdbg.h> +#endif + +typedef struct +{ + double a00, a01, a10, a11 ; /* Transformation matrix */ + double b0, b1 ; /* Constant vector added on */ + double statx, staty ; /* Coordinates of the stationary point */ +} +AffineTrans ; + +/* Number of levels to draw the fractal */ +static int num_levels = 0 ; + +/* The definition of the fractal */ +static int num_trans ; +static AffineTrans *affine ; + +/* the window title */ +char window_title [ 80 ] ; + +/* The amount the view is translated */ +double xwin = 0.0, ywin = 0.0 ; +double scale_factor = 1.0 ; + +/* The current point */ +double current_x = 0.0, current_y = 0.0 ; + +/* Signals when a glClear is needed */ +static GLboolean needClear = GL_TRUE; + +static void draw_level ( int num, double m00, double m01, double m10, double m11, double n0, double n1 ) +{ + /* Draw a fractal transformed by "M", "N" as passed in */ + int i ; + + for ( i = 0; i < 10; i++ ) + { + int random = ( rand( ) >> 10 ) % num_trans; + double new_x = affine[random].a00 * current_x + affine[random].a01 * current_y + affine[random].b0 ; + double new_y = affine[random].a10 * current_x + affine[random].a11 * current_y + affine[random].b1 ; + + glVertex2d ( new_x, new_y ) ; + current_x = new_x ; + current_y = new_y ; + } +} + +static void +Display(void) +{ + if (needClear) { + glClear(GL_COLOR_BUFFER_BIT); + needClear = GL_FALSE; + } + + /* the curve */ + glPushMatrix(); + glScaled(2.5, 2.5, 2.5); + + glColor4f(0.0, 0.0, 0.0, 1.0); + glBegin ( GL_POINTS ) ; + draw_level ( num_levels, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 ); + glEnd () ; + + glPopMatrix(); + + glFlush(); + glutPostRedisplay(); /* Needed so that this function will be called again */ +} + +static void +Reshape(int width, int height) +{ + float ar; + glViewport(0, 0, width, height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + ar = (float) width / (float) height; + if( ar > 1 ) + glFrustum(-ar, ar, -1.0, 1.0, 2.0, 100.0); + else + glFrustum(-1.0, 1.0, -1/ar, 1/ar, 2.0, 100.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + xwin = -1.0 ; + ywin = 0.0 ; + glTranslated(xwin, ywin, -5.0); + needClear = GL_TRUE; +} + +static void +Key(unsigned char key, int x, int y) +{ + int changed_settings = 1; + + switch (key) { + case 27: /* Escape key */ + glutLeaveMainLoop (); + break; + + case 'r' : case 'R' : + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + xwin = -1.0 ; + ywin = 0.0 ; + glTranslated(xwin, ywin, -5.0); + break ; + + default: + changed_settings = 0; + break; + } + if (changed_settings) + needClear = GL_TRUE; + glutPostRedisplay(); +} + +static void +Special(int key, int x, int y) +{ + int changed_settings = 1; + + switch (key) { + case GLUT_KEY_UP : + glMatrixMode(GL_MODELVIEW); + ywin += 0.1 * scale_factor ; + glTranslated(0.0, 0.1 * scale_factor, 0.0); + break ; + + case GLUT_KEY_DOWN : + glMatrixMode(GL_MODELVIEW); + ywin -= 0.1 * scale_factor ; + glTranslated(0.0, -0.1 * scale_factor, 0.0); + break ; + + case GLUT_KEY_LEFT : + glMatrixMode(GL_MODELVIEW); + xwin -= 0.1 * scale_factor ; + glTranslated(-0.1 * scale_factor, 0.0, 0.0); + break ; + + case GLUT_KEY_RIGHT : + glMatrixMode(GL_MODELVIEW); + xwin += 0.1 * scale_factor ; + glTranslated(0.1 * scale_factor, 0.0, 0.0); + break ; + + case GLUT_KEY_PAGE_UP : + glMatrixMode(GL_MODELVIEW); + glTranslated ( -xwin, -ywin, 0.0 ) ; + glScaled(1.25, 1.25, 1.25); + glTranslated ( xwin, ywin, 0.0 ) ; + scale_factor *= 0.8 ; + break ; + + case GLUT_KEY_PAGE_DOWN : + glMatrixMode(GL_MODELVIEW); + glTranslated ( -xwin, -ywin, 0.0 ) ; + glScaled(0.8, 0.8, 0.8); + glTranslated ( xwin, ywin, 0.0 ) ; + scale_factor *= 1.25 ; + break ; + + default: + changed_settings = 0; + break; + } + if (changed_settings) + needClear = GL_TRUE; + + glutPostRedisplay(); +} + + +static int mouse_x = 0, mouse_y = 0 ; +static int button_down = GLUT_DOWN ; + +static void +Mouse ( int button, int updown, int x, int y ) +{ + button_down = updown ; + + if ( updown == GLUT_DOWN ) + { + mouse_x = x ; + mouse_y = y ; + } +} + +static void +MouseMotion ( int x, int y ) +{ + int window_width = glutGet ( GLUT_WINDOW_WIDTH ) ; + int window_height = glutGet ( GLUT_WINDOW_HEIGHT ) ; + int window_size = ( window_width < window_height ) ? window_width : window_height ; + + double delta_x = 5.0 * (double)(x - mouse_x) / (double)(window_size) ; + double delta_y = 5.0 * (double)(y - mouse_y) / (double)(window_size) ; + + xwin += delta_x * scale_factor ; + ywin -= delta_y * scale_factor ; + glMatrixMode ( GL_MODELVIEW ) ; + glTranslated ( delta_x * scale_factor, -delta_y * scale_factor, 0.0 ) ; + + needClear = GL_TRUE; + glutPostRedisplay(); + + mouse_x = x ; + mouse_y = y ; +} + +static void +MouseWheel ( int wheel_number, int direction, int x, int y ) +{ + double scale = ( direction > 0 ) ? 1.25 : 0.8 ; + + glMatrixMode ( GL_MODELVIEW ) ; + glTranslated ( -xwin, -ywin, 0.0 ) ; + glScaled ( scale, scale, scale ) ; + glTranslated ( xwin, ywin, 0.0 ) ; + scale_factor /= scale ; + + needClear = GL_TRUE; + glutPostRedisplay(); +} + + +static void +checkedFGets ( char *s, int size, FILE *stream ) +{ + if ( fgets ( s, size, stream ) == NULL ) { + fprintf ( stderr, "fgets failed\n"); + exit ( EXIT_FAILURE ); + } +} + + +void readConfigFile ( char *fnme ) +{ + FILE *fptr = fopen ( fnme, "rt" ) ; + int i ; + char inputline [ 256 ] ; + + if ( fptr ) + { + /* Read a header line */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + + /* Read a comment line */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + + /* Read the window title */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + /* We assume here that this line will not exceed 79 characters plus a + newline (window_title is 80 characters long). That'll cause a buffer + overflow. For a simple program like this, though, we're letting it + slide! + */ + sscanf ( inputline, "%[a-zA-Z0-9!@#$%^&*()+=/\\_-\" ]", window_title ) ; + + /* Read a comment line */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + + /* Read the number of affine transformations */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + sscanf ( inputline, "%d", &num_trans ) ; + + affine = (AffineTrans *)malloc ( num_trans * sizeof(AffineTrans) ) ; + + /* Read a comment line */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + + for ( i = 0; i < num_trans; i++ ) + { + /* Read an affine transformation definition */ + checkedFGets ( inputline, sizeof ( inputline ), fptr ) ; + sscanf ( inputline, "%lf %lf %lf %lf %lf %lf", &affine[i].a00, &affine[i].a01, + &affine[i].a10, &affine[i].a11, &affine[i].b0, &affine[i].b1 ) ; + } + } + else /* No data file, set a default */ + { + printf ( "ERROR opening file <%s>\n", fnme ) ; + strcpy ( window_title, "Cantor Dust" ) ; + num_trans = 2 ; + affine = (AffineTrans *)malloc ( num_trans * sizeof(AffineTrans) ) ; + affine[0].a00 = 0.25 ; affine[0].a01 = 0.00 ; affine[0].a10 = 0.00 ; affine[0].a11 = 0.25 ; + affine[0].b0 = 0.0 ; affine[0].b1 = 0.0 ; + affine[1].a00 = 0.25 ; affine[1].a01 = 0.00 ; affine[1].a10 = 0.00 ; affine[1].a11 = 0.25 ; + affine[1].b0 = 0.5 ; affine[1].b1 = 0.0 ; + } + + for ( i = 0; i < num_trans; i++ ) + { + double m00, m01, m10, m11 ; /* Matrix "I" minus "A" */ + double determ ; /* Determinant of this matrix */ + + /* Calculate the stationary point */ + + m00 = 1.0 - affine[i].a00 ; + m01 = - affine[i].a01 ; + m10 = - affine[i].a10 ; + m11 = 1.0 - affine[i].a11 ; + + determ = m00 * m11 - m01 * m10 ; + + if ( fabs ( determ ) > 1.e-6 ) + { + affine[i].statx = ( m11 * affine[i].b0 - m01 * affine[i].b1 ) / determ ; + affine[i].staty = ( -m10 * affine[i].b0 + m00 * affine[i].b1 ) / determ ; + } + else + affine[i].statx = affine[i].staty = 0.0 ; + } +} + +int +main(int argc, char *argv[]) +{ + int fractal_window ; + + glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE ); + + glutInitWindowSize(500, 250); + glutInitWindowPosition ( 140, 140 ) ; + glutInit(&argc, argv); + + if ( argc > 1 ) + readConfigFile ( argv[1] ) ; + else + readConfigFile ( "fractals.dat" ) ; + + fractal_window = glutCreateWindow( window_title ); + + glClearColor(1.0, 1.0, 1.0, 1.0); + + glutReshapeFunc(Reshape); + glutKeyboardFunc(Key); + glutSpecialFunc(Special); + glutDisplayFunc(Display); + glutMouseFunc(Mouse); + glutMotionFunc(MouseMotion); + glutMouseWheelFunc(MouseWheel); + + glutMainLoop(); + + printf ( "Back from the 'freeglut' main loop\n" ) ; + + free ( affine ) ; + +#ifdef _MSC_VER + /* DUMP MEMORY LEAK INFORMATION */ + _CrtDumpMemoryLeaks () ; +#endif + + return 0; /* ANSI C requires main to return int. */ +} diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/Makefile.am new file mode 100755 index 0000000..0d61044 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = lorenz.c lorenz.dsp + +noinst_PROGRAMS = lorenz +lorenz_SOURCES = lorenz.c +lorenz_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +lorenz_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/Makefile.in new file mode 100755 index 0000000..8ab2f03 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/Makefile.in @@ -0,0 +1,465 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = lorenz$(EXEEXT) +subdir = progs/demos/Lorenz +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_lorenz_OBJECTS = lorenz-lorenz.$(OBJEXT) +lorenz_OBJECTS = $(am_lorenz_OBJECTS) +lorenz_LDADD = $(LDADD) +lorenz_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(lorenz_CFLAGS) $(CFLAGS) \ + $(lorenz_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(lorenz_SOURCES) +DIST_SOURCES = $(lorenz_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = lorenz.c lorenz.dsp +lorenz_SOURCES = lorenz.c +lorenz_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +lorenz_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/demos/Lorenz/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/demos/Lorenz/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +lorenz$(EXEEXT): $(lorenz_OBJECTS) $(lorenz_DEPENDENCIES) + @rm -f lorenz$(EXEEXT) + $(lorenz_LINK) $(lorenz_OBJECTS) $(lorenz_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lorenz-lorenz.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +lorenz-lorenz.o: lorenz.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lorenz_CFLAGS) $(CFLAGS) -MT lorenz-lorenz.o -MD -MP -MF $(DEPDIR)/lorenz-lorenz.Tpo -c -o lorenz-lorenz.o `test -f 'lorenz.c' || echo '$(srcdir)/'`lorenz.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/lorenz-lorenz.Tpo $(DEPDIR)/lorenz-lorenz.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lorenz.c' object='lorenz-lorenz.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lorenz_CFLAGS) $(CFLAGS) -c -o lorenz-lorenz.o `test -f 'lorenz.c' || echo '$(srcdir)/'`lorenz.c + +lorenz-lorenz.obj: lorenz.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lorenz_CFLAGS) $(CFLAGS) -MT lorenz-lorenz.obj -MD -MP -MF $(DEPDIR)/lorenz-lorenz.Tpo -c -o lorenz-lorenz.obj `if test -f 'lorenz.c'; then $(CYGPATH_W) 'lorenz.c'; else $(CYGPATH_W) '$(srcdir)/lorenz.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/lorenz-lorenz.Tpo $(DEPDIR)/lorenz-lorenz.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lorenz.c' object='lorenz-lorenz.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lorenz_CFLAGS) $(CFLAGS) -c -o lorenz-lorenz.obj `if test -f 'lorenz.c'; then $(CYGPATH_W) 'lorenz.c'; else $(CYGPATH_W) '$(srcdir)/lorenz.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/lorenz.c b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/lorenz.c new file mode 100755 index 0000000..6a816b2 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/lorenz.c @@ -0,0 +1,379 @@ +/* + * Lorenz Strange Attractor + * + * Written by John F. Fay in honor of the "freeglut" 2.0.0 release in July 2003 + * + * What it does: + * This program starts with two particles right next to each other. The particles + * move through a three-dimensional phase space governed by the following equations: + * dx/dt = sigma * ( y - x ) + * dy/dt = r * x - y + x * z + * dz/dt = x * y + b * z + * These are the Lorenz equations and define the "Lorenz Attractor." Any two particles + * arbitrarily close together will move apart as time increases, but their tracks are + * confined within a region of the space. + * + * Commands: + * Arrow keys: Rotate the view + * PgUp, PgDn: Zoom in and out + * Mouse click: Center on the nearest point on a particle trajectory + * + * 'r'/'R': Reset the simulation + * 'm'/'M': Modify the Lorenz parameters (in the text window) + * 's'/'S': Stop (the advancement in time) + * 'g'/'G': Go + * <spacebar>: Single-step + * <Escape>: Quit + */ + +/* Include Files */ +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <math.h> +#include <GL/freeglut.h> +#ifdef _MSC_VER +/* DUMP MEMORY LEAKS */ +#include <crtdbg.h> +#endif + + +/************************************** Defined Constants ***************************************/ +/* Number of points to draw in the curves */ +#define NUM_POINTS 512 + +/* Angle to rotate when the user presses an arrow key */ +#define ROTATION_ANGLE 5.0 + +/* Amount to scale bu when the user presses PgUp or PgDn */ +#define SCALE_FACTOR 0.8 + + +/*************************************** Global Variables ***************************************/ +/* Lorenz Attractor variables */ +double s0 = 10.0, r0 = 28.0, b0 = 8.0/3.0 ; /* Default Lorenz attactor parameters */ +double time_step = 0.03 ; /* Time step in the simulation */ +double sigma = 10.0, r = 28.0, b = 8.0/3.0 ; /* Lorenz attactor parameters */ +double red_position[NUM_POINTS][3] ; /* Path of the red point */ +double grn_position[NUM_POINTS][3] ; /* Path of the green point */ +int array_index ; /* Position in *_position arrays of most recent point */ +double distance = 0.0 ; /* Distance between the two points */ + +/* GLUT variables */ +double yaw = 0.0, pit = 0.0 ; /* Euler angles of the viewing rotation */ +double scale = 1.0 ; /* Scale factor */ +double xcen = 0.0, ycen = 0.0, zcen = 0.0 ; /* Coordinates of the point looked at */ + +int animate = 1 ; /* 0 - stop, 1 = go, 2 = single-step */ + + +/******************************************* Functions ******************************************/ + +/* The Lorenz Attractor */ +void calc_deriv ( double position[3], double deriv[3] ) +{ + /* Calculate the Lorenz attractor derivatives */ + deriv[0] = sigma * ( position[1] - position[0] ) ; + deriv[1] = ( r + position[2] ) * position[0] - position[1] ; + deriv[2] = -position[0] * position[1] - b * position[2] ; +} + +void advance_in_time ( double time_step, double position[3], double new_position[3] ) +{ + /* Move a point along the Lorenz attractor */ + double deriv0[3], deriv1[3], deriv2[3], deriv3[3] ; + int i ; + memcpy ( new_position, position, 3 * sizeof(double) ) ; /* Save the present values */ + + /* First pass in a Fourth-Order Runge-Kutta integration method */ + calc_deriv ( position, deriv0 ) ; + for ( i = 0; i < 3; i++ ) + new_position[i] = position[i] + 0.5 * time_step * deriv0[i] ; + + /* Second pass */ + calc_deriv ( new_position, deriv1 ) ; + for ( i = 0; i < 3; i++ ) + new_position[i] = position[i] + 0.5 * time_step * deriv1[i] ; + + /* Third pass */ + calc_deriv ( position, deriv2 ) ; + for ( i = 0; i < 3; i++ ) + new_position[i] = position[i] + time_step * deriv2[i] ; + + /* Second pass */ + calc_deriv ( new_position, deriv3 ) ; + for ( i = 0; i < 3; i++ ) + new_position[i] = position[i] + 0.1666666666666666667 * time_step * + ( deriv0[i] + 2.0 * ( deriv1[i] + deriv2[i] ) + deriv3[i] ) ; +} + +static void +checkedFGets ( char *s, int size, FILE *stream ) +{ + if ( fgets ( s, size, stream ) == NULL ) { + fprintf ( stderr, "fgets failed\n"); + exit ( EXIT_FAILURE ); + } +} + + +/* GLUT callbacks */ + +#define INPUT_LINE_LENGTH 80 + +void key_cb ( unsigned char key, int x, int y ) +{ + int i ; + char inputline [ INPUT_LINE_LENGTH ] ; + + switch ( key ) + { + case 'r' : case 'R' : /* Reset the simulation */ + /* Reset the Lorenz parameters */ + sigma = s0 ; + b = b0 ; + r = r0 ; + /* Set an initial position */ + red_position[0][0] = (double)rand() / (double)RAND_MAX ; + red_position[0][1] = (double)rand() / (double)RAND_MAX ; + red_position[0][2] = (double)rand() / (double)RAND_MAX ; + grn_position[0][0] = (double)rand() / (double)RAND_MAX ; + grn_position[0][1] = (double)rand() / (double)RAND_MAX ; + grn_position[0][2] = (double)rand() / (double)RAND_MAX ; + array_index = 0 ; + /* Initialize the arrays */ + for ( i = 1; i < NUM_POINTS; i++ ) + { + memcpy ( red_position[i], red_position[0], 3 * sizeof(double) ) ; + memcpy ( grn_position[i], grn_position[0], 3 * sizeof(double) ) ; + } + + break ; + + case 'm' : case 'M' : /* Modify the Lorenz parameters */ + printf ( "Please enter new value for <sigma> (default %f, currently %f): ", s0, sigma ) ; + checkedFGets ( inputline, sizeof ( inputline ), stdin ) ; + sscanf ( inputline, "%lf", &sigma ) ; + + printf ( "Please enter new value for <b> (default %f, currently %f): ", b0, b ) ; + checkedFGets ( inputline, sizeof ( inputline ), stdin ) ; + sscanf ( inputline, "%lf", &b ) ; + + printf ( "Please enter new value for <r> (default %f, currently %f): ", r0, r ) ; + checkedFGets ( inputline, sizeof ( inputline ), stdin ) ; + sscanf ( inputline, "%lf", &r ) ; + + break ; + + case 's' : case 'S' : /* Stop the animation */ + animate = 0 ; + break ; + + case 'g' : case 'G' : /* Start the animation */ + animate = 1 ; + break ; + + case ' ' : /* Spacebar: Single step */ + animate = 2 ; + break ; + + case 27 : /* Escape key */ + glutLeaveMainLoop () ; + break ; + } +} + +void special_cb ( int key, int x, int y ) +{ + switch ( key ) + { + case GLUT_KEY_UP : /* Rotate up a little */ + glRotated ( ROTATION_ANGLE, 0.0, 1.0, 0.0 ) ; + break ; + + case GLUT_KEY_DOWN : /* Rotate down a little */ + glRotated ( -ROTATION_ANGLE, 0.0, 1.0, 0.0 ) ; + break ; + + case GLUT_KEY_LEFT : /* Rotate left a little */ + glRotated ( ROTATION_ANGLE, 0.0, 0.0, 1.0 ) ; + break ; + + case GLUT_KEY_RIGHT : /* Rotate right a little */ + glRotated ( -ROTATION_ANGLE, 0.0, 0.0, 1.0 ) ; + break ; + + case GLUT_KEY_PAGE_UP : /* Zoom in a little */ + glScaled ( 1.0 / SCALE_FACTOR, 1.0 / SCALE_FACTOR, 1.0 / SCALE_FACTOR ) ; + break ; + + case GLUT_KEY_PAGE_DOWN : /* Zoom out a little */ + glScaled ( SCALE_FACTOR, SCALE_FACTOR, SCALE_FACTOR ) ; + break ; + } + + glutPostRedisplay () ; +} + +void mouse_cb ( int button, int updown, int x, int y ) +{ + if ( updown == GLUT_DOWN ) + { + double dist = 1.0e20 ; /* A very large number */ + dist = 0.0 ; /* so we don't get "unused variable" compiler warning */ + /* The idea here is that we go into "pick" mode and pick the nearest point + to the mouse click position. Unfortunately I don't have the time to implement + it at the moment. */ + } +} + +void draw_curve ( int index, double position [ NUM_POINTS ][3] ) +{ + int i = index ; + + glBegin ( GL_LINE_STRIP ) ; + do + { + i = ( i == NUM_POINTS-1 ) ? 0 : i + 1 ; + glVertex3dv ( position[i] ) ; + } + while ( i != index ) ; + + glEnd () ; +} + +void bitmapPrintf (const char *fmt, ...) +{ + static char buf[256]; + va_list args; + + va_start(args, fmt); +#if defined(WIN32) && !defined(__CYGWIN__) + (void) _vsnprintf (buf, sizeof(buf), fmt, args); +#else + (void) vsnprintf (buf, sizeof(buf), fmt, args); +#endif + va_end(args); + glutBitmapString ( GLUT_BITMAP_HELVETICA_12, (unsigned char*)buf ) ; +} + +void display_cb ( void ) +{ + glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ; + + glColor3d ( 1.0, 1.0, 1.0 ) ; /* White */ + /* Draw some axes */ + glBegin ( GL_LINES ) ; + glVertex3d ( 0.0, 0.0, 0.0 ) ; + glVertex3d ( 2.0, 0.0, 0.0 ) ; + glVertex3d ( 0.0, 0.0, 0.0 ) ; + glVertex3d ( 0.0, 1.0, 0.0 ) ; + glVertex3d ( 0.0, 0.0, 0.0 ) ; + glVertex3d ( 0.0, 0.0, 1.0 ) ; + glEnd () ; + + glColor3d ( 1.0, 0.0, 0.0 ) ; /* Red */ + draw_curve ( array_index, red_position ) ; + + glColor3d ( 0.0, 1.0, 0.0 ) ; /* Green */ + draw_curve ( array_index, grn_position ) ; + + /* Print the distance between the two points */ + glColor3d ( 1.0, 1.0, 1.0 ) ; /* White */ + glRasterPos2i ( 1, 1 ) ; + bitmapPrintf ( "Distance: %10.6f", distance ) ; + + glutSwapBuffers(); +} + +void reshape_cb ( int width, int height ) +{ + float ar; + glViewport ( 0, 0, width, height ) ; + glMatrixMode ( GL_PROJECTION ) ; + glLoadIdentity () ; + ar = (float) width / (float) height ; + glFrustum ( -ar, ar, -1.0, 1.0, 10.0, 100.0 ) ; + glMatrixMode ( GL_MODELVIEW ) ; + glLoadIdentity () ; + xcen = 0.0 ; + ycen = 0.0 ; + zcen = 0.0 ; + glTranslated ( xcen, ycen, zcen - 50.0 ) ; +} + + +void timer_cb ( int value ) +{ + /* Function called at regular intervals to update the positions of the points */ + double deltax, deltay, deltaz ; + int new_index = array_index + 1 ; + + /* Set the next timed callback */ + glutTimerFunc ( 30, timer_cb, 0 ) ; + + if ( animate > 0 ) + { + if ( new_index == NUM_POINTS ) new_index = 0 ; + advance_in_time ( time_step, red_position[array_index], red_position[new_index] ) ; + advance_in_time ( time_step, grn_position[array_index], grn_position[new_index] ) ; + array_index = new_index ; + + deltax = red_position[array_index][0] - grn_position[array_index][0] ; + deltay = red_position[array_index][1] - grn_position[array_index][1] ; + deltaz = red_position[array_index][2] - grn_position[array_index][2] ; + distance = sqrt ( deltax * deltax + deltay * deltay + deltaz * deltaz ) ; + + if ( animate == 2 ) animate = 0 ; + } + + glutPostRedisplay () ; +} + + + +/* The Main Program */ + +int main ( int argc, char *argv[] ) +{ + int pargc = argc ; + + /* Initialize the random number generator */ + srand ( 1023 ) ; + + /* Set up the OpenGL parameters */ + glEnable ( GL_DEPTH_TEST ) ; + glClearColor ( 0.0, 0.0, 0.0, 0.0 ) ; + glClearDepth ( 1.0 ) ; + + /* Initialize GLUT */ + glutInitWindowSize ( 600, 600 ) ; + glutInit ( &pargc, argv ) ; + glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ) ; + + /* Create the window */ + glutCreateWindow ( "Lorenz Attractor" ) ; + glutKeyboardFunc ( key_cb ) ; + glutMouseFunc ( mouse_cb ) ; + glutSpecialFunc ( special_cb ) ; + glutDisplayFunc ( display_cb ) ; + glutReshapeFunc ( reshape_cb ) ; + glutTimerFunc ( 30, timer_cb, 0 ) ; + + /* Initialize the attractor: The easiest way is to call the keyboard callback with an + * argument of 'r' for Reset. + */ + key_cb ( 'r', 0, 0 ) ; + + /* Enter the GLUT main loop */ + glutMainLoop () ; + +#ifdef _MSC_VER + /* DUMP MEMORY LEAK INFORMATION */ + _CrtDumpMemoryLeaks () ; +#endif + + return 0 ; +} + diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/lorenz.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/lorenz.dsp new file mode 100755 index 0000000..9b40406 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/lorenz.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="lorenz" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=lorenz - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "lorenz.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "lorenz.mak" CFG="lorenz - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "lorenz - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "lorenz - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "lorenz - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../Release" + +!ELSEIF "$(CFG)" == "lorenz - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../Debug" + +!ENDIF + +# Begin Target + +# Name "lorenz - Win32 Release" +# Name "lorenz - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\lorenz.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/lorenzStatic.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/lorenzStatic.dsp new file mode 100755 index 0000000..0e6a80b --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Lorenz/lorenzStatic.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="lorenzStatic" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=lorenzStatic - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "lorenzStatic.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "lorenzStatic.mak" CFG="lorenzStatic - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "lorenzStatic - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "lorenzStatic - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "lorenzStatic - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "lorenzStatic___Win32_Release" +# PROP BASE Intermediate_Dir "lorenzStatic___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseStatic" +# PROP Intermediate_Dir "ReleaseStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ReleaseStatic" + +!ELSEIF "$(CFG)" == "lorenzStatic - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "lorenzStatic___Win32_Debug" +# PROP BASE Intermediate_Dir "lorenzStatic___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugStatic" +# PROP Intermediate_Dir "DebugStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../DebugStatic" + +!ENDIF + +# Begin Target + +# Name "lorenzStatic - Win32 Release" +# Name "lorenzStatic - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\lorenz.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/demos/Makefile.am new file mode 100755 index 0000000..31c1739 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Makefile.am @@ -0,0 +1,2 @@ +EXTRA_DIST = demos.dsw +SUBDIRS = CallbackMaker Fractals Fractals_random Lorenz One shapes smooth_opengl3 spaceball diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/demos/Makefile.in new file mode 100755 index 0000000..7793255 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/Makefile.in @@ -0,0 +1,496 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = progs/demos +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = demos.dsw +SUBDIRS = CallbackMaker Fractals Fractals_random Lorenz One shapes smooth_opengl3 spaceball +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/demos/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/demos/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/One/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/demos/One/Makefile.am new file mode 100755 index 0000000..7f5906c --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/One/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = one.c one.dsp +noinst_PROGRAMS = one +one_SOURCES = one.c +one_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +one_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/One/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/demos/One/Makefile.in new file mode 100755 index 0000000..9519fc1 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/One/Makefile.in @@ -0,0 +1,465 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = one$(EXEEXT) +subdir = progs/demos/One +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_one_OBJECTS = one-one.$(OBJEXT) +one_OBJECTS = $(am_one_OBJECTS) +one_LDADD = $(LDADD) +one_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(one_CFLAGS) $(CFLAGS) $(one_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(one_SOURCES) +DIST_SOURCES = $(one_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = one.c one.dsp +one_SOURCES = one.c +one_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +one_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/demos/One/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/demos/One/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +one$(EXEEXT): $(one_OBJECTS) $(one_DEPENDENCIES) + @rm -f one$(EXEEXT) + $(one_LINK) $(one_OBJECTS) $(one_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/one-one.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +one-one.o: one.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(one_CFLAGS) $(CFLAGS) -MT one-one.o -MD -MP -MF $(DEPDIR)/one-one.Tpo -c -o one-one.o `test -f 'one.c' || echo '$(srcdir)/'`one.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/one-one.Tpo $(DEPDIR)/one-one.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='one.c' object='one-one.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(one_CFLAGS) $(CFLAGS) -c -o one-one.o `test -f 'one.c' || echo '$(srcdir)/'`one.c + +one-one.obj: one.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(one_CFLAGS) $(CFLAGS) -MT one-one.obj -MD -MP -MF $(DEPDIR)/one-one.Tpo -c -o one-one.obj `if test -f 'one.c'; then $(CYGPATH_W) 'one.c'; else $(CYGPATH_W) '$(srcdir)/one.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/one-one.Tpo $(DEPDIR)/one-one.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='one.c' object='one-one.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(one_CFLAGS) $(CFLAGS) -c -o one-one.obj `if test -f 'one.c'; then $(CYGPATH_W) 'one.c'; else $(CYGPATH_W) '$(srcdir)/one.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/One/one.c b/SixenseSDK/src/sixense_simple3d/progs/demos/One/one.c new file mode 100755 index 0000000..c0f3017 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/One/one.c @@ -0,0 +1,331 @@ +/* + * one.c + * + * Hey! This was the original file where freeglut development started. Just + * note what I have written here at the time. And see the creation date :) + * + * : This is a wrapper. I still have to figure out + * : how to build shared libraries under *nix :) + * + * Copyright (c) 1999 by Pawel W. Olszta + * Written by Pawel W. Olszta, <olszta@sourceforge.net> + * Creation date: czw gru 2 11:58:41 CET 1999 + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stdio.h> +#include <stdlib.h> + +#include <GL/freeglut.h> + +int g_LeaveGameMode = 0; +int g_InGameMode = 1; + +/* + * Call this function to have some text drawn at given coordinates + */ +void PrintText( int nX, int nY, char* pszText ) +{ + int lines; + char *p; + + /* + * Prepare the OpenGL state + */ + glDisable( GL_LIGHTING ); + glDisable( GL_DEPTH_TEST ); + glMatrixMode( GL_PROJECTION ); + glPushMatrix(); + glLoadIdentity(); + + /* + * Have an orthogonal projection matrix set + */ + glOrtho( 0, glutGet( GLUT_WINDOW_WIDTH ), + 0, glutGet( GLUT_WINDOW_HEIGHT ), + -1, +1 + ); + + /* + * Now the matrix mode + */ + glMatrixMode( GL_MODELVIEW ); + glPushMatrix(); + glLoadIdentity(); + + /* + * Now the main text + */ + glColor3ub( 0, 0, 0 ); + glRasterPos2i( nX, nY ); + + for( p=pszText, lines=0; *p; p++ ) + { + if( *p == '\n' ) + { + lines++; + glRasterPos2i( nX, nY-(lines*18) ); + } + + glutBitmapCharacter( GLUT_BITMAP_HELVETICA_18, *p ); + } + + /* + * Revert to the old matrix modes + */ + glMatrixMode( GL_PROJECTION ); + glPopMatrix(); + + glMatrixMode( GL_MODELVIEW ); + glPopMatrix(); + + /* + * Restore the old OpenGL states + */ + glColor4f( 1.0f, 1.0f, 1.0f, 1.0f ); + glEnable( GL_DEPTH_TEST ); + glEnable( GL_LIGHTING ); +} + +/* + * This is the display routine for our sample FreeGLUT windows + */ +static float g_fTime = 0.0f; + +void SampleDisplay( void ) +{ + /* + * Clear the screen + */ + glClearColor( 0, 0.5, 1, 1 ); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + + /* + * Have the cube rotated + */ + glMatrixMode( GL_MODELVIEW ); + glPushMatrix(); + + glRotatef( g_fTime, 0, 0, 1 ); + glRotatef( g_fTime, 0, 1, 0 ); + glRotatef( g_fTime, 1, 0, 0 ); + + /* + * And then drawn... + */ + glColor3f( 1, 1, 0 ); + /* glutWireCube( 20.0 ); */ + glutWireTeapot( 20.0 ); + /* glutWireSpher( 15.0, 15, 15 ); */ + /* glColor3f( 0, 1, 0 ); */ + /* glutWireCube( 30.0 ); */ + /* glutSolidCone( 10, 20, 10, 2 ); */ + + /* + * Don't forget about the model-view matrix + */ + glPopMatrix( ); + + /* + * Draw a silly text + */ + if( g_InGameMode == 0 ) + PrintText( 20, 20, "Hello there cruel world!" ); + else + PrintText( 20, 20, "Press ESC to leave the game mode!" ); + + /* + * And swap this context's buffers + */ + glutSwapBuffers( ); +} + +/* + * This is a sample idle function + */ +void SampleIdle( void ) +{ + g_fTime += 0.5f; + + if( g_LeaveGameMode == 1 ) + { + glutLeaveGameMode( ); + g_LeaveGameMode = 0; + g_InGameMode = 0; + } +} + +/* + * The reshape function + */ +void SampleReshape( int nWidth, int nHeight ) +{ + GLfloat fAspect = (GLfloat) nHeight / (GLfloat) nWidth; + GLfloat fPos[ 4 ] = { 0.0f, 0.0f, 10.0f, 0.0f }; + GLfloat fCol[ 4 ] = { 0.5f, 1.0f, 0.0f, 1.0f }; + + /* + * Update the viewport first + */ + glViewport( 0, 0, nWidth, nHeight ); + + /* + * Then the projection matrix + */ + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + glFrustum( -1.0, 1.0, -fAspect, fAspect, 1.0, 80.0 ); + + /* + * Move back the camera a bit + */ + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity( ); + glTranslatef( 0.0, 0.0, -40.0f ); + + /* + * Enable some features... + */ + glEnable( GL_CULL_FACE ); + glEnable( GL_DEPTH_TEST ); + glEnable( GL_NORMALIZE ); + + /* + * Set up some lighting + */ + glLightfv( GL_LIGHT0, GL_POSITION, fPos ); + glEnable( GL_LIGHTING ); + glEnable( GL_LIGHT0 ); + + /* + * Set up a sample material + */ + glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, fCol ); +} + +/* + * A sample keyboard callback + */ +void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY ) +{ + printf( "SampleKeyboard(): keypress '%c' at (%i,%i)\n", + cChar, nMouseX, nMouseY ); +} + +/* + * A sample keyboard callback (for game mode window) + */ +void SampleGameModeKeyboard( unsigned char cChar, int nMouseX, int nMouseY ) +{ + if( cChar == 27 ) + g_LeaveGameMode = 1; +} + + +/* + * A sample special callback + */ +void SampleSpecial( int nSpecial, int nMouseX, int nMouseY ) +{ + printf( "SampleSpecial(): special keypress %i at (%i,%i)\n", + nSpecial, nMouseX, nMouseY ); +} + +/* + * A sample menu callback + */ +void SampleMenu( int menuID ) +{ + /* + * Just print something funny + */ + printf( "SampleMenu() callback executed, menuID is %i\n", menuID ); +} + +/* + * The sample's entry point + */ +int main( int argc, char** argv ) +{ + int menuID, subMenuA, subMenuB; + + glutInitDisplayString( "stencil~2 rgb double depth>=16 samples" ); + glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); + glutInitWindowPosition( 100, 100 ); + + glutInit( &argc, argv ); + + subMenuA = glutCreateMenu( SampleMenu ); + glutAddMenuEntry( "Sub menu A1 (01)", 1 ); + glutAddMenuEntry( "Sub menu A2 (02)", 2 ); + glutAddMenuEntry( "Sub menu A3 (03)", 3 ); + + subMenuB = glutCreateMenu( SampleMenu ); + glutAddMenuEntry( "Sub menu B1 (04)", 4 ); + glutAddMenuEntry( "Sub menu B2 (05)", 5 ); + glutAddMenuEntry( "Sub menu B3 (06)", 6 ); + glutAddSubMenu( "Going to sub menu A", subMenuA ); + + menuID = glutCreateMenu( SampleMenu ); + glutAddMenuEntry( "Entry one", 1 ); + glutAddMenuEntry( "Entry two", 2 ); + glutAddMenuEntry( "Entry three", 3 ); + glutAddMenuEntry( "Entry four", 4 ); + glutAddMenuEntry( "Entry five", 5 ); + glutAddSubMenu( "Enter sub menu A", subMenuA ); + glutAddSubMenu( "Enter sub menu B", subMenuB ); + + glutCreateWindow( "Hello world!" ); + glutDisplayFunc( SampleDisplay ); + glutReshapeFunc( SampleReshape ); + glutKeyboardFunc( SampleKeyboard ); + glutSpecialFunc( SampleSpecial ); + glutIdleFunc( SampleIdle ); + glutAttachMenu( GLUT_LEFT_BUTTON ); + + glutInitWindowPosition( 200, 200 ); + glutCreateWindow( "I am not Jan B." ); + glutDisplayFunc( SampleDisplay ); + glutReshapeFunc( SampleReshape ); + glutKeyboardFunc( SampleKeyboard ); + glutSpecialFunc( SampleSpecial ); + glutIdleFunc( SampleIdle ); + glutAttachMenu( GLUT_LEFT_BUTTON ); + + printf( "Testing game mode string parsing, don't panic!\n" ); + glutGameModeString( "320x240:32@100" ); + glutGameModeString( "640x480:16@72" ); + glutGameModeString( "1024x768" ); + glutGameModeString( ":32@120" ); + glutGameModeString( "Toudi glupcze, Danwin bedzie moj!" ); + glutGameModeString( "640x480:16@72" ); + + glutEnterGameMode(); + glutDisplayFunc( SampleDisplay ); + glutReshapeFunc( SampleReshape ); + glutKeyboardFunc( SampleGameModeKeyboard ); + glutIdleFunc( SampleIdle ); + glutAttachMenu( GLUT_LEFT_BUTTON ); + + printf( "current window is %ix%i+%i+%i", + glutGet( GLUT_WINDOW_X ), glutGet( GLUT_WINDOW_Y ), + glutGet( GLUT_WINDOW_WIDTH ), glutGet( GLUT_WINDOW_HEIGHT ) + ); + + /* + * Enter the main FreeGLUT processing loop + */ + glutMainLoop(); + + printf( "glutMainLoop() termination works fine!\n" ); + + /* + * This is never reached in FreeGLUT. Is that good? + */ + return EXIT_SUCCESS; +} + +/*** END OF FILE ***/ diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/One/one.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/One/one.dsp new file mode 100755 index 0000000..a89e034 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/One/one.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="one" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=one - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "one.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "one.mak" CFG="one - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "one - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "one - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "one - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../Release" + +!ELSEIF "$(CFG)" == "one - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../Debug" + +!ENDIF + +# Begin Target + +# Name "one - Win32 Release" +# Name "one - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\one.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/One/oneStatic.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/One/oneStatic.dsp new file mode 100755 index 0000000..e582281 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/One/oneStatic.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="oneStatic" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=oneStatic - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "oneStatic.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "oneStatic.mak" CFG="oneStatic - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "oneStatic - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "oneStatic - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "oneStatic - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "oneStatic___Win32_Release" +# PROP BASE Intermediate_Dir "oneStatic___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseStatic" +# PROP Intermediate_Dir "ReleaseStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ReleaseStatic" + +!ELSEIF "$(CFG)" == "oneStatic - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "oneStatic___Win32_Debug" +# PROP BASE Intermediate_Dir "oneStatic___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugStatic" +# PROP Intermediate_Dir "DebugStatic" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../DebugStatic" + +!ENDIF + +# Begin Target + +# Name "oneStatic - Win32 Release" +# Name "oneStatic - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\one.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/demos.dsw b/SixenseSDK/src/sixense_simple3d/progs/demos/demos.dsw new file mode 100755 index 0000000..52b9eee --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/demos.dsw @@ -0,0 +1,197 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CallbackMaker"=.\CallbackMaker\CallbackMaker.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CallbackMakerStatic"=.\CallbackMaker\CallbackMakerStatic.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Fractals"=.\Fractals\Fractals.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "FractalsStatic"=.\Fractals\FractalsStatic.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Fractals_random"=.\Fractals_random\Fractals_random.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Fractals_randomStatic"=.\Fractals_random\Fractals_randomStatic.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "lorenz"=.\Lorenz\lorenz.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "lorenzStatic"=.\lorenz\lorenzStatic.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "one"=.\One\one.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "oneStatic"=.\one\oneStatic.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "shapes"=.\shapes\shapes.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "shapesStatic"=.\shapes\shapesStatic.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "smooth_opengl3"=.\smooth_opengl3\smooth_opengl3.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "spaceball"=.\spaceball\spaceball.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "spaceball_static"=.\spaceball\spaceball_static.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/Makefile.am new file mode 100755 index 0000000..f44415c --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = shapes.c shapes.dsp +noinst_PROGRAMS = shapes +shapes_SOURCES = shapes.c +shapes_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +shapes_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/Makefile.in new file mode 100755 index 0000000..59a6ce5 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/Makefile.in @@ -0,0 +1,465 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = shapes$(EXEEXT) +subdir = progs/demos/shapes +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_shapes_OBJECTS = shapes-shapes.$(OBJEXT) +shapes_OBJECTS = $(am_shapes_OBJECTS) +shapes_LDADD = $(LDADD) +shapes_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(shapes_CFLAGS) $(CFLAGS) \ + $(shapes_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(shapes_SOURCES) +DIST_SOURCES = $(shapes_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = shapes.c shapes.dsp +shapes_SOURCES = shapes.c +shapes_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +shapes_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/demos/shapes/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/demos/shapes/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +shapes$(EXEEXT): $(shapes_OBJECTS) $(shapes_DEPENDENCIES) + @rm -f shapes$(EXEEXT) + $(shapes_LINK) $(shapes_OBJECTS) $(shapes_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shapes-shapes.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +shapes-shapes.o: shapes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(shapes_CFLAGS) $(CFLAGS) -MT shapes-shapes.o -MD -MP -MF $(DEPDIR)/shapes-shapes.Tpo -c -o shapes-shapes.o `test -f 'shapes.c' || echo '$(srcdir)/'`shapes.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/shapes-shapes.Tpo $(DEPDIR)/shapes-shapes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='shapes.c' object='shapes-shapes.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(shapes_CFLAGS) $(CFLAGS) -c -o shapes-shapes.o `test -f 'shapes.c' || echo '$(srcdir)/'`shapes.c + +shapes-shapes.obj: shapes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(shapes_CFLAGS) $(CFLAGS) -MT shapes-shapes.obj -MD -MP -MF $(DEPDIR)/shapes-shapes.Tpo -c -o shapes-shapes.obj `if test -f 'shapes.c'; then $(CYGPATH_W) 'shapes.c'; else $(CYGPATH_W) '$(srcdir)/shapes.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/shapes-shapes.Tpo $(DEPDIR)/shapes-shapes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='shapes.c' object='shapes-shapes.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(shapes_CFLAGS) $(CFLAGS) -c -o shapes-shapes.obj `if test -f 'shapes.c'; then $(CYGPATH_W) 'shapes.c'; else $(CYGPATH_W) '$(srcdir)/shapes.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/shapes.c b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/shapes.c new file mode 100755 index 0000000..da32e0b --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/shapes.c @@ -0,0 +1,408 @@ +/*! \file shapes.c + \ingroup demos + + This program is a test harness for the various shapes + in OpenGLUT. It may also be useful to see which + parameters control what behavior in the OpenGLUT + objects. + + Spinning wireframe and solid-shaded shapes are + displayed. Some parameters can be adjusted. + + Keys: + - <tt>Esc </tt> Quit + - <tt>q Q </tt> Quit + - <tt>i I </tt> Show info + - <tt>= + </tt> Increase \a slices + - <tt>- _ </tt> Decreate \a slices + - <tt>, < </tt> Decreate \a stacks + - <tt>. > </tt> Increase \a stacks + - <tt>9 ( </tt> Decreate \a depth (Sierpinski Sponge) + - <tt>0 ) </tt> Increase \a depth (Sierpinski Sponge) + - <tt>up </tt> Increase "outer radius" + - <tt>down </tt> Decrease "outer radius" + - <tt>left </tt> Decrease "inner radius" + - <tt>right</tt> Increase "inner radius" + - <tt>PgUp </tt> Next shape-drawing function + - <tt>PgDn </tt> Prev shape-drawing function + + \author Written by Nigel Stewart November 2003 + + \author Portions Copyright (C) 2004, the OpenGLUT project contributors. <br> + OpenGLUT branched from freeglut in February, 2004. + + \image html openglut_shapes.png OpenGLUT Geometric Shapes Demonstration + \include demos/shapes/shapes.c +*/ + +#include <GL/freeglut.h> + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +#ifdef _MSC_VER +/* DUMP MEMORY LEAKS */ +#include <crtdbg.h> +#endif + +/* + * This macro is only intended to be used on arrays, of course. + */ +#define NUMBEROF(x) ((sizeof(x))/(sizeof(x[0]))) + +/* + * These global variables control which object is drawn, + * and how it is drawn. No object uses all of these + * variables. + */ +static int function_index; +static int slices = 16; +static int stacks = 16; +static double irad = .25; +static double orad = 1.0; +static int depth = 4; +static double offset[ 3 ] = { 0, 0, 0 }; +static GLboolean show_info = GL_TRUE; + +/* + * These one-liners draw particular objects, fetching appropriate + * information from the above globals. They are just thin wrappers + * for the OpenGLUT objects. + */ +static void drawSolidTetrahedron(void) { glutSolidTetrahedron (); } +static void drawWireTetrahedron(void) { glutWireTetrahedron (); } +static void drawSolidCube(void) { glutSolidCube(1); } +static void drawWireCube(void) { glutWireCube(1); } +static void drawSolidOctahedron(void) { glutSolidOctahedron (); } +static void drawWireOctahedron(void) { glutWireOctahedron (); } +static void drawSolidDodecahedron(void) { glutSolidDodecahedron (); } +static void drawWireDodecahedron(void) { glutWireDodecahedron (); } +static void drawSolidRhombicDodecahedron(void) { glutSolidRhombicDodecahedron (); } +static void drawWireRhombicDodecahedron(void) { glutWireRhombicDodecahedron (); } +static void drawSolidIcosahedron(void) { glutSolidIcosahedron (); } +static void drawWireIcosahedron(void) { glutWireIcosahedron (); } +static void drawSolidSierpinskiSponge(void) { glutSolidSierpinskiSponge (depth, offset, 1); } +static void drawWireSierpinskiSponge(void) { glutWireSierpinskiSponge (depth, offset, 1); } +static void drawSolidTeapot(void) { glutSolidTeapot(1); } +static void drawWireTeapot(void) { glutWireTeapot(1); } +static void drawSolidTorus(void) { glutSolidTorus(irad,orad,slices,stacks); } +static void drawWireTorus(void) { glutWireTorus (irad,orad,slices,stacks); } +static void drawSolidSphere(void) { glutSolidSphere(1,slices,stacks); } +static void drawWireSphere(void) { glutWireSphere(1,slices,stacks); } +static void drawSolidCone(void) { glutSolidCone(1,1,slices,stacks); } +static void drawWireCone(void) { glutWireCone(1,1,slices,stacks); } +static void drawSolidCylinder(void) { glutSolidCylinder(1,1,slices,stacks); } +static void drawWireCylinder(void) { glutWireCylinder(1,1,slices,stacks); } + +#define RADIUS 1.0f + +static void drawSolidCuboctahedron(void) +{ + glBegin( GL_TRIANGLES ); + glNormal3d( 0.577350269189, 0.577350269189, 0.577350269189); glVertex3d( RADIUS, RADIUS, 0.0 ); glVertex3d( 0.0, RADIUS, RADIUS ); glVertex3d( RADIUS, 0.0, RADIUS ); + glNormal3d( 0.577350269189, 0.577350269189,-0.577350269189); glVertex3d( RADIUS, RADIUS, 0.0 ); glVertex3d( RADIUS, 0.0,-RADIUS ); glVertex3d( 0.0, RADIUS,-RADIUS ); + glNormal3d( 0.577350269189,-0.577350269189, 0.577350269189); glVertex3d( RADIUS,-RADIUS, 0.0 ); glVertex3d( RADIUS, 0.0, RADIUS ); glVertex3d( 0.0,-RADIUS, RADIUS ); + glNormal3d( 0.577350269189,-0.577350269189,-0.577350269189); glVertex3d( RADIUS,-RADIUS, 0.0 ); glVertex3d( 0.0,-RADIUS,-RADIUS ); glVertex3d( RADIUS, 0.0,-RADIUS ); + glNormal3d(-0.577350269189, 0.577350269189, 0.577350269189); glVertex3d(-RADIUS, RADIUS, 0.0 ); glVertex3d(-RADIUS, 0.0, RADIUS ); glVertex3d( 0.0, RADIUS, RADIUS ); + glNormal3d(-0.577350269189, 0.577350269189,-0.577350269189); glVertex3d(-RADIUS, RADIUS, 0.0 ); glVertex3d( 0.0, RADIUS,-RADIUS ); glVertex3d(-RADIUS, 0.0,-RADIUS ); + glNormal3d(-0.577350269189,-0.577350269189, 0.577350269189); glVertex3d(-RADIUS,-RADIUS, 0.0 ); glVertex3d( 0.0,-RADIUS, RADIUS ); glVertex3d(-RADIUS, 0.0, RADIUS ); + glNormal3d(-0.577350269189,-0.577350269189,-0.577350269189); glVertex3d(-RADIUS,-RADIUS, 0.0 ); glVertex3d(-RADIUS, 0.0,-RADIUS ); glVertex3d( 0.0,-RADIUS,-RADIUS ); + glEnd(); + + glBegin( GL_QUADS ); + glNormal3d( 1.0, 0.0, 0.0 ); glVertex3d( RADIUS, RADIUS, 0.0 ); glVertex3d( RADIUS, 0.0, RADIUS ); glVertex3d( RADIUS,-RADIUS, 0.0 ); glVertex3d( RADIUS, 0.0,-RADIUS ); + glNormal3d(-1.0, 0.0, 0.0 ); glVertex3d(-RADIUS, RADIUS, 0.0 ); glVertex3d(-RADIUS, 0.0,-RADIUS ); glVertex3d(-RADIUS,-RADIUS, 0.0 ); glVertex3d(-RADIUS, 0.0, RADIUS ); + glNormal3d( 0.0, 1.0, 0.0 ); glVertex3d( RADIUS, RADIUS, 0.0 ); glVertex3d( 0.0, RADIUS,-RADIUS ); glVertex3d(-RADIUS, RADIUS, 0.0 ); glVertex3d( 0.0, RADIUS, RADIUS ); + glNormal3d( 0.0,-1.0, 0.0 ); glVertex3d( RADIUS,-RADIUS, 0.0 ); glVertex3d( 0.0,-RADIUS, RADIUS ); glVertex3d(-RADIUS,-RADIUS, 0.0 ); glVertex3d( 0.0,-RADIUS,-RADIUS ); + glNormal3d( 0.0, 0.0, 1.0 ); glVertex3d( RADIUS, 0.0, RADIUS ); glVertex3d( 0.0, RADIUS, RADIUS ); glVertex3d(-RADIUS, 0.0, RADIUS ); glVertex3d( 0.0,-RADIUS, RADIUS ); + glNormal3d( 0.0, 0.0,-1.0 ); glVertex3d( RADIUS, 0.0,-RADIUS ); glVertex3d( 0.0,-RADIUS,-RADIUS ); glVertex3d(-RADIUS, 0.0,-RADIUS ); glVertex3d( 0.0, RADIUS,-RADIUS ); + glEnd(); +} + +static void drawWireCuboctahedron(void) +{ + glBegin( GL_LINE_LOOP ); + glNormal3d( 1.0, 0.0, 0.0 ); glVertex3d( RADIUS, RADIUS, 0.0 ); glVertex3d( RADIUS, 0.0, RADIUS ); glVertex3d( RADIUS,-RADIUS, 0.0 ); glVertex3d( RADIUS, 0.0,-RADIUS ); + glEnd(); + glBegin( GL_LINE_LOOP ); + glNormal3d(-1.0, 0.0, 0.0 ); glVertex3d(-RADIUS, RADIUS, 0.0 ); glVertex3d(-RADIUS, 0.0,-RADIUS ); glVertex3d(-RADIUS,-RADIUS, 0.0 ); glVertex3d(-RADIUS, 0.0, RADIUS ); + glEnd(); + glBegin( GL_LINE_LOOP ); + glNormal3d( 0.0, 1.0, 0.0 ); glVertex3d( RADIUS, RADIUS, 0.0 ); glVertex3d( 0.0, RADIUS,-RADIUS ); glVertex3d(-RADIUS, RADIUS, 0.0 ); glVertex3d( 0.0, RADIUS, RADIUS ); + glEnd(); + glBegin( GL_LINE_LOOP ); + glNormal3d( 0.0,-1.0, 0.0 ); glVertex3d( RADIUS,-RADIUS, 0.0 ); glVertex3d( 0.0,-RADIUS, RADIUS ); glVertex3d(-RADIUS,-RADIUS, 0.0 ); glVertex3d( 0.0,-RADIUS,-RADIUS ); + glEnd(); + glBegin( GL_LINE_LOOP ); + glNormal3d( 0.0, 0.0, 1.0 ); glVertex3d( RADIUS, 0.0, RADIUS ); glVertex3d( 0.0, RADIUS, RADIUS ); glVertex3d(-RADIUS, 0.0, RADIUS ); glVertex3d( 0.0,-RADIUS, RADIUS ); + glEnd(); + glBegin( GL_LINE_LOOP ); + glNormal3d( 0.0, 0.0,-1.0 ); glVertex3d( RADIUS, 0.0,-RADIUS ); glVertex3d( 0.0,-RADIUS,-RADIUS ); glVertex3d(-RADIUS, 0.0,-RADIUS ); glVertex3d( 0.0, RADIUS,-RADIUS ); + glEnd(); +} + +#undef RADIUS + +/* + * This structure defines an entry in our function-table. + */ +typedef struct +{ + const char * const name; + void (*solid) (void); + void (*wire) (void); +} entry; + +#define ENTRY(e) {#e, drawSolid##e, drawWire##e} +static const entry table [] = +{ + ENTRY (Tetrahedron), + ENTRY (Cube), + ENTRY (Octahedron), + ENTRY (Dodecahedron), + ENTRY (RhombicDodecahedron), + ENTRY (Icosahedron), + ENTRY (SierpinskiSponge), + ENTRY (Teapot), + ENTRY (Torus), + ENTRY (Sphere), + ENTRY (Cone), + ENTRY (Cylinder), + ENTRY (Cuboctahedron) +}; +#undef ENTRY + +/*! + Does printf()-like work using freeglut/OpenGLUT + glutBitmapString(). Uses a fixed font. Prints + at the indicated row/column position. + + Limitation: Cannot address pixels. + Limitation: Renders in screen coords, not model coords. +*/ +static void shapesPrintf (int row, int col, const char *fmt, ...) +{ + static char buf[256]; + int viewport[4]; + void *font = GLUT_BITMAP_9_BY_15; + va_list args; + + va_start(args, fmt); +#if defined(WIN32) && !defined(__CYGWIN__) + (void) _vsnprintf (buf, sizeof(buf), fmt, args); +#else + (void) vsnprintf (buf, sizeof(buf), fmt, args); +#endif + va_end(args); + + glGetIntegerv(GL_VIEWPORT,viewport); + + glPushMatrix(); + glLoadIdentity(); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + + glOrtho(0,viewport[2],0,viewport[3],-1,1); + + glRasterPos2i + ( + glutBitmapWidth(font, ' ') * col, + - glutBitmapHeight(font) * (row+2) + viewport[3] + ); + glutBitmapString (font, (unsigned char*)buf); + + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); +} + +/* GLUT callback Handlers */ + +static void +resize(int width, int height) +{ + const float ar = (float) width / (float) height; + + glViewport(0, 0, width, height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-ar, ar, -1.0, 1.0, 2.0, 100.0); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity() ; +} + +static void display(void) +{ + const double t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; + const double a = t*90.0; + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glEnable(GL_LIGHTING); + + glColor3d(1,0,0); + + glPushMatrix(); + glTranslated(0,1.2,-6); + glRotated(60,1,0,0); + glRotated(a,0,0,1); + table [function_index].solid (); + glPopMatrix(); + + glPushMatrix(); + glTranslated(0,-1.2,-6); + glRotated(60,1,0,0); + glRotated(a,0,0,1); + table [function_index].wire (); + glPopMatrix(); + + glDisable(GL_LIGHTING); + glColor3d(0.1,0.1,0.4); + + if( show_info ) { + shapesPrintf (1, 3, "Shape PgUp PgDn: %s", table [function_index].name); + shapesPrintf (2, 3, "Slices +-: %d Stacks <>: %d", slices, stacks); + shapesPrintf (3, 3, "nSides +-: %d nRings <>: %d", slices, stacks); + shapesPrintf (4, 3, "Depth (): %d", depth); + shapesPrintf (5, 3, "Outer radius Up Down : %f", orad); + shapesPrintf (6, 3, "Inner radius Left Right: %f", irad); + } else { + printf ( "Shape %d slides %d stacks %d\n", function_index, slices, stacks ) ; + } + + glutSwapBuffers(); +} + + +static void +key(unsigned char key, int x, int y) +{ + switch (key) + { + case 27 : + case 'Q': + case 'q': glutLeaveMainLoop () ; break; + + case 'I': + case 'i': show_info = ( show_info == GL_TRUE ) ? GL_FALSE : GL_TRUE; break; + + case '=': + case '+': slices++; break; + + case '-': + case '_': if( slices > -1 ) slices--; break; + + case ',': + case '<': if( stacks > -1 ) stacks--; break; + + case '.': + case '>': stacks++; break; + + case '9': + case '(': if( depth > -1 ) depth--; break; + + case '0': + case ')': ++depth; break; + + default: + break; + } + + glutPostRedisplay(); +} + +static void special (int key, int x, int y) +{ + switch (key) + { + case GLUT_KEY_PAGE_UP: ++function_index; break; + case GLUT_KEY_PAGE_DOWN: --function_index; break; + case GLUT_KEY_UP: orad *= 2; break; + case GLUT_KEY_DOWN: orad /= 2; break; + + case GLUT_KEY_RIGHT: irad *= 2; break; + case GLUT_KEY_LEFT: irad /= 2; break; + + default: + break; + } + + if (0 > function_index) + function_index = NUMBEROF (table) - 1; + + if (NUMBEROF (table) <= ( unsigned )function_index) + function_index = 0; +} + + +static void +idle(void) +{ + glutPostRedisplay(); +} + +const GLfloat light_ambient[] = { 0.0f, 0.0f, 0.0f, 1.0f }; +const GLfloat light_diffuse[] = { 1.0f, 1.0f, 1.0f, 1.0f }; +const GLfloat light_specular[] = { 1.0f, 1.0f, 1.0f, 1.0f }; +const GLfloat light_position[] = { 2.0f, 5.0f, 5.0f, 0.0f }; + +const GLfloat mat_ambient[] = { 0.7f, 0.7f, 0.7f, 1.0f }; +const GLfloat mat_diffuse[] = { 0.8f, 0.8f, 0.8f, 1.0f }; +const GLfloat mat_specular[] = { 1.0f, 1.0f, 1.0f, 1.0f }; +const GLfloat high_shininess[] = { 100.0f }; + +/* Program entry point */ + +int +main(int argc, char *argv[]) +{ + glutInitWindowSize(640,480); + glutInitWindowPosition(40,40); + glutInit(&argc, argv); + glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE); + + glutCreateWindow("OpenGLUT Shapes"); + + glutReshapeFunc(resize); + glutDisplayFunc(display); + glutKeyboardFunc(key); + glutSpecialFunc(special); + glutIdleFunc(idle); + + glutSetOption ( GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION ) ; + + glClearColor(1,1,1,1); + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); + + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LESS); + + glEnable(GL_LIGHT0); + glEnable(GL_NORMALIZE); + glEnable(GL_COLOR_MATERIAL); + + glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); + glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); + glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); + glLightfv(GL_LIGHT0, GL_POSITION, light_position); + + glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); + glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); + glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); + glMaterialfv(GL_FRONT, GL_SHININESS, high_shininess); + + glutMainLoop(); + +#ifdef _MSC_VER + /* DUMP MEMORY LEAK INFORMATION */ + _CrtDumpMemoryLeaks () ; +#endif + + return EXIT_SUCCESS; +} diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/shapes.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/shapes.dsp new file mode 100755 index 0000000..4a6ad5a --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/shapes.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="shapes" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=shapes - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "shapes.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "shapes.mak" CFG="shapes - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "shapes - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "shapes - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "shapes - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../Release" + +!ELSEIF "$(CFG)" == "shapes - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../Debug" + +!ENDIF + +# Begin Target + +# Name "shapes - Win32 Release" +# Name "shapes - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\shapes.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/shapesStatic.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/shapesStatic.dsp new file mode 100755 index 0000000..5811bbe --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/shapes/shapesStatic.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="shapesStatic" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=shapesStatic - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "shapesStatic.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "shapesStatic.mak" CFG="shapesStatic - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "shapesStatic - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "shapesStatic - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "shapesStatic - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "shapesStatic___Win32_Release" +# PROP BASE Intermediate_Dir "shapesStatic___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseStatic" +# PROP Intermediate_Dir "ReleaseStatic" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ReleaseStatic" + +!ELSEIF "$(CFG)" == "shapesStatic - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "shapesStatic___Win32_Debug" +# PROP BASE Intermediate_Dir "shapesStatic___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugStatic" +# PROP Intermediate_Dir "DebugStatic" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../DebugStatic" + +!ENDIF + +# Begin Target + +# Name "shapesStatic - Win32 Release" +# Name "shapesStatic - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\shapes.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/sixense_simple3d/sixense_simple3d.c b/SixenseSDK/src/sixense_simple3d/progs/demos/sixense_simple3d/sixense_simple3d.c new file mode 100755 index 0000000..c11b284 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/sixense_simple3d/sixense_simple3d.c @@ -0,0 +1,899 @@ +#include <GL/freeglut.h> + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +#include <sixense.h> +#include <sixense_math.hpp> +#ifdef WIN32 +#include <sixense_utils/mouse_pointer.hpp> +#endif +#include <sixense_utils/derivatives.hpp> +#include <sixense_utils/button_states.hpp> +#include <sixense_utils/event_triggers.hpp> +#include <sixense_utils/controller_manager/controller_manager.hpp> + +#include <deque> + +// whether or not we are currently logging position data to a file, and the file pointer to which to log +static int is_logging = 0; +static FILE *log_file = 0; + +// whether or not to write the current controller positions on the screen. +static int display_pos_enabled = 0; + +// Zoom factor for the camera, press [ and ] to zoom in or out +static float camera_dist = 1.0f; + +// The current mode of the real-time graph display +static int graph_mode = 0; // 0 == off, 1 == pos, 2 == vel, 3 == accel +static bool graph_paused = false; +static bool auto_graph_bounds = false; +static float graph_bounds[2] = {-750, 750}; + +// flags that the controller manager system can set to tell the graphics system to draw the instructions +// for the player +static bool controller_manager_screen_visible = true; +std::string controller_manager_text_string; + +// these are used by the graphics to highlight one of the controller 3d objects for a number of frames +static int flash_left_controller_frames=0, flash_right_controller_frames=0; + +// pressing 'm' turns on drawing of 2d mouse cursors controlled by each controller +static bool draw_mouse_pointers_enabled = false; +static float left_mouse_pos[2]={0,0}, right_mouse_pos[2]={0,0}; +static float left_mouse_roll=0.0f, right_mouse_roll=0.0f; + +// Log a number of samples for graphing +const int log_history_size = 1000; +std::deque<sixenseMath::Vector3> pos_hist, vel_hist, accel_hist; + + +// Draw a text string, at the given row, column +static void shapesPrintf (int row, int col, const char *fmt, ...) +{ + static char buf[256]; + int viewport[4]; + void *font = GLUT_BITMAP_HELVETICA_12; + va_list args; + + va_start(args, fmt); +#if defined(WIN32) && !defined(__CYGWIN__) + (void) _vsnprintf (buf, sizeof(buf), fmt, args); +#else + (void) vsnprintf (buf, sizeof(buf), fmt, args); +#endif + va_end(args); + + glGetIntegerv(GL_VIEWPORT,viewport); + + glPushMatrix(); + glLoadIdentity(); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + + glOrtho(0,viewport[2],0,viewport[3],-1,1); + + glRasterPos2i + ( + glutBitmapWidth(font, ' ') * col, + - glutBitmapHeight(font) * (row+0) + viewport[3] + ); + glutBitmapString (font, (unsigned char*)buf); + + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); +} + +// Draw a text string, centered in the middle of the screen +static void shapesPrintfCentered (const char *fmt, ...) +{ + static char buf[256]; + int viewport[4]; + void *font = GLUT_BITMAP_HELVETICA_12; + va_list args; + + va_start(args, fmt); +#if defined(WIN32) && !defined(__CYGWIN__) + (void) _vsnprintf (buf, sizeof(buf), fmt, args); +#else + (void) vsnprintf (buf, sizeof(buf), fmt, args); +#endif + va_end(args); + + glGetIntegerv(GL_VIEWPORT,viewport); + + glPushMatrix(); + glLoadIdentity(); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + + glOrtho(0,viewport[2],0,viewport[3],-1,1); + + glRasterPos2i + ( + viewport[2]/2 - glutBitmapLength(font, (unsigned char*)buf)/2, + viewport[3]/2 - glutBitmapHeight(font)/2 + ); + glutBitmapString (font, (unsigned char*)buf); + + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); +} + +// Handle resizing of the window +static void resize(int width, int height) +{ + const float ar = (float) width / (float) height; + + glViewport(0, 0, width, height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-ar, ar, -1.0, 1.0, 2.0, 100.0); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity() ; +} + +// Write the current controller position data point to a log file +static void updateLog() { + int base, cont; + sixenseAllControllerData acd; + + if( log_file ) { + + for( base=0; base<sixenseGetMaxBases(); base++ ) { + sixenseSetActiveBase(base); + + sixenseGetAllNewestData( &acd ); + + for( cont=0; cont<sixenseGetMaxControllers(); cont++ ) { + + if( sixenseIsControllerEnabled( cont ) ) { + + fprintf( log_file, "base: %d controller: %d ", base, cont ); + + fprintf( log_file, "pos: %f %f %f ", acd.controllers[cont].pos[0], acd.controllers[cont].pos[1], acd.controllers[cont].pos[2] ); + fprintf( log_file, "rot_mat: %f %f %f %f %f %f %f %f %f", + acd.controllers[cont].rot_mat[0][0], acd.controllers[cont].rot_mat[0][1], acd.controllers[cont].rot_mat[0][2], + acd.controllers[cont].rot_mat[1][0], acd.controllers[cont].rot_mat[1][1], acd.controllers[cont].rot_mat[1][2], + acd.controllers[cont].rot_mat[2][0], acd.controllers[cont].rot_mat[2][1], acd.controllers[cont].rot_mat[2][2] ); + + fprintf( log_file, "\n" ); + + } + + } + } + + + } +} + + +// Draw the two 3d objects representing the controllers +static void drawObjects() { + int base, cont, i, j; + sixenseAllControllerData acd; + float rot_mat[4][4]; + float colors[4][3] = { + 1.0f, 0.0f, 0.0f, + 0.8f, 0.8f, 0.0f, + 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 1.0f }; + + int left_index = sixenseUtils::getTheControllerManager()->getIndex( sixenseUtils::ControllerManager::P1L ); + int right_index = sixenseUtils::getTheControllerManager()->getIndex( sixenseUtils::ControllerManager::P1R ); + + // Go through each of the connected systems + for( base=0; base<sixenseGetMaxBases(); base++ ) { + sixenseSetActiveBase(base); + + // Get the latest controller data + sixenseGetAllNewestData( &acd ); + + // For each possible controller + for( cont=0; cont<sixenseGetMaxControllers(); cont++ ) { + + // See if it's enabled + if( sixenseIsControllerEnabled( cont ) ) { + + // Set up the color of the object. If we're flashing this controller, set a color additive + float flash_multiplier = 0.0f; + + if( cont == left_index ) { // if this is the left controller + if( flash_left_controller_frames ) { // and we're supposed to flash the left controller + flash_left_controller_frames--; + + flash_multiplier = 0.2f; + } + } + + if( cont == right_index ) { // if this is the left controller + if( flash_right_controller_frames ) { // and we're supposed to flash the left controller + flash_right_controller_frames--; + + flash_multiplier = 0.2f; + } + } + + // draw one hand darker than the other one + if( cont == 0 ) { + glColor3d(colors[base][0]+flash_multiplier, colors[base][1]+flash_multiplier, colors[base][2]+flash_multiplier ); + } else { + glColor3d(0.6f*colors[base][0]+flash_multiplier, 0.6f*colors[base][1]+flash_multiplier, 0.6f*colors[base][2]+flash_multiplier ); + } + + glPushMatrix(); + for( i=0; i<3; i++ ) + for( j=0; j<3; j++ ) + rot_mat[i][j] = acd.controllers[cont].rot_mat[i][j]; + + rot_mat[0][3] = 0.0f; + rot_mat[1][3] = 0.0f; + rot_mat[2][3] = 0.0f; + rot_mat[3][0] = acd.controllers[cont].pos[0]/500.0f; + rot_mat[3][1] = acd.controllers[cont].pos[1]/500.0f; + rot_mat[3][2] = acd.controllers[cont].pos[2]/500.0f; + rot_mat[3][3] = 1.0f; + + glMultMatrixf( (GLfloat*)rot_mat ); + glScaled( 0.15f, 0.15f, 0.15f ); + + + glutSolidSphere( 1, 5, 5 ); + glTranslated( 0, 0, -12 ); + glutSolidCylinder( 0.5, 12, 5, 5 ); + + + glPopMatrix(); + + } + } + } +} + + +// Compute the velocity and acceleration and keep them in a list +void collectDataForGraph() +{ + if( graph_paused ) return; + + // Get the latest data for the left controller + int left_index = sixenseUtils::getTheControllerManager()->getIndex( sixenseUtils::ControllerManager::P1L ); + sixenseControllerData cd; + sixenseGetNewestData( left_index, &cd ); + + // Use a sixenseUtils::Derivatives object to compute velocity and acceleration from the position + static sixenseUtils::Derivatives derivs; + + // update the derivative object + derivs.update( &cd ); + + // Push the newest derivative computations onto the history queue + pos_hist.push_back( sixenseMath::Vector3( cd.pos ) ); + vel_hist.push_back( derivs.getVelocity() ); + accel_hist.push_back( derivs.getAcceleration() ); + + // Constrain the queues to a maximum size + if( vel_hist.size() > log_history_size ) { + vel_hist.pop_front(); + } + + if( accel_hist.size() > log_history_size ) { + accel_hist.pop_front(); + } + + if( pos_hist.size() > log_history_size ) { + pos_hist.pop_front(); + } + +} + +// Draw a plot line of the sequence of values. Dynmically fit the y axis to keep the lines on the screen +// regardless of their range. +void drawGraph( std::deque<sixenseMath::Vector3> &hist_list ) { + + // Keep track of the y bounds of the graph. These will change with time to dynamically + // fit the full y range on the screen + static float graph_min_y = graph_bounds[0], graph_max_y = graph_bounds[1]; + + if( auto_graph_bounds ) { + + // Go through all the elements in the list and get the max and min of the y coordinate + + float pad_scale = 0.1f; + float new_min_y = 99999.0f, new_max_y = -99999.0f; + + for( int i=0; i<(int)hist_list.size(); i++ ) { + for( int axis=0; axis<3; axis++ ) { + if( hist_list[i][axis] < new_min_y ) new_min_y = hist_list[i][axis]; + if( hist_list[i][axis] > new_max_y ) new_max_y = hist_list[i][axis]; + } + } + + // Add some padding to the range + float range = new_max_y - new_min_y; + new_min_y -= range * pad_scale; + new_max_y += range * pad_scale; + + // Filter the y extents so they move smoothly + float filter_val = 0.999f; + + graph_min_y = graph_min_y * filter_val + new_min_y * (1.0f-filter_val); + graph_max_y = graph_max_y * filter_val + new_max_y * (1.0f-filter_val); + + } else { + graph_min_y = graph_bounds[0]; + graph_max_y = graph_bounds[1]; + } + + const float axis_colors[3][3] = { + { 1, 0, 0 }, + { 0, 1, 0 }, + { 0, 0, 1 } + }; + + if( hist_list.size() < 2 ) return; + + glLineWidth( 2.0f ); + + // Draw + glBegin( GL_LINES ); + + int axis = 2; + for( int axis=0; axis<3; axis++ ) { + + glColor3f( axis_colors[axis][0], axis_colors[axis][1], axis_colors[axis][2] ); + + for( int i=0; i<(int)hist_list.size()-1; i++ ) { + + float x_pos_0 = (float)i/(float)log_history_size; + float x_pos_1 = (float)(i+1)/(float)log_history_size; + + float y_pos_0 = (hist_list[i][axis]-graph_min_y)/(graph_max_y-graph_min_y); + float y_pos_1 = (hist_list[i+1][axis]-graph_min_y)/(graph_max_y-graph_min_y); + + glVertex3f( x_pos_0, y_pos_0, 0 ); + glVertex3f( x_pos_1, y_pos_1, 0 ); + + } + } + + glEnd(); + + +} + +// Draw the position, velocity or acceleration graphs, depending on the current graph_mode +void drawGraphs() { + + const float default_graph_bounds[3][2] = + { + { -750, 750 }, + { -1000, 1000 }, + { -15000, 15000 } + }; + + // Set up ortho proj mat + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glOrtho( 0, 1, 0, 1, -1, 1 ); + + // Clear modelview mat + glMatrixMode(GL_MODELVIEW); + + glPushMatrix(); + glLoadIdentity(); + + glDisable( GL_DEPTH_TEST ); + + // Draw the graphs + if( graph_mode == 1 ) { + drawGraph( pos_hist ); + graph_bounds[0] = default_graph_bounds[0][0]; + graph_bounds[1] = default_graph_bounds[0][1]; + } else if( graph_mode == 2 ) { + drawGraph( vel_hist ); + graph_bounds[0] = default_graph_bounds[1][0]; + graph_bounds[1] = default_graph_bounds[1][1]; + } else if( graph_mode == 3 ) { + drawGraph( accel_hist ); + graph_bounds[0] = default_graph_bounds[2][0]; + graph_bounds[1] = default_graph_bounds[2][1]; + } + + glEnable( GL_DEPTH_TEST ); + + glPopMatrix(); + + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + + glMatrixMode(GL_MODELVIEW); + +} + +// Draw a couple of small rectangles for 2D cursors. They roll with the controller rotation. +void draw_mouse_pointers() { + + // Set up ortho proj mat + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glOrtho( 0, 1, 0, 1, -1, 1 ); + + // Clear modelview mat + glMatrixMode(GL_MODELVIEW); + + glPushMatrix(); + glLoadIdentity(); + + glDisable( GL_DEPTH_TEST ); + + + glLineWidth( 5.0f ); + + // Draw the left cursor + glColor4f( 1.0, 0.0, 0.0, 1.0 ); + glPushMatrix(); + glTranslatef( left_mouse_pos[0], left_mouse_pos[1], 0.0f ); + glRotatef( left_mouse_roll*180.0f/3.1415926f, 0.0f, 0.0f, -1.0f ); + + glBegin( GL_LINES ); + glVertex3f( -0.02f, 0.01f, 0.0f ); + glVertex3f( 0.02f, 0.01f, 0.0f ); + + glVertex3f( 0.02f, 0.01f, 0.0f ); + glVertex3f( 0.02f, -0.01f, 0.0f ); + + glVertex3f( 0.02f, -0.01f, 0.0f ); + glVertex3f( -0.02f, -0.01f, 0.0f ); + + glVertex3f( -0.02f, -0.01f, 0.0f ); + glVertex3f( -0.02f, 0.01f, 0.0f ); + glEnd(); + + glPopMatrix(); + + // Now draw the right + glColor4f( 0.0, 0.0, 1.0, 1.0 ); + glPushMatrix(); + glTranslatef( right_mouse_pos[0], right_mouse_pos[1], 0.0f ); + glRotatef( right_mouse_roll*180.0f/3.1415926f, 0.0f, 0.0f, -1.0f ); + + glBegin( GL_LINES ); + glVertex3f( -0.02f, 0.01f, 0.0f ); + glVertex3f( 0.02f, 0.01f, 0.0f ); + + glVertex3f( 0.02f, 0.01f, 0.0f ); + glVertex3f( 0.02f, -0.01f, 0.0f ); + + glVertex3f( 0.02f, -0.01f, 0.0f ); + glVertex3f( -0.02f, -0.01f, 0.0f ); + + glVertex3f( -0.02f, -0.01f, 0.0f ); + glVertex3f( -0.02f, 0.01f, 0.0f ); + glEnd(); + + glPopMatrix(); + + + glEnable( GL_DEPTH_TEST ); + + glPopMatrix(); + + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + + glMatrixMode(GL_MODELVIEW); + + +} + +// Write a bunch of instruction text, as well as the current position and rotation information +void draw_controller_info() { + const double t = glutGet(GLUT_ELAPSED_TIME) / 1000.0; + const double a = t*90.0; + sixenseAllControllerData acd; + int i, base, cont; + int hpb_on; + float camera_offset[3] = { 0, -1.0f, -6.0f }; + + glClearColor(0.6f,0.6f,0.7f,1.0f); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glEnable(GL_LIGHTING); + + glColor3d(0.2,0.2,0.2); + + glPushMatrix(); + + glTranslatef( camera_offset[0]*camera_dist, camera_offset[1]*camera_dist, camera_offset[2]*camera_dist ); + + // Draw a sphere at the origin + glutSolidSphere( 0.1, 8, 8 ); + + drawObjects(); + + glPopMatrix(); + + glDisable(GL_LIGHTING); + glColor3d(0.1,0.1,0.4); + + int next_line = 1; + + // Update the text + sixenseSetActiveBase(0); + collectDataForGraph(); + glColor3d(0.1,0.1,0.4); + shapesPrintf (next_line, 3, "Base 0: %d controllers", sixenseGetNumActiveControllers() ); + + next_line++; + + if( is_logging ) { + glColor3d(0.8,0.1,0.4); + shapesPrintf (next_line, 3, "Logging ON. Press 'L' to stop." ); + } else { + glColor3d(0.1,0.1,0.4); + shapesPrintf (next_line, 3, "Logging OFF. Press 'L' to start." ); + } + + + next_line++; + + shapesPrintf (next_line, 3, "Press '[' to zoom out, ']' to zoom in." ); + + next_line++; + + if( graph_mode == 0 ) + shapesPrintf (next_line, 3, "Press 'g' to cycle through position, velocity and acceleration graphs. Graphs are OFF." ); + else if( graph_mode == 1 ) + shapesPrintf (next_line, 3, "Press 'g' to cycle through position, velocity and acceleration graphs. Currently plotting POSITION." ); + else if( graph_mode == 2 ) + shapesPrintf (next_line, 3, "Press 'g' to cycle through position, velocity and acceleration graphs. Currently plotting VELOCITY." ); + else if( graph_mode == 3 ) + shapesPrintf (next_line, 3, "Press 'g' to cycle through position, velocity and acceleration graphs. Currently plotting ACCELERATION." ); + + next_line++; + + shapesPrintf (next_line, 3, "Press 'm' to toggle drawing of mouse cursors." ); + + + + next_line++; + next_line++; + + if( display_pos_enabled ) { + + i=0; + + shapesPrintf (next_line, 3, "Controller position data. Press 'P' to hide:" ); + + next_line++; + + for( base=0; base<sixenseGetMaxBases(); base++ ) { + sixenseSetActiveBase(base); + sixenseGetAllNewestData( &acd ); + + for( cont=0; cont<sixenseGetMaxControllers(); cont++ ) { + + if( sixenseIsControllerEnabled( cont ) ) { + + shapesPrintf( next_line + i, 3, "base: %d controller: %d pos: %f %f %f rot_mat: %f %f %f %f %f %f %f %f %f", base, cont, + acd.controllers[cont].pos[0], acd.controllers[cont].pos[1], acd.controllers[cont].pos[2], + acd.controllers[cont].rot_mat[0][0], acd.controllers[cont].rot_mat[0][1], acd.controllers[cont].rot_mat[0][2], + acd.controllers[cont].rot_mat[1][0], acd.controllers[cont].rot_mat[1][1], acd.controllers[cont].rot_mat[1][2], + acd.controllers[cont].rot_mat[2][0], acd.controllers[cont].rot_mat[2][1], acd.controllers[cont].rot_mat[2][2] ); + + i++; + + } + + } + } + + } else { + shapesPrintf (next_line, 3, "Press 'P' to display controller position data." ); + + } + + drawGraphs(); + + if( draw_mouse_pointers_enabled ) + draw_mouse_pointers(); + +} + +// This is the callback that gets registered with the sixenseUtils::controller_manager. It will get called each time the user completes +// one of the setup steps so that the game can update the instructions to the user. If the engine supports texture mapping, the +// controller_manager can prove a pathname to a image file that contains the instructions in graphic form. +// The controller_manager serves the following functions: +// 1) Makes sure the appropriate number of controllers are connected to the system. The number of required controllers is designaged by the +// game type (ie two player two controller game requires 4 controllers, one player one controller game requires one) +// 2) Makes the player designate which controllers are held in which hand. +// 3) Enables hemisphere tracking by calling the Sixense API call sixenseAutoEnableHemisphereTracking. After this is completed full 360 degree +// tracking is possible. +void controller_manager_setup_callback( sixenseUtils::ControllerManager::setup_step step ) { + + if( sixenseUtils::getTheControllerManager()->isMenuVisible() ) { + + // Turn on the flag that tells the graphics system to draw the instruction screen instead of the controller information. The game + // should be paused at this time. + controller_manager_screen_visible = true; + + // Ask the controller manager what the next instruction string should be. + controller_manager_text_string = sixenseUtils::getTheControllerManager()->getStepString(); + + // We could also load the supplied controllermanager textures using the filename: sixenseUtils::getTheControllerManager()->getTextureFileName(); + + } else { + + // We're done with the setup, so hide the instruction screen. + controller_manager_screen_visible = false; + + } + +} + +// Draw the grey screen with a single yellow line of text to prompt the user through the setup steps. +void draw_controller_manager_screen() { + + glClearColor( 0.2f, 0.2f, 0.2f, 1.0f ); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glColor3d(0.8,0.8,0.0); + shapesPrintfCentered( controller_manager_text_string.c_str() ); + +} + +// This function causes the 3D objects to flash when the buttons are pressed. It does so using two different techniques +// available using sixenseUtils +void check_for_button_presses( sixenseAllControllerData *acd ) { + + // Ask the controller manager which controller is in the left hand and which is in the right + int left_index = sixenseUtils::getTheControllerManager()->getIndex( sixenseUtils::ControllerManager::P1L ); + int right_index = sixenseUtils::getTheControllerManager()->getIndex( sixenseUtils::ControllerManager::P1R ); + + + + // First use the 'ButtonStates' class to flash the object when the 1 button is pressed, or the trigger is pulled. + // ButtonStates is a simple class that reports when a button's state just transitioned from released to pressed + // or vice versa. It also detects when the trigger crosses a programmable threshold. + static sixenseUtils::ButtonStates left_states, right_states; + + left_states.update( &acd->controllers[left_index] ); + right_states.update( &acd->controllers[right_index] ); + + // Do something if the button was pressed + if( left_states.buttonJustPressed( SIXENSE_BUTTON_1 ) ) { + flash_left_controller_frames = 20; + } + + if( right_states.buttonJustPressed( SIXENSE_BUTTON_1 ) ) { + flash_right_controller_frames = 20; + } + + // Or if the trigger was pulled + if( left_states.triggerJustPressed() ) { + flash_left_controller_frames = 20; + } + + if( right_states.triggerJustPressed() ) { + flash_right_controller_frames = 20; + } + + + + // Now do the same thing but use event triggers to flash the object when a button is pressed, or when the + // controller moves to a certain height. + // EventTriggers are very flexible objects that can be used to check for transitions of controller state including buttons being pressed, controllers moving a certain distance, + // or exceeding a certain velocity. + class FlashObjectTrigger : public sixenseUtils::EventTriggerBase { + int &enable_for_frames; + public: + FlashObjectTrigger( int &i ) : enable_for_frames( i ) {} + virtual void trigger() const { + enable_for_frames = 20; + } + }; + + // First make a couple of BinaryEventSwitch that flash the object when the test parameter changes from false to true. Use a null trigger for when it transitions + // from true to false. + static sixenseUtils::EventSwitchBase *left_button_switch = new sixenseUtils::BinaryEventSwitch( new FlashObjectTrigger( flash_left_controller_frames ), new sixenseUtils::NullEventTrigger ); + static sixenseUtils::EventSwitchBase *right_button_switch = new sixenseUtils::BinaryEventSwitch( new FlashObjectTrigger( flash_right_controller_frames ), new sixenseUtils::NullEventTrigger ); + left_button_switch->test( ((acd->controllers)[left_index].buttons & SIXENSE_BUTTON_4) ? 1.0f : 0.0f ); // test against the current state of the 4 button + right_button_switch->test( ((acd->controllers)[right_index].buttons & SIXENSE_BUTTON_4) ? 1.0f : 0.0f ); + + // First make a couple of BinaryEventSwitch that flash the object when the controller moves above a 200mm. Do nothing when it transitions back down. + // ValuatorEventSwitches can be used to test against any floating point value, including position, velocity, trigger positions, joystick positions, rotation angles, etc. + static sixenseUtils::EventSwitchBase *left_height_switch = new sixenseUtils::ValuatorEventSwitch( 200.0f, new FlashObjectTrigger( flash_left_controller_frames ), new sixenseUtils::NullEventTrigger ); + static sixenseUtils::EventSwitchBase *right_height_switch = new sixenseUtils::ValuatorEventSwitch( 200.0f, new FlashObjectTrigger( flash_right_controller_frames ), new sixenseUtils::NullEventTrigger ); + left_button_switch->test( (acd->controllers)[left_index].pos[1] ); // test the y position (height) + right_button_switch->test( (acd->controllers)[right_index].pos[1] ); + +} + +#ifdef WIN32 +// use the sixenseUtils::MousePointer class to compute the 2d mouse position pointed to by the two controllers. +void update_mouse_pointers( sixenseAllControllerData *acd ) { + + // Ask the controller manager which controller is in the left hand and which is in the right + int left_index = sixenseUtils::getTheControllerManager()->getIndex( sixenseUtils::ControllerManager::P1L ); + int right_index = sixenseUtils::getTheControllerManager()->getIndex( sixenseUtils::ControllerManager::P1R ); + + + static sixenseUtils::MousePointer left_mouse_pointer, right_mouse_pointer; + + left_mouse_pointer.setSensitivity( 1.5f ); + right_mouse_pointer.setSensitivity( 1.5f ); + + Vector2 pos = left_mouse_pointer.update( &acd->controllers[left_index] ); + pos.fill( left_mouse_pos ); // fill just copies the elements into a float array + left_mouse_roll = left_mouse_pointer.getRollAngle(); // store off the roll of the controller as well + + pos = right_mouse_pointer.update( &acd->controllers[right_index] ); + pos.fill( right_mouse_pos ); // fill just copies the elements into a float array + right_mouse_roll = right_mouse_pointer.getRollAngle(); // store off the roll of the controller as well + +} +#endif + +// glut calls this function each frame +static void display(void) +{ + + // update the controller manager with the latest controller data here + sixenseSetActiveBase(0); + sixenseAllControllerData acd; + sixenseGetAllNewestData( &acd ); + sixenseUtils::getTheControllerManager()->update( &acd ); + + check_for_button_presses( &acd ); + +#ifdef WIN32 + update_mouse_pointers( &acd ); +#endif + + // Either draw the controller manager instruction screen, or display the controller information + if( controller_manager_screen_visible ) { + draw_controller_manager_screen(); + } else { + draw_controller_info(); + } + + glutSwapBuffers(); + + if( is_logging ) { + updateLog(); + } +} + + +static void + toggleLogging() { + if( is_logging ) { + is_logging = 0; + + fclose( log_file ); + + } else { + is_logging = 1; + + log_file = fopen( "sixense_log.txt", "w" ); + } +} + +static void + key(unsigned char key, int x, int y) +{ + switch (key) + { + case 27 : + case 'Q': + case 'q': glutLeaveMainLoop () ; break; + + case 'L': + case 'l': toggleLogging(); break; + + case 'P': + case 'p': display_pos_enabled=(display_pos_enabled?0:1); break; + + case ']': camera_dist *= 0.99f; break; + case '[': camera_dist *= 1.01f; break; + + case ' ': graph_paused=!graph_paused; break; + + case 'g': ++graph_mode; if(graph_mode==4) graph_mode=0; break; + case 'a': auto_graph_bounds=!auto_graph_bounds; break; + + case 'm': draw_mouse_pointers_enabled=!draw_mouse_pointers_enabled; break; + + default: + break; + } + + glutPostRedisplay(); +} + +static void + idle(void) +{ + glutPostRedisplay(); +} + +const GLfloat light_ambient[] = { 0.0f, 0.0f, 0.0f, 1.0f }; +const GLfloat light_diffuse[] = { 1.0f, 1.0f, 1.0f, 1.0f }; +const GLfloat light_specular[] = { 1.0f, 1.0f, 1.0f, 1.0f }; +const GLfloat light_position[] = { 2.0f, 5.0f, 5.0f, 0.0f }; + +const GLfloat mat_ambient[] = { 0.7f, 0.7f, 0.7f, 1.0f }; +const GLfloat mat_diffuse[] = { 0.8f, 0.8f, 0.8f, 1.0f }; +const GLfloat mat_specular[] = { 1.0f, 1.0f, 1.0f, 1.0f }; +const GLfloat high_shininess[] = { 100.0f }; + +int main(int argc, char *argv[]) +{ + int i; + float hemi_vec[3] = { 0, 1, 0 }; + + glutInitWindowSize(640,480); + glutInitWindowPosition(40,40); + glutInit(&argc, argv); + //glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE); + glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); + + glutCreateWindow("Sixense Test"); + + glutReshapeFunc(resize); + glutDisplayFunc(display); + glutKeyboardFunc(key); + glutIdleFunc(idle); + + glutSetOption ( GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION ) ; + + glClearColor(0.6f,0.6f,0.7f,1.0f); + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); + + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LESS); + + glEnable(GL_LIGHT0); + glEnable(GL_NORMALIZE); + glEnable(GL_COLOR_MATERIAL); + + glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); + glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); + glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); + glLightfv(GL_LIGHT0, GL_POSITION, light_position); + + glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); + glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); + glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); + glMaterialfv(GL_FRONT, GL_SHININESS, high_shininess); + + // Init sixense + sixenseInit(); + + // Init the controller manager. This makes sure the controllers are present, assigned to left and right hands, and that + // the hemisphere calibration is complete. + sixenseUtils::getTheControllerManager()->setGameType( sixenseUtils::ControllerManager::ONE_PLAYER_TWO_CONTROLLER ); + sixenseUtils::getTheControllerManager()->registerSetupCallback( controller_manager_setup_callback ); + + glutMainLoop(); + + sixenseExit(); + + return EXIT_SUCCESS; +} diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/Makefile.am new file mode 100755 index 0000000..493b742 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = smooth_opengl3.c smooth_opengl3.dsp +noinst_PROGRAMS = smooth_opengl3 +smooth_opengl3_SOURCES = smooth_opengl3.c +smooth_opengl3_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +smooth_opengl3_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/Makefile.in new file mode 100755 index 0000000..b409470 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/Makefile.in @@ -0,0 +1,465 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = smooth_opengl3$(EXEEXT) +subdir = progs/demos/smooth_opengl3 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_smooth_opengl3_OBJECTS = smooth_opengl3-smooth_opengl3.$(OBJEXT) +smooth_opengl3_OBJECTS = $(am_smooth_opengl3_OBJECTS) +smooth_opengl3_LDADD = $(LDADD) +smooth_opengl3_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(smooth_opengl3_CFLAGS) \ + $(CFLAGS) $(smooth_opengl3_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(smooth_opengl3_SOURCES) +DIST_SOURCES = $(smooth_opengl3_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = smooth_opengl3.c smooth_opengl3.dsp +smooth_opengl3_SOURCES = smooth_opengl3.c +smooth_opengl3_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +smooth_opengl3_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/demos/smooth_opengl3/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/demos/smooth_opengl3/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +smooth_opengl3$(EXEEXT): $(smooth_opengl3_OBJECTS) $(smooth_opengl3_DEPENDENCIES) + @rm -f smooth_opengl3$(EXEEXT) + $(smooth_opengl3_LINK) $(smooth_opengl3_OBJECTS) $(smooth_opengl3_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smooth_opengl3-smooth_opengl3.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +smooth_opengl3-smooth_opengl3.o: smooth_opengl3.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(smooth_opengl3_CFLAGS) $(CFLAGS) -MT smooth_opengl3-smooth_opengl3.o -MD -MP -MF $(DEPDIR)/smooth_opengl3-smooth_opengl3.Tpo -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo '$(srcdir)/'`smooth_opengl3.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/smooth_opengl3-smooth_opengl3.Tpo $(DEPDIR)/smooth_opengl3-smooth_opengl3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smooth_opengl3.c' object='smooth_opengl3-smooth_opengl3.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(smooth_opengl3_CFLAGS) $(CFLAGS) -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo '$(srcdir)/'`smooth_opengl3.c + +smooth_opengl3-smooth_opengl3.obj: smooth_opengl3.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(smooth_opengl3_CFLAGS) $(CFLAGS) -MT smooth_opengl3-smooth_opengl3.obj -MD -MP -MF $(DEPDIR)/smooth_opengl3-smooth_opengl3.Tpo -c -o smooth_opengl3-smooth_opengl3.obj `if test -f 'smooth_opengl3.c'; then $(CYGPATH_W) 'smooth_opengl3.c'; else $(CYGPATH_W) '$(srcdir)/smooth_opengl3.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/smooth_opengl3-smooth_opengl3.Tpo $(DEPDIR)/smooth_opengl3-smooth_opengl3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smooth_opengl3.c' object='smooth_opengl3-smooth_opengl3.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(smooth_opengl3_CFLAGS) $(CFLAGS) -c -o smooth_opengl3-smooth_opengl3.obj `if test -f 'smooth_opengl3.c'; then $(CYGPATH_W) 'smooth_opengl3.c'; else $(CYGPATH_W) '$(srcdir)/smooth_opengl3.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/smooth_opengl3.c b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/smooth_opengl3.c new file mode 100755 index 0000000..a36f090 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/smooth_opengl3.c @@ -0,0 +1,422 @@ +/* + * smooth_opengl3.c, based on smooth.c, which is (c) by SGI, see below. + * This program demonstrates smooth shading in a way which is fully + * OpenGL-3.1-compliant. + * A smooth shaded polygon is drawn in a 2-D projection. + */ + +/* + * Original copyright notice from smooth.c: + * + * License Applicability. Except to the extent portions of this file are + * made subject to an alternative license as permitted in the SGI Free + * Software License B, Version 1.1 (the "License"), the contents of this + * file are subject only to the provisions of the License. You may not use + * this file except in compliance with the License. You may obtain a copy + * of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 + * Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: + * + * http://oss.sgi.com/projects/FreeB + * + * Note that, as provided in the License, the Software is distributed on an + * "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS + * DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND + * CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + * PARTICULAR PURPOSE, AND NON-INFRINGEMENT. + * + * Original Code. The Original Code is: OpenGL Sample Implementation, + * Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, + * Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. + * Copyright in any portions created by third parties is as indicated + * elsewhere herein. All Rights Reserved. + * + * Additional Notice Provisions: The application programming interfaces + * established by SGI in conjunction with the Original Code are The + * OpenGL(R) Graphics System: A Specification (Version 1.2.1), released + * April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version + * 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + * Window System(R) (Version 1.3), released October 19, 1998. This software + * was created using the OpenGL(R) version 1.2.1 Sample Implementation + * published by SGI, but has not been independently verified as being + * compliant with the OpenGL(R) version 1.2.1 Specification. + * + */ + +#include <GL/freeglut.h> +#include <stdlib.h> +#include <stdio.h> +#include <stddef.h> +#include <string.h> + +/* report GL errors, if any, to stderr */ +void checkError(const char *functionName) +{ + GLenum error; + while (( error = glGetError() ) != GL_NO_ERROR) { + fprintf (stderr, "GL error 0x%X detected in %s\n", error, functionName); + } +} + +/* extension #defines, types and entries, avoiding a dependency on additional + libraries like GLEW or the GL/glext.h header */ +#ifndef GL_ARRAY_BUFFER +#define GL_ARRAY_BUFFER 0x8892 +#endif + +#ifndef GL_STATIC_DRAW +#define GL_STATIC_DRAW 0x88E4 +#endif + +#ifndef GL_FRAGMENT_SHADER +#define GL_FRAGMENT_SHADER 0x8B30 +#endif + +#ifndef GL_VERTEX_SHADER +#define GL_VERTEX_SHADER 0x8B31 +#endif + +#ifndef GL_SHADING_LANGUAGE_VERSION +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#endif + +#ifndef GL_COMPILE_STATUS +#define GL_COMPILE_STATUS 0x8B81 +#endif + +#ifndef GL_LINK_STATUS +#define GL_LINK_STATUS 0x8B82 +#endif + +#ifndef GL_INFO_LOG_LENGTH +#define GL_INFO_LOG_LENGTH 0x8B84 +#endif + +typedef ptrdiff_t ourGLsizeiptr; +typedef char ourGLchar; +
+#if defined(WIN32) +#ifndef APIENTRY +#define APIENTRY +#endif + +typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef void (APIENTRY *PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRY *PFNGLBUFFERDATAPROC) (GLenum target, ourGLsizeiptr size, const GLvoid *data, GLenum usage); +typedef GLuint (APIENTRY *PFNGLCREATESHADERPROC) (GLenum type); +typedef void (APIENTRY *PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const ourGLchar **string, const GLint *length); +typedef void (APIENTRY *PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint (APIENTRY *PFNGLCREATEPROGRAMPROC) (void); +typedef void (APIENTRY *PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRY *PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (APIENTRY *PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (APIENTRY *PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (APIENTRY *PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, ourGLchar *infoLog); +typedef void (APIENTRY *PFNGLGETPROGRAMIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRY *PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, ourGLchar *infoLog); +typedef GLint (APIENTRY *PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const ourGLchar *name); +typedef void (APIENTRY *PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRY *PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef GLint (APIENTRY *PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const ourGLchar *name); +typedef void (APIENTRY *PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif /* defined(WIN32) */
+
+PFNGLGENBUFFERSPROC gl_GenBuffers;
+PFNGLBINDBUFFERPROC gl_BindBuffer;
+PFNGLBUFFERDATAPROC gl_BufferData;
+PFNGLCREATESHADERPROC gl_CreateShader;
+PFNGLSHADERSOURCEPROC gl_ShaderSource;
+PFNGLCOMPILESHADERPROC gl_CompileShader;
+PFNGLCREATEPROGRAMPROC gl_CreateProgram;
+PFNGLATTACHSHADERPROC gl_AttachShader;
+PFNGLLINKPROGRAMPROC gl_LinkProgram;
+PFNGLUSEPROGRAMPROC gl_UseProgram;
+PFNGLGETSHADERIVPROC gl_GetShaderiv;
+PFNGLGETSHADERINFOLOGPROC gl_GetShaderInfoLog;
+PFNGLGETPROGRAMIVPROC gl_GetProgramiv;
+PFNGLGETPROGRAMINFOLOGPROC gl_GetProgramInfoLog;
+PFNGLGETATTRIBLOCATIONPROC gl_GetAttribLocation;
+PFNGLVERTEXATTRIBPOINTERPROC gl_VertexAttribPointer;
+PFNGLENABLEVERTEXATTRIBARRAYPROC gl_EnableVertexAttribArray;
+PFNGLGETUNIFORMLOCATIONPROC gl_GetUniformLocation;
+PFNGLUNIFORMMATRIX4FVPROC gl_UniformMatrix4fv;
+ +void initExtensionEntries(void) +{ + gl_GenBuffers = (PFNGLGENBUFFERSPROC) glutGetProcAddress ("glGenBuffers"); + gl_BindBuffer = (PFNGLBINDBUFFERPROC) glutGetProcAddress ("glBindBuffer"); + gl_BufferData = (PFNGLBUFFERDATAPROC) glutGetProcAddress ("glBufferData"); + gl_CreateShader = (PFNGLCREATESHADERPROC) glutGetProcAddress ("glCreateShader"); + gl_ShaderSource = (PFNGLSHADERSOURCEPROC) glutGetProcAddress ("glShaderSource"); + gl_CompileShader = (PFNGLCOMPILESHADERPROC) glutGetProcAddress ("glCompileShader"); + gl_CreateProgram = (PFNGLCREATEPROGRAMPROC) glutGetProcAddress ("glCreateProgram"); + gl_AttachShader = (PFNGLATTACHSHADERPROC) glutGetProcAddress ("glAttachShader"); + gl_LinkProgram = (PFNGLLINKPROGRAMPROC) glutGetProcAddress ("glLinkProgram"); + gl_UseProgram = (PFNGLUSEPROGRAMPROC) glutGetProcAddress ("glUseProgram"); + gl_GetShaderiv = (PFNGLGETSHADERIVPROC) glutGetProcAddress ("glGetShaderiv"); + gl_GetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) glutGetProcAddress ("glGetShaderInfoLog"); + gl_GetProgramiv = (PFNGLGETPROGRAMIVPROC) glutGetProcAddress ("glGetProgramiv"); + gl_GetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) glutGetProcAddress ("glGetProgramInfoLog"); + gl_GetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) glutGetProcAddress ("glGetAttribLocation"); + gl_VertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) glutGetProcAddress ("glVertexAttribPointer"); + gl_EnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glEnableVertexAttribArray"); + gl_GetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) glutGetProcAddress ("glGetUniformLocation"); + gl_UniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) glutGetProcAddress ("glUniformMatrix4fv"); +} + +/* vertex array data for a colored 2D triangle, consisting of RGB color values + and XY coordinates */ +const GLfloat varray[] = { + 1.0f, 0.0f, 0.0f, /* red */ + 5.0f, 5.0f, /* lower left */ + + 0.0f, 1.0f, 0.0f, /* green */ + 25.0f, 5.0f, /* lower right */ + + 0.0f, 0.0f, 1.0f, /* blue */ + 5.0f, 25.0f /* upper left */ +}; + +/* ISO C somehow enforces this silly use of 'enum' for compile-time constants */ +enum { + numColorComponents = 3, + numVertexComponents = 2, + stride = sizeof(GLfloat) * (numColorComponents + numVertexComponents), + numElements = sizeof(varray) / stride +}; + +/* the name of the vertex buffer object */ +GLuint vertexBufferName; + +void initBuffer(void) +{ + gl_GenBuffers (1, &vertexBufferName); + gl_BindBuffer (GL_ARRAY_BUFFER, vertexBufferName); + gl_BufferData (GL_ARRAY_BUFFER, sizeof(varray), varray, GL_STATIC_DRAW); + checkError ("initBuffer"); +} + +const ourGLchar *vertexShaderSource[] = { + "#version 140\n", + "uniform mat4 fg_ProjectionMatrix;\n", + "in vec4 fg_Color;\n", + "in vec4 fg_Vertex;\n", + "smooth out vec4 fg_SmoothColor;\n", + "void main()\n", + "{\n", + " fg_SmoothColor = fg_Color;\n", + " gl_Position = fg_ProjectionMatrix * fg_Vertex;\n", + "}\n" +}; + +const ourGLchar *fragmentShaderSource[] = { + "#version 140\n", + "smooth in vec4 fg_SmoothColor;\n", + "out vec4 fg_FragColor;\n", + "void main(void)\n", + "{\n", + " fg_FragColor = fg_SmoothColor;\n", + "}\n" +}; + +void compileAndCheck(GLuint shader) +{ + GLint status; + gl_CompileShader (shader); + gl_GetShaderiv (shader, GL_COMPILE_STATUS, &status); + if (status == GL_FALSE) { + GLint infoLogLength; + ourGLchar *infoLog; + gl_GetShaderiv (shader, GL_INFO_LOG_LENGTH, &infoLogLength); + infoLog = (ourGLchar*) malloc (infoLogLength); + gl_GetShaderInfoLog (shader, infoLogLength, NULL, infoLog); + fprintf (stderr, "compile log: %s\n", infoLog); + free (infoLog); + } +} + +GLuint compileShaderSource(GLenum type, GLsizei count, const ourGLchar **string) +{ + GLuint shader = gl_CreateShader (type); + gl_ShaderSource (shader, count, string, NULL); + compileAndCheck (shader); + return shader; +} + +void linkAndCheck(GLuint program) +{ + GLint status; + gl_LinkProgram (program); + gl_GetProgramiv (program, GL_LINK_STATUS, &status); + if (status == GL_FALSE) { + GLint infoLogLength; + ourGLchar *infoLog; + gl_GetProgramiv (program, GL_INFO_LOG_LENGTH, &infoLogLength); + infoLog = (ourGLchar*) malloc (infoLogLength); + gl_GetProgramInfoLog (program, infoLogLength, NULL, infoLog); + fprintf (stderr, "link log: %s\n", infoLog); + free (infoLog); + } +} + +GLuint createProgram(GLuint vertexShader, GLuint fragmentShader) +{ + GLuint program = gl_CreateProgram (); + if (vertexShader != 0) { + gl_AttachShader (program, vertexShader); + } + if (fragmentShader != 0) { + gl_AttachShader (program, fragmentShader); + } + linkAndCheck (program); + return program; +} + +GLuint fgProjectionMatrixIndex; +GLuint fgColorIndex; +GLuint fgVertexIndex; + +void initShader(void) +{ + const GLsizei vertexShaderLines = sizeof(vertexShaderSource) / sizeof(ourGLchar*); + GLuint vertexShader = + compileShaderSource (GL_VERTEX_SHADER, vertexShaderLines, vertexShaderSource); + + const GLsizei fragmentShaderLines = sizeof(fragmentShaderSource) / sizeof(ourGLchar*); + GLuint fragmentShader = + compileShaderSource (GL_FRAGMENT_SHADER, fragmentShaderLines, fragmentShaderSource); + + GLuint program = createProgram (vertexShader, fragmentShader); + + gl_UseProgram (program); + + fgProjectionMatrixIndex = gl_GetUniformLocation(program, "fg_ProjectionMatrix"); + + fgColorIndex = gl_GetAttribLocation(program, "fg_Color"); + gl_EnableVertexAttribArray (fgColorIndex); + + fgVertexIndex = gl_GetAttribLocation(program, "fg_Vertex"); + gl_EnableVertexAttribArray (fgVertexIndex); + + checkError ("initShader"); +} + +void initRendering(void) +{ + glClearColor (0.0, 0.0, 0.0, 0.0); + checkError ("initRendering"); +} + +void init(void) +{ + initExtensionEntries (); + initBuffer (); + initShader (); + initRendering (); +} + +void dumpInfo(void) +{ + printf ("Vendor: %s\n", glGetString (GL_VENDOR)); + printf ("Renderer: %s\n", glGetString (GL_RENDERER)); + printf ("Version: %s\n", glGetString (GL_VERSION)); + printf ("GLSL: %s\n", glGetString (GL_SHADING_LANGUAGE_VERSION)); + checkError ("dumpInfo"); +} + +const GLvoid *bufferObjectPtr (GLsizei index) +{ + return (const GLvoid *) (((char *) NULL) + index); +} + +GLfloat projectionMatrix[16]; + +void triangle(void) +{ + gl_UniformMatrix4fv (fgProjectionMatrixIndex, 1, GL_FALSE, projectionMatrix); + + gl_BindBuffer (GL_ARRAY_BUFFER, vertexBufferName); + gl_VertexAttribPointer (fgColorIndex, numColorComponents, GL_FLOAT, GL_FALSE, + stride, bufferObjectPtr (0)); + gl_VertexAttribPointer (fgVertexIndex, numVertexComponents, GL_FLOAT, GL_FALSE, + stride, bufferObjectPtr (sizeof(GLfloat) * numColorComponents)); + glDrawArrays(GL_TRIANGLES, 0, numElements); + checkError ("triangle"); +} + +void display(void) +{ + glClear (GL_COLOR_BUFFER_BIT); + triangle (); + glFlush (); + checkError ("display"); +} + +void loadOrthof(GLfloat *m, GLfloat l, GLfloat r, GLfloat b, GLfloat t, + GLfloat n, GLfloat f) +{ + m[ 0] = 2.0f / (r - l); + m[ 1] = 0.0f; + m[ 2] = 0.0f; + m[ 3] = 0.0f; + + m[ 4] = 0.0f; + m[ 5] = 2.0f / (t - b); + m[ 6] = 0.0f; + m[ 7] = 0.0f; + + m[ 8] = 0.0f; + m[ 9] = 0.0f; + m[10] = -2.0f / (f - n); + m[11] = 0.0f; + + m[12] = -(r + l) / (r - l); + m[13] = -(t + b) / (t - b); + m[14] = -(f + n) / (f - n); + m[15] = 1.0f; +} + +void loadOrtho2Df(GLfloat *m, GLfloat l, GLfloat r, GLfloat b, GLfloat t) +{ + loadOrthof (m, l, r, b, t, -1.0f, 1.0f); +} + +void reshape (int w, int h) +{ + glViewport (0, 0, (GLsizei) w, (GLsizei) h); + if (w <= h) { + loadOrtho2Df (projectionMatrix, 0.0f, 30.0f, 0.0f, 30.0f * (GLfloat) h/(GLfloat) w); + } else { + loadOrtho2Df (projectionMatrix, 0.0f, 30.0f * (GLfloat) w/(GLfloat) h, 0.0f, 30.0f); + } + checkError ("reshape"); +} + +void keyboard(unsigned char key, int x, int y) +{ + switch (key) { + case 27: + exit(0); + break; + } +} + +int main(int argc, char** argv) +{ + glutInit(&argc, argv); + glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); + /* add command line argument "classic" for a pre-3.x context */ + if ((argc != 2) || (strcmp (argv[1], "classic") != 0)) { + glutInitContextVersion (3, 1); + glutInitContextFlags (GLUT_FORWARD_COMPATIBLE | GLUT_DEBUG); + } + glutInitWindowSize (500, 500); + glutInitWindowPosition (100, 100); + glutCreateWindow (argv[0]); + dumpInfo (); + init (); + glutDisplayFunc(display); + glutReshapeFunc(reshape); + glutKeyboardFunc (keyboard); + glutMainLoop(); + return 0; +} diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/smooth_opengl3.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/smooth_opengl3.dsp new file mode 100755 index 0000000..d8ec743 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/smooth_opengl3.dsp @@ -0,0 +1,100 @@ +# Microsoft Developer Studio Project File - Name="smooth_opengl3" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=smooth_opengl3 - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "smooth_opengl3.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "smooth_opengl3.mak" CFG="smooth_opengl3 - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "smooth_opengl3 - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "smooth_opengl3 - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "smooth_opengl3 - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../Release"
+
+!ELSEIF "$(CFG)" == "smooth_opengl3 - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../Debug"
+
+!ENDIF
+
+# Begin Target
+
+# Name "smooth_opengl3 - Win32 Release"
+# Name "smooth_opengl3 - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\smooth_opengl3.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/smooth_opengl3Static.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/smooth_opengl3Static.dsp new file mode 100755 index 0000000..2a81243 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/smooth_opengl3/smooth_opengl3Static.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="smooth_opengl3Static" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=smooth_opengl3Static - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "smooth_opengl3Static.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "smooth_opengl3Static.mak" CFG="smooth_opengl3Static - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "smooth_opengl3Static - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "smooth_opengl3Static - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "smooth_opengl3Static - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "smooth_opengl3Static___Win32_Release"
+# PROP BASE Intermediate_Dir "smooth_opengl3Static___Win32_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseStatic"
+# PROP Intermediate_Dir "ReleaseStatic"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ReleaseStatic"
+
+!ELSEIF "$(CFG)" == "smooth_opengl3Static - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "smooth_opengl3Static___Win32_Debug"
+# PROP BASE Intermediate_Dir "smooth_opengl3Static___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugStatic"
+# PROP Intermediate_Dir "DebugStatic"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../DebugStatic"
+
+!ENDIF
+
+# Begin Target
+
+# Name "smooth_opengl3Static - Win32 Release"
+# Name "smooth_opengl3Static - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\smooth_opengl3.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/Makefile.am b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/Makefile.am new file mode 100755 index 0000000..10b628c --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = spaceball.c vmath.c vmath.h vmath.inl + +noinst_PROGRAMS = spaceball +spaceball_SOURCES = spaceball.c vmath.c +spaceball_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +spaceball_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS)
\ No newline at end of file diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/Makefile.in b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/Makefile.in new file mode 100755 index 0000000..d695cb6 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/Makefile.in @@ -0,0 +1,481 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = spaceball$(EXEEXT) +subdir = progs/demos/spaceball +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_spaceball_OBJECTS = spaceball-spaceball.$(OBJEXT) \ + spaceball-vmath.$(OBJEXT) +spaceball_OBJECTS = $(am_spaceball_OBJECTS) +spaceball_LDADD = $(LDADD) +spaceball_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(spaceball_CFLAGS) \ + $(CFLAGS) $(spaceball_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(spaceball_SOURCES) +DIST_SOURCES = $(spaceball_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXPORT_FLAGS = @EXPORT_FLAGS@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HEADER = @HEADER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBRARY = @LIBRARY@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBXI = @LIBXI@ +LIBXXF86VM = @LIBXXF86VM@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = spaceball.c vmath.c vmath.h vmath.inl +spaceball_SOURCES = spaceball.c vmath.c +spaceball_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la +spaceball_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/demos/spaceball/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu progs/demos/spaceball/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +spaceball$(EXEEXT): $(spaceball_OBJECTS) $(spaceball_DEPENDENCIES) + @rm -f spaceball$(EXEEXT) + $(spaceball_LINK) $(spaceball_OBJECTS) $(spaceball_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spaceball-spaceball.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spaceball-vmath.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +spaceball-spaceball.o: spaceball.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spaceball_CFLAGS) $(CFLAGS) -MT spaceball-spaceball.o -MD -MP -MF $(DEPDIR)/spaceball-spaceball.Tpo -c -o spaceball-spaceball.o `test -f 'spaceball.c' || echo '$(srcdir)/'`spaceball.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/spaceball-spaceball.Tpo $(DEPDIR)/spaceball-spaceball.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spaceball.c' object='spaceball-spaceball.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spaceball_CFLAGS) $(CFLAGS) -c -o spaceball-spaceball.o `test -f 'spaceball.c' || echo '$(srcdir)/'`spaceball.c + +spaceball-spaceball.obj: spaceball.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spaceball_CFLAGS) $(CFLAGS) -MT spaceball-spaceball.obj -MD -MP -MF $(DEPDIR)/spaceball-spaceball.Tpo -c -o spaceball-spaceball.obj `if test -f 'spaceball.c'; then $(CYGPATH_W) 'spaceball.c'; else $(CYGPATH_W) '$(srcdir)/spaceball.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/spaceball-spaceball.Tpo $(DEPDIR)/spaceball-spaceball.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spaceball.c' object='spaceball-spaceball.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spaceball_CFLAGS) $(CFLAGS) -c -o spaceball-spaceball.obj `if test -f 'spaceball.c'; then $(CYGPATH_W) 'spaceball.c'; else $(CYGPATH_W) '$(srcdir)/spaceball.c'; fi` + +spaceball-vmath.o: vmath.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spaceball_CFLAGS) $(CFLAGS) -MT spaceball-vmath.o -MD -MP -MF $(DEPDIR)/spaceball-vmath.Tpo -c -o spaceball-vmath.o `test -f 'vmath.c' || echo '$(srcdir)/'`vmath.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/spaceball-vmath.Tpo $(DEPDIR)/spaceball-vmath.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmath.c' object='spaceball-vmath.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spaceball_CFLAGS) $(CFLAGS) -c -o spaceball-vmath.o `test -f 'vmath.c' || echo '$(srcdir)/'`vmath.c + +spaceball-vmath.obj: vmath.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spaceball_CFLAGS) $(CFLAGS) -MT spaceball-vmath.obj -MD -MP -MF $(DEPDIR)/spaceball-vmath.Tpo -c -o spaceball-vmath.obj `if test -f 'vmath.c'; then $(CYGPATH_W) 'vmath.c'; else $(CYGPATH_W) '$(srcdir)/vmath.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/spaceball-vmath.Tpo $(DEPDIR)/spaceball-vmath.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmath.c' object='spaceball-vmath.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spaceball_CFLAGS) $(CFLAGS) -c -o spaceball-vmath.obj `if test -f 'vmath.c'; then $(CYGPATH_W) 'vmath.c'; else $(CYGPATH_W) '$(srcdir)/vmath.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/spaceball.c b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/spaceball.c new file mode 100755 index 0000000..52da93a --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/spaceball.c @@ -0,0 +1,177 @@ +/* Spaceball demo
+ *
+ * Written by John Tsiombikas <nuclear@member.fsf.org>
+ * (converted from the libspnav cube example)
+ *
+ * Use the spaceball to move and rotate the colored cube.
+ * Pressing any button will reset the cube at its original location.
+ *
+ * Press escape or q to exit.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <GL/freeglut.h>
+#include "vmath.h"
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846264338327950
+#endif
+
+void draw_cube(void);
+
+/* callbacks */
+void disp(void);
+void reshape(int x, int y);
+void keyb(unsigned char key, int x, int y);
+void sbmot(int x, int y, int z); /* spaceball translation */
+void sbrot(int x, int y, int z); /* spaceball rotation */
+void sbbut(int bn, int state); /* spaceball button */
+
+vec3_t pos = {0, 0, -6};
+quat_t rot = {0, 0, 0, 1};
+
+int main(int argc, char **argv)
+{
+ glutInit(&argc, argv);
+ glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
+ glutCreateWindow("spaceball demo");
+
+ glutDisplayFunc(disp);
+ glutReshapeFunc(reshape);
+ glutKeyboardFunc(keyb);
+ glutSpaceballMotionFunc(sbmot);
+ glutSpaceballRotateFunc(sbrot);
+ glutSpaceballButtonFunc(sbbut);
+
+ glEnable(GL_CULL_FACE);
+
+ glutMainLoop();
+ return 0;
+}
+
+void disp(void)
+{
+ mat4_t xform;
+
+ quat_to_mat(xform, rot);
+
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glTranslatef(pos.x, pos.y, pos.z);
+ glMultMatrixf((float*)xform);
+
+ draw_cube();
+
+ glutSwapBuffers();
+}
+
+void draw_cube(void)
+{
+ glBegin(GL_QUADS);
+ /* face +Z */
+ glNormal3f(0, 0, 1);
+ glColor3f(1, 0, 0);
+ glVertex3f(-1, -1, 1);
+ glVertex3f(1, -1, 1);
+ glVertex3f(1, 1, 1);
+ glVertex3f(-1, 1, 1);
+ /* face +X */
+ glNormal3f(1, 0, 0);
+ glColor3f(0, 1, 0);
+ glVertex3f(1, -1, 1);
+ glVertex3f(1, -1, -1);
+ glVertex3f(1, 1, -1);
+ glVertex3f(1, 1, 1);
+ /* face -Z */
+ glNormal3f(0, 0, -1);
+ glColor3f(0, 0, 1);
+ glVertex3f(1, -1, -1);
+ glVertex3f(-1, -1, -1);
+ glVertex3f(-1, 1, -1);
+ glVertex3f(1, 1, -1);
+ /* face -X */
+ glNormal3f(-1, 0, 0);
+ glColor3f(1, 1, 0);
+ glVertex3f(-1, -1, -1);
+ glVertex3f(-1, -1, 1);
+ glVertex3f(-1, 1, 1);
+ glVertex3f(-1, 1, -1);
+ /* face +Y */
+ glNormal3f(0, 1, 0);
+ glColor3f(0, 1, 1);
+ glVertex3f(-1, 1, 1);
+ glVertex3f(1, 1, 1);
+ glVertex3f(1, 1, -1);
+ glVertex3f(-1, 1, -1);
+ /* face -Y */
+ glNormal3f(0, -1, 0);
+ glColor3f(1, 0, 1);
+ glVertex3f(-1, -1, -1);
+ glVertex3f(1, -1, -1);
+ glVertex3f(1, -1, 1);
+ glVertex3f(-1, -1, 1);
+ glEnd();
+}
+
+/* 45deg fov */
+#define FOV (M_PI / 4.0)
+
+void reshape(int x, int y)
+{
+ float aspect = (float)x / (float)y;
+ float halfy = (float)tan(FOV / 2.0);
+ float halfx = halfy * aspect;
+
+ glViewport(0, 0, x, y);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glFrustum(-halfx, halfx, -halfy, halfy, 1.0, 1000.0);
+}
+
+void keyb(unsigned char key, int x, int y)
+{
+ switch(key) {
+ case 'q':
+ case 'Q':
+ case 27:
+ exit(0);
+
+ case ' ':
+ /* reset initial view */
+ pos = v3_cons(0, 0, -6);
+ rot = quat_cons(1, 0, 0, 0);
+ glutPostRedisplay();
+
+ default:
+ break;
+ }
+}
+
+void sbmot(int x, int y, int z)
+{
+ pos.x += x * 0.001f;
+ pos.y += y * 0.001f;
+ pos.z -= z * 0.001f;
+ glutPostRedisplay();
+}
+
+void sbrot(int x, int y, int z)
+{
+ float axis_len = (float)sqrt(x * x + y * y + z * z);
+ rot = quat_rotate(rot, axis_len * 0.001f, -x / axis_len, -y / axis_len, z / axis_len);
+ glutPostRedisplay();
+}
+
+void sbbut(int bn, int state)
+{
+ if(state == GLUT_DOWN) {
+ pos = v3_cons(0, 0, -6);
+ rot = quat_cons(1, 0, 0, 0);
+ glutPostRedisplay();
+ }
+}
diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/spaceball.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/spaceball.dsp new file mode 100755 index 0000000..cc47490 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/spaceball.dsp @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name="spaceball" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=spaceball - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "spaceball.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "spaceball.mak" CFG="spaceball - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "spaceball - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "spaceball - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "spaceball - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../Release"
+
+!ELSEIF "$(CFG)" == "spaceball - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../Debug"
+
+!ENDIF
+
+# Begin Target
+
+# Name "spaceball - Win32 Release"
+# Name "spaceball - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\spaceball.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\vmath.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\vmath.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\vmath.inl
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/spaceball_static.dsp b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/spaceball_static.dsp new file mode 100755 index 0000000..5ed0ad5 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/spaceball_static.dsp @@ -0,0 +1,112 @@ +# Microsoft Developer Studio Project File - Name="spaceball_static" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=spaceball_static - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "spaceball_static.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "spaceball_static.mak" CFG="spaceball_static - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "spaceball_static - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "spaceball_static - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "spaceball_static - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "spaceball_static___Win32_Release"
+# PROP BASE Intermediate_Dir "spaceball_static___Win32_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseStatic"
+# PROP Intermediate_Dir "ReleaseStatic"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "../../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ReleaseStatic"
+
+!ELSEIF "$(CFG)" == "spaceball_static - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "spaceball_static___Win32_Debug"
+# PROP BASE Intermediate_Dir "spaceball_static___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugStatic"
+# PROP Intermediate_Dir "DebugStatic"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "FREEGLUT_STATIC" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../DebugStatic"
+
+!ENDIF
+
+# Begin Target
+
+# Name "spaceball_static - Win32 Release"
+# Name "spaceball_static - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\spaceball.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\vmath.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\vmath.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\vmath.inl
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/vmath.c b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/vmath.c new file mode 100755 index 0000000..7ef3c25 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/vmath.c @@ -0,0 +1,16 @@ +#include <math.h>
+#include "vmath.h"
+
+quat_t quat_rotate(quat_t q, float angle, float x, float y, float z)
+{
+ quat_t rq;
+ float half_angle = angle * 0.5f;
+ float sin_half = (float)sin(half_angle);
+
+ rq.w = (float)cos(half_angle);
+ rq.x = x * sin_half;
+ rq.y = y * sin_half;
+ rq.z = z * sin_half;
+
+ return quat_mul(q, rq);
+}
diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/vmath.h b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/vmath.h new file mode 100755 index 0000000..249a504 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/vmath.h @@ -0,0 +1,38 @@ +#ifndef VMATH_H_
+#define VMATH_H_
+
+#if defined(WIN32)
+#define INLINE
+#else
+#define INLINE inline
+#endif
+
+
+typedef struct { float x, y, z; } vec3_t;
+typedef struct { float x, y, z, w; } vec4_t;
+
+typedef vec4_t quat_t;
+
+typedef float mat4_t[4][4];
+
+/* vector functions */
+static INLINE vec3_t v3_cons(float x, float y, float z);
+static INLINE float v3_dot(vec3_t v1, vec3_t v2);
+
+/* quaternion functions */
+static INLINE quat_t quat_cons(float s, float x, float y, float z);
+static INLINE vec3_t quat_vec(quat_t q);
+static INLINE quat_t quat_mul(quat_t q1, quat_t q2);
+static INLINE void quat_to_mat(mat4_t res, quat_t q);
+quat_t quat_rotate(quat_t q, float angle, float x, float y, float z);
+
+/* matrix functions */
+static INLINE void m4_cons(mat4_t m,
+ float m11, float m12, float m13, float m14,
+ float m21, float m22, float m23, float m24,
+ float m31, float m32, float m33, float m34,
+ float m41, float m42, float m43, float m44);
+
+#include "vmath.inl"
+
+#endif /* VMATH_H_ */
diff --git a/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/vmath.inl b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/vmath.inl new file mode 100755 index 0000000..e3ad6b8 --- /dev/null +++ b/SixenseSDK/src/sixense_simple3d/progs/demos/spaceball/vmath.inl @@ -0,0 +1,68 @@ +/* vector functions */
+static INLINE vec3_t v3_cons(float x, float y, float z)
+{
+ vec3_t res;
+ res.x = x;
+ res.y = y;
+ res.z = z;
+ return res;
+}
+
+static INLINE vec3_t quat_vec(quat_t q)
+{
+ vec3_t v;
+ v.x = q.x;
+ v.y = q.y;
+ v.z = q.z;
+ return v;
+}
+
+static INLINE float v3_dot(vec3_t v1, vec3_t v2)
+{
+ return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z;
+}
+
+/* quaternion functions */
+static INLINE quat_t quat_cons(float s, float x, float y, float z)
+{
+ quat_t q;
+ q.x = x;
+ q.y = y;
+ q.z = z;
+ q.w = s;
+ return q;
+}
+
+static INLINE quat_t quat_mul(quat_t q1, quat_t q2)
+{
+ quat_t res;
+ vec3_t v1 = quat_vec(q1);
+ vec3_t v2 = quat_vec(q2);
+
+ res.w = q1.w * q2.w - v3_dot(v1, v2);
+ res.x = v2.x * q1.w + v1.x * q2.w + (v1.y * v2.z - v1.z * v2.y);
+ res.y = v2.y * q1.w + v1.y * q2.w + (v1.z * v2.x - v1.x * v2.z);
+ res.z = v2.z * q1.w + v1.z * q2.w + (v1.x * v2.y - v1.y * v2.x);
+ return res;
+}
+
+static INLINE void quat_to_mat(mat4_t res, quat_t q)
+{
+ m4_cons(res, 1.0f - 2.0f * q.y*q.y - 2.0f * q.z*q.z, 2.0f * q.x * q.y + 2.0f * q.w * q.z, 2.0f * q.z * q.x - 2.0f * q.w * q.y, 0,
+ 2.0f * q.x * q.y - 2.0f * q.w * q.z, 1.0f - 2.0f * q.x*q.x - 2.0f * q.z*q.z, 2.0f * q.y * q.z + 2.0f * q.w * q.x, 0,
+ 2.0f * q.z * q.x + 2.0f * q.w * q.y, 2.0f * q.y * q.z - 2.0f * q.w * q.x, 1.0f - 2.0f * q.x*q.x - 2.0f * q.y*q.y, 0,
+ 0, 0, 0, 1);
+}
+
+/* matrix functions */
+static INLINE void m4_cons(mat4_t m,
+ float m11, float m12, float m13, float m14,
+ float m21, float m22, float m23, float m24,
+ float m31, float m32, float m33, float m34,
+ float m41, float m42, float m43, float m44)
+{
+ m[0][0] = m11; m[1][0] = m12; m[2][0] = m13; m[3][0] = m14;
+ m[0][1] = m21; m[1][1] = m22; m[2][1] = m23; m[3][1] = m24;
+ m[0][2] = m31; m[1][2] = m32; m[2][2] = m33; m[3][2] = m34;
+ m[0][3] = m41; m[1][3] = m42; m[2][3] = m43; m[3][3] = m44;
+}
|