diff -Nru ode-0.11.1/aclocal.m4 ode-0.14/aclocal.m4 --- ode-0.11.1/aclocal.m4 2009-05-24 22:15:35.000000000 +0000 +++ ode-0.14/aclocal.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,8880 +0,0 @@ -# generated automatically by aclocal 1.10.2 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This file 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. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, -[m4_warning([this file was generated for autoconf 2.63. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file 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. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - ;; - esac - fi - rm -rf conftest* - ;; - esac - - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file 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. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file 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. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file 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. - -# Generated from ltversion.in. - -# serial 3012 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6]) -m4_define([LT_PACKAGE_REVISION], [1.3012]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6' -macro_revision='1.3012' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file 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. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10.2], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10.2])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 8 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 9 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -#serial 4 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[# Autoconf 2.62 quotes --file arguments for eval, but not when files -# are listed without --file. Let's play safe and only enable the eval -# if we detect the quoting. -case $CONFIG_FILES in -*\'*) eval set x "$CONFIG_FILES" ;; -*) set x $CONFIG_FILES ;; -esac -shift -for mf -do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 13 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 3 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 5 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file 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. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff -Nru ode-0.11.1/autogen.sh ode-0.14/autogen.sh --- ode-0.11.1/autogen.sh 2008-06-05 02:41:49.000000000 +0000 +++ ode-0.14/autogen.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#!/bin/sh - -# The version nr detection is not working. -# It fails if there is a '-' char in the version nr e.g. -# We should not use it until fixed. - Bram - -## The reason this uses sed instead of "grep --only-matches" -## is because MinGW's grep is an old version and does not contain that flag. -#automake_version=`automake --version | grep --regexp='[+0-9].[+0-9].[+0-9]' | sed -n 's/[* ()A-Za-z]//g;p'` -#automake_mayor=${automake_version%.*.*} -#automake_minor=${automake_version%.*} -#automake_minor=${automake_minor##*.} -#automake_revision=${automake_version##*.} -#echo "AutoMake Version: $automake_mayor.$automake_minor.$automake_revision" -# -#if [ $automake_mayor -eq 1 ]; then -# if [ $automake_minor -lt 8 ]; then -# echo "Automake must be 1.8.2 or higher, please upgrade" -# exit -# else -# if [ $automake_minor -eq 8 ] && [ $automake_revision -lt 2 ]; then -# echo "Automake must be 1.8.2 or higher, please upgrade" -# exit -# fi -# fi -#fi - -echo "Please make sure that you use automake 1.10 or later" -echo "Warnings about underquoted definitions are harmless" - -echo "Running aclocal" -aclocal -I . || exit 1 -# on Mac libtoolize is called glibtoolize -LIBTOOLIZE=libtoolize -if [ `uname -s` = Darwin ]; then - LIBTOOLIZE=glibtoolize -fi -echo "Running $LIBTOOLIZE" -$LIBTOOLIZE --copy --force --automake || exit 1 -echo "Running autoheader" -autoheader || exit 1 -echo "Running automake" -automake --foreign --add-missing --copy || exit 1 -echo "Running autoconf" -autoconf || exit 1 - -echo "Running bootstrap in ou directory" -(cd ou && ./bootstrap) - -#./configure $* - -echo "Now you are ready to run ./configure" diff -Nru ode-0.11.1/bindings/python/demos/tutorial1.py ode-0.14/bindings/python/demos/tutorial1.py --- ode-0.11.1/bindings/python/demos/tutorial1.py 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/bindings/python/demos/tutorial1.py 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +# http://pyode.sourceforge.net/tutorials/tutorial1.html + +# pyODE example 1: Getting started + +# modified by Gideon Klompje (removed literals and using +# 'ode.Mass.setSphereTotal' instead of 'ode.Mass.setSphere') + +import ode + +# Simulation constants +GRAVITY = (0, -9.81, 0) + +SPHERE_RADIUS = 0.05 +SPHERE_MASS = 1.0 +SPHERE_START_POS = (0, 2, 0) +SPHERE_FORCE = (0, 200, 0) # Initial force to apply to the sphere + +TIME_STEP = 0.04 +TIME_STOP = 2.0 # When to stop the simulation + +# Create a world object +world = ode.World() +world.setGravity(GRAVITY) + +# Create a spherical body inside the world +body = ode.Body(world) +mass = ode.Mass() +mass.setSphereTotal(SPHERE_MASS, SPHERE_RADIUS) +body.setMass(mass) + +body.setPosition(SPHERE_START_POS) +body.addForce(SPHERE_FORCE) + +# Do the simulation... +if __name__ == "__main__": + total_time = 0.0 + while total_time < TIME_STOP: + # output the body's position and velocity + x, y, z = body.getPosition() + u, v, w = body.getLinearVel() + print "%1.2fsec: pos=(%6.3f, %6.3f, %6.3f) vel=(%6.3f, %6.3f, %6.3f)" % \ + (total_time, x, y, z, u, v, w) + + # advance the simulation + world.step(TIME_STEP) + total_time += TIME_STEP + diff -Nru ode-0.11.1/bindings/python/demos/tutorial2.py ode-0.14/bindings/python/demos/tutorial2.py --- ode-0.11.1/bindings/python/demos/tutorial2.py 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/bindings/python/demos/tutorial2.py 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,135 @@ +#!/usr/bin/env python + +# http://pyode.sourceforge.net/tutorials/tutorial2.html + +# pyODE example 2: Connecting bodies with joints + +# modified by Gideon Klompje (removed literals and using +# 'ode.Mass.setSphereTotal' instead of 'ode.Mass.setSphere') + + +import ode +import pygame + +from pygame.locals import QUIT, KEYDOWN + +# Constants +WINDOW_RESOLUTION = (640, 480) + +DRAW_SCALE = WINDOW_RESOLUTION[0] / 5 +"""Factor to multiply physical coordinates by to obtain screen size in pixels""" + +DRAW_OFFSET = (WINDOW_RESOLUTION[0] / 2, 50) +"""Screen coordinates (in pixels) that map to the physical origin (0, 0, 0)""" + +BACKGROUND_COLOR = (255, 255, 255) + +GRAVITY = (0, -9.81, 0) + +SPHERE1_POSITION = (1, 0, 0) +SPHERE1_MASS = 1 +SPHERE1_RADIUS = 0.15 +SPHERE1_COLOR = (55, 0, 200) + +SPHERE2_POSITION = (2, 0, 0) +SPHERE2_MASS = 1 +SPHERE2_RADIUS = 0.15 +SPHERE2_COLOR = (55, 0, 200) + +JOINT1_ANCHOR = (0, 0, 0) +JOINT1_COLOR = (200, 0, 55) +JOINT1_WIDTH = 2 +"""Width of the line (in pixels) representing the joint""" + +JOINT2_ANCHOR = SPHERE1_POSITION +JOINT2_COLOR = (200, 0, 55) +JOINT2_WIDTH = 2 +"""Width of the line (in pixels) representing the joint""" + +TIME_STEP = 0.04 + +# Utility functions +def coord(x, y, integer=False): + """ + Convert world coordinates to pixel coordinates. Setting 'integer' to + True will return integer coordinates. + """ + xs = (DRAW_OFFSET[0] + DRAW_SCALE*x) + ys = (DRAW_OFFSET[1] - DRAW_SCALE*y) + + if integer: + return int(round(xs)), int(round(ys)) + else: + return xs, ys + +# Initialize pygame +pygame.init() + +# Open a display +screen = pygame.display.set_mode(WINDOW_RESOLUTION) + +# Create a world object +world = ode.World() +world.setGravity(GRAVITY) + +# Create two bodies +body1 = ode.Body(world) +M = ode.Mass() +M.setSphereTotal(SPHERE1_MASS, SPHERE1_RADIUS) +body1.setMass(M) +body1.setPosition(SPHERE1_POSITION) + +body2 = ode.Body(world) +M = ode.Mass() +M.setSphereTotal(SPHERE2_MASS, SPHERE2_RADIUS) +body2.setMass(M) +body2.setPosition(SPHERE2_POSITION) + +# Connect body1 with the static environment +j1 = ode.BallJoint(world) +j1.attach(body1, ode.environment) +j1.setAnchor(JOINT1_ANCHOR) + +# Connect body2 with body1 +j2 = ode.BallJoint(world) +j2.attach(body1, body2) +j2.setAnchor(JOINT2_ANCHOR) + +# Simulation loop... +if __name__ == "__main__": + fps = 1.0 / TIME_STEP + clk = pygame.time.Clock() + + sph1_rad = int(DRAW_SCALE * SPHERE1_RADIUS) + sph2_rad = int(DRAW_SCALE * SPHERE2_RADIUS) + + loopFlag = True + while loopFlag: + for e in pygame.event.get(): + if e.type==QUIT: + loopFlag=False + if e.type==KEYDOWN: + loopFlag=False + + # Clear the screen + screen.fill(BACKGROUND_COLOR) + + # Draw the two bodies and the lines representing the joints + x1, y1, z1 = body1.getPosition() + x2, y2, z2 = body2.getPosition() + xj1, yj1, zj1 = j1.getAnchor() + xj2, yj2, zj2 = j2.getAnchor() + + pygame.draw.line(screen, JOINT1_COLOR, coord(xj1, yj1), coord(x1, y1), JOINT1_WIDTH) + pygame.draw.line(screen, JOINT2_COLOR, coord(xj2, yj2), coord(x2, y2), JOINT2_WIDTH) + pygame.draw.circle(screen, SPHERE1_COLOR, coord(x1, y1, integer=True), sph1_rad, 0) + pygame.draw.circle(screen, SPHERE2_COLOR, coord(x2, y2, integer=True), sph2_rad, 0) + + pygame.display.flip() + + # Next simulation step + world.step(TIME_STEP) + + # Try to keep the specified framerate + clk.tick(fps) + diff -Nru ode-0.11.1/bindings/python/demos/tutorial3.py ode-0.14/bindings/python/demos/tutorial3.py --- ode-0.11.1/bindings/python/demos/tutorial3.py 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/bindings/python/demos/tutorial3.py 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,284 @@ +#!/usr/bin/env python + +# http://pyode.sourceforge.net/tutorials/tutorial3.html + +# pyODE example 3: Collision detection + +# Originally by Matthias Baas. +# Updated by Pierre Gay to work without pygame or cgkit. + +import sys, os, random, time +from math import * +from OpenGL.GL import * +from OpenGL.GLU import * +from OpenGL.GLUT import * + +import ode + +# geometric utility functions +def scalp (vec, scal): + vec[0] *= scal + vec[1] *= scal + vec[2] *= scal + +def length (vec): + return sqrt (vec[0]**2 + vec[1]**2 + vec[2]**2) + +# prepare_GL +def prepare_GL(): + """Prepare drawing. + """ + + # Viewport + glViewport(0,0,640,480) + + # Initialize + glClearColor(0.8,0.8,0.9,0) + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glEnable(GL_DEPTH_TEST) + glDisable(GL_LIGHTING) + glEnable(GL_LIGHTING) + glEnable(GL_NORMALIZE) + glShadeModel(GL_FLAT) + + # Projection + glMatrixMode(GL_PROJECTION) + glLoadIdentity() + gluPerspective (45,1.3333,0.2,20) + + # Initialize ModelView matrix + glMatrixMode(GL_MODELVIEW) + glLoadIdentity() + + # Light source + glLightfv(GL_LIGHT0,GL_POSITION,[0,0,1,0]) + glLightfv(GL_LIGHT0,GL_DIFFUSE,[1,1,1,1]) + glLightfv(GL_LIGHT0,GL_SPECULAR,[1,1,1,1]) + glEnable(GL_LIGHT0) + + # View transformation + gluLookAt (2.4, 3.6, 4.8, 0.5, 0.5, 0, 0, 1, 0) + +# draw_body +def draw_body(body): + """Draw an ODE body. + """ + + x,y,z = body.getPosition() + R = body.getRotation() + rot = [R[0], R[3], R[6], 0., + R[1], R[4], R[7], 0., + R[2], R[5], R[8], 0., + x, y, z, 1.0] + glPushMatrix() + glMultMatrixd(rot) + if body.shape=="box": + sx,sy,sz = body.boxsize + glScalef(sx, sy, sz) + glutSolidCube(1) + glPopMatrix() + + +# create_box +def create_box(world, space, density, lx, ly, lz): + """Create a box body and its corresponding geom.""" + + # Create body + body = ode.Body(world) + M = ode.Mass() + M.setBox(density, lx, ly, lz) + body.setMass(M) + + # Set parameters for drawing the body + body.shape = "box" + body.boxsize = (lx, ly, lz) + + # Create a box geom for collision detection + geom = ode.GeomBox(space, lengths=body.boxsize) + geom.setBody(body) + + return body, geom + +# drop_object +def drop_object(): + """Drop an object into the scene.""" + + global bodies, geom, counter, objcount + + body, geom = create_box(world, space, 1000, 1.0,0.2,0.2) + body.setPosition( (random.gauss(0,0.1),3.0,random.gauss(0,0.1)) ) + theta = random.uniform(0,2*pi) + ct = cos (theta) + st = sin (theta) + body.setRotation([ct, 0., -st, 0., 1., 0., st, 0., ct]) + bodies.append(body) + geoms.append(geom) + counter=0 + objcount+=1 + +# explosion +def explosion(): + """Simulate an explosion. + + Every object is pushed away from the origin. + The force is dependent on the objects distance from the origin. + """ + global bodies + + for b in bodies: + l=b.getPosition () + d = length (l) + a = max(0, 40000*(1.0-0.2*d*d)) + l = [l[0] / 4, l[1], l[2] /4] + scalp (l, a / length (l)) + b.addForce(l) + +# pull +def pull(): + """Pull the objects back to the origin. + + Every object will be pulled back to the origin. + Every couple of frames there'll be a thrust upwards so that + the objects won't stick to the ground all the time. + """ + global bodies, counter + + for b in bodies: + l=list (b.getPosition ()) + scalp (l, -1000 / length (l)) + b.addForce(l) + if counter%60==0: + b.addForce((0,10000,0)) + +# Collision callback +def near_callback(args, geom1, geom2): + """Callback function for the collide() method. + + This function checks if the given geoms do collide and + creates contact joints if they do. + """ + + # Check if the objects do collide + contacts = ode.collide(geom1, geom2) + + # Create contact joints + world,contactgroup = args + for c in contacts: + c.setBounce(0.2) + c.setMu(5000) + j = ode.ContactJoint(world, contactgroup, c) + j.attach(geom1.getBody(), geom2.getBody()) + + + +###################################################################### + +# Initialize Glut +glutInit ([]) + +# Open a window +glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE) + +x = 0 +y = 0 +width = 640 +height = 480 +glutInitWindowPosition (x, y); +glutInitWindowSize (width, height); +glutCreateWindow ("testode") + +# Create a world object +world = ode.World() +world.setGravity( (0,-9.81,0) ) +world.setERP(0.8) +world.setCFM(1E-5) + +# Create a space object +space = ode.Space() + +# Create a plane geom which prevent the objects from falling forever +floor = ode.GeomPlane(space, (0,1,0), 0) + +# A list with ODE bodies +bodies = [] + +# The geoms for each of the bodies +geoms = [] + +# A joint group for the contact joints that are generated whenever +# two bodies collide +contactgroup = ode.JointGroup() + +# Some variables used inside the simulation loop +fps = 50 +dt = 1.0/fps +running = True +state = 0 +counter = 0 +objcount = 0 +lasttime = time.time() + + +# keyboard callback +def _keyfunc (c, x, y): + sys.exit (0) + +glutKeyboardFunc (_keyfunc) + +# draw callback +def _drawfunc (): + # Draw the scene + prepare_GL() + for b in bodies: + draw_body(b) + + glutSwapBuffers () + +glutDisplayFunc (_drawfunc) + +# idle callback +def _idlefunc (): + global counter, state, lasttime + + t = dt - (time.time() - lasttime) + if (t > 0): + time.sleep(t) + + counter += 1 + + if state==0: + if counter==20: + drop_object() + if objcount==30: + state=1 + counter=0 + # State 1: Explosion and pulling back the objects + elif state==1: + if counter==100: + explosion() + if counter>300: + pull() + if counter==500: + counter=20 + + glutPostRedisplay () + + # Simulate + n = 4 + + for i in range(n): + # Detect collisions and create contact joints + space.collide((world,contactgroup), near_callback) + + # Simulation step + world.step(dt/n) + + # Remove all contact joints + contactgroup.empty() + + lasttime = time.time() + +glutIdleFunc (_idlefunc) + +glutMainLoop () + diff -Nru ode-0.11.1/bindings/python/INSTALL.txt ode-0.14/bindings/python/INSTALL.txt --- ode-0.11.1/bindings/python/INSTALL.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/bindings/python/INSTALL.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,64 @@ +1. REQUIREMENTS: + +1. Python 2.4 or higher (http://www.python.org/) + - Tested with Python 2.7 (2.6 on earlier builds) +2. Cython 0.14.1** or higher (http://cython.org/) + - Tested with Cython 0.15 (0.14.1 on earlier builds) +3. ODE shared*** library (or static with -fPIC) + - See the notes on building ODE below. +4. pkg-config (http://www.freedesktop.org/wiki/Software/pkg-config) + - Windows executable (and GLib dependency) can be downloaded from + http://www.gtk.org/download/win32.php + - If you used premake to configure ODE, you may need to create an ode.pc file + in your PKG_CONFIG_PATH manually. See /ode.pc.in + + + +2. BUILDING ODE + + On certain systems (*nix) there is a requirement that a shared library + (such as the python module) contains only position-independent code + (PIC). In those cases, ODE needs to be either compiled as a shared library + too (--enable-shared), or as a static library with PIC (-fPIC). + + Once ODE is built and installed in your desired destination, proceed with + building the wrapper. + + + +3a. BUILDING WITH Visual Studio (Windows) + + python setup.py build_ext + + +3b. BUILDING WITH MINGW (Windows) + + python setup.py build_ext -c mingw32 + + +3c. BUILDING WITH GCC/G++ (Linux, OS X, etc.) + + python setup.py build_ext + + + +4. INSTALLATION + +4a. For system-wide installation (needs administrator privileges): + + python setup.py install + +4b. For user installation: + + python setup.py install --user + + + +5. DEMOS and DOCUMENTATION + + Try running the tutorials in the 'demos' directory. The tutorials were taken + from the PyODE website (http://pyode.sourceforge.net/). + + For usage documentation, please refer to the PyODE API documentation at + http://pyode.sourceforge.net/api-1.2.0/index.html. + diff -Nru ode-0.11.1/bindings/python/ode.pxd ode-0.14/bindings/python/ode.pxd --- ode-0.11.1/bindings/python/ode.pxd 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/bindings/python/ode.pxd 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,495 @@ +###################################################################### +# Python Open Dynamics Engine Wrapper +# Copyright (C) 2004 PyODE developers (see file AUTHORS) +# All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of EITHER: +# (1) The GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at +# your option) any later version. The text of the GNU Lesser +# General Public License is included with this library in the +# file LICENSE. +# (2) The BSD-style license that is included with this library in +# the file LICENSE-BSD. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files +# LICENSE and LICENSE-BSD for more details. +###################################################################### + +cdef extern from "stdlib.h": + + void* malloc(long) + void free(void*) + +cdef extern from "stdio.h": + int printf(char*) + +# Include the basic floating point type -> dReal (either float or double) +#include "_precision.pyx" + +cdef extern from "ode/ode.h": + + ctypedef double dReal + + # Dummy structs + cdef struct dxWorld: + int _dummy + cdef struct dxSpace: + int _dummy + cdef struct dxBody: + int _dummy + cdef struct dxGeom: + int _dummy + cdef struct dxJoint: + int _dummy + cdef struct dxJointGroup: + int _dummy + cdef struct dxTriMeshData: + int _dummy + cdef struct dxHeightfieldData: + int _dummy + + # Types + ctypedef dxWorld* dWorldID + ctypedef dxSpace* dSpaceID + ctypedef dxBody* dBodyID + ctypedef dxGeom* dGeomID + ctypedef dxJoint* dJointID + ctypedef dxJointGroup* dJointGroupID + ctypedef dxTriMeshData* dTriMeshDataID + ctypedef dxHeightfieldData* dHeightfieldDataID + ctypedef dReal dVector3[4] + ctypedef dReal dVector4[4] + ctypedef dReal dMatrix3[4*3] + ctypedef dReal dMatrix4[4*4] + ctypedef dReal dMatrix6[8*6] + ctypedef dReal dQuaternion[4] + + cdef extern dReal dInfinity + cdef extern int dAMotorUser + cdef extern int dAMotorEuler + + ctypedef struct dMass: + dReal mass + dVector4 c + dMatrix3 I + + ctypedef struct dJointFeedback: + dVector3 f1 + dVector3 t1 + dVector3 f2 + dVector3 t2 + + ctypedef void dNearCallback(void* data, dGeomID o1, dGeomID o2) + ctypedef dReal dHeightfieldGetHeight( void* p_user_data, int x, int z ) + + ctypedef struct dSurfaceParameters: + int mode + dReal mu + + dReal mu2 + dReal bounce + dReal bounce_vel + dReal soft_erp + dReal soft_cfm + dReal motion1,motion2 + dReal slip1,slip2 + + ctypedef struct dContactGeom: + dVector3 pos + dVector3 normal + dReal depth + dGeomID g1,g2 + + ctypedef struct dContact: + dSurfaceParameters surface + dContactGeom geom + dVector3 fdir1 + + + # World + dWorldID dWorldCreate() + void dWorldDestroy (dWorldID) + + void dCloseODE() + void dInitODE() + + void dWorldSetGravity (dWorldID, dReal x, dReal y, dReal z) + void dWorldGetGravity (dWorldID, dVector3 gravity) + void dWorldSetERP (dWorldID, dReal erp) + dReal dWorldGetERP (dWorldID) + void dWorldSetCFM (dWorldID, dReal cfm) + dReal dWorldGetCFM (dWorldID) + void dWorldStep (dWorldID, dReal stepsize) + void dWorldQuickStep (dWorldID, dReal stepsize) + void dWorldSetQuickStepNumIterations (dWorldID, int num) + int dWorldGetQuickStepNumIterations (dWorldID) + void dWorldSetContactMaxCorrectingVel (dWorldID, dReal vel) + dReal dWorldGetContactMaxCorrectingVel (dWorldID) + void dWorldSetContactSurfaceLayer (dWorldID, dReal depth) + dReal dWorldGetContactSurfaceLayer (dWorldID) + void dWorldSetAutoDisableFlag (dWorldID, int do_auto_disable) + int dWorldGetAutoDisableFlag (dWorldID) + void dWorldSetAutoDisableLinearThreshold (dWorldID, dReal linear_threshold) + dReal dWorldGetAutoDisableLinearThreshold (dWorldID) + void dWorldSetAutoDisableAngularThreshold (dWorldID, dReal angular_threshold) + dReal dWorldGetAutoDisableAngularThreshold (dWorldID) + void dWorldSetAutoDisableSteps (dWorldID, int steps) + int dWorldGetAutoDisableSteps (dWorldID) + void dWorldSetAutoDisableTime (dWorldID, dReal time) + dReal dWorldGetAutoDisableTime (dWorldID) + dReal dWorldGetLinearDamping (dWorldID) + void dWorldSetLinearDamping (dWorldID, dReal scale) + dReal dWorldGetAngularDamping (dWorldID) + void dWorldSetAngularDamping (dWorldID, dReal scale) + void dWorldImpulseToForce (dWorldID, dReal stepsize, + dReal ix, dReal iy, dReal iz, dVector3 force) + + # Body + dBodyID dBodyCreate (dWorldID) + void dBodyDestroy (dBodyID) + + void dBodySetData (dBodyID, void *data) + void *dBodyGetData (dBodyID) + + void dBodySetPosition (dBodyID, dReal x, dReal y, dReal z) + void dBodySetRotation (dBodyID, dMatrix3 R) + void dBodySetQuaternion (dBodyID, dQuaternion q) + void dBodySetLinearVel (dBodyID, dReal x, dReal y, dReal z) + void dBodySetAngularVel (dBodyID, dReal x, dReal y, dReal z) + dReal * dBodyGetPosition (dBodyID) + dReal * dBodyGetRotation (dBodyID) + dReal * dBodyGetQuaternion (dBodyID) + dReal * dBodyGetLinearVel (dBodyID) + dReal * dBodyGetAngularVel (dBodyID) + + void dBodySetMass (dBodyID, dMass *mass) + void dBodyGetMass (dBodyID, dMass *mass) + + void dBodyAddForce (dBodyID, dReal fx, dReal fy, dReal fz) + void dBodyAddTorque (dBodyID, dReal fx, dReal fy, dReal fz) + void dBodyAddRelForce (dBodyID, dReal fx, dReal fy, dReal fz) + void dBodyAddRelTorque (dBodyID, dReal fx, dReal fy, dReal fz) + void dBodyAddForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) + void dBodyAddForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) + void dBodyAddRelForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) + void dBodyAddRelForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) + + dReal * dBodyGetForce (dBodyID) + dReal * dBodyGetTorque (dBodyID) + + void dBodySetForce(dBodyID, dReal x, dReal y, dReal z) + void dBodySetTorque(dBodyID, dReal x, dReal y, dReal z) + + void dBodyGetRelPointPos (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) + void dBodyGetRelPointVel (dBodyID, dReal px, dReal py, dReal pz, dVector3 result) + void dBodyGetPointVel (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result) + void dBodyGetPosRelPoint (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result) + void dBodyVectorToWorld (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result) + void dBodyVectorFromWorld (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result) + + void dBodySetFiniteRotationMode (dBodyID, int mode) + void dBodySetFiniteRotationAxis (dBodyID, dReal x, dReal y, dReal z) + + int dBodyGetFiniteRotationMode (dBodyID) + void dBodyGetFiniteRotationAxis (dBodyID, dVector3 result) + + int dBodyGetNumJoints (dBodyID b) + dJointID dBodyGetJoint (dBodyID, int index) + + void dBodyEnable (dBodyID) + void dBodyDisable (dBodyID) + int dBodyIsEnabled (dBodyID) + + void dBodySetGravityMode (dBodyID b, int mode) + int dBodyGetGravityMode (dBodyID b) + + void dBodySetDynamic (dBodyID) + void dBodySetKinematic (dBodyID) + int dBodyIsKinematic (dBodyID) + + void dBodySetMaxAngularSpeed (dBodyID, dReal max_speed) + + # Joints + dJointID dJointCreateBall (dWorldID, dJointGroupID) + dJointID dJointCreateHinge (dWorldID, dJointGroupID) + dJointID dJointCreateSlider (dWorldID, dJointGroupID) + dJointID dJointCreateContact (dWorldID, dJointGroupID, dContact *) + dJointID dJointCreateUniversal (dWorldID, dJointGroupID) + dJointID dJointCreateHinge2 (dWorldID, dJointGroupID) + dJointID dJointCreateFixed (dWorldID, dJointGroupID) + dJointID dJointCreateNull (dWorldID, dJointGroupID) + dJointID dJointCreateAMotor (dWorldID, dJointGroupID) + dJointID dJointCreateLMotor (dWorldID, dJointGroupID) + dJointID dJointCreatePlane2D (dWorldID, dJointGroupID) + + void dJointDestroy (dJointID) + + void dJointEnable (dJointID) + void dJointDisable (dJointID) + int dJointIsEnabled (dJointID) + + dJointGroupID dJointGroupCreate (int max_size) + void dJointGroupDestroy (dJointGroupID) + void dJointGroupEmpty (dJointGroupID) + + void dJointAttach (dJointID, dBodyID body1, dBodyID body2) + void dJointSetData (dJointID, void *data) + void *dJointGetData (dJointID) + int dJointGetType (dJointID) + dBodyID dJointGetBody (dJointID, int index) + + void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z) + void dJointSetHingeAnchor (dJointID, dReal x, dReal y, dReal z) + void dJointSetHingeAxis (dJointID, dReal x, dReal y, dReal z) + void dJointSetHingeParam (dJointID, int parameter, dReal value) + void dJointAddHingeTorque(dJointID joint, dReal torque) + void dJointSetSliderAxis (dJointID, dReal x, dReal y, dReal z) + void dJointSetSliderParam (dJointID, int parameter, dReal value) + void dJointAddSliderForce(dJointID joint, dReal force) + void dJointSetHinge2Anchor (dJointID, dReal x, dReal y, dReal z) + void dJointSetHinge2Axis1 (dJointID, dReal x, dReal y, dReal z) + void dJointSetHinge2Axis2 (dJointID, dReal x, dReal y, dReal z) + void dJointSetHinge2Param (dJointID, int parameter, dReal value) + void dJointAddHinge2Torques(dJointID joint, dReal torque1, dReal torque2) + void dJointSetUniversalAnchor (dJointID, dReal x, dReal y, dReal z) + void dJointSetUniversalAxis1 (dJointID, dReal x, dReal y, dReal z) + void dJointSetUniversalAxis2 (dJointID, dReal x, dReal y, dReal z) + void dJointSetUniversalParam (dJointID, int parameter, dReal value) + void dJointAddUniversalTorques(dJointID joint, dReal torque1, dReal torque2) + void dJointSetFixed (dJointID) + void dJointSetAMotorNumAxes (dJointID, int num) + void dJointSetAMotorAxis (dJointID, int anum, int rel, dReal x, dReal y, dReal z) + void dJointSetAMotorAngle (dJointID, int anum, dReal angle) + void dJointSetAMotorParam (dJointID, int parameter, dReal value) + void dJointSetAMotorMode (dJointID, int mode) + void dJointAddAMotorTorques (dJointID, dReal torque1, dReal torque2, dReal torque3) + void dJointSetLMotorAxis (dJointID, int anum, int rel, dReal x, dReal y, dReal z) + void dJointSetLMotorNumAxes (dJointID, int num) + void dJointSetLMotorParam (dJointID, int parameter, dReal value) + + void dJointGetBallAnchor (dJointID, dVector3 result) + void dJointGetBallAnchor2 (dJointID, dVector3 result) + void dJointGetHingeAnchor (dJointID, dVector3 result) + void dJointGetHingeAnchor2 (dJointID, dVector3 result) + void dJointGetHingeAxis (dJointID, dVector3 result) + dReal dJointGetHingeParam (dJointID, int parameter) + dReal dJointGetHingeAngle (dJointID) + dReal dJointGetHingeAngleRate (dJointID) + dReal dJointGetSliderPosition (dJointID) + dReal dJointGetSliderPositionRate (dJointID) + void dJointGetSliderAxis (dJointID, dVector3 result) + dReal dJointGetSliderParam (dJointID, int parameter) + void dJointGetHinge2Anchor (dJointID, dVector3 result) + void dJointGetHinge2Anchor2 (dJointID, dVector3 result) + void dJointGetHinge2Axis1 (dJointID, dVector3 result) + void dJointGetHinge2Axis2 (dJointID, dVector3 result) + dReal dJointGetHinge2Param (dJointID, int parameter) + dReal dJointGetHinge2Angle1 (dJointID) + dReal dJointGetHinge2Angle1Rate (dJointID) + dReal dJointGetHinge2Angle2Rate (dJointID) + void dJointGetUniversalAnchor (dJointID, dVector3 result) + void dJointGetUniversalAnchor2 (dJointID, dVector3 result) + void dJointGetUniversalAxis1 (dJointID, dVector3 result) + void dJointGetUniversalAxis2 (dJointID, dVector3 result) + dReal dJointGetUniversalParam (dJointID, int parameter) + dReal dJointGetUniversalAngle1 (dJointID) + dReal dJointGetUniversalAngle2 (dJointID) + dReal dJointGetUniversalAngle1Rate (dJointID) + dReal dJointGetUniversalAngle2Rate (dJointID) + int dJointGetAMotorNumAxes (dJointID) + void dJointGetAMotorAxis (dJointID, int anum, dVector3 result) + int dJointGetAMotorAxisRel (dJointID, int anum) + dReal dJointGetAMotorAngle (dJointID, int anum) + dReal dJointGetAMotorAngleRate (dJointID, int anum) + dReal dJointGetAMotorParam (dJointID, int parameter) + int dJointGetAMotorMode (dJointID) + int dJointGetLMotorNumAxes (dJointID) + void dJointGetLMotorAxis (dJointID, int anum, dVector3 result) + dReal dJointGetLMotorParam (dJointID, int parameter) + void dJointSetPlane2DXParam (dJointID, int parameter, dReal value) + void dJointSetPlane2DYParam (dJointID, int parameter, dReal value) + void dJointSetPlane2DAngleParam (dJointID, int parameter, dReal value) + + void dJointSetFeedback (dJointID, dJointFeedback *) + dJointFeedback *dJointGetFeedback (dJointID) + + int dAreConnected (dBodyID, dBodyID) + + # Mass + void dMassSetZero (dMass *) + void dMassSetParameters (dMass *, dReal themass, + dReal cgx, dReal cgy, dReal cgz, + dReal I11, dReal I22, dReal I33, + dReal I12, dReal I13, dReal I23) + void dMassSetSphere (dMass *, dReal density, dReal radius) + void dMassSetSphereTotal (dMass *, dReal total_mass, dReal radius) + void dMassSetCapsule (dMass *, dReal density, int direction, dReal radius, dReal length) + void dMassSetCapsuleTotal (dMass *, dReal total_mass, int direction, dReal radius, dReal length) + void dMassSetCylinder (dMass *, dReal density, int direction, + dReal radius, dReal length) + void dMassSetCylinderTotal (dMass *, dReal total_mass, int direction, + dReal radius, dReal length) + void dMassSetBox (dMass *, dReal density, + dReal lx, dReal ly, dReal lz) + void dMassSetBoxTotal (dMass *, dReal total_mass, + dReal lx, dReal ly, dReal lz) + void dMassAdjust (dMass *, dReal newmass) + void dMassTranslate (dMass *, dReal x, dReal y, dReal z) + void dMassRotate (dMass *, dMatrix3 R) + void dMassAdd (dMass *a, dMass *b) + + # Space +# dSpaceID dSimpleSpaceCreate(int space) +# dSpaceID dHashSpaceCreate(int space) + dSpaceID dSimpleSpaceCreate(dSpaceID space) + dSpaceID dHashSpaceCreate(dSpaceID space) + dSpaceID dQuadTreeSpaceCreate (dSpaceID space, dVector3 Center, + dVector3 Extents, int Depth) + + void dSpaceDestroy (dSpaceID) + void dSpaceAdd (dSpaceID, dGeomID) + void dSpaceRemove (dSpaceID, dGeomID) + int dSpaceQuery (dSpaceID, dGeomID) + void dSpaceCollide (dSpaceID space, void *data, dNearCallback *callback) + void dSpaceCollide2 (dGeomID o1, dGeomID o2, void *data, dNearCallback *callback) + + void dHashSpaceSetLevels (dSpaceID space, int minlevel, int maxlevel) + void dHashSpaceGetLevels (dSpaceID space, int *minlevel, int *maxlevel) + + void dSpaceSetCleanup (dSpaceID space, int mode) + int dSpaceGetCleanup (dSpaceID space) + + int dSpaceGetNumGeoms (dSpaceID) + dGeomID dSpaceGetGeom (dSpaceID, int i) + + # Geom + dGeomID dCreateSphere (dSpaceID space, dReal radius) + dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz) + dGeomID dCreatePlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d) + dGeomID dCreateCapsule (dSpaceID space, dReal radius, dReal length) + dGeomID dCreateCylinder (dSpaceID space, dReal radius, dReal length) + dGeomID dCreateGeomGroup (dSpaceID space) + + void dGeomSphereSetRadius (dGeomID sphere, dReal radius) + void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz) + void dGeomPlaneSetParams (dGeomID plane, dReal a, dReal b, dReal c, dReal d) + void dGeomCapsuleSetParams (dGeomID ccylinder, dReal radius, dReal length) + void dGeomCylinderSetParams (dGeomID ccylinder, dReal radius, dReal length) + + dReal dGeomSphereGetRadius (dGeomID sphere) + void dGeomBoxGetLengths (dGeomID box, dVector3 result) + void dGeomPlaneGetParams (dGeomID plane, dVector4 result) + void dGeomCapsuleGetParams (dGeomID ccylinder, dReal *radius, dReal *length) + void dGeomCylinderGetParams (dGeomID ccylinder, dReal *radius, dReal *length) + + dReal dGeomSpherePointDepth (dGeomID sphere, dReal x, dReal y, dReal z) + dReal dGeomBoxPointDepth (dGeomID box, dReal x, dReal y, dReal z) + dReal dGeomPlanePointDepth (dGeomID plane, dReal x, dReal y, dReal z) + dReal dGeomCapsulePointDepth (dGeomID ccylinder, dReal x, dReal y, dReal z) + + dGeomID dCreateRay (dSpaceID space, dReal length) + void dGeomRaySetLength (dGeomID ray, dReal length) + dReal dGeomRayGetLength (dGeomID ray) + void dGeomRaySet (dGeomID ray, dReal px, dReal py, dReal pz, + dReal dx, dReal dy, dReal dz) + void dGeomRayGet (dGeomID ray, dVector3 start, dVector3 dir) + + void dGeomSetData (dGeomID, void *) + void *dGeomGetData (dGeomID) + void dGeomSetBody (dGeomID, dBodyID) + dBodyID dGeomGetBody (dGeomID) + void dGeomSetPosition (dGeomID, dReal x, dReal y, dReal z) + void dGeomSetRotation (dGeomID, dMatrix3 R) + void dGeomSetQuaternion (dGeomID, dQuaternion) + dReal * dGeomGetPosition (dGeomID) + dReal * dGeomGetRotation (dGeomID) + void dGeomGetQuaternion (dGeomID, dQuaternion result) + void dGeomSetOffsetPosition (dGeomID, dReal x, dReal y, dReal z) + void dGeomSetOffsetRotation (dGeomID, dMatrix3 R) + void dGeomClearOffset (dGeomID) + dReal * dGeomGetOffsetPosition (dGeomID) + dReal * dGeomGetOffsetRotation (dGeomID) + void dGeomDestroy (dGeomID) + void dGeomGetAABB (dGeomID, dReal aabb[6]) + dReal *dGeomGetSpaceAABB (dGeomID) + int dGeomIsSpace (dGeomID) + dSpaceID dGeomGetSpace (dGeomID) + int dGeomGetClass (dGeomID) + + void dGeomSetCategoryBits(dGeomID, unsigned long bits) + void dGeomSetCollideBits(dGeomID, unsigned long bits) + unsigned long dGeomGetCategoryBits(dGeomID) + unsigned long dGeomGetCollideBits(dGeomID) + + void dGeomEnable (dGeomID) + void dGeomDisable (dGeomID) + int dGeomIsEnabled (dGeomID) + + void dGeomGroupAdd (dGeomID group, dGeomID x) + void dGeomGroupRemove (dGeomID group, dGeomID x) + int dGeomGroupGetNumGeoms (dGeomID group) + dGeomID dGeomGroupGetGeom (dGeomID group, int i) + + dGeomID dCreateGeomTransform (dSpaceID space) + void dGeomTransformSetGeom (dGeomID g, dGeomID obj) + dGeomID dGeomTransformGetGeom (dGeomID g) + void dGeomTransformSetCleanup (dGeomID g, int mode) + int dGeomTransformGetCleanup (dGeomID g) + void dGeomTransformSetInfo (dGeomID g, int mode) + int dGeomTransformGetInfo (dGeomID g) + + int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact, int skip) + + # Trimesh + dTriMeshDataID dGeomTriMeshDataCreate() + void dGeomTriMeshDataDestroy(dTriMeshDataID g) + void dGeomTriMeshDataBuildSingle1 (dTriMeshDataID g, void* Vertices, + int VertexStride, int VertexCount, + void* Indices, int IndexCount, + int TriStride, void* Normals) + + void dGeomTriMeshDataBuildSimple(dTriMeshDataID g, + dReal* Vertices, int VertexCount, + int* Indices, int IndexCount) + + dGeomID dCreateTriMesh (dSpaceID space, dTriMeshDataID Data, + void* Callback, + void* ArrayCallback, + void* RayCallback) + + void dGeomTriMeshSetData (dGeomID g, dTriMeshDataID Data) + + void dGeomTriMeshClearTCCache (dGeomID g) + + void dGeomTriMeshGetTriangle (dGeomID g, int Index, dVector3 *v0, + dVector3 *v1, dVector3 *v2) + + int dGeomTriMeshGetTriangleCount (dGeomID g) + + void dGeomTriMeshGetPoint (dGeomID g, int Index, dReal u, dReal v, + dVector3 Out) + + void dGeomTriMeshEnableTC(dGeomID g, int geomClass, int enable) + int dGeomTriMeshIsTCEnabled(dGeomID g, int geomClass) + + # Heightfield + dHeightfieldDataID dGeomHeightfieldDataCreate() + void dGeomHeightfieldDataDestroy(dHeightfieldDataID g) + void dGeomHeightfieldDataBuildCallback(dHeightfieldDataID d, + void* pUserData, + dHeightfieldGetHeight* pCallback, + dReal width, dReal depth, + int widthSamples, int depthSamples, + dReal scale, dReal offset, + dReal thickness, int bWrap) + dGeomID dCreateHeightfield (dSpaceID space, dHeightfieldDataID data, + int bPlaceable) + diff -Nru ode-0.11.1/bindings/python/ode.pyx ode-0.14/bindings/python/ode.pyx --- ode-0.11.1/bindings/python/ode.pyx 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/bindings/python/ode.pyx 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,4401 @@ +###################################################################### +# Python Open Dynamics Engine Wrapper +# Copyright (C) 2004 PyODE developers (see file AUTHORS) +# All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of EITHER: +# (1) The GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at +# your option) any later version. The text of the GNU Lesser +# General Public License is included with this library in the +# file LICENSE. +# (2) The BSD-style license that is included with this library in +# the file LICENSE-BSD. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files +# LICENSE and LICENSE-BSD for more details. +###################################################################### + +from ode cimport * + + +paramLoStop = 0 +paramHiStop = 1 +paramVel = 2 +paramFMax = 3 +paramFudgeFactor = 4 +paramBounce = 5 +paramCFM = 6 +paramStopERP = 7 +paramStopCFM = 8 +paramSuspensionERP = 9 +paramSuspensionCFM = 10 + +ParamLoStop = 0 +ParamHiStop = 1 +ParamVel = 2 +ParamFMax = 3 +ParamFudgeFactor = 4 +ParamBounce = 5 +ParamCFM = 6 +ParamStopERP = 7 +ParamStopCFM = 8 +ParamSuspensionERP = 9 +ParamSuspensionCFM = 10 + +ParamLoStop2 = 256 + 0 +ParamHiStop2 = 256 + 1 +ParamVel2 = 256 + 2 +ParamFMax2 = 256 + 3 +ParamFudgeFactor2 = 256 + 4 +ParamBounce2 = 256 + 5 +ParamCFM2 = 256 + 6 +ParamStopERP2 = 256 + 7 +ParamStopCFM2 = 256 + 8 +ParamSuspensionERP2 = 256 + 9 +ParamSuspensionCFM2 = 256 + 10 + +ParamLoStop3 = 512 + 0 +ParamHiStop3 = 512 + 1 +ParamVel3 = 512 + 2 +ParamFMax3 = 512 + 3 +ParamFudgeFactor3 = 512 + 4 +ParamBounce3 = 512 + 5 +ParamCFM3 = 512 + 6 +ParamStopERP3 = 512 + 7 +ParamStopCFM3 = 512 + 8 +ParamSuspensionERP3 = 512 + 9 +ParamSuspensionCFM3 = 512 + 10 + +ParamGroup = 256 + +ContactMu2 = 0x001 +ContactFDir1 = 0x002 +ContactBounce = 0x004 +ContactSoftERP = 0x008 +ContactSoftCFM = 0x010 +ContactMotion1 = 0x020 +ContactMotion2 = 0x040 +ContactSlip1 = 0x080 +ContactSlip2 = 0x100 + +ContactApprox0 = 0x0000 +ContactApprox1_1 = 0x1000 +ContactApprox1_2 = 0x2000 +ContactApprox1 = 0x3000 + +AMotorUser = dAMotorUser +AMotorEuler = dAMotorEuler + +Infinity = dInfinity + + +import weakref +_geom_c2py_lut = weakref.WeakValueDictionary() + + +cdef class Mass: + """Mass parameters of a rigid body. + + This class stores mass parameters of a rigid body which can be + accessed through the following attributes: + + - mass: The total mass of the body (float) + - c: The center of gravity position in body frame (3-tuple of floats) + - I: The 3x3 inertia tensor in body frame (3-tuple of 3-tuples) + + This class wraps the dMass structure from the C API. + + @ivar mass: The total mass of the body + @ivar c: The center of gravity position in body frame (cx, cy, cz) + @ivar I: The 3x3 inertia tensor in body frame ((I11, I12, I13), (I12, I22, I23), (I13, I23, I33)) + @type mass: float + @type c: 3-tuple of floats + @type I: 3-tuple of 3-tuples of floats + """ + cdef dMass _mass + + def __cinit__(self): + dMassSetZero(&self._mass) + + def setZero(self): + """setZero() + + Set all the mass parameters to zero.""" + dMassSetZero(&self._mass) + + def setParameters(self, mass, cgx, cgy, cgz, I11, I22, I33, I12, I13, I23): + """setParameters(mass, cgx, cgy, cgz, I11, I22, I33, I12, I13, I23) + + Set the mass parameters to the given values. + + @param mass: Total mass of the body. + @param cgx: Center of gravity position in the body frame (x component). + @param cgy: Center of gravity position in the body frame (y component). + @param cgz: Center of gravity position in the body frame (z component). + @param I11: Inertia tensor + @param I22: Inertia tensor + @param I33: Inertia tensor + @param I12: Inertia tensor + @param I13: Inertia tensor + @param I23: Inertia tensor + @type mass: float + @type cgx: float + @type cgy: float + @type cgz: float + @type I11: float + @type I22: float + @type I33: float + @type I12: float + @type I13: float + @type I23: float + """ + dMassSetParameters(&self._mass, mass, cgx, cgy, cgz, + I11, I22, I33, I12, I13, I23) + + def setSphere(self, density, radius): + """setSphere(density, radius) + + Set the mass parameters to represent a sphere of the given radius + and density, with the center of mass at (0,0,0) relative to the body. + + @param density: The density of the sphere + @param radius: The radius of the sphere + @type density: float + @type radius: float + """ + dMassSetSphere(&self._mass, density, radius) + + def setSphereTotal(self, total_mass, radius): + """setSphereTotal(total_mass, radius) + + Set the mass parameters to represent a sphere of the given radius + and mass, with the center of mass at (0,0,0) relative to the body. + + @param total_mass: The total mass of the sphere + @param radius: The radius of the sphere + @type total_mass: float + @type radius: float + """ + dMassSetSphereTotal(&self._mass, total_mass, radius) + + def setCapsule(self, density, direction, radius, length): + """setCapsule(density, direction, radius, length) + + Set the mass parameters to represent a capsule of the given parameters + and density, with the center of mass at (0,0,0) relative to the body. + The radius of the cylinder (and the spherical cap) is radius. The length + of the cylinder (not counting the spherical cap) is length. The + cylinder's long axis is oriented along the body's x, y or z axis + according to the value of direction (1=x, 2=y, 3=z). The first function + accepts the density of the object, the second accepts its total mass. + + @param density: The density of the capsule + @param direction: The direction of the capsule's cylinder (1=x axis, 2=y axis, 3=z axis) + @param radius: The radius of the capsule's cylinder + @param length: The length of the capsule's cylinder (without the caps) + @type density: float + @type direction: int + @type radius: float + @type length: float + """ + dMassSetCapsule(&self._mass, density, direction, radius, length) + + def setCapsuleTotal(self, total_mass, direction, radius, length): + """setCapsuleTotal(total_mass, direction, radius, length) + + Set the mass parameters to represent a capsule of the given parameters + and mass, with the center of mass at (0,0,0) relative to the body. The + radius of the cylinder (and the spherical cap) is radius. The length of + the cylinder (not counting the spherical cap) is length. The cylinder's + long axis is oriented along the body's x, y or z axis according to the + value of direction (1=x, 2=y, 3=z). The first function accepts the + density of the object, the second accepts its total mass. + + @param total_mass: The total mass of the capsule + @param direction: The direction of the capsule's cylinder (1=x axis, 2=y axis, 3=z axis) + @param radius: The radius of the capsule's cylinder + @param length: The length of the capsule's cylinder (without the caps) + @type total_mass: float + @type direction: int + @type radius: float + @type length: float + """ + dMassSetCapsuleTotal(&self._mass, total_mass, direction, + radius, length) + + def setCylinder(self, density, direction, r, h): + """setCylinder(density, direction, r, h) + + Set the mass parameters to represent a flat-ended cylinder of + the given parameters and density, with the center of mass at + (0,0,0) relative to the body. The radius of the cylinder is r. + The length of the cylinder is h. The cylinder's long axis is + oriented along the body's x, y or z axis according to the value + of direction (1=x, 2=y, 3=z). + + @param density: The density of the cylinder + @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis) + @param r: The radius of the cylinder + @param h: The length of the cylinder + @type density: float + @type direction: int + @type r: float + @type h: float + """ + dMassSetCylinder(&self._mass, density, direction, r, h) + + def setCylinderTotal(self, total_mass, direction, r, h): + """setCylinderTotal(total_mass, direction, r, h) + + Set the mass parameters to represent a flat-ended cylinder of + the given parameters and mass, with the center of mass at + (0,0,0) relative to the body. The radius of the cylinder is r. + The length of the cylinder is h. The cylinder's long axis is + oriented along the body's x, y or z axis according to the value + of direction (1=x, 2=y, 3=z). + + @param total_mass: The total mass of the cylinder + @param direction: The direction of the cylinder (1=x axis, 2=y axis, 3=z axis) + @param r: The radius of the cylinder + @param h: The length of the cylinder + @type total_mass: float + @type direction: int + @type r: float + @type h: float + """ + dMassSetCylinderTotal(&self._mass, total_mass, direction, r, h) + + def setBox(self, density, lx, ly, lz): + """setBox(density, lx, ly, lz) + + Set the mass parameters to represent a box of the given + dimensions and density, with the center of mass at (0,0,0) + relative to the body. The side lengths of the box along the x, + y and z axes are lx, ly and lz. + + @param density: The density of the box + @param lx: The length along the x axis + @param ly: The length along the y axis + @param lz: The length along the z axis + @type density: float + @type lx: float + @type ly: float + @type lz: float + """ + dMassSetBox(&self._mass, density, lx, ly, lz) + + def setBoxTotal(self, total_mass, lx, ly, lz): + """setBoxTotal(total_mass, lx, ly, lz) + + Set the mass parameters to represent a box of the given + dimensions and mass, with the center of mass at (0,0,0) + relative to the body. The side lengths of the box along the x, + y and z axes are lx, ly and lz. + + @param total_mass: The total mass of the box + @param lx: The length along the x axis + @param ly: The length along the y axis + @param lz: The length along the z axis + @type total_mass: float + @type lx: float + @type ly: float + @type lz: float + """ + dMassSetBoxTotal(&self._mass, total_mass, lx, ly, lz) + + def adjust(self, newmass): + """adjust(newmass) + + Adjust the total mass. Given mass parameters for some object, + adjust them so the total mass is now newmass. This is useful + when using the setXyz() methods to set the mass parameters for + certain objects - they take the object density, not the total + mass. + + @param newmass: The new total mass + @type newmass: float + """ + dMassAdjust(&self._mass, newmass) + + def translate(self, t): + """translate(t) + + Adjust mass parameters. Given mass parameters for some object, + adjust them to represent the object displaced by (x,y,z) + relative to the body frame. + + @param t: Translation vector (x, y, z) + @type t: 3-tuple of floats + """ + dMassTranslate(&self._mass, t[0], t[1], t[2]) + +# def rotate(self, R): +# """ +# Given mass parameters for some object, adjust them to +# represent the object rotated by R relative to the body frame. +# """ +# pass + + def add(self, Mass b): + """add(b) + + Add the mass b to the mass object. Masses can also be added using + the + operator. + + @param b: The mass to add to this mass + @type b: Mass + """ + dMassAdd(&self._mass, &b._mass) + + def __getattr__(self, name): + if name == "mass": + return self._mass.mass + elif name == "c": + return self._mass.c[0], self._mass.c[1], self._mass.c[2] + elif name == "I": + return ((self._mass.I[0], self._mass.I[1], self._mass.I[2]), + (self._mass.I[4], self._mass.I[5], self._mass.I[6]), + (self._mass.I[8], self._mass.I[9], self._mass.I[10])) + else: + raise AttributeError("Mass object has no attribute '%s'" % name) + + def __setattr__(self, name, value): + if name == "mass": + self.adjust(value) + elif name == "c": + raise AttributeError("Use the setParameter() method to change c") + elif name == "I": + raise AttributeError("Use the setParameter() method to change I") + else: + raise AttributeError("Mass object has no attribute '%s" % name) + + def __add__(self, Mass b): + self.add(b) + return self + + def __str__(self): + m = str(self._mass.mass) + sc0 = str(self._mass.c[0]) + sc1 = str(self._mass.c[1]) + sc2 = str(self._mass.c[2]) + I11 = str(self._mass.I[0]) + I22 = str(self._mass.I[5]) + I33 = str(self._mass.I[10]) + I12 = str(self._mass.I[1]) + I13 = str(self._mass.I[2]) + I23 = str(self._mass.I[6]) + return ("Mass=%s\n" + "Cg=(%s, %s, %s)\n" + "I11=%s I22=%s I33=%s\n" + "I12=%s I13=%s I23=%s" % + (m, sc0, sc1, sc2, I11, I22, I33, I12, I13, I23)) +# return ("Mass=%s / " +# "Cg=(%s, %s, %s) / " +# "I11=%s I22=%s I33=%s " +# "I12=%s I13=%s I23=%s" % +# (m, sc0, sc1, sc2, I11, I22, I33, I12, I13, I23)) + + +cdef class Contact: + """This class represents a contact between two bodies in one point. + + A Contact object stores all the input parameters for a ContactJoint. + This class wraps the ODE dContact structure which has 3 components:: + + struct dContact { + dSurfaceParameters surface; + dContactGeom geom; + dVector3 fdir1; + }; + + This wrapper class provides methods to get and set the items of those + structures. + """ + + cdef dContact _contact + + def __cinit__(self): + self._contact.surface.mode = ContactBounce + self._contact.surface.mu = dInfinity + + self._contact.surface.bounce = 0.1 + + # getMode + def getMode(self): + """getMode() -> flags + + Return the contact flags. + """ + return self._contact.surface.mode + + # setMode + def setMode(self, flags): + """setMode(flags) + + Set the contact flags. The argument m is a combination of the + ContactXyz flags (ContactMu2, ContactBounce, ...). + + @param flags: Contact flags + @type flags: int + """ + self._contact.surface.mode = flags + + # getMu + def getMu(self): + """getMu() -> float + + Return the Coulomb friction coefficient. + """ + return self._contact.surface.mu + + # setMu + def setMu(self, mu): + """setMu(mu) + + Set the Coulomb friction coefficient. + + @param mu: Coulomb friction coefficient (0..Infinity) + @type mu: float + """ + self._contact.surface.mu = mu + + # getMu2 + def getMu2(self): + """getMu2() -> float + + Return the optional Coulomb friction coefficient for direction 2. + """ + return self._contact.surface.mu2 + + # setMu2 + def setMu2(self, mu): + """setMu2(mu) + + Set the optional Coulomb friction coefficient for direction 2. + + @param mu: Coulomb friction coefficient (0..Infinity) + @type mu: float + """ + self._contact.surface.mu2 = mu + + # getBounce + def getBounce(self): + """getBounce() -> float + + Return the restitution parameter. + """ + return self._contact.surface.bounce + + # setBounce + def setBounce(self, b): + """setBounce(b) + + @param b: Restitution parameter (0..1) + @type b: float + """ + self._contact.surface.bounce = b + + # getBounceVel + def getBounceVel(self): + """getBounceVel() -> float + + Return the minimum incoming velocity necessary for bounce. + """ + return self._contact.surface.bounce_vel + + # setBounceVel + def setBounceVel(self, bv): + """setBounceVel(bv) + + Set the minimum incoming velocity necessary for bounce. Incoming + velocities below this will effectively have a bounce parameter of 0. + + @param bv: Velocity + @type bv: float + """ + self._contact.surface.bounce_vel = bv + + # getSoftERP + def getSoftERP(self): + """getSoftERP() -> float + + Return the contact normal "softness" parameter. + """ + return self._contact.surface.soft_erp + + # setSoftERP + def setSoftERP(self, erp): + """setSoftERP(erp) + + Set the contact normal "softness" parameter. + + @param erp: Softness parameter + @type erp: float + """ + self._contact.surface.soft_erp = erp + + # getSoftCFM + def getSoftCFM(self): + """getSoftCFM() -> float + + Return the contact normal "softness" parameter. + """ + return self._contact.surface.soft_cfm + + # setSoftCFM + def setSoftCFM(self, cfm): + """setSoftCFM(cfm) + + Set the contact normal "softness" parameter. + + @param cfm: Softness parameter + @type cfm: float + """ + self._contact.surface.soft_cfm = cfm + + # getMotion1 + def getMotion1(self): + """getMotion1() -> float + + Get the surface velocity in friction direction 1. + """ + return self._contact.surface.motion1 + + # setMotion1 + def setMotion1(self, m): + """setMotion1(m) + + Set the surface velocity in friction direction 1. + + @param m: Surface velocity + @type m: float + """ + self._contact.surface.motion1 = m + + # getMotion2 + def getMotion2(self): + """getMotion2() -> float + + Get the surface velocity in friction direction 2. + """ + return self._contact.surface.motion2 + + # setMotion2 + def setMotion2(self, m): + """setMotion2(m) + + Set the surface velocity in friction direction 2. + + @param m: Surface velocity + @type m: float + """ + self._contact.surface.motion2 = m + + # getSlip1 + def getSlip1(self): + """getSlip1() -> float + + Get the coefficient of force-dependent-slip (FDS) for friction + direction 1. + """ + return self._contact.surface.slip1 + + # setSlip1 + def setSlip1(self, s): + """setSlip1(s) + + Set the coefficient of force-dependent-slip (FDS) for friction + direction 1. + + @param s: FDS coefficient + @type s: float + """ + self._contact.surface.slip1 = s + + # getSlip2 + def getSlip2(self): + """getSlip2() -> float + + Get the coefficient of force-dependent-slip (FDS) for friction + direction 2. + """ + return self._contact.surface.slip2 + + # setSlip2 + def setSlip2(self, s): + """setSlip2(s) + + Set the coefficient of force-dependent-slip (FDS) for friction + direction 1. + + @param s: FDS coefficient + @type s: float + """ + self._contact.surface.slip2 = s + + # getFDir1 + def getFDir1(self): + """getFDir1() -> (x, y, z) + + Get the "first friction direction" vector that defines a direction + along which frictional force is applied. + """ + return (self._contact.fdir1[0], + self._contact.fdir1[1], + self._contact.fdir1[2]) + + # setFDir1 + def setFDir1(self, fdir): + """setFDir1(fdir) + + Set the "first friction direction" vector that defines a direction + along which frictional force is applied. It must be of unit length + and perpendicular to the contact normal (so it is typically + tangential to the contact surface). + + @param fdir: Friction direction + @type fdir: 3-sequence of floats + """ + self._contact.fdir1[0] = fdir[0] + self._contact.fdir1[1] = fdir[1] + self._contact.fdir1[2] = fdir[2] + + # getContactGeomParams + def getContactGeomParams(self): + """getContactGeomParams() -> (pos, normal, depth, geom1, geom2) + + Get the ContactGeom structure of the contact. + + The return value is a tuple (pos, normal, depth, geom1, geom2) + where pos and normal are 3-tuples of floats and depth is a single + float. geom1 and geom2 are the Geom objects of the geoms in contact. + """ + cdef long id1, id2 + + pos = (self._contact.geom.pos[0], + self._contact.geom.pos[1], + self._contact.geom.pos[2]) + normal = (self._contact.geom.normal[0], + self._contact.geom.normal[1], + self._contact.geom.normal[2]) + depth = self._contact.geom.depth + + id1 = self._contact.geom.g1 + id2 = self._contact.geom.g2 + g1 = _geom_c2py_lut[id1] + g2 = _geom_c2py_lut[id2] + return pos, normal, depth, g1, g2 + + # setContactGeomParams + def setContactGeomParams(self, pos, normal, depth, g1=None, g2=None): + """setContactGeomParams(pos, normal, depth, geom1=None, geom2=None) + + Set the ContactGeom structure of the contact. + + @param pos: Contact position, in global coordinates + @type pos: 3-sequence of floats + @param normal: Unit length normal vector + @type normal: 3-sequence of floats + @param depth: Depth to which the two bodies inter-penetrate + @type depth: float + @param geom1: Geometry object 1 that collided + @type geom1: Geom + @param geom2: Geometry object 2 that collided + @type geom2: Geom + """ + + cdef long id + + self._contact.geom.pos[0] = pos[0] + self._contact.geom.pos[1] = pos[1] + self._contact.geom.pos[2] = pos[2] + self._contact.geom.normal[0] = normal[0] + self._contact.geom.normal[1] = normal[1] + self._contact.geom.normal[2] = normal[2] + self._contact.geom.depth = depth + if g1 != None: + id = g1._id() + self._contact.geom.g1 = id + else: + self._contact.geom.g1 = 0 + + if g2 != None: + id = g2._id() + self._contact.geom.g2 = id + else: + self._contact.geom.g2 = 0 + + +# World +cdef class World: + """Dynamics world. + + The world object is a container for rigid bodies and joints. + + + Constructor:: + + World() + """ + + cdef dWorldID wid + + def __cinit__(self): + self.wid = dWorldCreate() + + def __dealloc__(self): + if self.wid != NULL: + dWorldDestroy(self.wid) + + # setGravity + def setGravity(self, gravity): + """setGravity(gravity) + + Set the world's global gravity vector. + + @param gravity: Gravity vector + @type gravity: 3-sequence of floats + """ + dWorldSetGravity(self.wid, gravity[0], gravity[1], gravity[2]) + + # getGravity + def getGravity(self): + """getGravity() -> 3-tuple + + Return the world's global gravity vector as a 3-tuple of floats. + """ + cdef dVector3 g + dWorldGetGravity(self.wid, g) + return g[0], g[1], g[2] + + # setERP + def setERP(self, erp): + """setERP(erp) + + Set the global ERP value, that controls how much error + correction is performed in each time step. Typical values are + in the range 0.1-0.8. The default is 0.2. + + @param erp: Global ERP value + @type erp: float + """ + dWorldSetERP(self.wid, erp) + + # getERP + def getERP(self): + """getERP() -> float + + Get the global ERP value, that controls how much error + correction is performed in each time step. Typical values are + in the range 0.1-0.8. The default is 0.2. + """ + return dWorldGetERP(self.wid) + + # setCFM + def setCFM(self, cfm): + """setCFM(cfm) + + Set the global CFM (constraint force mixing) value. Typical + values are in the range 10E-9 - 1. The default is 10E-5 if + single precision is being used, or 10E-10 if double precision + is being used. + + @param cfm: Constraint force mixing value + @type cfm: float + """ + dWorldSetCFM(self.wid, cfm) + + # getCFM + def getCFM(self): + """getCFM() -> float + + Get the global CFM (constraint force mixing) value. Typical + values are in the range 10E-9 - 1. The default is 10E-5 if + single precision is being used, or 10E-10 if double precision + is being used. + """ + return dWorldGetCFM(self.wid) + + # step + def step(self, stepsize): + """step(stepsize) + + Step the world. This uses a "big matrix" method that takes + time on the order of O(m3) and memory on the order of O(m2), where m + is the total number of constraint rows. + + For large systems this will use a lot of memory and can be + very slow, but this is currently the most accurate method. + + @param stepsize: Time step + @type stepsize: float + """ + + dWorldStep(self.wid, stepsize) + + # quickStep + def quickStep(self, stepsize): + """quickStep(stepsize) + + Step the world. This uses an iterative method that takes time + on the order of O(m*N) and memory on the order of O(m), where m is + the total number of constraint rows and N is the number of + iterations. + + For large systems this is a lot faster than dWorldStep, but it + is less accurate. + + @param stepsize: Time step + @type stepsize: float + """ + dWorldQuickStep(self.wid, stepsize) + + # setQuickStepNumIterations + def setQuickStepNumIterations(self, num): + """setQuickStepNumIterations(num) + + Set the number of iterations that the QuickStep method + performs per step. More iterations will give a more accurate + solution, but will take longer to compute. The default is 20 + iterations. + + @param num: Number of iterations + @type num: int + """ + + dWorldSetQuickStepNumIterations(self.wid, num) + + # getQuickStepNumIterations + def getQuickStepNumIterations(self): + """getQuickStepNumIterations() -> int + + Get the number of iterations that the QuickStep method + performs per step. More iterations will give a more accurate + solution, but will take longer to compute. The default is 20 + iterations. + """ + return dWorldGetQuickStepNumIterations(self.wid) + + # setQuickStepNumIterations + def setContactMaxCorrectingVel(self, vel): + """setContactMaxCorrectingVel(vel) + + Set the maximum correcting velocity that contacts are allowed + to generate. The default value is infinity (i.e. no + limit). Reducing this value can help prevent "popping" of + deeply embedded objects. + + @param vel: Maximum correcting velocity + @type vel: float + """ + dWorldSetContactMaxCorrectingVel(self.wid, vel) + + # getQuickStepNumIterations + def getContactMaxCorrectingVel(self): + """getContactMaxCorrectingVel() -> float + + Get the maximum correcting velocity that contacts are allowed + to generate. The default value is infinity (i.e. no + limit). Reducing this value can help prevent "popping" of + deeply embedded objects. + + """ + return dWorldGetContactMaxCorrectingVel(self.wid) + + # setContactSurfaceLayer + def setContactSurfaceLayer(self, depth): + """setContactSurfaceLayer(depth) + + Set the depth of the surface layer around all geometry + objects. Contacts are allowed to sink into the surface layer + up to the given depth before coming to rest. The default value + is zero. Increasing this to some small value (e.g. 0.001) can + help prevent jittering problems due to contacts being + repeatedly made and broken. + + @param depth: Surface layer depth + @type depth: float + """ + dWorldSetContactSurfaceLayer(self.wid, depth) + + # getContactSurfaceLayer + def getContactSurfaceLayer(self): + """getContactSurfaceLayer() + + Get the depth of the surface layer around all geometry + objects. Contacts are allowed to sink into the surface layer + up to the given depth before coming to rest. The default value + is zero. Increasing this to some small value (e.g. 0.001) can + help prevent jittering problems due to contacts being + repeatedly made and broken. + """ + return dWorldGetContactSurfaceLayer(self.wid) + + # setAutoDisableFlag + def setAutoDisableFlag(self, flag): + """setAutoDisableFlag(flag) + + Set the default auto-disable flag for newly created bodies. + + @param flag: True = Do auto disable + @type flag: bool + """ + dWorldSetAutoDisableFlag(self.wid, flag) + + # getAutoDisableFlag + def getAutoDisableFlag(self): + """getAutoDisableFlag() -> bool + + Get the default auto-disable flag for newly created bodies. + """ + return dWorldGetAutoDisableFlag(self.wid) + + # setAutoDisableLinearThreshold + def setAutoDisableLinearThreshold(self, threshold): + """setAutoDisableLinearThreshold(threshold) + + Set the default auto-disable linear threshold for newly created + bodies. + + @param threshold: Linear threshold + @type threshold: float + """ + dWorldSetAutoDisableLinearThreshold(self.wid, threshold) + + # getAutoDisableLinearThreshold + def getAutoDisableLinearThreshold(self): + """getAutoDisableLinearThreshold() -> float + + Get the default auto-disable linear threshold for newly created + bodies. + """ + return dWorldGetAutoDisableLinearThreshold(self.wid) + + # setAutoDisableAngularThreshold + def setAutoDisableAngularThreshold(self, threshold): + """setAutoDisableAngularThreshold(threshold) + + Set the default auto-disable angular threshold for newly created + bodies. + + @param threshold: Angular threshold + @type threshold: float + """ + dWorldSetAutoDisableAngularThreshold(self.wid, threshold) + + # getAutoDisableAngularThreshold + def getAutoDisableAngularThreshold(self): + """getAutoDisableAngularThreshold() -> float + + Get the default auto-disable angular threshold for newly created + bodies. + """ + return dWorldGetAutoDisableAngularThreshold(self.wid) + + # setAutoDisableSteps + def setAutoDisableSteps(self, steps): + """setAutoDisableSteps(steps) + + Set the default auto-disable steps for newly created bodies. + + @param steps: Auto disable steps + @type steps: int + """ + dWorldSetAutoDisableSteps(self.wid, steps) + + # getAutoDisableSteps + def getAutoDisableSteps(self): + """getAutoDisableSteps() -> int + + Get the default auto-disable steps for newly created bodies. + """ + return dWorldGetAutoDisableSteps(self.wid) + + # setAutoDisableTime + def setAutoDisableTime(self, time): + """setAutoDisableTime(time) + + Set the default auto-disable time for newly created bodies. + + @param time: Auto disable time + @type time: float + """ + dWorldSetAutoDisableTime(self.wid, time) + + # getAutoDisableTime + def getAutoDisableTime(self): + """getAutoDisableTime() -> float + + Get the default auto-disable time for newly created bodies. + """ + return dWorldGetAutoDisableTime(self.wid) + + # setLinearDamping + def setLinearDamping(self, scale): + """setLinearDamping(scale) + + Set the world's linear damping scale. + @param scale The linear damping scale that is to be applied to bodies. + Default is 0 (no damping). Should be in the interval [0, 1]. + @type scale: float + """ + dWorldSetLinearDamping(self.wid, scale) + + # getLinearDamping + def getLinearDamping(self): + """getLinearDamping() -> float + + Get the world's linear damping scale. + """ + return dWorldGetLinearDamping(self.wid) + + # setAngularDamping + def setAngularDamping(self, scale): + """setAngularDamping(scale) + + Set the world's angular damping scale. + @param scale The angular damping scale that is to be applied to bodies. + Default is 0 (no damping). Should be in the interval [0, 1]. + @type scale: float + """ + dWorldSetAngularDamping(self.wid, scale) + + # getAngularDamping + def getAngularDamping(self): + """getAngularDamping() -> float + + Get the world's angular damping scale. + """ + return dWorldGetAngularDamping(self.wid) + + # impulseToForce + def impulseToForce(self, stepsize, impulse): + """impulseToForce(stepsize, impulse) -> 3-tuple + + If you want to apply a linear or angular impulse to a rigid + body, instead of a force or a torque, then you can use this + function to convert the desired impulse into a force/torque + vector before calling the dBodyAdd... function. + + @param stepsize: Time step + @param impulse: Impulse vector + @type stepsize: float + @type impulse: 3-tuple of floats + """ + cdef dVector3 force + dWorldImpulseToForce(self.wid, stepsize, + impulse[0], impulse[1], impulse[2], force) + return force[0], force[1], force[2] + + # createBody +# def createBody(self): +# return Body(self) + + # createBallJoint +# def createBallJoint(self, jointgroup=None): +# return BallJoint(self, jointgroup) + + # createHingeJoint +# def createHingeJoint(self, jointgroup=None): +# return HingeJoint(self, jointgroup) + + # createHinge2Joint +# def createHinge2Joint(self, jointgroup=None): +# return Hinge2Joint(self, jointgroup) + + # createSliderJoint +# def createSliderJoint(self, jointgroup=None): +# return SliderJoint(self, jointgroup) + + # createFixedJoint +# def createFixedJoint(self, jointgroup=None): +# return FixedJoint(self, jointgroup) + + # createContactJoint +# def createContactJoint(self, jointgroup, contact): +# return ContactJoint(self, jointgroup, contact) + + +# Body +cdef class Body: + """The rigid body class encapsulating the ODE body. + + This class represents a rigid body that has a location and orientation + in space and that stores the mass properties of an object. + + When creating a Body object you have to pass the world it belongs to + as argument to the constructor:: + + >>> import ode + >>> w = ode.World() + >>> b = ode.Body(w) + """ + + cdef dBodyID bid + # A reference to the world so that the world won't be destroyed while + # there are still joints using it. + cdef object world + + # A dictionary with user attributes + # (set via __getattr__ and __setattr__) + cdef object userattribs + + def __cinit__(self, World world not None): + self.bid = dBodyCreate(world.wid) + + def __init__(self, World world not None): + """Constructor. + + @param world: The world in which the body should be created. + @type world: World + """ + self.world = world + self.userattribs = {} + + def __dealloc__(self): + if self.bid != NULL: + dBodyDestroy(self.bid) + + def __getattr__(self, name): + try: + return self.userattribs[name] + except: + raise AttributeError("Body object has no attribute '%s'" % name) + + def __setattr__(self, name, value): + self.userattribs[name] = value + + def __delattr__(self, name): + try: + del self.userattribs[name] + except: + raise AttributeError("Body object has no attribute '%s'" % name) + + # setPosition + def setPosition(self, pos): + """setPosition(pos) + + Set the position of the body. + + @param pos: The new position + @type pos: 3-sequence of floats + """ + dBodySetPosition(self.bid, pos[0], pos[1], pos[2]) + + # getPosition + def getPosition(self): + """getPosition() -> 3-tuple + + Return the current position of the body. + """ + cdef dReal* p + # The "const" in the original return value is cast away + p = dBodyGetPosition(self.bid) + return p[0], p[1], p[2] + + # setRotation + def setRotation(self, R): + """setRotation(R) + + Set the orientation of the body. The rotation matrix must be + given as a sequence of 9 floats which are the elements of the + matrix in row-major order. + + @param R: Rotation matrix + @type R: 9-sequence of floats + """ + cdef dMatrix3 m + m[0] = R[0] + m[1] = R[1] + m[2] = R[2] + m[3] = 0 + m[4] = R[3] + m[5] = R[4] + m[6] = R[5] + m[7] = 0 + m[8] = R[6] + m[9] = R[7] + m[10] = R[8] + m[11] = 0 + dBodySetRotation(self.bid, m) + + # getRotation + def getRotation(self): + """getRotation() -> 9-tuple + + Return the current rotation matrix as a tuple of 9 floats (row-major + order). + """ + cdef dReal* m + # The "const" in the original return value is cast away + m = dBodyGetRotation(self.bid) + return m[0], m[1], m[2], m[4], m[5], m[6], m[8], m[9], m[10] + + # getQuaternion + def getQuaternion(self): + """getQuaternion() -> 4-tuple + + Return the current rotation as a quaternion. The return value + is a list of 4 floats. + """ + cdef dReal* q + q = dBodyGetQuaternion(self.bid) + return q[0], q[1], q[2], q[3] + + # setQuaternion + def setQuaternion(self, q): + """setQuaternion(q) + + Set the orientation of the body. The quaternion must be given as a + sequence of 4 floats. + + @param q: Quaternion + @type q: 4-sequence of floats + """ + cdef dQuaternion w + w[0] = q[0] + w[1] = q[1] + w[2] = q[2] + w[3] = q[3] + dBodySetQuaternion(self.bid, w) + + # setLinearVel + def setLinearVel(self, vel): + """setLinearVel(vel) + + Set the linear velocity of the body. + + @param vel: New velocity + @type vel: 3-sequence of floats + """ + dBodySetLinearVel(self.bid, vel[0], vel[1], vel[2]) + + # getLinearVel + def getLinearVel(self): + """getLinearVel() -> 3-tuple + + Get the current linear velocity of the body. + """ + cdef dReal* p + # The "const" in the original return value is cast away + p = dBodyGetLinearVel(self.bid) + return p[0], p[1], p[2] + + # setAngularVel + def setAngularVel(self, vel): + """setAngularVel(vel) + + Set the angular velocity of the body. + + @param vel: New angular velocity + @type vel: 3-sequence of floats + """ + dBodySetAngularVel(self.bid, vel[0], vel[1], vel[2]) + + # getAngularVel + def getAngularVel(self): + """getAngularVel() -> 3-tuple + + Get the current angular velocity of the body. + """ + cdef dReal* p + # The "const" in the original return value is cast away + p = dBodyGetAngularVel(self.bid) + return p[0], p[1], p[2] + + # setMass + def setMass(self, Mass mass): + """setMass(mass) + + Set the mass properties of the body. The argument mass must be + an instance of a Mass object. + + @param mass: Mass properties + @type mass: Mass + """ + dBodySetMass(self.bid, &mass._mass) + + # getMass + def getMass(self): + """getMass() -> mass + + Return the mass properties as a Mass object. + """ + cdef Mass m + m = Mass() + dBodyGetMass(self.bid, &m._mass) + return m + + # addForce + def addForce(self, f): + """addForce(f) + + Add an external force f given in absolute coordinates. The force + is applied at the center of mass. + + @param f: Force + @type f: 3-sequence of floats + """ + dBodyAddForce(self.bid, f[0], f[1], f[2]) + + # addTorque + def addTorque(self, t): + """addTorque(t) + + Add an external torque t given in absolute coordinates. + + @param t: Torque + @type t: 3-sequence of floats + """ + dBodyAddTorque(self.bid, t[0], t[1], t[2]) + + # addRelForce + def addRelForce(self, f): + """addRelForce(f) + + Add an external force f given in relative coordinates + (relative to the body's own frame of reference). The force + is applied at the center of mass. + + @param f: Force + @type f: 3-sequence of floats + """ + dBodyAddRelForce(self.bid, f[0], f[1], f[2]) + + # addRelTorque + def addRelTorque(self, t): + """addRelTorque(t) + + Add an external torque t given in relative coordinates + (relative to the body's own frame of reference). + + @param t: Torque + @type t: 3-sequence of floats + """ + dBodyAddRelTorque(self.bid, t[0], t[1], t[2]) + + # addForceAtPos + def addForceAtPos(self, f, p): + """addForceAtPos(f, p) + + Add an external force f at position p. Both arguments must be + given in absolute coordinates. + + @param f: Force + @param p: Position + @type f: 3-sequence of floats + @type p: 3-sequence of floats + """ + dBodyAddForceAtPos(self.bid, f[0], f[1], f[2], p[0], p[1], p[2]) + + # addForceAtRelPos + def addForceAtRelPos(self, f, p): + """addForceAtRelPos(f, p) + + Add an external force f at position p. f is given in absolute + coordinates and p in absolute coordinates. + + @param f: Force + @param p: Position + @type f: 3-sequence of floats + @type p: 3-sequence of floats + """ + dBodyAddForceAtRelPos(self.bid, f[0], f[1], f[2], p[0], p[1], p[2]) + + # addRelForceAtPos + def addRelForceAtPos(self, f, p): + """addRelForceAtPos(f, p) + + Add an external force f at position p. f is given in relative + coordinates and p in relative coordinates. + + @param f: Force + @param p: Position + @type f: 3-sequence of floats + @type p: 3-sequence of floats + """ + dBodyAddRelForceAtPos(self.bid, f[0], f[1], f[2], p[0], p[1], p[2]) + + # addRelForceAtRelPos + def addRelForceAtRelPos(self, f, p): + """addRelForceAtRelPos(f, p) + + Add an external force f at position p. Both arguments must be + given in relative coordinates. + + @param f: Force + @param p: Position + @type f: 3-sequence of floats + @type p: 3-sequence of floats + """ + dBodyAddRelForceAtRelPos(self.bid, f[0], f[1], f[2], p[0], p[1], p[2]) + + # getForce + def getForce(self): + """getForce() -> 3-tuple + + Return the current accumulated force. + """ + cdef dReal* f + # The "const" in the original return value is cast away + f = dBodyGetForce(self.bid) + return f[0], f[1], f[2] + + # getTorque + def getTorque(self): + """getTorque() -> 3-tuple + + Return the current accumulated torque. + """ + cdef dReal* f + # The "const" in the original return value is cast away + f = dBodyGetTorque(self.bid) + return f[0], f[1], f[2] + + # setForce + def setForce(self, f): + """setForce(f) + + Set the body force accumulation vector. + + @param f: Force + @type f: 3-tuple of floats + """ + dBodySetForce(self.bid, f[0], f[1], f[2]) + + # setTorque + def setTorque(self, t): + """setTorque(t) + + Set the body torque accumulation vector. + + @param t: Torque + @type t: 3-tuple of floats + """ + dBodySetTorque(self.bid, t[0], t[1], t[2]) + + # getRelPointPos + def getRelPointPos(self, p): + """getRelPointPos(p) -> 3-tuple + + Utility function that takes a point p on a body and returns + that point's position in global coordinates. The point p + must be given in body relative coordinates. + + @param p: Body point (local coordinates) + @type p: 3-sequence of floats + """ + + cdef dVector3 res + dBodyGetRelPointPos(self.bid, p[0], p[1], p[2], res) + return res[0], res[1], res[2] + + # getRelPointVel + def getRelPointVel(self, p): + """getRelPointVel(p) -> 3-tuple + + Utility function that takes a point p on a body and returns + that point's velocity in global coordinates. The point p + must be given in body relative coordinates. + + @param p: Body point (local coordinates) + @type p: 3-sequence of floats + """ + cdef dVector3 res + dBodyGetRelPointVel(self.bid, p[0], p[1], p[2], res) + return res[0], res[1], res[2] + + # getPointVel + def getPointVel(self, p): + """getPointVel(p) -> 3-tuple + + Utility function that takes a point p on a body and returns + that point's velocity in global coordinates. The point p + must be given in global coordinates. + + @param p: Body point (global coordinates) + @type p: 3-sequence of floats + """ + cdef dVector3 res + dBodyGetPointVel(self.bid, p[0], p[1], p[2], res) + return res[0], res[1], res[2] + + # getPosRelPoint + def getPosRelPoint(self, p): + """getPosRelPoint(p) -> 3-tuple + + This is the inverse of getRelPointPos(). It takes a point p in + global coordinates and returns the point's position in + body-relative coordinates. + + @param p: Body point (global coordinates) + @type p: 3-sequence of floats + """ + cdef dVector3 res + dBodyGetPosRelPoint(self.bid, p[0], p[1], p[2], res) + return res[0], res[1], res[2] + + # vectorToWorld + def vectorToWorld(self, v): + """vectorToWorld(v) -> 3-tuple + + Given a vector v expressed in the body coordinate system, rotate + it to the world coordinate system. + + @param v: Vector in body coordinate system + @type v: 3-sequence of floats + """ + cdef dVector3 res + dBodyVectorToWorld(self.bid, v[0], v[1], v[2], res) + return res[0], res[1], res[2] + + # vectorFromWorld + def vectorFromWorld(self, v): + """vectorFromWorld(v) -> 3-tuple + + Given a vector v expressed in the world coordinate system, rotate + it to the body coordinate system. + + @param v: Vector in world coordinate system + @type v: 3-sequence of floats + """ + cdef dVector3 res + dBodyVectorFromWorld(self.bid, v[0], v[1], v[2], res) + return res[0], res[1], res[2] + + # Enable + def enable(self): + """enable() + + Manually enable a body. + """ + dBodyEnable(self.bid) + + # Disable + def disable(self): + """disable() + + Manually disable a body. Note that a disabled body that is connected + through a joint to an enabled body will be automatically re-enabled + at the next simulation step. + """ + dBodyDisable(self.bid) + + # isEnabled + def isEnabled(self): + """isEnabled() -> bool + + Check if a body is currently enabled. + """ + return dBodyIsEnabled(self.bid) + + # setFiniteRotationMode + def setFiniteRotationMode(self, mode): + """setFiniteRotationMode(mode) + + This function controls the way a body's orientation is updated at + each time step. The mode argument can be: + + - 0: An "infinitesimal" orientation update is used. This is + fast to compute, but it can occasionally cause inaccuracies + for bodies that are rotating at high speed, especially when + those bodies are joined to other bodies. This is the default + for every new body that is created. + + - 1: A "finite" orientation update is used. This is more + costly to compute, but will be more accurate for high speed + rotations. Note however that high speed rotations can result + in many types of error in a simulation, and this mode will + only fix one of those sources of error. + + @param mode: Rotation mode (0/1) + @type mode: int + """ + dBodySetFiniteRotationMode(self.bid, mode) + + # getFiniteRotationMode + def getFiniteRotationMode(self): + """getFiniteRotationMode() -> mode (0/1) + + Return the current finite rotation mode of a body (0 or 1). + See setFiniteRotationMode(). + """ + return dBodyGetFiniteRotationMode(self.bid) + + # setFiniteRotationAxis + def setFiniteRotationAxis(self, a): + """setFiniteRotationAxis(a) + + Set the finite rotation axis of the body. This axis only has a + meaning when the finite rotation mode is set + (see setFiniteRotationMode()). + + @param a: Axis + @type a: 3-sequence of floats + """ + dBodySetFiniteRotationAxis(self.bid, a[0], a[1], a[2]) + + # getFiniteRotationAxis + def getFiniteRotationAxis(self): + """getFiniteRotationAxis() -> 3-tuple + + Return the current finite rotation axis of the body. + """ + cdef dVector3 p + # The "const" in the original return value is cast away + dBodyGetFiniteRotationAxis(self.bid, p) + return p[0], p[1], p[2] + + # getNumJoints + def getNumJoints(self): + """getNumJoints() -> int + + Return the number of joints that are attached to this body. + """ + return dBodyGetNumJoints(self.bid) + + # setGravityMode + def setGravityMode(self, mode): + """setGravityMode(mode) + + Set whether the body is influenced by the world's gravity + or not. If mode is True it is, otherwise it isn't. + Newly created bodies are always influenced by the world's gravity. + + @param mode: Gravity mode + @type mode: bool + """ + dBodySetGravityMode(self.bid, mode) + + # getGravityMode + def getGravityMode(self): + """getGravityMode() -> bool + + Return True if the body is influenced by the world's gravity. + """ + return dBodyGetGravityMode(self.bid) + + def setDynamic(self): + """setDynamic() + + Set a body to the (default) "dynamic" state, instead of "kinematic". + See setKinematic() for more information. + """ + dBodySetDynamic(self.bid) + + def setKinematic(self): + """setKinematic() + + Set the kinematic state of the body (change it into a kinematic body) + + Kinematic bodies behave as if they had infinite mass. This means they don't react + to any force (gravity, constraints or user-supplied); they simply follow + velocity to reach the next position. [from ODE wiki] + + """ + dBodySetKinematic(self.bid) + + def isKinematic(self): + """isKinematic() -> bool + + Return True if the body is kinematic (not influenced by other forces). + + Kinematic bodies behave as if they had infinite mass. This means they don't react + to any force (gravity, constraints or user-supplied); they simply follow + velocity to reach the next position. [from ODE wiki] + + """ + return dBodyIsKinematic(self.bid) + + def setMaxAngularSpeed(self, max_speed): + """setMaxAngularSpeed(max_speed) + + You can also limit the maximum angular speed. In contrast to the damping + functions, the angular velocity is affected before the body is moved. + This means that it will introduce errors in joints that are forcing the + body to rotate too fast. Some bodies have naturally high angular + velocities (like cars' wheels), so you may want to give them a very high + (like the default, dInfinity) limit. + + """ + dBodySetMaxAngularSpeed(self.bid, max_speed) + + +# JointGroup +cdef class JointGroup: + """Joint group. + + Constructor:: + + JointGroup() + """ + + # JointGroup ID + cdef dJointGroupID gid + # A list of Python joints that were added to the group + cdef object jointlist + + def __cinit__(self): + self.gid = dJointGroupCreate(0) + + def __init__(self): + self.jointlist = [] + + def __dealloc__(self): + if self.gid != NULL: + for j in self.jointlist: + j._destroyed() + dJointGroupDestroy(self.gid) + + # empty + def empty(self): + """empty() + + Destroy all joints in the group. + """ + dJointGroupEmpty(self.gid) + for j in self.jointlist: + j._destroyed() + self.jointlist = [] + + def _addjoint(self, j): + """_addjoint(j) + + Add a joint to the group. This is an internal method that is + called by the joints. The group has to know the Python + wrappers because it has to notify them when the group is + emptied (so that the ODE joints won't get destroyed + twice). The notification is done by calling _destroyed() on + the Python joints. + + @param j: The joint to add + @type j: Joint + """ + self.jointlist.append(j) + + +###################################################################### + +# Joint +cdef class Joint: + """Base class for all joint classes.""" + + # Joint id as returned by dJointCreateXxx() + cdef dJointID jid + # A reference to the world so that the world won't be destroyed while + # there are still joints using it. + cdef object world + # The feedback buffer + cdef dJointFeedback* feedback + + cdef object body1 + cdef object body2 + + # A dictionary with user attributes + # (set via __getattr__ and __setattr__) + cdef object userattribs + + def __cinit__(self, *a, **kw): + self.jid = NULL + self.world = None + self.feedback = NULL + self.body1 = None + self.body2 = None + self.userattribs = {} + + def __init__(self, *a, **kw): + raise NotImplementedError("Joint base class can't be used directly") + + def __dealloc__(self): + self.setFeedback(False) + if self.jid != NULL: + dJointDestroy(self.jid) + + def __getattr__(self, name): + try: + return self.userattribs[name] + except: + raise AttributeError("Joint object has no attribute '%s'" % name) + + def __setattr__(self, name, value): + self.userattribs[name] = value + + def __delattr__(self, name): + try: + del self.userattribs[name] + except: + raise AttributeError("Joint object has no attribute '%s'" % name) + + # _destroyed + def _destroyed(self): + """Notify the joint object about an external destruction of the ODE joint. + + This method has to be called when the underlying ODE object + was destroyed by someone else (e.g. by a joint group). The Python + wrapper will then refrain from destroying it again. + """ + self.jid = NULL + + # enable + def enable(self): + """enable() + + Enable the joint. Disabled joints are completely ignored during the + simulation. Disabled joints don't lose the already computed information + like anchors and axes. + """ + dJointEnable(self.jid) + + # disable + def disable(self): + """disable() + + Disable the joint. Disabled joints are completely ignored during the + simulation. Disabled joints don't lose the already computed information + like anchors and axes. + """ + dJointDisable(self.jid) + + # isEnabled + def isEnabled(self): + """isEnabled() -> bool + + Determine whether the joint is enabled. Disabled joints are completely + ignored during the simulation. Disabled joints don't lose the already + computed information like anchors and axes. + """ + return dJointIsEnabled(self.jid) + + # attach + def attach(self, Body body1, Body body2): + """attach(body1, body2) + + Attach the joint to some new bodies. A body can be attached + to the environment by passing None as second body. + + @param body1: First body + @param body2: Second body + @type body1: Body + @type body2: Body + """ + cdef dBodyID id1, id2 + + if body1 == None: + id1 = NULL + else: + id1 = body1.bid + + if body2 == None: + id2 = NULL + else: + id2 = body2.bid + + self.body1 = body1 + self.body2 = body2 + dJointAttach(self.jid, id1, id2) + + # getBody + def getBody(self, index): + """getBody(index) -> Body + + Return the bodies that this joint connects. If index is 0 the + "first" body will be returned, corresponding to the body1 + argument of the attach() method. If index is 1 the "second" body + will be returned, corresponding to the body2 argument of the + attach() method. + + @param index: Bodx index (0 or 1). + @type index: int + """ + + if index == 0: + return self.body1 + elif index == 1: + return self.body2 + else: + raise IndexError() + + # setFeedback + def setFeedback(self, flag=1): + """setFeedback(flag=True) + + Create a feedback buffer. If flag is True then a buffer is + allocated and the forces/torques applied by the joint can + be read using the getFeedback() method. If flag is False the + buffer is released. + + @param flag: Specifies whether a buffer should be created or released + @type flag: bool + """ + + if flag: + # Was there already a buffer allocated? then we're finished + if self.feedback != NULL: + return + # Allocate a buffer and pass it to ODE + self.feedback = malloc(sizeof(dJointFeedback)) + if self.feedback == NULL: + raise MemoryError("can't allocate feedback buffer") + dJointSetFeedback(self.jid, self.feedback) + else: + if self.feedback != NULL: + # Free a previously allocated buffer + dJointSetFeedback(self.jid, NULL) + free(self.feedback) + self.feedback = NULL + + # getFeedback + def getFeedback(self): + """getFeedback() -> (force1, torque1, force2, torque2) + + Get the forces/torques applied by the joint. If feedback is + activated (i.e. setFeedback(True) was called) then this method + returns a tuple (force1, torque1, force2, torque2) with the + forces and torques applied to body 1 and body 2. The + forces/torques are given as 3-tuples. + + If feedback is deactivated then the method always returns None. + """ + cdef dJointFeedback* fb + + fb = dJointGetFeedback(self.jid) + if fb == NULL: + return None + + f1 = (fb.f1[0], fb.f1[1], fb.f1[2]) + t1 = (fb.t1[0], fb.t1[1], fb.t1[2]) + f2 = (fb.f2[0], fb.f2[1], fb.f2[2]) + t2 = (fb.t2[0], fb.t2[1], fb.t2[2]) + return f1, t1, f2, t2 + +###################################################################### + + +# BallJoint +cdef class BallJoint(Joint): + """Ball joint. + + Constructor:: + + BallJoint(world, jointgroup=None) + """ + + def __cinit__(self, World world not None, jointgroup=None): + cdef JointGroup jg + cdef dJointGroupID jgid + + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreateBall(world.wid, jgid) + + def __init__(self, World world not None, jointgroup=None): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + + # setAnchor + def setAnchor(self, pos): + """setAnchor(pos) + + Set the joint anchor point which must be specified in world + coordinates. + + @param pos: Anchor position + @type pos: 3-sequence of floats + """ + dJointSetBallAnchor(self.jid, pos[0], pos[1], pos[2]) + + # getAnchor + def getAnchor(self): + """getAnchor() -> 3-tuple of floats + + Get the joint anchor point, in world coordinates. This + returns the point on body 1. If the joint is perfectly + satisfied, this will be the same as the point on body 2. + """ + + cdef dVector3 p + dJointGetBallAnchor(self.jid, p) + return p[0], p[1], p[2] + + # getAnchor2 + def getAnchor2(self): + """getAnchor2() -> 3-tuple of floats + + Get the joint anchor point, in world coordinates. This + returns the point on body 2. If the joint is perfectly + satisfied, this will be the same as the point on body 1. + """ + + cdef dVector3 p + dJointGetBallAnchor2(self.jid, p) + return p[0], p[1], p[2] + + # setParam + def setParam(self, param, value): + pass + + # getParam + def getParam(self, param): + return 0.0 + + +# HingeJoint +cdef class HingeJoint(Joint): + """Hinge joint. + + Constructor:: + + HingeJoint(world, jointgroup=None) + """ + + def __cinit__(self, World world not None, jointgroup=None): + cdef JointGroup jg + cdef dJointGroupID jgid + + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreateHinge(world.wid, jgid) + + def __init__(self, World world not None, jointgroup=None): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + + # setAnchor + def setAnchor(self, pos): + """setAnchor(pos) + + Set the hinge anchor which must be given in world coordinates. + + @param pos: Anchor position + @type pos: 3-sequence of floats + """ + dJointSetHingeAnchor(self.jid, pos[0], pos[1], pos[2]) + + # getAnchor + def getAnchor(self): + """getAnchor() -> 3-tuple of floats + + Get the joint anchor point, in world coordinates. This returns + the point on body 1. If the joint is perfectly satisfied, this + will be the same as the point on body 2. + """ + cdef dVector3 p + dJointGetHingeAnchor(self.jid, p) + return p[0], p[1], p[2] + + # getAnchor2 + def getAnchor2(self): + """getAnchor2() -> 3-tuple of floats + + Get the joint anchor point, in world coordinates. This returns + the point on body 2. If the joint is perfectly satisfied, this + will be the same as the point on body 1. + """ + cdef dVector3 p + dJointGetHingeAnchor2(self.jid, p) + return p[0], p[1], p[2] + + # setAxis + def setAxis(self, axis): + """setAxis(axis) + + Set the hinge axis. + + @param axis: Hinge axis + @type axis: 3-sequence of floats + """ + dJointSetHingeAxis(self.jid, axis[0], axis[1], axis[2]) + + # getAxis + def getAxis(self): + """getAxis() -> 3-tuple of floats + + Get the hinge axis. + """ + cdef dVector3 a + dJointGetHingeAxis(self.jid, a) + return a[0], a[1], a[2] + + # getAngle + def getAngle(self): + """getAngle() -> float + + Get the hinge angle. The angle is measured between the two + bodies, or between the body and the static environment. The + angle will be between -pi..pi. + + When the hinge anchor or axis is set, the current position of + the attached bodies is examined and that position will be the + zero angle. + """ + + return dJointGetHingeAngle(self.jid) + + # getAngleRate + def getAngleRate(self): + """getAngleRate() -> float + + Get the time derivative of the angle. + """ + return dJointGetHingeAngleRate(self.jid) + + # addTorque + def addTorque(self, torque): + """addTorque(torque) + + Applies the torque about the hinge axis. + + @param torque: Torque magnitude + @type torque: float + """ + dJointAddHingeTorque(self.jid, torque) + + # setParam + def setParam(self, param, value): + """setParam(param, value) + + Set limit/motor parameters for the joint. + + param is one of ParamLoStop, ParamHiStop, ParamVel, ParamFMax, + ParamFudgeFactor, ParamBounce, ParamCFM, ParamStopERP, ParamStopCFM, + ParamSuspensionERP, ParamSuspensionCFM. + + These parameter names can be optionally followed by a digit (2 + or 3) to indicate the second or third set of parameters. + + @param param: Selects the parameter to set + @param value: Parameter value + @type param: int + @type value: float + """ + + dJointSetHingeParam(self.jid, param, value) + + # getParam + def getParam(self, param): + """getParam(param) -> float + + Get limit/motor parameters for the joint. + + param is one of ParamLoStop, ParamHiStop, ParamVel, ParamFMax, + ParamFudgeFactor, ParamBounce, ParamCFM, ParamStopERP, ParamStopCFM, + ParamSuspensionERP, ParamSuspensionCFM. + + These parameter names can be optionally followed by a digit (2 + or 3) to indicate the second or third set of parameters. + + @param param: Selects the parameter to read + @type param: int + """ + return dJointGetHingeParam(self.jid, param) + + +# SliderJoint +cdef class SliderJoint(Joint): + """Slider joint. + + Constructor:: + + SlideJoint(world, jointgroup=None) + """ + + def __cinit__(self, World world not None, jointgroup=None): + cdef JointGroup jg + cdef dJointGroupID jgid + + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreateSlider(world.wid, jgid) + + def __init__(self, World world not None, jointgroup=None): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + + # setAxis + def setAxis(self, axis): + """setAxis(axis) + + Set the slider axis parameter. + + @param axis: Slider axis + @type axis: 3-sequence of floats + """ + dJointSetSliderAxis(self.jid, axis[0], axis[1], axis[2]) + + # getAxis + def getAxis(self): + """getAxis() -> 3-tuple of floats + + Get the slider axis parameter. + """ + cdef dVector3 a + dJointGetSliderAxis(self.jid, a) + return a[0], a[1], a[2] + + # getPosition + def getPosition(self): + """getPosition() -> float + + Get the slider linear position (i.e. the slider's "extension"). + + When the axis is set, the current position of the attached + bodies is examined and that position will be the zero + position. + """ + + return dJointGetSliderPosition(self.jid) + + # getPositionRate + def getPositionRate(self): + """getPositionRate() -> float + + Get the time derivative of the position. + """ + return dJointGetSliderPositionRate(self.jid) + + # addForce + def addForce(self, force): + """addForce(force) + + Applies the given force in the slider's direction. + + @param force: Force magnitude + @type force: float + """ + dJointAddSliderForce(self.jid, force) + + # setParam + def setParam(self, param, value): + dJointSetSliderParam(self.jid, param, value) + + # getParam + def getParam(self, param): + return dJointGetSliderParam(self.jid, param) + + +# UniversalJoint +cdef class UniversalJoint(Joint): + """Universal joint. + + Constructor:: + + UniversalJoint(world, jointgroup=None) + """ + + def __cinit__(self, World world not None, jointgroup=None): + cdef JointGroup jg + cdef dJointGroupID jgid + + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreateUniversal(world.wid, jgid) + + def __init__(self, World world not None, jointgroup=None): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + + # setAnchor + def setAnchor(self, pos): + """setAnchor(pos) + + Set the universal anchor. + + @param pos: Anchor position + @type pos: 3-sequence of floats + """ + dJointSetUniversalAnchor(self.jid, pos[0], pos[1], pos[2]) + + # getAnchor + def getAnchor(self): + """getAnchor() -> 3-tuple of floats + + Get the joint anchor point, in world coordinates. This returns + the point on body 1. If the joint is perfectly satisfied, this + will be the same as the point on body 2. + """ + + cdef dVector3 p + dJointGetUniversalAnchor(self.jid, p) + return p[0], p[1], p[2] + + # getAnchor2 + def getAnchor2(self): + """getAnchor2() -> 3-tuple of floats + + Get the joint anchor point, in world coordinates. This returns + the point on body 2. If the joint is perfectly satisfied, this + will be the same as the point on body 1. + """ + + cdef dVector3 p + dJointGetUniversalAnchor2(self.jid, p) + return p[0], p[1], p[2] + + # setAxis1 + def setAxis1(self, axis): + """setAxis1(axis) + + Set the first universal axis. Axis 1 and axis 2 should be + perpendicular to each other. + + @param axis: Joint axis + @type axis: 3-sequence of floats + """ + dJointSetUniversalAxis1(self.jid, axis[0], axis[1], axis[2]) + + # getAxis1 + def getAxis1(self): + """getAxis1() -> 3-tuple of floats + + Get the first univeral axis. + """ + cdef dVector3 a + dJointGetUniversalAxis1(self.jid, a) + return a[0], a[1], a[2] + + # setAxis2 + def setAxis2(self, axis): + """setAxis2(axis) + + Set the second universal axis. Axis 1 and axis 2 should be + perpendicular to each other. + + @param axis: Joint axis + @type axis: 3-sequence of floats + """ + dJointSetUniversalAxis2(self.jid, axis[0], axis[1], axis[2]) + + # getAxis2 + def getAxis2(self): + """getAxis2() -> 3-tuple of floats + + Get the second univeral axis. + """ + cdef dVector3 a + dJointGetUniversalAxis2(self.jid, a) + return a[0], a[1], a[2] + + # addTorques + def addTorques(self, torque1, torque2): + """addTorques(torque1, torque2) + + Applies torque1 about axis 1, and torque2 about axis 2. + + @param torque1: Torque 1 magnitude + @param torque2: Torque 2 magnitude + @type torque1: float + @type torque2: float + """ + dJointAddUniversalTorques(self.jid, torque1, torque2) + + def getAngle1(self): + return dJointGetUniversalAngle1(self.jid) + + def getAngle2(self): + return dJointGetUniversalAngle2(self.jid) + + def getAngle1Rate(self): + return dJointGetUniversalAngle1Rate(self.jid) + + def getAngle2Rate(self): + return dJointGetUniversalAngle2Rate(self.jid) + + # setParam + def setParam(self, param, value): + dJointSetUniversalParam(self.jid, param, value) + + # getParam + def getParam(self, param): + return dJointGetUniversalParam(self.jid, param) + + +# Hinge2Joint +cdef class Hinge2Joint(Joint): + """Hinge2 joint. + + Constructor:: + + Hinge2Joint(world, jointgroup=None) + """ + + def __cinit__(self, World world not None, jointgroup=None): + cdef JointGroup jg + cdef dJointGroupID jgid + + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreateHinge2(world.wid, jgid) + + def __init__(self, World world, jointgroup=None): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + + # setAnchor + def setAnchor(self, pos): + """setAnchor(pos) + + Set the hinge-2 anchor. + + @param pos: Anchor position + @type pos: 3-sequence of floats + """ + dJointSetHinge2Anchor(self.jid, pos[0], pos[1], pos[2]) + + # getAnchor + def getAnchor(self): + """getAnchor() -> 3-tuple of floats + + Get the joint anchor point, in world coordinates. This returns + the point on body 1. If the joint is perfectly satisfied, this + will be the same as the point on body 2. + """ + + cdef dVector3 p + dJointGetHinge2Anchor(self.jid, p) + return p[0], p[1], p[2] + + # getAnchor2 + def getAnchor2(self): + """getAnchor2() -> 3-tuple of floats + + Get the joint anchor point, in world coordinates. This returns + the point on body 2. If the joint is perfectly satisfied, this + will be the same as the point on body 1. + """ + + cdef dVector3 p + dJointGetHinge2Anchor2(self.jid, p) + return p[0], p[1], p[2] + + # setAxis1 + def setAxis1(self, axis): + """setAxis1(axis) + + Set the first hinge-2 axis. Axis 1 and axis 2 must not lie + along the same line. + + @param axis: Joint axis + @type axis: 3-sequence of floats + """ + + dJointSetHinge2Axis1(self.jid, axis[0], axis[1], axis[2]) + + # getAxis1 + def getAxis1(self): + """getAxis1() -> 3-tuple of floats + + Get the first hinge-2 axis. + """ + cdef dVector3 a + dJointGetHinge2Axis1(self.jid, a) + return a[0], a[1], a[2] + + # setAxis2 + def setAxis2(self, axis): + """setAxis2(axis) + + Set the second hinge-2 axis. Axis 1 and axis 2 must not lie + along the same line. + + @param axis: Joint axis + @type axis: 3-sequence of floats + """ + dJointSetHinge2Axis2(self.jid, axis[0], axis[1], axis[2]) + + # getAxis2 + def getAxis2(self): + """getAxis2() -> 3-tuple of floats + + Get the second hinge-2 axis. + """ + cdef dVector3 a + dJointGetHinge2Axis2(self.jid, a) + return a[0], a[1], a[2] + + # getAngle + def getAngle1(self): + """getAngle1() -> float + + Get the first hinge-2 angle (around axis 1). + + When the anchor or axis is set, the current position of the + attached bodies is examined and that position will be the zero + angle. + """ + return dJointGetHinge2Angle1(self.jid) + + # getAngle1Rate + def getAngle1Rate(self): + """getAngle1Rate() -> float + + Get the time derivative of the first hinge-2 angle. + """ + return dJointGetHinge2Angle1Rate(self.jid) + + # getAngle2Rate + def getAngle2Rate(self): + """getAngle2Rate() -> float + + Get the time derivative of the second hinge-2 angle. + """ + return dJointGetHinge2Angle2Rate(self.jid) + + # addTorques + def addTorques(self, torque1, torque2): + """addTorques(torque1, torque2) + + Applies torque1 about axis 1, and torque2 about axis 2. + + @param torque1: Torque 1 magnitude + @param torque2: Torque 2 magnitude + @type torque1: float + @type torque2: float + """ + dJointAddHinge2Torques(self.jid, torque1, torque2) + + # setParam + def setParam(self, param, value): + dJointSetHinge2Param(self.jid, param, value) + + # getParam + def getParam(self, param): + return dJointGetHinge2Param(self.jid, param) + + +# FixedJoint +cdef class FixedJoint(Joint): + """Fixed joint. + + Constructor:: + + FixedJoint(world, jointgroup=None) + """ + + def __cinit__(self, World world not None, jointgroup=None): + cdef JointGroup jg + cdef dJointGroupID jgid + + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreateFixed(world.wid, jgid) + + def __init__(self, World world not None, jointgroup=None): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + + # setFixed + def setFixed(self): + """setFixed() + + Call this on the fixed joint after it has been attached to + remember the current desired relative offset and desired + relative rotation between the bodies. + """ + dJointSetFixed(self.jid) + + +# ContactJoint +cdef class ContactJoint(Joint): + """Contact joint. + + Constructor:: + + ContactJoint(world, jointgroup, contact) + """ + + def __cinit__(self, World world not None, jointgroup, Contact contact): + cdef JointGroup jg + cdef dJointGroupID jgid + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreateContact(world.wid, jgid, &contact._contact) + + def __init__(self, World world not None, jointgroup, Contact contact): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + +# AMotor +cdef class AMotor(Joint): + """AMotor joint. + + Constructor:: + + AMotor(world, jointgroup=None) + """ + + def __cinit__(self, World world not None, jointgroup=None): + cdef JointGroup jg + cdef dJointGroupID jgid + + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreateAMotor(world.wid, jgid) + + def __init__(self, World world not None, jointgroup=None): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + + # setMode + def setMode(self, mode): + """setMode(mode) + + Set the angular motor mode. mode must be either AMotorUser or + AMotorEuler. + + @param mode: Angular motor mode + @type mode: int + """ + dJointSetAMotorMode(self.jid, mode) + + # getMode + def getMode(self): + """getMode() + + Return the angular motor mode (AMotorUser or AMotorEuler). + """ + return dJointGetAMotorMode(self.jid) + + # setNumAxes + def setNumAxes(self, int num): + """setNumAxes(num) + + Set the number of angular axes that will be controlled by the AMotor. + num may be in the range from 0 to 3. + + @param num: Number of axes (0-3) + @type num: int + """ + dJointSetAMotorNumAxes(self.jid, num) + + # getNumAxes + def getNumAxes(self): + """getNumAxes() -> int + + Get the number of angular axes that are controlled by the AMotor. + """ + return dJointGetAMotorNumAxes(self.jid) + + # setAxis + def setAxis(self, int anum, int rel, axis): + """setAxis(anum, rel, axis) + + Set an AMotor axis. + + The anum argument selects the axis to change (0,1 or 2). + Each axis can have one of three "relative orientation" modes, + selected by rel: + + 0: The axis is anchored to the global frame. + 1: The axis is anchored to the first body. + 2: The axis is anchored to the second body. + + The axis vector is always specified in global coordinates + regardless of the setting of rel. + + @param anum: Axis number + @param rel: Relative orientation mode + @param axis: Axis + @type anum: int + @type rel: int + @type axis: 3-sequence of floats + """ + dJointSetAMotorAxis(self.jid, anum, rel, axis[0], axis[1], axis[2]) + + # getAxis + def getAxis(self, int anum): + """getAxis(anum) + + Get an AMotor axis. + + @param anum: Axis index (0-2) + @type anum: int + """ + cdef dVector3 a + dJointGetAMotorAxis(self.jid, anum, a) + return a[0], a[1], a[2] + + # getAxisRel + def getAxisRel(self, int anum): + """getAxisRel(anum) -> int + + Get the relative mode of an axis. + + @param anum: Axis index (0-2) + @type anum: int + """ + return dJointGetAMotorAxisRel(self.jid, anum) + + # setAngle + def setAngle(self, int anum, angle): + """setAngle(anum, angle) + + Tell the AMotor what the current angle is along axis anum. + + @param anum: Axis index + @param angle: Angle + @type anum: int + @type angle: float + """ + dJointSetAMotorAngle(self.jid, anum, angle) + + # getAngle + def getAngle(self, int anum): + """getAngle(anum) -> float + + Return the current angle for axis anum. + + @param anum: Axis index + @type anum: int + """ + return dJointGetAMotorAngle(self.jid, anum) + + # getAngleRate + def getAngleRate(self, int anum): + """getAngleRate(anum) -> float + + Return the current angle rate for axis anum. + + @param anum: Axis index + @type anum: int + """ + return dJointGetAMotorAngleRate(self.jid, anum) + + # addTorques + def addTorques(self, torque0, torque1, torque2): + """addTorques(torque0, torque1, torque2) + + Applies torques about the AMotor's axes. + + @param torque0: Torque 0 magnitude + @param torque1: Torque 1 magnitude + @param torque2: Torque 2 magnitude + @type torque0: float + @type torque1: float + @type torque2: float + """ + dJointAddAMotorTorques(self.jid, torque0, torque1, torque2) + + # setParam + def setParam(self, param, value): + dJointSetAMotorParam(self.jid, param, value) + + # getParam + def getParam(self, param): + return dJointGetAMotorParam(self.jid, param) + + +# LMotor +cdef class LMotor(Joint): + """LMotor joint. + + Constructor:: + + LMotor(world, jointgroup=None) + """ + + def __cinit__(self, World world not None, jointgroup=None): + cdef JointGroup jg + cdef dJointGroupID jgid + + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreateLMotor(world.wid, jgid) + + def __init__(self, World world not None, jointgroup=None): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + + # setNumAxes + def setNumAxes(self, int num): + """setNumAxes(num) + + Set the number of angular axes that will be controlled by the LMotor. + num may be in the range from 0 to 3. + + @param num: Number of axes (0-3) + @type num: int + """ + dJointSetLMotorNumAxes(self.jid, num) + + # getNumAxes + def getNumAxes(self): + """getNumAxes() -> int + + Get the number of angular axes that are controlled by the LMotor. + """ + return dJointGetLMotorNumAxes(self.jid) + + # setAxis + def setAxis(self, int anum, int rel, axis): + """setAxis(anum, rel, axis) + + Set an LMotor axis. + + The anum argument selects the axis to change (0,1 or 2). + Each axis can have one of three "relative orientation" modes, + selected by rel: + + 0: The axis is anchored to the global frame. + 1: The axis is anchored to the first body. + 2: The axis is anchored to the second body. + + @param anum: Axis number + @param rel: Relative orientation mode + @param axis: Axis + @type anum: int + @type rel: int + @type axis: 3-sequence of floats + """ + dJointSetLMotorAxis(self.jid, anum, rel, axis[0], axis[1], axis[2]) + + # getAxis + def getAxis(self, int anum): + """getAxis(anum) + + Get an LMotor axis. + + @param anum: Axis index (0-2) + @type anum: int + """ + cdef dVector3 a + dJointGetLMotorAxis(self.jid, anum, a) + return a[0], a[1], a[2] + + # setParam + def setParam(self, param, value): + dJointSetLMotorParam(self.jid, param, value) + + # getParam + def getParam(self, param): + return dJointGetLMotorParam(self.jid, param) + + +# Plane2DJoint +cdef class Plane2DJoint(Joint): + """Plane-2D Joint. + + Constructor:: + + Plane2DJoint(world, jointgroup=None) + """ + + def __cinit__(self, World world not None, jointgroup=None): + cdef JointGroup jg + cdef dJointGroupID jgid + + jgid = NULL + if jointgroup != None: + jg = jointgroup + jgid = jg.gid + self.jid = dJointCreatePlane2D(world.wid, jgid) + + def __init__(self, World world not None, jointgroup=None): + self.world = world + if jointgroup != None: + jointgroup._addjoint(self) + + def setXParam(self, param, value): + dJointSetPlane2DXParam(self.jid, param, value) + + def setYParam(self, param, value): + dJointSetPlane2DYParam(self.jid, param, value) + + def setAngleParam(self, param, value): + dJointSetPlane2DAngleParam(self.jid, param, value) + + +# Geom base class +cdef class GeomObject: + """This is the abstract base class for all geom objects. + """ + + # The id of the geom object as returned by dCreateXxxx() + cdef dGeomID gid + # The space in which the geom was placed (or None). This reference + # is kept so that the space won't be destroyed while there are still + # geoms around that might use it. + cdef object space + # The body that the geom was attached to (or None). + cdef object body + + # A dictionary with user defined attributes + cdef object attribs + + cdef object __weakref__ + + def __cinit__(self, *a, **kw): + self.gid = NULL + self.space = None + self.body = None + self.attribs = {} + + def __init__(self, *a, **kw): + raise NotImplementedError( + "GeomObject base class can't be used directly") + + def __dealloc__(self): + if self.gid != NULL: + dGeomDestroy(self.gid) + self.gid = NULL + + def __getattr__(self, name): + if name in self.attribs: + return self.attribs[name] + else: + raise AttributeError("geom has no attribute '%s'" % name) + + def __setattr__(self, name, val): + self.attribs[name] = val + + def __delattr__(self, name): + if name in self.attribs: + del self.attribs[name] + else: + raise AttributeError("geom has no attribute '%s'" % name) + + def _id(self): + """_id() -> int + + Return the internal id of the geom (dGeomID) as returned by + the dCreateXyz() functions. + + This method has to be overwritten in derived methods. + """ + raise NotImplementedError("Bug: The _id() method is not implemented") + + def placeable(self): + """placeable() -> bool + + Returns True if the geom object is a placeable geom. + + This method has to be overwritten in derived methods. + """ + return False + + def setBody(self, Body body): + """setBody(body) + + Set the body associated with a placeable geom. + + @param body: The Body object or None. + @type body: Body + """ + + if not self.placeable(): + raise ValueError( + "Non-placeable geoms cannot have a body associated to them") + + if body == None: + dGeomSetBody(self.gid, NULL) + else: + dGeomSetBody(self.gid, body.bid) + self.body = body + + def getBody(self): + """getBody() -> Body + + Get the body associated with this geom. + """ + if not self.placeable(): + return environment + + return self.body + + def setPosition(self, pos): + """setPosition(pos) + + Set the position of the geom. If the geom is attached to a body, + the body's position will also be changed. + + @param pos: Position + @type pos: 3-sequence of floats + """ + if not self.placeable(): + raise ValueError("Cannot set a position on non-placeable geoms") + dGeomSetPosition(self.gid, pos[0], pos[1], pos[2]) + + def getPosition(self): + """getPosition() -> 3-tuple + + Get the current position of the geom. If the geom is attached to + a body the returned value is the body's position. + """ + if not self.placeable(): + raise ValueError("Non-placeable geoms do not have a position") + + cdef dReal* p + p = dGeomGetPosition(self.gid) + return p[0], p[1], p[2] + + def setRotation(self, R): + """setRotation(R) + + Set the orientation of the geom. If the geom is attached to a body, + the body's orientation will also be changed. + + @param R: Rotation matrix + @type R: 9-sequence of floats + """ + if not self.placeable(): + raise ValueError("Cannot set a rotation on non-placeable geoms") + + cdef dMatrix3 m + m[0] = R[0] + m[1] = R[1] + m[2] = R[2] + m[3] = 0 + m[4] = R[3] + m[5] = R[4] + m[6] = R[5] + m[7] = 0 + m[8] = R[6] + m[9] = R[7] + m[10] = R[8] + m[11] = 0 + dGeomSetRotation(self.gid, m) + + def getRotation(self): + """getRotation() -> 9-tuple + + Get the current orientation of the geom. If the geom is attached to + a body the returned value is the body's orientation. + """ + if not self.placeable(): + raise ValueError("Non-placeable geoms do not have a rotation") + + cdef dReal* m + m = dGeomGetRotation(self.gid) + return [m[0], m[1], m[2], m[4], m[5], m[6], m[8], m[9], m[10]] + + def getQuaternion(self): + """getQuaternion() -> (w,x,y,z) + + Get the current orientation of the geom. If the geom is attached to + a body the returned value is the body's orientation. + """ + if not self.placeable(): + raise ValueError("Non-placeable geoms do not have an orientation") + + cdef dQuaternion q + dGeomGetQuaternion(self.gid, q) + return q[0], q[1], q[2], q[3] + + def setQuaternion(self, q): + """setQuaternion(q) + + Set the orientation of the geom. If the geom is attached to a body, + the body's orientation will also be changed. + + @param q: Quaternion (w,x,y,z) + @type q: 4-sequence of floats + """ + if not self.placeable(): + raise ValueError("Cannot set a quaternion on non-placeable geoms") + + cdef dQuaternion cq + cq[0] = q[0] + cq[1] = q[1] + cq[2] = q[2] + cq[3] = q[3] + dGeomSetQuaternion(self.gid, cq) + + def setOffsetPosition(self, pos): + """setOffsetPosition(pos) + + Set the offset position of the geom. The geom must be attached to a + body. If the geom did not have an offset, it is automatically created. + This sets up an additional (local) transformation for the geom, since + geoms attached to a body share their global position and rotation. + + @param pos: Position + @type pos: 3-sequence of floats + """ + if self.body == None: + raise ValueError("Cannot set an offset position on a geom before " + "calling setBody") + dGeomSetOffsetPosition(self.gid, pos[0], pos[1], pos[2]) + + def getOffsetPosition(self): + """getOffsetPosition() -> 3-tuple + + Get the offset position of the geom. + """ + cdef dReal* p + p = dGeomGetOffsetPosition(self.gid) + return (p[0],p[1],p[2]) + + def setOffsetRotation(self, R): + """setOffsetRotation(R) + + Set the offset rotation of the geom. The geom must be attached to a + body. If the geom did not have an offset, it is automatically created. + This sets up an additional (local) transformation for the geom, since + geoms attached to a body share their global position and rotation. + + @param R: Rotation matrix + @type R: 9-sequence of floats + """ + if self.body == None: + raise ValueError("Cannot set an offset rotation on a geom before " + "calling setBody") + + cdef dMatrix3 m + m[0] = R[0] + m[1] = R[1] + m[2] = R[2] + m[3] = 0 + m[4] = R[3] + m[5] = R[4] + m[6] = R[5] + m[7] = 0 + m[8] = R[6] + m[9] = R[7] + m[10] = R[8] + m[11] = 0 + dGeomSetOffsetRotation(self.gid, m) + + def getOffsetRotation(self): + """getOffsetRotation() -> 9-tuple + + Get the offset rotation of the geom. + """ + cdef dReal* m + m = dGeomGetOffsetRotation(self.gid) + return [m[0], m[1], m[2], m[4], m[5], m[6], m[8], m[9], m[10]] + + def clearOffset(self): + """clearOffset() + + Disable the offset transform of the geom. + """ + dGeomClearOffset(self.gid) + + def getAABB(self): + """getAABB() -> 6-tuple + + Return an axis aligned bounding box that surrounds the geom. + The return value is a 6-tuple (minx, maxx, miny, maxy, minz, maxz). + """ + cdef dReal aabb[6] + + dGeomGetAABB(self.gid, aabb) + return aabb[0], aabb[1], aabb[2], aabb[3], aabb[4], aabb[5] + + def isSpace(self): + """isSpace() -> bool + + Return 1 if the given geom is a space, or 0 if not.""" + return dGeomIsSpace(self.gid) + + def getSpace(self): + """getSpace() -> Space + + Return the space that the given geometry is contained in, + or return None if it is not contained in any space.""" + return self.space + + def setCollideBits(self, bits): + """setCollideBits(bits) + + Set the "collide" bitfields for this geom. + + @param bits: Collide bit field + @type bits: int/long + """ + dGeomSetCollideBits(self.gid, long(bits)) + + def setCategoryBits(self, bits): + """setCategoryBits(bits) + + Set the "category" bitfields for this geom. + + @param bits: Category bit field + @type bits: int/long + """ + dGeomSetCategoryBits(self.gid, long(bits)) + + def getCollideBits(self): + """getCollideBits() -> long + + Return the "collide" bitfields for this geom. + """ + return dGeomGetCollideBits(self.gid) + + def getCategoryBits(self): + """getCategoryBits() -> long + + Return the "category" bitfields for this geom. + """ + return dGeomGetCategoryBits(self.gid) + + def enable(self): + """enable() + + Enable the geom.""" + dGeomEnable(self.gid) + + def disable(self): + """disable() + + Disable the geom.""" + dGeomDisable(self.gid) + + def isEnabled(self): + """isEnabled() -> bool + + Return True if the geom is enabled.""" + return dGeomIsEnabled(self.gid) + + +# _SpaceIterator +class _SpaceIterator: + """Iterates over the geoms inside a Space. + """ + + def __init__(self, space): + self.space = space + self.idx = 0 + + def __iter__(self): + return self + + def next(self): + if self.idx >= self.space.getNumGeoms(): + raise StopIteration + else: + res = self.space.getGeom(self.idx) + self.idx = self.idx + 1 + return res + + +# SpaceBase +cdef class SpaceBase(GeomObject): + """Space class (container for geometry objects). + + A Space object is a container for geometry objects which are used + to do collision detection. + The space does high level collision culling, which means that it + can identify which pairs of geometry objects are potentially + touching. + + This Space class can be used for both, a SimpleSpace and a HashSpace + (see ODE documentation). + + >>> space = Space(type=0) # Create a SimpleSpace + >>> space = Space(type=1) # Create a HashSpace + """ + + # The id of the space. Actually this is a copy of the value in self.gid + # (as the Space is derived from GeomObject) which can be used without + # casting whenever a *space* id is required. + cdef dSpaceID sid + + # Dictionary with Geomobjects. Key is the ID (geom._id()) and the value + # is the geom object (Python wrapper). This is used in collide_callback() +# cdef object geom_dict + + def __cinit__(self, *a, **kw): + pass + + def __init__(self, *a, **kw): + raise NotImplementedError("The SpaceBase class can't be used directly") + + def __dealloc__(self): + if self.gid != NULL: + dSpaceDestroy(self.sid) + self.sid = NULL + self.gid = NULL + +# def _addgeom(self, geom): +# """Insert the geom object into the dictionary (internal method). +# +# This method has to called in the constructor of a geom object. +# """ +# self.geom_dict[geom._id()]=geom + +# def _id2geom(self, id): +# """Get the Python wrapper that corresponds to an ID. +# +# The ID is the integer value, as returned by geom._id(). +# If the ID is unknown then None is returned. +# """ +# if id in self.geom_dict: +# return self.geom_dict[id] +# else: +# return None + + def _id(self): + cdef long id + id = self.sid + return id + + def __len__(self): + return self.getNumGeoms() + + def __iter__(self): + return _SpaceIterator(self) + + def add(self, GeomObject geom): + """add(geom) + + Add a geom to a space. This does nothing if the geom is + already in the space. + + @param geom: Geom object to add + @type geom: GeomObject + """ + + dSpaceAdd(self.sid, geom.gid) + + def remove(self, GeomObject geom): + """remove(geom) + + Remove a geom from a space. + + @param geom: Geom object to remove + @type geom: GeomObject + """ + dSpaceRemove(self.sid, geom.gid) + + def query(self, GeomObject geom): + """query(geom) -> bool + + Return True if the given geom is in the space. + + @param geom: Geom object to check + @type geom: GeomObject + """ + return dSpaceQuery(self.sid, geom.gid) + + def getNumGeoms(self): + """getNumGeoms() -> int + + Return the number of geoms contained within the space. + """ + return dSpaceGetNumGeoms(self.sid) + + def getGeom(self, int idx): + """getGeom(idx) -> GeomObject + + Return the geom with the given index contained within the space. + + @param idx: Geom index (0,1,...,getNumGeoms()-1) + @type idx: int + """ + cdef dGeomID gid + + # Check the index + if idx < 0 or idx >= dSpaceGetNumGeoms(self.sid): + raise IndexError("geom index out of range") + + gid = dSpaceGetGeom(self.sid, idx) + if gid not in _geom_c2py_lut: + raise RuntimeError( + "geom id cannot be translated to a Python object") + + return _geom_c2py_lut[gid] + + def collide(self, arg, callback): + """collide(arg, callback) + + Call a callback function one or more times, for all + potentially intersecting objects in the space. The callback + function takes 3 arguments: + + def NearCallback(arg, geom1, geom2): + + The arg parameter is just passed on to the callback function. + Its meaning is user defined. The geom1 and geom2 arguments are + the geometry objects that may be near each other. The callback + function can call the function collide() (not the Space + method) on geom1 and geom2, perhaps first determining + whether to collide them at all based on other information. + + @param arg: A user argument that is passed to the callback function + @param callback: Callback function + @type callback: callable + """ + + cdef void* data + cdef object tup + tup = (callback, arg) + data = tup + dSpaceCollide(self.sid, data, collide_callback) + + +# Callback function for the dSpaceCollide() call in the Space.collide() method +# The data parameter is a tuple (Python-Callback, Arguments). +# The function calls a Python callback function with 3 arguments: +# def callback(UserArg, Geom1, Geom2) +# Geom1 and Geom2 are instances of GeomXyz classes. +cdef void collide_callback(void* data, dGeomID o1, dGeomID o2): + cdef object tup +# cdef Space space + cdef long id1, id2 + +# if (dGeomGetBody(o1)==dGeomGetBody(o2)): +# return + + tup = data + callback, arg = tup + id1 = o1 + id2 = o2 + g1 = _geom_c2py_lut[id1] + g2 = _geom_c2py_lut[id2] + callback(arg, g1, g2) + + +# SimpleSpace +cdef class SimpleSpace(SpaceBase): + """Simple space. + + This does not do any collision culling - it simply checks every + possible pair of geoms for intersection, and reports the pairs + whose AABBs overlap. The time required to do intersection testing + for n objects is O(n**2). This should not be used for large numbers + of objects, but it can be the preferred algorithm for a small + number of objects. This is also useful for debugging potential + problems with the collision system. + """ + + def __cinit__(self, space=None): + cdef SpaceBase sp + cdef dSpaceID parentid + + parentid = NULL + if space != None: + sp = space + parentid = sp.sid + + self.sid = dSimpleSpaceCreate(parentid) + + # Copy the ID + self.gid = self.sid + + dSpaceSetCleanup(self.sid, 0) + _geom_c2py_lut[self.sid] = self + + def __init__(self, space=None): + pass + +# HashSpace +cdef class HashSpace(SpaceBase): + """Multi-resolution hash table space. + + This uses an internal data structure that records how each geom + overlaps cells in one of several three dimensional grids. Each + grid has cubical cells of side lengths 2**i, where i is an integer + that ranges from a minimum to a maximum value. The time required + to do intersection testing for n objects is O(n) (as long as those + objects are not clustered together too closely), as each object + can be quickly paired with the objects around it. + """ + + def __cinit__(self, space=None): + cdef SpaceBase sp + cdef dSpaceID parentid + + parentid = NULL + if space != None: + sp = space + parentid = sp.sid + + self.sid = dHashSpaceCreate(parentid) + + # Copy the ID + self.gid = self.sid + + dSpaceSetCleanup(self.sid, 0) + _geom_c2py_lut[self.sid] = self + + def __init__(self, space=None): + pass + + def setLevels(self, int minlevel, int maxlevel): + """setLevels(minlevel, maxlevel) + + Sets the size of the smallest and largest cell used in the + hash table. The actual size will be 2^minlevel and 2^maxlevel + respectively. + """ + + if minlevel > maxlevel: + raise ValueError( + "minlevel (%d) must be less than or equal to maxlevel (%d)" % + (minlevel, maxlevel)) + + dHashSpaceSetLevels(self.sid, minlevel, maxlevel) + + def getLevels(self): + """getLevels() -> (minlevel, maxlevel) + + Gets the size of the smallest and largest cell used in the + hash table. The actual size is 2^minlevel and 2^maxlevel + respectively. + """ + + cdef int minlevel + cdef int maxlevel + dHashSpaceGetLevels(self.sid, &minlevel, &maxlevel) + return minlevel, maxlevel + + +# QuadTreeSpace +cdef class QuadTreeSpace(SpaceBase): + """Quadtree space. + + This uses a pre-allocated hierarchical grid-based AABB tree to + quickly cull collision checks. It's exceptionally quick for large + amounts of objects in landscape-shaped worlds. The amount of + memory used is 4**depth * 32 bytes. + + Currently getGeom() is not implemented for the quadtree space. + """ + + def __cinit__(self, center, extents, depth, space=None): + cdef SpaceBase sp + cdef dSpaceID parentid + cdef dVector3 c + cdef dVector3 e + + parentid = NULL + if space != None: + sp = space + parentid = sp.sid + + c[0] = center[0] + c[1] = center[1] + c[2] = center[2] + e[0] = extents[0] + e[1] = extents[1] + e[2] = extents[2] + self.sid = dQuadTreeSpaceCreate(parentid, c, e, depth) + + # Copy the ID + self.gid = self.sid + + dSpaceSetCleanup(self.sid, 0) + _geom_c2py_lut[self.sid] = self + + def __init__(self, center, extents, depth, space=None): + pass + + +def Space(space_type=0): + """Space factory function. + + Depending on the type argument this function either returns a + SimpleSpace (space_type=0) or a HashSpace (space_type=1). + + This function is provided to remain compatible with previous + versions of PyODE where there was only one Space class. + + >>> space = Space(space_type=0) # Create a SimpleSpace + >>> space = Space(space_type=1) # Create a HashSpace + """ + if space_type == 0: + return SimpleSpace() + elif space_type == 1: + return HashSpace() + else: + raise ValueError("Unknown space type (%d)" % space_type) + + +# GeomSphere +cdef class GeomSphere(GeomObject): + """Sphere geometry. + + This class represents a sphere centered at the origin. + + Constructor:: + + GeomSphere(space=None, radius=1.0) + """ + + def __cinit__(self, space=None, radius=1.0): + cdef SpaceBase sp + cdef dSpaceID sid + + sid = NULL + if space != None: + sp = space + sid = sp.sid + self.gid = dCreateSphere(sid, radius) +# if space != None: +# space._addgeom(self) + + _geom_c2py_lut[self.gid] = self + + def __init__(self, space=None, radius=1.0): + self.space = space + self.body = None + + def placeable(self): + return True + + def _id(self): + cdef long id + id = self.gid + return id + + def setRadius(self, radius): + """setRadius(radius) + + Set the radius of the sphere. + + @param radius: New radius + @type radius: float + """ + dGeomSphereSetRadius(self.gid, radius) + + def getRadius(self): + """getRadius() -> float + + Return the radius of the sphere. + """ + return dGeomSphereGetRadius(self.gid) + + def pointDepth(self, p): + """pointDepth(p) -> float + + Return the depth of the point p in the sphere. Points inside + the geom will have positive depth, points outside it will have + negative depth, and points on the surface will have zero + depth. + + @param p: Point + @type p: 3-sequence of floats + """ + return dGeomSpherePointDepth(self.gid, p[0], p[1], p[2]) + + +# GeomBox +cdef class GeomBox(GeomObject): + """Box geometry. + + This class represents a box centered at the origin. + + Constructor:: + + GeomBox(space=None, lengths=(1.0, 1.0, 1.0)) + """ + + def __cinit__(self, space=None, lengths=(1.0, 1.0, 1.0)): + cdef SpaceBase sp + cdef dSpaceID sid + + sid = NULL + if space != None: + sp = space + sid = sp.sid + self.gid = dCreateBox(sid, lengths[0], lengths[1], lengths[2]) +# if space != None: +# space._addgeom(self) + + _geom_c2py_lut[self.gid] = self + + def __init__(self, space=None, lengths=(1.0, 1.0, 1.0)): + self.space = space + self.body = None + + def placeable(self): + return True + + def _id(self): + cdef long id + id = self.gid + return id + + def setLengths(self, lengths): + dGeomBoxSetLengths(self.gid, lengths[0], lengths[1], lengths[2]) + + def getLengths(self): + cdef dVector3 res + dGeomBoxGetLengths(self.gid, res) + return res[0], res[1], res[2] + + def pointDepth(self, p): + """pointDepth(p) -> float + + Return the depth of the point p in the box. Points inside the + geom will have positive depth, points outside it will have + negative depth, and points on the surface will have zero + depth. + + @param p: Point + @type p: 3-sequence of floats + """ + return dGeomBoxPointDepth(self.gid, p[0], p[1], p[2]) + + +# GeomPlane +cdef class GeomPlane(GeomObject): + """Plane geometry. + + This class represents an infinite plane. The plane equation is: + n.x*x + n.y*y + n.z*z = dist + + This object can't be attached to a body. + If you call getBody() on this object it always returns ode.environment. + + Constructor:: + + GeomPlane(space=None, normal=(0,0,1), dist=0) + + """ + + def __cinit__(self, space=None, normal=(0, 0, 1), dist=0): + cdef SpaceBase sp + cdef dSpaceID sid + + sid = NULL + if space != None: + sp = space + sid = sp.sid + self.gid = dCreatePlane(sid, normal[0], normal[1], normal[2], dist) +# if space != None: +# space._addgeom(self) + + _geom_c2py_lut[self.gid] = self + + def __init__(self, space=None, normal=(0, 0, 1), dist=0): + self.space = space + + def _id(self): + cdef long id + id = self.gid + return id + + def setParams(self, normal, dist): + dGeomPlaneSetParams(self.gid, normal[0], normal[1], normal[2], dist) + + def getParams(self): + cdef dVector4 res + dGeomPlaneGetParams(self.gid, res) + return ((res[0], res[1], res[2]), res[3]) + + def pointDepth(self, p): + """pointDepth(p) -> float + + Return the depth of the point p in the plane. Points inside the + geom will have positive depth, points outside it will have + negative depth, and points on the surface will have zero + depth. + + @param p: Point + @type p: 3-sequence of floats + """ + return dGeomPlanePointDepth(self.gid, p[0], p[1], p[2]) + + +# GeomCapsule +cdef class GeomCapsule(GeomObject): + """Capped cylinder geometry. + + This class represents a capped cylinder aligned along the local Z axis + and centered at the origin. + + Constructor:: + + GeomCapsule(space=None, radius=0.5, length=1.0) + + The length parameter does not include the caps. + """ + + def __cinit__(self, space=None, radius=0.5, length=1.0): + cdef SpaceBase sp + cdef dSpaceID sid + + sid = NULL + if space != None: + sp = space + sid = sp.sid + self.gid = dCreateCapsule(sid, radius, length) +# if space != None: +# space._addgeom(self) + + _geom_c2py_lut[self.gid] = self + + def __init__(self, space=None, radius=0.5, length=1.0): + self.space = space + self.body = None + + def placeable(self): + return True + + def _id(self): + cdef long id + id = self.gid + return id + + def setParams(self, radius, length): + dGeomCapsuleSetParams(self.gid, radius, length) + + def getParams(self): + cdef dReal radius, length + dGeomCapsuleGetParams(self.gid, &radius, &length) + return radius, length + + def pointDepth(self, p): + """pointDepth(p) -> float + + Return the depth of the point p in the cylinder. Points inside the + geom will have positive depth, points outside it will have + negative depth, and points on the surface will have zero + depth. + + @param p: Point + @type p: 3-sequence of floats + """ + return dGeomCapsulePointDepth(self.gid, p[0], p[1], p[2]) + +GeomCCylinder = GeomCapsule # backwards compatibility + + +# GeomCylinder +cdef class GeomCylinder(GeomObject): + """Plain cylinder geometry. + + This class represents an uncapped cylinder aligned along the local Z axis + and centered at the origin. + + Constructor:: + + GeomCylinder(space=None, radius=0.5, length=1.0) + """ + + def __cinit__(self, space=None, radius=0.5, length=1.0): + cdef SpaceBase sp + cdef dSpaceID sid + + sid = NULL + if space != None: + sp = space + sid = sp.sid + self.gid = dCreateCylinder(sid, radius, length) +# if space != None: +# space._addgeom(self) + + _geom_c2py_lut[self.gid] = self + + def __init__(self, space=None, radius=0.5, length=1.0): + self.space = space + self.body = None + + def placeable(self): + return True + + def _id(self): + cdef long id + id = self.gid + return id + + def setParams(self, radius, length): + dGeomCylinderSetParams(self.gid, radius, length) + + def getParams(self): + cdef dReal radius, length + dGeomCylinderGetParams(self.gid, &radius, &length) + return radius, length + + ## dGeomCylinderPointDepth not implemented upstream in ODE 0.7 + + +# GeomRay +cdef class GeomRay(GeomObject): + """Ray object. + + A ray is different from all the other geom classes in that it does + not represent a solid object. It is an infinitely thin line that + starts from the geom's position and extends in the direction of + the geom's local Z-axis. + + Constructor:: + + GeomRay(space=None, rlen=1.0) + + """ + + def __cinit__(self, space=None, rlen=1.0): + cdef SpaceBase sp + cdef dSpaceID sid + + sid = NULL + if space != None: + sp = space + sid = sp.sid + self.gid = dCreateRay(sid, rlen) +# if space != None: +# space._addgeom(self) + + _geom_c2py_lut[self.gid] = self + + def __init__(self, space=None, rlen=1.0): + self.space = space + self.body = None + + def _id(self): + cdef long id + id = self.gid + return id + + def placeable(self): + return True + + def setLength(self, rlen): + '''setLength(rlen) + + Set length of the ray. + + @param rlen: length of the ray + @type rlen: float''' + dGeomRaySetLength(self.gid, rlen) + + def getLength(self): + '''getLength() -> length + + Get the length of the ray. + + @returns: length of the ray (float)''' + return dGeomRayGetLength(self.gid) + + def set(self, p, u): + '''set(p, u) + + Set the position and rotation of a ray. + + @param p: position + @type p: 3-sequence of floats + @param u: rotation + @type u: 3-sequence of floats''' + dGeomRaySet(self.gid, p[0], p[1], p[2], u[0], u[1], u[2]) + + def get(self): + '''get() -> ((p[0], p[1], p[2]), (u[0], u[1], u[2])) + + Return the position and rotation as a pair of + tuples. + + @returns: position and rotation''' + cdef dVector3 start + cdef dVector3 dir + dGeomRayGet(self.gid, start, dir) + return (start[0], start[1], start[2]), (dir[0], dir[1], dir[2]) + + +# GeomTransform +cdef class GeomTransform(GeomObject): + """GeomTransform. + + A geometry transform "T" is a geom that encapsulates another geom + "E", allowing E to be positioned and rotated arbitrarily with + respect to its point of reference. + + Constructor:: + + GeomTransform(space=None) + """ + + cdef object geom + + def __cinit__(self, space=None): + cdef SpaceBase sp + cdef dSpaceID sid + + sid = NULL + if space != None: + sp = space + sid = sp.sid + self.gid = dCreateGeomTransform(sid) + # Set cleanup mode to 0 as a contained geom will be deleted + # by its Python wrapper class + dGeomTransformSetCleanup(self.gid, 0) +# if space != None: +# space._addgeom(self) + + _geom_c2py_lut[self.gid] = self + + def __init__(self, space=None): + self.space = space + self.body = None + self.geom = None + + self.attribs = {} + + def placeable(self): + return True + + def _id(self): + cdef long id + id = self.gid + return id + + def setGeom(self, GeomObject geom not None): + """setGeom(geom) + + Set the geom that the geometry transform encapsulates. + A ValueError exception is thrown if a) the geom is not placeable, + b) the geom was already inserted into a space or c) the geom is + already associated with a body. + + @param geom: Geom object to encapsulate + @type geom: GeomObject + """ + cdef long id + + if not geom.placeable(): + raise ValueError( + "Only placeable geoms can be encapsulated by a GeomTransform") + if dGeomGetSpace(geom.gid) != 0: + raise ValueError( + "The encapsulated geom was already inserted into a space") + if dGeomGetBody(geom.gid) != 0: + raise ValueError( + "The encapsulated geom is already associated with a body") + + id = geom._id() + dGeomTransformSetGeom(self.gid, id) + self.geom = geom + + def getGeom(self): + """getGeom() -> GeomObject + + Get the geom that the geometry transform encapsulates. + """ + return self.geom + + def setInfo(self, int mode): + """setInfo(mode) + + Set the "information" mode of the geometry transform. + + With mode 0, when a transform object is collided with another + object, the geom field of the ContactGeom structure is set to the + geom that is encapsulated by the transform object. + + With mode 1, the geom field of the ContactGeom structure is set + to the transform object itself. + + @param mode: Information mode (0 or 1) + @type mode: int + """ + if mode < 0 or mode > 1: + raise ValueError( + "Invalid information mode (%d). Must be either 0 or 1." % mode) + dGeomTransformSetInfo(self.gid, mode) + + def getInfo(self): + """getInfo() -> int + + Get the "information" mode of the geometry transform (0 or 1). + + With mode 0, when a transform object is collided with another + object, the geom field of the ContactGeom structure is set to the + geom that is encapsulated by the transform object. + + With mode 1, the geom field of the ContactGeom structure is set + to the transform object itself. + """ + return dGeomTransformGetInfo(self.gid) + +###################################################################### + + +cdef class TriMeshData: + """This class stores the mesh data. + """ + + cdef dTriMeshDataID tmdid + cdef dReal* vertex_buffer + cdef int* face_buffer + + def __cinit__(self): + self.tmdid = dGeomTriMeshDataCreate() + self.vertex_buffer = NULL + self.face_buffer = NULL + + def __dealloc__(self): + if self.tmdid != NULL: + dGeomTriMeshDataDestroy(self.tmdid) + if self.vertex_buffer != NULL: + free(self.vertex_buffer) + if self.face_buffer != NULL: + free(self.face_buffer) + + def build(self, verts, faces): + """build(verts, faces) + + @param verts: Vertices + @type verts: Sequence of 3-sequences of floats + @param faces: Face definitions (three indices per face) + @type faces: Sequence of 3-sequences of ints + """ + cdef int numverts + cdef int numfaces + cdef dReal* vp + cdef int* fp + cdef int a, b, c + + numverts = len(verts) + numfaces = len(faces) + # Allocate the vertex and face buffer + self.vertex_buffer = malloc(numverts * 4 * sizeof(dReal)) + self.face_buffer = malloc(numfaces * 3 * sizeof(int)) + + # Fill the vertex buffer + vp = self.vertex_buffer + for v in verts: + vp[0] = v[0] + vp[1] = v[1] + vp[2] = v[2] + vp[3] = 0 + vp = vp + 4 + + # Fill the face buffer + fp = self.face_buffer + for f in faces: + a = f[0] + b = f[1] + c = f[2] + if (a < 0 or b < 0 or c < 0 or a >= numverts or b >= numverts or c >= numverts): + raise ValueError("Vertex index out of range") + fp[0] = a + fp[1] = b + fp[2] = c + fp = fp + 3 + + # Pass the data to ODE + dGeomTriMeshDataBuildSimple(self.tmdid, self.vertex_buffer, numverts, + self.face_buffer, numfaces * 3) + +###################################################################### + + +# GeomTriMesh +cdef class GeomTriMesh(GeomObject): + """TriMesh object. + + To construct the trimesh geom you need a TriMeshData object that + stores the actual mesh. This object has to be passed as first + argument to the constructor. + + Constructor:: + + GeomTriMesh(data, space=None) + """ + + # Keep a reference to the data + cdef TriMeshData data + + def __cinit__(self, TriMeshData data not None, space=None): + cdef SpaceBase sp + cdef dSpaceID sid + + self.data = data + + sid = NULL + if space != None: + sp = space + sid = sp.sid + self.gid = dCreateTriMesh(sid, data.tmdid, NULL, NULL, NULL) + + _geom_c2py_lut[self.gid] = self + + def __init__(self, TriMeshData data not None, space=None): + self.space = space + self.body = None + + def placeable(self): + return True + + def _id(self): + cdef long id + id = self.gid + return id + + def clearTCCache(self): + """clearTCCache() + + Clears the internal temporal coherence caches. + """ + dGeomTriMeshClearTCCache(self.gid) + + def getTriangle(self, int idx): + """getTriangle(idx) -> (v0, v1, v2) + + @param idx: Triangle index + @type idx: int + """ + + cdef dVector3 v0, v1, v2 + cdef dVector3* vp0 + cdef dVector3* vp1 + cdef dVector3* vp2 + + vp0 = v0 + vp1 = v1 + vp2 = v2 + + dGeomTriMeshGetTriangle(self.gid, idx, vp0, vp1, vp2) + return ((v0[0], v0[1], v0[2]), + (v1[0], v1[1], v1[2]), + (v2[0], v2[1], v2[2])) + + def getTriangleCount(self): + """getTriangleCount() -> n + + Returns the number of triangles in the TriMesh.""" + + return dGeomTriMeshGetTriangleCount(self.gid) + +###################################################################### + + +def collide(geom1, geom2): + """collide(geom1, geom2) -> contacts + + Generate contact information for two objects. + + Given two geometry objects that potentially touch (geom1 and geom2), + generate contact information for them. Internally, this just calls + the correct class-specific collision functions for geom1 and geom2. + + [flags specifies how contacts should be generated if the objects + touch. Currently the lower 16 bits of flags specifies the maximum + number of contact points to generate. If this number is zero, this + function just pretends that it is one - in other words you can not + ask for zero contacts. All other bits in flags must be zero. In + the future the other bits may be used to select other contact + generation strategies.] + + If the objects touch, this returns a list of Contact objects, + otherwise it returns an empty list. + + @param geom1: First Geom + @type geom1: GeomObject + @param geom2: Second Geom + @type geom2: GeomObject + @returns: Returns a list of Contact objects. + """ + + cdef dContactGeom c[150] + cdef long id1 + cdef long id2 + cdef int i, n + cdef Contact cont + + id1 = geom1._id() + id2 = geom2._id() + + n = dCollide(id1, id2, 150, c, sizeof(dContactGeom)) + res = [] + i = 0 + while i < n: + cont = Contact() + cont._contact.geom = c[i] + res.append(cont) + i = i + 1 + + return res + + +def collide2(geom1, geom2, arg, callback): + """collide2(geom1, geom2, arg, callback) + + Calls the callback for all potentially intersecting pairs that contain + one geom from geom1 and one geom from geom2. + + @param geom1: First Geom + @type geom1: GeomObject + @param geom2: Second Geom + @type geom2: GeomObject + @param arg: A user argument that is passed to the callback function + @param callback: Callback function + @type callback: callable + """ + cdef void* data + cdef object tup + cdef long id1 + cdef long id2 + + id1 = geom1._id() + id2 = geom2._id() + + tup = (callback, arg) + data = tup + # collide_callback is defined in space.pyx + dSpaceCollide2(id1, id2, data, collide_callback) + + +def areConnected(Body body1, Body body2): + """areConnected(body1, body2) -> bool + + Return True if the two bodies are connected together by a joint, + otherwise return False. + + @param body1: First body + @type body1: Body + @param body2: Second body + @type body2: Body + @returns: True if the bodies are connected + """ + + if body1 is environment: + return False + if body2 is environment: + return False + + return bool(dAreConnected( body1.bid, body2.bid)) + + +def CloseODE(): + """CloseODE() + + Deallocate some extra memory used by ODE that can not be deallocated + using the normal destroy functions. + """ + dCloseODE() + + +def InitODE(): + '''InitODE() + + Initialize some ODE internals. This will be called for you when you + "import ode", but you should call this again if you CloseODE().''' + dInitODE() + + +#environment = Body(None) +environment = None +InitODE() diff -Nru ode-0.11.1/bindings/python/setup.py ode-0.14/bindings/python/setup.py --- ode-0.11.1/bindings/python/setup.py 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/bindings/python/setup.py 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,48 @@ +#! /usr/bin/env python +from distutils.core import setup +from distutils.extension import Extension +from subprocess import Popen, PIPE, CalledProcessError + + +try: + from Cython.Distutils import build_ext +except ImportError: + raise SystemExit("Requires Cython (http://cython.org/)") + +try: + ode_cflags = Popen( + ["pkg-config", "--cflags", "ode"], + stdout=PIPE).stdout.read().decode('ascii').split() + ode_libs = Popen( + ["pkg-config", "--libs", "ode"], + stdout=PIPE).stdout.read().decode('ascii').split() +except (OSError, CalledProcessError): + raise SystemExit("Failed to find ODE with 'pkg-config'. Please make sure " + "that it is installed and available on your system path.") + +ode_ext = Extension("ode", ["ode.pyx"], + extra_compile_args=ode_cflags, + extra_link_args=ode_libs) + +if __name__ == "__main__": + setup( + name="Open Dynamics Engine", + version="0.12", + author="Gideon Klompje", +# author_email="", +# maintainer="", +# maintainer_email="", + url="http://www.ode.org", + description="Bindings for the Open Dynamics Engine", + long_description=( + "A free, industrial quality library for simulating articulated " + "rigid body dynamics - for example ground vehicles, legged " + "creatures, and moving objects in VR environments. It's fast, " + "flexible & robust. Built-in collision detection."), +# download_url="https://opende.svn.sourceforge.net/svnroot/opende", +# classifiers=[], +# platforms=[], + license="BSD License, GNU Lesser General Public License (LGPL)", + cmdclass={"build_ext": build_ext}, + ext_modules=[ode_ext] + ) diff -Nru ode-0.11.1/bindings/python/TODO.txt ode-0.14/bindings/python/TODO.txt --- ode-0.11.1/bindings/python/TODO.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/bindings/python/TODO.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,15 @@ +CODE: +* (setup.py) add package information (version, authors, etc.) +* (setup.py) add 'install' action +* (setup.py) add configurable ODE DLL (currently hard-coded to default single precision) +* (ode.pxd) clean up, add more comments +* (ode.pyx) refactor for a more Pythonic implementation (e.g. replace getters and setters with + properties)? +* (?) Add option to build bindings in ODE's makefiles + + +DOCS: + +* Update and include API docs from PyODE +* Adapt and include PyODE tutorials/demos +* Update license text in ode.pxd and ode.pyx diff -Nru ode-0.11.1/bootstrap ode-0.14/bootstrap --- ode-0.11.1/bootstrap 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/bootstrap 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,28 @@ +#!/bin/sh + +echo "Please make sure that you use automake 1.11 or later" + echo "Warnings about underquoted definitions are harmless" +if [ `uname -s` = Darwin ]; then + echo "On OSX, install latest libtool, as the OS provided glibtoolize will not work" +fi + +echo "Running aclocal" +aclocal -I m4 --install || exit 1 +echo "Running libtoolize" +libtoolize --copy --automake --install || exit 1 +echo "Running autoheader" +autoheader || exit 1 +echo "Running automake" +automake --foreign --add-missing --copy || exit 1 +echo "Running autoconf" +autoconf || exit 1 + +echo "Running bootstrap in ou directory" +(cd ou && ./bootstrap) + +if [ -d libccd ]; then + echo "Running bootstrap in libccd directory" + (cd libccd && ./bootstrap) +fi; + +echo "Now you are ready to run ./configure" diff -Nru ode-0.11.1/build/config-default.h ode-0.14/build/config-default.h --- ode-0.11.1/build/config-default.h 2009-05-24 16:44:32.000000000 +0000 +++ ode-0.14/build/config-default.h 2015-12-18 14:09:27.000000000 +0000 @@ -18,22 +18,24 @@ * 32 bit indices. Use the dTriIndex type to * detect the correct index size. * - * dUSE_MALLOC_FOR_ALLOCA (experimental)- - * Use malloc() instead of alloca(). Slower, - * but allows for larger systems and more - * graceful out-of-memory handling. + * dTRIMESH_OPCODE_USE_NEWOLD_TRIMESH_TRIMESH_COLLIDER + * Use old implementation of trimesh-trimesh collider + * (for backward compatibility only) * - * dTRIMESH_OPCODE_USE_NEW_TRIMESH_TRIMESH_COLLIDER (experimental)- - * Use an alternative trimesh-trimesh collider - * which should yield better results. + * dOU_ENABLED + * dATOMICS_ENABLED + * dTLS_ENABLED + * Use generic features of OU library, atomic API + * and TLS API respectively. + * Generic features and atomic API are always enabled, + * unless threading interface support is disabled. + * Using TLS for global variables allows calling ODE + * collision detection functions from multiple threads. * - * dOU_ENABLED (experimental) - * dATOMICS_ENABLED (experimental) - * dTLS_ENABLED (experimental) - * Use generic features of OU library, atomic - * API and TLS API respectively. Using TLS for - * global variables allows calling ODE from - * multiple threads. + * dBUILTIN_THREADING_IMPL_ENABLED + * Include built-in multithreaded threading + * implementation (still must be created and assigned + * to be used). * ******************************************************************/ @@ -43,12 +45,13 @@ #define dTRIMESH_OPCODE_USE_OLD_TRIMESH_TRIMESH_COLLIDER 0 -/* #define dUSE_MALLOC_FOR_ALLOCA */ - /* #define dOU_ENABLED 1 */ /* #define dATOMICS_ENABLED 1 */ /* #define dTLS_ENABLED 1 */ +/* #define dTHREADING_INTF_DISABLED 1 */ +/* #define dBUILTIN_THREADING_IMPL_ENABLED 1 */ + /****************************************************************** * SYSTEM SETTINGS - you shouldn't need to change these. If you @@ -95,17 +98,6 @@ #include #endif -// Use the error-checking memory allocation system. Because this system uses heap -// (malloc) instead of stack (alloca), it is slower. However, it allows you to -// simulate larger scenes, as well as handle out-of-memory errors in a somewhat -// graceful manner - -#ifdef dUSE_MALLOC_FOR_ALLOCA -enum { - d_MEMORY_OK = 0, /* no memory errors */ - d_MEMORY_OUT_OF_MEMORY /* malloc failed due to out of memory error */ -}; -#endif #ifdef dSINGLE #define dEpsilon FLT_EPSILON @@ -134,4 +126,7 @@ #endif +#include "typedefs.h" + + #endif Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/build/premake4.exe and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/build/premake4.exe differ diff -Nru ode-0.11.1/build/premake4.lua ode-0.14/build/premake4.lua --- ode-0.11.1/build/premake4.lua 2009-05-24 16:44:32.000000000 +0000 +++ ode-0.14/build/premake4.lua 2015-12-18 14:09:27.000000000 +0000 @@ -4,6 +4,8 @@ -- For more information on Premake: http://industriousone.com/premake ---------------------------------------------------------------------- + ode_version = "0.14" + ---------------------------------------------------------------------- -- Demo list: add/remove demos from here and the rest of the build -- should just work. @@ -18,9 +20,12 @@ "collision", "crash", "cylvssphere", + "dball", + "dhinge", "feedback", "friction", "gyroscopic", + "gyro2", "heightfield", "hinge", "I", @@ -33,17 +38,21 @@ "ode", "piston", "plane2d", + "rfriction", "slider", "space", "space_stress", "step", + "transmission" } local trimesh_demos = { "basket", "cyl", + "moving_convex", "moving_trimesh", - "trimesh", + "tracks", + "trimesh" } if not _OPTIONS["no-trimesh"] then @@ -77,6 +86,11 @@ } newoption { + trigger = "with-libccd", + description = "Uses libccd for handling some collision tests absent in ODE." + } + + newoption { trigger = "no-dif", description = "Exclude DIF (Dynamics Interchange Format) exports" } @@ -87,13 +101,18 @@ } newoption { - trigger = "no-alloca", - description = "Use heap memory instead of the stack (experimental)" + trigger = "with-ou", + description = "Use TLS for global caches (allows threaded collision checks for separated spaces)" } - + + newoption { + trigger = "with-builtin-threading-impl", + description = "Include built-in multithreaded threading implementation (still must be created and assigned to be used)" + } + newoption { - trigger = "enable-ou", - description = "Use TLS for global variables (experimental)" + trigger = "no-threading-intf", + description = "Disable threading interface support (external implementations may not be assigned; overrides with-builtin-threading-impl)" } newoption { @@ -107,22 +126,75 @@ } newoption { - trigger = "to", - value = "path", + trigger = "to", + value = "path", description = "Set the output location for the generated project files" } + + newoption { + trigger = "only-shared", + description = "Only build shared (DLL) version of the library" + } + + newoption { + trigger = "only-static", + description = "Only build static versions of the library" + } + newoption { + trigger = "only-single", + description = "Only use single-precision math" + } + + newoption { + trigger = "only-double", + description = "Only use double-precision math" + } + -- always clean all of the optional components and toolsets if _ACTION == "clean" then _OPTIONS["with-demos"] = "" _OPTIONS["with-tests"] = "" - for action in pairs(premake.actions) do - os.rmdir(action) + for action in premake.action.each() do + os.rmdir(action.trigger) end + os.remove("../ode/src/config.h") + os.remove("../include/ode/version.h") + os.remove("../include/ode/precision.h") + os.remove("../libccd/src/ccd/precision.h") + end + + -- special validation for Xcode + if _ACTION == "xcode3" and (not _OPTIONS["only-static"] and not _OPTIONS["only-shared"]) then + error( + "Xcode does not support different library types in a single project.\n" .. + "Please use one of the flags: --only-static or --only-shared", 0) + end + + -- build the list of configurations, based on the flags. Ends up + -- with configurations like "Debug", "DebugSingle" or "DebugSingleShared" + local configs = { "Debug", "Release" } + + local function addconfigs(...) + local newconfigs = { } + for _, root in ipairs(configs) do + for _, suffix in ipairs(arg) do + table.insert(newconfigs, root .. suffix) + end + end + configs = newconfigs end + if not _OPTIONS["only-single"] and not _OPTIONS["only-double"] then + addconfigs("Single", "Double") + end + + if not _OPTIONS["only-shared"] and not _OPTIONS["only-static"] then + addconfigs("DLL", "Lib") + end + ---------------------------------------------------------------------- -- The solution, and solution-wide settings ---------------------------------------------------------------------- @@ -137,27 +209,25 @@ "../include", "../ode/src" } - - -- define all the possible build configurations - configurations { - "DebugSingleDLL", "ReleaseSingleDLL", - "DebugSingleLib", "ReleaseSingleLib", - "DebugDoubleDLL", "ReleaseDoubleDLL", - "DebugDoubleLib", "ReleaseDoubleLib" - } + + defines { "_MT" } + + -- apply the configuration list built above + configurations (configs) configuration { "Debug*" } defines { "_DEBUG" } flags { "Symbols" } configuration { "Release*" } + defines { "NDEBUG", "dNODEBUG" } flags { "OptimizeSpeed", "NoFramePointer" } configuration { "*Single*" } - defines { "dSINGLE" } + defines { "dIDESINGLE", "CCD_IDESINGLE" } configuration { "*Double*" } - defines { "dDOUBLE" } + defines { "dIDEDOUBLE", "CCD_IDEDOUBLE" } configuration { "Windows" } defines { "WIN32" } @@ -175,6 +245,10 @@ configuration { "vs*" } defines { "_CRT_SECURE_NO_DEPRECATE" } + -- enable M_* macros from math.h + configuration { "vs*" } + defines { "_USE_MATH_DEFINES" } + -- don't remember why we had to do this configuration { "vs2002 or vs2003", "*Lib" } flags { "StaticRuntime" } @@ -217,14 +291,14 @@ project "ode" - kind "StaticLib" + -- kind "StaticLib" location ( _OPTIONS["to"] or _ACTION ) includedirs { "../ode/src/joints", "../OPCODE", "../GIMPACT/include", - "../ou/include" + "../libccd/src" } files { @@ -240,6 +314,25 @@ "../ode/src/collision_std.cpp", } + if _OPTIONS["with-ou"] or not _OPTIONS["no-threading-intf"] then + includedirs { "../ou/include" } + files { "../ou/include/**.h", "../ou/src/**.h", "../ou/src/**.cpp" } + defines { "_OU_NAMESPACE=odeou" } + + if _ACTION == "gmake" and ( os.get() == "linux" or os.get() == "bsd" ) then + buildoptions { "-pthread" } + linkoptions { "-pthread" } + end + + if _ACTION == "gmake" and os.get() == "windows" then + buildoptions { "-mthreads" } + linkoptions { "-mthreads" } + end + + -- TODO: MacOSX probably needs something too + end + + configuration { "no-dif" } excludes { "../ode/src/export-dif.cpp" } @@ -256,7 +349,8 @@ "../ode/src/collision_trimesh_ray.cpp", "../ode/src/collision_trimesh_sphere.cpp", "../ode/src/collision_trimesh_trimesh.cpp", - "../ode/src/collision_trimesh_plane.cpp" + "../ode/src/collision_trimesh_plane.cpp", + "../ode/src/collision_convex_trimesh.cpp" } configuration { "not no-trimesh", "with-gimpact or all-collis-libs" } @@ -265,45 +359,55 @@ configuration { "not no-trimesh", "not with-gimpact" } files { "../OPCODE/**.h", "../OPCODE/**.cpp" } - configuration { "enable-ou" } - files { "../ou/**.h", "../ou/**.cpp" } - defines { "_OU_NAMESPACE=odeou" } - + configuration { "with-libccd" } + files { "../libccd/src/ccd/*.h", "../libccd/src/*.c" } + defines { "dLIBCCD_ENABLED", "dLIBCCD_INTERNAL", + "dLIBCCD_BOX_CYL", "dLIBCCD_CYL_CYL", "dLIBCCD_CAP_CYL", "dLIBCCD_CONVEX_BOX", + "dLIBCCD_CONVEX_CAP", "dLIBCCD_CONVEX_CYL", "dLIBCCD_CONVEX_SPHERE", "dLIBCCD_CONVEX_CONVEX" } + + configuration { "not with-libccd" } + excludes { "../ode/src/collision_libccd.cpp", "../ode/src/collision_libccd.h" } + configuration { "windows" } links { "user32" } - configuration { "*Lib" } + configuration { "only-static or *Lib" } kind "StaticLib" defines "ODE_LIB" - configuration { "*DLL" } + configuration { "only-shared or *DLL" } kind "SharedLib" defines "ODE_DLL" + configuration { "*DLL" } + defines "_DLL" + + configuration { "Debug" } + targetname "oded" + + configuration { "Release" } + targetname "ode" + configuration { "DebugSingle*" } targetname "ode_singled" - defines "dSINGLE" configuration { "ReleaseSingle*" } targetname "ode_single" - defines "dSINGLE" configuration { "DebugDouble*" } targetname "ode_doubled" - defines "dDOUBLE" configuration { "ReleaseDouble*" } targetname "ode_double" - defines "dDOUBLE" ---------------------------------------------------------------------- --- Write a custom to src/ode, based on the supplied flags +-- Write a custom to build, based on the supplied flags ---------------------------------------------------------------------- - if _ACTION then - io.input("config-default.h") - local text = io.read("*a") + if _ACTION and _ACTION ~= "clean" then + local infile = io.open("config-default.h", "r") + local text = infile:read("*a") if _OPTIONS["no-trimesh"] then text = string.gsub(text, "#define dTRIMESH_ENABLED 1", "/* #define dTRIMESH_ENABLED 1 */") @@ -312,16 +416,21 @@ text = string.gsub(text, "#define dTRIMESH_OPCODE 1", "#define dTRIMESH_GIMPACT 1") end - if _OPTIONS["no-alloca"] then - text = string.gsub(text, "/%* #define dUSE_MALLOC_FOR_ALLOCA %*/", "#define dUSE_MALLOC_FOR_ALLOCA") - end - - if _OPTIONS["enable-ou"] then + if _OPTIONS["with-ou"] or not _OPTIONS["no-threading-intf"] then text = string.gsub(text, "/%* #define dOU_ENABLED 1 %*/", "#define dOU_ENABLED 1") text = string.gsub(text, "/%* #define dATOMICS_ENABLED 1 %*/", "#define dATOMICS_ENABLED 1") + end + + if _OPTIONS["with-ou"] then text = string.gsub(text, "/%* #define dTLS_ENABLED 1 %*/", "#define dTLS_ENABLED 1") end + if _OPTIONS["no-threading-intf"] then + text = string.gsub(text, "/%* #define dTHREADING_INTF_DISABLED 1 %*/", "#define dTHREADING_INTF_DISABLED 1") + elseif _OPTIONS["with-builtin-threading-impl"] then + text = string.gsub(text, "/%* #define dBUILTIN_THREADING_IMPL_ENABLED 1 %*/", "#define dBUILTIN_THREADING_IMPL_ENABLED 1") + end + if _OPTIONS["16bit-indices"] then text = string.gsub(text, "#define dTRIMESH_16BIT_INDICES 0", "#define dTRIMESH_16BIT_INDICES 1") end @@ -330,9 +439,41 @@ text = string.gsub(text, "#define dTRIMESH_OPCODE_USE_OLD_TRIMESH_TRIMESH_COLLIDER 0", "#define dTRIMESH_OPCODE_USE_OLD_TRIMESH_TRIMESH_COLLIDER 1") end - io.output("../ode/src/config.h") - io.write(text) - io.close() + local outfile = io.open("../ode/src/config.h", "w") + outfile:write(text) + outfile:close() + end + +---------------------------- +-- Write precision headers +---------------------------- + if _ACTION and _ACTION ~= "clean" then + function generateheader(headerfile, placeholder, precstr) + local outfile = io.open(headerfile, "w") + for i in io.lines(headerfile .. ".in") + do + local j,_ = string.gsub(i, placeholder, precstr) + --print("writing " .. j .. " into " .. headerfile) + outfile:write(j .. "\n") + end + outfile:close() + end + + function generate(precstr) + generateheader("../include/ode/precision.h", "@ODE_PRECISION@", "d" .. precstr) + generateheader("../libccd/src/ccd/precision.h", "@CCD_PRECISION@", "CCD_" .. precstr) + end + + if _OPTIONS["only-single"] then + generate("SINGLE") + elseif _OPTIONS["only-double"] then + generate("DOUBLE") + else + generate("UNDEFINEDPRECISION") + end + + generateheader("../include/ode/version.h", "@ODE_VERSION@", ode_version) + end @@ -351,15 +492,15 @@ "../drawstuff/src/internal.h", "../drawstuff/src/drawstuff.cpp" } - + configuration { "Debug*" } targetname "drawstuffd" - configuration { "*Lib" } + configuration { "only-static or *Lib" } kind "StaticLib" defines { "DS_LIB" } - configuration { "*DLL" } + configuration { "only-shared or *DLL" } kind "SharedLib" defines { "DS_DLL", "USRDLL" } @@ -377,7 +518,6 @@ links { "X11", "GL", "GLU" } end - ---------------------------------------------------------------------- diff -Nru ode-0.11.1/CHANGELOG.txt ode-0.14/CHANGELOG.txt --- ode-0.11.1/CHANGELOG.txt 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/CHANGELOG.txt 2015-12-18 14:09:27.000000000 +0000 @@ -8,21 +8,352 @@ * keep the format consistent (79 char width, M/D/Y date format). ------------------------------------------------------------------------------ -05/24/09 Daniel K. O. +11/28/2015 Oleh Derevenko + * Convex-Trimesh collider added (libccd+GIMPACT only)(by Piotr Piastucki) + * dCreateConvex() and dGeomSetConvex() public APIs changed to expect + their parameter arrays as const pointers + +11/01/2015 Oleh Derevenko + * OPCODE mesh colliders' input coordinates have been offset to + mesh-relative frames to decrease potential computational errors + (suggested by luckytrashsc2@g***l.com) + +08/05/2015 Oleh Derevenko + * Implemented change to return highest depth contacts subset for GIMPACT + in cases if contacts count exceeds requested maximum (as suggested in + the issue #36 by Piotr Piastucki) + +11/17/2014 Daniel K. O. + * Added support for using libccd from the system (if found via + pkg-config) + +11/10/2014 Oleh Derevenko + * Floating point division by zero in capsule-ray collision routine + in case if the ray axis was parallel the cylinder and the ray started + from within it fixed (issue #26) + +11/08/2014 Oleh Derevenko + * Threading support has been extended to complete implementation + of QuickStep + +10/29/2014 Daniel K. O. + * Added dJointSetDBallDistance + +10/19/2014 Oleh Derevenko + * Built-in threading implementation compilation fixed for OSX + (clock_gettime() is missing from the system - reported by Bram) + +08/10/2014 Oleh Derevenko + * Declarations of dWorld[Get/Set]AutoDisableLinearAverageThreshold and + dWorld[Get/Set]AutoDisableAngularAverageThreshold have been removed + from public headers (were orphaned since rev.1052) + +07/16/2014 Oleh Derevenko + * Two fixes by Francesco Cat applied (fixes for mistakes made during + code style improvements in the past) + +02/27/14 Daniel K. O. + * Added dODE_VERSION macro to public headers (issue #24). + +02/11/14 Daniel K. O. + * Added dJointGetHinge2Angle2 (issue #12). + +02/07/14 Daniel K. O. + * Added dWorldSetData/dWorldGetData (issue #21). + +01/31/14 Daniel K. O. + * Applied patch #185: Stable, implicit gyroscopic forces. + +01/27/14 Daniel K. O. + * Fixed cylinder AABB computation. + +01/25/14 Daniel K. O. + * Removed ALLOCA calls from dHashSpace; it should not depend + on stack size limits anymore. + +12/06/13 Daniel K. O. + * Applied patch #181: fix some bugs in AMotor joint. + * Applied patch #186: fix some bugs in PU joint. + * Applied patch #182: Transmission joint. + * Applied patch #184: implement rolling friction for contacts. + +08/08/13 Oleh Derevenko + * Joint feedback forces application fixed in QuickStep implementation + (was broken since revision #1919 in old repository (#1927 in new one)) + +08/04/13 Oleh Derevenko + * Bugfix #89 by Luc applied (dJointAddSliderForce() adds a zero force + when the parent body is NULL) + +05/18/13 Oleh Derevenko + * OU library has been included in ODE at revision #46 instead of + being used as an external link due to difficulties using external + references with new protocol used for storage at SF. + +03/03/13 Oleh Derevenko + * Fixed issue with "findex==-1" constraints being intermixed with + "findex!=-1" ones during constraints random reordering in QuickStep. + +02/03/13 Oleh Derevenko + * [u]int[8/16/32] renamed to contain "d" prefix so that global namespace + was not polluted with these names unconditionally. + If your project depended on these types other than just for passing + parameters to ODE calls, add similar typedefs for yourself in some + of your project's global headers. + +01/02/13 Oleh Derevenko + * Applied patch #183 by Joseph Cooper (complementary matrix + calculation fix). + +12/28/12 Oleh Derevenko + * A bug with heightfield data assigned to a wrong field in + dGeomHeightfieldSetHeightfieldData fixed (bug report #88 by Luc). + +12/18/12 Oleh Derevenko + * Fixed issue with some kinds of joints (Ball, DBall, DHinge, Fixed) + might overwrite world ERP value with their custom ERP during + getInfo2() call and that inappropriate value would then be passed + to subsequent joints in solver instead of world ERP. + +12/01/12 Oleh Derevenko + * Fixed issues reported in patches #151 and #22 (collisions with + SAPSpace and QuadTreeSpace might not work because geometries list + was misused in them). + * Applied patch #160 "IsPointInPolygon in convex.cpp returns wrong + results" (by Janis Rucis) + +11/25/12 Oleh Derevenko + * Configuration option --disable-threading-intf added + (--no-threading-intf for Windows/Premake). This allows disabling + threading interface support (external implementations may not be + assigned) but eliminates dependency on OU and use of atomics in + steppers. + +11/05/12 Oleh Derevenko + * Fixed zero comparisons in OPCODE to use relative error instead of + absolute epsilon value (found by Bill Sellers) + +06/08/12 Daniel K. O. + * Removed the need for defining dSINGLE/dDOUBLE; this is stored now in + the generated ode/precision.h header. + * Some code cleanup to get rid of GCC warnings. + +05/30/12 Daniel K. O. + * Made drawstuff draw shadows for lines. + * Fixed dhinge's last constraint to properly handle rotations. + +05/03/12 Daniel K. O. + * Added two new joints: Double Ball and Double Hinge. + +04/22/12 Daniel K. O. + * Fixed plane2d joint: uninitialized variables (reported by Dimitris + Papavasiliou) + +04/14/12 Oleh Derevenko + * Assertion checking macros moved into library private headers. + +04/13/12 Daniel K. O. + * Applied patch from bug #3431829 - better handling of capsule-box with + deep penetrations. + * Fixed zero-mu issues: now either mu or mu2 can be set to zero. + +03/17/12 Oleh Derevenko + * Threaded execution support interface added. Optional built-in threading + implementation added. + Internal threading implementation is excluded by default and to be used, + it must be enabled with configure/premake. + At present, if threading interface is assigned to a world, island + selection and stepping is performed in multiple threads (one thread per + island). + +03/12/12 Oleh Derevenko + * PURE_INLINE macro renamed to ODE_PURE_INLINE and definition of + dNextAfter()/dCopySign() corrected to avoid creating conflicts with + other libraries. + +02/03/12 Oleh Derevenko + * Assertion checking macros moved from common.h to error.h + +12/18/11 Oleh Derevenko + * dIVERIFY macro added (same as dIASSERT in debug mode but evaluates its + expression in release mode) to be used to assert variable value + which is not used further in text while avoiding compiler warning. + * dICHECK macro added (same as dIASSERT but evaluates its expression and + raises assertion fault regardless of compilation mode) to be used to + generate a fault in cases when error is very unlikely but must be + handled and handling is very troublesome (e.g. failure to lock a mutex + due to lack of resources). + +12/07/11 Oleh Derevenko + * Partially fixed size_t to integer conversion warnings + * Fixed type signedness and added casts to size_t wherever necessary + in Step/QuickStep + +11/04/11 Daniel K. O. + * Applied patch #3429454 - fix compilation on some platforms. + +10/28/11 Daniel K. O. + * Fixed a box-capsule bug: more reasonable normal for deep penetrations + (contributed by Georg Martius.) + +10/27/11 Daniel K. O. + * Disabled merging of contacts for trimesh-sphere by default. + * Added new demo: demo_tracks. + +10/17/11 Daniel K. O. + * Added python bindings, contributed by Gideon Klompje. + * Updated some build scripts. + * Changed spheres distribution in demo_space_stress. + +05/17/11 Oleh Derevenko + * A typo in step.cpp fixed (assignment operator in a conditional + instead of comparison) (reported by Bram Stolk) + +01/29/11 Oleh Derevenko + * Heightfield zone boundaries calculation code fixed to also consider + whole next cell after the AABB if the AABB ends exactly at the cell + boundary. + +01/23/11 Daniel K. O. + * Applied patch from Daniel Fiser, add libccd collider for + box-cylinder. + +01/20/11 Daniel K. O. + * Applied patch from Daniel Fiser, fix infinite loop in libccd caused + by numerical problems. + +01/06/11 Daniel K. O. + * Applied patch from Daniel Fiser, efficient libccd tests when using + CONTACTS_UNIMPORTANT. + +12/17/10 Daniel K. O. + * Applied patches from Daniel Fiser for new colliders based on libccd. + +11/08/10 Daniel K. O. + * Applied patches from Daniel Fiser to incorporate libccd for + Cylinder-Cylinder collision tests. + +08/21/10 Oleh Derevenko + * Fix applied to dxReallocateTemporayWorldProcessContext() to remove typo + which caused segmentation fault (by Kyle McKay). + dTestSolveLCP() fixed to avoid exceeding allocated memory pool + (by Kyle McKay). + +07/19/10 Oleh Derevenko + * Patch applied (#3030783) to fix drawstuff dimensions being ignored + in OSX GLUT port (by Danny Price). + + Daniel K. O. + * Applied patch #2991622: dGeomGetRelPointPos, dGeomGetPosRelPoint, + dGeomVectorToWorld, and dGeomVectorFromWorld. + +07/16/10 Daniel K. O. + * Fixed bug #2937076: don't try to build demos if drawstuff is disabled. + +05/02/10 Oleh Derevenko + * Missing extern "C" wrapper has been added to include/ode/export-dif.h + (reported by Danny Price). The change affects dWorldExportDIF() public + function. + +05/02/10 Oleh Derevenko + * Patch applied (#2995450) to generate up to four contacts for box- + plane collision test (by alexdu) and fix contact depths. + +05/02/10 Oleh Derevenko + * dGeomLowLevelControl function added with ability to change/query OPCODE + trimesh-sphere contact merging behavior at runtime. + +02/18/10 Daniel K. O. + * Fixed bug affecting disabled joints and dWorldStep. + +01/16/10 Oleh Derevenko + * Patch applied (#2931174) to make demos work for recent MacOS. + * Patch applied (#2931177) to fix the demos' framerate on X11. + +12/20/09 Oleh Derevenko + * QuadTreeSpace implementation corrected to avoid object-block relation + ambiguity due to numeric errors. + +12/04/09 Oleh Derevenko + * odecpp classes changed to be inheritable and easily expandable + +11/29/09 Oleh Derevenko + * Improvement for trimesh-plane collision (also used in trimesh-heightfield) + to exclude mesh vertices that have already generated contacts from further + examination and contact generation in other triangles (suggested by LR). + +10/25/09 Oleh Derevenko + * Macros changed to static inline functions in odemath.h and related files. + Some code duplication has been eliminated across the files. + + * Fixed handling of --disable-asserts and --enable-double-precision + (absence of --enable-double-precision) in configure script. The script + was not appending compiler defines correctly. + + * dWorldStep implementation changed to remove allocation on stack. + dUSE_MALLOC_FOR_ALLOCA define has been removed as well as corresponding + configuration parameter. Also dMemoryFlag public variable has been removed. + (look for presence of ODE_EXT_malloc_not_alloca configuration string if + your application is dependent on that variable). + +09/05/09 Oleh Derevenko + * dWorldStepFast1 API removed along with dWorld[Get/Set]AutoEnableDepthSF1 + +08/29/09 Oleh Derevenko + * Fixed uninitialized floating point array used in computations. + +08/12/09 Oleh Derevenko + * A typo fixed in dGeomCopyOffsetRotation() (final_posr was used instead + of offset_posr). Reported by Tilmann. + +08/11/09 Daniel K. O. + * Made sure neither dSINGLE or dDOUBLE is defined by default; the user + should always explicitly specify the precision. + +06/27/09 Oleh Derevenko + * New functions have been added: + - dWorldUseSharedWorkingMemory + - dWorldCleanupWorkingMemory + - dWorldSetStepMemoryReservationPolicy + - dWorldSetStepMemoryManager + +06/25/09 Remi Ricard (papaDoc) + * Add limit to the to the second axis of the universal joint + for the pu joint. + +06/14/09 Oleh Derevenko + * dWorldQuickStep re-implemented to avoid memory allocation on stack. + Also several optimizations have been made to decrease memory + requirements and optimize algorithm implementation of dWorldQuickStep. + dWorldStep still remains with old memory allocation however new APIs + mentioned below are fully functional for it. + Both dWorldStep and dWorldQuickStep have been changed to return boolean + success status. + + * dInitODE2() changed to automatically call + AllocateODEDataForThread(dAllocateFlagBasicData) after library + initialization as this is a required initialization minimum that + must always be performed anyway. + +06/05/09 Daniel K. O. + * Removed aliasing issues from OPCODE/Ice, plus some other warnings. + Now it builds on gcc 4.3.2 with '-Wall -Werror -O3". - * Made the new trimesh collider the default. - * Added a "-texturepath" option to drawstuff. +05/30/09 Oleh Derevenko + * A minor memory usage optimization for QuickStep. -05/18/09 Oleh Derevenko +05/24/09 Daniel K. O. + * Made the new trimesh collider the default. + * Added a "-texturepath" option to drawstuff. - * Heightfield rotation fixed to avoid NaNs while rotating infinite - MIN/MAX heights. +05/18/09 Oleh Derevenko + * Heightfield rotation fixed to avoid NaNs while rotating infinite + MIN/MAX heights. 05/03/09 Oleh Derevenko - - * Incorrect parameter order fixed on contact merging in Sphere-Trimesh - collisions. The bug resulted in merged contact remaining with normal - of first contact found. Thanks to Dimitris Papavasiliou for reporting. + * Incorrect parameter order fixed on contact merging in Sphere-Trimesh + collisions. The bug resulted in merged contact remaining with normal + of first contact found. Thanks to Dimitris Papavasiliou for reporting. 04/23/09 Daniel K. O. * Fixed bug #2685170: use the C99 __func__ instead of __FUNCTION__ when @@ -141,7 +472,7 @@ dJointAttach(jId, 0, bId). The body was not push in the right direction to move back between the limits. -10/29/08 Oleh_Derevenko +10/29/08 Oleh Derevenko * Premake scripts changed to only include chosen collision library sources in project on Windows. --all-collis-libs premake option @@ -272,18 +603,18 @@ * Applied patch #1335202: Contact Joint Motion (with some corrections), and added demo_motion. -05/01/08 Oleh_Derevenko +05/01/08 Oleh Derevenko * Memory leak in GIMPACT fixed (reported by Derek) -04/28/08 Oleh_Derevenko +04/28/08 Oleh Derevenko * Added possibility to collide a space of lower sublevel as a geometry against another space of a higher level with dSpaceCollide2. dSpaceSetSublevel/dSpaceGetSublevel are used for sublevel assignment/ retrieval. -04/27/08 Oleh_Derevenko +04/27/08 Oleh Derevenko * Fixed incorrect memory copying which could lead to memory corruption in GIMPACT (luckily, in unused code) @@ -294,12 +625,12 @@ * Implemented support for ability to run collision detection from multiple threads for separate spaces. -04/14/08 Oleh_Derevenko +04/14/08 Oleh Derevenko * Fixed possible memory corruption in new trimesh-trimesh collider in case if two degenerated triangles are checked against each other. -04/12/08 Oleh_Derevenko +04/12/08 Oleh Derevenko * Fixed sporadic assertion failure on vector normalization caused by small triangles degenerating into segments during space diff -Nru ode-0.11.1/compile ode-0.14/compile --- ode-0.11.1/compile 2009-05-24 22:15:37.000000000 +0000 +++ ode-0.14/compile 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2005-05-14.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff -Nru ode-0.11.1/config.guess ode-0.14/config.guess --- ode-0.11.1/config.guess 2009-05-24 22:15:46.000000000 +0000 +++ ode-0.14/config.guess 1970-01-01 00:00:00.000000000 +0000 @@ -1,1542 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-11-15' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd | genuineintel) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff -Nru ode-0.11.1/config.sub ode-0.14/config.sub --- ode-0.11.1/config.sub 2009-05-24 22:15:46.000000000 +0000 +++ ode-0.14/config.sub 1970-01-01 00:00:00.000000000 +0000 @@ -1,1677 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-09-08' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff -Nru ode-0.11.1/configure ode-0.14/configure --- ode-0.11.1/configure 2009-05-24 22:15:39.000000000 +0000 +++ ode-0.14/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,24221 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for ODE 0.11.1. -# -# Report bugs to . -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME='ODE' -PACKAGE_TARNAME='ode' -PACKAGE_VERSION='0.11.1' -PACKAGE_STRING='ODE 0.11.1' -PACKAGE_BUGREPORT='ode@ode.org' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -enable_option_checking=no -ac_subst_vars='LTLIBOBJS -ENABLE_OU_FALSE -ENABLE_OU_TRUE -subdirs -LIBOBJS -ALLOCA -ENABLE_DEMOS_FALSE -ENABLE_DEMOS_TRUE -LIBSTDCXX -GL_LIBS -X_EXTRA_LIBS -X_LIBS -X_PRE_LIBS -X_CFLAGS -XMKMF -OSX_FALSE -OSX_TRUE -X11_FALSE -X11_TRUE -WIN32_FALSE -WIN32_TRUE -ENABLE_DRAWSTUFF_FALSE -ENABLE_DRAWSTUFF_TRUE -EXTRA_LIBTOOL_LDFLAGS -ODE_PRECISION -TRIMESH_FALSE -TRIMESH_TRUE -GIMPACT_FALSE -GIMPACT_TRUE -OPCODE_FALSE -OPCODE_TRUE -X86_64_SYSTEM_FALSE -X86_64_SYSTEM_TRUE -ac_ct_WINDRES -WINDRES -CXXCPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -lt_ECHO -RANLIB -AR -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -LIBTOOL -OBJDUMP -DLLTOOL -AS -LN_S -CPP -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -ac_ct_CC -CFLAGS -CC -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CXX -CPPFLAGS -LDFLAGS -CXXFLAGS -CXX -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -ODE_VERSION_INFO -ODE_RELEASE -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_version_info -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -enable_demos -with_trimesh -enable_double_precision -with_drawstuff -with_x -enable_old_trimesh -enable_gprof -enable_malloc -enable_ou -enable_asserts -' - ac_precious_vars='build_alias -host_alias -target_alias -CXX -CXXFLAGS -LDFLAGS -LIBS -CPPFLAGS -CCC -CC -CFLAGS -CPP -CXXCPP -XMKMF' -ac_subdirs_all='ou' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures ODE 0.11.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/ode] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -X features: - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of ODE 0.11.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-version-info don't encode version information in the generated - library - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=no] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --disable-demos don't build demos - --enable-double-precision - Configure ODE to work with double precision, if not - specified, single precision is used - --enable-old-trimesh enable use of the old trimesh collider - --enable-gprof enable profiling with gprof - --enable-malloc use malloc to emulate alloca (more portable but - slower) - --enable-ou EXPERIMENTAL: use TLS for global variables to allow - for running ODE in multiple threads simultaneously - --disable-asserts disables debug error checking - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-trimesh=opcode|gimpact|none - use the specified system for trimesh support - [default=opcode] - --with-drawstuff=X11|Win32|OSX|none - force a particular drawstuff implementation or - disable it. - --with-x use the X Window System - -Some influential environment variables: - CXX C++ compiler command - CXXFLAGS C++ compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CC C compiler command - CFLAGS C compiler flags - CPP C preprocessor - CXXCPP C++ preprocessor - XMKMF Path to xmkmf, Makefile generator for X Window System - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -ODE configure 0.11.1 -generated by GNU Autoconf 2.63 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by ODE $as_me 0.11.1, which was -generated by GNU Autoconf 2.63. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# AC_CONFIG_SRCDIR([ode/src/ode.cpp]) -ODE_RELEASE=0.11.1 - - -# Those are instructions from the Libtool manual: -# 1. Start with version information of `0:0:0' for each libtool library. -# -# 2. Update the version information only immediately before a public -# release of your software. More frequent updates are unnecessary, -# and only guarantee that the current interface number gets larger -# faster. -# -# 3. If the library source code has changed at all since the last -# update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). -# -# 4. If any interfaces have been added, removed, or changed since the -# last update, increment CURRENT, and set REVISION to 0. -# -# 5. If any interfaces have been added since the last public release, -# then increment AGE. -# -# 6. If any interfaces have been removed since the last public release, -# then set AGE to 0. -CURRENT=2 -REVISION=1 -AGE=1 - -# Check whether --enable-version-info was given. -if test "${enable_version_info+set}" = set; then - enableval=$enable_version_info; version_info=$enableval -else - version_info=yes -fi - -if test x$version_info = xyes -then - ODE_VERSION_INFO="-version-info $CURRENT:$REVISION:$AGE" -else - ODE_VERSION_INFO="-avoid-version" -fi - - - - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - -am__api_version='1.10' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='ode' - VERSION='0.11.1' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -ac_config_headers="$ac_config_headers ode/src/config.h" - - -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 -$as_echo_n "checking for C++ compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C++ compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C++ compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 -$as_echo_n "checking whether the C++ compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -if test "x$CC" != xcc; then - { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define NO_MINUS_C_MINUS_O 1 -_ACEOF - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=no -fi - - - - - - - - - -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AS+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:$LINENO: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.6' -macro_revision='1.3012' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5850: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:5853: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:5856: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:$LINENO: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 7048 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - lt_cv_cc_needs_belf=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - lt_cv_ld_exported_symbols_list=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - - -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -_lt_caught_CXX_error=yes; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - - - - - -# Set options - - - - enable_dlopen=no - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9352: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9356: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9691: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9695: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9796: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:9800: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9851: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:9855: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - link_all_deplibs=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF -int foo(void) {} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes -fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 11708 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - ;; - esac - fi - rm -rf conftest* - ;; - esac - - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_svld_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_dld_link=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 12674 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 12770 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec_CXX='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - gnu*) - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no - - GCC_CXX="$GXX" - LD_CXX="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14790: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14794: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14889: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14893: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14941: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14945: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - link_all_deplibs_CXX=no - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes -fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 15595 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - ;; - esac - fi - rm -rf conftest* - ;; - esac - - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -if test -n "$ac_tool_prefix"; then - for ac_prog in windres - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_WINDRES+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$WINDRES"; then - ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_WINDRES="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -WINDRES=$ac_cv_prog_WINDRES -if test -n "$WINDRES"; then - { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5 -$as_echo "$WINDRES" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$WINDRES" && break - done -fi -if test -z "$WINDRES"; then - ac_ct_WINDRES=$WINDRES - for ac_prog in windres -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_WINDRES"; then - ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_WINDRES="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES -if test -n "$ac_ct_WINDRES"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5 -$as_echo "$ac_ct_WINDRES" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_WINDRES" && break -done - - if test "x$ac_ct_WINDRES" = x; then - WINDRES="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - WINDRES=$ac_ct_WINDRES - fi -fi - - - - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - # Check for potential -arch flags. It is not universal unless - # there are some -arch flags. Note that *ppc* also matches - # ppc64. This check is also rather less than ideal. - case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( - *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; - esac -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - # It does; now see whether it defined to BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_bigendian=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_bigendian=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then - # Try to guess by grepping values from an object file. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=no -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_bigendian=yes -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF -;; #( - no) - ;; #( - universal) - -cat >>confdefs.h <<\_ACEOF -#define AC_APPLE_UNIVERSAL_BUILD 1 -_ACEOF - - ;; #( - *) - { { $as_echo "$as_me:$LINENO: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -$as_echo "$as_me: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; - esac - -{ $as_echo "$as_me:$LINENO: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5 -$as_echo_n "checking for working volatile... " >&6; } -if test "${ac_cv_c_volatile+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_volatile=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_volatile=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 -$as_echo "$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -cat >>confdefs.h <<\_ACEOF -#define volatile /**/ -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" -#endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - bool e = &s; - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; -# if defined __xlc__ || defined __GNUC__ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This test is not quite right, since xlc is allowed to - reject this program, as the initializer for xlcbug is - not one of the forms that C requires support for. - However, doing the test right would require a runtime - test, and that would make cross-compilation harder. - Let us hope that IBM fixes the xlc bug, and also adds - support for this kind of constant expression. In the - meantime, this test will reject xlc, which is OK, since - our stdbool.h substitute should suffice. We also test - this with GCC, where it should work, to detect more - quickly whether someone messes up the test in the - future. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); -# endif - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - -int -main () -{ - - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdbool_h=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdbool_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } -{ $as_echo "$as_me:$LINENO: checking for _Bool" >&5 -$as_echo_n "checking for _Bool... " >&6; } -if test "${ac_cv_type__Bool+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type__Bool=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (_Bool)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((_Bool))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type__Bool=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -$as_echo "$ac_cv_type__Bool" >&6; } -if test "x$ac_cv_type__Bool" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 -_ACEOF - - -fi - -if test $ac_cv_header_stdbool_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STDBOOL_H 1 -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_size_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((size_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -$as_echo "$ac_cv_type_size_t" >&6; } -if test "x$ac_cv_type_size_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - - -{ $as_echo "$as_me:$LINENO: checking if demos should be built" >&5 -$as_echo_n "checking if demos should be built... " >&6; } -# Check whether --enable-demos was given. -if test "${enable_demos+set}" = set; then - enableval=$enable_demos; enable_demos=$enableval -else - enable_demos=yes -fi - -{ $as_echo "$as_me:$LINENO: result: $enable_demos" >&5 -$as_echo "$enable_demos" >&6; } - - - -pentium=no -cpu64=no -case "$host_cpu" in - i586 | i686 | i786 ) - pentium=yes - -cat >>confdefs.h <<\_ACEOF -#define PENTIUM 1 -_ACEOF - - ;; - x86_64* ) - pentium=yes - cpu64=yes - -cat >>confdefs.h <<\_ACEOF -#define X86_64_SYSTEM 1 -_ACEOF - - ;; -esac - - if test x$cpu64 = xyes; then - X86_64_SYSTEM_TRUE= - X86_64_SYSTEM_FALSE='#' -else - X86_64_SYSTEM_TRUE='#' - X86_64_SYSTEM_FALSE= -fi - - - - - - - - - - - - - - - - - - -for ac_header in alloca.h stdio.h stdint.h stdlib.h math.h string.h stdarg.h malloc.h float.h time.h sys/time.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------- ## -## Report this to ode@ode.org ## -## -------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -opcode=no -gimpact=no - -# Check whether --with-trimesh was given. -if test "${with_trimesh+set}" = set; then - withval=$with_trimesh; trimesh=$withval -else - trimesh=opcode - -fi - -if test "$trimesh" = opcode -then - opcode=yes -fi -if test "$trimesh" = gimpact -then - gimpact=yes -fi - - if test $opcode = yes; then - OPCODE_TRUE= - OPCODE_FALSE='#' -else - OPCODE_TRUE='#' - OPCODE_FALSE= -fi - - if test $gimpact = yes; then - GIMPACT_TRUE= - GIMPACT_FALSE='#' -else - GIMPACT_TRUE='#' - GIMPACT_FALSE= -fi - - if test $opcode = yes -o $gimpact = yes; then - TRIMESH_TRUE= - TRIMESH_FALSE='#' -else - TRIMESH_TRUE='#' - TRIMESH_FALSE= -fi - - - -{ $as_echo "$as_me:$LINENO: checking if double precision is requested" >&5 -$as_echo_n "checking if double precision is requested... " >&6; } -# Check whether --enable-double-precision was given. -if test "${enable_double_precision+set}" = set; then - enableval=$enable_double_precision; precision=$enableval -else - precision=no -fi - -{ $as_echo "$as_me:$LINENO: result: $precision" >&5 -$as_echo "$precision" >&6; } -if test "$precision" = yes; -then - ODE_PRECISION=-DdDOUBLE -else - ODE_PRECISION=-DdSINGLE -fi - -CPPFLAGS+=" $ODE_PRECISION" - - - - -# Check whether --with-drawstuff was given. -if test "${with_drawstuff+set}" = set; then - withval=$with_drawstuff; drawstuff=$withval -else - drawstuff= -fi - - -EXTRA_LIBTOOL_LDFLAGS= -case "$host_os" in - cygwin* | mingw*) - if test x"$drawstuff" = x - then - drawstuff="Win32" # if in a Windows enviroment - fi - EXTRA_LIBTOOL_LDFLAGS="-no-undefined" - ;; - *apple* | *darwin*) # For Mac OS X - if test x"$drawstuff" = x - then - drawstuff="OSX" - fi - CC="$CXX" - LINK="$CXXLINK" - ;; - *) - if test x"$drawstuff" = x - then - drawstuff="X11" # if anything else default to X11 - fi - ;; -esac - - if test x$drawstuff != xnone; then - ENABLE_DRAWSTUFF_TRUE= - ENABLE_DRAWSTUFF_FALSE='#' -else - ENABLE_DRAWSTUFF_TRUE='#' - ENABLE_DRAWSTUFF_FALSE= -fi - - - - if test x$drawstuff = xWin32; then - WIN32_TRUE= - WIN32_FALSE='#' -else - WIN32_TRUE='#' - WIN32_FALSE= -fi - - if test x$drawstuff = xX11; then - X11_TRUE= - X11_FALSE='#' -else - X11_TRUE='#' - X11_FALSE= -fi - - if test x$drawstuff = xOSX; then - OSX_TRUE= - OSX_FALSE='#' -else - OSX_TRUE='#' - OSX_FALSE= -fi - -{ $as_echo "$as_me:$LINENO: checking which drawstuff lib to build" >&5 -$as_echo_n "checking which drawstuff lib to build... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $drawstuff" >&5 -$as_echo "$drawstuff" >&6; } - -if test "x$drawstuff" = "xX11" -then - { $as_echo "$as_me:$LINENO: checking for X" >&5 -$as_echo_n "checking for X... " >&6; } - - -# Check whether --with-x was given. -if test "${with_x+set}" = set; then - withval=$with_x; -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5 -$as_echo "$as_me: error: cannot use X directory names containing '" >&2;} - { (exit 1); exit 1; }; };; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl dylib la dll; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /usr/lib64 | /lib | /lib64) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi - -# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # We can compile using X headers with no special include directory. -ac_x_includes= -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done -fi - -rm -f conftest.err conftest.$ac_ext -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -XrmInitialize () - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries= -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl dylib la dll; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi # $ac_x_libraries = no - -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac -fi -;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - { $as_echo "$as_me:$LINENO: result: $have_x" >&5 -$as_echo "$have_x" >&6; } - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } -fi - -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - -cat >>confdefs.h <<\_ACEOF -#define X_DISPLAY_MISSING 1 -_ACEOF - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 -$as_echo_n "checking whether -R must be followed by a space... " >&6; } - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - ac_xsave_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: neither works" >&5 -$as_echo "neither works" >&6; } -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_c_werror_flag=$ac_xsave_c_werror_flag - LIBS=$ac_xsave_LIBS - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn Johnson says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And Karl Berry says - # the Alpha needs dnet_stub (dnet does not exist). - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XOpenDisplay (); -int -main () -{ -return XOpenDisplay (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dnet_dnet_ntoa=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_dnet_ntoa=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet_stub $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dnet_stub_dnet_ntoa=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_stub_dnet_ntoa=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -fi - - fi -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ac_xsave_LIBS" - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 -$as_echo_n "checking for gethostbyname... " >&6; } -if test "${ac_cv_func_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyname innocuous_gethostbyname - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyname - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname -choke me -#endif - -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_gethostbyname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyname=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -$as_echo "$ac_cv_func_gethostbyname" >&6; } - - if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_nsl_gethostbyname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyname=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -fi - - if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_bsd_gethostbyname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_bsd_gethostbyname=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" -fi - - fi - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says Simon Leinen: it contains gethostby* - # variants that don't use the name server (or something). -lsocket - # must be given before -lnsl if both are needed. We assume that - # if connect needs -lnsl, so does gethostbyname. - { $as_echo "$as_me:$LINENO: checking for connect" >&5 -$as_echo_n "checking for connect... " >&6; } -if test "${ac_cv_func_connect+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define connect to an innocuous variant, in case declares connect. - For example, HP-UX 11i declares gettimeofday. */ -#define connect innocuous_connect - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef connect - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect -choke me -#endif - -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_connect=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_connect=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -$as_echo "$ac_cv_func_connect" >&6; } - - if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_socket_connect=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_connect=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -fi - - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. - { $as_echo "$as_me:$LINENO: checking for remove" >&5 -$as_echo_n "checking for remove... " >&6; } -if test "${ac_cv_func_remove+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define remove to an innocuous variant, in case declares remove. - For example, HP-UX 11i declares gettimeofday. */ -#define remove innocuous_remove - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char remove (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef remove - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_remove || defined __stub___remove -choke me -#endif - -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_remove=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_remove=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 -$as_echo "$ac_cv_func_remove" >&6; } - - if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5 -$as_echo_n "checking for remove in -lposix... " >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lposix $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_posix_remove=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_posix_remove=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 -$as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - { $as_echo "$as_me:$LINENO: checking for shmat" >&5 -$as_echo_n "checking for shmat... " >&6; } -if test "${ac_cv_func_shmat+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shmat to an innocuous variant, in case declares shmat. - For example, HP-UX 11i declares gettimeofday. */ -#define shmat innocuous_shmat - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shmat (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shmat - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shmat || defined __stub___shmat -choke me -#endif - -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shmat=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shmat=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 -$as_echo "$ac_cv_func_shmat" >&6; } - - if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 -$as_echo_n "checking for shmat in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lipc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_ipc_shmat=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ipc_shmat=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -fi - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS=$LDFLAGS - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry - { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char IceConnectionNumber (); -int -main () -{ -return IceConnectionNumber (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_ICE_IceConnectionNumber=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ICE_IceConnectionNumber=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -fi - - LDFLAGS=$ac_save_LDFLAGS - -fi - -fi - -if test "x$drawstuff" = "xOSX"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_APPLE_OPENGL_FRAMEWORK 1 -_ACEOF - - GL_LIBS="-framework OpenGL -framework Carbon -framework AGL" -else - have_gl_headers=yes - - - -for ac_header in GL/gl.h GL/glu.h GL/glext.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef WIN32 - #include - #endif - #if HAVE_GL_GL_H - #include - #endif - #if HAVE_GL_GLU_H - #include - #endif - - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - have_gl_headers=no -fi - -done - - have_gl=no - have_glu=no - TEMP_LDFLAGS="$LDFLAGS" - { $as_echo "$as_me:$LINENO: checking for main in -lGL" >&5 -$as_echo_n "checking for main in -lGL... " >&6; } -if test "${ac_cv_lib_GL_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lGL $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_GL_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_GL_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5 -$as_echo "$ac_cv_lib_GL_main" >&6; } -if test "x$ac_cv_lib_GL_main" = x""yes; then - GL_LIBS="-lGL"; have_gl=yes -fi - - { $as_echo "$as_me:$LINENO: checking for main in -lGLU" >&5 -$as_echo_n "checking for main in -lGLU... " >&6; } -if test "${ac_cv_lib_GLU_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lGLU -lGL $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_GLU_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_GLU_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_main" >&5 -$as_echo "$ac_cv_lib_GLU_main" >&6; } -if test "x$ac_cv_lib_GLU_main" = x""yes; then - GL_LIBS="-lGLU $GL_LIBS"; have_glu=yes -fi - - { $as_echo "$as_me:$LINENO: checking for main in -lopengl32" >&5 -$as_echo_n "checking for main in -lopengl32... " >&6; } -if test "${ac_cv_lib_opengl32_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lopengl32 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_opengl32_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_opengl32_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_opengl32_main" >&5 -$as_echo "$ac_cv_lib_opengl32_main" >&6; } -if test "x$ac_cv_lib_opengl32_main" = x""yes; then - GL_LIBS="-lopengl32"; have_gl=yes -fi - - { $as_echo "$as_me:$LINENO: checking for main in -lglu32" >&5 -$as_echo_n "checking for main in -lglu32... " >&6; } -if test "${ac_cv_lib_glu32_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lglu32 -lopengl32 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_glu32_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_glu32_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glu32_main" >&5 -$as_echo "$ac_cv_lib_glu32_main" >&6; } -if test "x$ac_cv_lib_glu32_main" = x""yes; then - GL_LIBS="-lglu32 $GL_LIBS"; have_glu=yes -fi - - LDFLAGS="$TEMP_LDFLAGS" - if test $have_gl = no -o $have_glu = no -o $have_gl_headers = no; then - if test x$enable_demos = xyes; then - { $as_echo "$as_me:$LINENO: WARNING: Demos will not be built because OpenGL doesn't seem to work. See \`config.log' for details." >&5 -$as_echo "$as_me: WARNING: Demos will not be built because OpenGL doesn't seem to work. See \`config.log' for details." >&2;} - fi - enable_demos=no - fi -fi - - - -{ $as_echo "$as_me:$LINENO: checking for main in -lstdc++" >&5 -$as_echo_n "checking for main in -lstdc++... " >&6; } -if test "${ac_cv_lib_stdcpp_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lstdc++ $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_stdcpp_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_stdcpp_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_main" >&5 -$as_echo "$ac_cv_lib_stdcpp_main" >&6; } -if test "x$ac_cv_lib_stdcpp_main" = x""yes; then - LIBSTDCXX="-lstdc++" -else - LIBSTDCXX= -fi - - -{ $as_echo "$as_me:$LINENO: checking for main in -lpthread" >&5 -$as_echo_n "checking for main in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_pthread_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&5 -$as_echo "$ac_cv_lib_pthread_main" >&6; } -if test "x$ac_cv_lib_pthread_main" = x""yes; then - LIBS="$LIBS -lpthread" -fi - - - - if test x$enable_demos = xyes; then - ENABLE_DEMOS_TRUE= - ENABLE_DEMOS_FALSE='#' -else - ENABLE_DEMOS_TRUE='#' - ENABLE_DEMOS_FALSE= -fi - - - -old_trimesh=no -# Check whether --enable-old-trimesh was given. -if test "${enable_old_trimesh+set}" = set; then - enableval=$enable_old_trimesh; old_trimesh=$enableval - -fi - -if test x$old_trimesh = xyes -a $trimesh = opcode; then - -cat >>confdefs.h <<\_ACEOF -#define dTRIMESH_OPCODE_USE_OLD_TRIMESH_TRIMESH_COLLIDER 1 -_ACEOF - -else - old_trimesh=no -fi - - -{ $as_echo "$as_me:$LINENO: checking for gprof" >&5 -$as_echo_n "checking for gprof... " >&6; } -# Check whether --enable-gprof was given. -if test "${enable_gprof+set}" = set; then - enableval=$enable_gprof; gprof=$enableval -else - gprof=no -fi - -if test "$gprof" != no -then - CFLAGS="-pg $CFLAGS" - CXXFLAGS="-pg $CXXFLAGS" - { $as_echo "$as_me:$LINENO: result: enabled" >&5 -$as_echo "enabled" >&6; } - { $as_echo "$as_me:$LINENO: checking for main in -lgmon" >&5 -$as_echo_n "checking for main in -lgmon... " >&6; } -if test "${ac_cv_lib_gmon_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgmon $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_gmon_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_gmon_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmon_main" >&5 -$as_echo "$ac_cv_lib_gmon_main" >&6; } -if test "x$ac_cv_lib_gmon_main" = x""yes; then - LIBS="$LIBS -lgmon" -fi - -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -{ $as_echo "$as_me:$LINENO: checking for main in -lm" >&5 -$as_echo_n "checking for main in -lm... " >&6; } -if test "${ac_cv_lib_m_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_m_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_m_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 -$as_echo "$ac_cv_lib_m_main" >&6; } -if test "x$ac_cv_lib_m_main" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - - -{ $as_echo "$as_me:$LINENO: checking for main in -lsunmath" >&5 -$as_echo_n "checking for main in -lsunmath... " >&6; } -if test "${ac_cv_lib_sunmath_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsunmath $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_sunmath_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sunmath_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_main" >&5 -$as_echo "$ac_cv_lib_sunmath_main" >&6; } -if test "x$ac_cv_lib_sunmath_main" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSUNMATH 1 -_ACEOF - - LIBS="-lsunmath $LIBS" - -fi - - - - - - - - - - - - - - - - - - - - - - - -for ac_func in floor memmove memset select sqrt sqrtf sinf cosf fabsf atan2f fmodf copysignf copysign snprintf vsnprintf gettimeofday isnan isnanf _isnan _isnanf __isnan __isnanf -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_working_alloca_h=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_working_alloca_h=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA_H 1 -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_alloca_works=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_alloca_works=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA 1 -_ACEOF - -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. - -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -cat >>confdefs.h <<\_ACEOF -#define C_ALLOCA 1 -_ACEOF - - -{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi - - done -fi - -{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} - -int -main () -{ - return find_stack_direction () < 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_stack_direction=1 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_stack_direction=-1 -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } - -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF - - -fi - - -for ac_header in stdlib.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------- ## -## Report this to ode@ode.org ## -## -------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_malloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif - -int -main () -{ -return ! malloc (0); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_malloc_0_nonnull=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_malloc_0_nonnull=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 1 -_ACEOF - -else - cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 0 -_ACEOF - - case " $LIBOBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define malloc rpl_malloc -_ACEOF - -fi - - - -{ $as_echo "$as_me:$LINENO: checking for obstacks" >&5 -$as_echo_n "checking for obstacks... " >&6; } -if test "${ac_cv_func_obstack+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - #include "obstack.h" -int -main () -{ -struct obstack mem; - #define obstack_chunk_alloc malloc - #define obstack_chunk_free free - obstack_init (&mem); - obstack_free (&mem, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_obstack=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_obstack=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5 -$as_echo "$ac_cv_func_obstack" >&6; } -if test $ac_cv_func_obstack = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_OBSTACK 1 -_ACEOF - -else - case " $LIBOBJS " in - *" obstack.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS obstack.$ac_objext" - ;; -esac - -fi - - -for ac_header in stdlib.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------- ## -## Report this to ode@ode.org ## -## -------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 -$as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_realloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif - -int -main () -{ -return ! realloc (0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_realloc_0_nonnull=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_realloc_0_nonnull=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_REALLOC 1 -_ACEOF - -else - cat >>confdefs.h <<\_ACEOF -#define HAVE_REALLOC 0 -_ACEOF - - case " $LIBOBJS " in - *" realloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS realloc.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define realloc rpl_realloc -_ACEOF - -fi - - - - - -for ac_header in sys/select.h sys/socket.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------- ## -## Report this to ode@ode.org ## -## -------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:$LINENO: checking types of arguments for select" >&5 -$as_echo_n "checking types of arguments for select... " >&6; } -if test "${ac_cv_func_select_args+set}" = set; then - $as_echo_n "(cached) " >&6 -else - for ac_arg234 in 'fd_set *' 'int *' 'void *'; do - for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do - for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#ifdef HAVE_SYS_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - -int -main () -{ -extern int select ($ac_arg1, - $ac_arg234, $ac_arg234, $ac_arg234, - $ac_arg5); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - done -done -# Provide a safe default value. -: ${ac_cv_func_select_args='int,int *,struct timeval *'} - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5 -$as_echo "$ac_cv_func_select_args" >&6; } -ac_save_IFS=$IFS; IFS=',' -set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` -IFS=$ac_save_IFS -shift - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG1 $1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG234 ($2) -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG5 ($3) -_ACEOF - -rm -f conftest* - - -for ac_func in vprintf -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -{ $as_echo "$as_me:$LINENO: checking for _doprnt" >&5 -$as_echo_n "checking for _doprnt... " >&6; } -if test "${ac_cv_func__doprnt+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define _doprnt to an innocuous variant, in case declares _doprnt. - For example, HP-UX 11i declares gettimeofday. */ -#define _doprnt innocuous__doprnt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _doprnt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef _doprnt - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _doprnt (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub__doprnt || defined __stub____doprnt -choke me -#endif - -int -main () -{ -return _doprnt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func__doprnt=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func__doprnt=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 -$as_echo "$ac_cv_func__doprnt" >&6; } -if test "x$ac_cv_func__doprnt" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DOPRNT 1 -_ACEOF - -fi - -fi -done - - - -{ $as_echo "$as_me:$LINENO: checking if alloca should be emulated by malloc" >&5 -$as_echo_n "checking if alloca should be emulated by malloc... " >&6; } -# Check whether --enable-malloc was given. -if test "${enable_malloc+set}" = set; then - enableval=$enable_malloc; usemalloc=$enableval -else - usemalloc=no -fi - -if test "$usemalloc" != no -then - -cat >>confdefs.h <<\_ACEOF -#define dUSE_MALLOC_FOR_ALLOCA 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: $usemalloc" >&5 -$as_echo "$usemalloc" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - -# Check whether --enable-ou was given. -if test "${enable_ou+set}" = set; then - enableval=$enable_ou; use_ou=$enableval -else - use_ou=no -fi - -if test x$use_ou = xyes -then - OU_NAMESPACE=odeou - - -cat >>confdefs.h <<\_ACEOF -#define _OU_NAMESPACE odeou -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define dOU_ENABLED 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define dATOMICS_ENABLED 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define dTLS_ENABLED 1 -_ACEOF - - - case "$host_os" in - cygwin* | mingw*) - targetos=_OU_TARGET_OS_WINDOWS - ;; - *qnx*) - targetos=_OU_TARGET_OS_QNX - ;; - *apple* | *darwin*) - targetos=_OU_TARGET_OS_MAC - ;; - *sunos*) - targetos=_OU_TARGET_OS_SUNOS - ;; - *aix*) - targetos=_OU_TARGET_OS_AIX - ;; - *) - targetos=_OU_TARGET_OS_GENUNIX - ;; - esac - - if test $targetos = _OU_TARGET_OS_MAC - then - MAC_OS_X_VERSION=1000 - { $as_echo "$as_me:$LINENO: checking for OSAtomicAdd32Barrier" >&5 -$as_echo_n "checking for OSAtomicAdd32Barrier... " >&6; } -if test "${ac_cv_func_OSAtomicAdd32Barrier+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define OSAtomicAdd32Barrier to an innocuous variant, in case declares OSAtomicAdd32Barrier. - For example, HP-UX 11i declares gettimeofday. */ -#define OSAtomicAdd32Barrier innocuous_OSAtomicAdd32Barrier - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char OSAtomicAdd32Barrier (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef OSAtomicAdd32Barrier - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char OSAtomicAdd32Barrier (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_OSAtomicAdd32Barrier || defined __stub___OSAtomicAdd32Barrier -choke me -#endif - -int -main () -{ -return OSAtomicAdd32Barrier (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_OSAtomicAdd32Barrier=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_OSAtomicAdd32Barrier=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_OSAtomicAdd32Barrier" >&5 -$as_echo "$ac_cv_func_OSAtomicAdd32Barrier" >&6; } -if test "x$ac_cv_func_OSAtomicAdd32Barrier" = x""yes; then - MAC_OS_X_VERSION=1040 -fi - - { $as_echo "$as_me:$LINENO: checking for OSAtomicAnd32OrigBarrier" >&5 -$as_echo_n "checking for OSAtomicAnd32OrigBarrier... " >&6; } -if test "${ac_cv_func_OSAtomicAnd32OrigBarrier+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define OSAtomicAnd32OrigBarrier to an innocuous variant, in case declares OSAtomicAnd32OrigBarrier. - For example, HP-UX 11i declares gettimeofday. */ -#define OSAtomicAnd32OrigBarrier innocuous_OSAtomicAnd32OrigBarrier - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char OSAtomicAnd32OrigBarrier (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef OSAtomicAnd32OrigBarrier - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char OSAtomicAnd32OrigBarrier (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_OSAtomicAnd32OrigBarrier || defined __stub___OSAtomicAnd32OrigBarrier -choke me -#endif - -int -main () -{ -return OSAtomicAnd32OrigBarrier (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_OSAtomicAnd32OrigBarrier=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_OSAtomicAnd32OrigBarrier=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_OSAtomicAnd32OrigBarrier" >&5 -$as_echo "$ac_cv_func_OSAtomicAnd32OrigBarrier" >&6; } -if test "x$ac_cv_func_OSAtomicAnd32OrigBarrier" = x""yes; then - MAC_OS_X_VERSION=1050 -fi - - -cat >>confdefs.h <<_ACEOF -#define MAC_OS_X_VERSION $MAC_OS_X_VERSION -_ACEOF - - fi - - if test $targetos = _OU_TARGET_OS_SUNOS - then - { $as_echo "$as_me:$LINENO: checking for atomic_inc_32_nv" >&5 -$as_echo_n "checking for atomic_inc_32_nv... " >&6; } -if test "${ac_cv_func_atomic_inc_32_nv+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define atomic_inc_32_nv to an innocuous variant, in case declares atomic_inc_32_nv. - For example, HP-UX 11i declares gettimeofday. */ -#define atomic_inc_32_nv innocuous_atomic_inc_32_nv - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char atomic_inc_32_nv (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef atomic_inc_32_nv - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char atomic_inc_32_nv (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_atomic_inc_32_nv || defined __stub___atomic_inc_32_nv -choke me -#endif - -int -main () -{ -return atomic_inc_32_nv (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_atomic_inc_32_nv=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_atomic_inc_32_nv=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_atomic_inc_32_nv" >&5 -$as_echo "$ac_cv_func_atomic_inc_32_nv" >&6; } -if test "x$ac_cv_func_atomic_inc_32_nv" = x""yes; then - : -else - targetos=_OU_TARGET_OS_GENUNIX -fi - - fi - - -cat >>confdefs.h <<_ACEOF -#define _OU_TARGET_OS $targetos -_ACEOF - -fi - - -subdirs="$subdirs ou" - - if test x$use_ou = xyes; then - ENABLE_OU_TRUE= - ENABLE_OU_FALSE='#' -else - ENABLE_OU_TRUE='#' - ENABLE_OU_FALSE= -fi - - - -# Check whether --enable-asserts was given. -if test "${enable_asserts+set}" = set; then - enableval=$enable_asserts; asserts=$enableval -else - asserts=yes -fi - -if test x$asserts = xno -then - CPPFLAGS="$CPPFLAGS -DdNODEBUG" - if test x$use_ou = xyes - then - CPPFLAGS="$CPPFLAGS -DNDEBUG" - fi -fi - - - - - - - -ac_config_files="$ac_config_files Makefile include/Makefile include/ode/Makefile include/drawstuff/Makefile ode/Makefile ode/src/Makefile ode/src/joints/Makefile drawstuff/Makefile drawstuff/src/Makefile drawstuff/dstest/Makefile ode/demo/Makefile OPCODE/Makefile OPCODE/Ice/Makefile GIMPACT/Makefile GIMPACT/include/Makefile GIMPACT/include/GIMPACT/Makefile GIMPACT/src/Makefile tests/Makefile tests/UnitTest++/Makefile tests/UnitTest++/src/Makefile tests/UnitTest++/src/Posix/Makefile tests/UnitTest++/src/Win32/Makefile ode-config ode.pc" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -if test -z "${X86_64_SYSTEM_TRUE}" && test -z "${X86_64_SYSTEM_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"X86_64_SYSTEM\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"X86_64_SYSTEM\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${OPCODE_TRUE}" && test -z "${OPCODE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"OPCODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"OPCODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${GIMPACT_TRUE}" && test -z "${GIMPACT_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"GIMPACT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"GIMPACT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${TRIMESH_TRUE}" && test -z "${TRIMESH_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"TRIMESH\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"TRIMESH\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_DRAWSTUFF_TRUE}" && test -z "${ENABLE_DRAWSTUFF_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_DRAWSTUFF\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"ENABLE_DRAWSTUFF\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${X11_TRUE}" && test -z "${X11_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"X11\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"X11\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${OSX_TRUE}" && test -z "${OSX_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"OSX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"OSX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_DEMOS_TRUE}" && test -z "${ENABLE_DEMOS_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_DEMOS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"ENABLE_DEMOS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_OU_TRUE}" && test -z "${ENABLE_OU_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_OU\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"ENABLE_OU\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by ODE $as_me 0.11.1, which was -generated by GNU Autoconf 2.63. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="`echo $ac_config_files`" -config_headers="`echo $ac_config_headers`" -config_commands="`echo $ac_config_commands`" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTION]... [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_version="\\ -ODE config.status 0.11.1 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_ld_CXX \ -hardcode_libdir_separator_CXX \ -fix_srcfile_path_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "ode/src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS ode/src/config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "include/ode/Makefile") CONFIG_FILES="$CONFIG_FILES include/ode/Makefile" ;; - "include/drawstuff/Makefile") CONFIG_FILES="$CONFIG_FILES include/drawstuff/Makefile" ;; - "ode/Makefile") CONFIG_FILES="$CONFIG_FILES ode/Makefile" ;; - "ode/src/Makefile") CONFIG_FILES="$CONFIG_FILES ode/src/Makefile" ;; - "ode/src/joints/Makefile") CONFIG_FILES="$CONFIG_FILES ode/src/joints/Makefile" ;; - "drawstuff/Makefile") CONFIG_FILES="$CONFIG_FILES drawstuff/Makefile" ;; - "drawstuff/src/Makefile") CONFIG_FILES="$CONFIG_FILES drawstuff/src/Makefile" ;; - "drawstuff/dstest/Makefile") CONFIG_FILES="$CONFIG_FILES drawstuff/dstest/Makefile" ;; - "ode/demo/Makefile") CONFIG_FILES="$CONFIG_FILES ode/demo/Makefile" ;; - "OPCODE/Makefile") CONFIG_FILES="$CONFIG_FILES OPCODE/Makefile" ;; - "OPCODE/Ice/Makefile") CONFIG_FILES="$CONFIG_FILES OPCODE/Ice/Makefile" ;; - "GIMPACT/Makefile") CONFIG_FILES="$CONFIG_FILES GIMPACT/Makefile" ;; - "GIMPACT/include/Makefile") CONFIG_FILES="$CONFIG_FILES GIMPACT/include/Makefile" ;; - "GIMPACT/include/GIMPACT/Makefile") CONFIG_FILES="$CONFIG_FILES GIMPACT/include/GIMPACT/Makefile" ;; - "GIMPACT/src/Makefile") CONFIG_FILES="$CONFIG_FILES GIMPACT/src/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/UnitTest++/Makefile") CONFIG_FILES="$CONFIG_FILES tests/UnitTest++/Makefile" ;; - "tests/UnitTest++/src/Makefile") CONFIG_FILES="$CONFIG_FILES tests/UnitTest++/src/Makefile" ;; - "tests/UnitTest++/src/Posix/Makefile") CONFIG_FILES="$CONFIG_FILES tests/UnitTest++/src/Posix/Makefile" ;; - "tests/UnitTest++/src/Win32/Makefile") CONFIG_FILES="$CONFIG_FILES tests/UnitTest++/src/Win32/Makefile" ;; - "ode-config") CONFIG_FILES="$CONFIG_FILES ode-config" ;; - "ode.pc") CONFIG_FILES="$CONFIG_FILES ode.pc" ;; - - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=' ' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files -# are listed without --file. Let's play safe and only enable the eval -# if we detect the quoting. -case $CONFIG_FILES in -*\'*) eval set x "$CONFIG_FILES" ;; -*) set x $CONFIG_FILES ;; -esac -shift -for mf -do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Assembler program. -AS=$AS - -# DLL creation program. -DLLTOOL=$DLLTOOL - -# Object dumper program. -OBJDUMP=$OBJDUMP - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - -export OU_NAMESPACE=odeou - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - -# -# CONFIG_SUBDIRS section. -# -if test "$no_recursion" != yes; then - - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. - ac_sub_configure_args= - ac_prev= - eval "set x $ac_configure_args" - shift - for ac_arg - do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case $ac_arg in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ - | --c=*) - ;; - --config-cache | -C) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - ;; - --disable-option-checking) - ;; - *) - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; - esac - done - - # Always prepend --prefix to ensure using the same prefix - # in subdir configurations. - ac_arg="--prefix=$prefix" - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" - - # Pass --silent - if test "$silent" = yes; then - ac_sub_configure_args="--silent $ac_sub_configure_args" - fi - - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" - - ac_popdir=`pwd` - for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - test -d "$srcdir/$ac_dir" || continue - - ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:$LINENO: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - cd "$ac_dir" - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f "$ac_srcdir/configure.gnu"; then - ac_sub_configure=$ac_srcdir/configure.gnu - elif test -f "$ac_srcdir/configure"; then - ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure - else - { $as_echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - # Make the cache file name correct relative to the subdirectory. - case $cache_file in - [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; - *) # Relative name. - ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; - esac - - { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} - # The eval makes quoting arguments work. - eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ - --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || - { { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 -$as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} - { (exit 1); exit 1; }; } - fi - - cd "$ac_popdir" - done -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - -chmod +x ode-config - -BUILDDIR=`pwd` - -echo "Configuration:" -echo " Build system type: $build" -echo " Host system type: $host" -echo " Use double precision: $precision" -echo " Use drawstuff: $drawstuff" -echo " Demos enabled: $enable_demos" -echo " Use OPCODE: $opcode" -echo " Use GIMPACT: $gimpact" -echo " Is target a Pentium: $pentium" -echo " Is target x86-64: $cpu64" -echo " Use old opcode trimesh collider: $old_trimesh" -echo " TLS for global data: $use_ou" -echo " Enable debug error check: $asserts" -echo " Headers will be installed in $includedir/ode" -echo " Libraries will be installed in $libdir" -echo " Building in directory $BUILDDIR" - diff -Nru ode-0.11.1/configure.ac ode-0.14/configure.ac --- ode-0.11.1/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/configure.ac 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,602 @@ +dnl AC_INIT does not take a macro as a version nr: set it separately! - Bram +AC_INIT([ODE],[0.14],[ode@ode.org]) +ODE_VERSION=0.14 +AC_SUBST(ODE_VERSION) + +# Those are instructions from the Libtool manual: +# 1. Start with version information of `0:0:0' for each libtool library. +# +# 2. Update the version information only immediately before a public +# release of your software. More frequent updates are unnecessary, +# and only guarantee that the current interface number gets larger +# faster. +# +# 3. If the library source code has changed at all since the last +# update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). +# +# 4. If any interfaces have been added, removed, or changed since the +# last update, increment CURRENT, and set REVISION to 0. +# +# 5. If any interfaces have been added since the last public release, +# then increment AGE. +# +# 6. If any interfaces have been removed since the last public release, +# then set AGE to 0. +CURRENT=6 +REVISION=0 +AGE=0 + +AC_ARG_ENABLE(version-info, + AS_HELP_STRING([--disable-version-info], + [don't encode version information in the generated library]), + version_info=$enableval, + version_info=yes) +if test x$version_info = xyes +then + ODE_VERSION_INFO="-version-info $CURRENT:$REVISION:$AGE" +else + ODE_VERSION_INFO="-avoid-version" +fi +AC_SUBST(ODE_VERSION_INFO) + + +AC_CONFIG_SRCDIR([ode/src/ode.cpp]) +AC_CONFIG_MACRO_DIR([m4]) + +AC_CANONICAL_HOST + +AM_INIT_AUTOMAKE([1.10 foreign]) +AC_CONFIG_HEADERS([ode/src/config.h]) + +dnl This is needed because we have subdirectories +AC_PROG_MAKE_SET +AC_PROG_CXX +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_CPP +AC_PROG_AWK +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MKDIR_P +LT_INIT([disable-shared win32-dll]) +AC_CHECK_TOOLS([WINDRES], [windres]) + +AC_C_BIGENDIAN +AC_C_INLINE +AC_C_VOLATILE +PKG_PROG_PKG_CONFIG + +AC_ARG_VAR([DOXYGEN], [set to doxygen binary to generate doxygen docs]) +AC_CHECK_PROGS([DOXYGEN], [doxygen]) +AM_CONDITIONAL([HAVE_DOXYGEN], [test x$DOXYGEN = xdoxygen]) + + +dnl this may NOT be the machine on which the code is going to run in, +dnl so allow users to compile programs for their target machine. +pentium=no +cpu64=no +case "$host_cpu" in + i586 | i686 | i786 ) + pentium=yes + AC_DEFINE(PENTIUM,1,[compiling for a pentium on a gcc-based platform?]) + ;; + x86_64* ) + pentium=yes + cpu64=yes + AC_DEFINE(X86_64_SYSTEM,1,[compiling for a X86_64 system on a gcc-based platform?]) + ;; +esac + +AM_CONDITIONAL(X86_64_SYSTEM, test x$cpu64 = xyes) + + + + + + +dnl check for required headers +AC_CHECK_HEADERS( [alloca.h stdio.h inttypes.h stdint.h stdlib.h math.h \ + string.h stdarg.h malloc.h float.h time.h sys/time.h \ + limits.h stddef.h]) + + +opcode=no +gimpact=no +AC_ARG_WITH(trimesh, AS_HELP_STRING([--with-trimesh=@<:@opcode|gimpact|none@:>@], + [use the specified system for trimesh support @<:@default=opcode@:>@]), + trimesh=$withval,trimesh=opcode +) +if test "$trimesh" = opcode +then + opcode=yes +fi +if test "$trimesh" = gimpact +then + gimpact=yes +fi + +AM_CONDITIONAL(OPCODE, test $opcode = yes) +AM_CONDITIONAL(GIMPACT, test $gimpact = yes) +AM_CONDITIONAL(TRIMESH, test $opcode = yes -o $gimpact = yes) + + +AC_MSG_CHECKING(if double precision is requested) +AC_ARG_ENABLE(double-precision, + AS_HELP_STRING([--enable-double-precision], + [Configure ODE to work with double precision, if not specified, single precision is used @<:@default=no@:>@]), + usedouble=$enableval,usedouble=no) +AC_MSG_RESULT([$usedouble]) +if test "$usedouble" = yes; +then + ODE_PRECISION=dDOUBLE +else + ODE_PRECISION=dSINGLE +fi +AC_SUBST(ODE_PRECISION) + + +AC_ARG_WITH([drawstuff], + AS_HELP_STRING([--with-drawstuff=X11|Win32|OSX|none], + [force a particular drawstuff implementation or disable it.[default=autodetect]]), + [drawstuff=$withval],[drawstuff=]) + +dnl Set some Platform Specific Variables +EXTRA_LIBTOOL_LDFLAGS= +case "$host_os" in + cygwin* | mingw*) + if test "x$drawstuff" = x + then + drawstuff="Win32" # if in a Windows enviroment + fi + EXTRA_LIBTOOL_LDFLAGS="-no-undefined" + ;; + *apple* | *darwin*) # For Mac OS X + if test "x$drawstuff" = x + then + drawstuff="OSX" + fi + dnl We need to use C++ compilation and linking for ode on Mac + dnl Might as well do it for all code. + CC="$CXX" + LINK="$CXXLINK" + ;; + *) + if test "x$drawstuff" = x + then + drawstuff="X11" # if anything else default to X11 + fi + ;; +esac +AC_SUBST(EXTRA_LIBTOOL_LDFLAGS) + + +dnl Set Drawstuff variables +AC_MSG_CHECKING([which drawstuff lib to build]) +AC_MSG_RESULT($drawstuff) + +if test "x$drawstuff" = "xX11" +then + # The built-in macro, X_PATH, causes too many problems, these days everyone uses Xorg, + # so we can ask pkg-config to find it for us. + PKG_CHECK_MODULES(X11, x11, [], [drawstuff="none"]) +fi + +dnl Check for OpenGL +if test "x$drawstuff" = "xOSX"; then + AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1], + [Use the Apple OpenGL framework.]) + GL_LIBS="-framework OpenGL -framework GLUT" +elif test "x$drawstuff" != "xnone"; then + have_gl_headers=yes + AC_CHECK_HEADERS(GL/gl.h GL/glu.h GL/glext.h, , + [have_gl_headers=no], + [[#ifdef WIN32 + #include + #endif + #if HAVE_GL_GL_H + #include + #endif + #if HAVE_GL_GLU_H + #include + #endif + ]]) + have_gl=no + have_glu=no + TEMP_LDFLAGS="$LDFLAGS" + AC_CHECK_LIB(GL, main, [GL_LIBS="-lGL"; have_gl=yes]) + AC_CHECK_LIB(GLU, main, [GL_LIBS="-lGLU $GL_LIBS"; have_glu=yes], , -lGL) + AC_CHECK_LIB(opengl32, main, [GL_LIBS="-lopengl32"; have_gl=yes]) + AC_CHECK_LIB(glu32, main, [GL_LIBS="-lglu32 $GL_LIBS"; have_glu=yes], , -lopengl32) + LDFLAGS="$TEMP_LDFLAGS" + if test $have_gl = no -o $have_glu = no -o $have_gl_headers = no; then + drawstuff="none" + fi +fi +AC_SUBST(GL_LIBS) + +dnl Set Conditionals +AM_CONDITIONAL(WIN32, test x$drawstuff = xWin32) +AM_CONDITIONAL(X11, test x$drawstuff = xX11) +AM_CONDITIONAL(OSX, test x$drawstuff = xOSX) +AM_CONDITIONAL(ENABLE_DRAWSTUFF, test x$drawstuff != xnone) + +dnl Check if we want to build demos +AC_MSG_CHECKING(if demos should be built) +AC_ARG_ENABLE(demos, + AS_HELP_STRING([--disable-demos], [don't build demos]), + enable_demos=$enableval,enable_demos=yes) +if test x$drawstuff = xnone -a x$enable_demos = xyes ; then + enable_demos=no + AC_MSG_RESULT($enable_demos) + AC_MSG_WARN([Demos will not be built because OpenGL doesn't seem to work. See `config.log' for details.]) +else + AC_MSG_RESULT($enable_demos) +fi + + +dnl stdc++ is required when linking C programs against ode +AC_CHECK_LIB(stdc++,main,[LIBSTDCXX="-lstdc++"],[LIBSTDCXX=]) +AC_SUBST(LIBSTDCXX) +AC_CHECK_LIB(pthread,main,[LIBS="$LIBS -lpthread"]) + + +dnl test if we will build demos +AM_CONDITIONAL(ENABLE_DEMOS, test x$enable_demos = xyes) + + +dnl Check if the user wants the old timesh collider +old_trimesh=no +AC_ARG_ENABLE([old-trimesh], AS_HELP_STRING([--enable-old-trimesh],[enable use of the old trimesh collider]), + [old_trimesh=$enableval] + ) +if test x$old_trimesh = xyes -a $trimesh = opcode; then + AC_DEFINE(dTRIMESH_OPCODE_USE_OLD_TRIMESH_TRIMESH_COLLIDER, 1, + [Use the old trimesh-trimesh collider]) +else + old_trimesh=no +fi + + +dnl Check if the user wants to profile ODE using gprof +AC_MSG_CHECKING(for gprof) +AC_ARG_ENABLE([gprof], + AS_HELP_STRING([--enable-gprof],[enable profiling with gprof]), + gprof=$enableval, + gprof=no) +if test "$gprof" != no +then + CFLAGS="-pg $CFLAGS" + CXXFLAGS="-pg $CXXFLAGS" + AC_MSG_RESULT(enabled) + AC_CHECK_LIB(gmon, main,[LIBS="$LIBS -lgmon"]) +else + AC_MSG_RESULT(no) +fi + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_INT32_T +AC_FUNC_OBSTACK +AC_TYPE_SIZE_T +AC_TYPE_UINT32_T + +dnl Check for autoscan sugested functions +AC_CHECK_LIB(m, [main]) +AC_CHECK_LIB(sunmath, [main]) +AC_CHECK_FUNCS([floor memmove memset sqrt sqrtf sinf cosf fabsf atan2f fmodf copysignf copysign snprintf vsnprintf gettimeofday isnan isnanf _isnan _isnanf __isnan __isnanf strchr strstr pthread_attr_setstacklazy clock_gettime]) +AC_FUNC_ALLOCA + +AC_ARG_ENABLE([threading-intf], + AS_HELP_STRING([--disable-threading-intf], + [disable threading interface support (external implementations may not be assigned; overrides --enable-builtin-threading-impl)] + ), + threading_intf=$enableval,threading_intf=yes) +AC_ARG_ENABLE([ou], + AS_HELP_STRING([--enable-ou], + [use TLS for global caches (allows threaded collision checks for isolated spaces)] + ), + use_ou_tls=$enableval,use_ou_tls=no) +use_ou="no" +if test x$use_ou_tls = xyes -o x$threading_intf = xyes +then + use_ou="yes" +fi +if test x$use_ou = xyes +then + OU_NAMESPACE=odeou + AC_CONFIG_COMMANDS_POST([export OU_NAMESPACE=odeou]) + AC_DEFINE([_OU_NAMESPACE],[odeou],[libou namespace for ODE]) + AC_DEFINE([dOU_ENABLED],[1],[Generic OU features are enabled]) + AC_DEFINE([dATOMICS_ENABLED],[1],[Atomic API of OU is enabled]) + if test x$use_ou_tls = xyes + then + AC_DEFINE([dTLS_ENABLED],[1],[Thread Local Storage API of OU is enabled]) + fi + + case "$host_os" in + cygwin* | mingw*) + targetos=_OU_TARGET_OS_WINDOWS + ;; + *qnx*) + targetos=_OU_TARGET_OS_QNX + ;; + *apple* | *darwin*) + targetos=_OU_TARGET_OS_MAC + ;; + *sunos*) + targetos=_OU_TARGET_OS_SUNOS + ;; + *aix*) + targetos=_OU_TARGET_OS_AIX + ;; + *) + targetos=_OU_TARGET_OS_GENUNIX + ;; + esac + + if test $targetos = _OU_TARGET_OS_MAC + then + MAC_OS_X_VERSION=1000 + AC_CHECK_FUNC([OSAtomicAdd32Barrier], [MAC_OS_X_VERSION=1040]) + AC_CHECK_FUNC([OSAtomicAnd32OrigBarrier], [MAC_OS_X_VERSION=1050]) + AC_DEFINE_UNQUOTED(MAC_OS_X_VERSION, $MAC_OS_X_VERSION, [Mac OS X version setting for OU Library]) + fi + + if test $targetos = _OU_TARGET_OS_SUNOS + then + AC_CHECK_FUNC(atomic_inc_32_nv, [], + [targetos=_OU_TARGET_OS_GENUNIX]) + fi + + AC_DEFINE_UNQUOTED(_OU_TARGET_OS, $targetos, [Target OS setting for OU Library]) +fi +AC_CONFIG_SUBDIRS([ou]) +AM_CONDITIONAL(ENABLE_OU, test x$use_ou = xyes) + +if test x$threading_intf = xyes +then + AC_ARG_ENABLE([builtin-threading-impl], + AS_HELP_STRING([--enable-builtin-threading-impl], + [include built-in multithreaded threading implementation (still must be created and assigned to be used)] + ), + use_builtin_threading_impl=$enableval,use_builtin_threading_impl=no) + if test x$use_builtin_threading_impl = xyes + then + AC_DEFINE([dBUILTIN_THREADING_IMPL_ENABLED],[1],[Built-in multithreaded threading implementation included]) + fi +else + AC_DEFINE([dTHREADING_INTF_DISABLED],[1],[Threading interface is disabled]) + use_builtin_threading_impl=no +fi + +col_cylinder_cylinder=none +col_box_cylinder=default +col_capsule_cylinder=none +col_convex_box=none +col_convex_capsule=none +col_convex_cylinder=none +col_convex_sphere=default +col_convex_convex=default + + +use_libccd=no +libccd_all=no +AC_ARG_ENABLE(libccd, AS_HELP_STRING([--enable-libccd], + [enable all libccd colliders (except box-cylinder)]), + libccd_all=$enableval) +if test x$libccd_all = xyes +then + col_cylinder_cylinder=libccd + col_capsule_cylinder=libccd + col_convex_box=libccd + col_convex_capsule=libccd + col_convex_cylinder=libccd + col_convex_sphere=libccd + col_convex_convex=libccd + use_libccd=yes +fi + + +AC_ARG_WITH([cylinder-cylinder], AS_HELP_STRING([--with-cylinder-cylinder=@<:@none,libccd@:>@], [use specific collider for cylinder-cylinder]), + col_cylinder_cylinder=$withval) + +AC_ARG_WITH([box-cylinder], + AS_HELP_STRING([--with-box-cylinder=@<:@default,libccd@:>@], [use specific collider for box-cylinder]), + col_box_cylinder=$withval) + +AC_ARG_WITH([capsule-cylinder], AS_HELP_STRING([--with-capsule-cylinder=@<:@none,libccd@:>@], [use specific collider for capsule-cylinder]), + col_capsule_cylinder=$withval) + +AC_ARG_WITH([convex-box], AS_HELP_STRING([--with-convex-box=@<:@none,libccd@:>@], [use specific collider for convex-box]), + col_convex_box=$withval) + +AC_ARG_WITH([convex-capsule], AS_HELP_STRING([--with-convex-capsule=@<:@none,libccd@:>@], [use specific collider for convex-capsule]), + col_convex_capsule=$withval) + +AC_ARG_WITH([convex-cylinder], AS_HELP_STRING([--with-convex-cylinder=@<:@none,libccd@:>@], [use specific collider for convex-cylinder]), + col_convex_cylinder=$withval) + +AC_ARG_WITH([convex-sphere], AS_HELP_STRING([--with-convex-sphere=@<:@default,libccd@:>@], [use specific collider for convex-sphere]), + col_convex_sphere=$withval) + +AC_ARG_WITH([convex-convex], AS_HELP_STRING([--with-convex-convex=@<:@default,libccd@:>@], [use specific collider for convex-convex]), + col_convex_convex=$withval) + +if test x$col_cylinder_cylinder = xlibccd -o \ + x$col_box_cylinder = xlibccd -o \ + x$col_capsule_cylinder = xlibccd -o \ + x$col_convex_box = xlibccd -o \ + x$col_convex_capsule = libccd -o \ + x$col_convex_cylinder = xlibccd -o \ + x$col_convex_sphere = libccd -o \ + x$col_convex_convex = libccd +then + use_libccd=yes +fi + + +libccd_source=internal + +AC_ARG_WITH(libccd, + [AS_HELP_STRING([--with-libccd=@<:@internal|system@:>@], + [use the specified libccd @<:@default=system@:>@])], + [libccd_source=$withval], + [libccd_source=system]) + +if test x$use_libccd = xyes +then + if test x$libccd_source = xsystem + then + PKG_CHECK_MODULES(CCD, ccd, ,[libccd_source=internal]) + fi +fi + +if test x$use_libccd = xyes +then + if test x$libccd_source = xinternal + then + AC_CONFIG_SUBDIRS([libccd]) + fi +fi + +AM_CONDITIONAL(LIBCCD, test x$use_libccd != xno) +AM_CONDITIONAL(LIBCCD_INTERNAL, test x$libccd_source = xinternal) +AM_CONDITIONAL(LIBCCD_BOX_CYL, test x$col_box_cylinder = xlibccd) +AM_CONDITIONAL(LIBCCD_CYL_CYL, test x$col_cylinder_cylinder = xlibccd) +AM_CONDITIONAL(LIBCCD_CAP_CYL, test x$col_capsule_cylinder = xlibccd) +AM_CONDITIONAL(LIBCCD_CONVEX_BOX, test x$col_convex_box = xlibccd) +AM_CONDITIONAL(LIBCCD_CONVEX_CAP, test x$col_convex_capsule = xlibccd) +AM_CONDITIONAL(LIBCCD_CONVEX_CYL, test x$col_convex_cylinder = xlibccd) +AM_CONDITIONAL(LIBCCD_CONVEX_SPHERE, test x$col_convex_sphere = xlibccd) +AM_CONDITIONAL(LIBCCD_CONVEX_CONVEX, test x$col_convex_convex = xlibccd) + + + +AC_ARG_ENABLE([asserts], + AS_HELP_STRING([--disable-asserts], + [disables debug error checking]), + asserts=$enableval,asserts=yes) +if test x$asserts = xno +then + CPPFLAGS="$CPPFLAGS -DdNODEBUG" + if test x$use_ou = xyes + then + CPPFLAGS="$CPPFLAGS -DNDEBUG" + fi +fi + + +dnl include found system headers into config.h +AH_TOP([ +#ifndef ODE_CONFIG_H +#define ODE_CONFIG_H +]) +AH_BOTTOM([ + +#ifdef HAVE_ALLOCA_H +#include +#endif +#ifdef HAVE_MALLOC_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif + +/* an integer type that we can safely cast a pointer to and + * from without loss of bits. + */ +typedef uintptr_t intP; + + +#ifdef dSINGLE + #define dEpsilon FLT_EPSILON +#else + #define dEpsilon DBL_EPSILON +#endif + + +#include "typedefs.h" + + +#endif /* #define ODE_CONFIG_H */ +]) + +dnl Finally write our Makefiles +AC_CONFIG_FILES([ + Makefile + drawstuff/Makefile + drawstuff/src/Makefile + drawstuff/dstest/Makefile + include/Makefile + include/drawstuff/Makefile + include/ode/Makefile + include/ode/version.h + include/ode/precision.h + ode/Makefile + ode/doc/Doxyfile + ode/doc/Makefile + ode/src/Makefile + ode/src/joints/Makefile + ode/demo/Makefile + OPCODE/Makefile + OPCODE/Ice/Makefile + GIMPACT/Makefile + GIMPACT/include/Makefile + GIMPACT/include/GIMPACT/Makefile + GIMPACT/src/Makefile + tests/Makefile + tests/joints/Makefile + tests/UnitTest++/Makefile + tests/UnitTest++/src/Makefile + tests/UnitTest++/src/Posix/Makefile + tests/UnitTest++/src/Win32/Makefile + ode-config + ode.pc + ]) +AC_OUTPUT + +chmod +x ode-config + +BUILDDIR=`pwd` + +dnl Print some useful information +echo "Configuration:" +echo " Build system type: $build" +echo " Host system type: $host" +echo " Use double precision: $usedouble" +echo " Use drawstuff: $drawstuff" +echo " Demos enabled: $enable_demos" +echo " Use OPCODE: $opcode" +echo " Use GIMPACT: $gimpact" +echo " Use libccd: $use_libccd" + +if test x$use_libccd = xyes +then +echo " libccd source: $libccd_source" +fi + +echo " Custom colliders:" +echo " cylinder-cylinder: $col_cylinder_cylinder" +echo " box-cylinder: $col_box_cylinder" +echo " capsule-cylinder: $col_capsule_cylinder" +echo " convex-box: $col_convex_box" +echo " convex-capsule: $col_convex_capsule" +echo " convex-cylinder: $col_convex_cylinder" +echo " convex-sphere: $col_convex_sphere" +echo " convex-convex: $col_convex_convex" +echo " Is target a Pentium: $pentium" +echo " Is target x86-64: $cpu64" +echo " Use old opcode trimesh collider: $old_trimesh" +echo " TLS for global caches: $use_ou_tls" +echo " Threading intf enabled: $threading_intf" +echo " Built-in threading included: $use_builtin_threading_impl" +echo " Enable debug error check: $asserts" +echo " Headers will be installed in $includedir/ode" +echo " Libraries will be installed in $libdir" +echo " Building in directory $BUILDDIR" + diff -Nru ode-0.11.1/configure.in ode-0.14/configure.in --- ode-0.11.1/configure.in 2009-05-24 17:35:26.000000000 +0000 +++ ode-0.14/configure.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,457 +0,0 @@ -dnl AC_INIT does not take a macro as a version nr: set it separately! - Bram -AC_INIT([ODE],[0.11.1],[ode@ode.org]) -# AC_CONFIG_SRCDIR([ode/src/ode.cpp]) -ODE_RELEASE=0.11.1 -AC_SUBST(ODE_RELEASE) - -# Those are instructions from the Libtool manual: -# 1. Start with version information of `0:0:0' for each libtool library. -# -# 2. Update the version information only immediately before a public -# release of your software. More frequent updates are unnecessary, -# and only guarantee that the current interface number gets larger -# faster. -# -# 3. If the library source code has changed at all since the last -# update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). -# -# 4. If any interfaces have been added, removed, or changed since the -# last update, increment CURRENT, and set REVISION to 0. -# -# 5. If any interfaces have been added since the last public release, -# then increment AGE. -# -# 6. If any interfaces have been removed since the last public release, -# then set AGE to 0. -CURRENT=2 -REVISION=1 -AGE=1 - -AC_ARG_ENABLE(version-info, - AS_HELP_STRING([--disable-version-info], - [don't encode version information in the generated library]), - version_info=$enableval, - version_info=yes) -if test x$version_info = xyes -then - ODE_VERSION_INFO="-version-info $CURRENT:$REVISION:$AGE" -else - ODE_VERSION_INFO="-avoid-version" -fi -AC_SUBST(ODE_VERSION_INFO) - - - -AC_CANONICAL_HOST - -AM_INIT_AUTOMAKE(1.10 foreign) -AC_CONFIG_HEADERS([ode/src/config.h]) - -dnl This is needed because we have subdirectories -AC_PROG_MAKE_SET -AC_PROG_CXX -AC_PROG_CC -AM_PROG_CC_C_O -AC_PROG_CPP -AC_PROG_AWK -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MKDIR_P -AC_DISABLE_SHARED -AC_LIBTOOL_WIN32_DLL -AC_PROG_LIBTOOL -AC_CHECK_TOOLS([WINDRES], [windres]) - -AC_C_BIGENDIAN -AC_C_INLINE -AC_C_VOLATILE -AC_HEADER_STDBOOL -AC_TYPE_SIZE_T - -dnl Check if we want to build demos -AC_MSG_CHECKING(if demos should be built) -AC_ARG_ENABLE(demos, - AS_HELP_STRING([--disable-demos], [don't build demos]), - enable_demos=$enableval,enable_demos=yes) -AC_MSG_RESULT($enable_demos) - - - -dnl this may NOT be the machine on which the code is going to run in, -dnl so allow users to compile programs for their target machine. -pentium=no -cpu64=no -case "$host_cpu" in - i586 | i686 | i786 ) - pentium=yes - AC_DEFINE(PENTIUM,1,[compiling for a pentium on a gcc-based platform?]) - ;; - x86_64* ) - pentium=yes - cpu64=yes - AC_DEFINE(X86_64_SYSTEM,1,[compiling for a X86_64 system on a gcc-based platform?]) - ;; -esac - -AM_CONDITIONAL(X86_64_SYSTEM, test x$cpu64 = xyes) - - - - - - -dnl check for required headers -AC_CHECK_HEADERS( alloca.h stdio.h stdint.h stdlib.h math.h string.h stdarg.h malloc.h float.h time.h sys/time.h ) - - -opcode=no -gimpact=no -AC_ARG_WITH(trimesh, AS_HELP_STRING([--with-trimesh=[opcode|gimpact|none]], - [use the specified system for trimesh support @<:@default=opcode@:>@]), - trimesh=$withval,trimesh=opcode -) -if test "$trimesh" = opcode -then - opcode=yes -fi -if test "$trimesh" = gimpact -then - gimpact=yes -fi - -AM_CONDITIONAL(OPCODE, test $opcode = yes) -AM_CONDITIONAL(GIMPACT, test $gimpact = yes) -AM_CONDITIONAL(TRIMESH, test $opcode = yes -o $gimpact = yes) - - -AC_MSG_CHECKING(if double precision is requested) -AC_ARG_ENABLE(double-precision, - AS_HELP_STRING([--enable-double-precision], - [Configure ODE to work with double precision, if not specified, single precision is used] - ), - precision=$enableval,precision=no) -AC_MSG_RESULT([$precision]) -if test "$precision" = yes; -then - ODE_PRECISION=-DdDOUBLE -else - ODE_PRECISION=-DdSINGLE -fi - -CPPFLAGS+=" $ODE_PRECISION" -AC_SUBST(ODE_PRECISION) - - -AC_ARG_WITH([drawstuff],AS_HELP_STRING([--with-drawstuff=X11|Win32|OSX|none],[force a particular drawstuff implementation or disable it.]), - [drawstuff=$withval],[drawstuff=]) - -dnl Set some Platform Specific Variables -EXTRA_LIBTOOL_LDFLAGS= -case "$host_os" in - cygwin* | mingw*) - if test x"$drawstuff" = x - then - drawstuff="Win32" # if in a Windows enviroment - fi - EXTRA_LIBTOOL_LDFLAGS="-no-undefined" - ;; - *apple* | *darwin*) # For Mac OS X - if test x"$drawstuff" = x - then - drawstuff="OSX" - fi - dnl We need to use C++ compilation and linking for ode on Mac - dnl Might as well do it for all code. - CC="$CXX" - LINK="$CXXLINK" - ;; - *) - if test x"$drawstuff" = x - then - drawstuff="X11" # if anything else default to X11 - fi - ;; -esac -AC_SUBST(EXTRA_LIBTOOL_LDFLAGS) -AM_CONDITIONAL(ENABLE_DRAWSTUFF, test x$drawstuff != xnone) - - -dnl Set Conditionals -AM_CONDITIONAL(WIN32, test x$drawstuff = xWin32) -AM_CONDITIONAL(X11, test x$drawstuff = xX11) -AM_CONDITIONAL(OSX, test x$drawstuff = xOSX) -dnl Set Drawstuff variables -AC_MSG_CHECKING(which drawstuff lib to build) -AC_MSG_RESULT($drawstuff) - -if test "x$drawstuff" = "xX11" -then - AC_PATH_XTRA -fi - -dnl Check for OpenGL -if test "x$drawstuff" = "xOSX"; then - AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1], - [Use the Apple OpenGL framework.]) - GL_LIBS="-framework OpenGL -framework Carbon -framework AGL" -else - have_gl_headers=yes - AC_CHECK_HEADERS(GL/gl.h GL/glu.h GL/glext.h, , - [have_gl_headers=no], - [[#ifdef WIN32 - #include - #endif - #if HAVE_GL_GL_H - #include - #endif - #if HAVE_GL_GLU_H - #include - #endif - ]]) - have_gl=no - have_glu=no - TEMP_LDFLAGS="$LDFLAGS" - AC_CHECK_LIB(GL, main, [GL_LIBS="-lGL"; have_gl=yes]) - AC_CHECK_LIB(GLU, main, [GL_LIBS="-lGLU $GL_LIBS"; have_glu=yes], , -lGL) - AC_CHECK_LIB(opengl32, main, [GL_LIBS="-lopengl32"; have_gl=yes]) - AC_CHECK_LIB(glu32, main, [GL_LIBS="-lglu32 $GL_LIBS"; have_glu=yes], , -lopengl32) - LDFLAGS="$TEMP_LDFLAGS" - if test $have_gl = no -o $have_glu = no -o $have_gl_headers = no; then - if test x$enable_demos = xyes; then - AC_MSG_WARN([Demos will not be built because OpenGL doesn't seem to work. See `config.log' for details.]) - fi - enable_demos=no - fi -fi -AC_SUBST(GL_LIBS) - - -dnl stdc++ is required when linking C programs against ode -AC_CHECK_LIB(stdc++,main,[LIBSTDCXX="-lstdc++"],[LIBSTDCXX=]) -AC_SUBST(LIBSTDCXX) -AC_CHECK_LIB(pthread,main,[LIBS="$LIBS -lpthread"]) - - -dnl test if we will build demos -AM_CONDITIONAL(ENABLE_DEMOS, test x$enable_demos = xyes) - - -dnl Check if the user wants the old timesh collider -old_trimesh=no -AC_ARG_ENABLE([old-trimesh], AS_HELP_STRING([--enable-old-trimesh],[enable use of the old trimesh collider]), - [old_trimesh=$enableval] - ) -if test x$old_trimesh = xyes -a $trimesh = opcode; then - AC_DEFINE(dTRIMESH_OPCODE_USE_OLD_TRIMESH_TRIMESH_COLLIDER, 1, - [Use the old trimesh-trimesh collider]) -else - old_trimesh=no -fi - - -dnl Check if the user wants to profile ODE using gprof -AC_MSG_CHECKING(for gprof) -AC_ARG_ENABLE([gprof], - AS_HELP_STRING([--enable-gprof],[enable profiling with gprof]), - gprof=$enableval, - gprof=no) -if test "$gprof" != no -then - CFLAGS="-pg $CFLAGS" - CXXFLAGS="-pg $CXXFLAGS" - AC_MSG_RESULT(enabled) - AC_CHECK_LIB(gmon, main,[LIBS="$LIBS -lgmon"]) -else - AC_MSG_RESULT(no) -fi - -dnl Check for autoscan sugested functions -AC_CHECK_LIB(m, [main]) -AC_CHECK_LIB(sunmath, [main]) -AC_CHECK_FUNCS([floor memmove memset select sqrt sqrtf sinf cosf fabsf atan2f fmodf copysignf copysign snprintf vsnprintf gettimeofday isnan isnanf _isnan _isnanf __isnan __isnanf]) -AC_FUNC_ALLOCA -AC_FUNC_MALLOC -AC_FUNC_OBSTACK -AC_FUNC_REALLOC -AC_FUNC_SELECT_ARGTYPES -AC_FUNC_VPRINTF - -AC_MSG_CHECKING(if alloca should be emulated by malloc) -AC_ARG_ENABLE([malloc], - AS_HELP_STRING([--enable-malloc], - [use malloc to emulate alloca (more portable but slower)] - ), - usemalloc=$enableval, usemalloc=no) -if test "$usemalloc" != no -then - AC_DEFINE([dUSE_MALLOC_FOR_ALLOCA],[1],[use malloc() instead of alloca()]) - AC_MSG_RESULT($usemalloc) -else - AC_MSG_RESULT(no) -fi - -AC_ARG_ENABLE([ou], - AS_HELP_STRING([--enable-ou], - [EXPERIMENTAL: use TLS for global variables to allow for running ODE in multiple threads simultaneously] - ), - use_ou=$enableval,use_ou=no) -if test x$use_ou = xyes -then - OU_NAMESPACE=odeou - AC_CONFIG_COMMANDS_POST([export OU_NAMESPACE=odeou]) - AC_DEFINE([_OU_NAMESPACE],[odeou],[libou namespace for ODE]) - AC_DEFINE([dOU_ENABLED],[1],[Generic OU features are enabled]) - AC_DEFINE([dATOMICS_ENABLED],[1],[Atomic API of OU is enabled]) - AC_DEFINE([dTLS_ENABLED],[1],[Thread Local Storage API of OU is enabled]) - - case "$host_os" in - cygwin* | mingw*) - targetos=_OU_TARGET_OS_WINDOWS - ;; - *qnx*) - targetos=_OU_TARGET_OS_QNX - ;; - *apple* | *darwin*) - targetos=_OU_TARGET_OS_MAC - ;; - *sunos*) - targetos=_OU_TARGET_OS_SUNOS - ;; - *aix*) - targetos=_OU_TARGET_OS_AIX - ;; - *) - targetos=_OU_TARGET_OS_GENUNIX - ;; - esac - - if test $targetos = _OU_TARGET_OS_MAC - then - MAC_OS_X_VERSION=1000 - AC_CHECK_FUNC([OSAtomicAdd32Barrier], [MAC_OS_X_VERSION=1040]) - AC_CHECK_FUNC([OSAtomicAnd32OrigBarrier], [MAC_OS_X_VERSION=1050]) - AC_DEFINE_UNQUOTED(MAC_OS_X_VERSION, $MAC_OS_X_VERSION, [Mac OS X version setting for OU Library]) - fi - - if test $targetos = _OU_TARGET_OS_SUNOS - then - AC_CHECK_FUNC(atomic_inc_32_nv, [], - [targetos=_OU_TARGET_OS_GENUNIX]) - fi - - AC_DEFINE_UNQUOTED(_OU_TARGET_OS, $targetos, [Target OS setting for OU Library]) -fi -AC_CONFIG_SUBDIRS([ou]) -AM_CONDITIONAL(ENABLE_OU, test x$use_ou = xyes) - - -AC_ARG_ENABLE([asserts], - AS_HELP_STRING([--disable-asserts], - [disables debug error checking]), - asserts=$enableval,asserts=yes) -if test x$asserts = xno -then - CPPFLAGS="$CPPFLAGS -DdNODEBUG" - if test x$use_ou = xyes - then - CPPFLAGS="$CPPFLAGS -DNDEBUG" - fi -fi - - -dnl include found system headers into config.h -AH_TOP([ -#ifndef ODE_CONFIG_H -#define ODE_CONFIG_H -]) -AH_BOTTOM([ - -#ifdef HAVE_ALLOCA_H -#include -#endif -#ifdef HAVE_MALLOC_H -#include -#endif -#ifdef HAVE_STDINT_H -#include -#endif - -/* an integer type that we can safely cast a pointer to and - * from without loss of bits. - */ -typedef uintptr_t intP; - - -// Use the error-checking memory allocation system. Because this system uses heap -// (malloc) instead of stack (alloca), it is slower. However, it allows you to -// simulate larger scenes, as well as handle out-of-memory errors in a somewhat -// graceful manner - -#ifdef dUSE_MALLOC_FOR_ALLOCA -enum { - d_MEMORY_OK = 0, /* no memory errors */ - d_MEMORY_OUT_OF_MEMORY /* malloc failed due to out of memory error */ -}; -#endif - -#ifdef dSINGLE - #define dEpsilon FLT_EPSILON -#else - #define dEpsilon DBL_EPSILON -#endif - - -#endif /* #define ODE_CONFIG_H */ -]) - -dnl Finally write our Makefiles -AC_CONFIG_FILES([ - Makefile - include/Makefile - include/ode/Makefile - include/drawstuff/Makefile - ode/Makefile - ode/src/Makefile - ode/src/joints/Makefile - drawstuff/Makefile - drawstuff/src/Makefile - drawstuff/dstest/Makefile - ode/demo/Makefile - OPCODE/Makefile - OPCODE/Ice/Makefile - GIMPACT/Makefile - GIMPACT/include/Makefile - GIMPACT/include/GIMPACT/Makefile - GIMPACT/src/Makefile - tests/Makefile - tests/UnitTest++/Makefile - tests/UnitTest++/src/Makefile - tests/UnitTest++/src/Posix/Makefile - tests/UnitTest++/src/Win32/Makefile - ode-config - ode.pc - ]) -AC_OUTPUT - -chmod +x ode-config - -BUILDDIR=`pwd` - -dnl Print some useful information -echo "Configuration:" -echo " Build system type: $build" -echo " Host system type: $host" -echo " Use double precision: $precision" -echo " Use drawstuff: $drawstuff" -echo " Demos enabled: $enable_demos" -echo " Use OPCODE: $opcode" -echo " Use GIMPACT: $gimpact" -echo " Is target a Pentium: $pentium" -echo " Is target x86-64: $cpu64" -echo " Use old opcode trimesh collider: $old_trimesh" -echo " TLS for global data: $use_ou" -echo " Enable debug error check: $asserts" -echo " Headers will be installed in $includedir/ode" -echo " Libraries will be installed in $libdir" -echo " Building in directory $BUILDDIR" - diff -Nru ode-0.11.1/contrib/BreakableJoints/common.h ode-0.14/contrib/BreakableJoints/common.h --- ode-0.11.1/contrib/BreakableJoints/common.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/common.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,337 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +#ifndef _ODE_COMMON_H_ +#define _ODE_COMMON_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/* configuration stuff */ + +/* the efficient alignment. most platforms align data structures to some + * number of bytes, but this is not always the most efficient alignment. + * for example, many x86 compilers align to 4 bytes, but on a pentium it + * is important to align doubles to 8 byte boundaries (for speed), and + * the 4 floats in a SIMD register to 16 byte boundaries. many other + * platforms have similar behavior. setting a larger alignment can waste + * a (very) small amount of memory. NOTE: this number must be a power of + * two. this is set to 16 by default. + */ +#define EFFICIENT_ALIGNMENT 16 + + +/* constants */ + +/* pi and 1/sqrt(2) are defined here if necessary because they don't get + * defined in on some platforms (like MS-Windows) + */ + +#ifndef M_PI +#define M_PI REAL(3.1415926535897932384626433832795029) +#endif +#ifndef M_SQRT1_2 +#define M_SQRT1_2 REAL(0.7071067811865475244008443621048490) +#endif + + +/* debugging: + * IASSERT is an internal assertion, i.e. a consistency check. if it fails + * we want to know where. + * UASSERT is a user assertion, i.e. if it fails a nice error message + * should be printed for the user. + * AASSERT is an arguments assertion, i.e. if it fails "bad argument(s)" + * is printed. + * DEBUGMSG just prints out a message + */ + +#ifndef dNODEBUG +#ifdef __GNUC__ +#define dIASSERT(a) if (!(a)) dDebug (d_ERR_IASSERT, \ + "assertion \"" #a "\" failed in %s() [%s]",__FUNCTION__,__FILE__); +#define dUASSERT(a,msg) if (!(a)) dDebug (d_ERR_UASSERT, \ + msg " in %s()", __FUNCTION__); +#define dDEBUGMSG(msg) dMessage (d_ERR_UASSERT, \ + msg " in %s()", __FUNCTION__); +#else +#define dIASSERT(a) if (!(a)) dDebug (d_ERR_IASSERT, \ + "assertion \"" #a "\" failed in %s:%d",__FILE__,__LINE__); +#define dUASSERT(a,msg) if (!(a)) dDebug (d_ERR_UASSERT, \ + msg " (%s:%d)", __FILE__,__LINE__); +#define dDEBUGMSG(msg) dMessage (d_ERR_UASSERT, \ + msg " (%s:%d)", __FILE__,__LINE__); +#endif +#else +#define dIASSERT(a) ; +#define dUASSERT(a,msg) ; +#define dDEBUGMSG(msg) ; +#endif +#define dAASSERT(a) dUASSERT(a,"Bad argument(s)") + +/* floating point data type, vector, matrix and quaternion types */ + +#if defined(dSINGLE) +typedef float dReal; +#elif defined(dDOUBLE) +typedef double dReal; +#else +#error You must #define dSINGLE or dDOUBLE +#endif + + +/* round an integer up to a multiple of 4, except that 0 and 1 are unmodified + * (used to compute matrix leading dimensions) + */ +#define dPAD(a) (((a) > 1) ? ((((a)-1)|3)+1) : (a)) + +/* these types are mainly just used in headers */ +typedef dReal dVector3[4]; +typedef dReal dVector4[4]; +typedef dReal dMatrix3[4*3]; +typedef dReal dMatrix4[4*4]; +typedef dReal dMatrix6[8*6]; +typedef dReal dQuaternion[4]; + + +/* precision dependent scalar math functions */ + +#if defined(dSINGLE) + +#define REAL(x) (x ## f) /* form a constant */ +#define dRecip(x) ((float)(1.0f/(x))) /* reciprocal */ +#define dSqrt(x) ((float)sqrt(x)) /* square root */ +#define dRecipSqrt(x) ((float)(1.0f/sqrt(x))) /* reciprocal square root */ +#define dSin(x) ((float)sin(x)) /* sine */ +#define dCos(x) ((float)cos(x)) /* cosine */ +#define dFabs(x) ((float)fabs(x)) /* absolute value */ +#define dAtan2(y,x) ((float)atan2((y),(x))) /* arc tangent with 2 args */ + +#elif defined(dDOUBLE) + +#define REAL(x) (x) +#define dRecip(x) (1.0/(x)) +#define dSqrt(x) sqrt(x) +#define dRecipSqrt(x) (1.0/sqrt(x)) +#define dSin(x) sin(x) +#define dCos(x) cos(x) +#define dFabs(x) fabs(x) +#define dAtan2(y,x) atan2((y),(x)) + +#else +#error You must #define dSINGLE or dDOUBLE +#endif + + +/* utility */ + + +/* round something up to be a multiple of the EFFICIENT_ALIGNMENT */ + +#define dEFFICIENT_SIZE(x) ((((x)-1)|(EFFICIENT_ALIGNMENT-1))+1) + + +/* alloca aligned to the EFFICIENT_ALIGNMENT. note that this can waste + * up to 15 bytes per allocation, depending on what alloca() returns. + */ + +#define dALLOCA16(n) \ + ((char*)dEFFICIENT_SIZE(((int)(alloca((n)+(EFFICIENT_ALIGNMENT-1)))))) + + +/* internal object types (all prefixed with `dx') */ + +struct dxWorld; /* dynamics world */ +struct dxSpace; /* collision space */ +struct dxBody; /* rigid body (dynamics object) */ +struct dxGeom; /* geometry (collision object) */ +struct dxJoint; +struct dxJointNode; +struct dxJointGroup; + +typedef struct dxWorld *dWorldID; +typedef struct dxSpace *dSpaceID; +typedef struct dxBody *dBodyID; +typedef struct dxGeom *dGeomID; +typedef struct dxJoint *dJointID; +typedef struct dxJointGroup *dJointGroupID; + + +/* error numbers */ + +enum { + d_ERR_UNKNOWN = 0, /* unknown error */ + d_ERR_IASSERT, /* internal assertion failed */ + d_ERR_UASSERT, /* user assertion failed */ + d_ERR_LCP /* user assertion failed */ +}; + + +/* joint type numbers */ + +enum { + dJointTypeNone = 0, /* or "unknown" */ + dJointTypeBall, + dJointTypeHinge, + dJointTypeSlider, + dJointTypeContact, + dJointTypeUniversal, + dJointTypeHinge2, + dJointTypeFixed, + dJointTypeNull, + dJointTypeAMotor +}; + +/******************** breakable joint contribution ***********************/ +/* joint break callback function */ +typedef void dJointBreakCallback (dJointID joint); + +/* joint break modes */ +enum { + // if this flag is set, the joint wil break + dJOINT_BROKEN = 0x0001, + // if this flag is set, the joint wil be deleted when it breaks + dJOINT_DELETE_ON_BREAK = 0x0002, + // if this flag is set, the joint can break at a certain force on body 1 + dJOINT_BREAK_AT_B1_FORCE = 0x0004, + // if this flag is set, the joint can break at a certain torque on body 1 + dJOINT_BREAK_AT_B1_TORQUE = 0x0008, + // if this flag is set, the joint can break at a certain force on body 2 + dJOINT_BREAK_AT_B2_FORCE = 0x0010, + // if this flag is set, the joint can break at a certain torque on body 2 + dJOINT_BREAK_AT_B2_TORQUE = 0x0020 +}; +/*************************************************************************/ + +/* an alternative way of setting joint parameters, using joint parameter + * structures and member constants. we don't actually do this yet. + */ + +/* +typedef struct dLimot { + int mode; + dReal lostop, histop; + dReal vel, fmax; + dReal fudge_factor; + dReal bounce, soft; + dReal suspension_erp, suspension_cfm; +} dLimot; + +enum { + dLimotLoStop = 0x0001, + dLimotHiStop = 0x0002, + dLimotVel = 0x0004, + dLimotFMax = 0x0008, + dLimotFudgeFactor = 0x0010, + dLimotBounce = 0x0020, + dLimotSoft = 0x0040 +}; +*/ + + +/* standard joint parameter names. why are these here? - because we don't want + * to include all the joint function definitions in joint.cpp. hmmmm. + * MSVC complains if we call D_ALL_PARAM_NAMES_X with a blank second argument, + * which is why we have the D_ALL_PARAM_NAMES macro as well. please copy and + * paste between these two. + */ + +#define D_ALL_PARAM_NAMES(start) \ + /* parameters for limits and motors */ \ + dParamLoStop = start, \ + dParamHiStop, \ + dParamVel, \ + dParamFMax, \ + dParamFudgeFactor, \ + dParamBounce, \ + dParamCFM, \ + dParamStopERP, \ + dParamStopCFM, \ + /* parameters for suspension */ \ + dParamSuspensionERP, \ + dParamSuspensionCFM, + +#define D_ALL_PARAM_NAMES_X(start,x) \ + /* parameters for limits and motors */ \ + dParamLoStop ## x = start, \ + dParamHiStop ## x, \ + dParamVel ## x, \ + dParamFMax ## x, \ + dParamFudgeFactor ## x, \ + dParamBounce ## x, \ + dParamCFM ## x, \ + dParamStopERP ## x, \ + dParamStopCFM ## x, \ + /* parameters for suspension */ \ + dParamSuspensionERP ## x, \ + dParamSuspensionCFM ## x, + +enum { + D_ALL_PARAM_NAMES(0) + D_ALL_PARAM_NAMES_X(0x100,2) + D_ALL_PARAM_NAMES_X(0x200,3) + + /* add a multiple of this constant to the basic parameter numbers to get + * the parameters for the second, third etc axes. + */ + dParamGroup=0x100 +}; + + +/* angular motor mode numbers */ + +enum{ + dAMotorUser = 0, + dAMotorEuler = 1 +}; + + +/* joint force feedback information */ + +typedef struct dJointFeedback { + dVector3 f1; /* force applied to body 1 */ + dVector3 t1; /* torque applied to body 1 */ + dVector3 f2; /* force applied to body 2 */ + dVector3 t2; /* torque applied to body 2 */ +} dJointFeedback; + + +/* private functions that must be implemented by the collision library: + * (1) indicate that a geom has moved, (2) get the next geom in a body list. + * these functions are called whenever the position of geoms connected to a + * body have changed, e.g. with dBodySetPosition(), dBodySetRotation(), or + * when the ODE step function updates the body state. + */ + +void dGeomMoved (dGeomID); +dGeomID dGeomGetBodyNext (dGeomID); + + +#ifdef __cplusplus +} +#endif + +#endif diff -Nru ode-0.11.1/contrib/BreakableJoints/diff/common.h.diff ode-0.14/contrib/BreakableJoints/diff/common.h.diff --- ode-0.11.1/contrib/BreakableJoints/diff/common.h.diff 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/diff/common.h.diff 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,21 @@ +208,227d207 +< /******************** breakable joint contribution ***********************/ +< /* joint break callback function */ +< typedef void dJointBreakCallback (dJointID joint); +< +< /* joint break modes */ +< enum { +< // if this flag is set, the joint wil break +< dJOINT_BROKEN = 0x0001, +< // if this flag is set, the joint wil be deleted when it breaks +< dJOINT_DELETE_ON_BREAK = 0x0002, +< // if this flag is set, the joint can break at a certain force on body 1 +< dJOINT_BREAK_AT_B1_FORCE = 0x0004, +< // if this flag is set, the joint can break at a certain torque on body 1 +< dJOINT_BREAK_AT_B1_TORQUE = 0x0008, +< // if this flag is set, the joint can break at a certain force on body 2 +< dJOINT_BREAK_AT_B2_FORCE = 0x0010, +< // if this flag is set, the joint can break at a certain torque on body 2 +< dJOINT_BREAK_AT_B2_TORQUE = 0x0020 +< }; +< /*************************************************************************/ diff -Nru ode-0.11.1/contrib/BreakableJoints/diff/joint.cpp.diff ode-0.14/contrib/BreakableJoints/diff/joint.cpp.diff --- ode-0.11.1/contrib/BreakableJoints/diff/joint.cpp.diff 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/diff/joint.cpp.diff 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,148 @@ +2659,2804d2658 +< +< /******************** breakable joint contribution ***********************/ +< extern "C" void dJointSetBreakable (dxJoint *joint, int b) { +< dAASSERT(joint); +< if (b) { +< // we want this joint to be breakable but we must first check if it +< // was already breakable +< if (!joint->breakInfo) { +< // allocate a dxJointBreakInfo struct +< joint->breakInfo = new dxJointBreakInfo; +< joint->breakInfo->flags = 0; +< for (int i = 0; i < 3; i++) { +< joint->breakInfo->b1MaxF[0] = 0; +< joint->breakInfo->b1MaxT[0] = 0; +< joint->breakInfo->b2MaxF[0] = 0; +< joint->breakInfo->b2MaxT[0] = 0; +< } +< joint->breakInfo->callback = 0; +< } +< else { +< // the joint was already breakable +< return; +< } +< } +< else { +< // we want this joint to be unbreakable mut we must first check if +< // it is alreay unbreakable +< if (joint->breakInfo) { +< // deallocate the dxJointBreakInfo struct +< delete joint->breakInfo; +< joint->breakInfo = 0; +< } +< else { +< // the joint was already unbreakable +< return; +< } +< } +< } +< +< extern "C" void dJointSetBreakCallback (dxJoint *joint, dJointBreakCallback *callbackFunc) { +< dAASSERT(joint); +< # ifndef dNODEBUG +< // only works for a breakable joint +< if (!joint->breakInfo) { +< dDebug (0, "dJointSetBreakCallback called on unbreakable joint"); +< } +< # endif +< joint->breakInfo->callback = callbackFunc; +< } +< +< extern "C" void dJointSetBreakMode (dxJoint *joint, int mode) { +< dAASSERT(joint); +< # ifndef dNODEBUG +< // only works for a breakable joint +< if (!joint->breakInfo) { +< dDebug (0, "dJointSetBreakMode called on unbreakable joint"); +< } +< # endif +< joint->breakInfo->flags = mode; +< } +< +< extern "C" int dJointGetBreakMode (dxJoint *joint) { +< dAASSERT(joint); +< # ifndef dNODEBUG +< // only works for a breakable joint +< if (!joint->breakInfo) { +< dDebug (0, "dJointGetBreakMode called on unbreakable joint"); +< } +< # endif +< return joint->breakInfo->flags; +< } +< +< extern "C" void dJointSetBreakForce (dxJoint *joint, int body, dReal x, dReal y, dReal z) { +< dAASSERT(joint); +< # ifndef dNODEBUG +< // only works for a breakable joint +< if (!joint->breakInfo) { +< dDebug (0, "dJointSetBreakForce called on unbreakable joint"); +< } +< # endif +< if (body) { +< joint->breakInfo->b2MaxF[0] = x; +< joint->breakInfo->b2MaxF[1] = y; +< joint->breakInfo->b2MaxF[2] = z; +< } +< else { +< joint->breakInfo->b1MaxF[0] = x; +< joint->breakInfo->b1MaxF[1] = y; +< joint->breakInfo->b1MaxF[2] = z; +< } +< } +< +< extern "C" void dJointSetBreakTorque (dxJoint *joint, int body, dReal x, dReal y, dReal z) { +< dAASSERT(joint); +< # ifndef dNODEBUG +< // only works for a breakable joint +< if (!joint->breakInfo) { +< dDebug (0, "dJointSetBreakTorque called on unbreakable joint"); +< } +< # endif +< if (body) { +< joint->breakInfo->b2MaxT[0] = x; +< joint->breakInfo->b2MaxT[1] = y; +< joint->breakInfo->b2MaxT[2] = z; +< } +< else { +< joint->breakInfo->b1MaxT[0] = x; +< joint->breakInfo->b1MaxT[1] = y; +< joint->breakInfo->b1MaxT[2] = z; +< } +< } +< +< extern "C" int dJointIsBreakable (dxJoint *joint) { +< dAASSERT(joint); +< return joint->breakInfo != 0; +< } +< +< extern "C" void dJointGetBreakForce (dxJoint *joint, int body, dReal *force) { +< dAASSERT(joint); +< # ifndef dNODEBUG +< // only works for a breakable joint +< if (!joint->breakInfo) { +< dDebug (0, "dJointGetBreakForce called on unbreakable joint"); +< } +< # endif +< if (body) +< for (int i=0; i<3; i++) force[i]=joint->breakInfo->b2MaxF[i]; +< else +< for (int i=0; i<3; i++) force[i]=joint->breakInfo->b1MaxF[i]; +< } +< +< extern "C" void dJointGetBreakTorque (dxJoint *joint, int body, dReal *torque) { +< dAASSERT(joint); +< # ifndef dNODEBUG +< // only works for a breakable joint +< if (!joint->breakInfo) { +< dDebug (0, "dJointGetBreakTorque called on unbreakable joint"); +< } +< # endif +< if (body) +< for (int i=0; i<3; i++) torque[i]=joint->breakInfo->b2MaxT[i]; +< else +< for (int i=0; i<3; i++) torque[i]=joint->breakInfo->b1MaxT[i]; +< } +< /*************************************************************************/ +< +\ No newline at end of file diff -Nru ode-0.11.1/contrib/BreakableJoints/diff/joint.h.diff ode-0.14/contrib/BreakableJoints/diff/joint.h.diff --- ode-0.11.1/contrib/BreakableJoints/diff/joint.h.diff 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/diff/joint.h.diff 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,18 @@ +61,70d60 +< /******************** breakable joint contribution ***********************/ +< struct dxJointBreakInfo : public dBase { +< int flags; +< dReal b1MaxF[3]; // maximum force on body 1 +< dReal b1MaxT[3]; // maximum torque on body 1 +< dReal b2MaxF[3]; // maximum force on body 2 +< dReal b2MaxT[3]; // maximum torque on body 2 +< dJointBreakCallback *callback; // function that is called when this joint breaks +< }; +< /*************************************************************************/ +135,140d124 +< +< /******************** breakable joint contribution ***********************/ +< // optional break info structure. if this is not NULL the the joint is +< // breakable. +< dxJointBreakInfo *breakInfo; +< /*************************************************************************/ diff -Nru ode-0.11.1/contrib/BreakableJoints/diff/objects.h.diff ode-0.14/contrib/BreakableJoints/diff/objects.h.diff --- ode-0.11.1/contrib/BreakableJoints/diff/objects.h.diff 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/diff/objects.h.diff 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,13 @@ +168,179d167 +< /******************** breakable joint contribution ***********************/ +< void dJointSetBreakable (dJointID, int b); +< void dJointSetBreakCallback (dJointID, dJointBreakCallback *callbackFunc); +< void dJointSetBreakMode (dJointID, int mode); +< int dJointGetBreakMode (dJointID); +< void dJointSetBreakForce (dJointID, int body, dReal x, dReal y, dReal z); +< void dJointSetBreakTorque (dJointID, int body, dReal x, dReal y, dReal z); +< int dJointIsBreakable (dJointID); +< void dJointGetBreakForce (dJointID, int body, dReal *force); +< void dJointGetBreakTorque (dJointID, int body, dReal *torque); +< /*************************************************************************/ +< diff -Nru ode-0.11.1/contrib/BreakableJoints/diff/ode.cpp.diff ode-0.14/contrib/BreakableJoints/diff/ode.cpp.diff --- ode-0.11.1/contrib/BreakableJoints/diff/ode.cpp.diff 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/diff/ode.cpp.diff 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,28 @@ +212,230d211 +< /******************** breakable joint contribution ***********************/ +< dxJoint* nextJ; +< if (!world->firstjoint) +< nextJ = 0; +< else +< nextJ = (dxJoint*)world->firstjoint->next; +< for (j=world->firstjoint; j; j=nextJ) { +< nextJ = (dxJoint*)j->next; +< // check if joint is breakable and broken +< if (j->breakInfo && j->breakInfo->flags & dJOINT_BROKEN) { +< // detach (break) the joint +< dJointAttach (j, 0, 0); +< // call the callback function if it is set +< if (j->breakInfo->callback) j->breakInfo->callback (j); +< // finally destroy the joint if the dJOINT_DELETE_ON_BREAK is set +< if (j->breakInfo->flags & dJOINT_DELETE_ON_BREAK) dJointDestroy (j); +< } +< } +< /*************************************************************************/ +931,933d911 +< /******************** breakable joint contribution ***********************/ +< j->breakInfo = 0; +< /*************************************************************************/ +1011,1013d988 +< /******************** breakable joint contribution ***********************/ +< if (j->breakInfo) delete j->breakInfo; +< /*************************************************************************/ diff -Nru ode-0.11.1/contrib/BreakableJoints/diff/step.cpp.diff ode-0.14/contrib/BreakableJoints/diff/step.cpp.diff --- ode-0.11.1/contrib/BreakableJoints/diff/step.cpp.diff 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/diff/step.cpp.diff 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,130 @@ +966,1066c966,989 +< /******************** breakable joint contribution ***********************/ +< // this saves us a few dereferences +< dxJointBreakInfo *jBI = joint[i]->breakInfo; +< // we need joint feedback if the joint is breakable or if the user +< // requested feedback. +< if (jBI||fb) { +< // we need feedback on the amount of force that this joint is +< // applying to the bodies. we use a slightly slower computation +< // that splits out the force components and puts them in the +< // feedback structure. +< dJointFeedback temp_fb; // temporary storage for joint feedback +< dReal data1[8],data2[8]; +< Multiply1_8q1 (data1, JJ, lambda+ofs[i], info[i].m); +< dReal *cf1 = cforce + 8*b1->tag; +< cf1[0] += (temp_fb.f1[0] = data1[0]); +< cf1[1] += (temp_fb.f1[1] = data1[1]); +< cf1[2] += (temp_fb.f1[2] = data1[2]); +< cf1[4] += (temp_fb.t1[0] = data1[4]); +< cf1[5] += (temp_fb.t1[1] = data1[5]); +< cf1[6] += (temp_fb.t1[2] = data1[6]); +< if (b2) { +< Multiply1_8q1 (data2, JJ + 8*info[i].m, lambda+ofs[i], info[i].m); +< dReal *cf2 = cforce + 8*b2->tag; +< cf2[0] += (temp_fb.f2[0] = data2[0]); +< cf2[1] += (temp_fb.f2[1] = data2[1]); +< cf2[2] += (temp_fb.f2[2] = data2[2]); +< cf2[4] += (temp_fb.t2[0] = data2[4]); +< cf2[5] += (temp_fb.t2[1] = data2[5]); +< cf2[6] += (temp_fb.t2[2] = data2[6]); +< } +< // if the user requested so we must copy the feedback information to +< // the feedback struct that the user suplied. +< if (fb) { +< // copy temp_fb to fb +< fb->f1[0] = temp_fb.f1[0]; +< fb->f1[1] = temp_fb.f1[1]; +< fb->f1[2] = temp_fb.f1[2]; +< fb->t1[0] = temp_fb.t1[0]; +< fb->t1[1] = temp_fb.t1[1]; +< fb->t1[2] = temp_fb.t1[2]; +< if (b2) { +< fb->f2[0] = temp_fb.f2[0]; +< fb->f2[1] = temp_fb.f2[1]; +< fb->f2[2] = temp_fb.f2[2]; +< fb->t2[0] = temp_fb.t2[0]; +< fb->t2[1] = temp_fb.t2[1]; +< fb->t2[2] = temp_fb.t2[2]; +< } +< } +< // if the joint is breakable we need to check the breaking conditions +< if (jBI) { +< dReal relCF1[3]; +< dReal relCT1[3]; +< // multiply the force and torque vectors by the rotation matrix of body 1 +< dMULTIPLY1_331 (&relCF1[0],b1->R,&temp_fb.f1[0]); +< dMULTIPLY1_331 (&relCT1[0],b1->R,&temp_fb.t1[0]); +< if (jBI->flags & dJOINT_BREAK_AT_B1_FORCE) { +< // check if the force is to high +< for (int i = 0; i < 3; i++) { +< if (relCF1[i] > jBI->b1MaxF[i]) { +< jBI->flags |= dJOINT_BROKEN; +< goto doneCheckingBreaks; +< } +< } +< } +< if (jBI->flags & dJOINT_BREAK_AT_B1_TORQUE) { +< // check if the torque is to high +< for (int i = 0; i < 3; i++) { +< if (relCT1[i] > jBI->b1MaxT[i]) { +< jBI->flags |= dJOINT_BROKEN; +< goto doneCheckingBreaks; +< } +< } +< } +< if (b2) { +< dReal relCF2[3]; +< dReal relCT2[3]; +< // multiply the force and torque vectors by the rotation matrix of body 2 +< dMULTIPLY1_331 (&relCF2[0],b2->R,&temp_fb.f2[0]); +< dMULTIPLY1_331 (&relCT2[0],b2->R,&temp_fb.t2[0]); +< if (jBI->flags & dJOINT_BREAK_AT_B2_FORCE) { +< // check if the force is to high +< for (int i = 0; i < 3; i++) { +< if (relCF2[i] > jBI->b2MaxF[i]) { +< jBI->flags |= dJOINT_BROKEN; +< goto doneCheckingBreaks; +< } +< } +< } +< if (jBI->flags & dJOINT_BREAK_AT_B2_TORQUE) { +< // check if the torque is to high +< for (int i = 0; i < 3; i++) { +< if (relCT2[i] > jBI->b2MaxT[i]) { +< jBI->flags |= dJOINT_BROKEN; +< goto doneCheckingBreaks; +< } +< } +< } +< } +< doneCheckingBreaks: +< ; +--- +> if (fb) { +> // the user has requested feedback on the amount of force that this +> // joint is applying to the bodies. we use a slightly slower +> // computation that splits out the force components and puts them +> // in the feedback structure. +> dReal data1[8],data2[8]; +> Multiply1_8q1 (data1, JJ, lambda+ofs[i], info[i].m); +> dReal *cf1 = cforce + 8*b1->tag; +> cf1[0] += (fb->f1[0] = data1[0]); +> cf1[1] += (fb->f1[1] = data1[1]); +> cf1[2] += (fb->f1[2] = data1[2]); +> cf1[4] += (fb->t1[0] = data1[4]); +> cf1[5] += (fb->t1[1] = data1[5]); +> cf1[6] += (fb->t1[2] = data1[6]); +> if (b2){ +> Multiply1_8q1 (data2, JJ + 8*info[i].m, lambda+ofs[i], info[i].m); +> dReal *cf2 = cforce + 8*b2->tag; +> cf2[0] += (fb->f2[0] = data2[0]); +> cf2[1] += (fb->f2[1] = data2[1]); +> cf2[2] += (fb->f2[2] = data2[2]); +> cf2[4] += (fb->t2[0] = data2[4]); +> cf2[5] += (fb->t2[1] = data2[5]); +> cf2[6] += (fb->t2[2] = data2[6]); +> } +1068,1069d990 +< } +< /*************************************************************************/ diff -Nru ode-0.11.1/contrib/BreakableJoints/diff/stepfast.cpp.diff ode-0.14/contrib/BreakableJoints/diff/stepfast.cpp.diff --- ode-0.11.1/contrib/BreakableJoints/diff/stepfast.cpp.diff 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/diff/stepfast.cpp.diff 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,143 @@ +587,598c587,593 +< /******************** breakable joint contribution ***********************/ +< // this saves us a few dereferences +< dxJointBreakInfo *jBI = joint->breakInfo; +< // we need joint feedback if the joint is breakable or if the user +< // requested feedback. +< if (jBI||fb) { +< // we need feedback on the amount of force that this joint is +< // applying to the bodies. we use a slightly slower computation +< // that splits out the force components and puts them in the +< // feedback structure. +< dJointFeedback temp_fb; // temporary storage for joint feedback +< dReal data1[8],data2[8]; +--- +> if (fb) +> { +> // the user has requested feedback on the amount of force that this +> // joint is applying to the bodies. we use a slightly slower +> // computation that splits out the force components and puts them +> // in the feedback structure. +> dReal data1[8], data2[8]; +603,608c598,603 +< cf1[0] = (temp_fb.f1[0] = data1[0]); +< cf1[1] = (temp_fb.f1[1] = data1[1]); +< cf1[2] = (temp_fb.f1[2] = data1[2]); +< cf1[4] = (temp_fb.t1[0] = data1[4]); +< cf1[5] = (temp_fb.t1[1] = data1[5]); +< cf1[6] = (temp_fb.t1[2] = data1[6]); +--- +> cf1[0] = (fb->f1[0] = data1[0]); +> cf1[1] = (fb->f1[1] = data1[1]); +> cf1[2] = (fb->f1[2] = data1[2]); +> cf1[4] = (fb->t1[0] = data1[4]); +> cf1[5] = (fb->t1[1] = data1[5]); +> cf1[6] = (fb->t1[2] = data1[6]); +614,691c609,614 +< cf2[0] = (temp_fb.f2[0] = data2[0]); +< cf2[1] = (temp_fb.f2[1] = data2[1]); +< cf2[2] = (temp_fb.f2[2] = data2[2]); +< cf2[4] = (temp_fb.t2[0] = data2[4]); +< cf2[5] = (temp_fb.t2[1] = data2[5]); +< cf2[6] = (temp_fb.t2[2] = data2[6]); +< } +< // if the user requested so we must copy the feedback information to +< // the feedback struct that the user suplied. +< if (fb) { +< // copy temp_fb to fb +< fb->f1[0] = temp_fb.f1[0]; +< fb->f1[1] = temp_fb.f1[1]; +< fb->f1[2] = temp_fb.f1[2]; +< fb->t1[0] = temp_fb.t1[0]; +< fb->t1[1] = temp_fb.t1[1]; +< fb->t1[2] = temp_fb.t1[2]; +< if (body[1]) { +< fb->f2[0] = temp_fb.f2[0]; +< fb->f2[1] = temp_fb.f2[1]; +< fb->f2[2] = temp_fb.f2[2]; +< fb->t2[0] = temp_fb.t2[0]; +< fb->t2[1] = temp_fb.t2[1]; +< fb->t2[2] = temp_fb.t2[2]; +< } +< } +< // if the joint is breakable we need to check the breaking conditions +< if (jBI) { +< dReal relCF1[3]; +< dReal relCT1[3]; +< // multiply the force and torque vectors by the rotation matrix of body 1 +< dMULTIPLY1_331 (&relCF1[0],body[0]->R,&temp_fb.f1[0]); +< dMULTIPLY1_331 (&relCT1[0],body[0]->R,&temp_fb.t1[0]); +< if (jBI->flags & dJOINT_BREAK_AT_B1_FORCE) { +< // check if the force is to high +< for (int i = 0; i < 3; i++) { +< if (relCF1[i] > jBI->b1MaxF[i]) { +< jBI->flags |= dJOINT_BROKEN; +< goto doneCheckingBreaks; +< } +< } +< } +< if (jBI->flags & dJOINT_BREAK_AT_B1_TORQUE) { +< // check if the torque is to high +< for (int i = 0; i < 3; i++) { +< if (relCT1[i] > jBI->b1MaxT[i]) { +< jBI->flags |= dJOINT_BROKEN; +< goto doneCheckingBreaks; +< } +< } +< } +< if (body[1]) { +< dReal relCF2[3]; +< dReal relCT2[3]; +< // multiply the force and torque vectors by the rotation matrix of body 2 +< dMULTIPLY1_331 (&relCF2[0],body[1]->R,&temp_fb.f2[0]); +< dMULTIPLY1_331 (&relCT2[0],body[1]->R,&temp_fb.t2[0]); +< if (jBI->flags & dJOINT_BREAK_AT_B2_FORCE) { +< // check if the force is to high +< for (int i = 0; i < 3; i++) { +< if (relCF2[i] > jBI->b2MaxF[i]) { +< jBI->flags |= dJOINT_BROKEN; +< goto doneCheckingBreaks; +< } +< } +< } +< if (jBI->flags & dJOINT_BREAK_AT_B2_TORQUE) { +< // check if the torque is to high +< for (int i = 0; i < 3; i++) { +< if (relCT2[i] > jBI->b2MaxT[i]) { +< jBI->flags |= dJOINT_BROKEN; +< goto doneCheckingBreaks; +< } +< } +< } +< } +< doneCheckingBreaks: +< ; +--- +> cf2[0] = (fb->f2[0] = data2[0]); +> cf2[1] = (fb->f2[1] = data2[1]); +> cf2[2] = (fb->f2[2] = data2[2]); +> cf2[4] = (fb->t2[0] = data2[4]); +> cf2[5] = (fb->t2[1] = data2[5]); +> cf2[6] = (fb->t2[2] = data2[6]); +694d616 +< /*************************************************************************/ +1178,1196d1099 +< /******************** breakable joint contribution ***********************/ +< dxJoint* nextJ; +< if (!world->firstjoint) +< nextJ = 0; +< else +< nextJ = (dxJoint*)world->firstjoint->next; +< for (j=world->firstjoint; j; j=nextJ) { +< nextJ = (dxJoint*)j->next; +< // check if joint is breakable and broken +< if (j->breakInfo && j->breakInfo->flags & dJOINT_BROKEN) { +< // detach (break) the joint +< dJointAttach (j, 0, 0); +< // call the callback function if it is set +< if (j->breakInfo->callback) j->breakInfo->callback (j); +< // finally destroy the joint if the dJOINT_DELETE_ON_BREAK is set +< if (j->breakInfo->flags & dJOINT_DELETE_ON_BREAK) dJointDestroy (j); +< } +< } +< /*************************************************************************/ diff -Nru ode-0.11.1/contrib/BreakableJoints/diff/test_buggy.cpp.diff ode-0.14/contrib/BreakableJoints/diff/test_buggy.cpp.diff --- ode-0.11.1/contrib/BreakableJoints/diff/test_buggy.cpp.diff 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/diff/test_buggy.cpp.diff 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,16 @@ +266,270d265 +< +< // breakable joints contribution +< dJointSetBreakable (joint[i], 1); +< dJointSetBreakMode (joint[i], dJOINT_BREAK_AT_FORCE); +< dJointSetBreakForce (joint[i], 0.5); +298c293 +< ground_box = dCreateBox (space,2,1.5,5); +--- +> ground_box = dCreateBox (space,2,1.5,1); +300,301c295,296 +< dRFromAxisAndAngle (R,0,1,0,-0.85); +< dGeomSetPosition (ground_box,5,0,-1); +--- +> dRFromAxisAndAngle (R,0,1,0,-0.15); +> dGeomSetPosition (ground_box,2,0,-0.34); diff -Nru ode-0.11.1/contrib/BreakableJoints/joint.cpp ode-0.14/contrib/BreakableJoints/joint.cpp --- ode-0.11.1/contrib/BreakableJoints/joint.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/joint.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,2803 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +/* + +design note: the general principle for giving a joint the option of connecting +to the static environment (i.e. the absolute frame) is to check the second +body (joint->node[1].body), and if it is zero then behave as if its body +transform is the identity. + +*/ + +#include +#include +#include +#include "joint.h" + +//**************************************************************************** +// externs + +extern "C" void dBodyAddTorque (dBodyID, dReal fx, dReal fy, dReal fz); +extern "C" void dBodyAddForce (dBodyID, dReal fx, dReal fy, dReal fz); + +//**************************************************************************** +// utility + +// set three "ball-and-socket" rows in the constraint equation, and the +// corresponding right hand side. + +static inline void setBall (dxJoint *joint, dxJoint::Info2 *info, + dVector3 anchor1, dVector3 anchor2) +{ + // anchor points in global coordinates with respect to body PORs. + dVector3 a1,a2; + + int s = info->rowskip; + + // set jacobian + info->J1l[0] = 1; + info->J1l[s+1] = 1; + info->J1l[2*s+2] = 1; + dMULTIPLY0_331 (a1,joint->node[0].body->R,anchor1); + dCROSSMAT (info->J1a,a1,s,-,+); + if (joint->node[1].body) { + info->J2l[0] = -1; + info->J2l[s+1] = -1; + info->J2l[2*s+2] = -1; + dMULTIPLY0_331 (a2,joint->node[1].body->R,anchor2); + dCROSSMAT (info->J2a,a2,s,+,-); + } + + // set right hand side + dReal k = info->fps * info->erp; + if (joint->node[1].body) { + for (int j=0; j<3; j++) { + info->c[j] = k * (a2[j] + joint->node[1].body->pos[j] - + a1[j] - joint->node[0].body->pos[j]); + } + } + else { + for (int j=0; j<3; j++) { + info->c[j] = k * (anchor2[j] - a1[j] - + joint->node[0].body->pos[j]); + } + } +} + + +// this is like setBall(), except that `axis' is a unit length vector +// (in global coordinates) that should be used for the first jacobian +// position row (the other two row vectors will be derived from this). +// `erp1' is the erp value to use along the axis. + +static inline void setBall2 (dxJoint *joint, dxJoint::Info2 *info, + dVector3 anchor1, dVector3 anchor2, + dVector3 axis, dReal erp1) +{ + // anchor points in global coordinates with respect to body PORs. + dVector3 a1,a2; + + int i,s = info->rowskip; + + // get vectors normal to the axis. in setBall() axis,q1,q2 is [1 0 0], + // [0 1 0] and [0 0 1], which makes everything much easier. + dVector3 q1,q2; + dPlaneSpace (axis,q1,q2); + + // set jacobian + for (i=0; i<3; i++) info->J1l[i] = axis[i]; + for (i=0; i<3; i++) info->J1l[s+i] = q1[i]; + for (i=0; i<3; i++) info->J1l[2*s+i] = q2[i]; + dMULTIPLY0_331 (a1,joint->node[0].body->R,anchor1); + dCROSS (info->J1a,=,a1,axis); + dCROSS (info->J1a+s,=,a1,q1); + dCROSS (info->J1a+2*s,=,a1,q2); + if (joint->node[1].body) { + for (i=0; i<3; i++) info->J2l[i] = -axis[i]; + for (i=0; i<3; i++) info->J2l[s+i] = -q1[i]; + for (i=0; i<3; i++) info->J2l[2*s+i] = -q2[i]; + dMULTIPLY0_331 (a2,joint->node[1].body->R,anchor2); + dCROSS (info->J2a,= -,a2,axis); + dCROSS (info->J2a+s,= -,a2,q1); + dCROSS (info->J2a+2*s,= -,a2,q2); + } + + // set right hand side - measure error along (axis,q1,q2) + dReal k1 = info->fps * erp1; + dReal k = info->fps * info->erp; + + for (i=0; i<3; i++) a1[i] += joint->node[0].body->pos[i]; + if (joint->node[1].body) { + for (i=0; i<3; i++) a2[i] += joint->node[1].body->pos[i]; + info->c[0] = k1 * (dDOT(axis,a2) - dDOT(axis,a1)); + info->c[1] = k * (dDOT(q1,a2) - dDOT(q1,a1)); + info->c[2] = k * (dDOT(q2,a2) - dDOT(q2,a1)); + } + else { + info->c[0] = k1 * (dDOT(axis,anchor2) - dDOT(axis,a1)); + info->c[1] = k * (dDOT(q1,anchor2) - dDOT(q1,a1)); + info->c[2] = k * (dDOT(q2,anchor2) - dDOT(q2,a1)); + } +} + + +// set three orientation rows in the constraint equation, and the +// corresponding right hand side. + +static void setFixedOrientation(dxJoint *joint, dxJoint::Info2 *info, dQuaternion qrel, int start_row) +{ + int s = info->rowskip; + int start_index = start_row * s; + + // 3 rows to make body rotations equal + info->J1a[start_index] = 1; + info->J1a[start_index + s + 1] = 1; + info->J1a[start_index + s*2+2] = 1; + if (joint->node[1].body) { + info->J2a[start_index] = -1; + info->J2a[start_index + s+1] = -1; + info->J2a[start_index + s*2+2] = -1; + } + + // compute the right hand side. the first three elements will result in + // relative angular velocity of the two bodies - this is set to bring them + // back into alignment. the correcting angular velocity is + // |angular_velocity| = angle/time = erp*theta / stepsize + // = (erp*fps) * theta + // angular_velocity = |angular_velocity| * u + // = (erp*fps) * theta * u + // where rotation along unit length axis u by theta brings body 2's frame + // to qrel with respect to body 1's frame. using a small angle approximation + // for sin(), this gives + // angular_velocity = (erp*fps) * 2 * v + // where the quaternion of the relative rotation between the two bodies is + // q = [cos(theta/2) sin(theta/2)*u] = [s v] + + // get qerr = relative rotation (rotation error) between two bodies + dQuaternion qerr,e; + if (joint->node[1].body) { + dQuaternion qq; + dQMultiply1 (qq,joint->node[0].body->q,joint->node[1].body->q); + dQMultiply2 (qerr,qq,qrel); + } + else { + dQMultiply3 (qerr,joint->node[0].body->q,qrel); + } + if (qerr[0] < 0) { + qerr[1] = -qerr[1]; // adjust sign of qerr to make theta small + qerr[2] = -qerr[2]; + qerr[3] = -qerr[3]; + } + dMULTIPLY0_331 (e,joint->node[0].body->R,qerr+1); // @@@ bad SIMD padding! + dReal k = info->fps * info->erp; + info->c[start_row] = 2*k * e[0]; + info->c[start_row+1] = 2*k * e[1]; + info->c[start_row+2] = 2*k * e[2]; +} + + +// compute anchor points relative to bodies + +static void setAnchors (dxJoint *j, dReal x, dReal y, dReal z, + dVector3 anchor1, dVector3 anchor2) +{ + if (j->node[0].body) { + dReal q[4]; + q[0] = x - j->node[0].body->pos[0]; + q[1] = y - j->node[0].body->pos[1]; + q[2] = z - j->node[0].body->pos[2]; + q[3] = 0; + dMULTIPLY1_331 (anchor1,j->node[0].body->R,q); + if (j->node[1].body) { + q[0] = x - j->node[1].body->pos[0]; + q[1] = y - j->node[1].body->pos[1]; + q[2] = z - j->node[1].body->pos[2]; + q[3] = 0; + dMULTIPLY1_331 (anchor2,j->node[1].body->R,q); + } + else { + anchor2[0] = x; + anchor2[1] = y; + anchor2[2] = z; + } + } + anchor1[3] = 0; + anchor2[3] = 0; +} + + +// compute axes relative to bodies. either axis1 or axis2 can be 0. + +static void setAxes (dxJoint *j, dReal x, dReal y, dReal z, + dVector3 axis1, dVector3 axis2) +{ + if (j->node[0].body) { + dReal q[4]; + q[0] = x; + q[1] = y; + q[2] = z; + q[3] = 0; + dNormalize3 (q); + if (axis1) { + dMULTIPLY1_331 (axis1,j->node[0].body->R,q); + axis1[3] = 0; + } + if (axis2) { + if (j->node[1].body) { + dMULTIPLY1_331 (axis2,j->node[1].body->R,q); + } + else { + axis2[0] = x; + axis2[1] = y; + axis2[2] = z; + } + axis2[3] = 0; + } + } +} + + +static void getAnchor (dxJoint *j, dVector3 result, dVector3 anchor1) +{ + if (j->node[0].body) { + dMULTIPLY0_331 (result,j->node[0].body->R,anchor1); + result[0] += j->node[0].body->pos[0]; + result[1] += j->node[0].body->pos[1]; + result[2] += j->node[0].body->pos[2]; + } +} + + +static void getAnchor2 (dxJoint *j, dVector3 result, dVector3 anchor2) +{ + if (j->node[1].body) { + dMULTIPLY0_331 (result,j->node[1].body->R,anchor2); + result[0] += j->node[1].body->pos[0]; + result[1] += j->node[1].body->pos[1]; + result[2] += j->node[1].body->pos[2]; + } + else { + result[0] = anchor2[0]; + result[1] = anchor2[1]; + result[2] = anchor2[2]; + } +} + + +static void getAxis (dxJoint *j, dVector3 result, dVector3 axis1) +{ + if (j->node[0].body) { + dMULTIPLY0_331 (result,j->node[0].body->R,axis1); + } +} + + +static void getAxis2 (dxJoint *j, dVector3 result, dVector3 axis2) +{ + if (j->node[1].body) { + dMULTIPLY0_331 (result,j->node[1].body->R,axis2); + } + else { + result[0] = axis2[0]; + result[1] = axis2[1]; + result[2] = axis2[2]; + } +} + + +static dReal getHingeAngleFromRelativeQuat (dQuaternion qrel, dVector3 axis) +{ + // the angle between the two bodies is extracted from the quaternion that + // represents the relative rotation between them. recall that a quaternion + // q is: + // [s,v] = [ cos(theta/2) , sin(theta/2) * u ] + // where s is a scalar and v is a 3-vector. u is a unit length axis and + // theta is a rotation along that axis. we can get theta/2 by: + // theta/2 = atan2 ( sin(theta/2) , cos(theta/2) ) + // but we can't get sin(theta/2) directly, only its absolute value, i.e.: + // |v| = |sin(theta/2)| * |u| + // = |sin(theta/2)| + // using this value will have a strange effect. recall that there are two + // quaternion representations of a given rotation, q and -q. typically as + // a body rotates along the axis it will go through a complete cycle using + // one representation and then the next cycle will use the other + // representation. this corresponds to u pointing in the direction of the + // hinge axis and then in the opposite direction. the result is that theta + // will appear to go "backwards" every other cycle. here is a fix: if u + // points "away" from the direction of the hinge (motor) axis (i.e. more + // than 90 degrees) then use -q instead of q. this represents the same + // rotation, but results in the cos(theta/2) value being sign inverted. + + // extract the angle from the quaternion. cost2 = cos(theta/2), + // sint2 = |sin(theta/2)| + dReal cost2 = qrel[0]; + dReal sint2 = dSqrt (qrel[1]*qrel[1]+qrel[2]*qrel[2]+qrel[3]*qrel[3]); + dReal theta = (dDOT(qrel+1,axis) >= 0) ? // @@@ padding assumptions + (2 * dAtan2(sint2,cost2)) : // if u points in direction of axis + (2 * dAtan2(sint2,-cost2)); // if u points in opposite direction + + // the angle we get will be between 0..2*pi, but we want to return angles + // between -pi..pi + if (theta > M_PI) theta -= 2*M_PI; + + // the angle we've just extracted has the wrong sign + theta = -theta; + + return theta; +} + + +// given two bodies (body1,body2), the hinge axis that they are connected by +// w.r.t. body1 (axis), and the initial relative orientation between them +// (q_initial), return the relative rotation angle. the initial relative +// orientation corresponds to an angle of zero. if body2 is 0 then measure the +// angle between body1 and the static frame. +// +// this will not return the correct angle if the bodies rotate along any axis +// other than the given hinge axis. + +static dReal getHingeAngle (dxBody *body1, dxBody *body2, dVector3 axis, + dQuaternion q_initial) +{ + // get qrel = relative rotation between the two bodies + dQuaternion qrel; + if (body2) { + dQuaternion qq; + dQMultiply1 (qq,body1->q,body2->q); + dQMultiply2 (qrel,qq,q_initial); + } + else { + // pretend body2->q is the identity + dQMultiply3 (qrel,body1->q,q_initial); + } + + return getHingeAngleFromRelativeQuat (qrel,axis); +} + +//**************************************************************************** +// dxJointLimitMotor + +void dxJointLimitMotor::init (dxWorld *world) +{ + vel = 0; + fmax = 0; + lostop = -dInfinity; + histop = dInfinity; + fudge_factor = 1; + normal_cfm = world->global_cfm; + stop_erp = world->global_erp; + stop_cfm = world->global_cfm; + bounce = 0; + limit = 0; + limit_err = 0; +} + + +void dxJointLimitMotor::set (int num, dReal value) +{ + switch (num) { + case dParamLoStop: + if (value <= histop) lostop = value; + break; + case dParamHiStop: + if (value >= lostop) histop = value; + break; + case dParamVel: + vel = value; + break; + case dParamFMax: + if (value >= 0) fmax = value; + break; + case dParamFudgeFactor: + if (value >= 0 && value <= 1) fudge_factor = value; + break; + case dParamBounce: + bounce = value; + break; + case dParamCFM: + normal_cfm = value; + break; + case dParamStopERP: + stop_erp = value; + break; + case dParamStopCFM: + stop_cfm = value; + break; + } +} + + +dReal dxJointLimitMotor::get (int num) +{ + switch (num) { + case dParamLoStop: return lostop; + case dParamHiStop: return histop; + case dParamVel: return vel; + case dParamFMax: return fmax; + case dParamFudgeFactor: return fudge_factor; + case dParamBounce: return bounce; + case dParamCFM: return normal_cfm; + case dParamStopERP: return stop_erp; + case dParamStopCFM: return stop_cfm; + default: return 0; + } +} + + +int dxJointLimitMotor::testRotationalLimit (dReal angle) +{ + if (angle <= lostop) { + limit = 1; + limit_err = angle - lostop; + return 1; + } + else if (angle >= histop) { + limit = 2; + limit_err = angle - histop; + return 1; + } + else { + limit = 0; + return 0; + } +} + + +int dxJointLimitMotor::addLimot (dxJoint *joint, + dxJoint::Info2 *info, int row, + dVector3 ax1, int rotational) +{ + int srow = row * info->rowskip; + + // if the joint is powered, or has joint limits, add in the extra row + int powered = fmax > 0; + if (powered || limit) { + dReal *J1 = rotational ? info->J1a : info->J1l; + dReal *J2 = rotational ? info->J2a : info->J2l; + + J1[srow+0] = ax1[0]; + J1[srow+1] = ax1[1]; + J1[srow+2] = ax1[2]; + if (joint->node[1].body) { + J2[srow+0] = -ax1[0]; + J2[srow+1] = -ax1[1]; + J2[srow+2] = -ax1[2]; + } + + // linear limot torque decoupling step: + // + // if this is a linear limot (e.g. from a slider), we have to be careful + // that the linear constraint forces (+/- ax1) applied to the two bodies + // do not create a torque couple. in other words, the points that the + // constraint force is applied at must lie along the same ax1 axis. + // a torque couple will result in powered or limited slider-jointed free + // bodies from gaining angular momentum. + // the solution used here is to apply the constraint forces at the point + // halfway between the body centers. there is no penalty (other than an + // extra tiny bit of computation) in doing this adjustment. note that we + // only need to do this if the constraint connects two bodies. + + dVector3 ltd; // Linear Torque Decoupling vector (a torque) + if (!rotational && joint->node[1].body) { + dVector3 c; + c[0]=REAL(0.5)*(joint->node[1].body->pos[0]-joint->node[0].body->pos[0]); + c[1]=REAL(0.5)*(joint->node[1].body->pos[1]-joint->node[0].body->pos[1]); + c[2]=REAL(0.5)*(joint->node[1].body->pos[2]-joint->node[0].body->pos[2]); + dCROSS (ltd,=,c,ax1); + info->J1a[srow+0] = ltd[0]; + info->J1a[srow+1] = ltd[1]; + info->J1a[srow+2] = ltd[2]; + info->J2a[srow+0] = ltd[0]; + info->J2a[srow+1] = ltd[1]; + info->J2a[srow+2] = ltd[2]; + } + + // if we're limited low and high simultaneously, the joint motor is + // ineffective + if (limit && (lostop == histop)) powered = 0; + + if (powered) { + info->cfm[row] = normal_cfm; + if (! limit) { + info->c[row] = vel; + info->lo[row] = -fmax; + info->hi[row] = fmax; + } + else { + // the joint is at a limit, AND is being powered. if the joint is + // being powered into the limit then we apply the maximum motor force + // in that direction, because the motor is working against the + // immovable limit. if the joint is being powered away from the limit + // then we have problems because actually we need *two* lcp + // constraints to handle this case. so we fake it and apply some + // fraction of the maximum force. the fraction to use can be set as + // a fudge factor. + + dReal fm = fmax; + if (vel > 0) fm = -fm; + + // if we're powering away from the limit, apply the fudge factor + if ((limit==1 && vel > 0) || (limit==2 && vel < 0)) fm *= fudge_factor; + + if (rotational) { + dBodyAddTorque (joint->node[0].body,-fm*ax1[0],-fm*ax1[1], + -fm*ax1[2]); + if (joint->node[1].body) + dBodyAddTorque (joint->node[1].body,fm*ax1[0],fm*ax1[1],fm*ax1[2]); + } + else { + dBodyAddForce (joint->node[0].body,-fm*ax1[0],-fm*ax1[1],-fm*ax1[2]); + if (joint->node[1].body) { + dBodyAddForce (joint->node[1].body,fm*ax1[0],fm*ax1[1],fm*ax1[2]); + + // linear limot torque decoupling step: refer to above discussion + dBodyAddTorque (joint->node[0].body,-fm*ltd[0],-fm*ltd[1], + -fm*ltd[2]); + dBodyAddTorque (joint->node[1].body,-fm*ltd[0],-fm*ltd[1], + -fm*ltd[2]); + } + } + } + } + + if (limit) { + dReal k = info->fps * stop_erp; + info->c[row] = -k * limit_err; + info->cfm[row] = stop_cfm; + + if (lostop == histop) { + // limited low and high simultaneously + info->lo[row] = -dInfinity; + info->hi[row] = dInfinity; + } + else { + if (limit == 1) { + // low limit + info->lo[row] = 0; + info->hi[row] = dInfinity; + } + else { + // high limit + info->lo[row] = -dInfinity; + info->hi[row] = 0; + } + + // deal with bounce + if (bounce > 0) { + // calculate joint velocity + dReal vel; + if (rotational) { + vel = dDOT(joint->node[0].body->avel,ax1); + if (joint->node[1].body) + vel -= dDOT(joint->node[1].body->avel,ax1); + } + else { + vel = dDOT(joint->node[0].body->lvel,ax1); + if (joint->node[1].body) + vel -= dDOT(joint->node[1].body->lvel,ax1); + } + + // only apply bounce if the velocity is incoming, and if the + // resulting c[] exceeds what we already have. + if (limit == 1) { + // low limit + if (vel < 0) { + dReal newc = -bounce * vel; + if (newc > info->c[row]) info->c[row] = newc; + } + } + else { + // high limit - all those computations are reversed + if (vel > 0) { + dReal newc = -bounce * vel; + if (newc < info->c[row]) info->c[row] = newc; + } + } + } + } + } + return 1; + } + else return 0; +} + +//**************************************************************************** +// ball and socket + +static void ballInit (dxJointBall *j) +{ + dSetZero (j->anchor1,4); + dSetZero (j->anchor2,4); +} + + +static void ballGetInfo1 (dxJointBall *j, dxJoint::Info1 *info) +{ + info->m = 3; + info->nub = 3; +} + + +static void ballGetInfo2 (dxJointBall *joint, dxJoint::Info2 *info) +{ + setBall (joint,info,joint->anchor1,joint->anchor2); +} + + +extern "C" void dJointSetBallAnchor (dxJointBall *joint, + dReal x, dReal y, dReal z) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dball_vtable,"joint is not a ball"); + setAnchors (joint,x,y,z,joint->anchor1,joint->anchor2); +} + + +extern "C" void dJointGetBallAnchor (dxJointBall *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dball_vtable,"joint is not a ball"); + if (joint->flags & dJOINT_REVERSE) + getAnchor2 (joint,result,joint->anchor2); + else + getAnchor (joint,result,joint->anchor1); +} + + +extern "C" void dJointGetBallAnchor2 (dxJointBall *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dball_vtable,"joint is not a ball"); + if (joint->flags & dJOINT_REVERSE) + getAnchor (joint,result,joint->anchor1); + else + getAnchor2 (joint,result,joint->anchor2); +} + + +dxJoint::Vtable __dball_vtable = { + sizeof(dxJointBall), + (dxJoint::init_fn*) ballInit, + (dxJoint::getInfo1_fn*) ballGetInfo1, + (dxJoint::getInfo2_fn*) ballGetInfo2, + dJointTypeBall}; + +//**************************************************************************** +// hinge + +static void hingeInit (dxJointHinge *j) +{ + dSetZero (j->anchor1,4); + dSetZero (j->anchor2,4); + dSetZero (j->axis1,4); + j->axis1[0] = 1; + dSetZero (j->axis2,4); + j->axis2[0] = 1; + dSetZero (j->qrel,4); + j->limot.init (j->world); +} + + +static void hingeGetInfo1 (dxJointHinge *j, dxJoint::Info1 *info) +{ + info->nub = 5; + + // see if joint is powered + if (j->limot.fmax > 0) + info->m = 6; // powered hinge needs an extra constraint row + else info->m = 5; + + // see if we're at a joint limit. + if ((j->limot.lostop >= -M_PI || j->limot.histop <= M_PI) && + j->limot.lostop <= j->limot.histop) { + dReal angle = getHingeAngle (j->node[0].body,j->node[1].body,j->axis1, + j->qrel); + if (j->limot.testRotationalLimit (angle)) info->m = 6; + } +} + + +static void hingeGetInfo2 (dxJointHinge *joint, dxJoint::Info2 *info) +{ + // set the three ball-and-socket rows + setBall (joint,info,joint->anchor1,joint->anchor2); + + // set the two hinge rows. the hinge axis should be the only unconstrained + // rotational axis, the angular velocity of the two bodies perpendicular to + // the hinge axis should be equal. thus the constraint equations are + // p*w1 - p*w2 = 0 + // q*w1 - q*w2 = 0 + // where p and q are unit vectors normal to the hinge axis, and w1 and w2 + // are the angular velocity vectors of the two bodies. + + dVector3 ax1; // length 1 joint axis in global coordinates, from 1st body + dVector3 p,q; // plane space vectors for ax1 + dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); + dPlaneSpace (ax1,p,q); + + int s3=3*info->rowskip; + int s4=4*info->rowskip; + + info->J1a[s3+0] = p[0]; + info->J1a[s3+1] = p[1]; + info->J1a[s3+2] = p[2]; + info->J1a[s4+0] = q[0]; + info->J1a[s4+1] = q[1]; + info->J1a[s4+2] = q[2]; + + if (joint->node[1].body) { + info->J2a[s3+0] = -p[0]; + info->J2a[s3+1] = -p[1]; + info->J2a[s3+2] = -p[2]; + info->J2a[s4+0] = -q[0]; + info->J2a[s4+1] = -q[1]; + info->J2a[s4+2] = -q[2]; + } + + // compute the right hand side of the constraint equation. set relative + // body velocities along p and q to bring the hinge back into alignment. + // if ax1,ax2 are the unit length hinge axes as computed from body1 and + // body2, we need to rotate both bodies along the axis u = (ax1 x ax2). + // if `theta' is the angle between ax1 and ax2, we need an angular velocity + // along u to cover angle erp*theta in one step : + // |angular_velocity| = angle/time = erp*theta / stepsize + // = (erp*fps) * theta + // angular_velocity = |angular_velocity| * (ax1 x ax2) / |ax1 x ax2| + // = (erp*fps) * theta * (ax1 x ax2) / sin(theta) + // ...as ax1 and ax2 are unit length. if theta is smallish, + // theta ~= sin(theta), so + // angular_velocity = (erp*fps) * (ax1 x ax2) + // ax1 x ax2 is in the plane space of ax1, so we project the angular + // velocity to p and q to find the right hand side. + + dVector3 ax2,b; + if (joint->node[1].body) { + dMULTIPLY0_331 (ax2,joint->node[1].body->R,joint->axis2); + } + else { + ax2[0] = joint->axis2[0]; + ax2[1] = joint->axis2[1]; + ax2[2] = joint->axis2[2]; + } + dCROSS (b,=,ax1,ax2); + dReal k = info->fps * info->erp; + info->c[3] = k * dDOT(b,p); + info->c[4] = k * dDOT(b,q); + + // if the hinge is powered, or has joint limits, add in the stuff + joint->limot.addLimot (joint,info,5,ax1,1); +} + + +// compute initial relative rotation body1 -> body2, or env -> body1 + +static void hingeComputeInitialRelativeRotation (dxJointHinge *joint) +{ + if (joint->node[0].body) { + if (joint->node[1].body) { + dQMultiply1 (joint->qrel,joint->node[0].body->q,joint->node[1].body->q); + } + else { + // set joint->qrel to the transpose of the first body q + joint->qrel[0] = joint->node[0].body->q[0]; + for (int i=1; i<4; i++) joint->qrel[i] = -joint->node[0].body->q[i]; + } + } +} + + +extern "C" void dJointSetHingeAnchor (dxJointHinge *joint, + dReal x, dReal y, dReal z) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); + setAnchors (joint,x,y,z,joint->anchor1,joint->anchor2); + hingeComputeInitialRelativeRotation (joint); +} + + +extern "C" void dJointSetHingeAxis (dxJointHinge *joint, + dReal x, dReal y, dReal z) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); + setAxes (joint,x,y,z,joint->axis1,joint->axis2); + hingeComputeInitialRelativeRotation (joint); +} + + +extern "C" void dJointGetHingeAnchor (dxJointHinge *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); + if (joint->flags & dJOINT_REVERSE) + getAnchor2 (joint,result,joint->anchor2); + else + getAnchor (joint,result,joint->anchor1); +} + + +extern "C" void dJointGetHingeAnchor2 (dxJointHinge *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); + if (joint->flags & dJOINT_REVERSE) + getAnchor (joint,result,joint->anchor1); + else + getAnchor2 (joint,result,joint->anchor2); +} + + +extern "C" void dJointGetHingeAxis (dxJointHinge *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); + getAxis (joint,result,joint->axis1); +} + + +extern "C" void dJointSetHingeParam (dxJointHinge *joint, + int parameter, dReal value) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); + joint->limot.set (parameter,value); +} + + +extern "C" dReal dJointGetHingeParam (dxJointHinge *joint, int parameter) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); + return joint->limot.get (parameter); +} + + +extern "C" dReal dJointGetHingeAngle (dxJointHinge *joint) +{ + dAASSERT(joint); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); + if (joint->node[0].body) { + dReal ang = getHingeAngle (joint->node[0].body,joint->node[1].body,joint->axis1, + joint->qrel); + if (joint->flags & dJOINT_REVERSE) + return -ang; + else + return ang; + } + else return 0; +} + + +extern "C" dReal dJointGetHingeAngleRate (dxJointHinge *joint) +{ + dAASSERT(joint); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a Hinge"); + if (joint->node[0].body) { + dVector3 axis; + dMULTIPLY0_331 (axis,joint->node[0].body->R,joint->axis1); + dReal rate = dDOT(axis,joint->node[0].body->avel); + if (joint->node[1].body) rate -= dDOT(axis,joint->node[1].body->avel); + if (joint->flags & dJOINT_REVERSE) rate = - rate; + return rate; + } + else return 0; +} + + +extern "C" void dJointAddHingeTorque (dxJointHinge *joint, dReal torque) +{ + dVector3 axis; + dAASSERT(joint); + dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a Hinge"); + + if (joint->flags & dJOINT_REVERSE) + torque = -torque; + + getAxis (joint,axis,joint->axis1); + axis[0] *= torque; + axis[1] *= torque; + axis[2] *= torque; + + if (joint->node[0].body != 0) + dBodyAddTorque (joint->node[0].body, axis[0], axis[1], axis[2]); + if (joint->node[1].body != 0) + dBodyAddTorque(joint->node[1].body, -axis[0], -axis[1], -axis[2]); +} + + +dxJoint::Vtable __dhinge_vtable = { + sizeof(dxJointHinge), + (dxJoint::init_fn*) hingeInit, + (dxJoint::getInfo1_fn*) hingeGetInfo1, + (dxJoint::getInfo2_fn*) hingeGetInfo2, + dJointTypeHinge}; + +//**************************************************************************** +// slider + +static void sliderInit (dxJointSlider *j) +{ + dSetZero (j->axis1,4); + j->axis1[0] = 1; + dSetZero (j->qrel,4); + dSetZero (j->offset,4); + j->limot.init (j->world); +} + + +extern "C" dReal dJointGetSliderPosition (dxJointSlider *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); + + // get axis1 in global coordinates + dVector3 ax1,q; + dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); + + if (joint->node[1].body) { + // get body2 + offset point in global coordinates + dMULTIPLY0_331 (q,joint->node[1].body->R,joint->offset); + for (int i=0; i<3; i++) q[i] = joint->node[0].body->pos[i] - q[i] - + joint->node[1].body->pos[i]; + } + else { + for (int i=0; i<3; i++) q[i] = joint->node[0].body->pos[i] - + joint->offset[i]; + + } + return dDOT(ax1,q); +} + + +extern "C" dReal dJointGetSliderPositionRate (dxJointSlider *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); + + // get axis1 in global coordinates + dVector3 ax1; + dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); + + if (joint->node[1].body) { + return dDOT(ax1,joint->node[0].body->lvel) - + dDOT(ax1,joint->node[1].body->lvel); + } + else { + return dDOT(ax1,joint->node[0].body->lvel); + } +} + + +static void sliderGetInfo1 (dxJointSlider *j, dxJoint::Info1 *info) +{ + info->nub = 5; + + // see if joint is powered + if (j->limot.fmax > 0) + info->m = 6; // powered slider needs an extra constraint row + else info->m = 5; + + // see if we're at a joint limit. + j->limot.limit = 0; + if ((j->limot.lostop > -dInfinity || j->limot.histop < dInfinity) && + j->limot.lostop <= j->limot.histop) { + // measure joint position + dReal pos = dJointGetSliderPosition (j); + if (pos <= j->limot.lostop) { + j->limot.limit = 1; + j->limot.limit_err = pos - j->limot.lostop; + info->m = 6; + } + else if (pos >= j->limot.histop) { + j->limot.limit = 2; + j->limot.limit_err = pos - j->limot.histop; + info->m = 6; + } + } +} + + +static void sliderGetInfo2 (dxJointSlider *joint, dxJoint::Info2 *info) +{ + int i,s = info->rowskip; + int s2=2*s,s3=3*s,s4=4*s; + + // pull out pos and R for both bodies. also get the `connection' + // vector pos2-pos1. + + dReal *pos1,*pos2,*R1,*R2; + dVector3 c; + pos1 = joint->node[0].body->pos; + R1 = joint->node[0].body->R; + if (joint->node[1].body) { + pos2 = joint->node[1].body->pos; + R2 = joint->node[1].body->R; + for (i=0; i<3; i++) c[i] = pos2[i] - pos1[i]; + } + else { + pos2 = 0; + R2 = 0; + } + + // 3 rows to make body rotations equal + setFixedOrientation(joint, info, joint->qrel, 0); + + // remaining two rows. we want: vel2 = vel1 + w1 x c ... but this would + // result in three equations, so we project along the planespace vectors + // so that sliding along the slider axis is disregarded. for symmetry we + // also substitute (w1+w2)/2 for w1, as w1 is supposed to equal w2. + + dVector3 ax1; // joint axis in global coordinates (unit length) + dVector3 p,q; // plane space of ax1 + dMULTIPLY0_331 (ax1,R1,joint->axis1); + dPlaneSpace (ax1,p,q); + if (joint->node[1].body) { + dVector3 tmp; + dCROSS (tmp, = REAL(0.5) * ,c,p); + for (i=0; i<3; i++) info->J2a[s3+i] = tmp[i]; + for (i=0; i<3; i++) info->J2a[s3+i] = tmp[i]; + dCROSS (tmp, = REAL(0.5) * ,c,q); + for (i=0; i<3; i++) info->J2a[s4+i] = tmp[i]; + for (i=0; i<3; i++) info->J2a[s4+i] = tmp[i]; + for (i=0; i<3; i++) info->J2l[s3+i] = -p[i]; + for (i=0; i<3; i++) info->J2l[s4+i] = -q[i]; + } + for (i=0; i<3; i++) info->J1l[s3+i] = p[i]; + for (i=0; i<3; i++) info->J1l[s4+i] = q[i]; + + // compute last two elements of right hand side. we want to align the offset + // point (in body 2's frame) with the center of body 1. + dReal k = info->fps * info->erp; + if (joint->node[1].body) { + dVector3 ofs; // offset point in global coordinates + dMULTIPLY0_331 (ofs,R2,joint->offset); + for (i=0; i<3; i++) c[i] += ofs[i]; + info->c[3] = k * dDOT(p,c); + info->c[4] = k * dDOT(q,c); + } + else { + dVector3 ofs; // offset point in global coordinates + for (i=0; i<3; i++) ofs[i] = joint->offset[i] - pos1[i]; + info->c[3] = k * dDOT(p,ofs); + info->c[4] = k * dDOT(q,ofs); + } + + // if the slider is powered, or has joint limits, add in the extra row + joint->limot.addLimot (joint,info,5,ax1,0); +} + + +extern "C" void dJointSetSliderAxis (dxJointSlider *joint, + dReal x, dReal y, dReal z) +{ + int i; + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); + setAxes (joint,x,y,z,joint->axis1,0); + + // compute initial relative rotation body1 -> body2, or env -> body1 + // also compute center of body1 w.r.t body 2 + if (joint->node[1].body) { + dQMultiply1 (joint->qrel,joint->node[0].body->q,joint->node[1].body->q); + dVector3 c; + for (i=0; i<3; i++) + c[i] = joint->node[0].body->pos[i] - joint->node[1].body->pos[i]; + dMULTIPLY1_331 (joint->offset,joint->node[1].body->R,c); + } + else { + // set joint->qrel to the transpose of the first body's q + joint->qrel[0] = joint->node[0].body->q[0]; + for (i=1; i<4; i++) joint->qrel[i] = -joint->node[0].body->q[i]; + for (i=0; i<3; i++) joint->offset[i] = joint->node[0].body->pos[i]; + } +} + + +extern "C" void dJointGetSliderAxis (dxJointSlider *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); + getAxis (joint,result,joint->axis1); +} + + +extern "C" void dJointSetSliderParam (dxJointSlider *joint, + int parameter, dReal value) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); + joint->limot.set (parameter,value); +} + + +extern "C" dReal dJointGetSliderParam (dxJointSlider *joint, int parameter) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); + return joint->limot.get (parameter); +} + + +extern "C" void dJointAddSliderForce (dxJointSlider *joint, dReal force) +{ + dVector3 axis; + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); + + if (joint->flags & dJOINT_REVERSE) + force -= force; + + getAxis (joint,axis,joint->axis1); + axis[0] *= force; + axis[1] *= force; + axis[2] *= force; + + if (joint->node[0].body != 0) + dBodyAddForce (joint->node[0].body,axis[0],axis[1],axis[2]); + if (joint->node[1].body != 0) + dBodyAddForce(joint->node[1].body, -axis[0], -axis[1], -axis[2]); +} + + +dxJoint::Vtable __dslider_vtable = { + sizeof(dxJointSlider), + (dxJoint::init_fn*) sliderInit, + (dxJoint::getInfo1_fn*) sliderGetInfo1, + (dxJoint::getInfo2_fn*) sliderGetInfo2, + dJointTypeSlider}; + +//**************************************************************************** +// contact + +static void contactInit (dxJointContact *j) +{ + // default frictionless contact. hmmm, this info gets overwritten straight + // away anyway, so why bother? +#if 0 /* so don't bother ;) */ + j->contact.surface.mode = 0; + j->contact.surface.mu = 0; + dSetZero (j->contact.geom.pos,4); + dSetZero (j->contact.geom.normal,4); + j->contact.geom.depth = 0; +#endif +} + + +static void contactGetInfo1 (dxJointContact *j, dxJoint::Info1 *info) +{ + // make sure mu's >= 0, then calculate number of constraint rows and number + // of unbounded rows. + int m = 1, nub=0; + if (j->contact.surface.mu < 0) j->contact.surface.mu = 0; + if (j->contact.surface.mode & dContactMu2) { + if (j->contact.surface.mu > 0) m++; + if (j->contact.surface.mu2 < 0) j->contact.surface.mu2 = 0; + if (j->contact.surface.mu2 > 0) m++; + if (j->contact.surface.mu == dInfinity) nub ++; + if (j->contact.surface.mu2 == dInfinity) nub ++; + } + else { + if (j->contact.surface.mu > 0) m += 2; + if (j->contact.surface.mu == dInfinity) nub += 2; + } + + j->the_m = m; + info->m = m; + info->nub = nub; +} + + +static void contactGetInfo2 (dxJointContact *j, dxJoint::Info2 *info) +{ + int i,s = info->rowskip; + int s2 = 2*s; + + // get normal, with sign adjusted for body1/body2 polarity + dVector3 normal; + if (j->flags & dJOINT_REVERSE) { + normal[0] = - j->contact.geom.normal[0]; + normal[1] = - j->contact.geom.normal[1]; + normal[2] = - j->contact.geom.normal[2]; + } + else { + normal[0] = j->contact.geom.normal[0]; + normal[1] = j->contact.geom.normal[1]; + normal[2] = j->contact.geom.normal[2]; + } + normal[3] = 0; // @@@ hmmm + + // c1,c2 = contact points with respect to body PORs + dVector3 c1,c2; + for (i=0; i<3; i++) c1[i] = j->contact.geom.pos[i] - j->node[0].body->pos[i]; + + // set jacobian for normal + info->J1l[0] = normal[0]; + info->J1l[1] = normal[1]; + info->J1l[2] = normal[2]; + dCROSS (info->J1a,=,c1,normal); + if (j->node[1].body) { + for (i=0; i<3; i++) c2[i] = j->contact.geom.pos[i] - + j->node[1].body->pos[i]; + info->J2l[0] = -normal[0]; + info->J2l[1] = -normal[1]; + info->J2l[2] = -normal[2]; + dCROSS (info->J2a,= -,c2,normal); + } + + // set right hand side and cfm value for normal + dReal erp = info->erp; + if (j->contact.surface.mode & dContactSoftERP) + erp = j->contact.surface.soft_erp; + dReal k = info->fps * erp; + info->c[0] = k*j->contact.geom.depth; + if (j->contact.surface.mode & dContactSoftCFM) + info->cfm[0] = j->contact.surface.soft_cfm; + + // deal with bounce + if (j->contact.surface.mode & dContactBounce) { + // calculate outgoing velocity (-ve for incoming contact) + dReal outgoing = dDOT(info->J1l,j->node[0].body->lvel) + + dDOT(info->J1a,j->node[0].body->avel); + if (j->node[1].body) { + outgoing += dDOT(info->J2l,j->node[1].body->lvel) + + dDOT(info->J2a,j->node[1].body->avel); + } + // only apply bounce if the outgoing velocity is greater than the + // threshold, and if the resulting c[0] exceeds what we already have. + if (j->contact.surface.bounce_vel >= 0 && + (-outgoing) > j->contact.surface.bounce_vel) { + dReal newc = - j->contact.surface.bounce * outgoing; + if (newc > info->c[0]) info->c[0] = newc; + } + } + + // set LCP limits for normal + info->lo[0] = 0; + info->hi[0] = dInfinity; + + // now do jacobian for tangential forces + dVector3 t1,t2; // two vectors tangential to normal + + // first friction direction + if (j->the_m >= 2) { + if (j->contact.surface.mode & dContactFDir1) { // use fdir1 ? + t1[0] = j->contact.fdir1[0]; + t1[1] = j->contact.fdir1[1]; + t1[2] = j->contact.fdir1[2]; + dCROSS (t2,=,normal,t1); + } + else { + dPlaneSpace (normal,t1,t2); + } + info->J1l[s+0] = t1[0]; + info->J1l[s+1] = t1[1]; + info->J1l[s+2] = t1[2]; + dCROSS (info->J1a+s,=,c1,t1); + if (j->node[1].body) { + info->J2l[s+0] = -t1[0]; + info->J2l[s+1] = -t1[1]; + info->J2l[s+2] = -t1[2]; + dCROSS (info->J2a+s,= -,c2,t1); + } + // set right hand side + if (j->contact.surface.mode & dContactMotion1) { + info->c[1] = j->contact.surface.motion1; + } + // set LCP bounds and friction index. this depends on the approximation + // mode + info->lo[1] = -j->contact.surface.mu; + info->hi[1] = j->contact.surface.mu; + if (j->contact.surface.mode & dContactApprox1_1) info->findex[1] = 0; + + // set slip (constraint force mixing) + if (j->contact.surface.mode & dContactSlip1) + info->cfm[1] = j->contact.surface.slip1; + } + + // second friction direction + if (j->the_m >= 3) { + info->J1l[s2+0] = t2[0]; + info->J1l[s2+1] = t2[1]; + info->J1l[s2+2] = t2[2]; + dCROSS (info->J1a+s2,=,c1,t2); + if (j->node[1].body) { + info->J2l[s2+0] = -t2[0]; + info->J2l[s2+1] = -t2[1]; + info->J2l[s2+2] = -t2[2]; + dCROSS (info->J2a+s2,= -,c2,t2); + } + // set right hand side + if (j->contact.surface.mode & dContactMotion2) { + info->c[2] = j->contact.surface.motion2; + } + // set LCP bounds and friction index. this depends on the approximation + // mode + if (j->contact.surface.mode & dContactMu2) { + info->lo[2] = -j->contact.surface.mu2; + info->hi[2] = j->contact.surface.mu2; + } + else { + info->lo[2] = -j->contact.surface.mu; + info->hi[2] = j->contact.surface.mu; + } + if (j->contact.surface.mode & dContactApprox1_2) info->findex[2] = 0; + + // set slip (constraint force mixing) + if (j->contact.surface.mode & dContactSlip2) + info->cfm[2] = j->contact.surface.slip2; + } +} + + +dxJoint::Vtable __dcontact_vtable = { + sizeof(dxJointContact), + (dxJoint::init_fn*) contactInit, + (dxJoint::getInfo1_fn*) contactGetInfo1, + (dxJoint::getInfo2_fn*) contactGetInfo2, + dJointTypeContact}; + +//**************************************************************************** +// hinge 2. note that this joint must be attached to two bodies for it to work + +static dReal measureHinge2Angle (dxJointHinge2 *joint) +{ + dVector3 a1,a2; + dMULTIPLY0_331 (a1,joint->node[1].body->R,joint->axis2); + dMULTIPLY1_331 (a2,joint->node[0].body->R,a1); + dReal x = dDOT(joint->v1,a2); + dReal y = dDOT(joint->v2,a2); + return -dAtan2 (y,x); +} + + +static void hinge2Init (dxJointHinge2 *j) +{ + dSetZero (j->anchor1,4); + dSetZero (j->anchor2,4); + dSetZero (j->axis1,4); + j->axis1[0] = 1; + dSetZero (j->axis2,4); + j->axis2[1] = 1; + j->c0 = 0; + j->s0 = 0; + + dSetZero (j->v1,4); + j->v1[0] = 1; + dSetZero (j->v2,4); + j->v2[1] = 1; + + j->limot1.init (j->world); + j->limot2.init (j->world); + + j->susp_erp = j->world->global_erp; + j->susp_cfm = j->world->global_cfm; + + j->flags |= dJOINT_TWOBODIES; +} + + +static void hinge2GetInfo1 (dxJointHinge2 *j, dxJoint::Info1 *info) +{ + info->m = 4; + info->nub = 4; + + // see if we're powered or at a joint limit for axis 1 + int atlimit=0; + if ((j->limot1.lostop >= -M_PI || j->limot1.histop <= M_PI) && + j->limot1.lostop <= j->limot1.histop) { + dReal angle = measureHinge2Angle (j); + if (j->limot1.testRotationalLimit (angle)) atlimit = 1; + } + if (atlimit || j->limot1.fmax > 0) info->m++; + + // see if we're powering axis 2 (we currently never limit this axis) + j->limot2.limit = 0; + if (j->limot2.fmax > 0) info->m++; +} + + +// macro that computes ax1,ax2 = axis 1 and 2 in global coordinates (they are +// relative to body 1 and 2 initially) and then computes the constrained +// rotational axis as the cross product of ax1 and ax2. +// the sin and cos of the angle between axis 1 and 2 is computed, this comes +// from dot and cross product rules. + +#define HINGE2_GET_AXIS_INFO(axis,sin_angle,cos_angle) \ + dVector3 ax1,ax2; \ + dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); \ + dMULTIPLY0_331 (ax2,joint->node[1].body->R,joint->axis2); \ + dCROSS (axis,=,ax1,ax2); \ + sin_angle = dSqrt (axis[0]*axis[0] + axis[1]*axis[1] + axis[2]*axis[2]); \ + cos_angle = dDOT (ax1,ax2); + + +static void hinge2GetInfo2 (dxJointHinge2 *joint, dxJoint::Info2 *info) +{ + // get information we need to set the hinge row + dReal s,c; + dVector3 q; + HINGE2_GET_AXIS_INFO (q,s,c); + dNormalize3 (q); // @@@ quicker: divide q by s ? + + // set the three ball-and-socket rows (aligned to the suspension axis ax1) + setBall2 (joint,info,joint->anchor1,joint->anchor2,ax1,joint->susp_erp); + + // set the hinge row + int s3=3*info->rowskip; + info->J1a[s3+0] = q[0]; + info->J1a[s3+1] = q[1]; + info->J1a[s3+2] = q[2]; + if (joint->node[1].body) { + info->J2a[s3+0] = -q[0]; + info->J2a[s3+1] = -q[1]; + info->J2a[s3+2] = -q[2]; + } + + // compute the right hand side for the constrained rotational DOF. + // axis 1 and axis 2 are separated by an angle `theta'. the desired + // separation angle is theta0. sin(theta0) and cos(theta0) are recorded + // in the joint structure. the correcting angular velocity is: + // |angular_velocity| = angle/time = erp*(theta0-theta) / stepsize + // = (erp*fps) * (theta0-theta) + // (theta0-theta) can be computed using the following small-angle-difference + // approximation: + // theta0-theta ~= tan(theta0-theta) + // = sin(theta0-theta)/cos(theta0-theta) + // = (c*s0 - s*c0) / (c*c0 + s*s0) + // = c*s0 - s*c0 assuming c*c0 + s*s0 ~= 1 + // where c = cos(theta), s = sin(theta) + // c0 = cos(theta0), s0 = sin(theta0) + + dReal k = info->fps * info->erp; + info->c[3] = k * (joint->c0 * s - joint->s0 * c); + + // if the axis1 hinge is powered, or has joint limits, add in more stuff + int row = 4 + joint->limot1.addLimot (joint,info,4,ax1,1); + + // if the axis2 hinge is powered, add in more stuff + joint->limot2.addLimot (joint,info,row,ax2,1); + + // set parameter for the suspension + info->cfm[0] = joint->susp_cfm; +} + + +// compute vectors v1 and v2 (embedded in body1), used to measure angle +// between body 1 and body 2 + +static void makeHinge2V1andV2 (dxJointHinge2 *joint) +{ + if (joint->node[0].body) { + // get axis 1 and 2 in global coords + dVector3 ax1,ax2,v; + dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); + dMULTIPLY0_331 (ax2,joint->node[1].body->R,joint->axis2); + + // don't do anything if the axis1 or axis2 vectors are zero or the same + if ((ax1[0]==0 && ax1[1]==0 && ax1[2]==0) || + (ax2[0]==0 && ax2[1]==0 && ax2[2]==0) || + (ax1[0]==ax2[0] && ax1[1]==ax2[1] && ax1[2]==ax2[2])) return; + + // modify axis 2 so it's perpendicular to axis 1 + dReal k = dDOT(ax1,ax2); + for (int i=0; i<3; i++) ax2[i] -= k*ax1[i]; + dNormalize3 (ax2); + + // make v1 = modified axis2, v2 = axis1 x (modified axis2) + dCROSS (v,=,ax1,ax2); + dMULTIPLY1_331 (joint->v1,joint->node[0].body->R,ax2); + dMULTIPLY1_331 (joint->v2,joint->node[0].body->R,v); + } +} + + +extern "C" void dJointSetHinge2Anchor (dxJointHinge2 *joint, + dReal x, dReal y, dReal z) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + setAnchors (joint,x,y,z,joint->anchor1,joint->anchor2); + makeHinge2V1andV2 (joint); +} + + +extern "C" void dJointSetHinge2Axis1 (dxJointHinge2 *joint, + dReal x, dReal y, dReal z) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if (joint->node[0].body) { + dReal q[4]; + q[0] = x; + q[1] = y; + q[2] = z; + q[3] = 0; + dNormalize3 (q); + dMULTIPLY1_331 (joint->axis1,joint->node[0].body->R,q); + joint->axis1[3] = 0; + + // compute the sin and cos of the angle between axis 1 and axis 2 + dVector3 ax; + HINGE2_GET_AXIS_INFO(ax,joint->s0,joint->c0); + } + makeHinge2V1andV2 (joint); +} + + +extern "C" void dJointSetHinge2Axis2 (dxJointHinge2 *joint, + dReal x, dReal y, dReal z) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if (joint->node[1].body) { + dReal q[4]; + q[0] = x; + q[1] = y; + q[2] = z; + q[3] = 0; + dNormalize3 (q); + dMULTIPLY1_331 (joint->axis2,joint->node[1].body->R,q); + joint->axis1[3] = 0; + + // compute the sin and cos of the angle between axis 1 and axis 2 + dVector3 ax; + HINGE2_GET_AXIS_INFO(ax,joint->s0,joint->c0); + } + makeHinge2V1andV2 (joint); +} + + +extern "C" void dJointSetHinge2Param (dxJointHinge2 *joint, + int parameter, dReal value) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if ((parameter & 0xff00) == 0x100) { + joint->limot2.set (parameter & 0xff,value); + } + else { + if (parameter == dParamSuspensionERP) joint->susp_erp = value; + else if (parameter == dParamSuspensionCFM) joint->susp_cfm = value; + else joint->limot1.set (parameter,value); + } +} + + +extern "C" void dJointGetHinge2Anchor (dxJointHinge2 *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if (joint->flags & dJOINT_REVERSE) + getAnchor2 (joint,result,joint->anchor2); + else + getAnchor (joint,result,joint->anchor1); +} + + +extern "C" void dJointGetHinge2Anchor2 (dxJointHinge2 *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if (joint->flags & dJOINT_REVERSE) + getAnchor (joint,result,joint->anchor1); + else + getAnchor2 (joint,result,joint->anchor2); +} + + +extern "C" void dJointGetHinge2Axis1 (dxJointHinge2 *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if (joint->node[0].body) { + dMULTIPLY0_331 (result,joint->node[0].body->R,joint->axis1); + } +} + + +extern "C" void dJointGetHinge2Axis2 (dxJointHinge2 *joint, dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if (joint->node[1].body) { + dMULTIPLY0_331 (result,joint->node[1].body->R,joint->axis2); + } +} + + +extern "C" dReal dJointGetHinge2Param (dxJointHinge2 *joint, int parameter) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if ((parameter & 0xff00) == 0x100) { + return joint->limot2.get (parameter & 0xff); + } + else { + if (parameter == dParamSuspensionERP) return joint->susp_erp; + else if (parameter == dParamSuspensionCFM) return joint->susp_cfm; + else return joint->limot1.get (parameter); + } +} + + +extern "C" dReal dJointGetHinge2Angle1 (dxJointHinge2 *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if (joint->node[0].body) return measureHinge2Angle (joint); + else return 0; +} + + +extern "C" dReal dJointGetHinge2Angle1Rate (dxJointHinge2 *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if (joint->node[0].body) { + dVector3 axis; + dMULTIPLY0_331 (axis,joint->node[0].body->R,joint->axis1); + dReal rate = dDOT(axis,joint->node[0].body->avel); + if (joint->node[1].body) rate -= dDOT(axis,joint->node[1].body->avel); + return rate; + } + else return 0; +} + + +extern "C" dReal dJointGetHinge2Angle2Rate (dxJointHinge2 *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + if (joint->node[0].body && joint->node[1].body) { + dVector3 axis; + dMULTIPLY0_331 (axis,joint->node[1].body->R,joint->axis2); + dReal rate = dDOT(axis,joint->node[0].body->avel); + if (joint->node[1].body) rate -= dDOT(axis,joint->node[1].body->avel); + return rate; + } + else return 0; +} + + +extern "C" void dJointAddHinge2Torques (dxJointHinge2 *joint, dReal torque1, dReal torque2) +{ + dVector3 axis1, axis2; + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); + + if (joint->node[0].body && joint->node[1].body) { + dMULTIPLY0_331 (axis1,joint->node[0].body->R,joint->axis1); + dMULTIPLY0_331 (axis2,joint->node[1].body->R,joint->axis2); + axis1[0] = axis1[0] * torque1 + axis2[0] * torque2; + axis1[1] = axis1[1] * torque1 + axis2[1] * torque2; + axis1[2] = axis1[2] * torque1 + axis2[2] * torque2; + dBodyAddTorque (joint->node[0].body,axis1[0],axis1[1],axis1[2]); + dBodyAddTorque(joint->node[1].body, -axis1[0], -axis1[1], -axis1[2]); + } +} + + +dxJoint::Vtable __dhinge2_vtable = { + sizeof(dxJointHinge2), + (dxJoint::init_fn*) hinge2Init, + (dxJoint::getInfo1_fn*) hinge2GetInfo1, + (dxJoint::getInfo2_fn*) hinge2GetInfo2, + dJointTypeHinge2}; + +//**************************************************************************** +// universal + +// I just realized that the universal joint is equivalent to a hinge 2 joint with +// perfectly stiff suspension. By comparing the hinge 2 implementation to +// the universal implementation, you may be able to improve this +// implementation (or, less likely, the hinge2 implementation). + +static void universalInit (dxJointUniversal *j) +{ + dSetZero (j->anchor1,4); + dSetZero (j->anchor2,4); + dSetZero (j->axis1,4); + j->axis1[0] = 1; + dSetZero (j->axis2,4); + j->axis2[1] = 1; + dSetZero(j->qrel1,4); + dSetZero(j->qrel2,4); + j->limot1.init (j->world); + j->limot2.init (j->world); +} + + +static void getUniversalAxes(dxJointUniversal *joint, dVector3 ax1, dVector3 ax2) +{ + // This says "ax1 = joint->node[0].body->R * joint->axis1" + dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); + + if (joint->node[1].body) { + dMULTIPLY0_331 (ax2,joint->node[1].body->R,joint->axis2); + } + else { + ax2[0] = joint->axis2[0]; + ax2[1] = joint->axis2[1]; + ax2[2] = joint->axis2[2]; + } +} + + +static dReal getUniversalAngle1(dxJointUniversal *joint) +{ + if (joint->node[0].body) { + // length 1 joint axis in global coordinates, from each body + dVector3 ax1, ax2; + dMatrix3 R; + dQuaternion qcross, qq, qrel; + + getUniversalAxes (joint,ax1,ax2); + + // It should be possible to get both angles without explicitly + // constructing the rotation matrix of the cross. Basically, + // orientation of the cross about axis1 comes from body 2, + // about axis 2 comes from body 1, and the perpendicular + // axis can come from the two bodies somehow. (We don't really + // want to assume it's 90 degrees, because in general the + // constraints won't be perfectly satisfied, or even very well + // satisfied.) + // + // However, we'd need a version of getHingeAngleFromRElativeQuat() + // that CAN handle when its relative quat is rotated along a direction + // other than the given axis. What I have here works, + // although it's probably much slower than need be. + + dRFrom2Axes(R, ax1[0], ax1[1], ax1[2], ax2[0], ax2[1], ax2[2]); + dRtoQ (R,qcross); + + // This code is essential the same as getHingeAngle(), see the comments + // there for details. + + // get qrel = relative rotation between node[0] and the cross + dQMultiply1 (qq,joint->node[0].body->q,qcross); + dQMultiply2 (qrel,qq,joint->qrel1); + + return getHingeAngleFromRelativeQuat(qrel, joint->axis1); + } + return 0; +} + + +static dReal getUniversalAngle2(dxJointUniversal *joint) +{ + if (joint->node[0].body) { + // length 1 joint axis in global coordinates, from each body + dVector3 ax1, ax2; + dMatrix3 R; + dQuaternion qcross, qq, qrel; + + getUniversalAxes (joint,ax1,ax2); + + // It should be possible to get both angles without explicitly + // constructing the rotation matrix of the cross. Basically, + // orientation of the cross about axis1 comes from body 2, + // about axis 2 comes from body 1, and the perpendicular + // axis can come from the two bodies somehow. (We don't really + // want to assume it's 90 degrees, because in general the + // constraints won't be perfectly satisfied, or even very well + // satisfied.) + // + // However, we'd need a version of getHingeAngleFromRElativeQuat() + // that CAN handle when its relative quat is rotated along a direction + // other than the given axis. What I have here works, + // although it's probably much slower than need be. + + dRFrom2Axes(R, ax2[0], ax2[1], ax2[2], ax1[0], ax1[1], ax1[2]); + dRtoQ(R, qcross); + + if (joint->node[1].body) { + dQMultiply1 (qq, joint->node[1].body->q, qcross); + dQMultiply2 (qrel,qq,joint->qrel2); + } + else { + // pretend joint->node[1].body->q is the identity + dQMultiply2 (qrel,qcross, joint->qrel2); + } + + return - getHingeAngleFromRelativeQuat(qrel, joint->axis2); + } + return 0; +} + + +static void universalGetInfo1 (dxJointUniversal *j, dxJoint::Info1 *info) +{ + info->nub = 4; + info->m = 4; + + // see if we're powered or at a joint limit. + bool constraint1 = j->limot1.fmax > 0; + bool constraint2 = j->limot2.fmax > 0; + + bool limiting1 = (j->limot1.lostop >= -M_PI || j->limot1.histop <= M_PI) && + j->limot1.lostop <= j->limot1.histop; + bool limiting2 = (j->limot2.lostop >= -M_PI || j->limot2.histop <= M_PI) && + j->limot2.lostop <= j->limot2.histop; + + // We need to call testRotationLimit() even if we're motored, since it + // records the result. + if (limiting1 || limiting2) { + dReal angle1, angle2; + angle1 = getUniversalAngle1(j); + angle2 = getUniversalAngle2(j); + if (limiting1 && j->limot1.testRotationalLimit (angle1)) constraint1 = true; + if (limiting2 && j->limot2.testRotationalLimit (angle2)) constraint2 = true; + } + if (constraint1) + info->m++; + if (constraint2) + info->m++; +} + + +static void universalGetInfo2 (dxJointUniversal *joint, dxJoint::Info2 *info) +{ + // set the three ball-and-socket rows + setBall (joint,info,joint->anchor1,joint->anchor2); + + // set the universal joint row. the angular velocity about an axis + // perpendicular to both joint axes should be equal. thus the constraint + // equation is + // p*w1 - p*w2 = 0 + // where p is a vector normal to both joint axes, and w1 and w2 + // are the angular velocity vectors of the two bodies. + + // length 1 joint axis in global coordinates, from each body + dVector3 ax1, ax2; + dVector3 ax2_temp; + // length 1 vector perpendicular to ax1 and ax2. Neither body can rotate + // about this. + dVector3 p; + dReal k; + + getUniversalAxes(joint, ax1, ax2); + k = dDOT(ax1, ax2); + ax2_temp[0] = ax2[0] - k*ax1[0]; + ax2_temp[1] = ax2[1] - k*ax1[1]; + ax2_temp[2] = ax2[2] - k*ax1[2]; + dCROSS(p, =, ax1, ax2_temp); + dNormalize3(p); + + int s3=3*info->rowskip; + + info->J1a[s3+0] = p[0]; + info->J1a[s3+1] = p[1]; + info->J1a[s3+2] = p[2]; + + if (joint->node[1].body) { + info->J2a[s3+0] = -p[0]; + info->J2a[s3+1] = -p[1]; + info->J2a[s3+2] = -p[2]; + } + + // compute the right hand side of the constraint equation. set relative + // body velocities along p to bring the axes back to perpendicular. + // If ax1, ax2 are unit length joint axes as computed from body1 and + // body2, we need to rotate both bodies along the axis p. If theta + // is the angle between ax1 and ax2, we need an angular velocity + // along p to cover the angle erp * (theta - Pi/2) in one step: + // + // |angular_velocity| = angle/time = erp*(theta - Pi/2) / stepsize + // = (erp*fps) * (theta - Pi/2) + // + // if theta is close to Pi/2, + // theta - Pi/2 ~= cos(theta), so + // |angular_velocity| ~= (erp*fps) * (ax1 dot ax2) + + info->c[3] = info->fps * info->erp * - dDOT(ax1, ax2); + + // if the first angle is powered, or has joint limits, add in the stuff + int row = 4 + joint->limot1.addLimot (joint,info,4,ax1,1); + + // if the second angle is powered, or has joint limits, add in more stuff + joint->limot2.addLimot (joint,info,row,ax2,1); +} + + +static void universalComputeInitialRelativeRotations (dxJointUniversal *joint) +{ + if (joint->node[0].body) { + dVector3 ax1, ax2; + dMatrix3 R; + dQuaternion qcross; + + getUniversalAxes(joint, ax1, ax2); + + // Axis 1. + dRFrom2Axes(R, ax1[0], ax1[1], ax1[2], ax2[0], ax2[1], ax2[2]); + dRtoQ(R, qcross); + dQMultiply1 (joint->qrel1, joint->node[0].body->q, qcross); + + // Axis 2. + dRFrom2Axes(R, ax2[0], ax2[1], ax2[2], ax1[0], ax1[1], ax1[2]); + dRtoQ(R, qcross); + if (joint->node[1].body) { + dQMultiply1 (joint->qrel2, joint->node[1].body->q, qcross); + } + else { + // set joint->qrel to qcross + for (int i=0; i<4; i++) joint->qrel2[i] = qcross[i]; + } + } +} + + +extern "C" void dJointSetUniversalAnchor (dxJointUniversal *joint, + dReal x, dReal y, dReal z) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + setAnchors (joint,x,y,z,joint->anchor1,joint->anchor2); + universalComputeInitialRelativeRotations(joint); +} + + +extern "C" void dJointSetUniversalAxis1 (dxJointUniversal *joint, + dReal x, dReal y, dReal z) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if (joint->flags & dJOINT_REVERSE) + setAxes (joint,x,y,z,NULL,joint->axis2); + else + setAxes (joint,x,y,z,joint->axis1,NULL); + universalComputeInitialRelativeRotations(joint); +} + + +extern "C" void dJointSetUniversalAxis2 (dxJointUniversal *joint, + dReal x, dReal y, dReal z) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if (joint->flags & dJOINT_REVERSE) + setAxes (joint,x,y,z,joint->axis1,NULL); + else + setAxes (joint,x,y,z,NULL,joint->axis2); + universalComputeInitialRelativeRotations(joint); +} + + +extern "C" void dJointGetUniversalAnchor (dxJointUniversal *joint, + dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if (joint->flags & dJOINT_REVERSE) + getAnchor2 (joint,result,joint->anchor2); + else + getAnchor (joint,result,joint->anchor1); +} + + +extern "C" void dJointGetUniversalAnchor2 (dxJointUniversal *joint, + dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if (joint->flags & dJOINT_REVERSE) + getAnchor (joint,result,joint->anchor1); + else + getAnchor2 (joint,result,joint->anchor2); +} + + +extern "C" void dJointGetUniversalAxis1 (dxJointUniversal *joint, + dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if (joint->flags & dJOINT_REVERSE) + getAxis2 (joint,result,joint->axis2); + else + getAxis (joint,result,joint->axis1); +} + + +extern "C" void dJointGetUniversalAxis2 (dxJointUniversal *joint, + dVector3 result) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(result,"bad result argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if (joint->flags & dJOINT_REVERSE) + getAxis (joint,result,joint->axis1); + else + getAxis2 (joint,result,joint->axis2); +} + + +extern "C" void dJointSetUniversalParam (dxJointUniversal *joint, + int parameter, dReal value) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if ((parameter & 0xff00) == 0x100) { + joint->limot2.set (parameter & 0xff,value); + } + else { + joint->limot1.set (parameter,value); + } +} + + +extern "C" dReal dJointGetUniversalParam (dxJointUniversal *joint, int parameter) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if ((parameter & 0xff00) == 0x100) { + return joint->limot2.get (parameter & 0xff); + } + else { + return joint->limot1.get (parameter); + } +} + + +extern "C" dReal dJointGetUniversalAngle1 (dxJointUniversal *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if (joint->flags & dJOINT_REVERSE) + return getUniversalAngle2 (joint); + else + return getUniversalAngle1 (joint); +} + + +extern "C" dReal dJointGetUniversalAngle2 (dxJointUniversal *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + if (joint->flags & dJOINT_REVERSE) + return getUniversalAngle1 (joint); + else + return getUniversalAngle2 (joint); +} + + +extern "C" dReal dJointGetUniversalAngle1Rate (dxJointUniversal *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + + if (joint->node[0].body) { + dVector3 axis; + + if (joint->flags & dJOINT_REVERSE) + getAxis2 (joint,axis,joint->axis2); + else + getAxis (joint,axis,joint->axis1); + + dReal rate = dDOT(axis, joint->node[0].body->avel); + if (joint->node[1].body) rate -= dDOT(axis, joint->node[1].body->avel); + return rate; + } + return 0; +} + + +extern "C" dReal dJointGetUniversalAngle2Rate (dxJointUniversal *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + + if (joint->node[0].body) { + dVector3 axis; + + if (joint->flags & dJOINT_REVERSE) + getAxis (joint,axis,joint->axis1); + else + getAxis2 (joint,axis,joint->axis2); + + dReal rate = dDOT(axis, joint->node[0].body->avel); + if (joint->node[1].body) rate -= dDOT(axis, joint->node[1].body->avel); + return rate; + } + return 0; +} + + +extern "C" void dJointAddUniversalTorques (dxJointUniversal *joint, dReal torque1, dReal torque2) +{ + dVector3 axis1, axis2; + dAASSERT(joint); + dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); + + if (joint->flags & dJOINT_REVERSE) { + dReal temp = torque1; + torque1 = - torque2; + torque2 = - temp; + } + + getAxis (joint,axis1,joint->axis1); + getAxis2 (joint,axis2,joint->axis2); + axis1[0] = axis1[0] * torque1 + axis2[0] * torque2; + axis1[1] = axis1[1] * torque1 + axis2[1] * torque2; + axis1[2] = axis1[2] * torque1 + axis2[2] * torque2; + + if (joint->node[0].body != 0) + dBodyAddTorque (joint->node[0].body,axis1[0],axis1[1],axis1[2]); + if (joint->node[1].body != 0) + dBodyAddTorque(joint->node[1].body, -axis1[0], -axis1[1], -axis1[2]); +} + + + + + +dxJoint::Vtable __duniversal_vtable = { + sizeof(dxJointUniversal), + (dxJoint::init_fn*) universalInit, + (dxJoint::getInfo1_fn*) universalGetInfo1, + (dxJoint::getInfo2_fn*) universalGetInfo2, + dJointTypeUniversal}; + +//**************************************************************************** +// angular motor + +static void amotorInit (dxJointAMotor *j) +{ + int i; + j->num = 0; + j->mode = dAMotorUser; + for (i=0; i<3; i++) { + j->rel[i] = 0; + dSetZero (j->axis[i],4); + j->limot[i].init (j->world); + j->angle[i] = 0; + } + dSetZero (j->reference1,4); + dSetZero (j->reference2,4); + + j->flags |= dJOINT_TWOBODIES; +} + + +// compute the 3 axes in global coordinates + +static void amotorComputeGlobalAxes (dxJointAMotor *joint, dVector3 ax[3]) +{ + if (joint->mode == dAMotorEuler) { + // special handling for euler mode + dMULTIPLY0_331 (ax[0],joint->node[0].body->R,joint->axis[0]); + dMULTIPLY0_331 (ax[2],joint->node[1].body->R,joint->axis[2]); + dCROSS (ax[1],=,ax[2],ax[0]); + dNormalize3 (ax[1]); + } + else { + for (int i=0; i < joint->num; i++) { + if (joint->rel[i] == 1) { + // relative to b1 + dMULTIPLY0_331 (ax[i],joint->node[0].body->R,joint->axis[i]); + } + if (joint->rel[i] == 2) { + // relative to b2 + dMULTIPLY0_331 (ax[i],joint->node[1].body->R,joint->axis[i]); + } + else { + // global - just copy it + ax[i][0] = joint->axis[i][0]; + ax[i][1] = joint->axis[i][1]; + ax[i][2] = joint->axis[i][2]; + } + } + } +} + + +static void amotorComputeEulerAngles (dxJointAMotor *joint, dVector3 ax[3]) +{ + // assumptions: + // global axes already calculated --> ax + // axis[0] is relative to body 1 --> global ax[0] + // axis[2] is relative to body 2 --> global ax[2] + // ax[1] = ax[2] x ax[0] + // original ax[0] and ax[2] are perpendicular + // reference1 is perpendicular to ax[0] (in body 1 frame) + // reference2 is perpendicular to ax[2] (in body 2 frame) + // all ax[] and reference vectors are unit length + + // calculate references in global frame + dVector3 ref1,ref2; + dMULTIPLY0_331 (ref1,joint->node[0].body->R,joint->reference1); + dMULTIPLY0_331 (ref2,joint->node[1].body->R,joint->reference2); + + // get q perpendicular to both ax[0] and ref1, get first euler angle + dVector3 q; + dCROSS (q,=,ax[0],ref1); + joint->angle[0] = -dAtan2 (dDOT(ax[2],q),dDOT(ax[2],ref1)); + + // get q perpendicular to both ax[0] and ax[1], get second euler angle + dCROSS (q,=,ax[0],ax[1]); + joint->angle[1] = -dAtan2 (dDOT(ax[2],ax[0]),dDOT(ax[2],q)); + + // get q perpendicular to both ax[1] and ax[2], get third euler angle + dCROSS (q,=,ax[1],ax[2]); + joint->angle[2] = -dAtan2 (dDOT(ref2,ax[1]), dDOT(ref2,q)); +} + + +// set the reference vectors as follows: +// * reference1 = current axis[2] relative to body 1 +// * reference2 = current axis[0] relative to body 2 +// this assumes that: +// * axis[0] is relative to body 1 +// * axis[2] is relative to body 2 + +static void amotorSetEulerReferenceVectors (dxJointAMotor *j) +{ + if (j->node[0].body && j->node[1].body) { + dVector3 r; // axis[2] and axis[0] in global coordinates + dMULTIPLY0_331 (r,j->node[1].body->R,j->axis[2]); + dMULTIPLY1_331 (j->reference1,j->node[0].body->R,r); + dMULTIPLY0_331 (r,j->node[0].body->R,j->axis[0]); + dMULTIPLY1_331 (j->reference2,j->node[1].body->R,r); + } +} + + +static void amotorGetInfo1 (dxJointAMotor *j, dxJoint::Info1 *info) +{ + info->m = 0; + info->nub = 0; + + // compute the axes and angles, if in euler mode + if (j->mode == dAMotorEuler) { + dVector3 ax[3]; + amotorComputeGlobalAxes (j,ax); + amotorComputeEulerAngles (j,ax); + } + + // see if we're powered or at a joint limit for each axis + for (int i=0; i < j->num; i++) { + if (j->limot[i].testRotationalLimit (j->angle[i]) || + j->limot[i].fmax > 0) { + info->m++; + } + } +} + + +static void amotorGetInfo2 (dxJointAMotor *joint, dxJoint::Info2 *info) +{ + int i; + + // compute the axes (if not global) + dVector3 ax[3]; + amotorComputeGlobalAxes (joint,ax); + + // in euler angle mode we do not actually constrain the angular velocity + // along the axes axis[0] and axis[2] (although we do use axis[1]) : + // + // to get constrain w2-w1 along ...not + // ------ --------------------- ------ + // d(angle[0])/dt = 0 ax[1] x ax[2] ax[0] + // d(angle[1])/dt = 0 ax[1] + // d(angle[2])/dt = 0 ax[0] x ax[1] ax[2] + // + // constraining w2-w1 along an axis 'a' means that a'*(w2-w1)=0. + // to prove the result for angle[0], write the expression for angle[0] from + // GetInfo1 then take the derivative. to prove this for angle[2] it is + // easier to take the euler rate expression for d(angle[2])/dt with respect + // to the components of w and set that to 0. + + dVector3 *axptr[3]; + axptr[0] = &ax[0]; + axptr[1] = &ax[1]; + axptr[2] = &ax[2]; + + dVector3 ax0_cross_ax1; + dVector3 ax1_cross_ax2; + if (joint->mode == dAMotorEuler) { + dCROSS (ax0_cross_ax1,=,ax[0],ax[1]); + axptr[2] = &ax0_cross_ax1; + dCROSS (ax1_cross_ax2,=,ax[1],ax[2]); + axptr[0] = &ax1_cross_ax2; + } + + int row=0; + for (i=0; i < joint->num; i++) { + row += joint->limot[i].addLimot (joint,info,row,*(axptr[i]),1); + } +} + + +extern "C" void dJointSetAMotorNumAxes (dxJointAMotor *joint, int num) +{ + dAASSERT(joint && num >= 0 && num <= 3); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + if (joint->mode == dAMotorEuler) { + joint->num = 3; + } + else { + if (num < 0) num = 0; + if (num > 3) num = 3; + joint->num = num; + } +} + + +extern "C" void dJointSetAMotorAxis (dxJointAMotor *joint, int anum, int rel, + dReal x, dReal y, dReal z) +{ + dAASSERT(joint && anum >= 0 && anum <= 2 && rel >= 0 && rel <= 2); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + if (anum < 0) anum = 0; + if (anum > 2) anum = 2; + joint->rel[anum] = rel; + + // x,y,z is always in global coordinates regardless of rel, so we may have + // to convert it to be relative to a body + dVector3 r; + r[0] = x; + r[1] = y; + r[2] = z; + r[3] = 0; + if (rel > 0) { + if (rel==1) { + dMULTIPLY1_331 (joint->axis[anum],joint->node[0].body->R,r); + } + else { + dMULTIPLY1_331 (joint->axis[anum],joint->node[1].body->R,r); + } + } + else { + joint->axis[anum][0] = r[0]; + joint->axis[anum][1] = r[1]; + joint->axis[anum][2] = r[2]; + } + dNormalize3 (joint->axis[anum]); + if (joint->mode == dAMotorEuler) amotorSetEulerReferenceVectors (joint); +} + + +extern "C" void dJointSetAMotorAngle (dxJointAMotor *joint, int anum, + dReal angle) +{ + dAASSERT(joint && anum >= 0 && anum < 3); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + if (joint->mode == dAMotorUser) { + if (anum < 0) anum = 0; + if (anum > 3) anum = 3; + joint->angle[anum] = angle; + } +} + + +extern "C" void dJointSetAMotorParam (dxJointAMotor *joint, int parameter, + dReal value) +{ + dAASSERT(joint); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + int anum = parameter >> 8; + if (anum < 0) anum = 0; + if (anum > 2) anum = 2; + parameter &= 0xff; + joint->limot[anum].set (parameter, value); +} + + +extern "C" void dJointSetAMotorMode (dxJointAMotor *joint, int mode) +{ + dAASSERT(joint); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + joint->mode = mode; + if (joint->mode == dAMotorEuler) { + joint->num = 3; + amotorSetEulerReferenceVectors (joint); + } +} + + +extern "C" int dJointGetAMotorNumAxes (dxJointAMotor *joint) +{ + dAASSERT(joint); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + return joint->num; +} + + +extern "C" void dJointGetAMotorAxis (dxJointAMotor *joint, int anum, + dVector3 result) +{ + dAASSERT(joint && anum >= 0 && anum < 3); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + if (anum < 0) anum = 0; + if (anum > 2) anum = 2; + if (joint->rel[anum] > 0) { + if (joint->rel[anum]==1) { + dMULTIPLY0_331 (result,joint->node[0].body->R,joint->axis[anum]); + } + else { + dMULTIPLY0_331 (result,joint->node[1].body->R,joint->axis[anum]); + } + } + else { + result[0] = joint->axis[anum][0]; + result[1] = joint->axis[anum][1]; + result[2] = joint->axis[anum][2]; + } +} + + +extern "C" int dJointGetAMotorAxisRel (dxJointAMotor *joint, int anum) +{ + dAASSERT(joint && anum >= 0 && anum < 3); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + if (anum < 0) anum = 0; + if (anum > 2) anum = 2; + return joint->rel[anum]; +} + + +extern "C" dReal dJointGetAMotorAngle (dxJointAMotor *joint, int anum) +{ + dAASSERT(joint && anum >= 0 && anum < 3); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + if (anum < 0) anum = 0; + if (anum > 3) anum = 3; + return joint->angle[anum]; +} + + +extern "C" dReal dJointGetAMotorAngleRate (dxJointAMotor *joint, int anum) +{ + // @@@ + dDebug (0,"not yet implemented"); + return 0; +} + + +extern "C" dReal dJointGetAMotorParam (dxJointAMotor *joint, int parameter) +{ + dAASSERT(joint); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + int anum = parameter >> 8; + if (anum < 0) anum = 0; + if (anum > 2) anum = 2; + parameter &= 0xff; + return joint->limot[anum].get (parameter); +} + + +extern "C" int dJointGetAMotorMode (dxJointAMotor *joint) +{ + dAASSERT(joint); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + return joint->mode; +} + + +extern "C" void dJointAddAMotorTorques (dxJointAMotor *joint, dReal torque1, dReal torque2, dReal torque3) +{ + dVector3 axes[3]; + dAASSERT(joint); + dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); + + if (joint->num == 0) + return; + dUASSERT((joint->flags & dJOINT_REVERSE) == 0, "dJointAddAMotorTorques not yet implemented for reverse AMotor joints"); + + amotorComputeGlobalAxes (joint,axes); + axes[0][0] *= torque1; + axes[0][1] *= torque1; + axes[0][2] *= torque1; + if (joint->num >= 2) { + axes[0][0] += axes[1][0] * torque2; + axes[0][1] += axes[1][0] * torque2; + axes[0][2] += axes[1][0] * torque2; + if (joint->num >= 3) { + axes[0][0] += axes[2][0] * torque3; + axes[0][1] += axes[2][0] * torque3; + axes[0][2] += axes[2][0] * torque3; + } + } + + if (joint->node[0].body != 0) + dBodyAddTorque (joint->node[0].body,axes[0][0],axes[0][1],axes[0][2]); + if (joint->node[1].body != 0) + dBodyAddTorque(joint->node[1].body, -axes[0][0], -axes[0][1], -axes[0][2]); +} + + +dxJoint::Vtable __damotor_vtable = { + sizeof(dxJointAMotor), + (dxJoint::init_fn*) amotorInit, + (dxJoint::getInfo1_fn*) amotorGetInfo1, + (dxJoint::getInfo2_fn*) amotorGetInfo2, + dJointTypeAMotor}; + +//**************************************************************************** +// fixed joint + +static void fixedInit (dxJointFixed *j) +{ + dSetZero (j->offset,4); + dSetZero (j->qrel,4); +} + + +static void fixedGetInfo1 (dxJointFixed *j, dxJoint::Info1 *info) +{ + info->m = 6; + info->nub = 6; +} + + +static void fixedGetInfo2 (dxJointFixed *joint, dxJoint::Info2 *info) +{ + int s = info->rowskip; + + // Three rows for orientation + setFixedOrientation(joint, info, joint->qrel, 3); + + // Three rows for position. + // set jacobian + info->J1l[0] = 1; + info->J1l[s+1] = 1; + info->J1l[2*s+2] = 1; + + dVector3 ofs; + dMULTIPLY0_331 (ofs,joint->node[0].body->R,joint->offset); + if (joint->node[1].body) { + dCROSSMAT (info->J1a,ofs,s,+,-); + info->J2l[0] = -1; + info->J2l[s+1] = -1; + info->J2l[2*s+2] = -1; + } + + // set right hand side for the first three rows (linear) + dReal k = info->fps * info->erp; + if (joint->node[1].body) { + for (int j=0; j<3; j++) + info->c[j] = k * (joint->node[1].body->pos[j] - + joint->node[0].body->pos[j] + ofs[j]); + } + else { + for (int j=0; j<3; j++) + info->c[j] = k * (joint->offset[j] - joint->node[0].body->pos[j]); + } +} + + +extern "C" void dJointSetFixed (dxJointFixed *joint) +{ + dUASSERT(joint,"bad joint argument"); + dUASSERT(joint->vtable == &__dfixed_vtable,"joint is not fixed"); + int i; + + // This code is taken from sJointSetSliderAxis(), we should really put the + // common code in its own function. + // compute the offset between the bodies + if (joint->node[0].body) { + if (joint->node[1].body) { + dQMultiply1 (joint->qrel,joint->node[0].body->q,joint->node[1].body->q); + dReal ofs[4]; + for (i=0; i<4; i++) ofs[i] = joint->node[0].body->pos[i]; + for (i=0; i<4; i++) ofs[i] -= joint->node[1].body->pos[i]; + dMULTIPLY1_331 (joint->offset,joint->node[0].body->R,ofs); + } + else { + // set joint->qrel to the transpose of the first body's q + joint->qrel[0] = joint->node[0].body->q[0]; + for (i=1; i<4; i++) joint->qrel[i] = -joint->node[0].body->q[i]; + for (i=0; i<4; i++) joint->offset[i] = joint->node[0].body->pos[i]; + } + } +} + + +dxJoint::Vtable __dfixed_vtable = { + sizeof(dxJointFixed), + (dxJoint::init_fn*) fixedInit, + (dxJoint::getInfo1_fn*) fixedGetInfo1, + (dxJoint::getInfo2_fn*) fixedGetInfo2, + dJointTypeFixed}; + +//**************************************************************************** +// null joint + +static void nullGetInfo1 (dxJointNull *j, dxJoint::Info1 *info) +{ + info->m = 0; + info->nub = 0; +} + + +static void nullGetInfo2 (dxJointNull *joint, dxJoint::Info2 *info) +{ + dDebug (0,"this should never get called"); +} + + +dxJoint::Vtable __dnull_vtable = { + sizeof(dxJointNull), + (dxJoint::init_fn*) 0, + (dxJoint::getInfo1_fn*) nullGetInfo1, + (dxJoint::getInfo2_fn*) nullGetInfo2, + dJointTypeNull}; + +/******************** breakable joint contribution ***********************/ +extern "C" void dJointSetBreakable (dxJoint *joint, int b) { + dAASSERT(joint); + if (b) { + // we want this joint to be breakable but we must first check if it + // was already breakable + if (!joint->breakInfo) { + // allocate a dxJointBreakInfo struct + joint->breakInfo = new dxJointBreakInfo; + joint->breakInfo->flags = 0; + for (int i = 0; i < 3; i++) { + joint->breakInfo->b1MaxF[0] = 0; + joint->breakInfo->b1MaxT[0] = 0; + joint->breakInfo->b2MaxF[0] = 0; + joint->breakInfo->b2MaxT[0] = 0; + } + joint->breakInfo->callback = 0; + } + else { + // the joint was already breakable + return; + } + } + else { + // we want this joint to be unbreakable mut we must first check if + // it is alreay unbreakable + if (joint->breakInfo) { + // deallocate the dxJointBreakInfo struct + delete joint->breakInfo; + joint->breakInfo = 0; + } + else { + // the joint was already unbreakable + return; + } + } +} + +extern "C" void dJointSetBreakCallback (dxJoint *joint, dJointBreakCallback *callbackFunc) { + dAASSERT(joint); +# ifndef dNODEBUG + // only works for a breakable joint + if (!joint->breakInfo) { + dDebug (0, "dJointSetBreakCallback called on unbreakable joint"); + } +# endif + joint->breakInfo->callback = callbackFunc; +} + +extern "C" void dJointSetBreakMode (dxJoint *joint, int mode) { + dAASSERT(joint); +# ifndef dNODEBUG + // only works for a breakable joint + if (!joint->breakInfo) { + dDebug (0, "dJointSetBreakMode called on unbreakable joint"); + } +# endif + joint->breakInfo->flags = mode; +} + +extern "C" int dJointGetBreakMode (dxJoint *joint) { + dAASSERT(joint); +# ifndef dNODEBUG + // only works for a breakable joint + if (!joint->breakInfo) { + dDebug (0, "dJointGetBreakMode called on unbreakable joint"); + } +# endif + return joint->breakInfo->flags; +} + +extern "C" void dJointSetBreakForce (dxJoint *joint, int body, dReal x, dReal y, dReal z) { + dAASSERT(joint); +# ifndef dNODEBUG + // only works for a breakable joint + if (!joint->breakInfo) { + dDebug (0, "dJointSetBreakForce called on unbreakable joint"); + } +# endif + if (body) { + joint->breakInfo->b2MaxF[0] = x; + joint->breakInfo->b2MaxF[1] = y; + joint->breakInfo->b2MaxF[2] = z; + } + else { + joint->breakInfo->b1MaxF[0] = x; + joint->breakInfo->b1MaxF[1] = y; + joint->breakInfo->b1MaxF[2] = z; + } +} + +extern "C" void dJointSetBreakTorque (dxJoint *joint, int body, dReal x, dReal y, dReal z) { + dAASSERT(joint); +# ifndef dNODEBUG + // only works for a breakable joint + if (!joint->breakInfo) { + dDebug (0, "dJointSetBreakTorque called on unbreakable joint"); + } +# endif + if (body) { + joint->breakInfo->b2MaxT[0] = x; + joint->breakInfo->b2MaxT[1] = y; + joint->breakInfo->b2MaxT[2] = z; + } + else { + joint->breakInfo->b1MaxT[0] = x; + joint->breakInfo->b1MaxT[1] = y; + joint->breakInfo->b1MaxT[2] = z; + } +} + +extern "C" int dJointIsBreakable (dxJoint *joint) { + dAASSERT(joint); + return joint->breakInfo != 0; +} + +extern "C" void dJointGetBreakForce (dxJoint *joint, int body, dReal *force) { + dAASSERT(joint); +# ifndef dNODEBUG + // only works for a breakable joint + if (!joint->breakInfo) { + dDebug (0, "dJointGetBreakForce called on unbreakable joint"); + } +# endif + if (body) + for (int i=0; i<3; i++) force[i]=joint->breakInfo->b2MaxF[i]; + else + for (int i=0; i<3; i++) force[i]=joint->breakInfo->b1MaxF[i]; +} + +extern "C" void dJointGetBreakTorque (dxJoint *joint, int body, dReal *torque) { + dAASSERT(joint); +# ifndef dNODEBUG + // only works for a breakable joint + if (!joint->breakInfo) { + dDebug (0, "dJointGetBreakTorque called on unbreakable joint"); + } +# endif + if (body) + for (int i=0; i<3; i++) torque[i]=joint->breakInfo->b2MaxT[i]; + else + for (int i=0; i<3; i++) torque[i]=joint->breakInfo->b1MaxT[i]; +} +/*************************************************************************/ diff -Nru ode-0.11.1/contrib/BreakableJoints/joint.h ode-0.14/contrib/BreakableJoints/joint.h --- ode-0.11.1/contrib/BreakableJoints/joint.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/joint.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,282 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +#ifndef _ODE_JOINT_H_ +#define _ODE_JOINT_H_ + + +#include "objects.h" +#include +#include "obstack.h" + + +// joint flags +enum { + // if this flag is set, the joint was allocated in a joint group + dJOINT_INGROUP = 1, + + // if this flag is set, the joint was attached with arguments (0,body). + // our convention is to treat all attaches as (body,0), i.e. so node[0].body + // is always nonzero, so this flag records the fact that the arguments were + // swapped. + dJOINT_REVERSE = 2, + + // if this flag is set, the joint can not have just one body attached to it, + // it must have either zero or two bodies attached. + dJOINT_TWOBODIES = 4 +}; + + +// there are two of these nodes in the joint, one for each connection to a +// body. these are node of a linked list kept by each body of it's connecting +// joints. but note that the body pointer in each node points to the body that +// makes use of the *other* node, not this node. this trick makes it a bit +// easier to traverse the body/joint graph. + +struct dxJointNode { + dxJoint *joint; // pointer to enclosing dxJoint object + dxBody *body; // *other* body this joint is connected to + dxJointNode *next; // next node in body's list of connected joints +}; + +/******************** breakable joint contribution ***********************/ +struct dxJointBreakInfo : public dBase { + int flags; + dReal b1MaxF[3]; // maximum force on body 1 + dReal b1MaxT[3]; // maximum torque on body 1 + dReal b2MaxF[3]; // maximum force on body 2 + dReal b2MaxT[3]; // maximum torque on body 2 + dJointBreakCallback *callback; // function that is called when this joint breaks +}; +/*************************************************************************/ + +struct dxJoint : public dObject { + // naming convention: the "first" body this is connected to is node[0].body, + // and the "second" body is node[1].body. if this joint is only connected + // to one body then the second body is 0. + + // info returned by getInfo1 function. the constraint dimension is m (<=6). + // i.e. that is the total number of rows in the jacobian. `nub' is the + // number of unbounded variables (which have lo,hi = -/+ infinity). + + struct Info1 { + int m,nub; + }; + + // info returned by getInfo2 function + + struct Info2 { + // integrator parameters: frames per second (1/stepsize), default error + // reduction parameter (0..1). + dReal fps,erp; + + // for the first and second body, pointers to two (linear and angular) + // n*3 jacobian sub matrices, stored by rows. these matrices will have + // been initialized to 0 on entry. if the second body is zero then the + // J2xx pointers may be 0. + dReal *J1l,*J1a,*J2l,*J2a; + + // elements to jump from one row to the next in J's + int rowskip; + + // right hand sides of the equation J*v = c + cfm * lambda. cfm is the + // "constraint force mixing" vector. c is set to zero on entry, cfm is + // set to a constant value (typically very small or zero) value on entry. + dReal *c,*cfm; + + // lo and hi limits for variables (set to -/+ infinity on entry). + dReal *lo,*hi; + + // findex vector for variables. see the LCP solver interface for a + // description of what this does. this is set to -1 on entry. + // note that the returned indexes are relative to the first index of + // the constraint. + int *findex; + }; + + // virtual function table: size of the joint structure, function pointers. + // we do it this way instead of using C++ virtual functions because + // sometimes we need to allocate joints ourself within a memory pool. + + typedef void init_fn (dxJoint *joint); + typedef void getInfo1_fn (dxJoint *joint, Info1 *info); + typedef void getInfo2_fn (dxJoint *joint, Info2 *info); + struct Vtable { + int size; + init_fn *init; + getInfo1_fn *getInfo1; + getInfo2_fn *getInfo2; + int typenum; // a dJointTypeXXX type number + }; + + Vtable *vtable; // virtual function table + int flags; // dJOINT_xxx flags + dxJointNode node[2]; // connections to bodies. node[1].body can be 0 + dJointFeedback *feedback; // optional feedback structure + + /******************** breakable joint contribution ***********************/ + // optional break info structure. if this is not NULL the the joint is + // breakable. + dxJointBreakInfo *breakInfo; + /*************************************************************************/ +}; + + +// joint group. NOTE: any joints in the group that have their world destroyed +// will have their world pointer set to 0. + +struct dxJointGroup : public dBase { + int num; // number of joints on the stack + dObStack stack; // a stack of (possibly differently sized) dxJoint +}; // objects. + + +// common limit and motor information for a single joint axis of movement +struct dxJointLimitMotor { + dReal vel,fmax; // powered joint: velocity, max force + dReal lostop,histop; // joint limits, relative to initial position + dReal fudge_factor; // when powering away from joint limits + dReal normal_cfm; // cfm to use when not at a stop + dReal stop_erp,stop_cfm; // erp and cfm for when at joint limit + dReal bounce; // restitution factor + // variables used between getInfo1() and getInfo2() + int limit; // 0=free, 1=at lo limit, 2=at hi limit + dReal limit_err; // if at limit, amount over limit + + void init (dxWorld *); + void set (int num, dReal value); + dReal get (int num); + int testRotationalLimit (dReal angle); + int addLimot (dxJoint *joint, dxJoint::Info2 *info, int row, + dVector3 ax1, int rotational); +}; + + +// ball and socket + +struct dxJointBall : public dxJoint { + dVector3 anchor1; // anchor w.r.t first body + dVector3 anchor2; // anchor w.r.t second body +}; +extern struct dxJoint::Vtable __dball_vtable; + + +// hinge + +struct dxJointHinge : public dxJoint { + dVector3 anchor1; // anchor w.r.t first body + dVector3 anchor2; // anchor w.r.t second body + dVector3 axis1; // axis w.r.t first body + dVector3 axis2; // axis w.r.t second body + dQuaternion qrel; // initial relative rotation body1 -> body2 + dxJointLimitMotor limot; // limit and motor information +}; +extern struct dxJoint::Vtable __dhinge_vtable; + + +// universal + +struct dxJointUniversal : public dxJoint { + dVector3 anchor1; // anchor w.r.t first body + dVector3 anchor2; // anchor w.r.t second body + dVector3 axis1; // axis w.r.t first body + dVector3 axis2; // axis w.r.t second body + dQuaternion qrel1; // initial relative rotation body1 -> virtual cross piece + dQuaternion qrel2; // initial relative rotation virtual cross piece -> body2 + dxJointLimitMotor limot1; // limit and motor information for axis1 + dxJointLimitMotor limot2; // limit and motor information for axis2 +}; +extern struct dxJoint::Vtable __duniversal_vtable; + + +// slider. if body2 is 0 then qrel is the absolute rotation of body1 and +// offset is the position of body1 center along axis1. + +struct dxJointSlider : public dxJoint { + dVector3 axis1; // axis w.r.t first body + dQuaternion qrel; // initial relative rotation body1 -> body2 + dVector3 offset; // point relative to body2 that should be + // aligned with body1 center along axis1 + dxJointLimitMotor limot; // limit and motor information +}; +extern struct dxJoint::Vtable __dslider_vtable; + + +// contact + +struct dxJointContact : public dxJoint { + int the_m; // number of rows computed by getInfo1 + dContact contact; +}; +extern struct dxJoint::Vtable __dcontact_vtable; + + +// hinge 2 + +struct dxJointHinge2 : public dxJoint { + dVector3 anchor1; // anchor w.r.t first body + dVector3 anchor2; // anchor w.r.t second body + dVector3 axis1; // axis 1 w.r.t first body + dVector3 axis2; // axis 2 w.r.t second body + dReal c0,s0; // cos,sin of desired angle between axis 1,2 + dVector3 v1,v2; // angle ref vectors embedded in first body + dxJointLimitMotor limot1; // limit+motor info for axis 1 + dxJointLimitMotor limot2; // limit+motor info for axis 2 + dReal susp_erp,susp_cfm; // suspension parameters (erp,cfm) +}; +extern struct dxJoint::Vtable __dhinge2_vtable; + + +// angular motor + +struct dxJointAMotor : public dxJoint { + int num; // number of axes (0..3) + int mode; // a dAMotorXXX constant + int rel[3]; // what the axes are relative to (global,b1,b2) + dVector3 axis[3]; // three axes + dxJointLimitMotor limot[3]; // limit+motor info for axes + dReal angle[3]; // user-supplied angles for axes + // these vectors are used for calculating euler angles + dVector3 reference1; // original axis[2], relative to body 1 + dVector3 reference2; // original axis[0], relative to body 2 +}; +extern struct dxJoint::Vtable __damotor_vtable; + + +// fixed + +struct dxJointFixed : public dxJoint { + dQuaternion qrel; // initial relative rotation body1 -> body2 + dVector3 offset; // relative offset between the bodies +}; +extern struct dxJoint::Vtable __dfixed_vtable; + + +// null joint, for testing only + +struct dxJointNull : public dxJoint { +}; +extern struct dxJoint::Vtable __dnull_vtable; + + + +#endif diff -Nru ode-0.11.1/contrib/BreakableJoints/objects.h ode-0.14/contrib/BreakableJoints/objects.h --- ode-0.11.1/contrib/BreakableJoints/objects.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/objects.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,252 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +#ifndef _ODE_OBJECTS_H_ +#define _ODE_OBJECTS_H_ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* world */ + +dWorldID dWorldCreate(); +void dWorldDestroy (dWorldID); + +void dWorldSetGravity (dWorldID, dReal x, dReal y, dReal z); +void dWorldGetGravity (dWorldID, dVector3 gravity); +void dWorldSetERP (dWorldID, dReal erp); +dReal dWorldGetERP (dWorldID); +void dWorldSetCFM (dWorldID, dReal cfm); +dReal dWorldGetCFM (dWorldID); +void dWorldStep (dWorldID, dReal stepsize); +void dWorldImpulseToForce (dWorldID, dReal stepsize, + dReal ix, dReal iy, dReal iz, dVector3 force); + +/* StepFast1 functions */ + +void dWorldStepFast1(dWorldID, dReal stepsize, int maxiterations); +void dWorldSetAutoEnableDepthSF1(dWorldID, int autoEnableDepth); + +int dWorldGetAutoEnableDepthSF1(dWorldID); + +void dBodySetAutoDisableThresholdSF1(dBodyID, dReal autoDisableThreshold); + +/* These functions are not yet implemented by ODE. */ +/* +dReal dBodyGetAutoDisableThresholdSF1(dBodyID); + +void dBodySetAutoDisableStepsSF1(dBodyID, int AutoDisableSteps); + +int dBodyGetAutoDisableStepsSF1(dBodyID); + +void dBodySetAutoDisableSF1(dBodyID, int doAutoDisable); + +int dBodyGetAutoDisableSF1(dBodyID); +*/ + +/* bodies */ + +dBodyID dBodyCreate (dWorldID); +void dBodyDestroy (dBodyID); + +void dBodySetData (dBodyID, void *data); +void *dBodyGetData (dBodyID); + +void dBodySetPosition (dBodyID, dReal x, dReal y, dReal z); +void dBodySetRotation (dBodyID, const dMatrix3 R); +void dBodySetQuaternion (dBodyID, const dQuaternion q); +void dBodySetLinearVel (dBodyID, dReal x, dReal y, dReal z); +void dBodySetAngularVel (dBodyID, dReal x, dReal y, dReal z); +const dReal * dBodyGetPosition (dBodyID); +const dReal * dBodyGetRotation (dBodyID); /* ptr to 4x3 rot matrix */ +const dReal * dBodyGetQuaternion (dBodyID); +const dReal * dBodyGetLinearVel (dBodyID); +const dReal * dBodyGetAngularVel (dBodyID); + +void dBodySetMass (dBodyID, const dMass *mass); +void dBodyGetMass (dBodyID, dMass *mass); + +void dBodyAddForce (dBodyID, dReal fx, dReal fy, dReal fz); +void dBodyAddTorque (dBodyID, dReal fx, dReal fy, dReal fz); +void dBodyAddRelForce (dBodyID, dReal fx, dReal fy, dReal fz); +void dBodyAddRelTorque (dBodyID, dReal fx, dReal fy, dReal fz); +void dBodyAddForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, + dReal px, dReal py, dReal pz); +void dBodyAddForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, + dReal px, dReal py, dReal pz); +void dBodyAddRelForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, + dReal px, dReal py, dReal pz); +void dBodyAddRelForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, + dReal px, dReal py, dReal pz); + +const dReal * dBodyGetForce (dBodyID); +const dReal * dBodyGetTorque (dBodyID); +void dBodySetForce (dBodyID b, dReal x, dReal y, dReal z); +void dBodySetTorque (dBodyID b, dReal x, dReal y, dReal z); + +void dBodyGetRelPointPos (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result); +void dBodyGetRelPointVel (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result); +void dBodyGetPointVel (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result); +void dBodyGetPosRelPoint (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result); +void dBodyVectorToWorld (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result); +void dBodyVectorFromWorld (dBodyID, dReal px, dReal py, dReal pz, + dVector3 result); + +void dBodySetFiniteRotationMode (dBodyID, int mode); +void dBodySetFiniteRotationAxis (dBodyID, dReal x, dReal y, dReal z); + +int dBodyGetFiniteRotationMode (dBodyID); +void dBodyGetFiniteRotationAxis (dBodyID, dVector3 result); + +int dBodyGetNumJoints (dBodyID b); +dJointID dBodyGetJoint (dBodyID, int index); + +void dBodyEnable (dBodyID); +void dBodyDisable (dBodyID); +int dBodyIsEnabled (dBodyID); + +void dBodySetGravityMode (dBodyID b, int mode); +int dBodyGetGravityMode (dBodyID b); + + +/* joints */ + +dJointID dJointCreateBall (dWorldID, dJointGroupID); +dJointID dJointCreateHinge (dWorldID, dJointGroupID); +dJointID dJointCreateSlider (dWorldID, dJointGroupID); +dJointID dJointCreateContact (dWorldID, dJointGroupID, const dContact *); +dJointID dJointCreateHinge2 (dWorldID, dJointGroupID); +dJointID dJointCreateUniversal (dWorldID, dJointGroupID); +dJointID dJointCreateFixed (dWorldID, dJointGroupID); +dJointID dJointCreateNull (dWorldID, dJointGroupID); +dJointID dJointCreateAMotor (dWorldID, dJointGroupID); + +void dJointDestroy (dJointID); + +dJointGroupID dJointGroupCreate (int max_size); +void dJointGroupDestroy (dJointGroupID); +void dJointGroupEmpty (dJointGroupID); + +void dJointAttach (dJointID, dBodyID body1, dBodyID body2); +void dJointSetData (dJointID, void *data); +void *dJointGetData (dJointID); +int dJointGetType (dJointID); +dBodyID dJointGetBody (dJointID, int index); + +void dJointSetFeedback (dJointID, dJointFeedback *); +dJointFeedback *dJointGetFeedback (dJointID); + +/******************** breakable joint contribution ***********************/ +void dJointSetBreakable (dJointID, int b); +void dJointSetBreakCallback (dJointID, dJointBreakCallback *callbackFunc); +void dJointSetBreakMode (dJointID, int mode); +int dJointGetBreakMode (dJointID); +void dJointSetBreakForce (dJointID, int body, dReal x, dReal y, dReal z); +void dJointSetBreakTorque (dJointID, int body, dReal x, dReal y, dReal z); +int dJointIsBreakable (dJointID); +void dJointGetBreakForce (dJointID, int body, dReal *force); +void dJointGetBreakTorque (dJointID, int body, dReal *torque); +/*************************************************************************/ + +void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); +void dJointSetHingeAnchor (dJointID, dReal x, dReal y, dReal z); +void dJointSetHingeAxis (dJointID, dReal x, dReal y, dReal z); +void dJointSetHingeParam (dJointID, int parameter, dReal value); +void dJointAddHingeTorque(dJointID joint, dReal torque); +void dJointSetSliderAxis (dJointID, dReal x, dReal y, dReal z); +void dJointSetSliderParam (dJointID, int parameter, dReal value); +void dJointAddSliderForce(dJointID joint, dReal force); +void dJointSetHinge2Anchor (dJointID, dReal x, dReal y, dReal z); +void dJointSetHinge2Axis1 (dJointID, dReal x, dReal y, dReal z); +void dJointSetHinge2Axis2 (dJointID, dReal x, dReal y, dReal z); +void dJointSetHinge2Param (dJointID, int parameter, dReal value); +void dJointAddHinge2Torques(dJointID joint, dReal torque1, dReal torque2); +void dJointSetUniversalAnchor (dJointID, dReal x, dReal y, dReal z); +void dJointSetUniversalAxis1 (dJointID, dReal x, dReal y, dReal z); +void dJointSetUniversalAxis2 (dJointID, dReal x, dReal y, dReal z); +void dJointSetUniversalParam (dJointID, int parameter, dReal value); +void dJointAddUniversalTorques(dJointID joint, dReal torque1, dReal torque2); +void dJointSetFixed (dJointID); +void dJointSetAMotorNumAxes (dJointID, int num); +void dJointSetAMotorAxis (dJointID, int anum, int rel, + dReal x, dReal y, dReal z); +void dJointSetAMotorAngle (dJointID, int anum, dReal angle); +void dJointSetAMotorParam (dJointID, int parameter, dReal value); +void dJointSetAMotorMode (dJointID, int mode); +void dJointAddAMotorTorques (dJointID, dReal torque1, dReal torque2, dReal torque3); + +void dJointGetBallAnchor (dJointID, dVector3 result); +void dJointGetBallAnchor2 (dJointID, dVector3 result); +void dJointGetHingeAnchor (dJointID, dVector3 result); +void dJointGetHingeAnchor2 (dJointID, dVector3 result); +void dJointGetHingeAxis (dJointID, dVector3 result); +dReal dJointGetHingeParam (dJointID, int parameter); +dReal dJointGetHingeAngle (dJointID); +dReal dJointGetHingeAngleRate (dJointID); +dReal dJointGetSliderPosition (dJointID); +dReal dJointGetSliderPositionRate (dJointID); +void dJointGetSliderAxis (dJointID, dVector3 result); +dReal dJointGetSliderParam (dJointID, int parameter); +void dJointGetHinge2Anchor (dJointID, dVector3 result); +void dJointGetHinge2Anchor2 (dJointID, dVector3 result); +void dJointGetHinge2Axis1 (dJointID, dVector3 result); +void dJointGetHinge2Axis2 (dJointID, dVector3 result); +dReal dJointGetHinge2Param (dJointID, int parameter); +dReal dJointGetHinge2Angle1 (dJointID); +dReal dJointGetHinge2Angle1Rate (dJointID); +dReal dJointGetHinge2Angle2Rate (dJointID); +void dJointGetUniversalAnchor (dJointID, dVector3 result); +void dJointGetUniversalAnchor2 (dJointID, dVector3 result); +void dJointGetUniversalAxis1 (dJointID, dVector3 result); +void dJointGetUniversalAxis2 (dJointID, dVector3 result); +dReal dJointGetUniversalParam (dJointID, int parameter); +dReal dJointGetUniversalAngle1 (dJointID); +dReal dJointGetUniversalAngle2 (dJointID); +dReal dJointGetUniversalAngle1Rate (dJointID); +dReal dJointGetUniversalAngle2Rate (dJointID); +int dJointGetAMotorNumAxes (dJointID); +void dJointGetAMotorAxis (dJointID, int anum, dVector3 result); +int dJointGetAMotorAxisRel (dJointID, int anum); +dReal dJointGetAMotorAngle (dJointID, int anum); +dReal dJointGetAMotorAngleRate (dJointID, int anum); +dReal dJointGetAMotorParam (dJointID, int parameter); +int dJointGetAMotorMode (dJointID); + +int dAreConnected (dBodyID, dBodyID); +int dAreConnectedExcluding (dBodyID, dBodyID, int joint_type); + + +#ifdef __cplusplus +} +#endif + +#endif diff -Nru ode-0.11.1/contrib/BreakableJoints/ode.cpp ode-0.14/contrib/BreakableJoints/ode.cpp --- ode-0.11.1/contrib/BreakableJoints/ode.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/ode.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1404 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +#ifdef _MSC_VER +#pragma warning(disable:4291) // for VC++, no complaints about "no matching operator delete found" +#endif + +// this source file is mostly concerned with the data structures, not the +// numerics. + +#include "objects.h" +#include +#include "joint.h" +#include +#include +#include "step.h" +#include +#include + +// misc defines +#define ALLOCA dALLOCA16 + +//**************************************************************************** +// utility + +static inline void initObject (dObject *obj, dxWorld *w) +{ + obj->world = w; + obj->next = 0; + obj->tome = 0; + obj->userdata = 0; + obj->tag = 0; +} + + +// add an object `obj' to the list who's head pointer is pointed to by `first'. + +static inline void addObjectToList (dObject *obj, dObject **first) +{ + obj->next = *first; + obj->tome = first; + if (*first) (*first)->tome = &obj->next; + (*first) = obj; +} + + +// remove the object from the linked list + +static inline void removeObjectFromList (dObject *obj) +{ + if (obj->next) obj->next->tome = obj->tome; + *(obj->tome) = obj->next; + // safeguard + obj->next = 0; + obj->tome = 0; +} + + +// remove the joint from neighbour lists of all connected bodies + +static void removeJointReferencesFromAttachedBodies (dxJoint *j) +{ + for (int i=0; i<2; i++) { + dxBody *body = j->node[i].body; + if (body) { + dxJointNode *n = body->firstjoint; + dxJointNode *last = 0; + while (n) { + if (n->joint == j) { + if (last) last->next = n->next; + else body->firstjoint = n->next; + break; + } + last = n; + n = n->next; + } + } + } + j->node[0].body = 0; + j->node[0].next = 0; + j->node[1].body = 0; + j->node[1].next = 0; +} + +//**************************************************************************** +// island processing + +// this groups all joints and bodies in a world into islands. all objects +// in an island are reachable by going through connected bodies and joints. +// each island can be simulated separately. +// note that joints that are not attached to anything will not be included +// in any island, an so they do not affect the simulation. +// +// this function starts new island from unvisited bodies. however, it will +// never start a new islands from a disabled body. thus islands of disabled +// bodies will not be included in the simulation. disabled bodies are +// re-enabled if they are found to be part of an active island. + +static void processIslands (dxWorld *world, dReal stepsize) +{ + dxBody *b,*bb,**body; + dxJoint *j,**joint; + + // nothing to do if no bodies + if (world->nb <= 0) return; + + // make arrays for body and joint lists (for a single island) to go into + body = (dxBody**) ALLOCA (world->nb * sizeof(dxBody*)); + joint = (dxJoint**) ALLOCA (world->nj * sizeof(dxJoint*)); + int bcount = 0; // number of bodies in `body' + int jcount = 0; // number of joints in `joint' + + // set all body/joint tags to 0 + for (b=world->firstbody; b; b=(dxBody*)b->next) b->tag = 0; + for (j=world->firstjoint; j; j=(dxJoint*)j->next) j->tag = 0; + + // allocate a stack of unvisited bodies in the island. the maximum size of + // the stack can be the lesser of the number of bodies or joints, because + // new bodies are only ever added to the stack by going through untagged + // joints. all the bodies in the stack must be tagged! + int stackalloc = (world->nj < world->nb) ? world->nj : world->nb; + dxBody **stack = (dxBody**) ALLOCA (stackalloc * sizeof(dxBody*)); + + for (bb=world->firstbody; bb; bb=(dxBody*)bb->next) { + // get bb = the next enabled, untagged body, and tag it + if (bb->tag || (bb->flags & dxBodyDisabled)) continue; + bb->tag = 1; + + // tag all bodies and joints starting from bb. + int stacksize = 0; + b = bb; + body[0] = bb; + bcount = 1; + jcount = 0; + goto quickstart; + while (stacksize > 0) { + b = stack[--stacksize]; // pop body off stack + body[bcount++] = b; // put body on body list + quickstart: + + // traverse and tag all body's joints, add untagged connected bodies + // to stack + for (dxJointNode *n=b->firstjoint; n; n=n->next) { + if (!n->joint->tag) { + n->joint->tag = 1; + joint[jcount++] = n->joint; + if (n->body && !n->body->tag) { + n->body->tag = 1; + stack[stacksize++] = n->body; + } + } + } + dIASSERT(stacksize <= world->nb); + dIASSERT(stacksize <= world->nj); + } + + // now do something with body and joint lists + dInternalStepIsland (world,body,bcount,joint,jcount,stepsize); + + // what we've just done may have altered the body/joint tag values. + // we must make sure that these tags are nonzero. + // also make sure all bodies are in the enabled state. + int i; + for (i=0; itag = 1; + body[i]->flags &= ~dxBodyDisabled; + } + for (i=0; itag = 1; + } + + // if debugging, check that all objects (except for disabled bodies, + // unconnected joints, and joints that are connected to disabled bodies) + // were tagged. +# ifndef dNODEBUG + for (b=world->firstbody; b; b=(dxBody*)b->next) { + if (b->flags & dxBodyDisabled) { + if (b->tag) dDebug (0,"disabled body tagged"); + } + else { + if (!b->tag) dDebug (0,"enabled body not tagged"); + } + } + for (j=world->firstjoint; j; j=(dxJoint*)j->next) { + if ((j->node[0].body && (j->node[0].body->flags & dxBodyDisabled)==0) || + (j->node[1].body && (j->node[1].body->flags & dxBodyDisabled)==0)) { + if (!j->tag) dDebug (0,"attached enabled joint not tagged"); + } + else { + if (j->tag) dDebug (0,"unattached or disabled joint tagged"); + } + } +# endif + /******************** breakable joint contribution ***********************/ + dxJoint* nextJ; + if (!world->firstjoint) + nextJ = 0; + else + nextJ = (dxJoint*)world->firstjoint->next; + for (j=world->firstjoint; j; j=nextJ) { + nextJ = (dxJoint*)j->next; + // check if joint is breakable and broken + if (j->breakInfo && j->breakInfo->flags & dJOINT_BROKEN) { + // detach (break) the joint + dJointAttach (j, 0, 0); + // call the callback function if it is set + if (j->breakInfo->callback) j->breakInfo->callback (j); + // finally destroy the joint if the dJOINT_DELETE_ON_BREAK is set + if (j->breakInfo->flags & dJOINT_DELETE_ON_BREAK) dJointDestroy (j); + } + } + /*************************************************************************/ +} + +//**************************************************************************** +// debugging + +// see if an object list loops on itself (if so, it's bad). + +static int listHasLoops (dObject *first) +{ + if (first==0 || first->next==0) return 0; + dObject *a=first,*b=first->next; + int skip=0; + while (b) { + if (a==b) return 1; + b = b->next; + if (skip) a = a->next; + skip ^= 1; + } + return 0; +} + + +// check the validity of the world data structures + +static void checkWorld (dxWorld *w) +{ + dxBody *b; + dxJoint *j; + + // check there are no loops + if (listHasLoops (w->firstbody)) dDebug (0,"body list has loops"); + if (listHasLoops (w->firstjoint)) dDebug (0,"joint list has loops"); + + // check lists are well formed (check `tome' pointers) + for (b=w->firstbody; b; b=(dxBody*)b->next) { + if (b->next && b->next->tome != &b->next) + dDebug (0,"bad tome pointer in body list"); + } + for (j=w->firstjoint; j; j=(dxJoint*)j->next) { + if (j->next && j->next->tome != &j->next) + dDebug (0,"bad tome pointer in joint list"); + } + + // check counts + int n = 0; + for (b=w->firstbody; b; b=(dxBody*)b->next) n++; + if (w->nb != n) dDebug (0,"body count incorrect"); + n = 0; + for (j=w->firstjoint; j; j=(dxJoint*)j->next) n++; + if (w->nj != n) dDebug (0,"joint count incorrect"); + + // set all tag values to a known value + static int count = 0; + count++; + for (b=w->firstbody; b; b=(dxBody*)b->next) b->tag = count; + for (j=w->firstjoint; j; j=(dxJoint*)j->next) j->tag = count; + + // check all body/joint world pointers are ok + for (b=w->firstbody; b; b=(dxBody*)b->next) if (b->world != w) + dDebug (0,"bad world pointer in body list"); + for (j=w->firstjoint; j; j=(dxJoint*)j->next) if (j->world != w) + dDebug (0,"bad world pointer in joint list"); + + /* + // check for half-connected joints - actually now these are valid + for (j=w->firstjoint; j; j=(dxJoint*)j->next) { + if (j->node[0].body || j->node[1].body) { + if (!(j->node[0].body && j->node[1].body)) + dDebug (0,"half connected joint found"); + } + } + */ + + // check that every joint node appears in the joint lists of both bodies it + // attaches + for (j=w->firstjoint; j; j=(dxJoint*)j->next) { + for (int i=0; i<2; i++) { + if (j->node[i].body) { + int ok = 0; + for (dxJointNode *n=j->node[i].body->firstjoint; n; n=n->next) { + if (n->joint == j) ok = 1; + } + if (ok==0) dDebug (0,"joint not in joint list of attached body"); + } + } + } + + // check all body joint lists (correct body ptrs) + for (b=w->firstbody; b; b=(dxBody*)b->next) { + for (dxJointNode *n=b->firstjoint; n; n=n->next) { + if (&n->joint->node[0] == n) { + if (n->joint->node[1].body != b) + dDebug (0,"bad body pointer in joint node of body list (1)"); + } + else { + if (n->joint->node[0].body != b) + dDebug (0,"bad body pointer in joint node of body list (2)"); + } + if (n->joint->tag != count) dDebug (0,"bad joint node pointer in body"); + } + } + + // check all body pointers in joints, check they are distinct + for (j=w->firstjoint; j; j=(dxJoint*)j->next) { + if (j->node[0].body && (j->node[0].body == j->node[1].body)) + dDebug (0,"non-distinct body pointers in joint"); + if ((j->node[0].body && j->node[0].body->tag != count) || + (j->node[1].body && j->node[1].body->tag != count)) + dDebug (0,"bad body pointer in joint"); + } +} + + +void dWorldCheck (dxWorld *w) +{ + checkWorld (w); +} + +//**************************************************************************** +// body + +dxBody *dBodyCreate (dxWorld *w) +{ + dAASSERT (w); + dxBody *b = new dxBody; + initObject (b,w); + b->firstjoint = 0; + b->flags = 0; + b->geom = 0; + dMassSetParameters (&b->mass,1,0,0,0,1,1,1,0,0,0); + dSetZero (b->invI,4*3); + b->invI[0] = 1; + b->invI[5] = 1; + b->invI[10] = 1; + b->invMass = 1; + dSetZero (b->pos,4); + dSetZero (b->q,4); + b->q[0] = 1; + dRSetIdentity (b->R); + dSetZero (b->lvel,4); + dSetZero (b->avel,4); + dSetZero (b->facc,4); + dSetZero (b->tacc,4); + dSetZero (b->finite_rot_axis,4); + addObjectToList (b,(dObject **) &w->firstbody); + w->nb++; + return b; +} + + +void dBodyDestroy (dxBody *b) +{ + dAASSERT (b); + + // all geoms that link to this body must be notified that the body is about + // to disappear. note that the call to dGeomSetBody(geom,0) will result in + // dGeomGetBodyNext() returning 0 for the body, so we must get the next body + // before setting the body to 0. + dxGeom *next_geom = 0; + for (dxGeom *geom = b->geom; geom; geom = next_geom) { + next_geom = dGeomGetBodyNext (geom); + dGeomSetBody (geom,0); + } + + // detach all neighbouring joints, then delete this body. + dxJointNode *n = b->firstjoint; + while (n) { + // sneaky trick to speed up removal of joint references (black magic) + n->joint->node[(n == n->joint->node)].body = 0; + + dxJointNode *next = n->next; + n->next = 0; + removeJointReferencesFromAttachedBodies (n->joint); + n = next; + } + removeObjectFromList (b); + b->world->nb--; + delete b; +} + + +void dBodySetData (dBodyID b, void *data) +{ + dAASSERT (b); + b->userdata = data; +} + + +void *dBodyGetData (dBodyID b) +{ + dAASSERT (b); + return b->userdata; +} + + +void dBodySetPosition (dBodyID b, dReal x, dReal y, dReal z) +{ + dAASSERT (b); + b->pos[0] = x; + b->pos[1] = y; + b->pos[2] = z; + + // notify all attached geoms that this body has moved + for (dxGeom *geom = b->geom; geom; geom = dGeomGetBodyNext (geom)) + dGeomMoved (geom); +} + + +void dBodySetRotation (dBodyID b, const dMatrix3 R) +{ + dAASSERT (b && R); + dQuaternion q; + dRtoQ (R,q); + dNormalize4 (q); + b->q[0] = q[0]; + b->q[1] = q[1]; + b->q[2] = q[2]; + b->q[3] = q[3]; + dQtoR (b->q,b->R); + + // notify all attached geoms that this body has moved + for (dxGeom *geom = b->geom; geom; geom = dGeomGetBodyNext (geom)) + dGeomMoved (geom); +} + + +void dBodySetQuaternion (dBodyID b, const dQuaternion q) +{ + dAASSERT (b && q); + b->q[0] = q[0]; + b->q[1] = q[1]; + b->q[2] = q[2]; + b->q[3] = q[3]; + dNormalize4 (b->q); + dQtoR (b->q,b->R); + + // notify all attached geoms that this body has moved + for (dxGeom *geom = b->geom; geom; geom = dGeomGetBodyNext (geom)) + dGeomMoved (geom); +} + + +void dBodySetLinearVel (dBodyID b, dReal x, dReal y, dReal z) +{ + dAASSERT (b); + b->lvel[0] = x; + b->lvel[1] = y; + b->lvel[2] = z; +} + + +void dBodySetAngularVel (dBodyID b, dReal x, dReal y, dReal z) +{ + dAASSERT (b); + b->avel[0] = x; + b->avel[1] = y; + b->avel[2] = z; +} + + +const dReal * dBodyGetPosition (dBodyID b) +{ + dAASSERT (b); + return b->pos; +} + + +const dReal * dBodyGetRotation (dBodyID b) +{ + dAASSERT (b); + return b->R; +} + + +const dReal * dBodyGetQuaternion (dBodyID b) +{ + dAASSERT (b); + return b->q; +} + + +const dReal * dBodyGetLinearVel (dBodyID b) +{ + dAASSERT (b); + return b->lvel; +} + + +const dReal * dBodyGetAngularVel (dBodyID b) +{ + dAASSERT (b); + return b->avel; +} + + +void dBodySetMass (dBodyID b, const dMass *mass) +{ + dAASSERT (b && mass); + memcpy (&b->mass,mass,sizeof(dMass)); + if (dInvertPDMatrix (b->mass.I,b->invI,3)==0) { + dDEBUGMSG ("inertia must be positive definite"); + dRSetIdentity (b->invI); + } + b->invMass = dRecip(b->mass.mass); +} + + +void dBodyGetMass (dBodyID b, dMass *mass) +{ + dAASSERT (b && mass); + memcpy (mass,&b->mass,sizeof(dMass)); +} + + +void dBodyAddForce (dBodyID b, dReal fx, dReal fy, dReal fz) +{ + dAASSERT (b); + b->facc[0] += fx; + b->facc[1] += fy; + b->facc[2] += fz; +} + + +void dBodyAddTorque (dBodyID b, dReal fx, dReal fy, dReal fz) +{ + dAASSERT (b); + b->tacc[0] += fx; + b->tacc[1] += fy; + b->tacc[2] += fz; +} + + +void dBodyAddRelForce (dBodyID b, dReal fx, dReal fy, dReal fz) +{ + dAASSERT (b); + dVector3 t1,t2; + t1[0] = fx; + t1[1] = fy; + t1[2] = fz; + t1[3] = 0; + dMULTIPLY0_331 (t2,b->R,t1); + b->facc[0] += t2[0]; + b->facc[1] += t2[1]; + b->facc[2] += t2[2]; +} + + +void dBodyAddRelTorque (dBodyID b, dReal fx, dReal fy, dReal fz) +{ + dAASSERT (b); + dVector3 t1,t2; + t1[0] = fx; + t1[1] = fy; + t1[2] = fz; + t1[3] = 0; + dMULTIPLY0_331 (t2,b->R,t1); + b->tacc[0] += t2[0]; + b->tacc[1] += t2[1]; + b->tacc[2] += t2[2]; +} + + +void dBodyAddForceAtPos (dBodyID b, dReal fx, dReal fy, dReal fz, + dReal px, dReal py, dReal pz) +{ + dAASSERT (b); + b->facc[0] += fx; + b->facc[1] += fy; + b->facc[2] += fz; + dVector3 f,q; + f[0] = fx; + f[1] = fy; + f[2] = fz; + q[0] = px - b->pos[0]; + q[1] = py - b->pos[1]; + q[2] = pz - b->pos[2]; + dCROSS (b->tacc,+=,q,f); +} + + +void dBodyAddForceAtRelPos (dBodyID b, dReal fx, dReal fy, dReal fz, + dReal px, dReal py, dReal pz) +{ + dAASSERT (b); + dVector3 prel,f,p; + f[0] = fx; + f[1] = fy; + f[2] = fz; + f[3] = 0; + prel[0] = px; + prel[1] = py; + prel[2] = pz; + prel[3] = 0; + dMULTIPLY0_331 (p,b->R,prel); + b->facc[0] += f[0]; + b->facc[1] += f[1]; + b->facc[2] += f[2]; + dCROSS (b->tacc,+=,p,f); +} + + +void dBodyAddRelForceAtPos (dBodyID b, dReal fx, dReal fy, dReal fz, + dReal px, dReal py, dReal pz) +{ + dAASSERT (b); + dVector3 frel,f; + frel[0] = fx; + frel[1] = fy; + frel[2] = fz; + frel[3] = 0; + dMULTIPLY0_331 (f,b->R,frel); + b->facc[0] += f[0]; + b->facc[1] += f[1]; + b->facc[2] += f[2]; + dVector3 q; + q[0] = px - b->pos[0]; + q[1] = py - b->pos[1]; + q[2] = pz - b->pos[2]; + dCROSS (b->tacc,+=,q,f); +} + + +void dBodyAddRelForceAtRelPos (dBodyID b, dReal fx, dReal fy, dReal fz, + dReal px, dReal py, dReal pz) +{ + dAASSERT (b); + dVector3 frel,prel,f,p; + frel[0] = fx; + frel[1] = fy; + frel[2] = fz; + frel[3] = 0; + prel[0] = px; + prel[1] = py; + prel[2] = pz; + prel[3] = 0; + dMULTIPLY0_331 (f,b->R,frel); + dMULTIPLY0_331 (p,b->R,prel); + b->facc[0] += f[0]; + b->facc[1] += f[1]; + b->facc[2] += f[2]; + dCROSS (b->tacc,+=,p,f); +} + + +const dReal * dBodyGetForce (dBodyID b) +{ + dAASSERT (b); + return b->facc; +} + + +const dReal * dBodyGetTorque (dBodyID b) +{ + dAASSERT (b); + return b->tacc; +} + + +void dBodySetForce (dBodyID b, dReal x, dReal y, dReal z) +{ + dAASSERT (b); + b->facc[0] = x; + b->facc[1] = y; + b->facc[2] = z; +} + + +void dBodySetTorque (dBodyID b, dReal x, dReal y, dReal z) +{ + dAASSERT (b); + b->tacc[0] = x; + b->tacc[1] = y; + b->tacc[2] = z; +} + + +void dBodyGetRelPointPos (dBodyID b, dReal px, dReal py, dReal pz, + dVector3 result) +{ + dAASSERT (b); + dVector3 prel,p; + prel[0] = px; + prel[1] = py; + prel[2] = pz; + prel[3] = 0; + dMULTIPLY0_331 (p,b->R,prel); + result[0] = p[0] + b->pos[0]; + result[1] = p[1] + b->pos[1]; + result[2] = p[2] + b->pos[2]; +} + + +void dBodyGetRelPointVel (dBodyID b, dReal px, dReal py, dReal pz, + dVector3 result) +{ + dAASSERT (b); + dVector3 prel,p; + prel[0] = px; + prel[1] = py; + prel[2] = pz; + prel[3] = 0; + dMULTIPLY0_331 (p,b->R,prel); + result[0] = b->lvel[0]; + result[1] = b->lvel[1]; + result[2] = b->lvel[2]; + dCROSS (result,+=,b->avel,p); +} + + +void dBodyGetPointVel (dBodyID b, dReal px, dReal py, dReal pz, + dVector3 result) +{ + dAASSERT (b); + dVector3 p; + p[0] = px - b->pos[0]; + p[1] = py - b->pos[1]; + p[2] = pz - b->pos[2]; + p[3] = 0; + result[0] = b->lvel[0]; + result[1] = b->lvel[1]; + result[2] = b->lvel[2]; + dCROSS (result,+=,b->avel,p); +} + + +void dBodyGetPosRelPoint (dBodyID b, dReal px, dReal py, dReal pz, + dVector3 result) +{ + dAASSERT (b); + dVector3 prel; + prel[0] = px - b->pos[0]; + prel[1] = py - b->pos[1]; + prel[2] = pz - b->pos[2]; + prel[3] = 0; + dMULTIPLY1_331 (result,b->R,prel); +} + + +void dBodyVectorToWorld (dBodyID b, dReal px, dReal py, dReal pz, + dVector3 result) +{ + dAASSERT (b); + dVector3 p; + p[0] = px; + p[1] = py; + p[2] = pz; + p[3] = 0; + dMULTIPLY0_331 (result,b->R,p); +} + + +void dBodyVectorFromWorld (dBodyID b, dReal px, dReal py, dReal pz, + dVector3 result) +{ + dAASSERT (b); + dVector3 p; + p[0] = px; + p[1] = py; + p[2] = pz; + p[3] = 0; + dMULTIPLY1_331 (result,b->R,p); +} + + +void dBodySetFiniteRotationMode (dBodyID b, int mode) +{ + dAASSERT (b); + b->flags &= ~(dxBodyFlagFiniteRotation | dxBodyFlagFiniteRotationAxis); + if (mode) { + b->flags |= dxBodyFlagFiniteRotation; + if (b->finite_rot_axis[0] != 0 || b->finite_rot_axis[1] != 0 || + b->finite_rot_axis[2] != 0) { + b->flags |= dxBodyFlagFiniteRotationAxis; + } + } +} + + +void dBodySetFiniteRotationAxis (dBodyID b, dReal x, dReal y, dReal z) +{ + dAASSERT (b); + b->finite_rot_axis[0] = x; + b->finite_rot_axis[1] = y; + b->finite_rot_axis[2] = z; + if (x != 0 || y != 0 || z != 0) { + dNormalize3 (b->finite_rot_axis); + b->flags |= dxBodyFlagFiniteRotationAxis; + } + else { + b->flags &= ~dxBodyFlagFiniteRotationAxis; + } +} + + +int dBodyGetFiniteRotationMode (dBodyID b) +{ + dAASSERT (b); + return ((b->flags & dxBodyFlagFiniteRotation) != 0); +} + + +void dBodyGetFiniteRotationAxis (dBodyID b, dVector3 result) +{ + dAASSERT (b); + result[0] = b->finite_rot_axis[0]; + result[1] = b->finite_rot_axis[1]; + result[2] = b->finite_rot_axis[2]; +} + + +int dBodyGetNumJoints (dBodyID b) +{ + dAASSERT (b); + int count=0; + for (dxJointNode *n=b->firstjoint; n; n=n->next, count++); + return count; +} + + +dJointID dBodyGetJoint (dBodyID b, int index) +{ + dAASSERT (b); + int i=0; + for (dxJointNode *n=b->firstjoint; n; n=n->next, i++) { + if (i == index) return n->joint; + } + return 0; +} + + +void dBodyEnable (dBodyID b) +{ + dAASSERT (b); + b->flags &= ~dxBodyDisabled; +} + + +void dBodyDisable (dBodyID b) +{ + dAASSERT (b); + b->flags |= dxBodyDisabled; +} + + +int dBodyIsEnabled (dBodyID b) +{ + dAASSERT (b); + return ((b->flags & dxBodyDisabled) == 0); +} + + +void dBodySetGravityMode (dBodyID b, int mode) +{ + dAASSERT (b); + if (mode) b->flags &= ~dxBodyNoGravity; + else b->flags |= dxBodyNoGravity; +} + + +int dBodyGetGravityMode (dBodyID b) +{ + dAASSERT (b); + return ((b->flags & dxBodyNoGravity) == 0); +} + +//**************************************************************************** +// joints + +static void dJointInit (dxWorld *w, dxJoint *j) +{ + dIASSERT (w && j); + initObject (j,w); + j->vtable = 0; + j->flags = 0; + j->node[0].joint = j; + j->node[0].body = 0; + j->node[0].next = 0; + j->node[1].joint = j; + j->node[1].body = 0; + j->node[1].next = 0; + addObjectToList (j,(dObject **) &w->firstjoint); + w->nj++; +} + + +static dxJoint *createJoint (dWorldID w, dJointGroupID group, + dxJoint::Vtable *vtable) +{ + dIASSERT (w && vtable); + dxJoint *j; + if (group) { + j = (dxJoint*) group->stack.alloc (vtable->size); + group->num++; + } + else j = (dxJoint*) dAlloc (vtable->size); + dJointInit (w,j); + j->vtable = vtable; + if (group) j->flags |= dJOINT_INGROUP; + if (vtable->init) vtable->init (j); + j->feedback = 0; + /******************** breakable joint contribution ***********************/ + j->breakInfo = 0; + /*************************************************************************/ + return j; +} + + +dxJoint * dJointCreateBall (dWorldID w, dJointGroupID group) +{ + dAASSERT (w); + return createJoint (w,group,&__dball_vtable); +} + + +dxJoint * dJointCreateHinge (dWorldID w, dJointGroupID group) +{ + dAASSERT (w); + return createJoint (w,group,&__dhinge_vtable); +} + + +dxJoint * dJointCreateSlider (dWorldID w, dJointGroupID group) +{ + dAASSERT (w); + return createJoint (w,group,&__dslider_vtable); +} + + +dxJoint * dJointCreateContact (dWorldID w, dJointGroupID group, + const dContact *c) +{ + dAASSERT (w && c); + dxJointContact *j = (dxJointContact *) + createJoint (w,group,&__dcontact_vtable); + j->contact = *c; + return j; +} + + +dxJoint * dJointCreateHinge2 (dWorldID w, dJointGroupID group) +{ + dAASSERT (w); + return createJoint (w,group,&__dhinge2_vtable); +} + + +dxJoint * dJointCreateUniversal (dWorldID w, dJointGroupID group) +{ + dAASSERT (w); + return createJoint (w,group,&__duniversal_vtable); +} + + +dxJoint * dJointCreateFixed (dWorldID w, dJointGroupID group) +{ + dAASSERT (w); + return createJoint (w,group,&__dfixed_vtable); +} + + +dxJoint * dJointCreateNull (dWorldID w, dJointGroupID group) +{ + dAASSERT (w); + return createJoint (w,group,&__dnull_vtable); +} + + +dxJoint * dJointCreateAMotor (dWorldID w, dJointGroupID group) +{ + dAASSERT (w); + return createJoint (w,group,&__damotor_vtable); +} + + +void dJointDestroy (dxJoint *j) +{ + dAASSERT (j); + if (j->flags & dJOINT_INGROUP) return; + removeJointReferencesFromAttachedBodies (j); + removeObjectFromList (j); + /******************** breakable joint contribution ***********************/ + if (j->breakInfo) delete j->breakInfo; + /*************************************************************************/ + j->world->nj--; + dFree (j,j->vtable->size); +} + + +dJointGroupID dJointGroupCreate (int max_size) +{ + // not any more ... dUASSERT (max_size > 0,"max size must be > 0"); + dxJointGroup *group = new dxJointGroup; + group->num = 0; + return group; +} + + +void dJointGroupDestroy (dJointGroupID group) +{ + dAASSERT (group); + dJointGroupEmpty (group); + delete group; +} + + +void dJointGroupEmpty (dJointGroupID group) +{ + // the joints in this group are detached starting from the most recently + // added (at the top of the stack). this helps ensure that the various + // linked lists are not traversed too much, as the joints will hopefully + // be at the start of those lists. + // if any group joints have their world pointer set to 0, their world was + // previously destroyed. no special handling is required for these joints. + + dAASSERT (group); + int i; + dxJoint **jlist = (dxJoint**) ALLOCA (group->num * sizeof(dxJoint*)); + dxJoint *j = (dxJoint*) group->stack.rewind(); + for (i=0; i < group->num; i++) { + jlist[i] = j; + j = (dxJoint*) (group->stack.next (j->vtable->size)); + } + for (i=group->num-1; i >= 0; i--) { + if (jlist[i]->world) { + removeJointReferencesFromAttachedBodies (jlist[i]); + removeObjectFromList (jlist[i]); + jlist[i]->world->nj--; + } + } + group->num = 0; + group->stack.freeAll(); +} + + +void dJointAttach (dxJoint *joint, dxBody *body1, dxBody *body2) +{ + // check arguments + dUASSERT (joint,"bad joint argument"); + dUASSERT (body1 == 0 || body1 != body2,"can't have body1==body2"); + dxWorld *world = joint->world; + dUASSERT ( (!body1 || body1->world == world) && + (!body2 || body2->world == world), + "joint and bodies must be in same world"); + + // check if the joint can not be attached to just one body + dUASSERT (!((joint->flags & dJOINT_TWOBODIES) && + ((body1 != 0) ^ (body2 != 0))), + "joint can not be attached to just one body"); + + // remove any existing body attachments + if (joint->node[0].body || joint->node[1].body) { + removeJointReferencesFromAttachedBodies (joint); + } + + // if a body is zero, make sure that it is body2, so 0 --> node[1].body + if (body1==0) { + body1 = body2; + body2 = 0; + joint->flags |= dJOINT_REVERSE; + } + else { + joint->flags &= (~dJOINT_REVERSE); + } + + // attach to new bodies + joint->node[0].body = body1; + joint->node[1].body = body2; + if (body1) { + joint->node[1].next = body1->firstjoint; + body1->firstjoint = &joint->node[1]; + } + else joint->node[1].next = 0; + if (body2) { + joint->node[0].next = body2->firstjoint; + body2->firstjoint = &joint->node[0]; + } + else { + joint->node[0].next = 0; + } +} + + +void dJointSetData (dxJoint *joint, void *data) +{ + dAASSERT (joint); + joint->userdata = data; +} + + +void *dJointGetData (dxJoint *joint) +{ + dAASSERT (joint); + return joint->userdata; +} + + +int dJointGetType (dxJoint *joint) +{ + dAASSERT (joint); + return joint->vtable->typenum; +} + + +dBodyID dJointGetBody (dxJoint *joint, int index) +{ + dAASSERT (joint); + if (index >= 0 && index < 2) return joint->node[index].body; + else return 0; +} + + +void dJointSetFeedback (dxJoint *joint, dJointFeedback *f) +{ + dAASSERT (joint); + joint->feedback = f; +} + + +dJointFeedback *dJointGetFeedback (dxJoint *joint) +{ + dAASSERT (joint); + return joint->feedback; +} + + +int dAreConnected (dBodyID b1, dBodyID b2) +{ + dAASSERT (b1 && b2); + // look through b1's neighbour list for b2 + for (dxJointNode *n=b1->firstjoint; n; n=n->next) { + if (n->body == b2) return 1; + } + return 0; +} + + +int dAreConnectedExcluding (dBodyID b1, dBodyID b2, int joint_type) +{ + dAASSERT (b1 && b2); + // look through b1's neighbour list for b2 + for (dxJointNode *n=b1->firstjoint; n; n=n->next) { + if (dJointGetType (n->joint) != joint_type && n->body == b2) return 1; + } + return 0; +} + +//**************************************************************************** +// world + +dxWorld * dWorldCreate() +{ + dxWorld *w = new dxWorld; + w->firstbody = 0; + w->firstjoint = 0; + w->nb = 0; + w->nj = 0; + dSetZero (w->gravity,4); + w->global_erp = REAL(0.2); +#if defined(dSINGLE) + w->global_cfm = 1e-5f; +#elif defined(dDOUBLE) + w->global_cfm = 1e-10; +#else + #error dSINGLE or dDOUBLE must be defined +#endif + return w; +} + + +void dWorldDestroy (dxWorld *w) +{ + // delete all bodies and joints + dAASSERT (w); + dxBody *nextb, *b = w->firstbody; + while (b) { + nextb = (dxBody*) b->next; + delete b; + b = nextb; + } + dxJoint *nextj, *j = w->firstjoint; + while (j) { + nextj = (dxJoint*)j->next; + if (j->flags & dJOINT_INGROUP) { + // the joint is part of a group, so "deactivate" it instead + j->world = 0; + j->node[0].body = 0; + j->node[0].next = 0; + j->node[1].body = 0; + j->node[1].next = 0; + dMessage (0,"warning: destroying world containing grouped joints"); + } + else { + dFree (j,j->vtable->size); + } + j = nextj; + } + delete w; +} + + +void dWorldSetGravity (dWorldID w, dReal x, dReal y, dReal z) +{ + dAASSERT (w); + w->gravity[0] = x; + w->gravity[1] = y; + w->gravity[2] = z; +} + + +void dWorldGetGravity (dWorldID w, dVector3 g) +{ + dAASSERT (w); + g[0] = w->gravity[0]; + g[1] = w->gravity[1]; + g[2] = w->gravity[2]; +} + + +void dWorldSetERP (dWorldID w, dReal erp) +{ + dAASSERT (w); + w->global_erp = erp; +} + + +dReal dWorldGetERP (dWorldID w) +{ + dAASSERT (w); + return w->global_erp; +} + + +void dWorldSetCFM (dWorldID w, dReal cfm) +{ + dAASSERT (w); + w->global_cfm = cfm; +} + + +dReal dWorldGetCFM (dWorldID w) +{ + dAASSERT (w); + return w->global_cfm; +} + + +void dWorldStep (dWorldID w, dReal stepsize) +{ + dUASSERT (w,"bad world argument"); + dUASSERT (stepsize > 0,"stepsize must be > 0"); + processIslands (w,stepsize); +} + + +void dWorldImpulseToForce (dWorldID w, dReal stepsize, + dReal ix, dReal iy, dReal iz, + dVector3 force) +{ + dAASSERT (w); + stepsize = dRecip(stepsize); + force[0] = stepsize * ix; + force[1] = stepsize * iy; + force[2] = stepsize * iz; + // @@@ force[3] = 0; +} + +//**************************************************************************** +// testing + +#define NUM 100 + +#define DO(x) + + +extern "C" void dTestDataStructures() +{ + int i; + DO(printf ("testDynamicsStuff()\n")); + + dBodyID body [NUM]; + int nb = 0; + dJointID joint [NUM]; + int nj = 0; + + for (i=0; i 0.5) { + DO(printf ("creating body\n")); + body[nb] = dBodyCreate (w); + DO(printf ("\t--> %p\n",body[nb])); + nb++; + checkWorld (w); + DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); + } + if (nj < NUM && nb > 2 && dRandReal() > 0.5) { + dBodyID b1 = body [dRand() % nb]; + dBodyID b2 = body [dRand() % nb]; + if (b1 != b2) { + DO(printf ("creating joint, attaching to %p,%p\n",b1,b2)); + joint[nj] = dJointCreateBall (w,0); + DO(printf ("\t-->%p\n",joint[nj])); + checkWorld (w); + dJointAttach (joint[nj],b1,b2); + nj++; + checkWorld (w); + DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); + } + } + if (nj > 0 && nb > 2 && dRandReal() > 0.5) { + dBodyID b1 = body [dRand() % nb]; + dBodyID b2 = body [dRand() % nb]; + if (b1 != b2) { + int k = dRand() % nj; + DO(printf ("reattaching joint %p\n",joint[k])); + dJointAttach (joint[k],b1,b2); + checkWorld (w); + DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); + } + } + if (nb > 0 && dRandReal() > 0.5) { + int k = dRand() % nb; + DO(printf ("destroying body %p\n",body[k])); + dBodyDestroy (body[k]); + checkWorld (w); + for (; k < (NUM-1); k++) body[k] = body[k+1]; + nb--; + DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); + } + if (nj > 0 && dRandReal() > 0.5) { + int k = dRand() % nj; + DO(printf ("destroying joint %p\n",joint[k])); + dJointDestroy (joint[k]); + checkWorld (w); + for (; k < (NUM-1); k++) joint[k] = joint[k+1]; + nj--; + DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); + } + } + + /* + printf ("creating world\n"); + dWorldID w = dWorldCreate(); + checkWorld (w); + printf ("creating body\n"); + dBodyID b1 = dBodyCreate (w); + checkWorld (w); + printf ("creating body\n"); + dBodyID b2 = dBodyCreate (w); + checkWorld (w); + printf ("creating joint\n"); + dJointID j = dJointCreateBall (w); + checkWorld (w); + printf ("attaching joint\n"); + dJointAttach (j,b1,b2); + checkWorld (w); + printf ("destroying joint\n"); + dJointDestroy (j); + checkWorld (w); + printf ("destroying body\n"); + dBodyDestroy (b1); + checkWorld (w); + printf ("destroying body\n"); + dBodyDestroy (b2); + checkWorld (w); + printf ("destroying world\n"); + dWorldDestroy (w); + */ +} diff -Nru ode-0.11.1/contrib/BreakableJoints/README.txt ode-0.14/contrib/BreakableJoints/README.txt --- ode-0.11.1/contrib/BreakableJoints/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/README.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,110 @@ +Breakable Joints + +================================================================================ + +Description: +This is a small addition to ODE that makes joints breakable. Breakable means +that if a force on a joint is to high it wil break. I have included a modified +version of test_buggy.cpp (test_breakable.cpp) so you can see it for your self. +Just drive your buggy into an obstacle and enjoy! + +================================================================================ + +Installation instructions: +- copy joint.h, joint.cpp, ode.cpp and step.cpp to the ode/src/ directory +- copy common.h and object.h to the include/ directory +- copy test_breakable.cpp to the ode/test/ directory +- add test_breakable.cpp to the ODE_TEST_SRC_CPP object in the makefile. +- make ode-lib +- make ode-test +You can also use the diffs. The above files will quickly go out of sync with the +rest of ODE but the diffs wil remain valid longer. + +================================================================================ + +Functions: +dJointSetBreakable (dJointID joint, int b) + If b is 1 the joint is made breakable. If b is 0 the joint is made + unbreakable. + +void dJointSetBreakCallback (dJointID joint, dJointBreakCallback *callbackFunc) + Sets the callback function for this joint. If a funtion is set it will be + called if the joint is broken but before it is actually detached or deleted. + +void dJointSetBreakMode (dJointID joint, int mode) + Use this functions to set some flags. These flags can be ORred ( | ) + together; ie. dJointSetBreakMode (someJoint, +dJOINT_BREAK_AT_B1_FORCE|dJOINT_DELETE_ON_BREAK) + dJOINT_DELETE_ON_BREAK - If the joint breaks it wil be deleted. + dJOINT_BREAK_AT_B1_FORCE - If the force on body 1 is to high the joint will + break + dJOINT_BREAK_AT_B1_TORQUE - If the torque on body 1 is to high the joint will + break + dJOINT_BREAK_AT_B2_FORCE - If the force on body 2 is to high the joint will + break + dJOINT_BREAK_AT_B2_TORQUE - If the torque on body 2 is to high the joint will + break + +void dJointSetBreakForce (dJointID joint, int body, dReal x, dReal y, dReal z) + With this function you can set the maximum force for a body connected to this + joint. A value of 0 for body means body 1, 1 means body 2. The force is + relative to the bodies rotation. + +void dJointSetBreakTorque (dJointID joint, int body, dReal x, dReal y, dReal z) + With this function you can set the maximum torque for a body connected to this + joint. A value of 0 for body means body 1, 1 means body 2. The torque is + relative to the bodies rotation. + +int dJointIsBreakable (dJointID joint) + Returns 1 if this joint is breakable, 0 otherwise. + +int dJointGetBreakMode (dJointID joint) + Returns the breakmode flag. + +void dJointGetBreakForce (dJointID joint, int body, dReal *force) + Returns the force at what this joint will break. A value of 0 for body means + body 1, 1 means body 2. force must have enough space for 3 dReal values. + +void dJointGetBreakTorque (dJointID joint, int body, dReal *torque) + Returns the torque at what this joint will break. A value of 0 for body + means body 1, 1 means body 2. force must have enough space for 3 dReal + values. + +================================================================================ + +The callback function is defined like this (in common.h): +void dJointBreakCallback (dJointID); + +================================================================================ + +Problems, known bugs & other issues: +- If the timestep is very small then joints get a lot weaker. They can even fall + apart! +- I have tested all this with the latest checkout from CVS (at the time of + writing ofcourse). I haven't tested it with earlier versions of ODE. +- I have modified the code that fills the jointfeedback struct. I haven't tested + if it still works. +- I'm not sure if the forces are really relative to the connected bodies. +- There are some memory leaks in the test_breakable.cpp example. + +================================================================================ + +Bugfixes and changes: +09/08/2003 +- I fixed a bug when there where 0 joints in the simulation + +06/12/2003 +- dJointGetBreakMode() added, by vadim_mcagon@hotmail.com + +11/03/2004 +- Updated files to work with latest CVS checkout. +- Added support for dWorldStepFast1() +- Added separate test_breakable.cpp example. +- Updated the code that breaks and destroys a joint. + +================================================================================ + +Send me an e-mail if you have any suggestions, ideas, bugs, bug-fixes, anything! +e-mail: roelvandijk@home.nl + +Roel van Dijk - 11/03/2004 diff -Nru ode-0.11.1/contrib/BreakableJoints/step.cpp ode-0.14/contrib/BreakableJoints/step.cpp --- ode-0.11.1/contrib/BreakableJoints/step.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/step.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1170 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +#include "objects.h" +#include "joint.h" +#include +#include +#include +#include +#include +#include +#include "lcp.h" + +//**************************************************************************** +// misc defines + +#define FAST_FACTOR +//#define TIMING + +#define ALLOCA dALLOCA16 + +//**************************************************************************** +// debugging - comparison of various vectors and matrices produced by the +// slow and fast versions of the stepper. + +//#define COMPARE_METHODS + +#ifdef COMPARE_METHODS +#include "testing.h" +dMatrixComparison comparator; +#endif + +//**************************************************************************** +// special matrix multipliers + +// this assumes the 4th and 8th rows of B and C are zero. + +static void Multiply2_p8r (dReal *A, dReal *B, dReal *C, + int p, int r, int Askip) +{ + int i,j; + dReal sum,*bb,*cc; + dIASSERT (p>0 && r>0 && A && B && C); + bb = B; + for (i=p; i; i--) { + cc = C; + for (j=r; j; j--) { + sum = bb[0]*cc[0]; + sum += bb[1]*cc[1]; + sum += bb[2]*cc[2]; + sum += bb[4]*cc[4]; + sum += bb[5]*cc[5]; + sum += bb[6]*cc[6]; + *(A++) = sum; + cc += 8; + } + A += Askip - r; + bb += 8; + } +} + + +// this assumes the 4th and 8th rows of B and C are zero. + +static void MultiplyAdd2_p8r (dReal *A, dReal *B, dReal *C, + int p, int r, int Askip) +{ + int i,j; + dReal sum,*bb,*cc; + dIASSERT (p>0 && r>0 && A && B && C); + bb = B; + for (i=p; i; i--) { + cc = C; + for (j=r; j; j--) { + sum = bb[0]*cc[0]; + sum += bb[1]*cc[1]; + sum += bb[2]*cc[2]; + sum += bb[4]*cc[4]; + sum += bb[5]*cc[5]; + sum += bb[6]*cc[6]; + *(A++) += sum; + cc += 8; + } + A += Askip - r; + bb += 8; + } +} + + +// this assumes the 4th and 8th rows of B are zero. + +static void Multiply0_p81 (dReal *A, dReal *B, dReal *C, int p) +{ + int i; + dIASSERT (p>0 && A && B && C); + dReal sum; + for (i=p; i; i--) { + sum = B[0]*C[0]; + sum += B[1]*C[1]; + sum += B[2]*C[2]; + sum += B[4]*C[4]; + sum += B[5]*C[5]; + sum += B[6]*C[6]; + *(A++) = sum; + B += 8; + } +} + + +// this assumes the 4th and 8th rows of B are zero. + +static void MultiplyAdd0_p81 (dReal *A, dReal *B, dReal *C, int p) +{ + int i; + dIASSERT (p>0 && A && B && C); + dReal sum; + for (i=p; i; i--) { + sum = B[0]*C[0]; + sum += B[1]*C[1]; + sum += B[2]*C[2]; + sum += B[4]*C[4]; + sum += B[5]*C[5]; + sum += B[6]*C[6]; + *(A++) += sum; + B += 8; + } +} + + +// this assumes the 4th and 8th rows of B are zero. + +static void MultiplyAdd1_8q1 (dReal *A, dReal *B, dReal *C, int q) +{ + int k; + dReal sum; + dIASSERT (q>0 && A && B && C); + sum = 0; + for (k=0; k0 && A && B && C); + sum = 0; + for (k=0; kpos[j] += h * b->lvel[j]; + + if (b->flags & dxBodyFlagFiniteRotation) { + dVector3 irv; // infitesimal rotation vector + dQuaternion q; // quaternion for finite rotation + + if (b->flags & dxBodyFlagFiniteRotationAxis) { + // split the angular velocity vector into a component along the finite + // rotation axis, and a component orthogonal to it. + dVector3 frv,irv; // finite rotation vector + dReal k = dDOT (b->finite_rot_axis,b->avel); + frv[0] = b->finite_rot_axis[0] * k; + frv[1] = b->finite_rot_axis[1] * k; + frv[2] = b->finite_rot_axis[2] * k; + irv[0] = b->avel[0] - frv[0]; + irv[1] = b->avel[1] - frv[1]; + irv[2] = b->avel[2] - frv[2]; + + // make a rotation quaternion q that corresponds to frv * h. + // compare this with the full-finite-rotation case below. + h *= REAL(0.5); + dReal theta = k * h; + q[0] = dCos(theta); + dReal s = sinc(theta) * h; + q[1] = frv[0] * s; + q[2] = frv[1] * s; + q[3] = frv[2] * s; + } + else { + // make a rotation quaternion q that corresponds to w * h + dReal wlen = dSqrt (b->avel[0]*b->avel[0] + b->avel[1]*b->avel[1] + + b->avel[2]*b->avel[2]); + h *= REAL(0.5); + dReal theta = wlen * h; + q[0] = dCos(theta); + dReal s = sinc(theta) * h; + q[1] = b->avel[0] * s; + q[2] = b->avel[1] * s; + q[3] = b->avel[2] * s; + } + + // do the finite rotation + dQuaternion q2; + dQMultiply0 (q2,q,b->q); + for (j=0; j<4; j++) b->q[j] = q2[j]; + + // do the infitesimal rotation if required + if (b->flags & dxBodyFlagFiniteRotationAxis) { + dReal dq[4]; + dWtoDQ (irv,b->q,dq); + for (j=0; j<4; j++) b->q[j] += h * dq[j]; + } + } + else { + // the normal way - do an infitesimal rotation + dReal dq[4]; + dWtoDQ (b->avel,b->q,dq); + for (j=0; j<4; j++) b->q[j] += h * dq[j]; + } + + // normalize the quaternion and convert it to a rotation matrix + dNormalize4 (b->q); + dQtoR (b->q,b->R); + + // notify all attached geoms that this body has moved + for (dxGeom *geom = b->geom; geom; geom = dGeomGetBodyNext (geom)) + dGeomMoved (geom); +} + +//**************************************************************************** +// the slow, but sure way +// note that this does not do any joint feedback! + +// given lists of bodies and joints that form an island, perform a first +// order timestep. +// +// `body' is the body array, `nb' is the size of the array. +// `_joint' is the body array, `nj' is the size of the array. + +void dInternalStepIsland_x1 (dxWorld *world, dxBody * const *body, int nb, + dxJoint * const *_joint, int nj, dReal stepsize) +{ + int i,j,k; + int n6 = 6*nb; + +# ifdef TIMING + dTimerStart("preprocessing"); +# endif + + // number all bodies in the body list - set their tag values + for (i=0; itag = i; + + // make a local copy of the joint array, because we might want to modify it. + // (the "dxJoint *const*" declaration says we're allowed to modify the joints + // but not the joint array, because the caller might need it unchanged). + dxJoint **joint = (dxJoint**) ALLOCA (nj * sizeof(dxJoint*)); + memcpy (joint,_joint,nj * sizeof(dxJoint*)); + + // for all bodies, compute the inertia tensor and its inverse in the global + // frame, and compute the rotational force and add it to the torque + // accumulator. + // @@@ check computation of rotational force. + dReal *I = (dReal*) ALLOCA (3*nb*4 * sizeof(dReal)); + dReal *invI = (dReal*) ALLOCA (3*nb*4 * sizeof(dReal)); + + //dSetZero (I,3*nb*4); + //dSetZero (invI,3*nb*4); + for (i=0; imass.I,body[i]->R); + dMULTIPLY0_333 (I+i*12,body[i]->R,tmp); + // compute inverse inertia tensor in global frame + dMULTIPLY2_333 (tmp,body[i]->invI,body[i]->R); + dMULTIPLY0_333 (invI+i*12,body[i]->R,tmp); + // compute rotational force + dMULTIPLY0_331 (tmp,I+i*12,body[i]->avel); + dCROSS (body[i]->tacc,-=,body[i]->avel,tmp); + } + + // add the gravity force to all bodies + for (i=0; iflags & dxBodyNoGravity)==0) { + body[i]->facc[0] += body[i]->mass.mass * world->gravity[0]; + body[i]->facc[1] += body[i]->mass.mass * world->gravity[1]; + body[i]->facc[2] += body[i]->mass.mass * world->gravity[2]; + } + } + + // get m = total constraint dimension, nub = number of unbounded variables. + // create constraint offset array and number-of-rows array for all joints. + // the constraints are re-ordered as follows: the purely unbounded + // constraints, the mixed unbounded + LCP constraints, and last the purely + // LCP constraints. + // + // joints with m=0 are inactive and are removed from the joints array + // entirely, so that the code that follows does not consider them. + int m = 0; + dxJoint::Info1 *info = (dxJoint::Info1*) ALLOCA (nj*sizeof(dxJoint::Info1)); + int *ofs = (int*) ALLOCA (nj*sizeof(int)); + for (i=0, j=0; jvtable->getInfo1 (joint[j],info+i); + dIASSERT (info[i].m >= 0 && info[i].m <= 6 && + info[i].nub >= 0 && info[i].nub <= info[i].m); + if (info[i].m > 0) { + joint[i] = joint[j]; + i++; + } + } + nj = i; + + // the purely unbounded constraints + for (i=0; i 0 && info[i].nub < info[i].m) { + ofs[i] = m; + m += info[i].m; + } + // the purely LCP constraints + for (i=0; iinvMass; + MM[nskip+1] = body[i]->invMass; + MM[2*nskip+2] = body[i]->invMass; + MM += 3*nskip+3; + for (j=0; j<3; j++) for (k=0; k<3; k++) { + MM[j*nskip+k] = invI[i*12+j*4+k]; + } + } + + // assemble some body vectors: fe = external forces, v = velocities + dReal *fe = (dReal*) ALLOCA (n6 * sizeof(dReal)); + dReal *v = (dReal*) ALLOCA (n6 * sizeof(dReal)); + //dSetZero (fe,n6); + //dSetZero (v,n6); + for (i=0; ifacc[j]; + for (j=0; j<3; j++) fe[i*6+3+j] = body[i]->tacc[j]; + for (j=0; j<3; j++) v[i*6+j] = body[i]->lvel[j]; + for (j=0; j<3; j++) v[i*6+3+j] = body[i]->avel[j]; + } + + // this will be set to the velocity update + dReal *vnew = (dReal*) ALLOCA (n6 * sizeof(dReal)); + dSetZero (vnew,n6); + + // if there are constraints, compute cforce + if (m > 0) { + // create a constraint equation right hand side vector `c', a constraint + // force mixing vector `cfm', and LCP low and high bound vectors, and an + // 'findex' vector. + dReal *c = (dReal*) ALLOCA (m*sizeof(dReal)); + dReal *cfm = (dReal*) ALLOCA (m*sizeof(dReal)); + dReal *lo = (dReal*) ALLOCA (m*sizeof(dReal)); + dReal *hi = (dReal*) ALLOCA (m*sizeof(dReal)); + int *findex = (int*) alloca (m*sizeof(int)); + dSetZero (c,m); + dSetValue (cfm,m,world->global_cfm); + dSetValue (lo,m,-dInfinity); + dSetValue (hi,m, dInfinity); + for (i=0; iglobal_erp; + for (i=0; inode[0].body->tag; + Jinfo.J1a = Jinfo.J1l + 3; + if (joint[i]->node[1].body) { + Jinfo.J2l = J + nskip*ofs[i] + 6*joint[i]->node[1].body->tag; + Jinfo.J2a = Jinfo.J2l + 3; + } + else { + Jinfo.J2l = 0; + Jinfo.J2a = 0; + } + Jinfo.c = c + ofs[i]; + Jinfo.cfm = cfm + ofs[i]; + Jinfo.lo = lo + ofs[i]; + Jinfo.hi = hi + ofs[i]; + Jinfo.findex = findex + ofs[i]; + joint[i]->vtable->getInfo2 (joint[i],&Jinfo); + // adjust returned findex values for global index numbering + for (j=0; j= 0) findex[ofs[i] + j] += ofs[i]; + } + } + + // compute A = J*invM*J' +# ifdef TIMING + dTimerNow ("compute A"); +# endif + dReal *JinvM = (dReal*) ALLOCA (m*nskip*sizeof(dReal)); + //dSetZero (JinvM,m*nskip); + dMultiply0 (JinvM,J,invM,m,n6,n6); + int mskip = dPAD(m); + dReal *A = (dReal*) ALLOCA (m*mskip*sizeof(dReal)); + //dSetZero (A,m*mskip); + dMultiply2 (A,JinvM,J,m,n6,m); + + // add cfm to the diagonal of A + for (i=0; ilvel[j] = vnew[i*6+j]; + for (j=0; j<3; j++) body[i]->avel[j] = vnew[i*6+3+j]; + } + + // update the position and orientation from the new linear/angular velocity + // (over the given timestep) +# ifdef TIMING + dTimerNow ("update position"); +# endif + for (i=0; ifacc[0] = 0; + body[i]->facc[1] = 0; + body[i]->facc[2] = 0; + body[i]->facc[3] = 0; + body[i]->tacc[0] = 0; + body[i]->tacc[1] = 0; + body[i]->tacc[2] = 0; + body[i]->tacc[3] = 0; + } + +# ifdef TIMING + dTimerEnd(); + if (m > 0) dTimerReport (stdout,1); +# endif +} + +//**************************************************************************** +// an optimized version of dInternalStepIsland1() + +void dInternalStepIsland_x2 (dxWorld *world, dxBody * const *body, int nb, + dxJoint * const *_joint, int nj, dReal stepsize) +{ + int i,j,k; +# ifdef TIMING + dTimerStart("preprocessing"); +# endif + + dReal stepsize1 = dRecip(stepsize); + + // number all bodies in the body list - set their tag values + for (i=0; itag = i; + + // make a local copy of the joint array, because we might want to modify it. + // (the "dxJoint *const*" declaration says we're allowed to modify the joints + // but not the joint array, because the caller might need it unchanged). + dxJoint **joint = (dxJoint**) ALLOCA (nj * sizeof(dxJoint*)); + memcpy (joint,_joint,nj * sizeof(dxJoint*)); + + // for all bodies, compute the inertia tensor and its inverse in the global + // frame, and compute the rotational force and add it to the torque + // accumulator. I and invI are vertically stacked 3x4 matrices, one per body. + // @@@ check computation of rotational force. + dReal *I = (dReal*) ALLOCA (3*nb*4 * sizeof(dReal)); + dReal *invI = (dReal*) ALLOCA (3*nb*4 * sizeof(dReal)); + + //dSetZero (I,3*nb*4); + //dSetZero (invI,3*nb*4); + for (i=0; imass.I,body[i]->R); + dMULTIPLY0_333 (I+i*12,body[i]->R,tmp); + // compute inverse inertia tensor in global frame + dMULTIPLY2_333 (tmp,body[i]->invI,body[i]->R); + dMULTIPLY0_333 (invI+i*12,body[i]->R,tmp); + // compute rotational force + dMULTIPLY0_331 (tmp,I+i*12,body[i]->avel); + dCROSS (body[i]->tacc,-=,body[i]->avel,tmp); + } + + // add the gravity force to all bodies + for (i=0; iflags & dxBodyNoGravity)==0) { + body[i]->facc[0] += body[i]->mass.mass * world->gravity[0]; + body[i]->facc[1] += body[i]->mass.mass * world->gravity[1]; + body[i]->facc[2] += body[i]->mass.mass * world->gravity[2]; + } + } + + // get m = total constraint dimension, nub = number of unbounded variables. + // create constraint offset array and number-of-rows array for all joints. + // the constraints are re-ordered as follows: the purely unbounded + // constraints, the mixed unbounded + LCP constraints, and last the purely + // LCP constraints. this assists the LCP solver to put all unbounded + // variables at the start for a quick factorization. + // + // joints with m=0 are inactive and are removed from the joints array + // entirely, so that the code that follows does not consider them. + // also number all active joints in the joint list (set their tag values). + // inactive joints receive a tag value of -1. + + int m = 0; + dxJoint::Info1 *info = (dxJoint::Info1*) ALLOCA (nj*sizeof(dxJoint::Info1)); + int *ofs = (int*) ALLOCA (nj*sizeof(int)); + for (i=0, j=0; jvtable->getInfo1 (joint[j],info+i); + dIASSERT (info[i].m >= 0 && info[i].m <= 6 && + info[i].nub >= 0 && info[i].nub <= info[i].m); + if (info[i].m > 0) { + joint[i] = joint[j]; + joint[i]->tag = i; + i++; + } + else { + joint[j]->tag = -1; + } + } + nj = i; + + // the purely unbounded constraints + for (i=0; i 0 && info[i].nub < info[i].m) { + ofs[i] = m; + m += info[i].m; + } + // the purely LCP constraints + for (i=0; i 0) { + // create a constraint equation right hand side vector `c', a constraint + // force mixing vector `cfm', and LCP low and high bound vectors, and an + // 'findex' vector. + dReal *c = (dReal*) ALLOCA (m*sizeof(dReal)); + dReal *cfm = (dReal*) ALLOCA (m*sizeof(dReal)); + dReal *lo = (dReal*) ALLOCA (m*sizeof(dReal)); + dReal *hi = (dReal*) ALLOCA (m*sizeof(dReal)); + int *findex = (int*) alloca (m*sizeof(int)); + dSetZero (c,m); + dSetValue (cfm,m,world->global_cfm); + dSetValue (lo,m,-dInfinity); + dSetValue (hi,m, dInfinity); + for (i=0; iglobal_erp; + for (i=0; ivtable->getInfo2 (joint[i],&Jinfo); + // adjust returned findex values for global index numbering + for (j=0; j= 0) findex[ofs[i] + j] += ofs[i]; + } + } + + // compute A = J*invM*J'. first compute JinvM = J*invM. this has the same + // format as J so we just go through the constraints in J multiplying by + // the appropriate scalars and matrices. +# ifdef TIMING + dTimerNow ("compute A"); +# endif + dReal *JinvM = (dReal*) ALLOCA (2*m*8*sizeof(dReal)); + dSetZero (JinvM,2*m*8); + for (i=0; inode[0].body->tag; + dReal body_invMass = body[b]->invMass; + dReal *body_invI = invI + b*12; + dReal *Jsrc = J + 2*8*ofs[i]; + dReal *Jdst = JinvM + 2*8*ofs[i]; + for (j=info[i].m-1; j>=0; j--) { + for (k=0; k<3; k++) Jdst[k] = Jsrc[k] * body_invMass; + dMULTIPLY0_133 (Jdst+4,Jsrc+4,body_invI); + Jsrc += 8; + Jdst += 8; + } + if (joint[i]->node[1].body) { + b = joint[i]->node[1].body->tag; + body_invMass = body[b]->invMass; + body_invI = invI + b*12; + for (j=info[i].m-1; j>=0; j--) { + for (k=0; k<3; k++) Jdst[k] = Jsrc[k] * body_invMass; + dMULTIPLY0_133 (Jdst+4,Jsrc+4,body_invI); + Jsrc += 8; + Jdst += 8; + } + } + } + + // now compute A = JinvM * J'. A's rows and columns are grouped by joint, + // i.e. in the same way as the rows of J. block (i,j) of A is only nonzero + // if joints i and j have at least one body in common. this fact suggests + // the algorithm used to fill A: + // + // for b = all bodies + // n = number of joints attached to body b + // for i = 1..n + // for j = i+1..n + // ii = actual joint number for i + // jj = actual joint number for j + // // (ii,jj) will be set to all pairs of joints around body b + // compute blockwise: A(ii,jj) += JinvM(ii) * J(jj)' + // + // this algorithm catches all pairs of joints that have at least one body + // in common. it does not compute the diagonal blocks of A however - + // another similar algorithm does that. + + int mskip = dPAD(m); + dReal *A = (dReal*) ALLOCA (m*mskip*sizeof(dReal)); + dSetZero (A,m*mskip); + for (i=0; ifirstjoint; n1; n1=n1->next) { + for (dxJointNode *n2=n1->next; n2; n2=n2->next) { + // get joint numbers and ensure ofs[j1] >= ofs[j2] + int j1 = n1->joint->tag; + int j2 = n2->joint->tag; + if (ofs[j1] < ofs[j2]) { + int tmp = j1; + j1 = j2; + j2 = tmp; + } + + // if either joint was tagged as -1 then it is an inactive (m=0) + // joint that should not be considered + if (j1==-1 || j2==-1) continue; + + // determine if body i is the 1st or 2nd body of joints j1 and j2 + int jb1 = (joint[j1]->node[1].body == body[i]); + int jb2 = (joint[j2]->node[1].body == body[i]); + // jb1/jb2 must be 0 for joints with only one body + dIASSERT(joint[j1]->node[1].body || jb1==0); + dIASSERT(joint[j2]->node[1].body || jb2==0); + + // set block of A + MultiplyAdd2_p8r (A + ofs[j1]*mskip + ofs[j2], + JinvM + 2*8*ofs[j1] + jb1*8*info[j1].m, + J + 2*8*ofs[j2] + jb2*8*info[j2].m, + info[j1].m,info[j2].m, mskip); + } + } + } + // compute diagonal blocks of A + for (i=0; inode[1].body) { + MultiplyAdd2_p8r (A + ofs[i]*(mskip+1), + JinvM + 2*8*ofs[i] + 8*info[i].m, + J + 2*8*ofs[i] + 8*info[i].m, + info[i].m,info[i].m, mskip); + } + } + + // add cfm to the diagonal of A + for (i=0; iinvMass; + dReal *body_invI = invI + i*12; + for (j=0; j<3; j++) tmp1[i*8+j] = body[i]->facc[j] * body_invMass + + body[i]->lvel[j] * stepsize1; + dMULTIPLY0_331 (tmp1 + i*8 + 4,body_invI,body[i]->tacc); + for (j=0; j<3; j++) tmp1[i*8+4+j] += body[i]->avel[j] * stepsize1; + } + // put J*tmp1 into rhs + dReal *rhs = (dReal*) ALLOCA (m * sizeof(dReal)); + //dSetZero (rhs,m); + for (i=0; inode[0].body->tag, info[i].m); + if (joint[i]->node[1].body) { + MultiplyAdd0_p81 (rhs+ofs[i],JJ + 8*info[i].m, + tmp1 + 8*joint[i]->node[1].body->tag, info[i].m); + } + } + // complete rhs + for (i=0; inode[0].body; + dxBody* b2 = joint[i]->node[1].body; + dJointFeedback *fb = joint[i]->feedback; + +/******************** breakable joint contribution ***********************/ + // this saves us a few dereferences + dxJointBreakInfo *jBI = joint[i]->breakInfo; + // we need joint feedback if the joint is breakable or if the user + // requested feedback. + if (jBI||fb) { + // we need feedback on the amount of force that this joint is + // applying to the bodies. we use a slightly slower computation + // that splits out the force components and puts them in the + // feedback structure. + dJointFeedback temp_fb; // temporary storage for joint feedback + dReal data1[8],data2[8]; + Multiply1_8q1 (data1, JJ, lambda+ofs[i], info[i].m); + dReal *cf1 = cforce + 8*b1->tag; + cf1[0] += (temp_fb.f1[0] = data1[0]); + cf1[1] += (temp_fb.f1[1] = data1[1]); + cf1[2] += (temp_fb.f1[2] = data1[2]); + cf1[4] += (temp_fb.t1[0] = data1[4]); + cf1[5] += (temp_fb.t1[1] = data1[5]); + cf1[6] += (temp_fb.t1[2] = data1[6]); + if (b2) { + Multiply1_8q1 (data2, JJ + 8*info[i].m, lambda+ofs[i], info[i].m); + dReal *cf2 = cforce + 8*b2->tag; + cf2[0] += (temp_fb.f2[0] = data2[0]); + cf2[1] += (temp_fb.f2[1] = data2[1]); + cf2[2] += (temp_fb.f2[2] = data2[2]); + cf2[4] += (temp_fb.t2[0] = data2[4]); + cf2[5] += (temp_fb.t2[1] = data2[5]); + cf2[6] += (temp_fb.t2[2] = data2[6]); + } + // if the user requested so we must copy the feedback information to + // the feedback struct that the user suplied. + if (fb) { + // copy temp_fb to fb + fb->f1[0] = temp_fb.f1[0]; + fb->f1[1] = temp_fb.f1[1]; + fb->f1[2] = temp_fb.f1[2]; + fb->t1[0] = temp_fb.t1[0]; + fb->t1[1] = temp_fb.t1[1]; + fb->t1[2] = temp_fb.t1[2]; + if (b2) { + fb->f2[0] = temp_fb.f2[0]; + fb->f2[1] = temp_fb.f2[1]; + fb->f2[2] = temp_fb.f2[2]; + fb->t2[0] = temp_fb.t2[0]; + fb->t2[1] = temp_fb.t2[1]; + fb->t2[2] = temp_fb.t2[2]; + } + } + // if the joint is breakable we need to check the breaking conditions + if (jBI) { + dReal relCF1[3]; + dReal relCT1[3]; + // multiply the force and torque vectors by the rotation matrix of body 1 + dMULTIPLY1_331 (&relCF1[0],b1->R,&temp_fb.f1[0]); + dMULTIPLY1_331 (&relCT1[0],b1->R,&temp_fb.t1[0]); + if (jBI->flags & dJOINT_BREAK_AT_B1_FORCE) { + // check if the force is to high + for (int i = 0; i < 3; i++) { + if (relCF1[i] > jBI->b1MaxF[i]) { + jBI->flags |= dJOINT_BROKEN; + goto doneCheckingBreaks; + } + } + } + if (jBI->flags & dJOINT_BREAK_AT_B1_TORQUE) { + // check if the torque is to high + for (int i = 0; i < 3; i++) { + if (relCT1[i] > jBI->b1MaxT[i]) { + jBI->flags |= dJOINT_BROKEN; + goto doneCheckingBreaks; + } + } + } + if (b2) { + dReal relCF2[3]; + dReal relCT2[3]; + // multiply the force and torque vectors by the rotation matrix of body 2 + dMULTIPLY1_331 (&relCF2[0],b2->R,&temp_fb.f2[0]); + dMULTIPLY1_331 (&relCT2[0],b2->R,&temp_fb.t2[0]); + if (jBI->flags & dJOINT_BREAK_AT_B2_FORCE) { + // check if the force is to high + for (int i = 0; i < 3; i++) { + if (relCF2[i] > jBI->b2MaxF[i]) { + jBI->flags |= dJOINT_BROKEN; + goto doneCheckingBreaks; + } + } + } + if (jBI->flags & dJOINT_BREAK_AT_B2_TORQUE) { + // check if the torque is to high + for (int i = 0; i < 3; i++) { + if (relCT2[i] > jBI->b2MaxT[i]) { + jBI->flags |= dJOINT_BROKEN; + goto doneCheckingBreaks; + } + } + } + } + doneCheckingBreaks: + ; + } + } +/*************************************************************************/ + else { + // no feedback is required, let's compute cforce the faster way + MultiplyAdd1_8q1 (cforce + 8*b1->tag,JJ, lambda+ofs[i], info[i].m); + if (b2) { + MultiplyAdd1_8q1 (cforce + 8*b2->tag, + JJ + 8*info[i].m, lambda+ofs[i], info[i].m); + } + } + } + } + + // compute the velocity update +# ifdef TIMING + dTimerNow ("compute velocity update"); +# endif + + // add fe to cforce + for (i=0; ifacc[j]; + for (j=0; j<3; j++) cforce[i*8+4+j] += body[i]->tacc[j]; + } + // multiply cforce by stepsize + for (i=0; i < nb*8; i++) cforce[i] *= stepsize; + // add invM * cforce to the body velocity + for (i=0; iinvMass; + dReal *body_invI = invI + i*12; + for (j=0; j<3; j++) body[i]->lvel[j] += body_invMass * cforce[i*8+j]; + dMULTIPLYADD0_331 (body[i]->avel,body_invI,cforce+i*8+4); + } + + // update the position and orientation from the new linear/angular velocity + // (over the given timestep) +# ifdef TIMING + dTimerNow ("update position"); +# endif + for (i=0; ilvel[j]; + for (j=0; j<3; j++) tmp_vnew[i*6+3+j] = body[i]->avel[j]; + } + comparator.nextMatrix (tmp_vnew,nb*6,1,0,"vnew"); +# endif + +# ifdef TIMING + dTimerNow ("tidy up"); +# endif + + // zero all force accumulators + for (i=0; ifacc[0] = 0; + body[i]->facc[1] = 0; + body[i]->facc[2] = 0; + body[i]->facc[3] = 0; + body[i]->tacc[0] = 0; + body[i]->tacc[1] = 0; + body[i]->tacc[2] = 0; + body[i]->tacc[3] = 0; + } + +# ifdef TIMING + dTimerEnd(); + if (m > 0) dTimerReport (stdout,1); +# endif +} + +//**************************************************************************** + +void dInternalStepIsland (dxWorld *world, dxBody * const *body, int nb, + dxJoint * const *joint, int nj, dReal stepsize) +{ +# ifndef COMPARE_METHODS + dInternalStepIsland_x2 (world,body,nb,joint,nj,stepsize); +# endif + +# ifdef COMPARE_METHODS + int i; + + // save body state + dxBody *state = (dxBody*) ALLOCA (nb*sizeof(dxBody)); + for (i=0; i +#include +#include +#include +#include +#include +#include +#include "lcp.h" +#include "step.h" + + +// misc defines + +#define ALLOCA dALLOCA16 + +#define RANDOM_JOINT_ORDER +//#define FAST_FACTOR //use a factorization approximation to the LCP solver (fast, theoretically less accurate) +#define SLOW_LCP //use the old LCP solver +//#define NO_ISLANDS //does not perform island creation code (3~4% of simulation time), body disabling doesn't work +//#define TIMING + + +static int autoEnableDepth = 2; + +void dWorldSetAutoEnableDepthSF1 (dxWorld *world, int autodepth) +{ + if (autodepth > 0) + autoEnableDepth = autodepth; + else + autoEnableDepth = 0; +} + +int dWorldGetAutoEnableDepthSF1 (dxWorld *world) +{ + return autoEnableDepth; +} + +//little bit of math.... the _sym_ functions assume the return matrix will be symmetric +static void +Multiply2_sym_p8p (dReal * A, dReal * B, dReal * C, int p, int Askip) +{ + int i, j; + dReal sum, *aa, *ad, *bb, *cc; + dIASSERT (p > 0 && A && B && C); + bb = B; + for (i = 0; i < p; i++) + { + //aa is going accross the matrix, ad down + aa = ad = A; + cc = C; + for (j = i; j < p; j++) + { + sum = bb[0] * cc[0]; + sum += bb[1] * cc[1]; + sum += bb[2] * cc[2]; + sum += bb[4] * cc[4]; + sum += bb[5] * cc[5]; + sum += bb[6] * cc[6]; + *(aa++) = *ad = sum; + ad += Askip; + cc += 8; + } + bb += 8; + A += Askip + 1; + C += 8; + } +} + +static void +MultiplyAdd2_sym_p8p (dReal * A, dReal * B, dReal * C, int p, int Askip) +{ + int i, j; + dReal sum, *aa, *ad, *bb, *cc; + dIASSERT (p > 0 && A && B && C); + bb = B; + for (i = 0; i < p; i++) + { + //aa is going accross the matrix, ad down + aa = ad = A; + cc = C; + for (j = i; j < p; j++) + { + sum = bb[0] * cc[0]; + sum += bb[1] * cc[1]; + sum += bb[2] * cc[2]; + sum += bb[4] * cc[4]; + sum += bb[5] * cc[5]; + sum += bb[6] * cc[6]; + *(aa++) += sum; + *ad += sum; + ad += Askip; + cc += 8; + } + bb += 8; + A += Askip + 1; + C += 8; + } +} + + +// this assumes the 4th and 8th rows of B are zero. + +static void +Multiply0_p81 (dReal * A, dReal * B, dReal * C, int p) +{ + int i; + dIASSERT (p > 0 && A && B && C); + dReal sum; + for (i = p; i; i--) + { + sum = B[0] * C[0]; + sum += B[1] * C[1]; + sum += B[2] * C[2]; + sum += B[4] * C[4]; + sum += B[5] * C[5]; + sum += B[6] * C[6]; + *(A++) = sum; + B += 8; + } +} + + +// this assumes the 4th and 8th rows of B are zero. + +static void +MultiplyAdd0_p81 (dReal * A, dReal * B, dReal * C, int p) +{ + int i; + dIASSERT (p > 0 && A && B && C); + dReal sum; + for (i = p; i; i--) + { + sum = B[0] * C[0]; + sum += B[1] * C[1]; + sum += B[2] * C[2]; + sum += B[4] * C[4]; + sum += B[5] * C[5]; + sum += B[6] * C[6]; + *(A++) += sum; + B += 8; + } +} + + +// this assumes the 4th and 8th rows of B are zero. + +static void +Multiply1_8q1 (dReal * A, dReal * B, dReal * C, int q) +{ + int k; + dReal sum; + dIASSERT (q > 0 && A && B && C); + sum = 0; + for (k = 0; k < q; k++) + sum += B[k * 8] * C[k]; + A[0] = sum; + sum = 0; + for (k = 0; k < q; k++) + sum += B[1 + k * 8] * C[k]; + A[1] = sum; + sum = 0; + for (k = 0; k < q; k++) + sum += B[2 + k * 8] * C[k]; + A[2] = sum; + sum = 0; + for (k = 0; k < q; k++) + sum += B[4 + k * 8] * C[k]; + A[4] = sum; + sum = 0; + for (k = 0; k < q; k++) + sum += B[5 + k * 8] * C[k]; + A[5] = sum; + sum = 0; + for (k = 0; k < q; k++) + sum += B[6 + k * 8] * C[k]; + A[6] = sum; +} + +//**************************************************************************** +// body rotation + +// return sin(x)/x. this has a singularity at 0 so special handling is needed +// for small arguments. + +static inline dReal +sinc (dReal x) +{ + // if |x| < 1e-4 then use a taylor series expansion. this two term expansion + // is actually accurate to one LS bit within this range if double precision + // is being used - so don't worry! + if (dFabs (x) < 1.0e-4) + return REAL (1.0) - x * x * REAL (0.166666666666666666667); + else + return dSin (x) / x; +} + + +// given a body b, apply its linear and angular rotation over the time +// interval h, thereby adjusting its position and orientation. + +static inline void +moveAndRotateBody (dxBody * b, dReal h) +{ + int j; + + // handle linear velocity + for (j = 0; j < 3; j++) + b->pos[j] += h * b->lvel[j]; + + if (b->flags & dxBodyFlagFiniteRotation) + { + dVector3 irv; // infitesimal rotation vector + dQuaternion q; // quaternion for finite rotation + + if (b->flags & dxBodyFlagFiniteRotationAxis) + { + // split the angular velocity vector into a component along the finite + // rotation axis, and a component orthogonal to it. + dVector3 frv, irv; // finite rotation vector + dReal k = dDOT (b->finite_rot_axis, b->avel); + frv[0] = b->finite_rot_axis[0] * k; + frv[1] = b->finite_rot_axis[1] * k; + frv[2] = b->finite_rot_axis[2] * k; + irv[0] = b->avel[0] - frv[0]; + irv[1] = b->avel[1] - frv[1]; + irv[2] = b->avel[2] - frv[2]; + + // make a rotation quaternion q that corresponds to frv * h. + // compare this with the full-finite-rotation case below. + h *= REAL (0.5); + dReal theta = k * h; + q[0] = dCos (theta); + dReal s = sinc (theta) * h; + q[1] = frv[0] * s; + q[2] = frv[1] * s; + q[3] = frv[2] * s; + } + else + { + // make a rotation quaternion q that corresponds to w * h + dReal wlen = dSqrt (b->avel[0] * b->avel[0] + b->avel[1] * b->avel[1] + b->avel[2] * b->avel[2]); + h *= REAL (0.5); + dReal theta = wlen * h; + q[0] = dCos (theta); + dReal s = sinc (theta) * h; + q[1] = b->avel[0] * s; + q[2] = b->avel[1] * s; + q[3] = b->avel[2] * s; + } + + // do the finite rotation + dQuaternion q2; + dQMultiply0 (q2, q, b->q); + for (j = 0; j < 4; j++) + b->q[j] = q2[j]; + + // do the infitesimal rotation if required + if (b->flags & dxBodyFlagFiniteRotationAxis) + { + dReal dq[4]; + dWtoDQ (irv, b->q, dq); + for (j = 0; j < 4; j++) + b->q[j] += h * dq[j]; + } + } + else + { + // the normal way - do an infitesimal rotation + dReal dq[4]; + dWtoDQ (b->avel, b->q, dq); + for (j = 0; j < 4; j++) + b->q[j] += h * dq[j]; + } + + // normalize the quaternion and convert it to a rotation matrix + dNormalize4 (b->q); + dQtoR (b->q, b->R); + + // notify all attached geoms that this body has moved + for (dxGeom * geom = b->geom; geom; geom = dGeomGetBodyNext (geom)) + dGeomMoved (geom); +} + +//**************************************************************************** +//This is an implementation of the iterated/relaxation algorithm. +//Here is a quick overview of the algorithm per Sergi Valverde's posts to the +//mailing list: +// +// for i=0..N-1 do +// for c = 0..C-1 do +// Solve constraint c-th +// Apply forces to constraint bodies +// next +// next +// Integrate bodies + +void +dInternalStepFast (dxWorld * world, dxBody * body[2], dReal * GI[2], dReal * GinvI[2], dxJoint * joint, dxJoint::Info1 info, dxJoint::Info2 Jinfo, dReal stepsize) +{ + int i, j, k; +# ifdef TIMING + dTimerNow ("constraint preprocessing"); +# endif + + dReal stepsize1 = dRecip (stepsize); + + int m = info.m; + // nothing to do if no constraints. + if (m <= 0) + return; + + int nub = 0; + if (info.nub == info.m) + nub = m; + + // compute A = J*invM*J'. first compute JinvM = J*invM. this has the same + // format as J so we just go through the constraints in J multiplying by + // the appropriate scalars and matrices. +# ifdef TIMING + dTimerNow ("compute A"); +# endif + dReal JinvM[2 * 6 * 8]; + //dSetZero (JinvM, 2 * m * 8); + + dReal *Jsrc = Jinfo.J1l; + dReal *Jdst = JinvM; + if (body[0]) + { + for (j = m - 1; j >= 0; j--) + { + for (k = 0; k < 3; k++) + Jdst[k] = Jsrc[k] * body[0]->invMass; + dMULTIPLY0_133 (Jdst + 4, Jsrc + 4, GinvI[0]); + Jsrc += 8; + Jdst += 8; + } + } + if (body[1]) + { + Jsrc = Jinfo.J2l; + Jdst = JinvM + 8 * m; + for (j = m - 1; j >= 0; j--) + { + for (k = 0; k < 3; k++) + Jdst[k] = Jsrc[k] * body[1]->invMass; + dMULTIPLY0_133 (Jdst + 4, Jsrc + 4, GinvI[1]); + Jsrc += 8; + Jdst += 8; + } + } + + + // now compute A = JinvM * J'. + int mskip = dPAD (m); + dReal A[6 * 8]; + //dSetZero (A, 6 * 8); + + if (body[0]) + Multiply2_sym_p8p (A, JinvM, Jinfo.J1l, m, mskip); + if (body[1]) + MultiplyAdd2_sym_p8p (A, JinvM + 8 * m, Jinfo.J2l, m, mskip); + + // add cfm to the diagonal of A + for (i = 0; i < m; i++) + A[i * mskip + i] += Jinfo.cfm[i] * stepsize1; + + // compute the right hand side `rhs' +# ifdef TIMING + dTimerNow ("compute rhs"); +# endif + dReal tmp1[16]; + //dSetZero (tmp1, 16); + // put v/h + invM*fe into tmp1 + for (i = 0; i < 2; i++) + { + if (!body[i]) + continue; + for (j = 0; j < 3; j++) + tmp1[i * 8 + j] = body[i]->facc[j] * body[i]->invMass + body[i]->lvel[j] * stepsize1; + dMULTIPLY0_331 (tmp1 + i * 8 + 4, GinvI[i], body[i]->tacc); + for (j = 0; j < 3; j++) + tmp1[i * 8 + 4 + j] += body[i]->avel[j] * stepsize1; + } + // put J*tmp1 into rhs + dReal rhs[6]; + //dSetZero (rhs, 6); + + if (body[0]) + Multiply0_p81 (rhs, Jinfo.J1l, tmp1, m); + if (body[1]) + MultiplyAdd0_p81 (rhs, Jinfo.J2l, tmp1 + 8, m); + + // complete rhs + for (i = 0; i < m; i++) + rhs[i] = Jinfo.c[i] * stepsize1 - rhs[i]; + +#ifdef SLOW_LCP + // solve the LCP problem and get lambda. + // this will destroy A but that's okay +# ifdef TIMING + dTimerNow ("solving LCP problem"); +# endif + dReal *lambda = (dReal *) ALLOCA (m * sizeof (dReal)); + dReal *residual = (dReal *) ALLOCA (m * sizeof (dReal)); + dReal lo[6], hi[6]; + memcpy (lo, Jinfo.lo, m * sizeof (dReal)); + memcpy (hi, Jinfo.hi, m * sizeof (dReal)); + dSolveLCP (m, A, lambda, rhs, residual, nub, lo, hi, Jinfo.findex); +#endif + + // LCP Solver replacement: + // This algorithm goes like this: + // Do a straightforward LDLT factorization of the matrix A, solving for + // A*x = rhs + // For each x[i] that is outside of the bounds of lo[i] and hi[i], + // clamp x[i] into that range. + // Substitute into A the now known x's + // subtract the residual away from the rhs. + // Remove row and column i from L, updating the factorization + // place the known x's at the end of the array, keeping up with location in p + // Repeat until all constraints have been clamped or all are within bounds + // + // This is probably only faster in the single joint case where only one repeat is + // the norm. + +#ifdef FAST_FACTOR + // factorize A (L*D*L'=A) +# ifdef TIMING + dTimerNow ("factorize A"); +# endif + dReal d[6]; + dReal L[6 * 8]; + memcpy (L, A, m * mskip * sizeof (dReal)); + dFactorLDLT (L, d, m, mskip); + + // compute lambda +# ifdef TIMING + dTimerNow ("compute lambda"); +# endif + + int left = m; //constraints left to solve. + int remove[6]; + dReal lambda[6]; + dReal x[6]; + int p[6]; + for (i = 0; i < 6; i++) + p[i] = i; + while (true) + { + memcpy (x, rhs, left * sizeof (dReal)); + dSolveLDLT (L, d, x, left, mskip); + + int fixed = 0; + for (i = 0; i < left; i++) + { + j = p[i]; + remove[i] = false; + // This isn't the exact same use of findex as dSolveLCP.... since x[findex] + // may change after I've already clamped x[i], but it should be close + if (Jinfo.findex[j] > -1) + { + dReal f = fabs (Jinfo.hi[j] * x[p[Jinfo.findex[j]]]); + if (x[i] > f) + x[i] = f; + else if (x[i] < -f) + x[i] = -f; + else + continue; + } + else + { + if (x[i] > Jinfo.hi[j]) + x[i] = Jinfo.hi[j]; + else if (x[i] < Jinfo.lo[j]) + x[i] = Jinfo.lo[j]; + else + continue; + } + remove[i] = true; + fixed++; + } + if (fixed == 0 || fixed == left) //no change or all constraints solved + break; + + for (i = 0; i < left; i++) //sub in to right hand side. + if (remove[i]) + for (j = 0; j < left; j++) + if (!remove[j]) + rhs[j] -= A[j * mskip + i] * x[i]; + + for (int r = left - 1; r >= 0; r--) //eliminate row/col for fixed variables + { + if (remove[r]) + { + //dRemoveLDLT adapted for use without row pointers. + if (r == left - 1) + { + left--; + continue; // deleting last row/col is easy + } + else if (r == 0) + { + dReal a[6]; + for (i = 0; i < left; i++) + a[i] = -A[i * mskip]; + a[0] += REAL (1.0); + dLDLTAddTL (L, d, a, left, mskip); + } + else + { + dReal t[6]; + dReal a[6]; + for (i = 0; i < r; i++) + t[i] = L[r * mskip + i] / d[i]; + for (i = 0; i < left - r; i++) + a[i] = dDot (L + (r + i) * mskip, t, r) - A[(r + i) * mskip + r]; + a[0] += REAL (1.0); + dLDLTAddTL (L + r * mskip + r, d + r, a, left - r, mskip); + } + + dRemoveRowCol (L, left, mskip, r); + //end dRemoveLDLT + + left--; + if (r < (left - 1)) + { + dReal tx = x[r]; + memmove (d + r, d + r + 1, (left - r) * sizeof (dReal)); + memmove (rhs + r, rhs + r + 1, (left - r) * sizeof (dReal)); + //x will get written over by rhs anyway, no need to move it around + //just store the fixed value we just discovered in it. + x[left] = tx; + for (i = 0; i < m; i++) + if (p[i] > r && p[i] <= left) + p[i]--; + p[r] = left; + } + } + } + } + + for (i = 0; i < m; i++) + lambda[i] = x[p[i]]; +# endif + // compute the constraint force `cforce' +# ifdef TIMING + dTimerNow ("compute constraint force"); +#endif + + // compute cforce = J'*lambda + dJointFeedback *fb = joint->feedback; + dReal cforce[16]; + //dSetZero (cforce, 16); + +/******************** breakable joint contribution ***********************/ + // this saves us a few dereferences + dxJointBreakInfo *jBI = joint->breakInfo; + // we need joint feedback if the joint is breakable or if the user + // requested feedback. + if (jBI||fb) { + // we need feedback on the amount of force that this joint is + // applying to the bodies. we use a slightly slower computation + // that splits out the force components and puts them in the + // feedback structure. + dJointFeedback temp_fb; // temporary storage for joint feedback + dReal data1[8],data2[8]; + if (body[0]) + { + Multiply1_8q1 (data1, Jinfo.J1l, lambda, m); + dReal *cf1 = cforce; + cf1[0] = (temp_fb.f1[0] = data1[0]); + cf1[1] = (temp_fb.f1[1] = data1[1]); + cf1[2] = (temp_fb.f1[2] = data1[2]); + cf1[4] = (temp_fb.t1[0] = data1[4]); + cf1[5] = (temp_fb.t1[1] = data1[5]); + cf1[6] = (temp_fb.t1[2] = data1[6]); + } + if (body[1]) + { + Multiply1_8q1 (data2, Jinfo.J2l, lambda, m); + dReal *cf2 = cforce + 8; + cf2[0] = (temp_fb.f2[0] = data2[0]); + cf2[1] = (temp_fb.f2[1] = data2[1]); + cf2[2] = (temp_fb.f2[2] = data2[2]); + cf2[4] = (temp_fb.t2[0] = data2[4]); + cf2[5] = (temp_fb.t2[1] = data2[5]); + cf2[6] = (temp_fb.t2[2] = data2[6]); + } + // if the user requested so we must copy the feedback information to + // the feedback struct that the user suplied. + if (fb) { + // copy temp_fb to fb + fb->f1[0] = temp_fb.f1[0]; + fb->f1[1] = temp_fb.f1[1]; + fb->f1[2] = temp_fb.f1[2]; + fb->t1[0] = temp_fb.t1[0]; + fb->t1[1] = temp_fb.t1[1]; + fb->t1[2] = temp_fb.t1[2]; + if (body[1]) { + fb->f2[0] = temp_fb.f2[0]; + fb->f2[1] = temp_fb.f2[1]; + fb->f2[2] = temp_fb.f2[2]; + fb->t2[0] = temp_fb.t2[0]; + fb->t2[1] = temp_fb.t2[1]; + fb->t2[2] = temp_fb.t2[2]; + } + } + // if the joint is breakable we need to check the breaking conditions + if (jBI) { + dReal relCF1[3]; + dReal relCT1[3]; + // multiply the force and torque vectors by the rotation matrix of body 1 + dMULTIPLY1_331 (&relCF1[0],body[0]->R,&temp_fb.f1[0]); + dMULTIPLY1_331 (&relCT1[0],body[0]->R,&temp_fb.t1[0]); + if (jBI->flags & dJOINT_BREAK_AT_B1_FORCE) { + // check if the force is to high + for (int i = 0; i < 3; i++) { + if (relCF1[i] > jBI->b1MaxF[i]) { + jBI->flags |= dJOINT_BROKEN; + goto doneCheckingBreaks; + } + } + } + if (jBI->flags & dJOINT_BREAK_AT_B1_TORQUE) { + // check if the torque is to high + for (int i = 0; i < 3; i++) { + if (relCT1[i] > jBI->b1MaxT[i]) { + jBI->flags |= dJOINT_BROKEN; + goto doneCheckingBreaks; + } + } + } + if (body[1]) { + dReal relCF2[3]; + dReal relCT2[3]; + // multiply the force and torque vectors by the rotation matrix of body 2 + dMULTIPLY1_331 (&relCF2[0],body[1]->R,&temp_fb.f2[0]); + dMULTIPLY1_331 (&relCT2[0],body[1]->R,&temp_fb.t2[0]); + if (jBI->flags & dJOINT_BREAK_AT_B2_FORCE) { + // check if the force is to high + for (int i = 0; i < 3; i++) { + if (relCF2[i] > jBI->b2MaxF[i]) { + jBI->flags |= dJOINT_BROKEN; + goto doneCheckingBreaks; + } + } + } + if (jBI->flags & dJOINT_BREAK_AT_B2_TORQUE) { + // check if the torque is to high + for (int i = 0; i < 3; i++) { + if (relCT2[i] > jBI->b2MaxT[i]) { + jBI->flags |= dJOINT_BROKEN; + goto doneCheckingBreaks; + } + } + } + } + doneCheckingBreaks: + ; + } + } +/*************************************************************************/ + else + { + // no feedback is required, let's compute cforce the faster way + if (body[0]) + Multiply1_8q1 (cforce, Jinfo.J1l, lambda, m); + if (body[1]) + Multiply1_8q1 (cforce + 8, Jinfo.J2l, lambda, m); + } + + for (i = 0; i < 2; i++) + { + if (!body[i]) + continue; + for (j = 0; j < 3; j++) + { + body[i]->facc[j] += cforce[i * 8 + j]; + body[i]->tacc[j] += cforce[i * 8 + 4 + j]; + } + } +} + +void +dInternalStepIslandFast (dxWorld * world, dxBody * const *bodies, int nb, dxJoint * const *_joints, int nj, dReal stepsize, int maxiterations) +{ +# ifdef TIMING + dTimerNow ("preprocessing"); +# endif + dxBody *bodyPair[2], *body; + dReal *GIPair[2], *GinvIPair[2]; + dxJoint *joint; + int iter, b, j, i; + dReal ministep = stepsize / maxiterations; + + // make a local copy of the joint array, because we might want to modify it. + // (the "dxJoint *const*" declaration says we're allowed to modify the joints + // but not the joint array, because the caller might need it unchanged). + dxJoint **joints = (dxJoint **) ALLOCA (nj * sizeof (dxJoint *)); + memcpy (joints, _joints, nj * sizeof (dxJoint *)); + + // get m = total constraint dimension, nub = number of unbounded variables. + // create constraint offset array and number-of-rows array for all joints. + // the constraints are re-ordered as follows: the purely unbounded + // constraints, the mixed unbounded + LCP constraints, and last the purely + // LCP constraints. this assists the LCP solver to put all unbounded + // variables at the start for a quick factorization. + // + // joints with m=0 are inactive and are removed from the joints array + // entirely, so that the code that follows does not consider them. + // also number all active joints in the joint list (set their tag values). + // inactive joints receive a tag value of -1. + + int m = 0; + dxJoint::Info1 * info = (dxJoint::Info1 *) ALLOCA (nj * sizeof (dxJoint::Info1)); + int *ofs = (int *) ALLOCA (nj * sizeof (int)); + for (i = 0, j = 0; j < nj; j++) + { // i=dest, j=src + joints[j]->vtable->getInfo1 (joints[j], info + i); + dIASSERT (info[i].m >= 0 && info[i].m <= 6 && info[i].nub >= 0 && info[i].nub <= info[i].m); + if (info[i].m > 0) + { + joints[i] = joints[j]; + joints[i]->tag = i; + i++; + } + else + { + joints[j]->tag = -1; + } + } + nj = i; + + // the purely unbounded constraints + for (i = 0; i < nj; i++) + { + ofs[i] = m; + m += info[i].m; + } + dReal *c = NULL; + dReal *cfm = NULL; + dReal *lo = NULL; + dReal *hi = NULL; + int *findex = NULL; + + dReal *J = NULL; + dxJoint::Info2 * Jinfo = NULL; + + if (m) + { + // create a constraint equation right hand side vector `c', a constraint + // force mixing vector `cfm', and LCP low and high bound vectors, and an + // 'findex' vector. + c = (dReal *) ALLOCA (m * sizeof (dReal)); + cfm = (dReal *) ALLOCA (m * sizeof (dReal)); + lo = (dReal *) ALLOCA (m * sizeof (dReal)); + hi = (dReal *) ALLOCA (m * sizeof (dReal)); + findex = (int *) ALLOCA (m * sizeof (int)); + dSetZero (c, m); + dSetValue (cfm, m, world->global_cfm); + dSetValue (lo, m, -dInfinity); + dSetValue (hi, m, dInfinity); + for (i = 0; i < m; i++) + findex[i] = -1; + + // get jacobian data from constraints. a (2*m)x8 matrix will be created + // to store the two jacobian blocks from each constraint. it has this + // format: + // + // l l l 0 a a a 0 \ . + // l l l 0 a a a 0 }-- jacobian body 1 block for joint 0 (3 rows) + // l l l 0 a a a 0 / + // l l l 0 a a a 0 \ . + // l l l 0 a a a 0 }-- jacobian body 2 block for joint 0 (3 rows) + // l l l 0 a a a 0 / + // l l l 0 a a a 0 }--- jacobian body 1 block for joint 1 (1 row) + // l l l 0 a a a 0 }--- jacobian body 2 block for joint 1 (1 row) + // etc... + // + // (lll) = linear jacobian data + // (aaa) = angular jacobian data + // +# ifdef TIMING + dTimerNow ("create J"); +# endif + J = (dReal *) ALLOCA (2 * m * 8 * sizeof (dReal)); + dSetZero (J, 2 * m * 8); + Jinfo = (dxJoint::Info2 *) ALLOCA (nj * sizeof (dxJoint::Info2)); + for (i = 0; i < nj; i++) + { + Jinfo[i].rowskip = 8; + Jinfo[i].fps = dRecip (stepsize); + Jinfo[i].erp = world->global_erp; + Jinfo[i].J1l = J + 2 * 8 * ofs[i]; + Jinfo[i].J1a = Jinfo[i].J1l + 4; + Jinfo[i].J2l = Jinfo[i].J1l + 8 * info[i].m; + Jinfo[i].J2a = Jinfo[i].J2l + 4; + Jinfo[i].c = c + ofs[i]; + Jinfo[i].cfm = cfm + ofs[i]; + Jinfo[i].lo = lo + ofs[i]; + Jinfo[i].hi = hi + ofs[i]; + Jinfo[i].findex = findex + ofs[i]; + //joints[i]->vtable->getInfo2 (joints[i], Jinfo+i); + } + + } + + dReal *saveFacc = (dReal *) ALLOCA (nb * 4 * sizeof (dReal)); + dReal *saveTacc = (dReal *) ALLOCA (nb * 4 * sizeof (dReal)); + dReal *globalI = (dReal *) ALLOCA (nb * 12 * sizeof (dReal)); + dReal *globalInvI = (dReal *) ALLOCA (nb * 12 * sizeof (dReal)); + for (b = 0; b < nb; b++) + { + for (i = 0; i < 4; i++) + { + saveFacc[b * 4 + i] = bodies[b]->facc[i]; + saveTacc[b * 4 + i] = bodies[b]->tacc[i]; + bodies[b]->tag = b; + } + } + + for (iter = 0; iter < maxiterations; iter++) + { +# ifdef TIMING + dTimerNow ("applying inertia and gravity"); +# endif + dReal tmp[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + + for (b = 0; b < nb; b++) + { + body = bodies[b]; + + // for all bodies, compute the inertia tensor and its inverse in the global + // frame, and compute the rotational force and add it to the torque + // accumulator. I and invI are vertically stacked 3x4 matrices, one per body. + // @@@ check computation of rotational force. + + // compute inertia tensor in global frame + dMULTIPLY2_333 (tmp, body->mass.I, body->R); + dMULTIPLY0_333 (globalI + b * 12, body->R, tmp); + // compute inverse inertia tensor in global frame + dMULTIPLY2_333 (tmp, body->invI, body->R); + dMULTIPLY0_333 (globalInvI + b * 12, body->R, tmp); + + for (i = 0; i < 4; i++) + body->tacc[i] = saveTacc[b * 4 + i]; + // compute rotational force + dMULTIPLY0_331 (tmp, globalI + b * 12, body->avel); + dCROSS (body->tacc, -=, body->avel, tmp); + + // add the gravity force to all bodies + if ((body->flags & dxBodyNoGravity) == 0) + { + body->facc[0] = saveFacc[b * 4 + 0] + body->mass.mass * world->gravity[0]; + body->facc[1] = saveFacc[b * 4 + 1] + body->mass.mass * world->gravity[1]; + body->facc[2] = saveFacc[b * 4 + 2] + body->mass.mass * world->gravity[2]; + body->facc[3] = 0; + } + + } + +#ifdef RANDOM_JOINT_ORDER +#ifdef TIMING + dTimerNow ("randomizing joint order"); +#endif + //randomize the order of the joints by looping through the array + //and swapping the current joint pointer with a random one before it. + for (j = 0; j < nj; j++) + { + joint = joints[j]; + dxJoint::Info1 i1 = info[j]; + dxJoint::Info2 i2 = Jinfo[j]; + int r = rand () % (j + 1); + joints[j] = joints[r]; + info[j] = info[r]; + Jinfo[j] = Jinfo[r]; + joints[r] = joint; + info[r] = i1; + Jinfo[r] = i2; + } +#endif + + //now iterate through the random ordered joint array we created. + for (j = 0; j < nj; j++) + { +#ifdef TIMING + dTimerNow ("setting up joint"); +#endif + joint = joints[j]; + bodyPair[0] = joint->node[0].body; + bodyPair[1] = joint->node[1].body; + + if (bodyPair[0] && (bodyPair[0]->flags & dxBodyDisabled)) + bodyPair[0] = 0; + if (bodyPair[1] && (bodyPair[1]->flags & dxBodyDisabled)) + bodyPair[1] = 0; + + //if this joint is not connected to any enabled bodies, skip it. + if (!bodyPair[0] && !bodyPair[1]) + continue; + + if (bodyPair[0]) + { + GIPair[0] = globalI + bodyPair[0]->tag * 12; + GinvIPair[0] = globalInvI + bodyPair[0]->tag * 12; + } + if (bodyPair[1]) + { + GIPair[1] = globalI + bodyPair[1]->tag * 12; + GinvIPair[1] = globalInvI + bodyPair[1]->tag * 12; + } + + joints[j]->vtable->getInfo2 (joints[j], Jinfo + j); + + //dInternalStepIslandFast is an exact copy of the old routine with one + //modification: the calculated forces are added back to the facc and tacc + //vectors instead of applying them to the bodies and moving them. + if (info[j].m > 0) + { + dInternalStepFast (world, bodyPair, GIPair, GinvIPair, joint, info[j], Jinfo[j], ministep); + } + } + // } +# ifdef TIMING + dTimerNow ("moving bodies"); +# endif + //Now we can simulate all the free floating bodies, and move them. + for (b = 0; b < nb; b++) + { + body = bodies[b]; + + for (i = 0; i < 4; i++) + { + body->facc[i] *= ministep; + body->tacc[i] *= ministep; + } + + //apply torque + dMULTIPLYADD0_331 (body->avel, globalInvI + b * 12, body->tacc); + + //apply force + for (i = 0; i < 3; i++) + body->lvel[i] += body->invMass * body->facc[i]; + + //move It! + moveAndRotateBody (body, ministep); + } + } + for (b = 0; b < nb; b++) + for (j = 0; j < 4; j++) + bodies[b]->facc[j] = bodies[b]->tacc[j] = 0; +} + + +#ifdef NO_ISLANDS + +// Since the iterative algorithm doesn't care about islands of bodies, this is a +// faster algorithm that just sends it all the joints and bodies in one array. +// It's downfall is it's inability to handle disabled bodies as well as the old one. +static void +processIslandsFast (dxWorld * world, dReal stepsize, int maxiterations) +{ + // nothing to do if no bodies + if (world->nb <= 0) + return; + +# ifdef TIMING + dTimerStart ("creating joint and body arrays"); +# endif + dxBody **bodies, *body; + dxJoint **joints, *joint; + joints = (dxJoint **) ALLOCA (world->nj * sizeof (dxJoint *)); + bodies = (dxBody **) ALLOCA (world->nb * sizeof (dxBody *)); + + int nj = 0; + for (joint = world->firstjoint; joint; joint = (dxJoint *) joint->next) + joints[nj++] = joint; + + int nb = 0; + for (body = world->firstbody; body; body = (dxBody *) body->next) + bodies[nb++] = body; + + dInternalStepIslandFast (world, bodies, nb, joints, nj, stepsize, maxiterations); +# ifdef TIMING + dTimerEnd (); + dTimerReport (stdout, 1); +# endif +} + +#else + +//**************************************************************************** +// island processing + +// this groups all joints and bodies in a world into islands. all objects +// in an island are reachable by going through connected bodies and joints. +// each island can be simulated separately. +// note that joints that are not attached to anything will not be included +// in any island, an so they do not affect the simulation. +// +// this function starts new island from unvisited bodies. however, it will +// never start a new islands from a disabled body. thus islands of disabled +// bodies will not be included in the simulation. disabled bodies are +// re-enabled if they are found to be part of an active island. + +static void +processIslandsFast (dxWorld * world, dReal stepsize, int maxiterations) +{ +#ifdef TIMING + dTimerStart ("Island Setup"); +#endif + dxBody *b, *bb, **body; + dxJoint *j, **joint; + + // nothing to do if no bodies + if (world->nb <= 0) + return; + + // make arrays for body and joint lists (for a single island) to go into + body = (dxBody **) ALLOCA (world->nb * sizeof (dxBody *)); + joint = (dxJoint **) ALLOCA (world->nj * sizeof (dxJoint *)); + int bcount = 0; // number of bodies in `body' + int jcount = 0; // number of joints in `joint' + int tbcount = 0; + int tjcount = 0; + + // set all body/joint tags to 0 + for (b = world->firstbody; b; b = (dxBody *) b->next) + b->tag = 0; + for (j = world->firstjoint; j; j = (dxJoint *) j->next) + j->tag = 0; + + // allocate a stack of unvisited bodies in the island. the maximum size of + // the stack can be the lesser of the number of bodies or joints, because + // new bodies are only ever added to the stack by going through untagged + // joints. all the bodies in the stack must be tagged! + int stackalloc = (world->nj < world->nb) ? world->nj : world->nb; + dxBody **stack = (dxBody **) ALLOCA (stackalloc * sizeof (dxBody *)); + int *autostack = (int *) ALLOCA (stackalloc * sizeof (int)); + + for (bb = world->firstbody; bb; bb = (dxBody *) bb->next) + { +#ifdef TIMING + dTimerNow ("Island Processing"); +#endif + // get bb = the next enabled, untagged body, and tag it + if (bb->tag || (bb->flags & dxBodyDisabled)) + continue; + bb->tag = 1; + + // tag all bodies and joints starting from bb. + int stacksize = 0; + int autoDepth = autoEnableDepth; + b = bb; + body[0] = bb; + bcount = 1; + jcount = 0; + goto quickstart; + while (stacksize > 0) + { + b = stack[--stacksize]; // pop body off stack + autoDepth = autostack[stacksize]; + body[bcount++] = b; // put body on body list + quickstart: + + // traverse and tag all body's joints, add untagged connected bodies + // to stack + for (dxJointNode * n = b->firstjoint; n; n = n->next) + { + if (!n->joint->tag) + { + int thisDepth = autoEnableDepth; + n->joint->tag = 1; + joint[jcount++] = n->joint; + if (n->body && !n->body->tag) + { + if (n->body->flags & dxBodyDisabled) + thisDepth = autoDepth - 1; + if (thisDepth < 0) + continue; + n->body->flags &= ~dxBodyDisabled; + n->body->tag = 1; + autostack[stacksize] = thisDepth; + stack[stacksize++] = n->body; + } + } + } + dIASSERT (stacksize <= world->nb); + dIASSERT (stacksize <= world->nj); + } + + // now do something with body and joint lists + dInternalStepIslandFast (world, body, bcount, joint, jcount, stepsize, maxiterations); + + // what we've just done may have altered the body/joint tag values. + // we must make sure that these tags are nonzero. + // also make sure all bodies are in the enabled state. + int i; + for (i = 0; i < bcount; i++) + { + body[i]->tag = 1; + body[i]->flags &= ~dxBodyDisabled; + } + for (i = 0; i < jcount; i++) + joint[i]->tag = 1; + + tbcount += bcount; + tjcount += jcount; + } + +#ifdef TIMING + dMessage(0, "Total joints processed: %i, bodies: %i", tjcount, tbcount); +#endif + + // if debugging, check that all objects (except for disabled bodies, + // unconnected joints, and joints that are connected to disabled bodies) + // were tagged. +# ifndef dNODEBUG + for (b = world->firstbody; b; b = (dxBody *) b->next) + { + if (b->flags & dxBodyDisabled) + { + if (b->tag) + dDebug (0, "disabled body tagged"); + } + else + { + if (!b->tag) + dDebug (0, "enabled body not tagged"); + } + } + for (j = world->firstjoint; j; j = (dxJoint *) j->next) + { + if ((j->node[0].body && (j->node[0].body->flags & dxBodyDisabled) == 0) || (j->node[1].body && (j->node[1].body->flags & dxBodyDisabled) == 0)) + { + if (!j->tag) + dDebug (0, "attached enabled joint not tagged"); + } + else + { + if (j->tag) + dDebug (0, "unattached or disabled joint tagged"); + } + } +# endif + /******************** breakable joint contribution ***********************/ + dxJoint* nextJ; + if (!world->firstjoint) + nextJ = 0; + else + nextJ = (dxJoint*)world->firstjoint->next; + for (j=world->firstjoint; j; j=nextJ) { + nextJ = (dxJoint*)j->next; + // check if joint is breakable and broken + if (j->breakInfo && j->breakInfo->flags & dJOINT_BROKEN) { + // detach (break) the joint + dJointAttach (j, 0, 0); + // call the callback function if it is set + if (j->breakInfo->callback) j->breakInfo->callback (j); + // finally destroy the joint if the dJOINT_DELETE_ON_BREAK is set + if (j->breakInfo->flags & dJOINT_DELETE_ON_BREAK) dJointDestroy (j); + } + } + /*************************************************************************/ + +# ifdef TIMING + dTimerEnd (); + dTimerReport (stdout, 1); +# endif +} + +#endif + + +void dWorldStepFast1 (dWorldID w, dReal stepsize, int maxiterations) +{ + dUASSERT (w, "bad world argument"); + dUASSERT (stepsize > 0, "stepsize must be > 0"); + processIslandsFast (w, stepsize, maxiterations); +} diff -Nru ode-0.11.1/contrib/BreakableJoints/test_breakable.cpp ode-0.14/contrib/BreakableJoints/test_breakable.cpp --- ode-0.11.1/contrib/BreakableJoints/test_breakable.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/BreakableJoints/test_breakable.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,416 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +/* + +buggy with suspension. +this also shows you how to use geom groups. + +*/ + + +#include + +#include +#include + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif + +// select correct drawing functions + +#ifdef dDOUBLE +#define dsDrawBox dsDrawBoxD +#define dsDrawSphere dsDrawSphereD +#define dsDrawCylinder dsDrawCylinderD +#define dsDrawCappedCylinder dsDrawCappedCylinderD +#endif + + +// some constants + +#define LENGTH 0.7 // chassis length +#define WIDTH 0.4 // chassis width +#define HEIGHT 0.2 // chassis height +#define RADIUS 0.22 // wheel radius +#define STARTZ 0.4 // starting height of chassis +#define CMASS 1 // chassis mass +#define WMASS 0.2 // wheel mass + +// dynamics and collision objects (chassis, 4 wheels, environment, obstacles, chain) +static dWorldID world; +static dSpaceID space; + +// chain stuff +static const float chain_radius = 0.1; +static const float chain_mass = 0.1; +static const int chain_num = 10; +static dBodyID chain_body[chain_num]; +static dGeomID chain_geom[chain_num]; +static dJointID chain_joint[chain_num-1]; + +// 1 chasses, 4 wheels +static dBodyID body[5]; +// joint[0] is left front wheel, joint[1] is right front wheel +static dJointID joint[4]; +static int joint_exists[4]; +static dJointGroupID contactgroup; +static dGeomID ground; +static dSpaceID car_space; +static dGeomID box[1]; +static dGeomID sphere[4]; +static dGeomID ground_box; +static const int obstacle_num = 25; +static dGeomID obstacle[obstacle_num]; + +// things that the user controls + +static dReal speed=0,steer=0; // user commands + + + +// this is called by dSpaceCollide when two objects in space are +// potentially colliding. + +static void nearCallback (void *data, dGeomID o1, dGeomID o2) +{ + int i,n; + +// // do not collide objects that are connected +// dBodyID b1 = dGeomGetBody (o1), +// b2 = dGeomGetBody (o2); +// if (b1 && b2 && dAreConnected(b1, b2)) return; + + const int N = 10; + dContact contact[N]; + n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact)); + if (n > 0) { + for (i=0; i 0.1) v = 0.1; + if (v < -0.1) v = -0.1; + v *= 10.0; + dJointSetHinge2Param (joint[i],dParamVel,v); + dJointSetHinge2Param (joint[i],dParamFMax,0.2); + dJointSetHinge2Param (joint[i],dParamLoStop,-0.75); + dJointSetHinge2Param (joint[i],dParamHiStop,0.75); + dJointSetHinge2Param (joint[i],dParamFudgeFactor,0.1); + } + } + + dSpaceCollide (space,0,&nearCallback); + //dWorldStep (world,0.05); + dWorldStepFast1 (world,0.05,5); + + // remove all contact joints + dJointGroupEmpty (contactgroup); + } + + dsSetColor (0,1,1); + dsSetTexture (DS_WOOD); + dReal sides[3] = {LENGTH,WIDTH,HEIGHT}; + dsDrawBox (dBodyGetPosition(body[0]),dBodyGetRotation(body[0]),sides); + dsSetColor (1,1,1); + for (i=1; i<=4; i++) + dsDrawCylinder (dBodyGetPosition(body[i]), + dBodyGetRotation(body[i]), + 0.2, + RADIUS); + + dVector3 ss; + dGeomBoxGetLengths (ground_box,ss); + dsDrawBox (dGeomGetPosition(ground_box),dGeomGetRotation(ground_box),ss); + + dsSetColor (1,0,0); + for (i=0; i +#include + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif + +// select correct drawing functions + +#ifdef dDOUBLE +#define dsDrawBox dsDrawBoxD +#define dsDrawSphere dsDrawSphereD +#define dsDrawCylinder dsDrawCylinderD +#define dsDrawCappedCylinder dsDrawCappedCylinderD +#endif + + +// some constants + +#define LENGTH 0.7 // chassis length +#define WIDTH 0.5 // chassis width +#define HEIGHT 0.2 // chassis height +#define RADIUS 0.18 // wheel radius +#define STARTZ 0.5 // starting height of chassis +#define CMASS 1 // chassis mass +#define WMASS 0.2 // wheel mass + + +// dynamics and collision objects (chassis, 3 wheels, environment) + +static dWorldID world; +static dSpaceID space; +static dBodyID body[4]; +static dJointID joint[3]; // joint[0] is the front wheel +static dJointGroupID contactgroup; +static dGeomID ground; +static dSpaceID car_space; +static dGeomID box[1]; +static dGeomID sphere[3]; +static dGeomID ground_box; + + +// things that the user controls + +static dReal speed=0,steer=0; // user commands + + + +// this is called by dSpaceCollide when two objects in space are +// potentially colliding. + +static void nearCallback (void *data, dGeomID o1, dGeomID o2) +{ + int i,n; + + // only collide things with the ground + int g1 = (o1 == ground || o1 == ground_box); + int g2 = (o2 == ground || o2 == ground_box); + if (!(g1 ^ g2)) return; + + const int N = 10; + dContact contact[N]; + n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact)); + if (n > 0) { + for (i=0; i 0.1) v = 0.1; + if (v < -0.1) v = -0.1; + v *= 10.0; + dJointSetHinge2Param (joint[0],dParamVel,v); + dJointSetHinge2Param (joint[0],dParamFMax,0.2); + dJointSetHinge2Param (joint[0],dParamLoStop,-0.75); + dJointSetHinge2Param (joint[0],dParamHiStop,0.75); + dJointSetHinge2Param (joint[0],dParamFudgeFactor,0.1); + + dSpaceCollide (space,0,&nearCallback); + dWorldStep (world,0.05); + + // remove all contact joints + dJointGroupEmpty (contactgroup); + } + + dsSetColor (0,1,1); + dsSetTexture (DS_WOOD); + dReal sides[3] = {LENGTH,WIDTH,HEIGHT}; + dsDrawBox (dBodyGetPosition(body[0]),dBodyGetRotation(body[0]),sides); + dsSetColor (1,1,1); + for (i=1; i<=3; i++) dsDrawCylinder (dBodyGetPosition(body[i]), + dBodyGetRotation(body[i]),0.02f,RADIUS); + + dVector3 ss; + dGeomBoxGetLengths (ground_box,ss); + dsDrawBox (dGeomGetPosition(ground_box),dGeomGetRotation(ground_box),ss); + + /* + printf ("%.10f %.10f %.10f %.10f\n", + dJointGetHingeAngle (joint[1]), + dJointGetHingeAngle (joint[2]), + dJointGetHingeAngleRate (joint[1]), + dJointGetHingeAngleRate (joint[2])); + */ +} + + +int main (int argc, char **argv) +{ + int i; + dMass m; + + // setup pointers to drawstuff callback functions + dsFunctions fn; + fn.version = DS_VERSION; + fn.start = &start; + fn.step = &simLoop; + fn.command = &command; + fn.stop = 0; + fn.path_to_textures = "../../drawstuff/textures"; + if(argc==2) + { + fn.path_to_textures = argv[1]; + } + + // create world + + world = dWorldCreate(); + space = dHashSpaceCreate (0); + contactgroup = dJointGroupCreate (0); + dWorldSetGravity (world,0,0,-0.5); + ground = dCreatePlane (space,0,0,1,0); + + // chassis body + body[0] = dBodyCreate (world); + dBodySetPosition (body[0],0,0,STARTZ); + dMassSetBox (&m,1,LENGTH,WIDTH,HEIGHT); + dMassAdjust (&m,CMASS); + dBodySetMass (body[0],&m); + box[0] = dCreateBox (0,LENGTH,WIDTH,HEIGHT); + dGeomSetBody (box[0],body[0]); + + // wheel bodies + for (i=1; i<=3; i++) { + body[i] = dBodyCreate (world); + dQuaternion q; + dQFromAxisAndAngle (q,1,0,0,M_PI*0.5); + dBodySetQuaternion (body[i],q); + dMassSetSphere (&m,1,RADIUS); + dMassAdjust (&m,WMASS); + dBodySetMass (body[i],&m); + sphere[i-1] = dCreateSphere (0,RADIUS); + dGeomSetBody (sphere[i-1],body[i]); + } + dBodySetPosition (body[1],0.5*LENGTH,0,STARTZ-HEIGHT*0.5); + dBodySetPosition (body[2],-0.5*LENGTH, WIDTH*0.5,STARTZ-HEIGHT*0.5); + dBodySetPosition (body[3],-0.5*LENGTH,-WIDTH*0.5,STARTZ-HEIGHT*0.5); + + // front wheel hinge + /* + joint[0] = dJointCreateHinge2 (world,0); + dJointAttach (joint[0],body[0],body[1]); + const dReal *a = dBodyGetPosition (body[1]); + dJointSetHinge2Anchor (joint[0],a[0],a[1],a[2]); + dJointSetHinge2Axis1 (joint[0],0,0,1); + dJointSetHinge2Axis2 (joint[0],0,1,0); + */ + + // front and back wheel hinges + for (i=0; i<3; i++) { + joint[i] = dJointCreateHinge2 (world,0); + dJointAttach (joint[i],body[0],body[i+1]); + const dReal *a = dBodyGetPosition (body[i+1]); + dJointSetHinge2Anchor (joint[i],a[0],a[1],a[2]); + dJointSetHinge2Axis1 (joint[i],0,0,1); + dJointSetHinge2Axis2 (joint[i],0,1,0); + + // breakable joints contribution + // the wheels can break + dJointSetBreakable (joint[i], 1); + // the wheels wil break at a specific force + dJointSetBreakMode (joint[i], dJOINT_BREAK_AT_B1_FORCE|dJOINT_BREAK_AT_B2_FORCE); + // specify the force for the first body connected to the joint ... + dJointSetBreakForce (joint[i], 0, 1.5, 1.5, 1.5); + // and for the second body + dJointSetBreakForce (joint[i], 1, 1.5, 1.5, 1.5); + } + + // set joint suspension + for (i=0; i<3; i++) { + dJointSetHinge2Param (joint[i],dParamSuspensionERP,0.4); + dJointSetHinge2Param (joint[i],dParamSuspensionCFM,0.8); + } + + // lock back wheels along the steering axis + for (i=1; i<3; i++) { + // set stops to make sure wheels always stay in alignment + dJointSetHinge2Param (joint[i],dParamLoStop,0); + dJointSetHinge2Param (joint[i],dParamHiStop,0); + // the following alternative method is no good as the wheels may get out + // of alignment: + // dJointSetHinge2Param (joint[i],dParamVel,0); + // dJointSetHinge2Param (joint[i],dParamFMax,dInfinity); + } + + // create car space and add it to the top level space + car_space = dSimpleSpaceCreate (space); + dSpaceSetCleanup (car_space,0); + dSpaceAdd (car_space,box[0]); + dSpaceAdd (car_space,sphere[0]); + dSpaceAdd (car_space,sphere[1]); + dSpaceAdd (car_space,sphere[2]); + + // environment + ground_box = dCreateBox (space,2,1.5,1); + dMatrix3 R; + dRFromAxisAndAngle (R,0,1,0,-0.15); + dGeomSetPosition (ground_box,2,0,-0.34); + dGeomSetRotation (ground_box,R); + + // run simulation + dsSimulationLoop (argc,argv,352,288,&fn); + + dJointGroupDestroy (contactgroup); + dSpaceDestroy (space); + dWorldDestroy (world); + dGeomDestroy (box[0]); + dGeomDestroy (sphere[0]); + dGeomDestroy (sphere[1]); + dGeomDestroy (sphere[2]); + + return 0; +} diff -Nru ode-0.11.1/contrib/dCylinder/dCylinder.cpp ode-0.14/contrib/dCylinder/dCylinder.cpp --- ode-0.11.1/contrib/dCylinder/dCylinder.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dCylinder/dCylinder.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1445 @@ +#include +#include "dCylinder.h" +// given a pointer `p' to a dContactGeom, return the dContactGeom at +// p + skip bytes. + +struct dxCylinder { // cylinder + dReal radius,lz; // radius, length along y axis // +}; + +int dCylinderClassUser = -1; + +#define NUMC_MASK (0xffff) + +#define CONTACT(p,skip) ((dContactGeom*) (((char*)p) + (skip))) + +///////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////circleIntersection////////////////////////////////////////////////// +//this does following: +//takes two circles as normals to planes n1,n2, center points cp1,cp2,and radiuses r1,r2 +//finds line on which circles' planes intersect +//finds four points O1,O2 - intersection between the line and sphere with center cp1 radius r1 +// O3,O4 - intersection between the line and sphere with center cp2 radius r2 +//returns false if there is no intersection +//computes distances O1-O3, O1-O4, O2-O3, O2-O4 +//in "point" returns mean point between intersection points with smallest distance +///////////////////////////////////////////////////////////////////////////////////////////////// +inline bool circleIntersection(const dReal* n1,const dReal* cp1,dReal r1,const dReal* n2,const dReal* cp2,dReal r2,dVector3 point){ +dReal c1=dDOT14(cp1,n1); +dReal c2=dDOT14(cp2,n2); +dReal cos=dDOT44(n1,n2); +dReal cos_2=cos*cos; +dReal sin_2=1-cos_2; +dReal p1=(c1-c2*cos)/sin_2; +dReal p2=(c2-c1*cos)/sin_2; +dVector3 lp={p1*n1[0]+p2*n2[0],p1*n1[4]+p2*n2[4],p1*n1[8]+p2*n2[8]}; +dVector3 n; +dCROSS144(n,=,n1,n2); +dVector3 LC1={lp[0]-cp1[0],lp[1]-cp1[1],lp[2]-cp1[2]}; +dVector3 LC2={lp[0]-cp2[0],lp[1]-cp2[1],lp[2]-cp2[2]}; +dReal A,B,C,B_A,B_A_2,D; +dReal t1,t2,t3,t4; +A=dDOT(n,n); +B=dDOT(LC1,n); +C=dDOT(LC1,LC1)-r1*r1; +B_A=B/A; +B_A_2=B_A*B_A; +D=B_A_2-C; +if(D<0.f){ //somewhat strange solution + //- it is needed to set some + //axis to sepparate cylinders + //when their edges approach + t1=-B_A+sqrtf(-D); + t2=-B_A-sqrtf(-D); +// return false; + } +else{ +t1=-B_A-sqrtf(D); +t2=-B_A+sqrtf(D); +} +B=dDOT(LC2,n); +C=dDOT(LC2,LC2)-r2*r2; +B_A=B/A; +B_A_2=B_A*B_A; +D=B_A_2-C; + +if(D<0.f) { + t3=-B_A+sqrtf(-D); + t4=-B_A-sqrtf(-D); +// return false; + } +else{ +t3=-B_A-sqrtf(D); +t4=-B_A+sqrtf(D); +} +dVector3 O1={lp[0]+n[0]*t1,lp[1]+n[1]*t1,lp[2]+n[2]*t1}; +dVector3 O2={lp[0]+n[0]*t2,lp[1]+n[1]*t2,lp[2]+n[2]*t2}; + +dVector3 O3={lp[0]+n[0]*t3,lp[1]+n[1]*t3,lp[2]+n[2]*t3}; +dVector3 O4={lp[0]+n[0]*t4,lp[1]+n[1]*t4,lp[2]+n[2]*t4}; + +dVector3 L1_3={O3[0]-O1[0],O3[1]-O1[1],O3[2]-O1[2]}; +dVector3 L1_4={O4[0]-O1[0],O4[1]-O1[1],O4[2]-O1[2]}; + +dVector3 L2_3={O3[0]-O2[0],O3[1]-O2[1],O3[2]-O2[2]}; +dVector3 L2_4={O4[0]-O2[0],O4[1]-O2[1],O4[2]-O2[2]}; + + +dReal l1_3=dDOT(L1_3,L1_3); +dReal l1_4=dDOT(L1_4,L1_4); + +dReal l2_3=dDOT(L2_3,L2_3); +dReal l2_4=dDOT(L2_4,L2_4); + + +if (l1_3 0) return 0; \ + if (s2 > s) { \ + s = s2; \ + normalR = norm; \ + invert_normal = ((expr1) < 0); \ + *code = (cc); \ + } + + s = -dInfinity; + invert_normal = 0; + *code = 0; + + // separating axis = cylinder ax u2 + //used when a box vertex touches a flat face of the cylinder + TEST (pp[1],(hlz + B1*Q21 + B2*Q22 + B3*Q23),R1+1,0); + + + // separating axis = box axis v1,v2,v3 + //used when cylinder edge touches box face + //there is two ways to compute sQ: sQ21=sqrtf(1.f-Q21*Q21); or sQ21=sqrtf(Q23*Q23+Q22*Q22); + //if we did not need Q23 and Q22 the first way might be used to quiken the routine but then it need to + //check if Q21<=1.f, becouse it may slightly exeed 1.f. + + + sQ21=sqrtf(Q23*Q23+Q22*Q22); + TEST (dDOT41(R2+0,p),(radius*sQ21 + hlz*Q21 + B1),R2+0,1); + + sQ22=sqrtf(Q23*Q23+Q21*Q21); + TEST (dDOT41(R2+1,p),(radius*sQ22 + hlz*Q22 + B2),R2+1,2); + + sQ23=sqrtf(Q22*Q22+Q21*Q21); + TEST (dDOT41(R2+2,p),(radius*sQ23 + hlz*Q23 + B3),R2+2,3); + + +#undef TEST +#define TEST(expr1,expr2,n1,n2,n3,cc) \ + s2 = dFabs(expr1) - (expr2); \ + if (s2 > 0) return 0; \ + if (s2 > s) { \ + s = s2; \ + normalR = 0; \ + normalC[0] = (n1); normalC[1] = (n2); normalC[2] = (n3); \ + invert_normal = ((expr1) < 0); \ + *code = (cc); \ + } + + + +// separating axis is a normal to the cylinder axis passing across the nearest box vertex +//used when a box vertex touches the lateral surface of the cylinder + +dReal proj,boxProj,cos,sin,cos1,cos3; +dVector3 tAx,Ax,pb; +{ +//making Ax which is perpendicular to cyl ax to box position// +proj=dDOT14(p2,R1+1)-dDOT14(p1,R1+1); + +Ax[0]=p2[0]-p1[0]-R1[1]*proj; +Ax[1]=p2[1]-p1[1]-R1[5]*proj; +Ax[2]=p2[2]-p1[2]-R1[9]*proj; +dNormalize3(Ax); +//using Ax find box vertex which is nearest to the cylinder axis + dReal sign; + + for (i=0; i<3; i++) pb[i] = p2[i]; + sign = (dDOT14(Ax,R2+0) > 0) ? REAL(-1.0) : REAL(1.0); + for (i=0; i<3; i++) pb[i] += sign * B1 * R2[i*4]; + sign = (dDOT14(Ax,R2+1) > 0) ? REAL(-1.0) : REAL(1.0); + for (i=0; i<3; i++) pb[i] += sign * B2 * R2[i*4+1]; + sign = (dDOT14(Ax,R2+2) > 0) ? REAL(-1.0) : REAL(1.0); + for (i=0; i<3; i++) pb[i] += sign * B3 * R2[i*4+2]; + +//building axis which is normal to cylinder ax to the nearest box vertex +proj=dDOT14(pb,R1+1)-dDOT14(p1,R1+1); + +Ax[0]=pb[0]-p1[0]-R1[1]*proj; +Ax[1]=pb[1]-p1[1]-R1[5]*proj; +Ax[2]=pb[2]-p1[2]-R1[9]*proj; +dNormalize3(Ax); +} + +boxProj=dFabs(dDOT14(Ax,R2+0)*B1)+ + dFabs(dDOT14(Ax,R2+1)*B2)+ + dFabs(dDOT14(Ax,R2+2)*B3); + +TEST(p[0]*Ax[0]+p[1]*Ax[1]+p[2]*Ax[2],(radius+boxProj),Ax[0],Ax[1],Ax[2],4); + + +//next three test used to handle collisions between cylinder circles and box ages +proj=dDOT14(p1,R2+0)-dDOT14(p2,R2+0); + +tAx[0]=-p1[0]+p2[0]+R2[0]*proj; +tAx[1]=-p1[1]+p2[1]+R2[4]*proj; +tAx[2]=-p1[2]+p2[2]+R2[8]*proj; +dNormalize3(tAx); + +//now tAx is normal to first ax of the box to cylinder center +//making perpendicular to tAx lying in the plane which is normal to the cylinder axis +//it is tangent in the point where projection of tAx on cylinder's ring intersect edge circle + +cos=dDOT14(tAx,R1+0); +sin=dDOT14(tAx,R1+2); +tAx[0]=R1[2]*cos-R1[0]*sin; +tAx[1]=R1[6]*cos-R1[4]*sin; +tAx[2]=R1[10]*cos-R1[8]*sin; + + +//use cross between tAx and first ax of the box as separating axix + +dCROSS114(Ax,=,tAx,R2+0); +dNormalize3(Ax); + +boxProj=dFabs(dDOT14(Ax,R2+1)*B2)+ + dFabs(dDOT14(Ax,R2+0)*B1)+ + dFabs(dDOT14(Ax,R2+2)*B3); + + cos=dFabs(dDOT14(Ax,R1+1)); + cos1=dDOT14(Ax,R1+0); + cos3=dDOT14(Ax,R1+2); + sin=sqrtf(cos1*cos1+cos3*cos3); + +TEST(p[0]*Ax[0]+p[1]*Ax[1]+p[2]*Ax[2],(sin*radius+cos*hlz+boxProj),Ax[0],Ax[1],Ax[2],5); + + +//same thing with the second axis of the box +proj=dDOT14(p1,R2+1)-dDOT14(p2,R2+1); + +tAx[0]=-p1[0]+p2[0]+R2[1]*proj; +tAx[1]=-p1[1]+p2[1]+R2[5]*proj; +tAx[2]=-p1[2]+p2[2]+R2[9]*proj; +dNormalize3(tAx); + + +cos=dDOT14(tAx,R1+0); +sin=dDOT14(tAx,R1+2); +tAx[0]=R1[2]*cos-R1[0]*sin; +tAx[1]=R1[6]*cos-R1[4]*sin; +tAx[2]=R1[10]*cos-R1[8]*sin; + +dCROSS114(Ax,=,tAx,R2+1); +dNormalize3(Ax); + +boxProj=dFabs(dDOT14(Ax,R2+0)*B1)+ + dFabs(dDOT14(Ax,R2+1)*B2)+ + dFabs(dDOT14(Ax,R2+2)*B3); + + cos=dFabs(dDOT14(Ax,R1+1)); + cos1=dDOT14(Ax,R1+0); + cos3=dDOT14(Ax,R1+2); + sin=sqrtf(cos1*cos1+cos3*cos3); +TEST(p[0]*Ax[0]+p[1]*Ax[1]+p[2]*Ax[2],(sin*radius+cos*hlz+boxProj),Ax[0],Ax[1],Ax[2],6); + +//same thing with the third axis of the box +proj=dDOT14(p1,R2+2)-dDOT14(p2,R2+2); + +Ax[0]=-p1[0]+p2[0]+R2[2]*proj; +Ax[1]=-p1[1]+p2[1]+R2[6]*proj; +Ax[2]=-p1[2]+p2[2]+R2[10]*proj; +dNormalize3(tAx); + +cos=dDOT14(tAx,R1+0); +sin=dDOT14(tAx,R1+2); +tAx[0]=R1[2]*cos-R1[0]*sin; +tAx[1]=R1[6]*cos-R1[4]*sin; +tAx[2]=R1[10]*cos-R1[8]*sin; + +dCROSS114(Ax,=,tAx,R2+2); +dNormalize3(Ax); +boxProj=dFabs(dDOT14(Ax,R2+1)*B2)+ + dFabs(dDOT14(Ax,R2+2)*B3)+ + dFabs(dDOT14(Ax,R2+0)*B1); + + cos=dFabs(dDOT14(Ax,R1+1)); + cos1=dDOT14(Ax,R1+0); + cos3=dDOT14(Ax,R1+2); + sin=sqrtf(cos1*cos1+cos3*cos3); +TEST(p[0]*Ax[0]+p[1]*Ax[1]+p[2]*Ax[2],(sin*radius+cos*hlz+boxProj),Ax[0],Ax[1],Ax[2],7); + + +#undef TEST + +// note: cross product axes need to be scaled when s is computed. +// normal (n1,n2,n3) is relative to box 1. + +#define TEST(expr1,expr2,n1,n2,n3,cc) \ + s2 = dFabs(expr1) - (expr2); \ + if (s2 > 0) return 0; \ + l = dSqrt ((n1)*(n1) + (n2)*(n2) + (n3)*(n3)); \ + if (l > 0) { \ + s2 /= l; \ + if (s2 > s) { \ + s = s2; \ + normalR = 0; \ + normalC[0] = (n1)/l; normalC[1] = (n2)/l; normalC[2] = (n3)/l; \ + invert_normal = ((expr1) < 0); \ + *code = (cc); \ + } \ + } + +//crosses between cylinder axis and box axes + // separating axis = u2 x (v1,v2,v3) + TEST(pp[0]*R31-pp[2]*R11,(radius+B2*Q23+B3*Q22),R31,0,-R11,8); + TEST(pp[0]*R32-pp[2]*R12,(radius+B1*Q23+B3*Q21),R32,0,-R12,9); + TEST(pp[0]*R33-pp[2]*R13,(radius+B1*Q22+B2*Q21),R33,0,-R13,10); + + +#undef TEST + + // if we get to this point, the boxes interpenetrate. compute the normal + // in global coordinates. + if (normalR) { + normal[0] = normalR[0]; + normal[1] = normalR[4]; + normal[2] = normalR[8]; + } + else { + if(*code>7) dMULTIPLY0_331 (normal,R1,normalC); + else {normal[0] =normalC[0];normal[1] = normalC[1];normal[2] = normalC[2];} + } + if (invert_normal) { + normal[0] = -normal[0]; + normal[1] = -normal[1]; + normal[2] = -normal[2]; + } + *depth = -s; + + // compute contact point(s) + + if (*code > 7) { + //find point on the cylinder pa deepest along normal + dVector3 pa; + dReal sign, cos1,cos3,factor; + + + for (i=0; i<3; i++) pa[i] = p1[i]; + + cos1 = dDOT14(normal,R1+0); + cos3 = dDOT14(normal,R1+2) ; + factor=sqrtf(cos1*cos1+cos3*cos3); + + cos1/=factor; + cos3/=factor; + + for (i=0; i<3; i++) pa[i] += cos1 * radius * R1[i*4]; + + sign = (dDOT14(normal,R1+1) > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) pa[i] += sign * hlz * R1[i*4+1]; + + + for (i=0; i<3; i++) pa[i] += cos3 * radius * R1[i*4+2]; + + // find vertex of the box deepest along normal + dVector3 pb; + for (i=0; i<3; i++) pb[i] = p2[i]; + sign = (dDOT14(normal,R2+0) > 0) ? REAL(-1.0) : REAL(1.0); + for (i=0; i<3; i++) pb[i] += sign * B1 * R2[i*4]; + sign = (dDOT14(normal,R2+1) > 0) ? REAL(-1.0) : REAL(1.0); + for (i=0; i<3; i++) pb[i] += sign * B2 * R2[i*4+1]; + sign = (dDOT14(normal,R2+2) > 0) ? REAL(-1.0) : REAL(1.0); + for (i=0; i<3; i++) pb[i] += sign * B3 * R2[i*4+2]; + + + dReal alpha,beta; + dVector3 ua,ub; + for (i=0; i<3; i++) ua[i] = R1[1 + i*4]; + for (i=0; i<3; i++) ub[i] = R2[*code-8 + i*4]; + + lineClosestApproach (pa,ua,pb,ub,&alpha,&beta); + for (i=0; i<3; i++) pa[i] += ua[i]*alpha; + for (i=0; i<3; i++) pb[i] += ub[i]*beta; + + for (i=0; i<3; i++) contact[0].pos[i] = REAL(0.5)*(pa[i]+pb[i]); + contact[0].depth = *depth; + return 1; + } + + + if(*code==4){ + for (i=0; i<3; i++) contact[0].pos[i] = pb[i]; + contact[0].depth = *depth; + return 1; + } + + + dVector3 vertex; + if (*code == 0) { + + dReal sign; + for (i=0; i<3; i++) vertex[i] = p2[i]; + sign = (dDOT14(normal,R2+0) > 0) ? REAL(-1.0) : REAL(1.0); + for (i=0; i<3; i++) vertex[i] += sign * B1 * R2[i*4]; + sign = (dDOT14(normal,R2+1) > 0) ? REAL(-1.0) : REAL(1.0); + for (i=0; i<3; i++) vertex[i] += sign * B2 * R2[i*4+1]; + sign = (dDOT14(normal,R2+2) > 0) ? REAL(-1.0) : REAL(1.0); + for (i=0; i<3; i++) vertex[i] += sign * B3 * R2[i*4+2]; + } + else { + + dReal sign,cos1,cos3,factor; + for (i=0; i<3; i++) vertex[i] = p1[i]; + cos1 = dDOT14(normal,R1+0) ; + cos3 = dDOT14(normal,R1+2); + factor=sqrtf(cos1*cos1+cos3*cos3); + factor= factor ? factor : 1.f; + cos1/=factor; + cos3/=factor; + for (i=0; i<3; i++) vertex[i] += cos1 * radius * R1[i*4]; + + sign = (dDOT14(normal,R1+1) > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) vertex[i] += sign * hlz * R1[i*4+1]; + + for (i=0; i<3; i++) vertex[i] += cos3 * radius * R1[i*4+2]; + } + for (i=0; i<3; i++) contact[0].pos[i] = vertex[i]; + contact[0].depth = *depth; + return 1; +} + +//**************************************************************************** + +extern "C" int dCylCyl (const dVector3 p1, const dMatrix3 R1, + const dReal radius1,const dReal lz1, const dVector3 p2, + const dMatrix3 R2, const dReal radius2,const dReal lz2, + dVector3 normal, dReal *depth, int *code, + int maxc, dContactGeom *contact, int skip) +{ + dVector3 p,pp1,pp2,normalC; + const dReal *normalR = 0; + dReal hlz1,hlz2,s,s2; + int i,invert_normal; + + // get vector from centers of box 1 to box 2, relative to box 1 + p[0] = p2[0] - p1[0]; + p[1] = p2[1] - p1[1]; + p[2] = p2[2] - p1[2]; + dMULTIPLY1_331 (pp1,R1,p); // get pp1 = p relative to body 1 + dMULTIPLY1_331 (pp2,R2,p); + // get side lengths / 2 + hlz1 = lz1*REAL(0.5); + hlz2 = lz2*REAL(0.5); + + dReal proj,cos,sin,cos1,cos3; + + + +#define TEST(expr1,expr2,norm,cc) \ + s2 = dFabs(expr1) - (expr2); \ + if (s2 > 0) return 0; \ + if (s2 > s) { \ + s = s2; \ + normalR = norm; \ + invert_normal = ((expr1) < 0); \ + *code = (cc); \ + } + + s = -dInfinity; + invert_normal = 0; + *code = 0; + + cos=dFabs(dDOT44(R1+1,R2+1)); + sin=sqrtf(1.f-(cos>1.f ? 1.f : cos)); + + TEST (pp1[1],(hlz1 + radius2*sin + hlz2*cos ),R1+1,0);//pp + + TEST (pp2[1],(radius1*sin + hlz1*cos + hlz2),R2+1,1); + + + + // note: cross product axes need to be scaled when s is computed. + +#undef TEST +#define TEST(expr1,expr2,n1,n2,n3,cc) \ + s2 = dFabs(expr1) - (expr2); \ + if (s2 > 0) return 0; \ + if (s2 > s) { \ + s = s2; \ + normalR = 0; \ + normalC[0] = (n1); normalC[1] = (n2); normalC[2] = (n3); \ + invert_normal = ((expr1) < 0); \ + *code = (cc); \ + } + + +dVector3 tAx,Ax,pa,pb; + +//cross between cylinders' axes +dCROSS144(Ax,=,R1+1,R2+1); +dNormalize3(Ax); +TEST(p[0]*Ax[0]+p[1]*Ax[1]+p[2]*Ax[2],radius1+radius2,Ax[0],Ax[1],Ax[2],6); + + +{ + + dReal sign, factor; + + //making ax which is perpendicular to cyl1 ax passing across cyl2 position// + //(project p on cyl1 flat surface ) + for (i=0; i<3; i++) pb[i] = p2[i]; + //cos1 = dDOT14(p,R1+0); + //cos3 = dDOT14(p,R1+2) ; + tAx[0]=pp1[0]*R1[0]+pp1[2]*R1[2]; + tAx[1]=pp1[0]*R1[4]+pp1[2]*R1[6]; + tAx[2]=pp1[0]*R1[8]+pp1[2]*R1[10]; + dNormalize3(tAx); + +//find deepest point pb of cyl2 on opposite direction of tAx + cos1 = dDOT14(tAx,R2+0); + cos3 = dDOT14(tAx,R2+2) ; + factor=sqrtf(cos1*cos1+cos3*cos3); + cos1/=factor; + cos3/=factor; + for (i=0; i<3; i++) pb[i] -= cos1 * radius2 * R2[i*4]; + + sign = (dDOT14(tAx,R2+1) > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) pb[i] -= sign * hlz2 * R2[i*4+1]; + + for (i=0; i<3; i++) pb[i] -= cos3 * radius2 * R2[i*4+2]; + +//making perpendicular to cyl1 ax passing across pb + proj=dDOT14(pb,R1+1)-dDOT14(p1,R1+1); + + Ax[0]=pb[0]-p1[0]-R1[1]*proj; + Ax[1]=pb[1]-p1[1]-R1[5]*proj; + Ax[2]=pb[2]-p1[2]-R1[9]*proj; + +} + +dNormalize3(Ax); + + + cos=dFabs(dDOT14(Ax,R2+1)); + cos1=dDOT14(Ax,R2+0); + cos3=dDOT14(Ax,R2+2); + sin=sqrtf(cos1*cos1+cos3*cos3); + +TEST(p[0]*Ax[0]+p[1]*Ax[1]+p[2]*Ax[2],radius1+cos*hlz2+sin*radius2,Ax[0],Ax[1],Ax[2],3); + + + +{ + + dReal sign, factor; + + for (i=0; i<3; i++) pa[i] = p1[i]; + + //making ax which is perpendicular to cyl2 ax passing across cyl1 position// + //(project p on cyl2 flat surface ) + //cos1 = dDOT14(p,R2+0); + //cos3 = dDOT14(p,R2+2) ; + tAx[0]=pp2[0]*R2[0]+pp2[2]*R2[2]; + tAx[1]=pp2[0]*R2[4]+pp2[2]*R2[6]; + tAx[2]=pp2[0]*R2[8]+pp2[2]*R2[10]; + dNormalize3(tAx); + + cos1 = dDOT14(tAx,R1+0); + cos3 = dDOT14(tAx,R1+2) ; + factor=sqrtf(cos1*cos1+cos3*cos3); + cos1/=factor; + cos3/=factor; + +//find deepest point pa of cyl2 on direction of tAx + for (i=0; i<3; i++) pa[i] += cos1 * radius1 * R1[i*4]; + + sign = (dDOT14(tAx,R1+1) > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) pa[i] += sign * hlz1 * R1[i*4+1]; + + + for (i=0; i<3; i++) pa[i] += cos3 * radius1 * R1[i*4+2]; + + proj=dDOT14(pa,R2+1)-dDOT14(p2,R2+1); + + Ax[0]=pa[0]-p2[0]-R2[1]*proj; + Ax[1]=pa[1]-p2[1]-R2[5]*proj; + Ax[2]=pa[2]-p2[2]-R2[9]*proj; + +} +dNormalize3(Ax); + + + + cos=dFabs(dDOT14(Ax,R1+1)); + cos1=dDOT14(Ax,R1+0); + cos3=dDOT14(Ax,R1+2); + sin=sqrtf(cos1*cos1+cos3*cos3); + +TEST(p[0]*Ax[0]+p[1]*Ax[1]+p[2]*Ax[2],radius2+cos*hlz1+sin*radius1,Ax[0],Ax[1],Ax[2],4); + + +////test circl + +//@ this needed to set right normal when cylinders edges intersect +//@ the most precise axis for this test may be found as a line between nearest points of two +//@ circles. But it needs comparatively a lot of computation. +//@ I use a trick which lets not to solve quadric equation. +//@ In the case when cylinder eidges touches the test below rather accurate. +//@ I still not sure about problems with sepparation but they have not been revealed during testing. +dVector3 point; +{ + dVector3 ca,cb; + dReal sign; + for (i=0; i<3; i++) ca[i] = p1[i]; + for (i=0; i<3; i++) cb[i] = p2[i]; +//find two nearest flat rings + sign = (pp1[1] > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) ca[i] += sign * hlz1 * R1[i*4+1]; + + sign = (pp2[1] > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) cb[i] -= sign * hlz2 * R2[i*4+1]; + + dVector3 tAx,tAx1; + circleIntersection(R1+1,ca,radius1,R2+1,cb,radius2,point); + + Ax[0]=point[0]-ca[0]; + Ax[1]=point[1]-ca[1]; + Ax[2]=point[2]-ca[2]; + + cos1 = dDOT14(Ax,R1+0); + cos3 = dDOT14(Ax,R1+2) ; + + tAx[0]=cos3*R1[0]-cos1*R1[2]; + tAx[1]=cos3*R1[4]-cos1*R1[6]; + tAx[2]=cos3*R1[8]-cos1*R1[10]; + + Ax[0]=point[0]-cb[0]; + Ax[1]=point[1]-cb[1]; + Ax[2]=point[2]-cb[2]; + + + cos1 = dDOT14(Ax,R2+0); + cos3 = dDOT14(Ax,R2+2) ; + + tAx1[0]=cos3*R2[0]-cos1*R2[2]; + tAx1[1]=cos3*R2[4]-cos1*R2[6]; + tAx1[2]=cos3*R2[8]-cos1*R2[10]; + dCROSS(Ax,=,tAx,tAx1); + + + + +dNormalize3(Ax); +dReal cyl1Pr,cyl2Pr; + + cos=dFabs(dDOT14(Ax,R1+1)); + cos1=dDOT14(Ax,R1+0); + cos3=dDOT14(Ax,R1+2); + sin=sqrtf(cos1*cos1+cos3*cos3); + cyl1Pr=cos*hlz1+sin*radius1; + + cos=dFabs(dDOT14(Ax,R2+1)); + cos1=dDOT14(Ax,R2+0); + cos3=dDOT14(Ax,R2+2); + sin=sqrtf(cos1*cos1+cos3*cos3); + cyl2Pr=cos*hlz2+sin*radius2; +TEST(p[0]*Ax[0]+p[1]*Ax[1]+p[2]*Ax[2],cyl1Pr+cyl2Pr,Ax[0],Ax[1],Ax[2],5); + + +} + + +#undef TEST + + + + // if we get to this point, the cylinders interpenetrate. compute the normal + // in global coordinates. + if (normalR) { + normal[0] = normalR[0]; + normal[1] = normalR[4]; + normal[2] = normalR[8]; + } + else { + normal[0] =normalC[0];normal[1] = normalC[1];normal[2] = normalC[2]; + } + if (invert_normal) { + normal[0] = -normal[0]; + normal[1] = -normal[1]; + normal[2] = -normal[2]; + } + + *depth = -s; + + // compute contact point(s) + + if(*code==3){ + for (i=0; i<3; i++) contact[0].pos[i] = pb[i]; + contact[0].depth = *depth; + return 1; + } + + if(*code==4){ + for (i=0; i<3; i++) contact[0].pos[i] = pa[i]; + contact[0].depth = *depth; + return 1; + } + + if(*code==5){ + for (i=0; i<3; i++) contact[0].pos[i] = point[i]; + contact[0].depth = *depth; + return 1; + } + +if (*code == 6) { + dVector3 pa; + dReal sign, cos1,cos3,factor; + + + for (i=0; i<3; i++) pa[i] = p1[i]; + + cos1 = dDOT14(normal,R1+0); + cos3 = dDOT14(normal,R1+2) ; + factor=sqrtf(cos1*cos1+cos3*cos3); + + cos1/=factor; + cos3/=factor; + + for (i=0; i<3; i++) pa[i] += cos1 * radius1 * R1[i*4]; + + sign = (dDOT14(normal,R1+1) > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) pa[i] += sign * hlz1 * R1[i*4+1]; + + + for (i=0; i<3; i++) pa[i] += cos3 * radius1 * R1[i*4+2]; + + // find a point pb on the intersecting edge of cylinder 2 + dVector3 pb; + for (i=0; i<3; i++) pb[i] = p2[i]; + cos1 = dDOT14(normal,R2+0); + cos3 = dDOT14(normal,R2+2) ; + factor=sqrtf(cos1*cos1+cos3*cos3); + + cos1/=factor; + cos3/=factor; + + for (i=0; i<3; i++) pb[i] -= cos1 * radius2 * R2[i*4]; + + sign = (dDOT14(normal,R2+1) > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) pb[i] -= sign * hlz2 * R2[i*4+1]; + + + for (i=0; i<3; i++) pb[i] -= cos3 * radius2 * R2[i*4+2]; + + + dReal alpha,beta; + dVector3 ua,ub; + for (i=0; i<3; i++) ua[i] = R1[1 + i*4]; + for (i=0; i<3; i++) ub[i] = R2[1 + i*4]; + lineClosestApproach (pa,ua,pb,ub,&alpha,&beta); + for (i=0; i<3; i++) pa[i] += ua[i]*alpha; + for (i=0; i<3; i++) pb[i] += ub[i]*beta; + + for (i=0; i<3; i++) contact[0].pos[i] = REAL(0.5)*(pa[i]+pb[i]); + contact[0].depth = *depth; + return 1; + } + + // okay, we have a face-something intersection (because the separating + // axis is perpendicular to a face). + + // @@@ temporary: make deepest point on the "other" cylinder the contact point. + // @@@ this kind of works, but we need multiple contact points for stability, + // @@@ especially for face-face contact. + + dVector3 vertex; + if (*code == 0) { + // flat face from cylinder 1 touches a edge/face from cylinder 2. + dReal sign,cos1,cos3,factor; + for (i=0; i<3; i++) vertex[i] = p2[i]; + cos1 = dDOT14(normal,R2+0) ; + cos3 = dDOT14(normal,R2+2); + factor=sqrtf(cos1*cos1+cos3*cos3); + + cos1/=factor; + cos3/=factor; + for (i=0; i<3; i++) vertex[i] -= cos1 * radius2 * R2[i*4]; + + sign = (dDOT14(normal,R1+1) > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) vertex[i] -= sign * hlz2 * R2[i*4+1]; + + for (i=0; i<3; i++) vertex[i] -= cos3 * radius2 * R2[i*4+2]; + } + else { + // flat face from cylinder 2 touches a edge/face from cylinder 1. + dReal sign,cos1,cos3,factor; + for (i=0; i<3; i++) vertex[i] = p1[i]; + cos1 = dDOT14(normal,R1+0) ; + cos3 = dDOT14(normal,R1+2); + factor=sqrtf(cos1*cos1+cos3*cos3); + + cos1/=factor; + cos3/=factor; + for (i=0; i<3; i++) vertex[i] += cos1 * radius1 * R1[i*4]; + + sign = (dDOT14(normal,R1+1) > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) vertex[i] += sign * hlz1 * R1[i*4+1]; + + for (i=0; i<3; i++) vertex[i] += cos3 * radius1 * R1[i*4+2]; + } + for (i=0; i<3; i++) contact[0].pos[i] = vertex[i]; + contact[0].depth = *depth; + return 1; +} + +//**************************************************************************** + + +int dCollideCylS (dxGeom *o1, dxGeom *o2, int flags, + dContactGeom *contact, int skip) +{ + + + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (dGeomGetClass(o2) == dSphereClass); + dIASSERT (dGeomGetClass(o1) == dCylinderClassUser); + const dReal* p1=dGeomGetPosition(o1); + const dReal* p2=dGeomGetPosition(o2); + const dReal* R=dGeomGetRotation(o1); + dVector3 p,normalC,normal; + const dReal *normalR = 0; + dReal cylRadius; + dReal hl; + dGeomCylinderGetParams(o1,&cylRadius,&hl); + dReal sphereRadius; + sphereRadius=dGeomSphereGetRadius(o2); + + int i,invert_normal; + + // get vector from centers of cyl to shere + p[0] = p2[0] - p1[0]; + p[1] = p2[1] - p1[1]; + p[2] = p2[2] - p1[2]; + +dReal s,s2; +unsigned char code; +#define TEST(expr1,expr2,norm,cc) \ + s2 = dFabs(expr1) - (expr2); \ + if (s2 > 0) return 0; \ + if (s2 > s) { \ + s = s2; \ + normalR = norm; \ + invert_normal = ((expr1) < 0); \ + code = (cc); \ + } + + s = -dInfinity; + invert_normal = 0; + code = 0; + + // separating axis cyl ax + + TEST (dDOT14(p,R+1),sphereRadius+hl,R+1,2); + // note: cross product axes need to be scaled when s is computed. + // normal (n1,n2,n3) is relative to +#undef TEST +#define TEST(expr1,expr2,n1,n2,n3,cc) \ + s2 = dFabs(expr1) - (expr2); \ + if (s2 > 0) return 0; \ + if (s2 > s) { \ + s = s2; \ + normalR = 0; \ + normalC[0] = (n1); normalC[1] = (n2); normalC[2] = (n3); \ + invert_normal = ((expr1) < 0); \ + code = (cc); \ + } + +//making ax which is perpendicular to cyl1 ax to sphere center// + +dReal proj,cos,sin,cos1,cos3; +dVector3 Ax; + proj=dDOT14(p2,R+1)-dDOT14(p1,R+1); + + Ax[0]=p2[0]-p1[0]-R[1]*proj; + Ax[1]=p2[1]-p1[1]-R[5]*proj; + Ax[2]=p2[2]-p1[2]-R[9]*proj; +dNormalize3(Ax); +TEST(dDOT(p,Ax),sphereRadius+cylRadius,Ax[0],Ax[1],Ax[2],9); + + +Ax[0]=p[0]; +Ax[1]=p[1]; +Ax[2]=p[2]; +dNormalize3(Ax); + + dVector3 pa; + dReal sign, factor; + for (i=0; i<3; i++) pa[i] = p1[i]; + + cos1 = dDOT14(Ax,R+0); + cos3 = dDOT14(Ax,R+2) ; + factor=sqrtf(cos1*cos1+cos3*cos3); + cos1/=factor; + cos3/=factor; + for (i=0; i<3; i++) pa[i] += cos1 * cylRadius * R[i*4]; + sign = (dDOT14(normal,R+1) > 0) ? REAL(1.0) : REAL(-1.0); + for (i=0; i<3; i++) pa[i] += sign * hl * R[i*4+1]; + for (i=0; i<3; i++) pa[i] += cos3 * cylRadius * R[i*4+2]; + +Ax[0]=p2[0]-pa[0]; +Ax[1]=p2[1]-pa[1]; +Ax[2]=p2[2]-pa[2]; +dNormalize3(Ax); + + cos=dFabs(dDOT14(Ax,R+1)); + cos1=dDOT14(Ax,R+0); + cos3=dDOT14(Ax,R+2); + sin=sqrtf(cos1*cos1+cos3*cos3); +TEST(dDOT(p,Ax),sphereRadius+cylRadius*sin+hl*cos,Ax[0],Ax[1],Ax[2],14); + + +#undef TEST + + if (normalR) { + normal[0] = normalR[0]; + normal[1] = normalR[4]; + normal[2] = normalR[8]; + } + else { + + normal[0] = normalC[0]; + normal[1] = normalC[1]; + normal[2] = normalC[2]; + } + if (invert_normal) { + normal[0] = -normal[0]; + normal[1] = -normal[1]; + normal[2] = -normal[2]; + } + // compute contact point(s) +contact->depth=-s; +contact->normal[0]=-normal[0]; +contact->normal[1]=-normal[1]; +contact->normal[2]=-normal[2]; +contact->g1=const_cast (o1); +contact->g2=const_cast (o2); +contact->pos[0]=p2[0]-normal[0]*sphereRadius; +contact->pos[1]=p2[1]-normal[1]*sphereRadius; +contact->pos[2]=p2[2]-normal[2]*sphereRadius; +return 1; +} + + + +int dCollideCylB (dxGeom *o1, dxGeom *o2, int flags, + dContactGeom *contact, int skip) +{ + dVector3 normal; + dReal depth; + int code; + dReal cylRadius,cylLength; + dVector3 boxSides; + dGeomCylinderGetParams(o1,&cylRadius,&cylLength); + dGeomBoxGetLengths(o2,boxSides); + int num = dCylBox(dGeomGetPosition(o1),dGeomGetRotation(o1),cylRadius,cylLength, + dGeomGetPosition(o2),dGeomGetRotation(o2),boxSides, + normal,&depth,&code,flags & NUMC_MASK,contact,skip); + for (int i=0; inormal[0] = -normal[0]; + CONTACT(contact,i*skip)->normal[1] = -normal[1]; + CONTACT(contact,i*skip)->normal[2] = -normal[2]; + CONTACT(contact,i*skip)->g1 = const_cast (o1); + CONTACT(contact,i*skip)->g2 = const_cast (o2); + } + return num; +} + +int dCollideCylCyl (dxGeom *o1, dxGeom *o2, int flags, + dContactGeom *contact, int skip) +{ + dVector3 normal; + dReal depth; + int code; +dReal cylRadius1,cylRadius2; +dReal cylLength1,cylLength2; +dGeomCylinderGetParams(o1,&cylRadius1,&cylLength1); +dGeomCylinderGetParams(o2,&cylRadius2,&cylLength2); +int num = dCylCyl (dGeomGetPosition(o1),dGeomGetRotation(o1),cylRadius1,cylLength1, + dGeomGetPosition(o2),dGeomGetRotation(o2),cylRadius2,cylLength2, + normal,&depth,&code,flags & NUMC_MASK,contact,skip); + + for (int i=0; inormal[0] = -normal[0]; + CONTACT(contact,i*skip)->normal[1] = -normal[1]; + CONTACT(contact,i*skip)->normal[2] = -normal[2]; + CONTACT(contact,i*skip)->g1 = const_cast (o1); + CONTACT(contact,i*skip)->g2 = const_cast (o2); + } + return num; +} + +struct dxPlane { + dReal p[4]; +}; + + +int dCollideCylPlane + ( + dxGeom *o1, dxGeom *o2, int flags, + dContactGeom *contact, int skip){ + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (dGeomGetClass(o1) == dCylinderClassUser); + dIASSERT (dGeomGetClass(o2) == dPlaneClass); + contact->g1 = const_cast (o1); + contact->g2 = const_cast (o2); + + unsigned int ret = 0; + + dReal radius; + dReal hlz; + dGeomCylinderGetParams(o1,&radius,&hlz); + hlz /= 2; + + const dReal *R = dGeomGetRotation(o1);// rotation of cylinder + const dReal* p = dGeomGetPosition(o1); + dVector4 n; // normal vector + dReal pp; + dGeomPlaneGetParams (o2, n); + pp=n[3]; + dReal cos1,sin1; + cos1=dFabs(dDOT14(n,R+1)); + +cos1=cos10 ? hlz*R[1]:-hlz*R[1]; + pos[1]-= A2>0 ? hlz*R[5]:-hlz*R[5]; + pos[2]-= A2>0 ? hlz*R[9]:-hlz*R[9]; + + + + contact->pos[0] = pos[0]; + contact->pos[1] = pos[1]; + contact->pos[2] = pos[2]; + contact->depth = outDepth; + ret=1; + +if(dFabs(Q2)>M_SQRT1_2){ + + CONTACT(contact,ret*skip)->pos[0]=pos[0]+2.f*A1*R[0]; + CONTACT(contact,ret*skip)->pos[1]=pos[1]+2.f*A1*R[4]; + CONTACT(contact,ret*skip)->pos[2]=pos[2]+2.f*A1*R[8]; + CONTACT(contact,ret*skip)->depth=outDepth-dFabs(Q1*2.f*A1); + + if(CONTACT(contact,ret*skip)->depth>0.f) + ret++; + + + CONTACT(contact,ret*skip)->pos[0]=pos[0]+2.f*A3*R[2]; + CONTACT(contact,ret*skip)->pos[1]=pos[1]+2.f*A3*R[6]; + CONTACT(contact,ret*skip)->pos[2]=pos[2]+2.f*A3*R[10]; + CONTACT(contact,ret*skip)->depth=outDepth-dFabs(Q3*2.f*A3); + + if(CONTACT(contact,ret*skip)->depth>0.f) ret++; +} else { + + CONTACT(contact,ret*skip)->pos[0]=pos[0]+2.f*(A2>0 ? hlz*R[1]:-hlz*R[1]); + CONTACT(contact,ret*skip)->pos[1]=pos[1]+2.f*(A2>0 ? hlz*R[5]:-hlz*R[5]); + CONTACT(contact,ret*skip)->pos[2]=pos[2]+2.f*(A2>0 ? hlz*R[9]:-hlz*R[9]); + CONTACT(contact,ret*skip)->depth=outDepth-dFabs(Q2*2.f*A2); + + if(CONTACT(contact,ret*skip)->depth>0.f) ret++; +} + + + + for (unsigned int i=0; ig1 = const_cast (o1); + CONTACT(contact,i*skip)->g2 = const_cast (o2); + CONTACT(contact,i*skip)->normal[0] =n[0]; + CONTACT(contact,i*skip)->normal[1] =n[1]; + CONTACT(contact,i*skip)->normal[2] =n[2]; + } + return ret; +} + +int dCollideCylRay(dxGeom *o1, dxGeom *o2, int flags, + dContactGeom *contact, int skip) { + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (dGeomGetClass(o1) == dCylinderClassUser); + dIASSERT (dGeomGetClass(o2) == dRayClass); + contact->g1 = const_cast (o1); + contact->g2 = const_cast (o2); + dReal radius; + dReal lz; + dGeomCylinderGetParams(o1,&radius,&lz); + dReal lz2=lz*REAL(0.5); + const dReal *R = dGeomGetRotation(o1); // rotation of the cylinder + const dReal *p = dGeomGetPosition(o1); // position of the cylinder + dVector3 start,dir; + dGeomRayGet(o2,start,dir); // position and orientation of the ray + dReal length = dGeomRayGetLength(o2); + + // compute some useful info + dVector3 cs,q,r; + dReal C,k; + cs[0] = start[0] - p[0]; + cs[1] = start[1] - p[1]; + cs[2] = start[2] - p[2]; + k = dDOT41(R+1,cs); // position of ray start along cyl axis (Y) + q[0] = k*R[0*4+1] - cs[0]; + q[1] = k*R[1*4+1] - cs[1]; + q[2] = k*R[2*4+1] - cs[2]; + C = dDOT(q,q) - radius*radius; + // if C < 0 then ray start position within infinite extension of cylinder + // if ray start position is inside the cylinder + int inside_cyl=0; + if (C<0 && !(k<-lz2 || k>lz2)) inside_cyl=1; + // compute ray collision with infinite cylinder, except for the case where + // the ray is outside the cylinder but within the infinite cylinder + // (it that case the ray can only hit endcaps) + if (!inside_cyl && C < 0) { + // set k to cap position to check + if (k < 0) k = -lz2; else k = lz2; + } + else { + dReal uv = dDOT41(R+1,dir); + r[0] = uv*R[0*4+1] - dir[0]; + r[1] = uv*R[1*4+1] - dir[1]; + r[2] = uv*R[2*4+1] - dir[2]; + dReal A = dDOT(r,r); + dReal B = 2*dDOT(q,r); + k = B*B-4*A*C; + if (k < 0) { + // the ray does not intersect the infinite cylinder, but if the ray is + // inside and parallel to the cylinder axis it may intersect the end + // caps. set k to cap position to check. + if (!inside_cyl) return 0; + if (uv < 0) k = -lz2; else k = lz2; + } + else { + k = dSqrt(k); + A = dRecip (2*A); + dReal alpha = (-B-k)*A; + if (alpha < 0) { + alpha = (-B+k)*A; + if (alpha<0) return 0; + } + if (alpha>length) return 0; + // the ray intersects the infinite cylinder. check to see if the + // intersection point is between the caps + contact->pos[0] = start[0] + alpha*dir[0]; + contact->pos[1] = start[1] + alpha*dir[1]; + contact->pos[2] = start[2] + alpha*dir[2]; + q[0] = contact->pos[0] - p[0]; + q[1] = contact->pos[1] - p[1]; + q[2] = contact->pos[2] - p[2]; + k = dDOT14(q,R+1); + dReal nsign = inside_cyl ? -1 : 1; + if (k >= -lz2 && k <= lz2) { + contact->normal[0] = nsign * (contact->pos[0] - + (p[0] + k*R[0*4+1])); + contact->normal[1] = nsign * (contact->pos[1] - + (p[1] + k*R[1*4+1])); + contact->normal[2] = nsign * (contact->pos[2] - + (p[2] + k*R[2*4+1])); + dNormalize3 (contact->normal); + contact->depth = alpha; + return 1; + } + // the infinite cylinder intersection point is not between the caps. + // set k to cap position to check. + if (k < 0) k = -lz2; else k = lz2; + } + } + // check for ray intersection with the caps. k must indicate the cap + // position to check + // perform a ray plan interesection + // R+1 is the plan normal + q[0] = start[0] - (p[0] + k*R[0*4+1]); + q[1] = start[1] - (p[1] + k*R[1*4+1]); + q[2] = start[2] - (p[2] + k*R[2*4+1]); + dReal alpha = -dDOT14(q,R+1); + dReal k2 = dDOT14(dir,R+1); + if (k2==0) return 0; // ray parallel to the plane + alpha/=k2; + if (alpha<0 || alpha>length) return 0; // too short + contact->pos[0]=start[0]+alpha*dir[0]; + contact->pos[1]=start[1]+alpha*dir[1]; + contact->pos[2]=start[2]+alpha*dir[2]; + dReal nsign = (k<0)?-1:1; + contact->normal[0]=nsign*R[0*4+1]; + contact->normal[1]=nsign*R[1*4+1]; + contact->normal[2]=nsign*R[2*4+1]; + contact->depth=alpha; + return 1; +} + +static dColliderFn * dCylinderColliderFn (int num) +{ + if (num == dBoxClass) return (dColliderFn *) &dCollideCylB; + else if (num == dSphereClass) return (dColliderFn *) &dCollideCylS; + else if (num == dCylinderClassUser) return (dColliderFn *) &dCollideCylCyl; + else if (num == dPlaneClass) return (dColliderFn *) &dCollideCylPlane; + else if (num == dRayClass) return (dColliderFn *) &dCollideCylRay; + return 0; +} + + +static void dCylinderAABB (dxGeom *geom, dReal aabb[6]) +{ + dReal radius,lz; + dGeomCylinderGetParams(geom,&radius,&lz); +const dReal* R= dGeomGetRotation(geom); +const dReal* pos= dGeomGetPosition(geom); + dReal xrange = dFabs (R[0] *radius) + + REAL(0.5) *dFabs (R[1] * lz) + dFabs (R[2] * radius); + + dReal yrange = dFabs (R[4] *radius) + + REAL(0.5) * dFabs (R[5] * lz) + dFabs (R[6] * radius); + + dReal zrange = dFabs (R[8] * radius) + + REAL(0.5) *dFabs (R[9] * lz) + dFabs (R[10] * radius); + + aabb[0] = pos[0] - xrange; + aabb[1] = pos[0] + xrange; + aabb[2] = pos[1] - yrange; + aabb[3] = pos[1] + yrange; + aabb[4] = pos[2] - zrange; + aabb[5] = pos[2] + zrange; +} + +dxGeom *dCreateCylinder (dSpaceID space, dReal r, dReal lz) +{ + dAASSERT (r > 0 && lz > 0); + if (dCylinderClassUser == -1) + { + dGeomClass c; + c.bytes = sizeof (dxCylinder); + c.collider = &dCylinderColliderFn; + c.aabb = &dCylinderAABB; + c.aabb_test = 0; + c.dtor = 0; + dCylinderClassUser=dCreateGeomClass (&c); + + } + + dGeomID g = dCreateGeom (dCylinderClassUser); + if (space) dSpaceAdd (space,g); + dxCylinder *c = (dxCylinder*) dGeomGetClassData(g); + + c->radius = r; + c->lz = lz; + return g; +} + + + +void dGeomCylinderSetParams (dGeomID g, dReal radius, dReal length) +{ + dUASSERT (g && dGeomGetClass(g) == dCylinderClassUser,"argument not a cylinder"); + dAASSERT (radius > 0 && length > 0); + dxCylinder *c = (dxCylinder*) dGeomGetClassData(g); + c->radius = radius; + c->lz = length; +} + + + +void dGeomCylinderGetParams (dGeomID g, dReal *radius, dReal *length) +{ + dUASSERT (g && dGeomGetClass(g) == dCylinderClassUser ,"argument not a cylinder"); + dxCylinder *c = (dxCylinder*) dGeomGetClassData(g); + *radius = c->radius; + *length = c->lz; +} + +/* +void dMassSetCylinder (dMass *m, dReal density, + dReal radius, dReal length) +{ + dAASSERT (m); + dMassSetZero (m); + dReal M = length*M_PI*radius*radius*density; + m->mass = M; + m->_I(0,0) = M/REAL(4.0) * (ly*ly + lz*lz); + m->_I(1,1) = M/REAL(12.0) * (lx*lx + lz*lz); + m->_I(2,2) = M/REAL(4.0) * (lx*lx + ly*ly); + +# ifndef dNODEBUG + checkMass (m); +# endif +} +*/ diff -Nru ode-0.11.1/contrib/dCylinder/dCylinder.h ode-0.14/contrib/dCylinder/dCylinder.h --- ode-0.11.1/contrib/dCylinder/dCylinder.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dCylinder/dCylinder.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,14 @@ + +#ifndef dCylinder_h +#define dCylinder_h + +struct dxCylinder; +extern int dCylinderClassUser; + + +dxGeom *dCreateCylinder (dSpaceID space, dReal r, dReal lz); +void dGeomCylinderSetParams (dGeomID g, dReal radius, dReal length); + +void dGeomCylinderGetParams (dGeomID g, dReal *radius, dReal *length); +#endif //dCylinder_h + diff -Nru ode-0.11.1/contrib/dCylinder/readme.txt ode-0.14/contrib/dCylinder/readme.txt --- ode-0.11.1/contrib/dCylinder/readme.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dCylinder/readme.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,62 @@ +readme.txt + +WARNING: THIS IS NOT VERY RELIABLE CODE. IT HAS BUGS. YOUR + SUCCESS MAY VARY. CONTRIBUTIONS OF FIXES/REWRITES ARE + WELCOME. + +/////////////////////////////////////////////////////////////////////// + +Cylinder geometry class. + +New in this version: + +Cylinder class implemented as User Geometry Class so it now can be +used with old and new ODE collision detection. + +Cylinder - Ray has been contributed by Olivier Michel. + +THE IDENTIFIER dCylinderClass HAS BEEN REPLACED BY dCylinderClassUser + +to avoid conflict with dCylinderClass in the enum definite in collision.h + +/////////////////////////////////////////////////////////////////////// +The dCylinder class includes the following collisions: + +Cylinder - Box +Cylinder - Cylinder +Cylinder - Sphere +Cylinder - Plane +Cylinder - Ray (contributed by Olivier Michel) + +Cylinder aligned along axis - Y when created. (Not like Capped +Cylinder which aligned along axis - Z). + +Interface is just the same as Capped Cylinder has. + +Use functions which have one "C" instead of double "C". + +to create: +dGeomID dCreateCylinder (dSpaceID space, dReal radius, dReal length); + +to set params: +void dGeomCylinderSetParams (dGeomID cylinder, + dReal radius, dReal length); + + +to get params: +void dGeomCylinderGetParams (dGeomID cylinder, + dReal *radius, dReal *length); + +Return in radius and length the parameters of the given cylinder. + +Identification number of the class: + dCylinderClassUser + + I do not include a function that sets inertia tensor for cylinder. + One may use existing ODE functions dMassSetCappedCylinder or dMassSetBox. + To set exact tensor for cylinder use dMassSetParameters. + Remember cylinder aligned along axis - Y. + + /////////////////////////////////////////////////////////////////////////// + Konstantin Slipchenko + February 5, 2002 diff -Nru ode-0.11.1/contrib/DotNetManaged/AssemblyInfo.cpp ode-0.14/contrib/DotNetManaged/AssemblyInfo.cpp --- ode-0.11.1/contrib/DotNetManaged/AssemblyInfo.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/AssemblyInfo.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,58 @@ +#include "stdafx.h" + +using namespace System::Reflection; +using namespace System::Runtime::CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly:AssemblyTitleAttribute("")]; +[assembly:AssemblyDescriptionAttribute("")]; +[assembly:AssemblyConfigurationAttribute("")]; +[assembly:AssemblyCompanyAttribute("")]; +[assembly:AssemblyProductAttribute("")]; +[assembly:AssemblyCopyrightAttribute("")]; +[assembly:AssemblyTrademarkAttribute("")]; +[assembly:AssemblyCultureAttribute("")]; + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the value or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly:AssemblyVersionAttribute("1.0.*")]; + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project directory. +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly:AssemblyDelaySignAttribute(false)]; +[assembly:AssemblyKeyFileAttribute("")]; +[assembly:AssemblyKeyNameAttribute("")]; + diff -Nru ode-0.11.1/contrib/DotNetManaged/Body.cpp ode-0.14/contrib/DotNetManaged/Body.cpp --- ode-0.11.1/contrib/DotNetManaged/Body.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Body.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,322 @@ +#include "StdAfx.h" + +#include +#include "Body.h" + +namespace ODEManaged +{ + + //Constructors + + Body::Body(void) + { + _id = 0; + } + + Body::Body(World &world) + { + _id = dBodyCreate(world.Id()); + } + + + //Destructor + + Body::~Body(void) + { + dBodyDestroy(this->_id); + } + + + //Methods + + //Id + dBodyID Body::Id() + { + return _id; + } + + + //SetData + void Body::SetData(void *data) + { + dBodySetData(this->_id, data); + } + + //GetData + void *Body::GetData(void) + { + return dBodyGetData(this->_id); + } + + + //SetPosition + void Body::SetPosition (double x, double y, double z) + { + dBodySetPosition(this->_id, x, y, z); + } + + + //Overloaded GetPosition + Vector3 Body::GetPosition(void) + { + Vector3 retVal; + const dReal *temp; + temp = dBodyGetPosition(this->_id); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + }; + + void Body::GetPosition(double position __gc[]) + { + const dReal *temp; + temp = dBodyGetPosition(this->_id); + position[0] = temp[0]; + position[1] = temp[1]; + position[2] = temp[2]; + } + + + //SetRotationIdentity + void Body::SetRotationIdentity(void) + { + dMatrix3 temp; + dRSetIdentity(temp); + dBodySetRotation(this->_id, temp); + } + + + //SetRotation (left handed system=>transpose) + void Body::SetRotation(Matrix3 rotation) + { + dMatrix3 temp; + temp[0] = rotation.m11; + temp[4] = rotation.m12; + temp[8] = rotation.m13; + temp[1] = rotation.m21; + temp[5] = rotation.m22; + temp[9] = rotation.m23; + temp[2] = rotation.m31; + temp[6] = rotation.m32; + temp[10] = rotation.m33; + dBodySetRotation(this->_id, temp); + } + + //GetRotation (left handed system=>transpose) + Matrix3 Body::GetRotation(void) + { + Matrix3 retVal; + //const dMatrix3 *m; + const dReal *temp; + temp = dBodyGetRotation(this->_id); + retVal.m11 = temp[0]; + retVal.m12 = temp[4]; + retVal.m13 = temp[8]; + retVal.m21 = temp[1]; + retVal.m22 = temp[5]; + retVal.m23 = temp[9]; + retVal.m31 = temp[2]; + retVal.m32 = temp[6]; + retVal.m33 = temp[10]; + return retVal; + } + + + //Overloaded SetMass + void Body::SetMass(double mass, Vector3 centerOfGravity, Matrix3 inertia) + { + dMass *temp = new dMass(); + dMassSetParameters(temp, mass, + centerOfGravity.x, + centerOfGravity.y, + centerOfGravity.z, + inertia.m11, inertia.m22, + inertia.m33, inertia.m12, + inertia.m13, inertia.m23); + + dBodySetMass(this->_id, temp); + } + + + //SetMassSphere + void Body::SetMassSphere(double density, double radius) + { + dMass *temp = new dMass(); + dMassSetSphere(temp, density, radius); + dBodySetMass(this->_id, temp); + } + + + //SetMassBox + void Body::SetMassBox(double density, double sideX, double sideY, double sideZ) + { + dMass *temp = new dMass(); + dMassSetBox(temp, density, sideX, sideY, sideZ); + dBodySetMass(this->_id, temp); + } + + + //SetMassCappedCylinder + void Body::SetMassCappedCylinder(double density, int axis, double cylinderRadius, double cylinderLength) + { + dMass *temp = new dMass(); + dMassSetCappedCylinder(temp, density, axis, + cylinderRadius, + cylinderLength); + + dBodySetMass(this->_id, temp); + } + + + //AddForce + void Body::AddForce(double fX, double fY, double fZ) + { + dBodyAddForce(this->_id, fX, fY, fZ); + } + + + //AddRelForce + void Body::AddRelForce(double fX, double fY, double fZ) + { + dBodyAddRelForce(this->_id, fX,fY,fZ); + } + + + //AddForceAtPos + void Body::AddForceAtPos(double fX, double fY, double fZ, double pX, double pY, double pZ) + { + dBodyAddForceAtPos(this->_id, fX, fY, fZ, pX, pY, pZ); + } + + + //AddRelForceAtPos + void Body::AddRelForceAtPos(double fX, double fY, double fZ, double pX, double pY, double pZ) + { + dBodyAddRelForceAtPos(this->_id, fX, fY, fZ, pX, pY, pZ); + } + + + //AddRelForceAtRelPos + void Body::AddRelForceAtRelPos(double fX, double fY, double fZ, double pX, double pY, double pZ) + { + dBodyAddRelForceAtRelPos(this->_id, fX, fY, fZ, pX, pY, pZ); + } + + + //ApplyLinearVelocityDrag + void Body::ApplyLinearVelocityDrag(double dragCoef) + { + const dReal *temp; + double fX; + double fY; + double fZ; + temp = dBodyGetLinearVel(this->_id); + fX = temp[0]*dragCoef*-1; + fY = temp[1]*dragCoef*-1; + fZ = temp[2]*dragCoef*-1; + dBodyAddForce(this->_id, fX, fY, fZ); + } + + + //ApplyAngularVelocityDrag + void Body::ApplyAngularVelocityDrag(double dragCoef) + { + const dReal *temp; + double fX; + double fY; + double fZ; + temp = dBodyGetAngularVel(this->_id); + fX = temp[0]*dragCoef*-1; + fY = temp[1]*dragCoef*-1; + fZ = temp[2]*dragCoef*-1; + dBodyAddTorque(this->_id, fX, fY, fZ); + } + + + //AddTorque + void Body::AddTorque(double fX, double fY, double fZ) + { + dBodyAddTorque(this->_id, fX, fY, fZ); + } + + + //AddRelTorque + void Body::AddRelTorque(double fX, double fY, double fZ) + { + dBodyAddRelTorque(this->_id, fX,fY,fZ); + } + + + //SetLinearVelocity + void Body::SetLinearVelocity(double x, double y, double z) + { + dBodySetLinearVel(this->_id, x, y, z); + } + + + //GetLinearVelocity + Vector3 Body::GetLinearVelocity(void) + { + Vector3 retVal; + const dReal *temp; + temp = dBodyGetLinearVel(this->_id); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //SetAngularVelocity + void Body::SetAngularVelocity(double x, double y, double z) + { + dBodySetAngularVel(this->_id, x, y, z); + } + + //GetAngularVelocity + Vector3 Body::GetAngularVelocity(void) + { + Vector3 retVal; + const dReal *temp; + temp = dBodyGetAngularVel(this->_id); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //GetRelPointPos + Vector3 Body::GetRelPointPos(double pX, double pY, double pZ) + { + Vector3 retVal; + dVector3 temp; + dBodyGetRelPointPos(this->_id, pX, pY, pZ, temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //GetRelPointVel + Vector3 Body::GetRelPointVel(double pX, double pY, double pZ) + { + Vector3 retVal; + dVector3 temp; + dBodyGetRelPointVel(this->_id, pX, pY, pZ, temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //ConnectedTo + int Body::ConnectedTo(const Body &b) + { + return dAreConnected(this->_id, b._id); + } + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/Body.h ode-0.14/contrib/DotNetManaged/Body.h --- ode-0.11.1/contrib/DotNetManaged/Body.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Body.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,76 @@ +#pragma once + +#include "World.h" +#include "CommonMgd.h" + +namespace ODEManaged +{ + __gc public class Body + { + public: + + //Constructors and Destructors + + Body(void); + Body(World &world); + + ~Body(void); + + + //Public Methods + + dBodyID Id(); + void SetData (void *data); + void *GetData (void); + + //POSITION + void SetPosition(double x, double y, double z); + Vector3 GetPosition(void); + void GetPosition(double position __gc[]); + + //ROTATION + void SetRotationIdentity(void); + void SetRotation(Matrix3 rotation); + Matrix3 GetRotation(void); + + //MASS + void SetMass(double mass, Vector3 centerOfGravity, Matrix3 inertia); + void SetMassSphere(double density, double radius); + void SetMassBox(double density, double sideX, double sideY, double sideZ); + void SetMassCappedCylinder(double density, int axis, double cylinderRadius, double cylinderLength); + + //FORCE AND TORQUE + void AddForce(double fX, double fY, double fZ); + void AddRelForce(double fX, double fY, double fZ); + void AddForceAtPos(double fX, double fY, double fZ,double pX, double pY, double pZ); + void AddRelForceAtPos(double fX, double fY, double fZ,double pX, double pY, double pZ); + void AddRelForceAtRelPos(double fX, double fY, double fZ,double pX, double pY, double pZ); + void ApplyLinearVelocityDrag(double dragCoef); + void ApplyAngularVelocityDrag(double dragCoef); + + + void AddTorque(double fX, double fY, double fZ); + void AddRelTorque(double fX, double fY, double fZ); + + //LINEAR VELOCITY + void SetLinearVelocity (double x, double y, double z); + Vector3 GetLinearVelocity(void); + + //ANGULAR VELOCITY + void SetAngularVelocity (double x, double y, double z); + Vector3 GetAngularVelocity(void); + + //POINT + Vector3 GetRelPointPos(double pX, double pY, double pZ); + Vector3 GetRelPointVel(double pX, double pY, double pZ); + + //CONNECTED TO + int ConnectedTo (const Body &b); + + private: + + dBodyID _id; + + }; +} + diff -Nru ode-0.11.1/contrib/DotNetManaged/CommonMgd.h ode-0.14/contrib/DotNetManaged/CommonMgd.h --- ode-0.11.1/contrib/DotNetManaged/CommonMgd.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/CommonMgd.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,43 @@ +#pragma once + +namespace ODEManaged +{ + + __value public struct Vector3 + { + double x; + double y; + double z; + }; + + + __value public struct Vector4 + { + double W; + double x; + double y; + double z; + }; + + + __value public struct Matrix3 + { + double m11; + double m12; + double m13; + double m21; + double m22; + double m23; + double m31; + double m32; + double m33; + }; + + //__value public struct NearCallback + //{ + // void *data; + // dGeomID o1; + // dGeomID o2; + //}; + +} \ No newline at end of file diff -Nru ode-0.11.1/contrib/DotNetManaged/DotNetManaged.sln ode-0.14/contrib/DotNetManaged/DotNetManaged.sln --- ode-0.11.1/contrib/DotNetManaged/DotNetManaged.sln 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/DotNetManaged.sln 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DotNetManaged", "DotNetManaged.vcproj", "{4B75AC19-971A-4CC6-A4F5-0695C9F8562F}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {4B75AC19-971A-4CC6-A4F5-0695C9F8562F}.Debug.ActiveCfg = Debug|Win32 + {4B75AC19-971A-4CC6-A4F5-0695C9F8562F}.Debug.Build.0 = Debug|Win32 + {4B75AC19-971A-4CC6-A4F5-0695C9F8562F}.Release.ActiveCfg = Release|Win32 + {4B75AC19-971A-4CC6-A4F5-0695C9F8562F}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff -Nru ode-0.11.1/contrib/DotNetManaged/DotNetManaged.vcproj ode-0.14/contrib/DotNetManaged/DotNetManaged.vcproj --- ode-0.11.1/contrib/DotNetManaged/DotNetManaged.vcproj 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/DotNetManaged.vcproj 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru ode-0.11.1/contrib/DotNetManaged/Geom.cpp ode-0.14/contrib/DotNetManaged/Geom.cpp --- ode-0.11.1/contrib/DotNetManaged/Geom.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Geom.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,219 @@ + +#include "StdAfx.h" + +#include +#include "Geom.h" + + +namespace ODEManaged +{ + + //Constructors + + Geom::Geom(void) + { + _id = 0; + } + + + //Destructor + + Geom::~Geom(void) + { + dGeomDestroy(this->_id); + } + + + //Methods + + //Id + dGeomID Geom::Id(void) + { + return _id; + } + + + //GetBody + dBodyID Geom::GetBody(void) + { + return dGeomGetBody(this->_id); + } + + + //Overloaded SetBody + void Geom::SetBody(Body &body) + { + dGeomSetBody(this->_id, body.Id()); + } + + //void Geom::SetBody(dBodyID b) + //{ + // dGeomSetBody(this->_id, b); + //} + + + //SetPosition + void Geom::SetPosition(double x, double y, double z) + { + dGeomSetPosition(this->_id, x, y, z); + } + + + //SetRotation + void Geom::SetRotation(Matrix3 rotation) + { + dMatrix3 temp; + temp[0] = rotation.m11; + temp[4] = rotation.m12; + temp[8] = rotation.m13; + temp[1] = rotation.m21; + temp[5] = rotation.m22; + temp[9] = rotation.m23; + temp[2] = rotation.m31; + temp[6] = rotation.m32; + temp[10] = rotation.m33; + dGeomSetRotation(_id, temp); + } + + + //Destroy + void Geom::Destroy() + { + if(this->_id) dGeomDestroy(this->_id); + _id = 0; + } + + + //SetData + void Geom::SetData(void *data) + { + dGeomSetData(this->_id, data); + } + + + //GetData + void *Geom::GetData(void) + { + return dGeomGetData(this->_id); + } + + + //GetPosition + Vector3 Geom::GetPosition(void) + { + Vector3 retVal; + const dReal *temp; + temp = dGeomGetPosition(this->_id); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //GetRotation (left handed system=>transpose) + Matrix3 Geom::GetRotation(void) + { + Matrix3 retVal; + const dReal *temp; + temp = dGeomGetRotation(this->_id); + retVal.m11 = temp[0]; + retVal.m12 = temp[4]; + retVal.m13 = temp[8]; + retVal.m21 = temp[1]; + retVal.m22 = temp[5]; + retVal.m23 = temp[9]; + retVal.m31 = temp[2]; + retVal.m32 = temp[6]; + retVal.m33 = temp[10]; + return retVal; + } + + + //CreateSphere + void Geom::CreateSphere(Space &space, double radius) + { + if(this->_id) dGeomDestroy(this->_id); + _id = dCreateSphere(space.Id(), radius); + } + + + //CreateBox + void Geom::CreateBox(Space &space, double lx, double ly, double lz) + { + if(this->_id) dGeomDestroy(this->_id); + _id = dCreateBox(space.Id(), lx, ly, lz); + } + + + //CreatePlane + void Geom::CreatePlane(Space &space, double a, double b, double c, double d) + { + if(this->_id) dGeomDestroy(this->_id); + _id = dCreatePlane(space.Id(), a, b, c, d); + } + + + //CreateCCylinder + void Geom::CreateCCylinder(Space &space, double radius, double length) + { + if(this->_id) dGeomDestroy(this->_id); + _id = dCreateCCylinder(space.Id(), radius, length); + } + + + //SphereGetRadius + double Geom::SphereGetRadius(void) + { + return dGeomSphereGetRadius(this->_id); + } + + + //BoxGetLengths + Vector3 Geom::BoxGetLengths(void) + { + Vector3 retVal; + dVector3 temp; + dGeomBoxGetLengths(this->_id, temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //PlaneGetParams + Vector4 Geom::PlaneGetParams(void) + { + Vector4 retVal; + dVector4 temp; + dGeomPlaneGetParams(this->_id, temp); + retVal.W = temp[0]; + retVal.x = temp[1]; + retVal.y = temp[2]; + retVal.z = temp[3]; + return retVal; + } + + + //CCylinderGetParams + void Geom::CCylinderGetParams(double *radius, double *length) + { + dGeomCCylinderGetParams(this->_id, radius, length); + } + + + //GetClass + int Geom::GetClass(void) + { + return dGeomGetClass(this->_id); + } + +} + + + + + + + diff -Nru ode-0.11.1/contrib/DotNetManaged/Geom.h ode-0.14/contrib/DotNetManaged/Geom.h --- ode-0.11.1/contrib/DotNetManaged/Geom.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Geom.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,75 @@ +#pragma once + +#include "Body.h" +#include "Space.h" +#include "CommonMgd.h" + +namespace ODEManaged +{ + __gc public class Geom + { + public: + + + //Constructor + + Geom (void); + + + //Destructor + + ~Geom (void); + + + //Methods + + //Basic Stuff + + dGeomID Id (void); + dBodyID GetBody (void); + + //Overloaded SetBody + void SetBody (Body &body); + /*void SetBody (dBodyID b);*/ + + Vector3 GetPosition (void); + void SetPosition (double x, double y, double z); + + Matrix3 GetRotation (void); + void SetRotation (Matrix3 rotation); + + void SetData (void *data); + void *GetData (void); + + + //Create Objects + + void CreateSphere (Space &space, double radius); + void CreateBox (Space &space, double lx, double ly, double lz); + void CreatePlane (Space &space, double a, double b, double c, double d); + void CreateCCylinder (Space &space, double radius, double length); + + + //Destroy Objects + + void Destroy (void); + + + //Get Object's Parameters + + double SphereGetRadius (void); + Vector3 BoxGetLengths (void); + Vector4 PlaneGetParams (void); + void CCylinderGetParams (double *radius, double *length); + int GetClass (void); + + + //Properties + + private: + + dGeomID _id; + + }; + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointAMotor.cpp ode-0.14/contrib/DotNetManaged/JointAMotor.cpp --- ode-0.11.1/contrib/DotNetManaged/JointAMotor.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointAMotor.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,162 @@ +#include "StdAfx.h" + +#include +#include "JointAMotor.h" + +namespace ODEManaged +{ + + //Constructors + + JointAMotor::JointAMotor(void) : Joint(){} + + + JointAMotor::JointAMotor(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateAMotor(world.Id(), 0); + } + + + JointAMotor::JointAMotor(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateAMotor(world.Id(), jointGroup.Id()); + } + + + //Destructor + + JointAMotor::~JointAMotor(void){} + + + //Methods + + //Overloaded Create + void JointAMotor::Create(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateAMotor(world.Id(), jointGroup.Id()); + } + + void JointAMotor::Create(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateAMotor(world.Id(), 0); + } + + + //Overloaded Attach + void JointAMotor::Attach(Body &body1, Body &body2) + { + dJointAttach(this->_id, body1.Id(), body2.Id()); + } + + void JointAMotor::Attach(Body &body1) + { + dJointAttach(this->_id, body1.Id(), 0); + } + + + //SetNumAxes + + void JointAMotor::SetNumAxes(int num) + { + dJointSetAMotorNumAxes(this->_id, num); + } + + + //GetNumAxes + + int JointAMotor::GetNumAxes(void) + { + return dJointGetAMotorNumAxes(this->_id); + } + + + //SetAxis + + void JointAMotor::SetAxis(int anum, int rel, double x, double y ,double z) + { + dJointSetAMotorAxis(this->_id, anum, rel, x, y, z); + } + + + //GetAxis + + Vector3 JointAMotor::GetAxis(int anum) + { + Vector3 retVal; + dVector3 temp; + dJointGetAMotorAxis(this->_id, anum, temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //SetAngle + + void JointAMotor::SetAngle(int anum, double angle) + { + dJointSetAMotorAngle(this->_id, anum, angle); + } + + + //GetAngle + + double JointAMotor::GetAngle(int anum) + { + return dJointGetAMotorAngle(this->_id, anum); + } + + + //SetParam + + void JointAMotor::SetParam(int parameter, double value) + { + dJointSetAMotorParam(this->_id, parameter, value); + } + + + //GetParam + + double JointAMotor::GetParam(int parameter) + { + return dJointGetAMotorParam(this->_id, parameter); + } + + + //SetMode + + void JointAMotor::SetMode(int mode) + { + dJointSetAMotorMode(this->_id, mode); + } + + + //GetMode + + int JointAMotor::GetMode(void) + { + return dJointGetAMotorMode(this->_id); + } + + + //GetAxisRel + + int JointAMotor::GetAxisRel(int anum) + { + return dJointGetAMotorAxisRel(this->_id, anum); + } + + + //GetAngleRate + + double JointAMotor::GetAngleRate(int anum) + { + return dJointGetAMotorAngleRate(this->_id, anum); + } + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointAMotor.h ode-0.14/contrib/DotNetManaged/JointAMotor.h --- ode-0.11.1/contrib/DotNetManaged/JointAMotor.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointAMotor.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,62 @@ +#pragma once + +#include "Joint.h" + +namespace ODEManaged +{ + __gc public class JointAMotor : public Joint + { + public: + + + //Constructors + + JointAMotor (void); + JointAMotor (World &world); + JointAMotor (World &world, JointGroup &jointGroup); + + + //Destructor + + virtual ~JointAMotor (void); + + + //Methods + + //Basic Stuff + + //Overloaded Create + void Create (World &world, JointGroup &jointGroup); + void Create (World &world); + + void SetNumAxes (int num); + int GetNumAxes (void); + + void SetAxis (int anum, int rel, double x, double y, double z); + Vector3 GetAxis (int anum); + + void SetAngle (int anum, double angle); + double GetAngle (int anum); + + void SetMode (int mode); + int GetMode (void); + + int GetAxisRel (int anum); + double GetAngleRate (int anum); + + //Overloaded Attach + void Attach (Body &body1, Body &body2); + void Attach (Body &body1); + + + //Movement Parameters + + void SetParam (int parameter, double value); + double GetParam (int parameter); + + + + + + }; +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointBall.cpp ode-0.14/contrib/DotNetManaged/JointBall.cpp --- ode-0.11.1/contrib/DotNetManaged/JointBall.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointBall.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,79 @@ +#include "StdAfx.h" + +#include +#include "jointball.h" + +namespace ODEManaged +{ + + //Constructors + + JointBall::JointBall(void) : Joint(){} + + + JointBall::JointBall(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateBall(world.Id(), 0); + } + + + JointBall::JointBall(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateBall(world.Id(), jointGroup.Id()); + } + + + //Destructor + + JointBall::~JointBall(void){} + + + //Methods + + //Overloaded Create + void JointBall::Create(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateBall(world.Id(), jointGroup.Id()); + } + + void JointBall::Create(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateBall(world.Id(), 0); + } + + + //Overloaded Attach + void JointBall::Attach(Body &body1, Body &body2) + { + dJointAttach(this->_id, body1.Id(), body2.Id()); + } + + void JointBall::Attach(Body &body1) + { + dJointAttach(this->_id, body1.Id(), 0); + } + + + //SetAnchor + void JointBall::SetAnchor(double x, double y ,double z) + { + dJointSetBallAnchor(this->_id, x, y, z); + } + + //GetAnchor + Vector3 JointBall::GetAnchor(void) + { + Vector3 retVal; + dVector3 temp; + dJointGetBallAnchor(this->_id,temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointBall.h ode-0.14/contrib/DotNetManaged/JointBall.h --- ode-0.11.1/contrib/DotNetManaged/JointBall.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointBall.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,38 @@ +#pragma once + +#include "Joint.h" + +namespace ODEManaged +{ + __gc public class JointBall : public Joint + { + public: + + //Constructors + + JointBall(void); + JointBall(World &world); + JointBall(World &world, JointGroup &jointGroup); + + + //Destructors + + virtual ~JointBall(void); + + + //Methods + + //Overloaded Create + void Create(World &world, JointGroup &jointGroup); + void Create(World &world); + + //Overloaded Attach + void Attach(Body &body1, Body &body2); + void Attach(Body &body1); + + void SetAnchor(double x, double y, double z); + Vector3 GetAnchor(void); + + }; + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/Joint.cpp ode-0.14/contrib/DotNetManaged/Joint.cpp --- ode-0.11.1/contrib/DotNetManaged/Joint.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Joint.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,35 @@ +#include "StdAfx.h" + +#include +#include "joint.h" +#include "CommonMgd.h" +#include "world.h" + +namespace ODEManaged +{ + + //Constructor + + Joint::Joint(void) + { + _id=0; + } + + + //Destructor + + Joint::~Joint(void) + { + dJointDestroy(this->_id); + } + + + //Methods + + //Id + dJointID Joint::Id(void) + { + return _id; + } + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointFixed.cpp ode-0.14/contrib/DotNetManaged/JointFixed.cpp --- ode-0.11.1/contrib/DotNetManaged/JointFixed.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointFixed.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,67 @@ +#include "StdAfx.h" + +#include +#include "jointfixed.h" + +namespace ODEManaged +{ + + //Constructors + + JointFixed::JointFixed(void) : Joint(){} + + + JointFixed::JointFixed(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateFixed(world.Id(),0); + } + + + JointFixed::JointFixed(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateFixed(world.Id(), jointGroup.Id()); + } + + + //Destructor + + JointFixed::~JointFixed(void){} + + + //Methods + + //Overloaded Create + void JointFixed::Create(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateFixed(world.Id(), jointGroup.Id()); + } + + void JointFixed::Create(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateFixed(world.Id(), 0); + } + + + //Overloaded Attach + void JointFixed::Attach(Body &body1, Body &body2) + { + dJointAttach(this->_id, body1.Id(), body2.Id()); + } + + void JointFixed::Attach(Body &body1) + { + dJointAttach(this->_id, body1.Id(), 0); + } + + + //Fixed + void JointFixed::SetFixed(void) + { + dJointSetFixed(this->_id); + } + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointFixed.h ode-0.14/contrib/DotNetManaged/JointFixed.h --- ode-0.11.1/contrib/DotNetManaged/JointFixed.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointFixed.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,37 @@ +#pragma once + +#include "Joint.h" + +namespace ODEManaged +{ + __gc public class JointFixed : public Joint + { + public: + + //Constructors + + JointFixed(void); + JointFixed(World &world); + JointFixed(World &world, JointGroup &jointGroup); + + + //Destructor + + virtual ~JointFixed(void); + + + //Methods + + //Overloaded Create + void Create(World &world, JointGroup &jointGroup); + void Create(World &world); + + //Overloaded Attach + void Attach(Body &body1, Body &body2); + void Attach(Body &body1); + + void SetFixed(void); + + }; + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointGroup.cpp ode-0.14/contrib/DotNetManaged/JointGroup.cpp --- ode-0.11.1/contrib/DotNetManaged/JointGroup.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointGroup.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,53 @@ +#include "StdAfx.h" + +#include +#include "jointgroup.h" + +namespace ODEManaged +{ + + //Constructors + + JointGroup::JointGroup(void) + { + _id=0; + } + + JointGroup::JointGroup (int maxSize) + { + _id = dJointGroupCreate(maxSize); + } + + + //Destructor + + JointGroup::~JointGroup(void) + { + dJointGroupDestroy(this->_id); + } + + + //Methods + + //ID + dJointGroupID JointGroup::Id() + { + return _id; + } + + + //Create + void JointGroup::Create (int maxSize) + { + if(_id) dJointGroupDestroy(_id); + _id = dJointGroupCreate(maxSize); + } + + + //Empty + void JointGroup::Empty (void) + { + dJointGroupEmpty(this->_id); + } + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointGroup.h ode-0.14/contrib/DotNetManaged/JointGroup.h --- ode-0.11.1/contrib/DotNetManaged/JointGroup.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointGroup.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,33 @@ +#pragma once + +namespace ODEManaged +{ + __gc public class JointGroup + { + public: + + //Constructors + + JointGroup(void); + JointGroup(int maxSize); + + + //Destructor + + ~JointGroup(void); + + + //Methods + + dJointGroupID Id(void); + void Create(int maxSize); + void Empty(void); + + + private: + + dJointGroupID _id; + + }; + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/Joint.h ode-0.14/contrib/DotNetManaged/Joint.h --- ode-0.11.1/contrib/DotNetManaged/Joint.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Joint.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,21 @@ +#pragma once + +#include "JointGroup.h" +#include "World.h" +#include "Body.h" + +namespace ODEManaged +{ + __gc public class Joint + { + protected: + //Constructor and Destructor Defenition + Joint(void); + ~Joint(void); + + //Public Methods + dJointID Id(void); + + dJointID _id; + }; +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointHinge2.cpp ode-0.14/contrib/DotNetManaged/JointHinge2.cpp --- ode-0.11.1/contrib/DotNetManaged/JointHinge2.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointHinge2.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,133 @@ +#include "StdAfx.h" + +#include +#include "jointhinge2.h" + +namespace ODEManaged +{ + //Constructors + JointHinge2::JointHinge2(void) : Joint(){} + + JointHinge2::JointHinge2(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateHinge2(world.Id(),0); + } + + JointHinge2::JointHinge2(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateHinge2(world.Id(), jointGroup.Id()); + } + + //Destructor + JointHinge2::~JointHinge2(void){} + + //CreateHinge2 (overload 1) + void JointHinge2::Create(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateHinge2(world.Id(), jointGroup.Id()); + } + + //CreateHinge2 (overload 2) + void JointHinge2::Create(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateHinge2(world.Id(),0); + } + + //SetAnchor1 + void JointHinge2::SetAnchor (double x, double y ,double z) + { + dJointSetHinge2Anchor(_id, x,y,z); + } + + //GetAnchor1 + Vector3 JointHinge2::GetAnchor() + { + Vector3 retVal; + dVector3 temp; + dJointGetHinge2Anchor(_id,temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + //SetAxis1 + void JointHinge2::SetAxis1 (double x, double y ,double z) + { + dJointSetHinge2Axis1(_id, x,y,z); + } + + //GetAxis1 + Vector3 JointHinge2::GetAxis1() + { + Vector3 retVal; + dVector3 temp; + dJointGetHinge2Axis1(_id,temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + //SetAxis2 + void JointHinge2::SetAxis2 (double x, double y ,double z) + { + dJointSetHinge2Axis2(_id, x,y,z); + } + + //GetAxis2 + Vector3 JointHinge2::GetAxis2() + { + Vector3 retVal; + dVector3 temp; + dJointGetHinge2Axis2(_id,temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + //GetAngle1 + double JointHinge2::GetAngle1 () + { + return dJointGetHinge2Angle1(this->_id); + } + + //GetAngle1Rate + double JointHinge2::GetAngle1Rate () + { + return dJointGetHinge2Angle1Rate(this->_id); + } + + ////GetAngle hmm, this doesn't exist + //double JointHinge2::GetAngle2 () + //{ + // return dJointGetHinge2Angle2(this->_id); + //} + + //GetAngle2Rate + double JointHinge2::GetAngle2Rate () + { + return dJointGetHinge2Angle2Rate(this->_id); + } + + + //Attach (overload 1) + void JointHinge2::Attach (Body &body1, Body &body2) + { + dJointAttach(_id, body1.Id(),body2.Id()); + } + + //Attach (overload 2) + //TODO: possibly add an overload that takes anchor as a param also. + void JointHinge2::Attach (Body &body1) + { + dJointAttach(_id, body1.Id(),0); + } + + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointHinge2.h ode-0.14/contrib/DotNetManaged/JointHinge2.h --- ode-0.11.1/contrib/DotNetManaged/JointHinge2.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointHinge2.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,48 @@ +#pragma once + +#include "Joint.h" +#include "CommonMgd.h" + +namespace ODEManaged +{ + __gc public class JointHinge2 : public Joint + { + public: + + + //Constructors + + JointHinge2 (void); + JointHinge2 (World &world); + JointHinge2 (World &world, JointGroup &jointGroup); + + //Destructors + + virtual ~JointHinge2 (void); + + + //Methods + + //Overloaded Hinge.Create + void Create (World &world, JointGroup &jointGroup); + void Create (World &world); + + void SetAnchor (double x, double y, double z); + Vector3 GetAnchor (void); + + void SetAxis1 (double x, double y, double z); + Vector3 GetAxis1 (void); + + void SetAxis2 (double x, double y, double z); + Vector3 GetAxis2 (void); + + double GetAngle1 (void); + double GetAngle1Rate (void); + + //double GetAngle2 (void); + double GetAngle2Rate (void); + + void Attach (Body &body1, Body &body2); + void Attach( Body &body1); + }; +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointHinge.cpp ode-0.14/contrib/DotNetManaged/JointHinge.cpp --- ode-0.11.1/contrib/DotNetManaged/JointHinge.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointHinge.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,121 @@ +#include "stdafx.h" + +#include +#include "jointhinge.h" + +namespace ODEManaged +{ + + //Constructors + + JointHinge::JointHinge(void) : Joint(){} + + + JointHinge::JointHinge(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateHinge(world.Id(), 0); + } + + + JointHinge::JointHinge(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateHinge(world.Id(), jointGroup.Id()); + } + + + //Destructor + + JointHinge::~JointHinge(void){} + + + //Methods + + //Overloaded Create + void JointHinge::Create(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateHinge(world.Id(), jointGroup.Id()); + } + + void JointHinge::Create(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateHinge(world.Id(), 0); + } + + + //Overloaded Attach + void JointHinge::Attach(Body &body1, Body &body2) + { + dJointAttach(this->_id, body1.Id(), body2.Id()); + } + + void JointHinge::Attach(Body &body1) + { + dJointAttach(this->_id, body1.Id(), 0); + } + + + //SetAxis + void JointHinge::SetAxis(double x, double y, double z) + { + dJointSetHingeAxis(this->_id, x, y, z); + } + + //GetAxis + Vector3 JointHinge::GetAxis(void) + { + Vector3 retVal; + dVector3 temp; + dJointGetHingeAxis(this->_id, temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //SetAnchor + void JointHinge::SetAnchor(double x, double y, double z) + { + dJointSetHingeAnchor(this->_id, x, y, z); + } + + //GetAnchor + Vector3 JointHinge::GetAnchor(void) + { + Vector3 retVal; + dVector3 temp; + dJointGetHingeAnchor(this->_id, temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //Movement Parameters + + //SetAllMovParams + void JointHinge::SetAllMovParams(double LoStop, double HiStop, + double Velocity, double MaxForce, + double FudgeFactor, double Bounce, + double StopERP, double StopCFM) + { + if (LoStop > -3.141592653 && LoStop <= 0) + dJointSetHingeParam(this->_id, dParamLoStop, LoStop); + + if (HiStop < 3.141592653 && HiStop >= 0) + dJointSetHingeParam(this->_id, dParamHiStop, HiStop); + + dJointSetHingeParam(this->_id, dParamVel, Velocity); + dJointSetHingeParam(this->_id, dParamFMax, MaxForce); + dJointSetHingeParam(this->_id, dParamFudgeFactor, FudgeFactor); + dJointSetHingeParam(this->_id, dParamBounce, Bounce); + dJointSetHingeParam(this->_id, dParamStopERP, StopERP); + dJointSetHingeParam(this->_id, dParamStopCFM, StopCFM); + } + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointHinge.h ode-0.14/contrib/DotNetManaged/JointHinge.h --- ode-0.11.1/contrib/DotNetManaged/JointHinge.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointHinge.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,195 @@ +#pragma once + +#include "Joint.h" +#include "CommonMgd.h" + +namespace ODEManaged +{ + __gc public class JointHinge : public Joint + { + public: + + //Constructors + + JointHinge(void); + JointHinge(World &world); + JointHinge(World &world, JointGroup &jointGroup); + + + //Destructor + + virtual~JointHinge(void); + + + //Methods + + //Overloaded Create + void Create(World &world, JointGroup &jointGroup); + void Create(World &world); + + //Overloaded Attach + void Attach(Body &body1, Body &body2); + void Attach(Body &body1); + + void SetAnchor(double x, double y, double z); + Vector3 GetAnchor(void); + + void SetAxis(double x, double y, double z); + Vector3 GetAxis(void); + + void SetAllMovParams(double LoStop, double HiStop, + double Velocity, double MaxForce, + double FudgeFactor, double Bounce, + double StopERP, double StopCFM); + + + //Properties + + //LoStop + __property double get_LoStop(void) + { + return dJointGetHingeParam(this->_id, dParamLoStop); + } + + __property void set_LoStop(double value) + { + if (value > -3.141592653 && value <= 0) + dJointSetHingeParam(this->_id, dParamLoStop, value); + } + + + //HiStop + __property double get_HiStop(void) + { + return dJointGetHingeParam(this->_id, dParamHiStop); + } + + __property void set_HiStop(double value) + { + if (value < 3.141592653 && value >= 0) + dJointSetHingeParam(this->_id, dParamHiStop, value); + } + + + //Velocity + __property double get_Velocity(void) + { + return dJointGetHingeParam(this->_id, dParamVel); + } + + __property void set_Velocity(double value) + { + dJointSetHingeParam(this->_id, dParamVel, value); + } + + + //MaxForce + __property double get_MaxForce(void) + { + return dJointGetHingeParam(this->_id, dParamFMax); + } + + __property void set_MaxForce(double value) + { + dJointSetHingeParam(this->_id, dParamFMax, value); + } + + + //FudgeFactor + __property double get_FudgeFactor(void) + { + return dJointGetHingeParam(this->_id, dParamFudgeFactor); + } + + __property void set_FudgeFactor(double value) + { + dJointSetHingeParam(this->_id, dParamFudgeFactor, value); + } + + + //Bounce + __property double get_Bounce(void) + { + return dJointGetHingeParam(this->_id, dParamBounce); + } + + __property void set_Bounce(double value) + { + dJointSetHingeParam(this->_id, dParamBounce, value); + } + + + //StopERP + __property double get_StopERP(void) + { + return dJointGetHingeParam(this->_id, dParamStopERP); + } + + __property void set_StopERP(double value) + { + dJointSetHingeParam(this->_id, dParamStopERP, value); + } + + + //StopCFM + __property double get_StopCFM(void) + { + return dJointGetHingeParam(this->_id, dParamStopCFM); + } + + __property void set_StopCFM(double value) + { + dJointSetHingeParam(this->_id, dParamStopCFM, value); + } + + + //GetAngle + __property double get_Angle(void) + { + return dJointGetHingeAngle(this->_id); + } + + + //GetAngleRate + __property double get_AngleRate(void) + { + return dJointGetHingeAngleRate(this->_id); + } + + }; + +} + +// void SetSuspensionERP(double value); +// double GetSuspensionERP(void); + +// void SetSuspensionCFM(double value); +// double GetSuspensionCFM(void); + +/* + //SetSuspensionERP + void JointHinge::SetSuspensionERP(double value) + { + dJointSetHingeParam(this->_id, dParamSuspensionERP, value); + } + + //GetSuspensionERP + double JointHinge::GetSuspensionERP(void) + { + return dJointGetHingeParam(this->_id, dParamSuspensionERP); + } + + + //SetSuspensionCFM + void JointHinge::SetSuspensionCFM(double value) + { + dJointSetHingeParam(this->_id, dParamSuspensionCFM, value); + } + + //GetSuspensionCFM + double JointHinge::GetSuspensionCFM(void) + { + return dJointGetHingeParam(this->_id, dParamSuspensionCFM); + } + +*/ diff -Nru ode-0.11.1/contrib/DotNetManaged/JointSlider.cpp ode-0.14/contrib/DotNetManaged/JointSlider.cpp --- ode-0.11.1/contrib/DotNetManaged/JointSlider.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointSlider.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,102 @@ +#include "StdAfx.h" + +#include +#include "jointslider.h" + +namespace ODEManaged +{ + + //Constructors + + JointSlider::JointSlider(void) : Joint(){} + + + JointSlider::JointSlider(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateSlider(world.Id(), 0); + } + + + JointSlider::JointSlider(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateSlider(world.Id(), jointGroup.Id()); + } + + + //Destructor + + JointSlider::~JointSlider(void){} + + + //Methods + + //Overloaded Create + void JointSlider::Create(World &world, JointGroup &jointGroup) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateSlider(world.Id(), jointGroup.Id()); + } + + void JointSlider::Create(World &world) + { + if(this->_id) dJointDestroy(this->_id); + _id = dJointCreateSlider(world.Id(), 0); + } + + + //Overloaded Attach + void JointSlider::Attach(Body &body1, Body &body2) + { + dJointAttach(this->_id, body1.Id(), body2.Id()); + } + + void JointSlider::Attach(Body &body1) + { + dJointAttach(this->_id, body1.Id(), 0); + } + + + //SetAxis + void JointSlider::SetAxis(double x, double y, double z) + { + dJointSetSliderAxis(this->_id, x, y, z); + } + + //GetAxis + Vector3 JointSlider::GetAxis(void) + { + Vector3 retVal; + dVector3 temp; + dJointGetSliderAxis(this->_id, temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + + //Movement Parameters + + //SetAllMovParams + void JointSlider::SetAllMovParams(double LoStop, double HiStop, + double Velocity, double MaxForce, + double FudgeFactor, double Bounce, + double StopERP, double StopCFM) + { + if (LoStop <= 0) + dJointSetHingeParam(this->_id, dParamLoStop, LoStop); + + if (HiStop >= 0) + dJointSetHingeParam(this->_id, dParamHiStop, HiStop); + + dJointSetSliderParam(this->_id, dParamVel, Velocity); + dJointSetSliderParam(this->_id, dParamFMax, MaxForce); + dJointSetSliderParam(this->_id, dParamFudgeFactor, FudgeFactor); + dJointSetSliderParam(this->_id, dParamBounce, Bounce); + dJointSetSliderParam(this->_id, dParamStopERP, StopERP); + dJointSetSliderParam(this->_id, dParamStopCFM, StopCFM); + } + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/JointSlider.h ode-0.14/contrib/DotNetManaged/JointSlider.h --- ode-0.11.1/contrib/DotNetManaged/JointSlider.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/JointSlider.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,158 @@ +#pragma once + +#include "Joint.h" +#include "CommonMgd.h" + +namespace ODEManaged +{ + __gc public class JointSlider : public Joint + { + public: + + + //Constructors + + JointSlider(void); + JointSlider(World &world); + JointSlider(World &world, JointGroup &jointGroup); + + + //Destructors + + virtual ~JointSlider(void); + + + //Methods + + //Overloaded Create + void Create(World &world, JointGroup &jointGroup); + void Create(World &world); + + //Overloaded Attach + void Attach(Body &body1, Body &body2); + void Attach(Body &body1); + + void SetAxis(double x, double y, double z); + Vector3 GetAxis(void); + + void SetAllMovParams(double LoStop, double HiStop, + double Velocity, double MaxForce, + double FudgeFactor, double Bounce, + double StopERP, double StopCFM); + + + //Properties + + //LoStop + __property double get_LoStop(void) + { + return dJointGetSliderParam(this->_id, dParamLoStop); + } + + __property void set_LoStop(double value) + { + if (value <=0) + dJointSetSliderParam(this->_id, dParamLoStop, value); + } + + + //HiStop + __property double get_HiStop(void) + { + return dJointGetSliderParam(this->_id, dParamHiStop); + } + + __property void set_HiStop(double value) + { + if (value >= 0) + dJointSetSliderParam(this->_id, dParamHiStop, value); + } + + + //Velocity + __property double get_Velocity(void) + { + return dJointGetSliderParam(this->_id, dParamVel); + } + + __property void set_Velocity(double value) + { + dJointSetSliderParam(this->_id, dParamVel, value); + } + + + //MaxForce + __property double get_MaxForce(void) + { + return dJointGetSliderParam(this->_id, dParamFMax); + } + + __property void set_MaxForce(double value) + { + dJointSetSliderParam(this->_id, dParamFMax, value); + } + + + //FudgeFactor + __property double get_FudgeFactor(void) + { + return dJointGetSliderParam(this->_id, dParamFudgeFactor); + } + + __property void set_FudgeFactor(double value) + { + dJointSetSliderParam(this->_id, dParamFudgeFactor, value); + } + + + //Bounce + __property double get_Bounce(void) + { + return dJointGetSliderParam(this->_id, dParamBounce); + } + + __property void set_Bounce(double value) + { + dJointSetSliderParam(this->_id, dParamBounce, value); + } + + + //StopERP + __property double get_StopERP(void) + { + return dJointGetSliderParam(this->_id, dParamStopERP); + } + + __property void set_StopERP(double value) + { + dJointSetSliderParam(this->_id, dParamStopERP, value); + } + + + //StopCFM + __property double get_StopCFM(void) + { + return dJointGetSliderParam(this->_id, dParamStopCFM); + } + + __property void set_StopCFM(double value) + { + dJointSetSliderParam(this->_id, dParamStopCFM, value); + } + + + //GetAngle + __property double get_Position(void) + { + return dJointGetSliderPosition(this->_id); + } + + + //GetAngleRate + __property double get_PositionRate(void) + { + return dJointGetSliderPositionRate(this->_id); + } + + }; +} Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/DotNetManaged/Release/ode.dll and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/DotNetManaged/Release/ode.dll differ diff -Nru ode-0.11.1/contrib/DotNetManaged/Space.cpp ode-0.14/contrib/DotNetManaged/Space.cpp --- ode-0.11.1/contrib/DotNetManaged/Space.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Space.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,53 @@ +#include "StdAfx.h" + +#include +#include "Space.h" +#include "TEST.h" + +namespace ODEManaged +{ + + //Constructor + + Space::Space(void) + { + _id = dSimpleSpaceCreate(); + } + + Space::Space(int minlevel, int maxlevel) + { + _id = dHashSpaceCreate(); + dHashSpaceSetLevels(this->_id, minlevel, maxlevel); + } + + + //Destructor + + Space::~Space(void) + { + dSpaceDestroy(this->_id); + } + + + //Methods + + //Id + dSpaceID Space::Id() + { + return _id; + } + + + //Collide + void Space::Collide(void *data, dNearCallback *callback) + { + dSpaceCollide(this->_id, data, callback); + } + + + + + + + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/Space.h ode-0.14/contrib/DotNetManaged/Space.h --- ode-0.11.1/contrib/DotNetManaged/Space.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Space.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,33 @@ +#pragma once + +#include "CommonMgd.h" + +namespace ODEManaged +{ + __gc public class Space + { + public: + + //Constructor + + Space(void); + Space(int minlevel, int maxlevel); + + //Destructor + + ~Space(void); + + + //Methods + + dSpaceID Id(void); + void Collide(void *data, dNearCallback *callback); + + + private: + + dSpaceID _id; + + }; + +} diff -Nru ode-0.11.1/contrib/DotNetManaged/Stdafx.cpp ode-0.14/contrib/DotNetManaged/Stdafx.cpp --- ode-0.11.1/contrib/DotNetManaged/Stdafx.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Stdafx.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,5 @@ +// stdafx.cpp : source file that includes just the standard includes +// ODEManaged.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" diff -Nru ode-0.11.1/contrib/DotNetManaged/Stdafx.h ode-0.14/contrib/DotNetManaged/Stdafx.h --- ode-0.11.1/contrib/DotNetManaged/Stdafx.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/Stdafx.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,12 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#pragma once + +#using + + + + + diff -Nru ode-0.11.1/contrib/DotNetManaged/TEST.h ode-0.14/contrib/DotNetManaged/TEST.h --- ode-0.11.1/contrib/DotNetManaged/TEST.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/TEST.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,17 @@ + +#pragma once + +#include "CommonMgd.h" + +namespace ODEManaged +{ + +void RnearCallback(void *data, dGeomID o1, dGeomID o2) + { + } + +} + + + + diff -Nru ode-0.11.1/contrib/DotNetManaged/World.cpp ode-0.14/contrib/DotNetManaged/World.cpp --- ode-0.11.1/contrib/DotNetManaged/World.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/World.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,74 @@ +#include "StdAfx.h" + +#include +#include "World.h" + +namespace ODEManaged +{ + + //Constructor + + World::World(void) + { + /*dWorldID _temp = dWorldCreate(); + _id = _temp;*/ + _id = dWorldCreate(); + } + + + //Destructor + + World::~World(void) + { + dWorldDestroy(this->_id); + } + + + //Methods + + //Id + dWorldID World::Id() + { + return _id; + } + + + //SetGravity + void World::SetGravity(double x, double y, double z) + { + dWorldSetGravity(this->_id, x, y, z); + } + + + //Overloaded GetGravity + Vector3 World::GetGravity(void) + { + Vector3 retVal; + dVector3 temp; + dWorldGetGravity(this->_id, temp); + retVal.x = temp[0]; + retVal.y = temp[1]; + retVal.z = temp[2]; + return retVal; + } + + void World::GetGravity(double gravity __gc[]) + { + dVector3 temp; + dWorldGetGravity(this->_id, temp); + gravity[0] = temp[0]; + gravity[1] = temp[1]; + gravity[2] = temp[2]; + } + + + //Step + void World::Step(double stepSize) + { + dWorldStep(this->_id, stepSize); + } + +} + + + diff -Nru ode-0.11.1/contrib/DotNetManaged/World.h ode-0.14/contrib/DotNetManaged/World.h --- ode-0.11.1/contrib/DotNetManaged/World.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/DotNetManaged/World.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,67 @@ +#pragma once + +#include "CommonMgd.h" + +namespace ODEManaged +{ + __gc public class World + { + public: + + //Constructor + + World(void); + + + //Destructor + + ~World(void); + + + // Methods + + dWorldID Id(void); + + void SetGravity(double x, double y, double z); + + //Overloaded GetGravity + Vector3 GetGravity(void); + void GetGravity(double gravity __gc[]); + + void Step(double stepSize); + + + //Properties + + //Constraint Force Mixing + __property void set_CFM(double cfm) + { + dWorldSetCFM(this->_id,cfm); + } + + __property double get_CFM(void) + { + return dWorldGetCFM(this->_id); + } + + + //Error Reduction Parameter + __property void set_ERP(double erp) + { + dWorldSetERP(this->_id,erp); + } + + __property double get_ERP(void) + { + return dWorldGetERP(this->_id); + } + + + private: + + dWorldID _id; + + }; + +} + diff -Nru ode-0.11.1/contrib/dRay/dRay_Box.cpp ode-0.14/contrib/dRay/dRay_Box.cpp --- ode-0.11.1/contrib/dRay/dRay_Box.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dRay/dRay_Box.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,134 @@ +// Ripped from Magic Software + +#include "Include\dRay.h" +#include "dxRay.h" + +bool Clip(dReal Denom, dReal Numer, dReal& T0, dReal& T1){ + // Return value is 'true' if line segment intersects the current test + // plane. Otherwise 'false' is returned in which case the line segment + // is entirely clipped. + + if (Denom > REAL(0.0)){ + if (Numer > Denom * T1){ + return false; + } + + if (Numer > Denom * T0){ + T0 = Numer / Denom; + } + return true; + } + else if (Denom < REAL(0.0)){ + if (Numer > Denom * T0){ + return false; + } + + if (Numer > Denom * T1){ + T1 = Numer / Denom; + } + return true; + } + else return Numer <= REAL(0.0); +} + +bool FindIntersection(const dVector3 Origin, const dVector3 Direction, const dVector3 Extents, dReal& T0, dReal& T1){ + dReal SaveT0 = T0; + dReal SaveT1 = T1; + + bool NotEntirelyClipped = + Clip(+Direction[0], -Origin[0] - Extents[0], T0, T1) && + Clip(-Direction[0], +Origin[0] - Extents[0], T0, T1) && + Clip(+Direction[1], -Origin[1] - Extents[1], T0, T1) && + Clip(-Direction[1], +Origin[1] - Extents[1], T0, T1) && + Clip(+Direction[2], -Origin[2] - Extents[2], T0, T1) && + Clip(-Direction[2], +Origin[2] - Extents[2], T0, T1); + + return NotEntirelyClipped && (T0 != SaveT0 || T1 != SaveT1); +} + +int dCollideBR(dxGeom* RayGeom, dxGeom* BoxGeom, int Flags, dContactGeom* Contacts, int Stride){ + const dVector3& Position = *(const dVector3*)dGeomGetPosition(BoxGeom); + const dMatrix3& Rotation = *(const dMatrix3*)dGeomGetRotation(BoxGeom); + dVector3 Extents; + dGeomBoxGetLengths(BoxGeom, Extents); + Extents[0] /= 2; + Extents[1] /= 2; + Extents[2] /= 2; + Extents[3] /= 2; + + dVector3 Origin, Direction; + dGeomRayGet(RayGeom, Origin, Direction); + dReal Length = dGeomRayGetLength(RayGeom); + + dVector3 Diff; + Diff[0] = Origin[0] - Position[0]; + Diff[1] = Origin[1] - Position[1]; + Diff[2] = Origin[2] - Position[2]; + Diff[3] = Origin[3] - Position[3]; + + Direction[0] *= Length; + Direction[1] *= Length; + Direction[2] *= Length; + Direction[3] *= Length; + + dVector3 Rot[3]; + Decompose(Rotation, Rot); + + dVector3 TransOrigin; + TransOrigin[0] = dDOT(Diff, Rot[0]); + TransOrigin[1] = dDOT(Diff, Rot[1]); + TransOrigin[2] = dDOT(Diff, Rot[2]); + TransOrigin[3] = REAL(0.0); + + dVector3 TransDirection; + TransDirection[0] = dDOT(Direction, Rot[0]); + TransDirection[1] = dDOT(Direction, Rot[1]); + TransDirection[2] = dDOT(Direction, Rot[2]); + TransDirection[3] = REAL(0.0); + + dReal T[2]; + T[0] = 0.0f; + T[1] = dInfinity; + + bool Intersect = FindIntersection(TransOrigin, TransDirection, Extents, T[0], T[1]); + + if (Intersect){ + if (T[0] > REAL(0.0)){ + dContactGeom* Contact0 = CONTACT(Flags, Contacts, 0, Stride); + Contact0->pos[0] = Origin[0] + T[0] * Direction[0]; + Contact0->pos[1] = Origin[1] + T[0] * Direction[1]; + Contact0->pos[2] = Origin[2] + T[0] * Direction[2]; + Contact0->pos[3] = Origin[3] + T[0] * Direction[3]; + //Contact0->normal = 0; + Contact0->depth = 0.0f; + Contact0->g1 = RayGeom; + Contact0->g2 = BoxGeom; + + dContactGeom* Contact1 = CONTACT(Flags, Contacts, 1, Stride); + Contact1->pos[0] = Origin[0] + T[1] * Direction[0]; + Contact1->pos[1] = Origin[1] + T[1] * Direction[1]; + Contact1->pos[2] = Origin[2] + T[1] * Direction[2]; + Contact1->pos[3] = Origin[3] + T[1] * Direction[3]; + //Contact1->normal = 0; + Contact1->depth = 0.0f; + Contact1->g1 = RayGeom; + Contact1->g2 = BoxGeom; + + return 2; + } + else{ + dContactGeom* Contact = CONTACT(Flags, Contacts, 0, Stride); + Contact->pos[0] = Origin[0] + T[1] * Direction[0]; + Contact->pos[1] = Origin[1] + T[1] * Direction[1]; + Contact->pos[2] = Origin[2] + T[1] * Direction[2]; + Contact->pos[3] = Origin[3] + T[1] * Direction[3]; + //Contact->normal = 0; + Contact->depth = 0.0f; + Contact->g1 = RayGeom; + Contact->g2 = BoxGeom; + + return 1; + } + } + else return 0; +} \ No newline at end of file diff -Nru ode-0.11.1/contrib/dRay/dRay_CCylinder.cpp ode-0.14/contrib/dRay/dRay_CCylinder.cpp --- ode-0.11.1/contrib/dRay/dRay_CCylinder.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dRay/dRay_CCylinder.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,199 @@ +// Ripped from Magic Software + +#include "Include\dRay.h" +#include "dxRay.h" + +int Find(const dVector3 Origin, dVector3 Direction, dReal Length, const dVector3 CCPos, const dMatrix3 CCRot, dReal CCRadius, dReal CCLength, dReal T[2]){ + dVector3 U, V, W; + Decompose(CCRot, U, V, W); + + dVector3 CCOrigin; + CCOrigin[0] = CCPos[0] - (W[0] * CCLength / 2); + CCOrigin[1] = CCPos[1] - (W[1] * CCLength / 2); + CCOrigin[2] = CCPos[2] - (W[2] * CCLength / 2); + CCOrigin[3] = CCPos[3] - (W[3] * CCLength / 2); + + dVector3 D; + D[0] = dDOT(U, Direction); + D[1] = dDOT(V, Direction); + D[2] = dDOT(W, Direction); + + dReal DMag = Length; + dReal InvDMag = REAL(1.0) / DMag; + + dVector3 Diff; + Diff[0] = Origin[0] - CCOrigin[0]; + Diff[1] = Origin[1] - CCOrigin[1]; + Diff[2] = Origin[2] - CCOrigin[2]; + Diff[3] = Origin[3] - CCOrigin[3]; + + dVector3 P; + P[0] = dDOT(U, Diff); + P[1] = dDOT(V, Diff); + P[2] = dDOT(W, Diff); + + dReal CCRadiusSq = CCRadius * CCRadius; + + dReal Epsilon = 1e-12f; + + if (dFabs(D[2]) >= REAL(1.0) - Epsilon){ // line is parallel to capsule axis + dReal Discr = CCRadiusSq - P[0] * P[0] - P[1] * P[1]; + + if (Discr >= REAL(0.0)){ + dReal Root = dSqrt(Discr); + T[0] = (-P[2] + Root) * InvDMag; + T[1] = (CCLength - P[2] + Root) * InvDMag; + return 2; + } + else return 0; + } + + // test intersection with infinite cylinder + dReal A = D[0] * D[0] + D[1] * D[1]; + dReal B = P[0] * D[0] + P[1] * D[1]; + dReal C = P[0] * P[0] + P[1] * P[1] - CCRadiusSq; + dReal Discr = B * B - A * C; + if (Discr < REAL(0.0)){ // line does not intersect infinite cylinder + return 0; + } + + int Count = 0; + + if (Discr > REAL(0.0)){ // line intersects infinite cylinder in two places + dReal Root = dSqrt(Discr); + dReal Inv = REAL(1.0) / A; + + dReal TTemp = (-B - Root) * Inv; + + dReal Tmp = P[2] + TTemp * D[2]; + if (REAL(0.0) <= Tmp && Tmp <= CCLength){ + T[Count++] = TTemp * InvDMag; + } + + + TTemp = (-B + Root) * Inv; + Tmp = P[2] + TTemp * D[2]; + if (REAL(0.0) <= Tmp && Tmp <= CCLength){ + T[Count++] = TTemp * InvDMag; + } + + if (Count == 2){ // line intersects capsule wall in two places + return 2; + } + } + else{ // line is tangent to infinite cylinder + dReal TTemp = -B / A; + dReal Tmp = P[2] + TTemp * D[2]; + if (REAL(0.0) <= Tmp && Tmp <= CCLength){ + T[0] = TTemp * InvDMag; + return 1; + } + } + + // test intersection with bottom hemisphere + // fA = 1 + B += P[2] * D[2]; + C += P[2] * P[2]; + Discr = B * B - C; + if (Discr > REAL(0.0)){ + dReal Root = dSqrt(Discr); + dReal TTemp = -B - Root; + dReal Tmp = P[2] + TTemp * D[2]; + if (Tmp <= REAL(0.0)){ + T[Count++] = TTemp * InvDMag; + if (Count == 2){ + return 2; + } + } + + TTemp = -B + Root; + Tmp = P[2] + TTemp * D[2]; + if (Tmp <= REAL(0.0)){ + T[Count++] = TTemp * InvDMag; + if (Count == 2){ + return 2; + } + } + } + else if (Discr == REAL(0.0)){ + dReal TTemp = -B; + dReal Tmp = P[2] + TTemp * D[2]; + if (Tmp <= REAL(0.0)){ + T[Count++] = TTemp * InvDMag; + if (Count == 2){ + return 2; + } + } + } + + // test intersection with top hemisphere + // fA = 1 + B -= D[2] * CCLength; + C += CCLength * (CCLength - REAL(2.0) * P[2]); + + Discr = B * B - C; + if (Discr > REAL(0.0)){ + dReal Root = dSqrt(Discr); + dReal TTemp = -B - Root; + dReal Tmp = P[2] + TTemp * D[2]; + if (Tmp >= CCLength){ + + T[Count++] = TTemp * InvDMag; + if (Count == 2){ + return 2; + } + } + + TTemp = -B + Root; + Tmp = P[2] + TTemp * D[2]; + if (Tmp >= CCLength){ + T[Count++] = TTemp * InvDMag; + if (Count == 2){ + return 2; + } + } + } + else if (Discr == REAL(0.0)){ + dReal TTemp = -B; + dReal Tmp = P[2] + TTemp * D[2]; + if (Tmp >= CCLength){ + T[Count++] = TTemp * InvDMag; + if (Count == 2){ + return 2; + } + } + } + return Count; +} + +int dCollideCCR(dxGeom* RayGeom, dxGeom* CCGeom, int Flags, dContactGeom* Contacts, int Stride){ + const dVector3& CCPos = *(const dVector3*)dGeomGetPosition(CCGeom); + const dMatrix3& CCRot = *(const dMatrix3*)dGeomGetRotation(CCGeom); + + dReal CCRadius, CCLength; + dGeomCCylinderGetParams(CCGeom, &CCRadius, &CCLength); + + dVector3 Origin, Direction; + dGeomRayGet(RayGeom, Origin, Direction); + dReal Length = dGeomRayGetLength(RayGeom); + + dReal T[2]; + int Count = Find(Origin, Direction, Length, CCPos, CCRot, CCRadius, CCLength, T); + int ContactCount = 0; + for (int i = 0; i < Count; i++){ + if (T[i] >= 0.0){ + dContactGeom* Contact = CONTACT(Flags, Contacts, ContactCount, Stride); + Contact->pos[0] = Origin[0] + T[i] * Direction[0] * Length; + Contact->pos[1] = Origin[1] + T[i] * Direction[1] * Length; + Contact->pos[2] = Origin[2] + T[i] * Direction[2] * Length; + Contact->pos[3] = Origin[3] + T[i] * Direction[3] * Length; + //Contact->normal = 0; + Contact->depth = 0.0f; + Contact->g1 = RayGeom; + Contact->g2 = CCGeom; + + ContactCount++; + } + } + return ContactCount; +} \ No newline at end of file diff -Nru ode-0.11.1/contrib/dRay/dRay.cpp ode-0.14/contrib/dRay/dRay.cpp --- ode-0.11.1/contrib/dRay/dRay.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dRay/dRay.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,119 @@ +#include "Include\dRay.h" +#include "dxRay.h" + +int dRayClass = -1; + +void dAABBRay(dxGeom* Ray, dReal AABB[6]){ + dVector3 Start, End; + dGeomRayGet(Ray, Start, End); + dReal Length = dGeomRayGetLength(Ray); + + End[0] = Start[0] + End[0] * Length; + End[1] = Start[1] + End[1] * Length; + End[2] = Start[2] + End[2] * Length; + End[3] = Start[3] + End[3] * Length; + + if (Start[0] < End[0]){ + AABB[0] = Start[0]; + AABB[1] = End[0]; + } + else{ + AABB[0] = End[0]; + AABB[1] = Start[0]; + } + + if (Start[1] < End[1]){ + AABB[2] = Start[1]; + AABB[3] = End[1]; + } + else{ + AABB[2] = End[1]; + AABB[3] = Start[1]; + } + + if (Start[2] < End[2]){ + AABB[4] = Start[2]; + AABB[5] = End[2]; + } + else{ + AABB[4] = End[2]; + AABB[5] = Start[2]; + } + // Should we tweak the box to have a minimum size for axis aligned lines? How small should it be? +} + +dColliderFn* dRayColliderFn(int num){ + if (num == dPlaneClass) return (dColliderFn*)&dCollidePR; + if (num == dSphereClass) return (dColliderFn*)&dCollideSR; + if (num == dBoxClass) return (dColliderFn*)&dCollideBR; + if (num == dCCylinderClass) return (dColliderFn*)&dCollideCCR; + return 0; +} + +dxGeom* dGeomCreateRay(dSpaceID space, dReal Length){ + if (dRayClass == -1){ + dGeomClass c; + c.bytes = sizeof(dxRay); + c.collider = &dRayColliderFn; + c.aabb = &dAABBRay; + c.aabb_test = 0; + c.dtor = 0; + + dRayClass = dCreateGeomClass(&c); + } + + dxGeom* g = dCreateGeom(dRayClass); + if (space) dSpaceAdd(space, g); + + dGeomRaySetLength(g, Length); + return g; +} + +void dGeomRaySetLength(dxGeom* g, dReal Length){ + ((dxRay*)dGeomGetClassData(g))->Length = Length; +} + +dReal dGeomRayGetLength(dxGeom* g){ + return ((dxRay*)dGeomGetClassData(g))->Length; +} + +void dGeomRaySet(dxGeom* g, dVector3 Origin, dVector3 Direction){ + dGeomSetPosition(g, Origin[0], Origin[1], Origin[2]); + + dVector3 Up, Right; + dPlaneSpace(Direction, Up, Right); + + Origin[3] = Up[3] = Right[3] = REAL(0.0); + + dMatrix3 Rotation; + Rotation[0 * 4 + 0] = Right[0]; + Rotation[1 * 4 + 0] = Right[1]; + Rotation[2 * 4 + 0] = Right[2]; + Rotation[3 * 4 + 0] = Right[3]; + + Rotation[0 * 4 + 1] = Up[0]; + Rotation[1 * 4 + 1] = Up[1]; + Rotation[2 * 4 + 1] = Up[2]; + Rotation[3 * 4 + 1] = Up[3]; + + Rotation[0 * 4 + 2] = Direction[0]; + Rotation[1 * 4 + 2] = Direction[1]; + Rotation[2 * 4 + 2] = Direction[2]; + Rotation[3 * 4 + 2] = Direction[3]; + + dGeomSetRotation(g, Rotation); +} + +void dGeomRayGet(dxGeom* g, dVector3 Origin, dVector3 Direction){ + const dReal* Position = dGeomGetPosition(g); + Origin[0] = Position[0]; + Origin[1] = Position[1]; + Origin[2] = Position[2]; + Origin[3] = Position[3]; + + const dReal* Rotation = dGeomGetRotation(g); + Direction[0] = Rotation[0 * 4 + 2]; + Direction[1] = Rotation[1 * 4 + 2]; + Direction[2] = Rotation[2 * 4 + 2]; + Direction[3] = Rotation[3 * 4 + 2]; +} \ No newline at end of file diff -Nru ode-0.11.1/contrib/dRay/dRay_Plane.cpp ode-0.14/contrib/dRay/dRay_Plane.cpp --- ode-0.11.1/contrib/dRay/dRay_Plane.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dRay/dRay_Plane.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,35 @@ +// Ripped from Paul Bourke + +#include "Include\dRay.h" +#include "dxRay.h" + +int dCollidePR(dxGeom* RayGeom, dxGeom* PlaneGeom, int Flags, dContactGeom* Contact, int Stride){ + dVector3 Plane; + dGeomPlaneGetParams(PlaneGeom, Plane); + + dVector3 Origin, Direction; + dGeomRayGet(RayGeom, Origin, Direction); + + dReal Length = dGeomRayGetLength(RayGeom); + + dReal Denom = Plane[0] * Direction[0] + Plane[1] * Direction[1] + Plane[2] * Direction[2]; + if (dFabs(Denom) < 0.00001f){ + return 0; // Ray never hits + } + + float T = -(Plane[3] + Plane[0] * Origin[0] + Plane[1] * Origin[1] + Plane[2] * Origin[2]) / Denom; + + if (T < 0 || T > Length){ + return 0; // Ray hits but not within boundaries + } + + Contact->pos[0] = Origin[0] + T * Direction[0]; + Contact->pos[1] = Origin[1] + T * Direction[1]; + Contact->pos[2] = Origin[2] + T * Direction[2]; + Contact->pos[3] = REAL(0.0); + //Contact->normal = 0; + Contact->depth = 0.0f; + Contact->g1 = RayGeom; + Contact->g2 = PlaneGeom; + return 1; +} \ No newline at end of file diff -Nru ode-0.11.1/contrib/dRay/dRay_Sphere.cpp ode-0.14/contrib/dRay/dRay_Sphere.cpp --- ode-0.11.1/contrib/dRay/dRay_Sphere.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dRay/dRay_Sphere.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,95 @@ +// Ripped from Magic Software + +#include "Include\dRay.h" +#include "dxRay.h" + +int dCollideSR(dxGeom* RayGeom, dxGeom* SphereGeom, int Flags, dContactGeom* Contacts, int Stride){ + const dVector3& Position = *(const dVector3*)dGeomGetPosition(SphereGeom); + dReal Radius = dGeomSphereGetRadius(SphereGeom); + + dVector3 Origin, Direction; + dGeomRayGet(RayGeom, Origin, Direction); + dReal Length = dGeomRayGetLength(RayGeom); + + dVector3 Diff; + Diff[0] = Origin[0] - Position[0]; + Diff[1] = Origin[1] - Position[1]; + Diff[2] = Origin[2] - Position[2]; + Diff[3] = Origin[3] - Position[3]; + + Direction[0] *= Length; + Direction[1] *= Length; + Direction[2] *= Length; + Direction[3] *= Length; + + dReal A = Length * Length; + dReal B = dDOT(Diff, Direction); + dReal C = dDOT(Diff, Diff) - (Radius * Radius); + + dReal Discr = B * B - A * C; + if (Discr < REAL(0.0)){ + return 0; + } + else if (Discr > REAL(0.0)){ + dReal T[2]; + dReal Root = dSqrt(Discr); + dReal InvA = REAL(1.0) / A; + T[0] = (-B - Root) * InvA; + T[1] = (-B + Root) * InvA; + + if (T[0] >= REAL(0.0)){ + dContactGeom* Contact0 = CONTACT(Flags, Contacts, 0, Stride); + Contact0->pos[0] = Origin[0] + T[0] * Direction[0]; + Contact0->pos[1] = Origin[1] + T[0] * Direction[1]; + Contact0->pos[2] = Origin[2] + T[0] * Direction[2]; + Contact0->pos[3] = Origin[3] + T[0] * Direction[3]; + //Contact0->normal = 0; + Contact0->depth = 0.0f; + Contact0->g1 = RayGeom; + Contact0->g2 = SphereGeom; + + dContactGeom* Contact1 = CONTACT(Flags, Contacts, 1, Stride); + Contact1->pos[0] = Origin[0] + T[1] * Direction[0]; + Contact1->pos[1] = Origin[1] + T[1] * Direction[1]; + Contact1->pos[2] = Origin[2] + T[1] * Direction[2]; + Contact1->pos[3] = Origin[3] + T[1] * Direction[3]; + //Contact1->normal = 0; + Contact1->depth = 0.0f; + Contact1->g1 = RayGeom; + Contact1->g2 = SphereGeom; + + return 2; + } + else if (T[1] >= REAL(0.0)){ + dContactGeom* Contact = CONTACT(Flags, Contacts, 1, Stride); + Contact->pos[0] = Origin[0] + T[1] * Direction[0]; + Contact->pos[1] = Origin[1] + T[1] * Direction[1]; + Contact->pos[2] = Origin[2] + T[1] * Direction[2]; + Contact->pos[3] = Origin[3] + T[1] * Direction[3]; + //Contact->normal = 0; + Contact->depth = 0.0f; + Contact->g1 = RayGeom; + Contact->g2 = SphereGeom; + + return 1; + } + else return 0; + } + else{ + dReal T; + T = -B / A; + if (T >= REAL(0.0)){ + dContactGeom* Contact = CONTACT(Flags, Contacts, 0, Stride); + Contact->pos[0] = Origin[0] + T * Direction[0]; + Contact->pos[1] = Origin[1] + T * Direction[1]; + Contact->pos[2] = Origin[2] + T * Direction[2]; + Contact->pos[3] = Origin[3] + T * Direction[3]; + //Contact->normal = 0; + Contact->depth = 0.0f; + Contact->g1 = RayGeom; + Contact->g2 = SphereGeom; + return 1; + } + else return 0; + } +} \ No newline at end of file diff -Nru ode-0.11.1/contrib/dRay/dxRay.h ode-0.14/contrib/dRay/dxRay.h --- ode-0.11.1/contrib/dRay/dxRay.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dRay/dxRay.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +struct dxRay{ + dReal Length; +}; + +inline void Decompose(const dMatrix3 Matrix, dVector3 Right, dVector3 Up, dVector3 Direction){ + Right[0] = Matrix[0 * 4 + 0]; + Right[1] = Matrix[1 * 4 + 0]; + Right[2] = Matrix[2 * 4 + 0]; + Right[3] = Matrix[3 * 4 + 0]; + Up[0] = Matrix[0 * 4 + 1]; + Up[1] = Matrix[1 * 4 + 1]; + Up[2] = Matrix[2 * 4 + 1]; + Up[3] = Matrix[3 * 4 + 1]; + Direction[0] = Matrix[0 * 4 + 2]; + Direction[1] = Matrix[1 * 4 + 2]; + Direction[2] = Matrix[2 * 4 + 2]; + Direction[3] = Matrix[3 * 4 + 2]; +} + +inline void Decompose(const dMatrix3 Matrix, dVector3 Vectors[3]){ + Decompose(Matrix, Vectors[0], Vectors[1], Vectors[2]); +} + +inline dContactGeom* CONTACT(int Flags, dContactGeom* Contacts, int Index, int Stride){ + dIASSERT(Index >= 0 && Index < (Flags & 0x0ffff)); + return ((dContactGeom*)(((char*)Contacts) + (Index * Stride))); +} + +int dCollidePR(dxGeom* RayGeom, dxGeom* PlaneGeom, int Flags, dContactGeom* Contacts, int Stride); +int dCollideSR(dxGeom* RayGeom, dxGeom* SphereGeom, int Flags, dContactGeom* Contacts, int Stride); +int dCollideBR(dxGeom* RayGeom, dxGeom* BoxGeom, int Flags, dContactGeom* Contacts, int Stride); +int dCollideCCR(dxGeom* RayGeom, dxGeom* CCylinderGeom, int Flags, dContactGeom* Contacts, int Stride); \ No newline at end of file diff -Nru ode-0.11.1/contrib/dRay/Include/dRay.h ode-0.14/contrib/dRay/Include/dRay.h --- ode-0.11.1/contrib/dRay/Include/dRay.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dRay/Include/dRay.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,15 @@ +#include "ode\ode.h" + +/* Class ID */ +extern int dRayClass; + +/* Creates a ray */ +dxGeom* dGeomCreateRay(dSpaceID space, dReal Length); + +/* Set/Get length */ +void dGeomRaySetLength(dxGeom* g, dReal Length); +dReal dGeomRayGetLength(dxGeom* g); + +/* Utility function to override the ray's pos + rot */ +void dGeomRaySet(dxGeom* g, dVector3 Origin, dVector3 Direction); +void dGeomRayGet(dxGeom* g, dVector3 Origin, dVector3 Direction); diff -Nru ode-0.11.1/contrib/dRay/README.txt ode-0.14/contrib/dRay/README.txt --- ode-0.11.1/contrib/dRay/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dRay/README.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,16 @@ +From: "Erwin de Vries" +To: +Subject: [ODE] dRay class +Date: Thu, 25 Jul 2002 13:05:28 +0200 + +Yesterday and today i've written a dRay class. It interacts with dPlane, +dSphere, dBox and dCCylinder. It does not generate full contact information. +It only generates the pos member. I dont think its useful to anyone to go +through hoops and find a reasonable normal and penetration depth, as i dont +think anyone will want to use it for dynamics. Just for CD. + +It should compile in single and double precision mode, and should be +platform independant. I hope. + +The next Tri-Collider release using Opcode 1.1 will also implement a ray +collision function along with some other not too interesting improvements. diff -Nru ode-0.11.1/contrib/dRay/Test/test_ray.cpp ode-0.14/contrib/dRay/Test/test_ray.cpp --- ode-0.11.1/contrib/dRay/Test/test_ray.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/dRay/Test/test_ray.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1372 @@ +/************************************************************************* + + + * * + + + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + + + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + + + * * + + + * This library is free software; you can redistribute it and/or * + + + * modify it under the terms of EITHER: * + + + * (1) The GNU Lesser General Public License as published by the Free * + + + * Software Foundation; either version 2.1 of the License, or (at * + + + * your option) any later version. The text of the GNU Lesser * + + + * General Public License is included with this library in the * + + + * file LICENSE.TXT. * + + + * (2) The BSD-style license that is included with this library in * + + + * the file LICENSE-BSD.TXT. * + + + * * + + + * This library is distributed in the hope that it will be useful, * + + + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + + + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + + + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + + + * * + + + *************************************************************************/ + + + + + +#include + + +#include + + +#include + + + + + +#ifdef _MSC_VER + + +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints + + +#endif + + + + + +// select correct drawing functions + + + + + +#ifdef dDOUBLE + + +#define dsDrawBox dsDrawBoxD + + +#define dsDrawSphere dsDrawSphereD + + +#define dsDrawCylinder dsDrawCylinderD + + +#define dsDrawCappedCylinder dsDrawCappedCylinderD + + +#endif + + + + + + + + +// some constants + + + + + +#define NUM 20 // max number of objects + + +#define DENSITY (5.0) // density of all objects + + +#define GPB 3 // maximum number of geometries per body + + + + + + + + +// dynamics and collision objects + + + + + +struct MyObject { + + + dBodyID body; // the body + + + dGeomID geom[GPB]; // geometries representing this body + + +}; + + + + + +static int num=0; // number of objects in simulation + + +static int nextobj=0; // next object to recycle if num==NUM + + +static dWorldID world; + + +static dSpaceID space; + + +static MyObject obj[NUM]; + + +static dJointGroupID contactgroup; + + +static int selected = -1; // selected object + + + + + +static dGeomID* Rays; + + +static int RayCount; + + + + + +// this is called by dSpaceCollide when two objects in space are + + +// potentially colliding. + + + + + +static void nearCallback (void *data, dGeomID o1, dGeomID o2) + + +{ + + + int i; + + + // if (o1->body && o2->body) return; + + + + + + // exit without doing anything if the two bodies are connected by a joint + + + dBodyID b1 = dGeomGetBody(o1); + + + dBodyID b2 = dGeomGetBody(o2); + + + if (b1 && b2 && dAreConnected (b1,b2)) return; + + + + + + dContact contact[32]; // up to 3 contacts per box + + + for (i=0; i<32; i++) { + + + contact[i].surface.mode = dContactBounce; //dContactMu2; + + + contact[i].surface.mu = dInfinity; + + + contact[i].surface.mu2 = 0; + + + contact[i].surface.bounce = 0.5; + + + contact[i].surface.bounce_vel = 0.1; + + + } + + + if (int numc = dCollide (o1,o2,3,&contact[0].geom,sizeof(dContact))) { + + + dMatrix3 RI; + + + dRSetIdentity (RI); + + + const dReal ss[3] = {0.02,0.02,0.02}; + + + for (i=0; i= 'A' && c <= 'Z') return c - ('a'-'A'); + + + else return c; + + +} + + + + + + + + +// called when a key pressed + + + + + +static void command (int cmd) + + +{ + + + int i,j,k; + + + dReal sides[3]; + + + dMass m; + + + + + + cmd = locase (cmd); + + + if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x') { + + + if (num < NUM) { + + + i = num; + + + num++; + + + } + + + else { + + + i = nextobj; + + + nextobj++; + + + if (nextobj >= num) nextobj = 0; + + + + + + // destroy the body and geoms for slot i + + + dBodyDestroy (obj[i].body); + + + for (k=0; k < GPB; k++) { + + + if (obj[i].geom[k]) dGeomDestroy (obj[i].geom[k]); + + + } + + + memset (&obj[i],0,sizeof(obj[i])); + + + } + + + + + + obj[i].body = dBodyCreate (world); + + + for (k=0; k<3; k++) sides[k] = dRandReal()*0.5+0.1; + + + + + + dBodySetPosition (obj[i].body, + + + dRandReal()*2-1,dRandReal()*2-1,dRandReal()+1); + + + dMatrix3 R; + + + dRFromAxisAndAngle (R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, + + + dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); + + + dBodySetRotation (obj[i].body,R); + + + dBodySetData (obj[i].body,(void*) i); + + + + + + if (cmd == 'b') { + + + dMassSetBox (&m,DENSITY,sides[0],sides[1],sides[2]); + + + obj[i].geom[0] = dCreateBox (space,sides[0],sides[1],sides[2]); + + + } + + + else if (cmd == 'c') { + + + sides[0] *= 0.5; + + + dMassSetCappedCylinder (&m,DENSITY,3,sides[0],sides[1]); + + + obj[i].geom[0] = dCreateCCylinder (space,sides[0],sides[1]); + + + } + + + else if (cmd == 's') { + + + sides[0] *= 0.5; + + + dMassSetSphere (&m,DENSITY,sides[0]); + + + obj[i].geom[0] = dCreateSphere (space,sides[0]); + + + } + + + else if (cmd == 'x') { + + + dGeomID g2[GPB]; // encapsulated geometries + + + dReal dpos[GPB][3]; // delta-positions for encapsulated geometries + + + + + + // start accumulating masses for the encapsulated geometries + + + dMass m2; + + + dMassSetZero (&m); + + + + + + // set random delta positions + + + for (j=0; j= num) selected = 0; + + + if (selected < 0) selected = 0; + + + } + + + else if (cmd == 'd' && selected >= 0 && selected < num) { + + + dBodyDisable (obj[selected].body); + + + } + + + else if (cmd == 'e' && selected >= 0 && selected < num) { + + + dBodyEnable (obj[selected].body); + + + } + + +} + + + + + + + + +// draw a geom + + + + + +void drawGeom (dGeomID g, const dReal *pos, const dReal *R) + + +{ + + + if (!g) return; + + + if (!pos) pos = dGeomGetPosition (g); + + + if (!R) R = dGeomGetRotation (g); + + + + + + int type = dGeomGetClass (g); + + + if (type == dBoxClass) { + + + dVector3 sides; + + + dGeomBoxGetLengths (g,sides); + + + dsDrawBox (pos,R,sides); + + + } + + + else if (type == dSphereClass) { + + + dsDrawSphere (pos,R,dGeomSphereGetRadius (g)); + + + } + + + else if (type == dCCylinderClass) { + + + dReal radius,length; + + + dGeomCCylinderGetParams (g,&radius,&length); + + + dsDrawCappedCylinder (pos,R,length,radius); + + + } + + + else if (type == dGeomTransformClass) { + + + dGeomID g2 = dGeomTransformGetGeom (g); + + + const dReal *pos2 = dGeomGetPosition (g2); + + + const dReal *R2 = dGeomGetRotation (g2); + + + dVector3 actual_pos; + + + dMatrix3 actual_R; + + + dMULTIPLY0_331 (actual_pos,R,pos2); + + + actual_pos[0] += pos[0]; + + + actual_pos[1] += pos[1]; + + + actual_pos[2] += pos[2]; + + + dMULTIPLY0_333 (actual_R,R,R2); + + + drawGeom (g2,actual_pos,actual_R); + + + } + + +} + + + + + + + + +// simulation loop + + + + + +static void simLoop (int pause) + + +{ + + + dsSetColor (0,0,2); + + + dSpaceCollide (space,0,&nearCallback); + + + if (!pause) dWorldStep (world,0.05); + + + + + + // remove all contact joints + + + dJointGroupEmpty (contactgroup); + + + + + + dsSetColor (1,1,0); + + + dsSetTexture (DS_WOOD); + + + for (int i=0; i +#include +#include +#include +#include +#include +#include +#include +#include +#include "objects.h" +#include "array.h" +#include "geom_internal.h" + +// given a pointer `p' to a dContactGeom, return the dContactGeom at +// p + skip bytes. + +#define CONTACT(p,skip) ((dContactGeom*) (((char*)p) + (skip))) + + +// ############################################################################ + +int dGeomTransformGroupClass = -1; +// ############################################################################ + +struct dxGeomTransformGroup { + dArray parts; // all the geoms that make up the group + dVector3 relativePosition; + dMatrix3 relativeRotation; +}; +// ############################################################################ + +void dGeomTransformGroupSetRelativePosition (dxGeom *g, dReal x, dReal y, dReal z) +{ + dAASSERT (g); + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(g); + transformGroup->relativePosition[0] = x; + transformGroup->relativePosition[1] = y; + transformGroup->relativePosition[2] = z; +} +// ############################################################################ + +void dGeomTransformGroupSetRelativeRotation (dxGeom *g, const dMatrix3 R) +{ + dAASSERT (g); + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(g); + memcpy (transformGroup->relativeRotation,R,sizeof(dMatrix3)); +} +// ############################################################################ + +const dReal * dGeomTransformGroupGetRelativePosition (dxGeom *g) +{ + dAASSERT (g); + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(g); + return transformGroup->relativePosition; +} +// ############################################################################ + +const dReal * dGeomTransformGroupGetRelativeRotation (dxGeom *g) +{ + dAASSERT (g); + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(g); + return transformGroup->relativeRotation; +} +// ############################################################################ + +static void computeFinalTransformation (const dxGeom *tg, const dxGeom *part) +{ + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(tg); + dMULTIPLY0_331 (part->pos,tg->R,transformGroup->relativePosition); + part->pos[0] += tg->pos[0]; + part->pos[1] += tg->pos[1]; + part->pos[2] += tg->pos[2]; + dMULTIPLY0_333 (part->R,tg->R,transformGroup->relativeRotation); +} +// ############################################################################ + +int dCollideTransformGroup (const dxGeom *o1, const dxGeom *o2, int flags, + dContactGeom *contact, int skip) +{ + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(o1); + if (transformGroup->parts.size() == 0) + { + return 0; + } + int numleft = flags & NUMC_MASK; + if (numleft == 0) numleft = 1; + flags &= ~NUMC_MASK; + int num=0, i=0; + while (i < transformGroup->parts.size() && numleft > 0) + { + dUASSERT (transformGroup->parts[i]->spaceid==0, + "GeomTransformGroup encapsulated object must not be in a space"); + dUASSERT (transformGroup->parts[i]->body==0, + "GeomTransformGroup encapsulated object must not be attached to a body"); + if (!o1->space_aabb) + { + computeFinalTransformation (o1, transformGroup->parts[i]); + } + dxBody *bodyBackup = transformGroup->parts[i]->body; + transformGroup->parts[i]->body = o1->body; + int n = dCollide (transformGroup->parts[i],const_cast(o2), + flags | numleft,contact,skip); + transformGroup->parts[i]->body = bodyBackup; + contact = CONTACT (contact,skip*n); + numleft -= n; + num += n; + i++; + } + return num; +} +// ############################################################################ + +static dColliderFn * dGeomTransformGroupColliderFn (int num) +{ + return (dColliderFn *) &dCollideTransformGroup; +} +// ############################################################################ + +static void dGeomTransformGroupAABB (dxGeom *geom, dReal aabb[6]) +{ + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(geom); + aabb[0] = dInfinity; + aabb[1] = -dInfinity; + aabb[2] = dInfinity; + aabb[3] = -dInfinity; + aabb[4] = dInfinity; + aabb[5] = -dInfinity; + int i,j; + for (i=0; i < transformGroup->parts.size(); i++) + { + computeFinalTransformation (geom, transformGroup->parts[i]); + dReal aabb2[6]; + transformGroup->parts[i]->_class->aabb (transformGroup->parts[i],aabb2); + for (j=0; j<6; j += 2) if (aabb2[j] < aabb[j]) aabb[j] = aabb2[j]; + for (j=1; j<6; j += 2) if (aabb2[j] > aabb[j]) aabb[j] = aabb2[j]; + } +} +// ############################################################################ + +static void dGeomTransformGroupDtor (dxGeom *geom) +{ + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(geom); + transformGroup->parts.~dArray(); +} +// ############################################################################ + +dxGeom *dCreateGeomTransformGroup (dSpaceID space) +{ + if (dGeomTransformGroupClass == -1) { + dGeomClass c; + c.bytes = sizeof (dxGeomTransformGroup); + c.collider = &dGeomTransformGroupColliderFn; + c.aabb = &dGeomTransformGroupAABB; + c.aabb_test = 0; + c.dtor = dGeomTransformGroupDtor; + dGeomTransformGroupClass = dCreateGeomClass (&c); + } + dxGeom *g = dCreateGeom (dGeomTransformGroupClass); + if (space) + { + dSpaceAdd (space,g); + } + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(g); + transformGroup->parts.constructor(); + dSetZero (transformGroup->relativePosition,4); + dRSetIdentity (transformGroup->relativeRotation); + return g; +} +// ############################################################################ + +void dGeomTransformGroupAddGeom (dxGeom *g, dxGeom *obj) +{ + dUASSERT (g && g->_class->num == dGeomTransformGroupClass, + "argument not a geom TransformGroup"); + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(g); + transformGroup->parts.push (obj); +} +// ############################################################################ + +void dGeomTransformGroupRemoveGeom (dxGeom *g, dxGeom *obj) +{ + dUASSERT (g && g->_class->num == dGeomTransformGroupClass, + "argument not a geom TransformGroup"); + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(g); + for (int i=0; i < transformGroup->parts.size(); i++) { + if (transformGroup->parts[i] == obj) { + transformGroup->parts.remove (i); + return; + } + } +} +// ############################################################################ + +dxGeom * dGeomTransformGroupGetGeom (dxGeom *g, int i) +{ + dUASSERT (g && g->_class->num == dGeomTransformGroupClass, + "argument not a geom TransformGroup"); + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(g); + dAASSERT (i >= 0 && i < transformGroup->parts.size()); + return transformGroup->parts[i]; +} +// ############################################################################ + +int dGeomTransformGroupGetNumGeoms (dxGeom *g) +{ + dUASSERT (g && g->_class->num == dGeomTransformGroupClass, + "argument not a geom TransformGroup"); + dxGeomTransformGroup *transformGroup = (dxGeomTransformGroup*) CLASSDATA(g); + return transformGroup->parts.size(); +} diff -Nru ode-0.11.1/contrib/GeomTransformGroup/GeomTransformGroup.h ode-0.14/contrib/GeomTransformGroup/GeomTransformGroup.h --- ode-0.11.1/contrib/GeomTransformGroup/GeomTransformGroup.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/GeomTransformGroup/GeomTransformGroup.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,29 @@ + +/* ************************************************************************ */ +/* + grouped and transformed geometry functions + author: Tim Schmidt tisch@uni-paderborn.de +*/ + + +#ifdef __cplusplus +extern "C" { +#endif + + +extern int dGeomTransformGroupClass; + +void dGeomTransformGroupSetRelativePosition (dGeomID g, dReal x, dReal y, dReal z); +void dGeomTransformGroupSetRelativeRotation (dGeomID g, const dMatrix3 R); +const dReal * dGeomTransformGroupGetRelativePosition (dxGeom *g); +const dReal * dGeomTransformGroupGetRelativeRotation (dxGeom *g); +dGeomID dCreateGeomTransformGroup (dSpaceID space); +void dGeomTransformGroupAddGeom (dGeomID tg, dGeomID obj); +void dGeomTransformGroupRemoveGeom (dGeomID tg, dGeomID obj); +dGeomID dGeomTransformGroupGetGeom (dGeomID tg, int i); +int dGeomTransformGroupGetNumGeoms (dGeomID tg); + + +#ifdef __cplusplus +} +#endif diff -Nru ode-0.11.1/contrib/GeomTransformGroup/README.txt ode-0.14/contrib/GeomTransformGroup/README.txt --- ode-0.11.1/contrib/GeomTransformGroup/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/GeomTransformGroup/README.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,148 @@ +README for GeomTransformGroup by Tim Schmidt. +--------------------------------------------- + +This is a patch to add the dGeomTransformGroup object to the list of geometry +objects. + +It should work with the cvs version of the ode library from 07/24/2002. + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +comment by russ smith: this code is easy to use with the rest of ODE. +simply copy GeomTransformGroup.cpp to ode/src and copy GeomTransformGroup.h +to include/ode. then add GeomTransformGroup.cpp to the ODE_SRC variable +in the makefile. rebuild, and you're done! of course i could have done all +this for you, but i prefer to keep GeomTransformGroup separated from the +rest of ODE for now while other issues with the collision system are +resolved. + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + +Description: + +The dGeomTransformGroup is an adaption of the TransformGroup known from +Java3D (and maybe other libraries with a similar scene graph representation). +It can be used to build an arbitrarily structured tree of objects that are +each positioned relative to the particular parent node. + +If you have a plane for example, there is one root node associated with the +plane's body and another three transformgroups placed 'under' this node. One +with the fuselage (cappedcylinder) under it and two with the underlying wings +(flat boxes). And if you want to add engines, simply put them 'next to' the +wings under another two transformgroups. + +bodyTG ---> associated with dBody + | + +--fuselageTG + | | + | +--fuselageCylinder + | + +--leftwingTG + | | + | +--wingBox + | | + | +--leftengineTG + | | + | +--leftengineCylinder + | + +--rightwingTG + | + +--wingBox + | + +--rightengineTG + | + +--rightengineCylinder + +This is a method to easily compose objects without the necessity of always +calculating global coordinates. But apart from this there is something else +that makes dGeomTransformGroups very valuable. + +Maybe you remember that some users reported the problem of acquiring the +correct bodies to be attached by a contactjoint in the nearCallback when +using dGeomGroups and dGeomTransforms at the same time. This results from the +fact that dGeomGroups are not associated with bodies while all other +geometries are. + +So, as you can see in the nearCallback of the the test_buggy demo you have to +attach the contactjoint with the bodies that you get from the geometries that +are stored in the contact struct (-> dGeomGetBody(contacts[i].geom.g1)). +Normally you would do this by asking o1 and o2 directly with dGeomGetBody(o1) +and dGeomGetBody(o2) respectively. + +As a first approach you can overcome that problem by testing o1 and o2 if +they are groups or not to find out how to get the corresponding bodies. + +However this will fail if you want grouped transforms that are constructed +out of dGeomTransforms encapsulated in a dGeomGroup. According to the test +you use contacts[i].geom.g1 to get the right body. Unfortunately g1 is +encapsulated in a transform and therefore not attached to any body. In this +case the dGeomTransform 'in the middle' would have been the right object to +be asked for the body. + +You may now conclude that it is a good idea to unwrap the group encapsulated +geoms at the beginning of the nearcallback and use dGeomGetBody(o1) +consistently. But keep in mind that this also means not to invoke +dCollide(..) on groups at all and therefore not to expoit the capability of +dGeomGroups to speed up collision detection by the creation of bounding boxes +around the encapsulated geometry. + +Everything becomes even worse if you create a dGeomTransform that contains a +dGeomGroup of geoms. The function that cares about the collision of +transforms with other objects uses the position and rotation of the +respective encapsulated object to compute its final position and orientation. +Unfortunately dGeomGroups do not have a position and rotation, so the result +will not be what you have expected. + +Here the dGeomTransformGroups comes into operation, because it combines the +advantages and capabilities of the dGeomGroup and the dGeomTransform. +And as an effect of synergy it is now even possible to set the position of a +group of geoms with one single command. +Even nested encapsulations of dGeomTransformGroups in dGeomTransformGroups +should be possible (to be honest, I have not tried that so far ;-) ). + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +API: + +dGeomID dCreateGeomTransformGroup (dSpaceID space); + - create a GeomTransformGroup + +void dGeomTransformGroupAddGeom (dGeomID tg, dGeomID obj); + - Comparable to dGeomTransformSetGeom or dGeomGroupAdd + - add objects to this group + +void dGeomTransformGroupRemoveGeom (dGeomID tg, dGeomID obj); + - remove objects from this group + +void dGeomTransformGroupSetRelativePosition + (dGeomID g, dReal x, dReal y, dReal z); +void dGeomTransformGroupSetRelativeRotation + (dGeomID g, const dMatrix3 R); + - Comparable to setting the position and rotation of all the + dGeomTransform encapsulated geometry. The difference + is that it is global with respect to this group and therefore + affects all geoms in this group. + - The relative position and rotation are attributes of the + transformgroup, so the position and rotation of the individual + geoms are not changed + +const dReal * dGeomTransformGroupGetRelativePosition (dGeomID g); +const dReal * dGeomTransformGroupGetRelativeRotation (dGeomID g); + - get the relative position and rotation + +dGeomID dGeomTransformGroupGetGeom (dGeomID tg, int i); + - Comparable to dGeomGroupGetGeom + - get a specific geom of the group + +int dGeomTransformGroupGetNumGeoms (dGeomID tg); + - Comparable to dGeomGroupGetNumGeoms + - get the number of geoms in the group + + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Tim Schmidt +student of computer science +University of Paderborn, Germany +tisch@uni-paderborn.de diff -Nru ode-0.11.1/contrib/InteractiveCollisions/AUTHORS ode-0.14/contrib/InteractiveCollisions/AUTHORS --- ode-0.11.1/contrib/InteractiveCollisions/AUTHORS 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/AUTHORS 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1 @@ +Daniel K. O. diff -Nru ode-0.11.1/contrib/InteractiveCollisions/bootstrap ode-0.14/contrib/InteractiveCollisions/bootstrap --- ode-0.11.1/contrib/InteractiveCollisions/bootstrap 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/bootstrap 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,7 @@ +#!/bin/sh +libtoolize +aclocal +autoconf +autoheader +automake -a +(echo "Running ./bootstrap in dependencies/AntTweakBar" && cd deps/AntTweakBar && ./bootstrap) diff -Nru ode-0.11.1/contrib/InteractiveCollisions/ChangeLog ode-0.14/contrib/InteractiveCollisions/ChangeLog --- ode-0.11.1/contrib/InteractiveCollisions/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/ChangeLog 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1 @@ +2011-11-13 First version. diff -Nru ode-0.11.1/contrib/InteractiveCollisions/configure.ac ode-0.14/contrib/InteractiveCollisions/configure.ac --- ode-0.11.1/contrib/InteractiveCollisions/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/configure.ac 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,49 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.68]) +AC_INIT([interactive-collision], [0.1], [danielosmari@users.sourceforge.net]) +AC_CONFIG_SRCDIR([src/main.cpp]) +AC_CONFIG_HEADERS([config.h]) + +AM_INIT_AUTOMAKE + +LT_INIT + +# Checks for programs. +AC_PROG_CC +AC_PROG_CXX +PKG_PROG_PKG_CONFIG +AC_LANG(C++) + +# Checks for libraries. +PKG_CHECK_MODULES(ODE, ode) +PKG_CHECK_MODULES(OPENGL, gl glu) +PKG_CHECK_MODULES(GLFW, libglfw, [have_glfw=true], [have_glfw=false]) + +AM_CONDITIONAL([GLFW], [test x$have_glfw = xtrue]) +if test x$have_glfw = xtrue +then + AC_DEFINE([USE_GLFW], [1], [define if GLFW is available]) +fi + +# TODO: when I get around implementing other backends... +# PKG_CHECK_MODULES(SDL, sdl, AC_DEFINE(HAVE_SDL)) +# PKG_CHECK_MODULES(GLUT, glut, AC_DEFINE(HAVE_GLUT)) + +# Checks for header files. +AC_CHECK_HEADERS + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. +AC_CHECK_FUNCS([atexit]) +AC_CHECK_FUNCS([sqrt]) +AC_HEADER_STDBOOL + +AC_CONFIG_SUBDIRS([deps/AntTweakBar]) + +AC_CONFIG_FILES([Makefile + deps/Makefile + src/Makefile]) +AC_OUTPUT diff -Nru ode-0.11.1/contrib/InteractiveCollisions/COPYING ode-0.14/contrib/InteractiveCollisions/COPYING --- ode-0.11.1/contrib/InteractiveCollisions/COPYING 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/COPYING 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/AntTweakBar_Doc.url ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/AntTweakBar_Doc.url --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/AntTweakBar_Doc.url 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/AntTweakBar_Doc.url 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,3 @@ +[InternetShortcut] +URL=http://www.antisphere.com/Wiki/tools:anttweakbar +Modified=C043A0DCA0FFC801E7 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/bootstrap ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/bootstrap --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/bootstrap 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/bootstrap 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/sh +libtoolize +aclocal +autoconf +automake -a + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/ChangeLog.txt ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/ChangeLog.txt --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/ChangeLog.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/ChangeLog.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,178 @@ +--- AntTweakBar library release notes --- + +* Version 1.14 (2011/03/26) + - Added 64 bit version of the library. + - Added multiple windows support (Inspired by comments and code from Evan F. + and Ivo H.) + - Better MacOSX support (Thanks to Alexis DH., Fabrice N., Diederick H., + Alec J.). + - Improved readability of overlapped transparent bars. Content of overlapped + regions is clipped and not drawn. This behavior can be disabled using + the bar parameter "overlap". + - Added support for Direct3D11. + - Added support for SDL 1.3 integration in addition to SDL 1.2. + ABI modification: TwEventSDL takes SDL version as an additional parameter. + - Added support for SFML 1.6 integration. + - Added support for GLFW 2.7 integration in addition to GLFW 2.6. This may + imply changing the calling convention of event callbacks. Can be done by + defining GLFW_CDECL before including AntTweakBar.h if needed. + - Added function TwKeyTest that checks if a key event would be processed by + AntTweakBar but without processing it. Needed to fix bad handling report of + WM_KEYUP and WM_KEYDOWN in TwEventWin (Thanks to Ryan DB. for reporting it). + - Added check sign for vars of type boolean. + - Added new bar parameter "buttonalign" to center or left-align buttons + (Suggested by Michael R.). + - Allowed values column width to be adjusted to fit its content. This is done + by setting the bar parameter valueswidth=fit (Requested by Koshmaar and + Michael R.). The user can also click in the left or right area near the + value width slider to fit column content. + - Added new helper function TwDefineEnumFromString to ease the defining of an + enum through a string of comma-separated enum values (Thanks to Bruno L. + for the suggestion and code). + - Fixed compilation issues with gcc4 (missing includes, warnings). + - Fixes for the fedora package maintained by Sean Middleditch. + - Fixed rotation widget display and interaction issues when the library is + compiled with gcc -O3 (Thanks to Ares L. for reporting this). + - Fixed SDL key event SDLK_RETURN handling after a bar is minimized (Thanks + to Sean M. for reporting this). + - Fixed issue with SDL_ShowCursor (Thanks to Hugues M. for reporting it). + - Fixed DirectX10 resource issue. + - Store and restore GL_TEXTURE_COORD_ARRAY state (Thanks to Jerry J. for + reporting this). + - Fixed mouse click repetition issue with passive event loop (Thanks to + Bruno L. for reporting it). + - Fixed issue with mouse button event when glut windows doesn't have focus + (Thanks to Scott J. for the fix). + - Reset enum content each time the var parameter "enum" is set using TwDefine + or TwSetParam (Following Carsten W. and Sulaiman remarks). + - Fixed memory corruption when more than one std_string are defined in a + custom struct (Thanks to Sulaiman for reporting it). + - Fixed mouse position issue with Direct3D9 fullscreen mode in TwSimpleDX9 + (Thanks to Paolo S. for pointing this out). + - Fixed ignored double-click in TwEvenWin (Thanks to H. Seungho for this). + +* Version 1.13 (2009/04/19) + - Now compiles on Mac OSX (Many thanks to Evan F. for rewritting the OS + specific code, and to Tyler S. and Konstantin L. for their feedback). + - Added functions TwGetBarCount, TwGetBarByIndex, TwGetBarByName, + TwRefreshBar. + - Fixed bug related to var of type TW_TYPE_STDSTRING on Windows: Microsoft + implementation of std::string does not have the same size in Debug and + Release mode (hidden member added for debugging), which caused a crash when + mixing the Release version of AntTweakBar with a program compiled in Debug + mode (Thanks to Minh D. for reporting it). + - Added function TwGetParam and TwSetParam to allow access to the parameters + defining the behavior of bars and variables. + - Changed the bar/var parameters without value (like "show"/"hide") to + parameters with value ("visible=true or false") to be compatible with the + new TwGetParam and TwSetParam functions (the old syntax is still kept + for backward compatibility). + - Arrow keys and Return key can now be used to navigate and tweak values. + - Bars can now be moved partly outside of the window. They can still be + constrained to be fully contained in the window by setting the parameter + "contained=true". + - Added another way to move a bar by pressing mouse middle button in the bar. + +* Version 1.12 (2008/09/27) + - Added new var types TW_TYPE_QUAT* and TW_TYPE_DIR* allowing for the + interactive tweaking of rotations (through quaternions) and 3D vectors + (directions). + - Better management of transparent tweak bars. New bar parameters added: + alpha=n text=dark/light. + - Default color scheme changed (now transparent by default). To reactivate the + previous scheme, call TwDefine("GLOBAL colorscheme=0") before creating bars. + - Added paramters to manage the bar behavior: resizable, movable, iconifiable, + fontresizable, alwaystop, alwaysbottom, visible, iconified (following + Jeppe F. B. feedback). + - Added functions TwSetBottomBar and TwGetBottomBar. + - The library can now be recompiled without requiring to install GLUT, GLFW + and SDL. + - New var parameters arrow, arrowcolor, axisx, axusy, axisz and showval added + for quaternion and direction types. + - Msvc specific keyword removed from PrefTimer (thanks to Tim J. for pointing + this out). + - Fixed bug related to popup behavior when the help bar is visible. + - GL_TEXTURE_RECTANGLE_ARB/EXT state is now saved and restored by TwDraw + (thanks to Cyril C. for suggesting this). + - glBlendFunc and glBlendEquationEXT are now saved and restored by TwDraw + (thanks to Sebastion B. for reporting the problem). + - Fixed bug related cursor visibility state with SDL (Thanks to Jeppe F. B. + for reporting it). + +* Version 1.11 (2007/12/10) + - Now DirectX10 is also supported in addition to OpenGL and DirectX9. + Initialization of AntTweakBar with DX10: TwInit(TW_DIRECT3D10, d3d10Device). + - A new example that uses DirectX10 has been added: see TwSimpleDX10 in the + examples directory. + - Recap for string variables added to the doc. See + http://www.antisphere.com/Wiki/tools:anttweakbar:varstring + - An example that illustrates the use of the different types of string + variables has been added. See TwString in the examples directory. + - Added some code for multi-thread safety (thanks to Daniel 'DrUiD' B. for + the tip). + - Cleanup of the Help bar. Now only variables having help are displayed in + the Help bar. + - Function TwHandleErrors documented. + - Separators don't require a name anymore. + - Var parameter 'order' becomes 'colororder', and its values become 'rgba' and + 'argb' (order=ogl and order=dx still exist but are deprecated). + - A small icon added for variables of type bool. + - Function TwCopyCDStringToLibrary added. + - The keyword 'GLOBAL' has been added for TwDefine commands that don't apply + to a specific tweak bar (suggested by Koshmaar). + - TwEventWin32 becomes TwEventWin (a #define has been added to keep + compatibility with previous applications). + - TwWindowSize(0,0) now releases graphics resources allocated by AntTweakBar + (may be useful for Direct3D applications, before resizing for instance). + - A wrong assert removed from TwMgr.cpp (thanks to Chris W. for reporting it). + - Some slight cosmetic changes (again). + +* Version 1.10 (2007/08/31) + - Variable values can now also be entered and edited via keyboard input + (implementation based on modifications made by Laury M., thank you Laury). + - Variables of type string are now handled: 3 types of string added + TW_TYPE_CSSTRING, TW_TYPE_CDSTRING and TW_STDSTRING. + - Text selection and copy/paste added. + - Position of bar icons is modifiable (cf. TwBar paramters iconPos, iconAlign + and iconMargin). + - Separators can be added in a bar (TwAddSeparator). + - OpenGL: states related to 3D textures and multitexturing are now saved and + restored by TwDraw (thanks to Dylan D. for pointing this out). + - Selected element of a listbox now highlighted. + - ReadOnly and ReadWrite behavior of buttons revisited. + - Documentation improved (examples for TwType, new functions documented,...). + - Some slight cosmetic changes. + +* Version 1.05 (2007/03/01) + - Listbox and rotoslider buttons added. + - Icon resources (AntTweakBar.rc) no more required for static linkage (thanks + to Joe C. for pointing this out). + - Fixed a rotoslider precision problem when mouse button is released. + +* Version 1.04 (2006/12/16) + - OpenGL: Vertex buffer object state and Vertex/fragment program and object + states are now reset and restored by TwDraw (thanks to Dylan D. and Siva K. + for pointing this out). + - Fixed problem that occurs when an initialized variable of type float/double + is displayed. + +* Version 1.03 (2006/10/28) + - Medium font antialiased. + - Now also compiles on 64 bits x86 platform (thanks to Herling G. for this). + - Slight changes to avoid visual 8 secure crt warnings. + - Corrected behaviour if min/max values are not defined. + - Modif to avoid looping to max value when reaching zero with unsigned types. + - Min/max/step parameters for type TW_TYPE_CHAR now read ascii codes (not + characters). + - Added FPU precision control (because DirectX changes it). + - Fixed problem that occurs when the lib is initialized/uninitialized more + than once (thanks Lukasz P. for reporting it). + - Distribution follows Savannah's recommendations. + +* Version 1.02 (2006/09/27) + - Library sources released. + +* Version 1.01 (2006/09/14) + - First official release. + + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/configure.ac ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/configure.ac --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/configure.ac 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,41 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.68]) +AC_INIT([AntTweakBar], [1.14]) +AC_CONFIG_SRCDIR([include/AntTweakBar.h]) + +AM_INIT_AUTOMAKE(foreign) + +LT_INIT + +# Checks for programs. +AC_PROG_CXX +AC_PROG_AWK +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +PKG_PROG_PKG_CONFIG + +# Checks for libraries. +PKG_CHECK_MODULES(OPENGL, gl glu) + +# Checks for header files. +AC_CHECK_HEADERS([malloc.h memory.h stddef.h sys/time.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_INT64_T +AC_TYPE_SIZE_T +AC_CHECK_TYPES([ptrdiff_t]) + +# Checks for library functions. +AC_CHECK_FUNCS([gettimeofday memset sqrt strstr]) + +AC_CONFIG_FILES([Makefile + include/Makefile + src/Makefile]) +AC_OUTPUT diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/include/AntTweakBar.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/include/AntTweakBar.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/include/AntTweakBar.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/include/AntTweakBar.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,370 @@ +// ---------------------------------------------------------------------------- +// +// @file AntTweakBar.h +// +// @brief AntTweakBar is a light and intuitive graphical user interface +// that can be readily integrated into OpenGL and DirectX +// applications in order to interactively tweak parameters. +// +// @author Philippe Decaudin - http://www.antisphere.com +// +// @doc http://www.antisphere.com/Wiki/tools:anttweakbar +// +// @license This file is part of the AntTweakBar library. +// AntTweakBar is a free software released under the zlib license. +// For conditions of distribution and use, see License.txt +// +// ---------------------------------------------------------------------------- + + +#if !defined TW_INCLUDED +#define TW_INCLUDED + +#include + +#define TW_VERSION 114 // Version Mmm : M=Major mm=minor (e.g., 102 is version 1.02) + + +#ifdef __cplusplus +# if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable: 4995 4530) +# include +# pragma warning(pop) +# else +# include +# endif + extern "C" { +#endif // __cplusplus + + +// ---------------------------------------------------------------------------- +// OS specific definitions +// ---------------------------------------------------------------------------- + +#if defined(_WIN32) || defined(_WIN64) +# define TW_CALL __stdcall +# define TW_CDECL_CALL __cdecl +# define TW_EXPORT_API __declspec(dllexport) +# define TW_IMPORT_API __declspec(dllimport) +#else +# define TW_CALL +# define TW_CDECL_CALL +# define TW_EXPORT_API +# define TW_IMPORT_API +#endif + +#if defined TW_EXPORTS +# define TW_API TW_EXPORT_API +#elif defined TW_STATIC +# define TW_API +# if defined(_MSC_VER) && !defined(TW_NO_LIB_PRAGMA) +# ifdef _WIN64 +# pragma comment(lib, "AntTweakBarStatic64") +# else +# pragma comment(lib, "AntTweakBarStatic") +# endif +# endif +#else +# define TW_API TW_IMPORT_API +# if defined(_MSC_VER) && !defined(TW_NO_LIB_PRAGMA) +# ifdef _WIN64 +# pragma comment(lib, "AntTweakBar64") +# else +# pragma comment(lib, "AntTweakBar") +# endif +# endif +#endif + + +// ---------------------------------------------------------------------------- +// Bar functions and definitions +// ---------------------------------------------------------------------------- + +typedef struct CTwBar TwBar; // structure CTwBar is not exposed. + +TW_API TwBar * TW_CALL TwNewBar(const char *barName); +TW_API int TW_CALL TwDeleteBar(TwBar *bar); +TW_API int TW_CALL TwDeleteAllBars(); +TW_API int TW_CALL TwSetTopBar(const TwBar *bar); +TW_API TwBar * TW_CALL TwGetTopBar(); +TW_API int TW_CALL TwSetBottomBar(const TwBar *bar); +TW_API TwBar * TW_CALL TwGetBottomBar(); +TW_API const char * TW_CALL TwGetBarName(TwBar *bar); +TW_API int TW_CALL TwGetBarCount(); +TW_API TwBar * TW_CALL TwGetBarByIndex(int barIndex); +TW_API TwBar * TW_CALL TwGetBarByName(const char *barName); +TW_API int TW_CALL TwRefreshBar(TwBar *bar); + + +// ---------------------------------------------------------------------------- +// Var functions and definitions +// ---------------------------------------------------------------------------- + +typedef enum ETwType +{ + TW_TYPE_UNDEF = 0, +#ifdef __cplusplus + TW_TYPE_BOOLCPP = 1, +#endif // __cplusplus + TW_TYPE_BOOL8 = 2, + TW_TYPE_BOOL16, + TW_TYPE_BOOL32, + TW_TYPE_CHAR, + TW_TYPE_INT8, + TW_TYPE_UINT8, + TW_TYPE_INT16, + TW_TYPE_UINT16, + TW_TYPE_INT32, + TW_TYPE_UINT32, + TW_TYPE_FLOAT, + TW_TYPE_DOUBLE, + TW_TYPE_COLOR32, // 32 bits color. Order is RGBA if API is OpenGL or Direct3D10, and inversed if API is Direct3D9 (can be modified by defining 'colorOrder=...', see doc) + TW_TYPE_COLOR3F, // 3 floats color. Order is RGB. + TW_TYPE_COLOR4F, // 4 floats color. Order is RGBA. + TW_TYPE_CDSTRING, // Null-terminated C Dynamic String (pointer to an array of char dynamically allocated with malloc/realloc/strdup) +#ifdef __cplusplus + TW_TYPE_STDSTRING = (0x2fff0000+sizeof(std::string)), // C++ STL string (std::string) +#endif // __cplusplus + TW_TYPE_QUAT4F = TW_TYPE_CDSTRING+2, // 4 floats encoding a quaternion {qx,qy,qz,qs} + TW_TYPE_QUAT4D, // 4 doubles encoding a quaternion {qx,qy,qz,qs} + TW_TYPE_DIR3F, // direction vector represented by 3 floats + TW_TYPE_DIR3D // direction vector represented by 3 doubles +} TwType; +#define TW_TYPE_CSSTRING(n) ((TwType)(0x30000000+((n)&0xfffffff))) // Null-terminated C Static String of size n (defined as char[n], with n<2^28) + +typedef void (TW_CALL * TwSetVarCallback)(const void *value, void *clientData); +typedef void (TW_CALL * TwGetVarCallback)(void *value, void *clientData); +typedef void (TW_CALL * TwButtonCallback)(void *clientData); + +TW_API int TW_CALL TwAddVarRW(TwBar *bar, const char *name, TwType type, void *var, const char *def); +TW_API int TW_CALL TwAddVarRO(TwBar *bar, const char *name, TwType type, const void *var, const char *def); +TW_API int TW_CALL TwAddVarCB(TwBar *bar, const char *name, TwType type, TwSetVarCallback setCallback, TwGetVarCallback getCallback, void *clientData, const char *def); +TW_API int TW_CALL TwAddButton(TwBar *bar, const char *name, TwButtonCallback callback, void *clientData, const char *def); +TW_API int TW_CALL TwAddSeparator(TwBar *bar, const char *name, const char *def); +TW_API int TW_CALL TwRemoveVar(TwBar *bar, const char *name); +TW_API int TW_CALL TwRemoveAllVars(TwBar *bar); + +typedef struct CTwEnumVal +{ + int Value; + const char * Label; +} TwEnumVal; +typedef struct CTwStructMember +{ + const char * Name; + TwType Type; + size_t Offset; + const char * DefString; +} TwStructMember; +typedef void (TW_CALL * TwSummaryCallback)(char *summaryString, size_t summaryMaxLength, const void *value, void *clientData); + +TW_API int TW_CALL TwDefine(const char *def); +TW_API TwType TW_CALL TwDefineEnum(const char *name, const TwEnumVal *enumValues, unsigned int nbValues); +TW_API TwType TW_CALL TwDefineEnumFromString(const char *name, const char *enumString); +TW_API TwType TW_CALL TwDefineStruct(const char *name, const TwStructMember *structMembers, unsigned int nbMembers, size_t structSize, TwSummaryCallback summaryCallback, void *summaryClientData); + +typedef void (TW_CALL * TwCopyCDStringToClient)(char **destinationClientStringPtr, const char *sourceString); +TW_API void TW_CALL TwCopyCDStringToClientFunc(TwCopyCDStringToClient copyCDStringFunc); +TW_API void TW_CALL TwCopyCDStringToLibrary(char **destinationLibraryStringPtr, const char *sourceClientString); +#ifdef __cplusplus +typedef void (TW_CALL * TwCopyStdStringToClient)(std::string& destinationClientString, const std::string& sourceString); +TW_API void TW_CALL TwCopyStdStringToClientFunc(TwCopyStdStringToClient copyStdStringToClientFunc); +TW_API void TW_CALL TwCopyStdStringToLibrary(std::string& destinationLibraryString, const std::string& sourceClientString); +#endif // __cplusplus + +typedef enum ETwParamValueType +{ + TW_PARAM_INT32, + TW_PARAM_FLOAT, + TW_PARAM_DOUBLE, + TW_PARAM_CSTRING // Null-terminated array of char (ie, c-string) +} TwParamValueType; +TW_API int TW_CALL TwGetParam(TwBar *bar, const char *varName, const char *paramName, TwParamValueType paramValueType, unsigned int outValueMaxCount, void *outValues); +TW_API int TW_CALL TwSetParam(TwBar *bar, const char *varName, const char *paramName, TwParamValueType paramValueType, unsigned int inValueCount, const void *inValues); + + +// ---------------------------------------------------------------------------- +// Management functions and definitions +// ---------------------------------------------------------------------------- + +typedef enum ETwGraphAPI +{ + TW_OPENGL = 1, + TW_DIRECT3D9 = 2, + TW_DIRECT3D10 = 3, + TW_DIRECT3D11 = 4 +} TwGraphAPI; + +TW_API int TW_CALL TwInit(TwGraphAPI graphAPI, void *device); +TW_API int TW_CALL TwTerminate(); + +TW_API int TW_CALL TwDraw(); +TW_API int TW_CALL TwWindowSize(int width, int height); + +TW_API int TW_CALL TwSetCurrentWindow(int windowID); // multi-windows support +TW_API int TW_CALL TwGetCurrentWindow(); +TW_API int TW_CALL TwWindowExists(int windowID); + +typedef enum ETwKeyModifier +{ + TW_KMOD_NONE = 0x0000, // same codes as SDL keysym.mod + TW_KMOD_SHIFT = 0x0003, + TW_KMOD_CTRL = 0x00c0, + TW_KMOD_ALT = 0x0100, + TW_KMOD_META = 0x0c00 +} TwKeyModifier; +typedef enum EKeySpecial +{ + TW_KEY_BACKSPACE = '\b', + TW_KEY_TAB = '\t', + TW_KEY_CLEAR = 0x0c, + TW_KEY_RETURN = '\r', + TW_KEY_PAUSE = 0x13, + TW_KEY_ESCAPE = 0x1b, + TW_KEY_SPACE = ' ', + TW_KEY_DELETE = 0x7f, + TW_KEY_UP = 273, // same codes and order as SDL 1.2 keysym.sym + TW_KEY_DOWN, + TW_KEY_RIGHT, + TW_KEY_LEFT, + TW_KEY_INSERT, + TW_KEY_HOME, + TW_KEY_END, + TW_KEY_PAGE_UP, + TW_KEY_PAGE_DOWN, + TW_KEY_F1, + TW_KEY_F2, + TW_KEY_F3, + TW_KEY_F4, + TW_KEY_F5, + TW_KEY_F6, + TW_KEY_F7, + TW_KEY_F8, + TW_KEY_F9, + TW_KEY_F10, + TW_KEY_F11, + TW_KEY_F12, + TW_KEY_F13, + TW_KEY_F14, + TW_KEY_F15, + TW_KEY_LAST +} TwKeySpecial; + +TW_API int TW_CALL TwKeyPressed(int key, int modifiers); +TW_API int TW_CALL TwKeyTest(int key, int modifiers); + +typedef enum ETwMouseAction +{ + TW_MOUSE_RELEASED, + TW_MOUSE_PRESSED +} TwMouseAction; +typedef enum ETwMouseButtonID +{ + TW_MOUSE_LEFT = 1, // same code as SDL_BUTTON_LEFT + TW_MOUSE_MIDDLE = 2, // same code as SDL_BUTTON_MIDDLE + TW_MOUSE_RIGHT = 3 // same code as SDL_BUTTON_RIGHT +} TwMouseButtonID; + +TW_API int TW_CALL TwMouseButton(TwMouseAction action, TwMouseButtonID button); +TW_API int TW_CALL TwMouseMotion(int mouseX, int mouseY); +TW_API int TW_CALL TwMouseWheel(int pos); + +TW_API const char * TW_CALL TwGetLastError(); +typedef void (TW_CALL * TwErrorHandler)(const char *errorMessage); +TW_API void TW_CALL TwHandleErrors(TwErrorHandler errorHandler); + + +// ---------------------------------------------------------------------------- +// Helper functions to translate events from some common window management +// frameworks to AntTweakBar. +// They call TwKeyPressed, TwMouse* and TwWindowSize for you (implemented in +// files TwEventWin.c TwEventSDL*.c TwEventGLFW.c TwEventGLUT.c) +// ---------------------------------------------------------------------------- + +// For Windows message proc +#ifndef _W64 // Microsoft specific (detection of 64 bits portability issues) +# define _W64 +#endif // _W64 +#ifdef _WIN64 + TW_API int TW_CALL TwEventWin(void *wnd, unsigned int msg, unsigned __int64 _W64 wParam, __int64 _W64 lParam); +#else + TW_API int TW_CALL TwEventWin(void *wnd, unsigned int msg, unsigned int _W64 wParam, int _W64 lParam); +#endif +#define TwEventWin32 TwEventWin // For compatibility with AntTweakBar versions prior to 1.11 + +// For libSDL event loop +TW_API int TW_CALL TwEventSDL(const void *sdlEvent, unsigned char sdlMajorVersion, unsigned char sdlMinorVersion); + +// For GLFW event callbacks +// Define GLFW_CDECL before including AntTweakBar.h if your version of GLFW uses cdecl calling convensions +#ifdef GLFW_CDECL + TW_API int TW_CDECL_CALL TwEventMouseButtonGLFWcdecl(int glfwButton, int glfwAction); + TW_API int TW_CDECL_CALL TwEventKeyGLFWcdecl(int glfwKey, int glfwAction); + TW_API int TW_CDECL_CALL TwEventCharGLFWcdecl(int glfwChar, int glfwAction); + TW_API int TW_CDECL_CALL TwEventMousePosGLFWcdecl(int mouseX, int mouseY); + TW_API int TW_CDECL_CALL TwEventMouseWheelGLFWcdecl(int wheelPos); +# define TwEventMouseButtonGLFW TwEventMouseButtonGLFWcdecl +# define TwEventKeyGLFW TwEventKeyGLFWcdecl +# define TwEventCharGLFW TwEventCharGLFWcdecl +# define TwEventMousePosGLFW TwEventMousePosGLFWcdecl +# define TwEventMouseWheelGLFW TwEventMouseWheelGLFWcdecl +#else + TW_API int TW_CALL TwEventMouseButtonGLFW(int glfwButton, int glfwAction); + TW_API int TW_CALL TwEventKeyGLFW(int glfwKey, int glfwAction); + TW_API int TW_CALL TwEventCharGLFW(int glfwChar, int glfwAction); +# define TwEventMousePosGLFW TwMouseMotion +# define TwEventMouseWheelGLFW TwMouseWheel +#endif + +// For GLUT event callbacks (Windows calling convention for GLUT callbacks is cdecl) +#if defined(_WIN32) || defined(_WIN64) +# define TW_GLUT_CALL TW_CDECL_CALL +#else +# define TW_GLUT_CALL +#endif +TW_API int TW_GLUT_CALL TwEventMouseButtonGLUT(int glutButton, int glutState, int mouseX, int mouseY); +TW_API int TW_GLUT_CALL TwEventMouseMotionGLUT(int mouseX, int mouseY); +TW_API int TW_GLUT_CALL TwEventKeyboardGLUT(unsigned char glutKey, int mouseX, int mouseY); +TW_API int TW_GLUT_CALL TwEventSpecialGLUT(int glutKey, int mouseX, int mouseY); +TW_API int TW_CALL TwGLUTModifiersFunc(int (TW_CALL *glutGetModifiersFunc)(void)); +typedef void (TW_GLUT_CALL *GLUTmousebuttonfun)(int glutButton, int glutState, int mouseX, int mouseY); +typedef void (TW_GLUT_CALL *GLUTmousemotionfun)(int mouseX, int mouseY); +typedef void (TW_GLUT_CALL *GLUTkeyboardfun)(unsigned char glutKey, int mouseX, int mouseY); +typedef void (TW_GLUT_CALL *GLUTspecialfun)(int glutKey, int mouseX, int mouseY); + +// For SFML event loop +TW_API int TW_CALL TwEventSFML(const void *sfmlEvent, unsigned char sfmlMajorVersion, unsigned char sfmlMinorVersion); + + +// ---------------------------------------------------------------------------- +// Make sure the types have the right sizes +// ---------------------------------------------------------------------------- + +#define TW_COMPILE_TIME_ASSERT(name, x) typedef int TW_DUMMY_ ## name[(x) * 2 - 1] + +TW_COMPILE_TIME_ASSERT(TW_CHAR, sizeof(char) == 1); +TW_COMPILE_TIME_ASSERT(TW_SHORT, sizeof(short) == 2); +TW_COMPILE_TIME_ASSERT(TW_INT, sizeof(int) == 4); +TW_COMPILE_TIME_ASSERT(TW_FLOAT, sizeof(float) == 4); +TW_COMPILE_TIME_ASSERT(TW_DOUBLE, sizeof(double) == 8); + +// Check pointer size on Windows +#if !defined(_WIN64) && defined(_WIN32) + // If the following assert failed, the platform is not 32-bit and _WIN64 is not defined. + // When targetting 64-bit Windows platform, _WIN64 must be defined. + TW_COMPILE_TIME_ASSERT(TW_PTR32, sizeof(void*) == 4); +#elif defined(_WIN64) + // If the following assert failed, _WIN64 is defined but the targeted platform is not 64-bit. + TW_COMPILE_TIME_ASSERT(TW_PTR64, sizeof(void*) == 8); +#endif + +// --------------------------------------------------------------------------- + + +#ifdef __cplusplus + } // extern "C" +#endif // __cplusplus + + +#endif // !defined TW_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/include/Makefile.am ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/include/Makefile.am --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/include/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/include/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,2 @@ +noinst_HEADERS = AntTweakBar.h + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/License.txt ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/License.txt --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/License.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/License.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,24 @@ +--- AntTweakBar license --- + +Copyright (C) 2005-2011 Philippe Decaudin + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the +use of this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim +that you wrote the original software. If you use this software in a product, +an acknowledgment in the product documentation would be appreciated but is not +required. + +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. + + +http://www.antisphere.com diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/Makefile.am ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/Makefile.am --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,4 @@ +AUTOMAKE_OPTIONS = foreign + +SUBDIRS = include src + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/Readme.txt ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/Readme.txt --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/Readme.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/Readme.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,15 @@ +--- AntTweakBar development library --- + + +AntTweakBar is a small and easy-to-use C/C++ library that allows programmers +to quickly add a light and intuitive GUI into OpenGL and DirectX based +graphic programs to interactively tweak parameters. + +This package includes the development version of the AntTweakBar library +for Windows, GNU/Linux and OSX, and some program examples (sources + binaries). + +For installation and documentation please refer to: +http://www.antisphere.com/Wiki/tools:anttweakbar + + +Philippe Decaudin - http://www.antisphere.com diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/AntPerfTimer.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/AntPerfTimer.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/AntPerfTimer.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/AntPerfTimer.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,56 @@ +// --------------------------------------------------------------------------- +// +// @file AntPerfTimer.h +// @brief A performance (precision) timer for benchs +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: No cpp file is needed, everything is defined in this header +// +// --------------------------------------------------------------------------- + +#if !defined ANT_PERF_TIMER_INCLUDED +#define ANT_PERF_TIMER_INCLUDED + +#ifndef __cplusplus +# error This is a C++ header +#endif // __cplusplus + + +#if defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64) + + #include + #include + + struct PerfTimer + { + inline PerfTimer() { if( !QueryPerformanceFrequency(&Freq) ) MessageBox(NULL, _T("Precision timer not supported"), _T("Problem"), MB_ICONEXCLAMATION); Reset(); } + inline void Reset() { QueryPerformanceCounter(&Start); } + inline double GetTime() { if( QueryPerformanceCounter(&End) ) return ((double)End.QuadPart - (double)Start.QuadPart)/((double)Freq.QuadPart); else return 0; } + protected: + LARGE_INTEGER Start, End, Freq; + }; + +#else // !_WIN (-> LINUX) + + #include + #include + + struct PerfTimer + { + inline PerfTimer() { Reset(); } + inline void Reset() { gettimeofday(&Start, &TZ); } + inline double GetTime() { gettimeofday(&End,&TZ); + double t1 = (double)Start.tv_sec + (double)Start.tv_usec/(1000*1000); + double t2 = (double)End.tv_sec + (double)End.tv_usec/(1000*1000); + return t2-t1; } + protected: + struct timeval Start, End; + struct timezone TZ; + }; + +#endif // _WIN + + +#endif // ANT_PERF_TIMER_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/d3d10vs2003.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/d3d10vs2003.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/d3d10vs2003.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/d3d10vs2003.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,46 @@ +// Workaround to include D3D10.h with VS2003 +#ifndef __out +#define __out +#endif +#ifndef __in +#define __in +#endif +#ifndef __inout +#define __inout +#endif +#ifndef __in_opt +#define __in_opt +#endif +#ifndef __out_opt +#define __out_opt +#endif +#ifndef __inout_opt +#define __inout_opt +#endif +#ifndef __in_ecount +#define __in_ecount(x) +#endif +#ifndef __in_ecount_opt +#define __in_ecount_opt(x) +#endif +#ifndef __out_ecount +#define __out_ecount(x) +#endif +#ifndef __out_ecount_opt +#define __out_ecount_opt(x) +#endif +#ifndef __inout_ecount +#define __inout_ecount(x) +#endif +#ifndef __inout_ecount_opt +#define __inout_ecount_opt(x) +#endif +#ifndef __in_bcount_opt +#define __in_bcount_opt(x) +#endif +#ifndef __out_bcount_opt +#define __out_bcount_opt(x) +#endif +#ifndef __inout_bcount_opt +#define __inout_bcount_opt(x) +#endif diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGLCore.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGLCore.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGLCore.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGLCore.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,489 @@ +// --------------------------------------------------------------------------- +// +// @file LoadOGLCore.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include "LoadOGLCore.h" + +// --------------------------------------------------------------------------- + +#define ANT_NB_OGL_CORE_FUNC_MAX 512 + +struct COGLCoreFuncRec +{ + const char * m_Name; + GLCore::PFNOpenGL * m_FuncPtr; + COGLCoreFuncRec() : m_Name(NULL), m_FuncPtr(NULL) {} +}; +COGLCoreFuncRec g_OGLCoreFuncRec[ANT_NB_OGL_CORE_FUNC_MAX]; +int g_NbOGLCoreFunc = 0; +#if defined(ANT_WINDOWS) +HMODULE g_OGLCoreModule = NULL; +#endif + +// --------------------------------------------------------------------------- + +// GL 1.0 +ANT_GL_CORE_IMPL(glCullFace) +ANT_GL_CORE_IMPL(glFrontFace) +ANT_GL_CORE_IMPL(glHint) +ANT_GL_CORE_IMPL(glLineWidth) +ANT_GL_CORE_IMPL(glPointSize) +ANT_GL_CORE_IMPL(glPolygonMode) +ANT_GL_CORE_IMPL(glScissor) +ANT_GL_CORE_IMPL(glTexParameterf) +ANT_GL_CORE_IMPL(glTexParameterfv) +ANT_GL_CORE_IMPL(glTexParameteri) +ANT_GL_CORE_IMPL(glTexParameteriv) +ANT_GL_CORE_IMPL(glTexImage1D) +ANT_GL_CORE_IMPL(glTexImage2D) +ANT_GL_CORE_IMPL(glDrawBuffer) +ANT_GL_CORE_IMPL(glClear) +ANT_GL_CORE_IMPL(glClearColor) +ANT_GL_CORE_IMPL(glClearStencil) +ANT_GL_CORE_IMPL(glClearDepth) +ANT_GL_CORE_IMPL(glStencilMask) +ANT_GL_CORE_IMPL(glColorMask) +ANT_GL_CORE_IMPL(glDepthMask) +ANT_GL_CORE_IMPL(glDisable) +ANT_GL_CORE_IMPL(glEnable) +ANT_GL_CORE_IMPL(glFinish) +ANT_GL_CORE_IMPL(glFlush) +ANT_GL_CORE_IMPL(glBlendFunc) +ANT_GL_CORE_IMPL(glLogicOp) +ANT_GL_CORE_IMPL(glStencilFunc) +ANT_GL_CORE_IMPL(glStencilOp) +ANT_GL_CORE_IMPL(glDepthFunc) +ANT_GL_CORE_IMPL(glPixelStoref) +ANT_GL_CORE_IMPL(glPixelStorei) +ANT_GL_CORE_IMPL(glReadBuffer) +ANT_GL_CORE_IMPL(glReadPixels) +ANT_GL_CORE_IMPL(glGetBooleanv) +ANT_GL_CORE_IMPL(glGetDoublev) +ANT_GL_CORE_IMPL(glGetError) +ANT_GL_CORE_IMPL(glGetFloatv) +ANT_GL_CORE_IMPL(glGetIntegerv) +ANT_GL_CORE_IMPL(glGetString) +ANT_GL_CORE_IMPL(glGetTexImage) +ANT_GL_CORE_IMPL(glGetTexParameterfv) +ANT_GL_CORE_IMPL(glGetTexParameteriv) +ANT_GL_CORE_IMPL(glGetTexLevelParameterfv) +ANT_GL_CORE_IMPL(glGetTexLevelParameteriv) +ANT_GL_CORE_IMPL(glIsEnabled) +ANT_GL_CORE_IMPL(glDepthRange) +ANT_GL_CORE_IMPL(glViewport) +// GL 1.1 +ANT_GL_CORE_IMPL(glDrawArrays) +ANT_GL_CORE_IMPL(glDrawElements) +ANT_GL_CORE_IMPL(glGetPointerv) +ANT_GL_CORE_IMPL(glPolygonOffset) +ANT_GL_CORE_IMPL(glCopyTexImage1D) +ANT_GL_CORE_IMPL(glCopyTexImage2D) +ANT_GL_CORE_IMPL(glCopyTexSubImage1D) +ANT_GL_CORE_IMPL(glCopyTexSubImage2D) +ANT_GL_CORE_IMPL(glTexSubImage1D) +ANT_GL_CORE_IMPL(glTexSubImage2D) +ANT_GL_CORE_IMPL(glBindTexture) +ANT_GL_CORE_IMPL(glDeleteTextures) +ANT_GL_CORE_IMPL(glGenTextures) +ANT_GL_CORE_IMPL(glIsTexture) +// GL 1.2 +ANT_GL_CORE_IMPL(glBlendColor) +ANT_GL_CORE_IMPL(glBlendEquation) +ANT_GL_CORE_IMPL(glDrawRangeElements) +ANT_GL_CORE_IMPL(glTexImage3D) +ANT_GL_CORE_IMPL(glTexSubImage3D) +ANT_GL_CORE_IMPL(glCopyTexSubImage3D) +// GL 1.3 +ANT_GL_CORE_IMPL(glActiveTexture) +ANT_GL_CORE_IMPL(glSampleCoverage) +ANT_GL_CORE_IMPL(glCompressedTexImage3D) +ANT_GL_CORE_IMPL(glCompressedTexImage2D) +ANT_GL_CORE_IMPL(glCompressedTexImage1D) +ANT_GL_CORE_IMPL(glCompressedTexSubImage3D) +ANT_GL_CORE_IMPL(glCompressedTexSubImage2D) +ANT_GL_CORE_IMPL(glCompressedTexSubImage1D) +ANT_GL_CORE_IMPL(glGetCompressedTexImage) +// GL 1.4 +ANT_GL_CORE_IMPL(glBlendFuncSeparate) +ANT_GL_CORE_IMPL(glMultiDrawArrays) +ANT_GL_CORE_IMPL(glMultiDrawElements) +ANT_GL_CORE_IMPL(glPointParameterf) +ANT_GL_CORE_IMPL(glPointParameterfv) +ANT_GL_CORE_IMPL(glPointParameteri) +ANT_GL_CORE_IMPL(glPointParameteriv) +// GL 1.5 +ANT_GL_CORE_IMPL(glGenQueries) +ANT_GL_CORE_IMPL(glDeleteQueries) +ANT_GL_CORE_IMPL(glIsQuery) +ANT_GL_CORE_IMPL(glBeginQuery) +ANT_GL_CORE_IMPL(glEndQuery) +ANT_GL_CORE_IMPL(glGetQueryiv) +ANT_GL_CORE_IMPL(glGetQueryObjectiv) +ANT_GL_CORE_IMPL(glGetQueryObjectuiv) +ANT_GL_CORE_IMPL(glBindBuffer) +ANT_GL_CORE_IMPL(glDeleteBuffers) +ANT_GL_CORE_IMPL(glGenBuffers) +ANT_GL_CORE_IMPL(glIsBuffer) +ANT_GL_CORE_IMPL(glBufferData) +ANT_GL_CORE_IMPL(glBufferSubData) +ANT_GL_CORE_IMPL(glGetBufferSubData) +ANT_GL_CORE_IMPL(glMapBuffer) +ANT_GL_CORE_IMPL(glUnmapBuffer) +ANT_GL_CORE_IMPL(glGetBufferParameteriv) +ANT_GL_CORE_IMPL(glGetBufferPointerv) +// GL 2.0 +ANT_GL_CORE_IMPL(glBlendEquationSeparate) +ANT_GL_CORE_IMPL(glDrawBuffers) +ANT_GL_CORE_IMPL(glStencilOpSeparate) +ANT_GL_CORE_IMPL(glStencilFuncSeparate) +ANT_GL_CORE_IMPL(glStencilMaskSeparate) +ANT_GL_CORE_IMPL(glAttachShader) +ANT_GL_CORE_IMPL(glBindAttribLocation) +ANT_GL_CORE_IMPL(glCompileShader) +ANT_GL_CORE_IMPL(glCreateProgram) +ANT_GL_CORE_IMPL(glCreateShader) +ANT_GL_CORE_IMPL(glDeleteProgram) +ANT_GL_CORE_IMPL(glDeleteShader) +ANT_GL_CORE_IMPL(glDetachShader) +ANT_GL_CORE_IMPL(glDisableVertexAttribArray) +ANT_GL_CORE_IMPL(glEnableVertexAttribArray) +ANT_GL_CORE_IMPL(glGetActiveAttrib) +ANT_GL_CORE_IMPL(glGetActiveUniform) +ANT_GL_CORE_IMPL(glGetAttachedShaders) +ANT_GL_CORE_IMPL(glGetAttribLocation) +ANT_GL_CORE_IMPL(glGetProgramiv) +ANT_GL_CORE_IMPL(glGetProgramInfoLog) +ANT_GL_CORE_IMPL(glGetShaderiv) +ANT_GL_CORE_IMPL(glGetShaderInfoLog) +ANT_GL_CORE_IMPL(glGetShaderSource) +ANT_GL_CORE_IMPL(glGetUniformLocation) +ANT_GL_CORE_IMPL(glGetUniformfv) +ANT_GL_CORE_IMPL(glGetUniformiv) +ANT_GL_CORE_IMPL(glGetVertexAttribdv) +ANT_GL_CORE_IMPL(glGetVertexAttribfv) +ANT_GL_CORE_IMPL(glGetVertexAttribiv) +ANT_GL_CORE_IMPL(glGetVertexAttribPointerv) +ANT_GL_CORE_IMPL(glIsProgram) +ANT_GL_CORE_IMPL(glIsShader) +ANT_GL_CORE_IMPL(glLinkProgram) +ANT_GL_CORE_IMPL(glShaderSource) +ANT_GL_CORE_IMPL(glUseProgram) +ANT_GL_CORE_IMPL(glUniform1f) +ANT_GL_CORE_IMPL(glUniform2f) +ANT_GL_CORE_IMPL(glUniform3f) +ANT_GL_CORE_IMPL(glUniform4f) +ANT_GL_CORE_IMPL(glUniform1i) +ANT_GL_CORE_IMPL(glUniform2i) +ANT_GL_CORE_IMPL(glUniform3i) +ANT_GL_CORE_IMPL(glUniform4i) +ANT_GL_CORE_IMPL(glUniform1fv) +ANT_GL_CORE_IMPL(glUniform2fv) +ANT_GL_CORE_IMPL(glUniform3fv) +ANT_GL_CORE_IMPL(glUniform4fv) +ANT_GL_CORE_IMPL(glUniform1iv) +ANT_GL_CORE_IMPL(glUniform2iv) +ANT_GL_CORE_IMPL(glUniform3iv) +ANT_GL_CORE_IMPL(glUniform4iv) +ANT_GL_CORE_IMPL(glUniformMatrix2fv) +ANT_GL_CORE_IMPL(glUniformMatrix3fv) +ANT_GL_CORE_IMPL(glUniformMatrix4fv) +ANT_GL_CORE_IMPL(glValidateProgram) +ANT_GL_CORE_IMPL(glVertexAttrib1d) +ANT_GL_CORE_IMPL(glVertexAttrib1dv) +ANT_GL_CORE_IMPL(glVertexAttrib1f) +ANT_GL_CORE_IMPL(glVertexAttrib1fv) +ANT_GL_CORE_IMPL(glVertexAttrib1s) +ANT_GL_CORE_IMPL(glVertexAttrib1sv) +ANT_GL_CORE_IMPL(glVertexAttrib2d) +ANT_GL_CORE_IMPL(glVertexAttrib2dv) +ANT_GL_CORE_IMPL(glVertexAttrib2f) +ANT_GL_CORE_IMPL(glVertexAttrib2fv) +ANT_GL_CORE_IMPL(glVertexAttrib2s) +ANT_GL_CORE_IMPL(glVertexAttrib2sv) +ANT_GL_CORE_IMPL(glVertexAttrib3d) +ANT_GL_CORE_IMPL(glVertexAttrib3dv) +ANT_GL_CORE_IMPL(glVertexAttrib3f) +ANT_GL_CORE_IMPL(glVertexAttrib3fv) +ANT_GL_CORE_IMPL(glVertexAttrib3s) +ANT_GL_CORE_IMPL(glVertexAttrib3sv) +ANT_GL_CORE_IMPL(glVertexAttrib4Nbv) +ANT_GL_CORE_IMPL(glVertexAttrib4Niv) +ANT_GL_CORE_IMPL(glVertexAttrib4Nsv) +ANT_GL_CORE_IMPL(glVertexAttrib4Nub) +ANT_GL_CORE_IMPL(glVertexAttrib4Nubv) +ANT_GL_CORE_IMPL(glVertexAttrib4Nuiv) +ANT_GL_CORE_IMPL(glVertexAttrib4Nusv) +ANT_GL_CORE_IMPL(glVertexAttrib4bv) +ANT_GL_CORE_IMPL(glVertexAttrib4d) +ANT_GL_CORE_IMPL(glVertexAttrib4dv) +ANT_GL_CORE_IMPL(glVertexAttrib4f) +ANT_GL_CORE_IMPL(glVertexAttrib4fv) +ANT_GL_CORE_IMPL(glVertexAttrib4iv) +ANT_GL_CORE_IMPL(glVertexAttrib4s) +ANT_GL_CORE_IMPL(glVertexAttrib4sv) +ANT_GL_CORE_IMPL(glVertexAttrib4ubv) +ANT_GL_CORE_IMPL(glVertexAttrib4uiv) +ANT_GL_CORE_IMPL(glVertexAttrib4usv) +ANT_GL_CORE_IMPL(glVertexAttribPointer) +// GL 2.1 +ANT_GL_CORE_IMPL(glUniformMatrix2x3fv) +ANT_GL_CORE_IMPL(glUniformMatrix3x2fv) +ANT_GL_CORE_IMPL(glUniformMatrix2x4fv) +ANT_GL_CORE_IMPL(glUniformMatrix4x2fv) +ANT_GL_CORE_IMPL(glUniformMatrix3x4fv) +ANT_GL_CORE_IMPL(glUniformMatrix4x3fv) +// GL 3.0 +ANT_GL_CORE_IMPL(glColorMaski) +ANT_GL_CORE_IMPL(glGetBooleani_v) +ANT_GL_CORE_IMPL(glGetIntegeri_v) +ANT_GL_CORE_IMPL(glEnablei) +ANT_GL_CORE_IMPL(glDisablei) +ANT_GL_CORE_IMPL(glIsEnabledi) +ANT_GL_CORE_IMPL(glBeginTransformFeedback) +ANT_GL_CORE_IMPL(glEndTransformFeedback) +ANT_GL_CORE_IMPL(glBindBufferRange) +ANT_GL_CORE_IMPL(glBindBufferBase) +ANT_GL_CORE_IMPL(glTransformFeedbackVaryings) +ANT_GL_CORE_IMPL(glGetTransformFeedbackVarying) +ANT_GL_CORE_IMPL(glClampColor) +ANT_GL_CORE_IMPL(glBeginConditionalRender) +ANT_GL_CORE_IMPL(glEndConditionalRender) +ANT_GL_CORE_IMPL(glVertexAttribIPointer) +ANT_GL_CORE_IMPL(glGetVertexAttribIiv) +ANT_GL_CORE_IMPL(glGetVertexAttribIuiv) +ANT_GL_CORE_IMPL(glVertexAttribI1i) +ANT_GL_CORE_IMPL(glVertexAttribI2i) +ANT_GL_CORE_IMPL(glVertexAttribI3i) +ANT_GL_CORE_IMPL(glVertexAttribI4i) +ANT_GL_CORE_IMPL(glVertexAttribI1ui) +ANT_GL_CORE_IMPL(glVertexAttribI2ui) +ANT_GL_CORE_IMPL(glVertexAttribI3ui) +ANT_GL_CORE_IMPL(glVertexAttribI4ui) +ANT_GL_CORE_IMPL(glVertexAttribI1iv) +ANT_GL_CORE_IMPL(glVertexAttribI2iv) +ANT_GL_CORE_IMPL(glVertexAttribI3iv) +ANT_GL_CORE_IMPL(glVertexAttribI4iv) +ANT_GL_CORE_IMPL(glVertexAttribI1uiv) +ANT_GL_CORE_IMPL(glVertexAttribI2uiv) +ANT_GL_CORE_IMPL(glVertexAttribI3uiv) +ANT_GL_CORE_IMPL(glVertexAttribI4uiv) +ANT_GL_CORE_IMPL(glVertexAttribI4bv) +ANT_GL_CORE_IMPL(glVertexAttribI4sv) +ANT_GL_CORE_IMPL(glVertexAttribI4ubv) +ANT_GL_CORE_IMPL(glVertexAttribI4usv) +ANT_GL_CORE_IMPL(glGetUniformuiv) +ANT_GL_CORE_IMPL(glBindFragDataLocation) +ANT_GL_CORE_IMPL(glGetFragDataLocation) +ANT_GL_CORE_IMPL(glUniform1ui) +ANT_GL_CORE_IMPL(glUniform2ui) +ANT_GL_CORE_IMPL(glUniform3ui) +ANT_GL_CORE_IMPL(glUniform4ui) +ANT_GL_CORE_IMPL(glUniform1uiv) +ANT_GL_CORE_IMPL(glUniform2uiv) +ANT_GL_CORE_IMPL(glUniform3uiv) +ANT_GL_CORE_IMPL(glUniform4uiv) +ANT_GL_CORE_IMPL(glTexParameterIiv) +ANT_GL_CORE_IMPL(glTexParameterIuiv) +ANT_GL_CORE_IMPL(glGetTexParameterIiv) +ANT_GL_CORE_IMPL(glGetTexParameterIuiv) +ANT_GL_CORE_IMPL(glClearBufferiv) +ANT_GL_CORE_IMPL(glClearBufferuiv) +ANT_GL_CORE_IMPL(glClearBufferfv) +ANT_GL_CORE_IMPL(glClearBufferfi) +ANT_GL_CORE_IMPL(glGetStringi) +// GL 3.1 +ANT_GL_CORE_IMPL(glDrawArraysInstanced) +ANT_GL_CORE_IMPL(glDrawElementsInstanced) +ANT_GL_CORE_IMPL(glTexBuffer) +ANT_GL_CORE_IMPL(glPrimitiveRestartIndex) +// GL 3.2 +//ANT_GL_CORE_IMPL(glGetInteger64i_v) +//ANT_GL_CORE_IMPL(glGetBufferParameteri64v) +ANT_GL_CORE_IMPL(glFramebufferTexture) +// GL_ARB_vertex_array_object +ANT_GL_CORE_IMPL(glBindVertexArray) +ANT_GL_CORE_IMPL(glDeleteVertexArrays) +ANT_GL_CORE_IMPL(glGenVertexArrays) +ANT_GL_CORE_IMPL(glIsVertexArray) + +#if defined(ANT_WINDOWS) +ANT_GL_CORE_IMPL(wglGetProcAddress) +#endif + +namespace GLCore { PFNGLGetProcAddress _glGetProcAddress = NULL; } + +// --------------------------------------------------------------------------- + +#if defined(ANT_WINDOWS) + + // --------------------------------------------------------------------------- + + int LoadOpenGLCore() + { + if( g_OGLCoreModule!=NULL ) + { + return 1; // "OpenGL library already loaded" + } + + g_OGLCoreModule = LoadLibrary("OPENGL32.DLL"); + if( g_OGLCoreModule ) + { + // Info(VERB_LOW, "Load %d OpenGL Core functions", g_NbOGLCoreFunc); + + int Res = 1; + + // Use wglGetProcAddress to retreive Core functions + _glGetProcAddress = reinterpret_cast(GetProcAddress(g_OGLCoreModule, "wglGetProcAddress")); + if( _glGetProcAddress!=NULL ) + for(int i=0; i0); + // Try to get the function pointer with wglGetProcAddress + *(g_OGLCoreFuncRec[i].m_FuncPtr) = reinterpret_cast(_glGetProcAddress(g_OGLCoreFuncRec[i].m_Name)); + if( *(g_OGLCoreFuncRec[i].m_FuncPtr)==NULL ) + { + // Try to get the function pointer with GetProcAddress + *(g_OGLCoreFuncRec[i].m_FuncPtr) = reinterpret_cast(GetProcAddress(g_OGLCoreModule, g_OGLCoreFuncRec[i].m_Name)); + if( *(g_OGLCoreFuncRec[i].m_FuncPtr)==NULL ) + { + #ifdef _DEBUG + fprintf(stderr, "AntTweakBar: Cannot load function %s\n", g_OGLCoreFuncRec[i].m_Name); + #endif + Res = 0; // Error("cannot find OpenGL Core function"); + } + } + + } + + return Res; + } + else + { + // InternDisplayLastErrorWIN("Cannot load opengl32 DLL", false); + return 0; // cannot load DLL + } + } + + // --------------------------------------------------------------------------- + + int UnloadOpenGLCore() + { + if( g_OGLCoreModule==NULL ) + { + return 1; // "OpenGL library not loaded" + } + + // Info(VERB_LOW, "Unload %d OpenGL Core functions", g_NbOGLCoreFunc); + for(int i=0; i0); + *(g_OGLCoreFuncRec[i].m_FuncPtr) = NULL; + } + if( FreeLibrary(g_OGLCoreModule) ) + { + // Info(VERB_LOW, "OpenGL library unloaded"); + g_OGLCoreModule = NULL; + return 1; + } + else + { + // InternDisplayLastErrorWIN("Cannot unload opengl32 DLL", false); + return 0; // cannot unload opengl32.dll + } + } + + // --------------------------------------------------------------------------- + + namespace GLCore + { + + PFNOpenGL Record(const char *_FuncName, PFNOpenGL *_FuncPtr) + { + if( g_NbOGLCoreFunc>=ANT_NB_OGL_CORE_FUNC_MAX ) + { + fprintf(stderr, "Too many OpenGL Core functions declared. Change ANT_NB_OGL_CORE_FUNC_MAX."); + exit(-1); + } + + g_OGLCoreFuncRec[g_NbOGLCoreFunc].m_Name = _FuncName; + g_OGLCoreFuncRec[g_NbOGLCoreFunc].m_FuncPtr = _FuncPtr; + ++g_NbOGLCoreFunc; + + return NULL; + } + + } // namespace GL + + // --------------------------------------------------------------------------- + +#endif // defined(ANT_WINDOWS) + +// --------------------------------------------------------------------------- + +#if defined(ANT_UNIX) + + int LoadOpenGLCore() + { + _glGetProcAddress = reinterpret_cast(glXGetProcAddressARB); + + return 1; // "OpenGL library is statically linked" + } + + int UnloadOpenGLCore() + { + return 1; // "OpenGL library is statically linked" + } + +#elif defined(ANT_OSX) + + #include + + static void *gl_dyld = NULL; + void *NSGLGetProcAddressNew(const GLubyte *name) + { + void *proc=NULL; + if (gl_dyld == NULL) + { + gl_dyld = dlopen("OpenGL",RTLD_LAZY); + } + if (gl_dyld) + { + NSString *sym = [[NSString alloc] initWithFormat: @"_%s",name]; + proc = dlsym(gl_dyld,[sym UTF8String]); + [sym release]; + } + return proc; + } + + int LoadOpenGLCore() + { + _glGetProcAddress = reinterpret_cast(NSGLGetProcAddressNew); + return 1; + } + + int UnloadOpenGLCore() + { + if (gl_dyld) + { + dlclose(gl_dyld); + gl_dyld = NULL; + } + return 1; + } + +#endif // defined(ANT_UNIX) + +// --------------------------------------------------------------------------- diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGLCore.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGLCore.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGLCore.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGLCore.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,349 @@ +// --------------------------------------------------------------------------- +// +// @file LoadOGLCore.h +// @brief OpenGL Core Profile declarations for dynamic loading +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_LOAD_OGL_CORE_INCLUDED +#define ANT_LOAD_OGL_CORE_INCLUDED + + +#define ANT_GL_CORE_DECL(_Ret, _Fct, _Params) \ + extern "C" { typedef _Ret (APIENTRY* PFN##_Fct)_Params; } \ + namespace GLCore { extern PFN##_Fct _##_Fct; } \ + using GLCore::_##_Fct; + +#if defined(ANT_WINDOWS) +# define ANT_GL_CORE_IMPL(_Fct) \ + namespace GLCore { PFN##_Fct _##_Fct = (PFN##_Fct)Record(#_Fct, (PFNOpenGL*)(&_##_Fct)); } +#elif defined(ANT_UNIX) || defined(ANT_OSX) +# define ANT_GL_CORE_IMPL(_Fct) \ + namespace GLCore { PFN##_Fct _##_Fct = _Fct; } +# if !defined(APIENTRY) +# define APIENTRY +# endif +#endif + + +int LoadOpenGLCore(); +int UnloadOpenGLCore(); + +namespace GLCore +{ + extern "C" { typedef void (APIENTRY* PFNOpenGL)(); } + PFNOpenGL Record(const char *_FuncName, PFNOpenGL *_FuncPtr); + + extern "C" { typedef PFNOpenGL (APIENTRY *PFNGLGetProcAddress)(const char *); } + extern PFNGLGetProcAddress _glGetProcAddress; +} +using GLCore::_glGetProcAddress; + + +// GL 1.0 +ANT_GL_CORE_DECL(void, glCullFace, (GLenum mode)) +ANT_GL_CORE_DECL(void, glFrontFace, (GLenum mode)) +ANT_GL_CORE_DECL(void, glHint, (GLenum target, GLenum mode)) +ANT_GL_CORE_DECL(void, glLineWidth, (GLfloat width)) +ANT_GL_CORE_DECL(void, glPointSize, (GLfloat size)) +ANT_GL_CORE_DECL(void, glPolygonMode, (GLenum face, GLenum mode)) +ANT_GL_CORE_DECL(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height)) +ANT_GL_CORE_DECL(void, glTexParameterf, (GLenum target, GLenum pname, GLfloat param)) +ANT_GL_CORE_DECL(void, glTexParameterfv, (GLenum target, GLenum pname, const GLfloat *params)) +ANT_GL_CORE_DECL(void, glTexParameteri, (GLenum target, GLenum pname, GLint param)) +ANT_GL_CORE_DECL(void, glTexParameteriv, (GLenum target, GLenum pname, const GLint *params)) +#if defined(ANT_OSX) +// Mac OSX redefined these OpenGL calls: glTexImage1D, glTexImage2D +ANT_GL_CORE_DECL(void, glTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_CORE_DECL(void, glTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +#else +ANT_GL_CORE_DECL(void, glTexImage1D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_CORE_DECL(void, glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +#endif +ANT_GL_CORE_DECL(void, glDrawBuffer, (GLenum mode)) +ANT_GL_CORE_DECL(void, glClear, (GLbitfield mask)) +ANT_GL_CORE_DECL(void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) +ANT_GL_CORE_DECL(void, glClearStencil, (GLint s)) +ANT_GL_CORE_DECL(void, glClearDepth, (GLclampd depth)) +ANT_GL_CORE_DECL(void, glStencilMask, (GLuint mask)) +ANT_GL_CORE_DECL(void, glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) +ANT_GL_CORE_DECL(void, glDepthMask, (GLboolean flag)) +ANT_GL_CORE_DECL(void, glDisable, (GLenum cap)) +ANT_GL_CORE_DECL(void, glEnable, (GLenum cap)) +ANT_GL_CORE_DECL(void, glFinish, (void)) +ANT_GL_CORE_DECL(void, glFlush, (void)) +ANT_GL_CORE_DECL(void, glBlendFunc, (GLenum sfactor, GLenum dfactor)) +ANT_GL_CORE_DECL(void, glLogicOp, (GLenum opcode)) +ANT_GL_CORE_DECL(void, glStencilFunc, (GLenum func, GLint ref, GLuint mask)) +ANT_GL_CORE_DECL(void, glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass)) +ANT_GL_CORE_DECL(void, glDepthFunc, (GLenum func)) +ANT_GL_CORE_DECL(void, glPixelStoref, (GLenum pname, GLfloat param)) +ANT_GL_CORE_DECL(void, glPixelStorei, (GLenum pname, GLint param)) +ANT_GL_CORE_DECL(void, glReadBuffer, (GLenum mode)) +ANT_GL_CORE_DECL(void, glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)) +ANT_GL_CORE_DECL(void, glGetBooleanv, (GLenum pname, GLboolean *params)) +ANT_GL_CORE_DECL(void, glGetDoublev, (GLenum pname, GLdouble *params)) +ANT_GL_CORE_DECL(GLenum, glGetError, (void)) +ANT_GL_CORE_DECL(void, glGetFloatv, (GLenum pname, GLfloat *params)) +ANT_GL_CORE_DECL(void, glGetIntegerv, (GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(const GLubyte *, glGetString, (GLenum name)) +ANT_GL_CORE_DECL(void, glGetTexImage, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)) +ANT_GL_CORE_DECL(void, glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params)) +ANT_GL_CORE_DECL(void, glGetTexParameteriv, (GLenum target, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(void, glGetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params)) +ANT_GL_CORE_DECL(void, glGetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(GLboolean, glIsEnabled, (GLenum cap)) +ANT_GL_CORE_DECL(void, glDepthRange, (GLclampd near, GLclampd far)) +ANT_GL_CORE_DECL(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height)) +// GL 1.1 +ANT_GL_CORE_DECL(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count)) +ANT_GL_CORE_DECL(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)) +ANT_GL_CORE_DECL(void, glGetPointerv, (GLenum pname, GLvoid* *params)) +ANT_GL_CORE_DECL(void, glPolygonOffset, (GLfloat factor, GLfloat units)) +ANT_GL_CORE_DECL(void, glCopyTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)) +ANT_GL_CORE_DECL(void, glCopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) +ANT_GL_CORE_DECL(void, glCopyTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) +ANT_GL_CORE_DECL(void, glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) +ANT_GL_CORE_DECL(void, glTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_CORE_DECL(void, glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_CORE_DECL(void, glBindTexture, (GLenum target, GLuint texture)) +ANT_GL_CORE_DECL(void, glDeleteTextures, (GLsizei n, const GLuint *textures)) +ANT_GL_CORE_DECL(void, glGenTextures, (GLsizei n, GLuint *textures)) +ANT_GL_CORE_DECL(GLboolean, glIsTexture, (GLuint texture)) +// GL 1.2 +ANT_GL_CORE_DECL(void, glBlendColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) +ANT_GL_CORE_DECL(void, glBlendEquation, (GLenum mode)) +ANT_GL_CORE_DECL(void, glDrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)) +ANT_GL_CORE_DECL(void, glTexImage3D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_CORE_DECL(void, glTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_CORE_DECL(void, glCopyTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) +// GL 1.3 +ANT_GL_CORE_DECL(void, glActiveTexture, (GLenum texture)) +ANT_GL_CORE_DECL(void, glSampleCoverage, (GLclampf value, GLboolean invert)) +ANT_GL_CORE_DECL(void, glCompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)) +ANT_GL_CORE_DECL(void, glCompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) +ANT_GL_CORE_DECL(void, glCompressedTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)) +ANT_GL_CORE_DECL(void, glCompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) +ANT_GL_CORE_DECL(void, glCompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) +ANT_GL_CORE_DECL(void, glCompressedTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)) +ANT_GL_CORE_DECL(void, glGetCompressedTexImage, (GLenum target, GLint level, GLvoid *img)) +// GL 1.4 +ANT_GL_CORE_DECL(void, glBlendFuncSeparate, (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) +ANT_GL_CORE_DECL(void, glMultiDrawArrays, (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)) +ANT_GL_CORE_DECL(void, glMultiDrawElements, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount)) +ANT_GL_CORE_DECL(void, glPointParameterf, (GLenum pname, GLfloat param)) +ANT_GL_CORE_DECL(void, glPointParameterfv, (GLenum pname, const GLfloat *params)) +ANT_GL_CORE_DECL(void, glPointParameteri, (GLenum pname, GLint param)) +ANT_GL_CORE_DECL(void, glPointParameteriv, (GLenum pname, const GLint *params)) +// GL 1.5 +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; +ANT_GL_CORE_DECL(void, glGenQueries, (GLsizei n, GLuint *ids)) +ANT_GL_CORE_DECL(void, glDeleteQueries, (GLsizei n, const GLuint *ids)) +ANT_GL_CORE_DECL(GLboolean, glIsQuery, (GLuint id)) +ANT_GL_CORE_DECL(void, glBeginQuery, (GLenum target, GLuint id)) +ANT_GL_CORE_DECL(void, glEndQuery, (GLenum target)) +ANT_GL_CORE_DECL(void, glGetQueryiv, (GLenum target, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(void, glGetQueryObjectiv, (GLuint id, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(void, glGetQueryObjectuiv, (GLuint id, GLenum pname, GLuint *params)) +ANT_GL_CORE_DECL(void, glBindBuffer, (GLenum target, GLuint buffer)) +ANT_GL_CORE_DECL(void, glDeleteBuffers, (GLsizei n, const GLuint *buffers)) +ANT_GL_CORE_DECL(void, glGenBuffers, (GLsizei n, GLuint *buffers)) +ANT_GL_CORE_DECL(GLboolean, glIsBuffer, (GLuint buffer)) +ANT_GL_CORE_DECL(void, glBufferData, (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)) +ANT_GL_CORE_DECL(void, glBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)) +ANT_GL_CORE_DECL(void, glGetBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)) +ANT_GL_CORE_DECL(GLvoid*, glMapBuffer, (GLenum target, GLenum access)) +ANT_GL_CORE_DECL(GLboolean, glUnmapBuffer, (GLenum target)) +ANT_GL_CORE_DECL(void, glGetBufferParameteriv, (GLenum target, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(void, glGetBufferPointerv, (GLenum target, GLenum pname, GLvoid* *params)) +// GL 2.0 +typedef char GLchar; +ANT_GL_CORE_DECL(void, glBlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha)) +ANT_GL_CORE_DECL(void, glDrawBuffers, (GLsizei n, const GLenum *bufs)) +ANT_GL_CORE_DECL(void, glStencilOpSeparate, (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)) +ANT_GL_CORE_DECL(void, glStencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask)) +ANT_GL_CORE_DECL(void, glStencilMaskSeparate, (GLenum face, GLuint mask)) +ANT_GL_CORE_DECL(void, glAttachShader, (GLuint program, GLuint shader)) +ANT_GL_CORE_DECL(void, glBindAttribLocation, (GLuint program, GLuint index, const GLchar *name)) +ANT_GL_CORE_DECL(void, glCompileShader, (GLuint shader)) +ANT_GL_CORE_DECL(GLuint, glCreateProgram, (void)) +ANT_GL_CORE_DECL(GLuint, glCreateShader, (GLenum type)) +ANT_GL_CORE_DECL(void, glDeleteProgram, (GLuint program)) +ANT_GL_CORE_DECL(void, glDeleteShader, (GLuint shader)) +ANT_GL_CORE_DECL(void, glDetachShader, (GLuint program, GLuint shader)) +ANT_GL_CORE_DECL(void, glDisableVertexAttribArray, (GLuint index)) +ANT_GL_CORE_DECL(void, glEnableVertexAttribArray, (GLuint index)) +ANT_GL_CORE_DECL(void, glGetActiveAttrib, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) +ANT_GL_CORE_DECL(void, glGetActiveUniform, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) +ANT_GL_CORE_DECL(void, glGetAttachedShaders, (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)) +ANT_GL_CORE_DECL(GLint, glGetAttribLocation, (GLuint program, const GLchar *name)) +ANT_GL_CORE_DECL(void, glGetProgramiv, (GLuint program, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(void, glGetProgramInfoLog, (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) +ANT_GL_CORE_DECL(void, glGetShaderiv, (GLuint shader, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(void, glGetShaderInfoLog, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) +ANT_GL_CORE_DECL(void, glGetShaderSource, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)) +ANT_GL_CORE_DECL(GLint, glGetUniformLocation, (GLuint program, const GLchar *name)) +ANT_GL_CORE_DECL(void, glGetUniformfv, (GLuint program, GLint location, GLfloat *params)) +ANT_GL_CORE_DECL(void, glGetUniformiv, (GLuint program, GLint location, GLint *params)) +ANT_GL_CORE_DECL(void, glGetVertexAttribdv, (GLuint index, GLenum pname, GLdouble *params)) +ANT_GL_CORE_DECL(void, glGetVertexAttribfv, (GLuint index, GLenum pname, GLfloat *params)) +ANT_GL_CORE_DECL(void, glGetVertexAttribiv, (GLuint index, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(void, glGetVertexAttribPointerv, (GLuint index, GLenum pname, GLvoid* *pointer)) +ANT_GL_CORE_DECL(GLboolean, glIsProgram, (GLuint program)) +ANT_GL_CORE_DECL(GLboolean, glIsShader, (GLuint shader)) +ANT_GL_CORE_DECL(void, glLinkProgram, (GLuint program)) +ANT_GL_CORE_DECL(void, glShaderSource, (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length)) +ANT_GL_CORE_DECL(void, glUseProgram, (GLuint program)) +ANT_GL_CORE_DECL(void, glUniform1f, (GLint location, GLfloat v0)) +ANT_GL_CORE_DECL(void, glUniform2f, (GLint location, GLfloat v0, GLfloat v1)) +ANT_GL_CORE_DECL(void, glUniform3f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) +ANT_GL_CORE_DECL(void, glUniform4f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) +ANT_GL_CORE_DECL(void, glUniform1i, (GLint location, GLint v0)) +ANT_GL_CORE_DECL(void, glUniform2i, (GLint location, GLint v0, GLint v1)) +ANT_GL_CORE_DECL(void, glUniform3i, (GLint location, GLint v0, GLint v1, GLint v2)) +ANT_GL_CORE_DECL(void, glUniform4i, (GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) +ANT_GL_CORE_DECL(void, glUniform1fv, (GLint location, GLsizei count, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniform2fv, (GLint location, GLsizei count, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniform3fv, (GLint location, GLsizei count, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniform4fv, (GLint location, GLsizei count, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniform1iv, (GLint location, GLsizei count, const GLint *value)) +ANT_GL_CORE_DECL(void, glUniform2iv, (GLint location, GLsizei count, const GLint *value)) +ANT_GL_CORE_DECL(void, glUniform3iv, (GLint location, GLsizei count, const GLint *value)) +ANT_GL_CORE_DECL(void, glUniform4iv, (GLint location, GLsizei count, const GLint *value)) +ANT_GL_CORE_DECL(void, glUniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glValidateProgram, (GLuint program)) +ANT_GL_CORE_DECL(void, glVertexAttrib1d, (GLuint index, GLdouble x)) +ANT_GL_CORE_DECL(void, glVertexAttrib1dv, (GLuint index, const GLdouble *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib1f, (GLuint index, GLfloat x)) +ANT_GL_CORE_DECL(void, glVertexAttrib1fv, (GLuint index, const GLfloat *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib1s, (GLuint index, GLshort x)) +ANT_GL_CORE_DECL(void, glVertexAttrib1sv, (GLuint index, const GLshort *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib2d, (GLuint index, GLdouble x, GLdouble y)) +ANT_GL_CORE_DECL(void, glVertexAttrib2dv, (GLuint index, const GLdouble *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib2f, (GLuint index, GLfloat x, GLfloat y)) +ANT_GL_CORE_DECL(void, glVertexAttrib2fv, (GLuint index, const GLfloat *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib2s, (GLuint index, GLshort x, GLshort y)) +ANT_GL_CORE_DECL(void, glVertexAttrib2sv, (GLuint index, const GLshort *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib3d, (GLuint index, GLdouble x, GLdouble y, GLdouble z)) +ANT_GL_CORE_DECL(void, glVertexAttrib3dv, (GLuint index, const GLdouble *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, GLfloat z)) +ANT_GL_CORE_DECL(void, glVertexAttrib3fv, (GLuint index, const GLfloat *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib3s, (GLuint index, GLshort x, GLshort y, GLshort z)) +ANT_GL_CORE_DECL(void, glVertexAttrib3sv, (GLuint index, const GLshort *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4Nbv, (GLuint index, const GLbyte *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4Niv, (GLuint index, const GLint *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4Nsv, (GLuint index, const GLshort *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4Nub, (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) +ANT_GL_CORE_DECL(void, glVertexAttrib4Nubv, (GLuint index, const GLubyte *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4Nuiv, (GLuint index, const GLuint *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4Nusv, (GLuint index, const GLushort *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4bv, (GLuint index, const GLbyte *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4d, (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) +ANT_GL_CORE_DECL(void, glVertexAttrib4dv, (GLuint index, const GLdouble *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) +ANT_GL_CORE_DECL(void, glVertexAttrib4fv, (GLuint index, const GLfloat *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4iv, (GLuint index, const GLint *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4s, (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) +ANT_GL_CORE_DECL(void, glVertexAttrib4sv, (GLuint index, const GLshort *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4ubv, (GLuint index, const GLubyte *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4uiv, (GLuint index, const GLuint *v)) +ANT_GL_CORE_DECL(void, glVertexAttrib4usv, (GLuint index, const GLushort *v)) +ANT_GL_CORE_DECL(void, glVertexAttribPointer, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)) +// GL 2.1 +ANT_GL_CORE_DECL(void, glUniformMatrix2x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniformMatrix3x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniformMatrix2x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniformMatrix4x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniformMatrix3x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glUniformMatrix4x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) +// GL 3.0 +ANT_GL_CORE_DECL(void, glColorMaski, (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)) +ANT_GL_CORE_DECL(void, glGetBooleani_v, (GLenum target, GLuint index, GLboolean *data)) +ANT_GL_CORE_DECL(void, glGetIntegeri_v, (GLenum target, GLuint index, GLint *data)) +ANT_GL_CORE_DECL(void, glEnablei, (GLenum target, GLuint index)) +ANT_GL_CORE_DECL(void, glDisablei, (GLenum target, GLuint index)) +ANT_GL_CORE_DECL(GLboolean, glIsEnabledi, (GLenum target, GLuint index)) +ANT_GL_CORE_DECL(void, glBeginTransformFeedback, (GLenum primitiveMode)) +ANT_GL_CORE_DECL(void, glEndTransformFeedback, (void)) +ANT_GL_CORE_DECL(void, glBindBufferRange, (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) +ANT_GL_CORE_DECL(void, glBindBufferBase, (GLenum target, GLuint index, GLuint buffer)) +ANT_GL_CORE_DECL(void, glTransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode)) +ANT_GL_CORE_DECL(void, glGetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) +ANT_GL_CORE_DECL(void, glClampColor, (GLenum target, GLenum clamp)) +ANT_GL_CORE_DECL(void, glBeginConditionalRender, (GLuint id, GLenum mode)) +ANT_GL_CORE_DECL(void, glEndConditionalRender, (void)) +ANT_GL_CORE_DECL(void, glVertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) +ANT_GL_CORE_DECL(void, glGetVertexAttribIiv, (GLuint index, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(void, glGetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint *params)) +ANT_GL_CORE_DECL(void, glVertexAttribI1i, (GLuint index, GLint x)) +ANT_GL_CORE_DECL(void, glVertexAttribI2i, (GLuint index, GLint x, GLint y)) +ANT_GL_CORE_DECL(void, glVertexAttribI3i, (GLuint index, GLint x, GLint y, GLint z)) +ANT_GL_CORE_DECL(void, glVertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w)) +ANT_GL_CORE_DECL(void, glVertexAttribI1ui, (GLuint index, GLuint x)) +ANT_GL_CORE_DECL(void, glVertexAttribI2ui, (GLuint index, GLuint x, GLuint y)) +ANT_GL_CORE_DECL(void, glVertexAttribI3ui, (GLuint index, GLuint x, GLuint y, GLuint z)) +ANT_GL_CORE_DECL(void, glVertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) +ANT_GL_CORE_DECL(void, glVertexAttribI1iv, (GLuint index, const GLint *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI2iv, (GLuint index, const GLint *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI3iv, (GLuint index, const GLint *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI4iv, (GLuint index, const GLint *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI1uiv, (GLuint index, const GLuint *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI2uiv, (GLuint index, const GLuint *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI3uiv, (GLuint index, const GLuint *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI4uiv, (GLuint index, const GLuint *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI4bv, (GLuint index, const GLbyte *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI4sv, (GLuint index, const GLshort *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI4ubv, (GLuint index, const GLubyte *v)) +ANT_GL_CORE_DECL(void, glVertexAttribI4usv, (GLuint index, const GLushort *v)) +ANT_GL_CORE_DECL(void, glGetUniformuiv, (GLuint program, GLint location, GLuint *params)) +ANT_GL_CORE_DECL(void, glBindFragDataLocation, (GLuint program, GLuint color, const GLchar *name)) +ANT_GL_CORE_DECL(GLint, glGetFragDataLocation, (GLuint program, const GLchar *name)) +ANT_GL_CORE_DECL(void, glUniform1ui, (GLint location, GLuint v0)) +ANT_GL_CORE_DECL(void, glUniform2ui, (GLint location, GLuint v0, GLuint v1)) +ANT_GL_CORE_DECL(void, glUniform3ui, (GLint location, GLuint v0, GLuint v1, GLuint v2)) +ANT_GL_CORE_DECL(void, glUniform4ui, (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) +ANT_GL_CORE_DECL(void, glUniform1uiv, (GLint location, GLsizei count, const GLuint *value)) +ANT_GL_CORE_DECL(void, glUniform2uiv, (GLint location, GLsizei count, const GLuint *value)) +ANT_GL_CORE_DECL(void, glUniform3uiv, (GLint location, GLsizei count, const GLuint *value)) +ANT_GL_CORE_DECL(void, glUniform4uiv, (GLint location, GLsizei count, const GLuint *value)) +ANT_GL_CORE_DECL(void, glTexParameterIiv, (GLenum target, GLenum pname, const GLint *params)) +ANT_GL_CORE_DECL(void, glTexParameterIuiv, (GLenum target, GLenum pname, const GLuint *params)) +ANT_GL_CORE_DECL(void, glGetTexParameterIiv, (GLenum target, GLenum pname, GLint *params)) +ANT_GL_CORE_DECL(void, glGetTexParameterIuiv, (GLenum target, GLenum pname, GLuint *params)) +ANT_GL_CORE_DECL(void, glClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint *value)) +ANT_GL_CORE_DECL(void, glClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint *value)) +ANT_GL_CORE_DECL(void, glClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat *value)) +ANT_GL_CORE_DECL(void, glClearBufferfi, (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)) +ANT_GL_CORE_DECL(const GLubyte *, glGetStringi, (GLenum name, GLuint index)) +// GL 3.1 +ANT_GL_CORE_DECL(void, glDrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei primcount)) +ANT_GL_CORE_DECL(void, glDrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)) +ANT_GL_CORE_DECL(void, glTexBuffer, (GLenum target, GLenum internalformat, GLuint buffer)) +ANT_GL_CORE_DECL(void, glPrimitiveRestartIndex, (GLuint index)) +// GL 3.2 +//typedef int64_t GLint64; +//ANT_GL_CORE_DECL(void, glGetInteger64i_v, (GLenum target, GLuint index, GLint64 *data)) +//ANT_GL_CORE_DECL(void, glGetBufferParameteri64v, (GLenum target, GLenum pname, GLint64 *params)) +ANT_GL_CORE_DECL(void, glFramebufferTexture, (GLenum target, GLenum attachment, GLuint texture, GLint level)) + +// GL_ARB_vertex_array_object +ANT_GL_CORE_DECL(void, glBindVertexArray, (GLuint array)) +ANT_GL_CORE_DECL(void, glDeleteVertexArrays, (GLsizei n, const GLuint *arrays)) +ANT_GL_CORE_DECL(void, glGenVertexArrays, (GLsizei n, GLuint *arrays)) +ANT_GL_CORE_DECL(GLboolean, glIsVertexArray, (GLuint array)) + +#ifdef ANT_WINDOWS +ANT_GL_CORE_DECL(PROC, wglGetProcAddress, (LPCSTR)) +#endif + + +#endif // !defined ANT_LOAD_OGL_CORE_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGL.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGL.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGL.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGL.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,531 @@ +// --------------------------------------------------------------------------- +// +// @file LoadOGL.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include "LoadOGL.h" + + +// --------------------------------------------------------------------------- + +#define ANT_NB_OGL_FUNC_MAX 1024 + +struct COGLFuncRec +{ + const char * m_Name; + GL::PFNOpenGL * m_FuncPtr; + COGLFuncRec() : m_Name(NULL), m_FuncPtr(NULL) {} +}; +COGLFuncRec g_OGLFuncRec[ANT_NB_OGL_FUNC_MAX]; +int g_NbOGLFunc = 0; +#if defined(ANT_WINDOWS) +HMODULE g_OGLModule = NULL; +#endif + +// --------------------------------------------------------------------------- + +ANT_GL_IMPL(glAccum) +ANT_GL_IMPL(glAlphaFunc) +ANT_GL_IMPL(glAreTexturesResident) +ANT_GL_IMPL(glArrayElement) +ANT_GL_IMPL(glBegin) +ANT_GL_IMPL(glBindTexture) +ANT_GL_IMPL(glBitmap) +ANT_GL_IMPL(glBlendFunc) +ANT_GL_IMPL(glCallList) +ANT_GL_IMPL(glCallLists) +ANT_GL_IMPL(glClear) +ANT_GL_IMPL(glClearAccum) +ANT_GL_IMPL(glClearColor) +ANT_GL_IMPL(glClearDepth) +ANT_GL_IMPL(glClearIndex) +ANT_GL_IMPL(glClearStencil) +ANT_GL_IMPL(glClipPlane) +ANT_GL_IMPL(glColor3b) +ANT_GL_IMPL(glColor3bv) +ANT_GL_IMPL(glColor3d) +ANT_GL_IMPL(glColor3dv) +ANT_GL_IMPL(glColor3f) +ANT_GL_IMPL(glColor3fv) +ANT_GL_IMPL(glColor3i) +ANT_GL_IMPL(glColor3iv) +ANT_GL_IMPL(glColor3s) +ANT_GL_IMPL(glColor3sv) +ANT_GL_IMPL(glColor3ub) +ANT_GL_IMPL(glColor3ubv) +ANT_GL_IMPL(glColor3ui) +ANT_GL_IMPL(glColor3uiv) +ANT_GL_IMPL(glColor3us) +ANT_GL_IMPL(glColor3usv) +ANT_GL_IMPL(glColor4b) +ANT_GL_IMPL(glColor4bv) +ANT_GL_IMPL(glColor4d) +ANT_GL_IMPL(glColor4dv) +ANT_GL_IMPL(glColor4f) +ANT_GL_IMPL(glColor4fv) +ANT_GL_IMPL(glColor4i) +ANT_GL_IMPL(glColor4iv) +ANT_GL_IMPL(glColor4s) +ANT_GL_IMPL(glColor4sv) +ANT_GL_IMPL(glColor4ub) +ANT_GL_IMPL(glColor4ubv) +ANT_GL_IMPL(glColor4ui) +ANT_GL_IMPL(glColor4uiv) +ANT_GL_IMPL(glColor4us) +ANT_GL_IMPL(glColor4usv) +ANT_GL_IMPL(glColorMask) +ANT_GL_IMPL(glColorMaterial) +ANT_GL_IMPL(glColorPointer) +ANT_GL_IMPL(glCopyPixels) +ANT_GL_IMPL(glCopyTexImage1D) +ANT_GL_IMPL(glCopyTexImage2D) +ANT_GL_IMPL(glCopyTexSubImage1D) +ANT_GL_IMPL(glCopyTexSubImage2D) +ANT_GL_IMPL(glCullFace) +ANT_GL_IMPL(glDeleteLists) +ANT_GL_IMPL(glDeleteTextures) +ANT_GL_IMPL(glDepthFunc) +ANT_GL_IMPL(glDepthMask) +ANT_GL_IMPL(glDepthRange) +ANT_GL_IMPL(glDisable) +ANT_GL_IMPL(glDisableClientState) +ANT_GL_IMPL(glDrawArrays) +ANT_GL_IMPL(glDrawBuffer) +ANT_GL_IMPL(glDrawElements) +ANT_GL_IMPL(glDrawPixels) +ANT_GL_IMPL(glEdgeFlag) +ANT_GL_IMPL(glEdgeFlagPointer) +ANT_GL_IMPL(glEdgeFlagv) +ANT_GL_IMPL(glEnable) +ANT_GL_IMPL(glEnableClientState) +ANT_GL_IMPL(glEnd) +ANT_GL_IMPL(glEndList) +ANT_GL_IMPL(glEvalCoord1d) +ANT_GL_IMPL(glEvalCoord1dv) +ANT_GL_IMPL(glEvalCoord1f) +ANT_GL_IMPL(glEvalCoord1fv) +ANT_GL_IMPL(glEvalCoord2d) +ANT_GL_IMPL(glEvalCoord2dv) +ANT_GL_IMPL(glEvalCoord2f) +ANT_GL_IMPL(glEvalCoord2fv) +ANT_GL_IMPL(glEvalMesh1) +ANT_GL_IMPL(glEvalMesh2) +ANT_GL_IMPL(glEvalPoint1) +ANT_GL_IMPL(glEvalPoint2) +ANT_GL_IMPL(glFeedbackBuffer) +ANT_GL_IMPL(glFinish) +ANT_GL_IMPL(glFlush) +ANT_GL_IMPL(glFogf) +ANT_GL_IMPL(glFogfv) +ANT_GL_IMPL(glFogi) +ANT_GL_IMPL(glFogiv) +ANT_GL_IMPL(glFrontFace) +ANT_GL_IMPL(glFrustum) +ANT_GL_IMPL(glGenLists) +ANT_GL_IMPL(glGenTextures) +ANT_GL_IMPL(glGetBooleanv) +ANT_GL_IMPL(glGetClipPlane) +ANT_GL_IMPL(glGetDoublev) +ANT_GL_IMPL(glGetError) +ANT_GL_IMPL(glGetFloatv) +ANT_GL_IMPL(glGetIntegerv) +ANT_GL_IMPL(glGetLightfv) +ANT_GL_IMPL(glGetLightiv) +ANT_GL_IMPL(glGetMapdv) +ANT_GL_IMPL(glGetMapfv) +ANT_GL_IMPL(glGetMapiv) +ANT_GL_IMPL(glGetMaterialfv) +ANT_GL_IMPL(glGetMaterialiv) +ANT_GL_IMPL(glGetPixelMapfv) +ANT_GL_IMPL(glGetPixelMapuiv) +ANT_GL_IMPL(glGetPixelMapusv) +ANT_GL_IMPL(glGetPointerv) +ANT_GL_IMPL(glGetPolygonStipple) +ANT_GL_IMPL(glGetString) +ANT_GL_IMPL(glGetTexEnvfv) +ANT_GL_IMPL(glGetTexEnviv) +ANT_GL_IMPL(glGetTexGendv) +ANT_GL_IMPL(glGetTexGenfv) +ANT_GL_IMPL(glGetTexGeniv) +ANT_GL_IMPL(glGetTexImage) +ANT_GL_IMPL(glGetTexLevelParameterfv) +ANT_GL_IMPL(glGetTexLevelParameteriv) +ANT_GL_IMPL(glGetTexParameterfv) +ANT_GL_IMPL(glGetTexParameteriv) +ANT_GL_IMPL(glHint) +ANT_GL_IMPL(glIndexMask) +ANT_GL_IMPL(glIndexPointer) +ANT_GL_IMPL(glIndexd) +ANT_GL_IMPL(glIndexdv) +ANT_GL_IMPL(glIndexf) +ANT_GL_IMPL(glIndexfv) +ANT_GL_IMPL(glIndexi) +ANT_GL_IMPL(glIndexiv) +ANT_GL_IMPL(glIndexs) +ANT_GL_IMPL(glIndexsv) +ANT_GL_IMPL(glIndexub) +ANT_GL_IMPL(glIndexubv) +ANT_GL_IMPL(glInitNames) +ANT_GL_IMPL(glInterleavedArrays) +ANT_GL_IMPL(glIsEnabled) +ANT_GL_IMPL(glIsList) +ANT_GL_IMPL(glIsTexture) +ANT_GL_IMPL(glLightModelf) +ANT_GL_IMPL(glLightModelfv) +ANT_GL_IMPL(glLightModeli) +ANT_GL_IMPL(glLightModeliv) +ANT_GL_IMPL(glLightf) +ANT_GL_IMPL(glLightfv) +ANT_GL_IMPL(glLighti) +ANT_GL_IMPL(glLightiv) +ANT_GL_IMPL(glLineStipple) +ANT_GL_IMPL(glLineWidth) +ANT_GL_IMPL(glListBase) +ANT_GL_IMPL(glLoadIdentity) +ANT_GL_IMPL(glLoadMatrixd) +ANT_GL_IMPL(glLoadMatrixf) +ANT_GL_IMPL(glLoadName) +ANT_GL_IMPL(glLogicOp) +ANT_GL_IMPL(glMap1d) +ANT_GL_IMPL(glMap1f) +ANT_GL_IMPL(glMap2d) +ANT_GL_IMPL(glMap2f) +ANT_GL_IMPL(glMapGrid1d) +ANT_GL_IMPL(glMapGrid1f) +ANT_GL_IMPL(glMapGrid2d) +ANT_GL_IMPL(glMapGrid2f) +ANT_GL_IMPL(glMaterialf) +ANT_GL_IMPL(glMaterialfv) +ANT_GL_IMPL(glMateriali) +ANT_GL_IMPL(glMaterialiv) +ANT_GL_IMPL(glMatrixMode) +ANT_GL_IMPL(glMultMatrixd) +ANT_GL_IMPL(glMultMatrixf) +ANT_GL_IMPL(glNewList) +ANT_GL_IMPL(glNormal3b) +ANT_GL_IMPL(glNormal3bv) +ANT_GL_IMPL(glNormal3d) +ANT_GL_IMPL(glNormal3dv) +ANT_GL_IMPL(glNormal3f) +ANT_GL_IMPL(glNormal3fv) +ANT_GL_IMPL(glNormal3i) +ANT_GL_IMPL(glNormal3iv) +ANT_GL_IMPL(glNormal3s) +ANT_GL_IMPL(glNormal3sv) +ANT_GL_IMPL(glNormalPointer) +ANT_GL_IMPL(glOrtho) +ANT_GL_IMPL(glPassThrough) +ANT_GL_IMPL(glPixelMapfv) +ANT_GL_IMPL(glPixelMapuiv) +ANT_GL_IMPL(glPixelMapusv) +ANT_GL_IMPL(glPixelStoref) +ANT_GL_IMPL(glPixelStorei) +ANT_GL_IMPL(glPixelTransferf) +ANT_GL_IMPL(glPixelTransferi) +ANT_GL_IMPL(glPixelZoom) +ANT_GL_IMPL(glPointSize) +ANT_GL_IMPL(glPolygonMode) +ANT_GL_IMPL(glPolygonOffset) +ANT_GL_IMPL(glPolygonStipple) +ANT_GL_IMPL(glPopAttrib) +ANT_GL_IMPL(glPopClientAttrib) +ANT_GL_IMPL(glPopMatrix) +ANT_GL_IMPL(glPopName) +ANT_GL_IMPL(glPrioritizeTextures) +ANT_GL_IMPL(glPushAttrib) +ANT_GL_IMPL(glPushClientAttrib) +ANT_GL_IMPL(glPushMatrix) +ANT_GL_IMPL(glPushName) +ANT_GL_IMPL(glRasterPos2d) +ANT_GL_IMPL(glRasterPos2dv) +ANT_GL_IMPL(glRasterPos2f) +ANT_GL_IMPL(glRasterPos2fv) +ANT_GL_IMPL(glRasterPos2i) +ANT_GL_IMPL(glRasterPos2iv) +ANT_GL_IMPL(glRasterPos2s) +ANT_GL_IMPL(glRasterPos2sv) +ANT_GL_IMPL(glRasterPos3d) +ANT_GL_IMPL(glRasterPos3dv) +ANT_GL_IMPL(glRasterPos3f) +ANT_GL_IMPL(glRasterPos3fv) +ANT_GL_IMPL(glRasterPos3i) +ANT_GL_IMPL(glRasterPos3iv) +ANT_GL_IMPL(glRasterPos3s) +ANT_GL_IMPL(glRasterPos3sv) +ANT_GL_IMPL(glRasterPos4d) +ANT_GL_IMPL(glRasterPos4dv) +ANT_GL_IMPL(glRasterPos4f) +ANT_GL_IMPL(glRasterPos4fv) +ANT_GL_IMPL(glRasterPos4i) +ANT_GL_IMPL(glRasterPos4iv) +ANT_GL_IMPL(glRasterPos4s) +ANT_GL_IMPL(glRasterPos4sv) +ANT_GL_IMPL(glReadBuffer) +ANT_GL_IMPL(glReadPixels) +ANT_GL_IMPL(glRectd) +ANT_GL_IMPL(glRectdv) +ANT_GL_IMPL(glRectf) +ANT_GL_IMPL(glRectfv) +ANT_GL_IMPL(glRecti) +ANT_GL_IMPL(glRectiv) +ANT_GL_IMPL(glRects) +ANT_GL_IMPL(glRectsv) +ANT_GL_IMPL(glRenderMode) +ANT_GL_IMPL(glRotated) +ANT_GL_IMPL(glRotatef) +ANT_GL_IMPL(glScaled) +ANT_GL_IMPL(glScalef) +ANT_GL_IMPL(glScissor) +ANT_GL_IMPL(glSelectBuffer) +ANT_GL_IMPL(glShadeModel) +ANT_GL_IMPL(glStencilFunc) +ANT_GL_IMPL(glStencilMask) +ANT_GL_IMPL(glStencilOp) +ANT_GL_IMPL(glTexCoord1d) +ANT_GL_IMPL(glTexCoord1dv) +ANT_GL_IMPL(glTexCoord1f) +ANT_GL_IMPL(glTexCoord1fv) +ANT_GL_IMPL(glTexCoord1i) +ANT_GL_IMPL(glTexCoord1iv) +ANT_GL_IMPL(glTexCoord1s) +ANT_GL_IMPL(glTexCoord1sv) +ANT_GL_IMPL(glTexCoord2d) +ANT_GL_IMPL(glTexCoord2dv) +ANT_GL_IMPL(glTexCoord2f) +ANT_GL_IMPL(glTexCoord2fv) +ANT_GL_IMPL(glTexCoord2i) +ANT_GL_IMPL(glTexCoord2iv) +ANT_GL_IMPL(glTexCoord2s) +ANT_GL_IMPL(glTexCoord2sv) +ANT_GL_IMPL(glTexCoord3d) +ANT_GL_IMPL(glTexCoord3dv) +ANT_GL_IMPL(glTexCoord3f) +ANT_GL_IMPL(glTexCoord3fv) +ANT_GL_IMPL(glTexCoord3i) +ANT_GL_IMPL(glTexCoord3iv) +ANT_GL_IMPL(glTexCoord3s) +ANT_GL_IMPL(glTexCoord3sv) +ANT_GL_IMPL(glTexCoord4d) +ANT_GL_IMPL(glTexCoord4dv) +ANT_GL_IMPL(glTexCoord4f) +ANT_GL_IMPL(glTexCoord4fv) +ANT_GL_IMPL(glTexCoord4i) +ANT_GL_IMPL(glTexCoord4iv) +ANT_GL_IMPL(glTexCoord4s) +ANT_GL_IMPL(glTexCoord4sv) +ANT_GL_IMPL(glTexCoordPointer) +ANT_GL_IMPL(glTexEnvf) +ANT_GL_IMPL(glTexEnvfv) +ANT_GL_IMPL(glTexEnvi) +ANT_GL_IMPL(glTexEnviv) +ANT_GL_IMPL(glTexGend) +ANT_GL_IMPL(glTexGendv) +ANT_GL_IMPL(glTexGenf) +ANT_GL_IMPL(glTexGenfv) +ANT_GL_IMPL(glTexGeni) +ANT_GL_IMPL(glTexGeniv) +ANT_GL_IMPL(glTexImage1D) +ANT_GL_IMPL(glTexImage2D) +ANT_GL_IMPL(glTexParameterf) +ANT_GL_IMPL(glTexParameterfv) +ANT_GL_IMPL(glTexParameteri) +ANT_GL_IMPL(glTexParameteriv) +ANT_GL_IMPL(glTexSubImage1D) +ANT_GL_IMPL(glTexSubImage2D) +ANT_GL_IMPL(glTranslated) +ANT_GL_IMPL(glTranslatef) +ANT_GL_IMPL(glVertex2d) +ANT_GL_IMPL(glVertex2dv) +ANT_GL_IMPL(glVertex2f) +ANT_GL_IMPL(glVertex2fv) +ANT_GL_IMPL(glVertex2i) +ANT_GL_IMPL(glVertex2iv) +ANT_GL_IMPL(glVertex2s) +ANT_GL_IMPL(glVertex2sv) +ANT_GL_IMPL(glVertex3d) +ANT_GL_IMPL(glVertex3dv) +ANT_GL_IMPL(glVertex3f) +ANT_GL_IMPL(glVertex3fv) +ANT_GL_IMPL(glVertex3i) +ANT_GL_IMPL(glVertex3iv) +ANT_GL_IMPL(glVertex3s) +ANT_GL_IMPL(glVertex3sv) +ANT_GL_IMPL(glVertex4d) +ANT_GL_IMPL(glVertex4dv) +ANT_GL_IMPL(glVertex4f) +ANT_GL_IMPL(glVertex4fv) +ANT_GL_IMPL(glVertex4i) +ANT_GL_IMPL(glVertex4iv) +ANT_GL_IMPL(glVertex4s) +ANT_GL_IMPL(glVertex4sv) +ANT_GL_IMPL(glVertexPointer) +ANT_GL_IMPL(glViewport) +#if defined(ANT_WINDOWS) +ANT_GL_IMPL(wglGetProcAddress) +#endif + +namespace GL { PFNGLGetProcAddress _glGetProcAddress = NULL; } + +// --------------------------------------------------------------------------- + +#if defined(ANT_WINDOWS) + + // --------------------------------------------------------------------------- + + int LoadOpenGL() + { + if( g_OGLModule!=NULL ) + { + return 1; // "OpenGL library already loaded" + } + + g_OGLModule = LoadLibrary("OPENGL32.DLL"); + if( g_OGLModule ) + { + // Info(VERB_LOW, "Load %d OpenGL functions", g_NbOGLFunc); + + int Res = 1; + for(int i=0; i0); + *(g_OGLFuncRec[i].m_FuncPtr) = reinterpret_cast(GetProcAddress(g_OGLModule, g_OGLFuncRec[i].m_Name)); + if( *(g_OGLFuncRec[i].m_FuncPtr)==NULL ) + Res = 0; // Error("cannot find OpenGL function"); + + } + + _glGetProcAddress = reinterpret_cast(_wglGetProcAddress); + if( _glGetProcAddress==NULL ) + Res = 0; + + return Res; + } + else + { + // InternDisplayLastErrorWIN("Cannot load opengl32 DLL", false); + return 0; // cannot load DLL + } + } + + // --------------------------------------------------------------------------- + + int UnloadOpenGL() + { + if( g_OGLModule==NULL ) + { + return 1; // "OpenGL library not loaded" + } + + // Info(VERB_LOW, "Unload %d OpenGL functions", g_NbOGLFunc); + for(int i=0; i0); + *(g_OGLFuncRec[i].m_FuncPtr) = NULL; + } + if( FreeLibrary(g_OGLModule) ) + { + // Info(VERB_LOW, "OpenGL library unloaded"); + g_OGLModule = NULL; + return 1; + } + else + { + // InternDisplayLastErrorWIN("Cannot unload opengl32 DLL", false); + return 0; // cannot unload opengl32.dll + } + } + + // --------------------------------------------------------------------------- + + namespace GL + { + + PFNOpenGL Record(const char *_FuncName, PFNOpenGL *_FuncPtr) + { + if( g_NbOGLFunc>=ANT_NB_OGL_FUNC_MAX ) + { + fprintf(stderr, "Too many OpenGL functions declared. Change ANT_NB_OGL_FUNC_MAX."); + exit(-1); + } + + g_OGLFuncRec[g_NbOGLFunc].m_Name = _FuncName; + g_OGLFuncRec[g_NbOGLFunc].m_FuncPtr = _FuncPtr; + ++g_NbOGLFunc; + + return NULL; + } + + } // namespace GL + + // --------------------------------------------------------------------------- + +#endif // defined(ANT_WINDOWS) + +// --------------------------------------------------------------------------- + +#if defined(ANT_UNIX) + + int LoadOpenGL() + { + _glGetProcAddress = reinterpret_cast(glXGetProcAddressARB); + + return 1; // "OpenGL library is statically linked" + } + + int UnloadOpenGL() + { + return 1; // "OpenGL library is statically linked" + } + +#elif defined(ANT_OSX) + + #include + + static void *gl_dyld = NULL; + void *NSGLGetProcAddressNew(const GLubyte *name) + { + void *proc=NULL; + if (gl_dyld == NULL) + { + gl_dyld = dlopen("OpenGL",RTLD_LAZY); + } + if (gl_dyld) + { + NSString *sym = [[NSString alloc] initWithFormat: @"_%s",name]; + proc = dlsym(gl_dyld,[sym UTF8String]); + [sym release]; + } + return proc; + } + + int LoadOpenGL() + { + _glGetProcAddress = reinterpret_cast(NSGLGetProcAddressNew); + return 1; + } + + int UnloadOpenGL() + { + if (gl_dyld) + { + dlclose(gl_dyld); + gl_dyld = NULL; + } + return 1; + } + +#endif // defined(ANT_UNIX) + +// --------------------------------------------------------------------------- diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGL.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGL.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGL.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/LoadOGL.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,397 @@ +// --------------------------------------------------------------------------- +// +// @file LoadOGL.h +// @brief OpenGL declarations for dynamic loading +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_LOAD_OGL_INCLUDED +#define ANT_LOAD_OGL_INCLUDED + + +#define ANT_GL_DECL(_Ret, _Fct, _Params) \ + extern "C" { typedef _Ret (APIENTRY* PFN##_Fct)_Params; } \ + namespace GL { extern PFN##_Fct _##_Fct; } \ + using GL::_##_Fct; + +#if defined(ANT_WINDOWS) +# define ANT_GL_IMPL(_Fct) \ + namespace GL { PFN##_Fct _##_Fct = (PFN##_Fct)Record(#_Fct, (PFNOpenGL*)(&_##_Fct)); } +#elif defined(ANT_UNIX) || defined(ANT_OSX) +# define ANT_GL_IMPL(_Fct) \ + namespace GL { PFN##_Fct _##_Fct = _Fct; } +# if !defined(APIENTRY) +# define APIENTRY +# endif +#endif + + +int LoadOpenGL(); +int UnloadOpenGL(); + +namespace GL +{ + extern "C" { typedef void (APIENTRY* PFNOpenGL)(); } + PFNOpenGL Record(const char *_FuncName, PFNOpenGL *_FuncPtr); + + extern "C" { typedef PFNOpenGL (APIENTRY *PFNGLGetProcAddress)(const char *); } + extern PFNGLGetProcAddress _glGetProcAddress; +} +using GL::_glGetProcAddress; + + +ANT_GL_DECL(void, glAccum, (GLenum op, GLfloat value)) +ANT_GL_DECL(void, glAlphaFunc, (GLenum func, GLclampf ref)) +ANT_GL_DECL(GLboolean, glAreTexturesResident, (GLsizei n, const GLuint *textures, GLboolean *residences)) +ANT_GL_DECL(void, glArrayElement, (GLint i)) +ANT_GL_DECL(void, glBegin, (GLenum mode)) +ANT_GL_DECL(void, glBindTexture, (GLenum target, GLuint texture)) +ANT_GL_DECL(void, glBitmap, (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)) +ANT_GL_DECL(void, glBlendFunc, (GLenum sfactor, GLenum dfactor)) +ANT_GL_DECL(void, glCallList, (GLuint list)) +ANT_GL_DECL(void, glCallLists, (GLsizei n, GLenum type, const GLvoid *lists)) +ANT_GL_DECL(void, glClear, (GLbitfield mask)) +ANT_GL_DECL(void, glClearAccum, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) +ANT_GL_DECL(void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) +ANT_GL_DECL(void, glClearDepth, (GLclampd depth)) +ANT_GL_DECL(void, glClearIndex, (GLfloat c)) +ANT_GL_DECL(void, glClearStencil, (GLint s)) +ANT_GL_DECL(void, glClipPlane, (GLenum plane, const GLdouble *equation)) +ANT_GL_DECL(void, glColor3b, (GLbyte red, GLbyte green, GLbyte blue)) +ANT_GL_DECL(void, glColor3bv, (const GLbyte *v)) +ANT_GL_DECL(void, glColor3d, (GLdouble red, GLdouble green, GLdouble blue)) +ANT_GL_DECL(void, glColor3dv, (const GLdouble *v)) +ANT_GL_DECL(void, glColor3f, (GLfloat red, GLfloat green, GLfloat blue)) +ANT_GL_DECL(void, glColor3fv, (const GLfloat *v)) +ANT_GL_DECL(void, glColor3i, (GLint red, GLint green, GLint blue)) +ANT_GL_DECL(void, glColor3iv, (const GLint *v)) +ANT_GL_DECL(void, glColor3s, (GLshort red, GLshort green, GLshort blue)) +ANT_GL_DECL(void, glColor3sv, (const GLshort *v)) +ANT_GL_DECL(void, glColor3ub, (GLubyte red, GLubyte green, GLubyte blue)) +ANT_GL_DECL(void, glColor3ubv, (const GLubyte *v)) +ANT_GL_DECL(void, glColor3ui, (GLuint red, GLuint green, GLuint blue)) +ANT_GL_DECL(void, glColor3uiv, (const GLuint *v)) +ANT_GL_DECL(void, glColor3us, (GLushort red, GLushort green, GLushort blue)) +ANT_GL_DECL(void, glColor3usv, (const GLushort *v)) +ANT_GL_DECL(void, glColor4b, (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)) +ANT_GL_DECL(void, glColor4bv, (const GLbyte *v)) +ANT_GL_DECL(void, glColor4d, (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)) +ANT_GL_DECL(void, glColor4dv, (const GLdouble *v)) +ANT_GL_DECL(void, glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) +ANT_GL_DECL(void, glColor4fv, (const GLfloat *v)) +ANT_GL_DECL(void, glColor4i, (GLint red, GLint green, GLint blue, GLint alpha)) +ANT_GL_DECL(void, glColor4iv, (const GLint *v)) +ANT_GL_DECL(void, glColor4s, (GLshort red, GLshort green, GLshort blue, GLshort alpha)) +ANT_GL_DECL(void, glColor4sv, (const GLshort *v)) +ANT_GL_DECL(void, glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)) +ANT_GL_DECL(void, glColor4ubv, (const GLubyte *v)) +ANT_GL_DECL(void, glColor4ui, (GLuint red, GLuint green, GLuint blue, GLuint alpha)) +ANT_GL_DECL(void, glColor4uiv, (const GLuint *v)) +ANT_GL_DECL(void, glColor4us, (GLushort red, GLushort green, GLushort blue, GLushort alpha)) +ANT_GL_DECL(void, glColor4usv, (const GLushort *v)) +ANT_GL_DECL(void, glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) +ANT_GL_DECL(void, glColorMaterial, (GLenum face, GLenum mode)) +ANT_GL_DECL(void, glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) +ANT_GL_DECL(void, glCopyPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)) +ANT_GL_DECL(void, glCopyTexImage1D, (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border)) +ANT_GL_DECL(void, glCopyTexImage2D, (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) +ANT_GL_DECL(void, glCopyTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) +ANT_GL_DECL(void, glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) +ANT_GL_DECL(void, glCullFace, (GLenum mode)) +ANT_GL_DECL(void, glDeleteLists, (GLuint list, GLsizei range)) +ANT_GL_DECL(void, glDeleteTextures, (GLsizei n, const GLuint *textures)) +ANT_GL_DECL(void, glDepthFunc, (GLenum func)) +ANT_GL_DECL(void, glDepthMask, (GLboolean flag)) +ANT_GL_DECL(void, glDepthRange, (GLclampd zNear, GLclampd zFar)) +ANT_GL_DECL(void, glDisable, (GLenum cap)) +ANT_GL_DECL(void, glDisableClientState, (GLenum array)) +ANT_GL_DECL(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count)) +ANT_GL_DECL(void, glDrawBuffer, (GLenum mode)) +ANT_GL_DECL(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)) +ANT_GL_DECL(void, glDrawPixels, (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_DECL(void, glEdgeFlag, (GLboolean flag)) +ANT_GL_DECL(void, glEdgeFlagPointer, (GLsizei stride, const void *pointer)) +ANT_GL_DECL(void, glEdgeFlagv, (const GLboolean *flag)) +ANT_GL_DECL(void, glEnable, (GLenum cap)) +ANT_GL_DECL(void, glEnableClientState, (GLenum array)) +ANT_GL_DECL(void, glEnd, (void)) +ANT_GL_DECL(void, glEndList, (void)) +ANT_GL_DECL(void, glEvalCoord1d, (GLdouble u)) +ANT_GL_DECL(void, glEvalCoord1dv, (const GLdouble *u)) +ANT_GL_DECL(void, glEvalCoord1f, (GLfloat u)) +ANT_GL_DECL(void, glEvalCoord1fv, (const GLfloat *u)) +ANT_GL_DECL(void, glEvalCoord2d, (GLdouble u, GLdouble v)) +ANT_GL_DECL(void, glEvalCoord2dv, (const GLdouble *u)) +ANT_GL_DECL(void, glEvalCoord2f, (GLfloat u, GLfloat v)) +ANT_GL_DECL(void, glEvalCoord2fv, (const GLfloat *u)) +ANT_GL_DECL(void, glEvalMesh1, (GLenum mode, GLint i1, GLint i2)) +ANT_GL_DECL(void, glEvalMesh2, (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)) +ANT_GL_DECL(void, glEvalPoint1, (GLint i)) +ANT_GL_DECL(void, glEvalPoint2, (GLint i, GLint j)) +ANT_GL_DECL(void, glFeedbackBuffer, (GLsizei size, GLenum type, GLfloat *buffer)) +ANT_GL_DECL(void, glFinish, (void)) +ANT_GL_DECL(void, glFlush, (void)) +ANT_GL_DECL(void, glFogf, (GLenum pname, GLfloat param)) +ANT_GL_DECL(void, glFogfv, (GLenum pname, const GLfloat *params)) +ANT_GL_DECL(void, glFogi, (GLenum pname, GLint param)) +ANT_GL_DECL(void, glFogiv, (GLenum pname, const GLint *params)) +ANT_GL_DECL(void, glFrontFace, (GLenum mode)) +ANT_GL_DECL(void, glFrustum, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) +ANT_GL_DECL(GLuint, glGenLists, (GLsizei range)) +ANT_GL_DECL(void, glGenTextures, (GLsizei n, GLuint *textures)) +ANT_GL_DECL(void, glGetBooleanv, (GLenum pname, GLboolean *params)) +ANT_GL_DECL(void, glGetClipPlane, (GLenum plane, GLdouble *equation)) +ANT_GL_DECL(void, glGetDoublev, (GLenum pname, GLdouble *params)) +ANT_GL_DECL(GLenum, glGetError, (void)) +ANT_GL_DECL(void, glGetFloatv, (GLenum pname, GLfloat *params)) +ANT_GL_DECL(void, glGetIntegerv, (GLenum pname, GLint *params)) +ANT_GL_DECL(void, glGetLightfv, (GLenum light, GLenum pname, GLfloat *params)) +ANT_GL_DECL(void, glGetLightiv, (GLenum light, GLenum pname, GLint *params)) +ANT_GL_DECL(void, glGetMapdv, (GLenum target, GLenum query, GLdouble *v)) +ANT_GL_DECL(void, glGetMapfv, (GLenum target, GLenum query, GLfloat *v)) +ANT_GL_DECL(void, glGetMapiv, (GLenum target, GLenum query, GLint *v)) +ANT_GL_DECL(void, glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params)) +ANT_GL_DECL(void, glGetMaterialiv, (GLenum face, GLenum pname, GLint *params)) +ANT_GL_DECL(void, glGetPixelMapfv, (GLenum map, GLfloat *values)) +ANT_GL_DECL(void, glGetPixelMapuiv, (GLenum map, GLuint *values)) +ANT_GL_DECL(void, glGetPixelMapusv, (GLenum map, GLushort *values)) +ANT_GL_DECL(void, glGetPointerv, (GLenum pname, GLvoid* *params)) +ANT_GL_DECL(void, glGetPolygonStipple, (GLubyte *mask)) +ANT_GL_DECL(const GLubyte *, glGetString, (GLenum name)) +ANT_GL_DECL(void, glGetTexEnvfv, (GLenum target, GLenum pname, GLfloat *params)) +ANT_GL_DECL(void, glGetTexEnviv, (GLenum target, GLenum pname, GLint *params)) +ANT_GL_DECL(void, glGetTexGendv, (GLenum coord, GLenum pname, GLdouble *params)) +ANT_GL_DECL(void, glGetTexGenfv, (GLenum coord, GLenum pname, GLfloat *params)) +ANT_GL_DECL(void, glGetTexGeniv, (GLenum coord, GLenum pname, GLint *params)) +ANT_GL_DECL(void, glGetTexImage, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)) +ANT_GL_DECL(void, glGetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params)) +ANT_GL_DECL(void, glGetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params)) +ANT_GL_DECL(void, glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params)) +ANT_GL_DECL(void, glGetTexParameteriv, (GLenum target, GLenum pname, GLint *params)) +ANT_GL_DECL(void, glHint, (GLenum target, GLenum mode)) +ANT_GL_DECL(void, glIndexMask, (GLuint mask)) +ANT_GL_DECL(void, glIndexPointer, (GLenum type, GLsizei stride, const GLvoid *pointer)) +ANT_GL_DECL(void, glIndexd, (GLdouble c)) +ANT_GL_DECL(void, glIndexdv, (const GLdouble *c)) +ANT_GL_DECL(void, glIndexf, (GLfloat c)) +ANT_GL_DECL(void, glIndexfv, (const GLfloat *c)) +ANT_GL_DECL(void, glIndexi, (GLint c)) +ANT_GL_DECL(void, glIndexiv, (const GLint *c)) +ANT_GL_DECL(void, glIndexs, (GLshort c)) +ANT_GL_DECL(void, glIndexsv, (const GLshort *c)) +ANT_GL_DECL(void, glIndexub, (GLubyte c)) +ANT_GL_DECL(void, glIndexubv, (const GLubyte *c)) +ANT_GL_DECL(void, glInitNames, (void)) +ANT_GL_DECL(void, glInterleavedArrays, (GLenum format, GLsizei stride, const GLvoid *pointer)) +ANT_GL_DECL(GLboolean, glIsEnabled, (GLenum cap)) +ANT_GL_DECL(GLboolean, glIsList, (GLuint list)) +ANT_GL_DECL(GLboolean, glIsTexture, (GLuint texture)) +ANT_GL_DECL(void, glLightModelf, (GLenum pname, GLfloat param)) +ANT_GL_DECL(void, glLightModelfv, (GLenum pname, const GLfloat *params)) +ANT_GL_DECL(void, glLightModeli, (GLenum pname, GLint param)) +ANT_GL_DECL(void, glLightModeliv, (GLenum pname, const GLint *params)) +ANT_GL_DECL(void, glLightf, (GLenum light, GLenum pname, GLfloat param)) +ANT_GL_DECL(void, glLightfv, (GLenum light, GLenum pname, const GLfloat *params)) +ANT_GL_DECL(void, glLighti, (GLenum light, GLenum pname, GLint param)) +ANT_GL_DECL(void, glLightiv, (GLenum light, GLenum pname, const GLint *params)) +ANT_GL_DECL(void, glLineStipple, (GLint factor, GLushort pattern)) +ANT_GL_DECL(void, glLineWidth, (GLfloat width)) +ANT_GL_DECL(void, glListBase, (GLuint base)) +ANT_GL_DECL(void, glLoadIdentity, (void)) +ANT_GL_DECL(void, glLoadMatrixd, (const GLdouble *m)) +ANT_GL_DECL(void, glLoadMatrixf, (const GLfloat *m)) +ANT_GL_DECL(void, glLoadName, (GLuint name)) +ANT_GL_DECL(void, glLogicOp, (GLenum opcode)) +ANT_GL_DECL(void, glMap1d, (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)) +ANT_GL_DECL(void, glMap1f, (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)) +ANT_GL_DECL(void, glMap2d, (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)) +ANT_GL_DECL(void, glMap2f, (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)) +ANT_GL_DECL(void, glMapGrid1d, (GLint un, GLdouble u1, GLdouble u2)) +ANT_GL_DECL(void, glMapGrid1f, (GLint un, GLfloat u1, GLfloat u2)) +ANT_GL_DECL(void, glMapGrid2d, (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)) +ANT_GL_DECL(void, glMapGrid2f, (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)) +ANT_GL_DECL(void, glMaterialf, (GLenum face, GLenum pname, GLfloat param)) +ANT_GL_DECL(void, glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params)) +ANT_GL_DECL(void, glMateriali, (GLenum face, GLenum pname, GLint param)) +ANT_GL_DECL(void, glMaterialiv, (GLenum face, GLenum pname, const GLint *params)) +ANT_GL_DECL(void, glMatrixMode, (GLenum mode)) +ANT_GL_DECL(void, glMultMatrixd, (const GLdouble *m)) +ANT_GL_DECL(void, glMultMatrixf, (const GLfloat *m)) +ANT_GL_DECL(void, glNewList, (GLuint list, GLenum mode)) +ANT_GL_DECL(void, glNormal3b, (GLbyte nx, GLbyte ny, GLbyte nz)) +ANT_GL_DECL(void, glNormal3bv, (const GLbyte *v)) +ANT_GL_DECL(void, glNormal3d, (GLdouble nx, GLdouble ny, GLdouble nz)) +ANT_GL_DECL(void, glNormal3dv, (const GLdouble *v)) +ANT_GL_DECL(void, glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz)) +ANT_GL_DECL(void, glNormal3fv, (const GLfloat *v)) +ANT_GL_DECL(void, glNormal3i, (GLint nx, GLint ny, GLint nz)) +ANT_GL_DECL(void, glNormal3iv, (const GLint *v)) +ANT_GL_DECL(void, glNormal3s, (GLshort nx, GLshort ny, GLshort nz)) +ANT_GL_DECL(void, glNormal3sv, (const GLshort *v)) +ANT_GL_DECL(void, glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer)) +ANT_GL_DECL(void, glOrtho, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) +ANT_GL_DECL(void, glPassThrough, (GLfloat token)) +ANT_GL_DECL(void, glPixelMapfv, (GLenum map, GLsizei mapsize, const GLfloat *values)) +ANT_GL_DECL(void, glPixelMapuiv, (GLenum map, GLsizei mapsize, const GLuint *values)) +ANT_GL_DECL(void, glPixelMapusv, (GLenum map, GLsizei mapsize, const GLushort *values)) +ANT_GL_DECL(void, glPixelStoref, (GLenum pname, GLfloat param)) +ANT_GL_DECL(void, glPixelStorei, (GLenum pname, GLint param)) +ANT_GL_DECL(void, glPixelTransferf, (GLenum pname, GLfloat param)) +ANT_GL_DECL(void, glPixelTransferi, (GLenum pname, GLint param)) +ANT_GL_DECL(void, glPixelZoom, (GLfloat xfactor, GLfloat yfactor)) +ANT_GL_DECL(void, glPointSize, (GLfloat size)) +ANT_GL_DECL(void, glPolygonMode, (GLenum face, GLenum mode)) +ANT_GL_DECL(void, glPolygonOffset, (GLfloat factor, GLfloat units)) +ANT_GL_DECL(void, glPolygonStipple, (const GLubyte *mask)) +ANT_GL_DECL(void, glPopAttrib, (void)) +ANT_GL_DECL(void, glPopClientAttrib, (void)) +ANT_GL_DECL(void, glPopMatrix, (void)) +ANT_GL_DECL(void, glPopName, (void)) +ANT_GL_DECL(void, glPrioritizeTextures, (GLsizei n, const GLuint *textures, const GLclampf *priorities)) +ANT_GL_DECL(void, glPushAttrib, (GLbitfield mask)) +ANT_GL_DECL(void, glPushClientAttrib, (GLbitfield mask)) +ANT_GL_DECL(void, glPushMatrix, (void)) +ANT_GL_DECL(void, glPushName, (GLuint name)) +ANT_GL_DECL(void, glRasterPos2d, (GLdouble x, GLdouble y)) +ANT_GL_DECL(void, glRasterPos2dv, (const GLdouble *v)) +ANT_GL_DECL(void, glRasterPos2f, (GLfloat x, GLfloat y)) +ANT_GL_DECL(void, glRasterPos2fv, (const GLfloat *v)) +ANT_GL_DECL(void, glRasterPos2i, (GLint x, GLint y)) +ANT_GL_DECL(void, glRasterPos2iv, (const GLint *v)) +ANT_GL_DECL(void, glRasterPos2s, (GLshort x, GLshort y)) +ANT_GL_DECL(void, glRasterPos2sv, (const GLshort *v)) +ANT_GL_DECL(void, glRasterPos3d, (GLdouble x, GLdouble y, GLdouble z)) +ANT_GL_DECL(void, glRasterPos3dv, (const GLdouble *v)) +ANT_GL_DECL(void, glRasterPos3f, (GLfloat x, GLfloat y, GLfloat z)) +ANT_GL_DECL(void, glRasterPos3fv, (const GLfloat *v)) +ANT_GL_DECL(void, glRasterPos3i, (GLint x, GLint y, GLint z)) +ANT_GL_DECL(void, glRasterPos3iv, (const GLint *v)) +ANT_GL_DECL(void, glRasterPos3s, (GLshort x, GLshort y, GLshort z)) +ANT_GL_DECL(void, glRasterPos3sv, (const GLshort *v)) +ANT_GL_DECL(void, glRasterPos4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w)) +ANT_GL_DECL(void, glRasterPos4dv, (const GLdouble *v)) +ANT_GL_DECL(void, glRasterPos4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w)) +ANT_GL_DECL(void, glRasterPos4fv, (const GLfloat *v)) +ANT_GL_DECL(void, glRasterPos4i, (GLint x, GLint y, GLint z, GLint w)) +ANT_GL_DECL(void, glRasterPos4iv, (const GLint *v)) +ANT_GL_DECL(void, glRasterPos4s, (GLshort x, GLshort y, GLshort z, GLshort w)) +ANT_GL_DECL(void, glRasterPos4sv, (const GLshort *v)) +ANT_GL_DECL(void, glReadBuffer, (GLenum mode)) +ANT_GL_DECL(void, glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)) +ANT_GL_DECL(void, glRectd, (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)) +ANT_GL_DECL(void, glRectdv, (const GLdouble *v1, const GLdouble *v2)) +ANT_GL_DECL(void, glRectf, (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)) +ANT_GL_DECL(void, glRectfv, (const GLfloat *v1, const GLfloat *v2)) +ANT_GL_DECL(void, glRecti, (GLint x1, GLint y1, GLint x2, GLint y2)) +ANT_GL_DECL(void, glRectiv, (const GLint *v1, const GLint *v2)) +ANT_GL_DECL(void, glRects, (GLshort x1, GLshort y1, GLshort x2, GLshort y2)) +ANT_GL_DECL(void, glRectsv, (const GLshort *v1, const GLshort *v2)) +ANT_GL_DECL(GLint, glRenderMode, (GLenum mode)) +ANT_GL_DECL(void, glRotated, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z)) +ANT_GL_DECL(void, glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) +ANT_GL_DECL(void, glScaled, (GLdouble x, GLdouble y, GLdouble z)) +ANT_GL_DECL(void, glScalef, (GLfloat x, GLfloat y, GLfloat z)) +ANT_GL_DECL(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height)) +ANT_GL_DECL(void, glSelectBuffer, (GLsizei size, GLuint *buffer)) +ANT_GL_DECL(void, glShadeModel, (GLenum mode)) +ANT_GL_DECL(void, glStencilFunc, (GLenum func, GLint ref, GLuint mask)) +ANT_GL_DECL(void, glStencilMask, (GLuint mask)) +ANT_GL_DECL(void, glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass)) +ANT_GL_DECL(void, glTexCoord1d, (GLdouble s)) +ANT_GL_DECL(void, glTexCoord1dv, (const GLdouble *v)) +ANT_GL_DECL(void, glTexCoord1f, (GLfloat s)) +ANT_GL_DECL(void, glTexCoord1fv, (const GLfloat *v)) +ANT_GL_DECL(void, glTexCoord1i, (GLint s)) +ANT_GL_DECL(void, glTexCoord1iv, (const GLint *v)) +ANT_GL_DECL(void, glTexCoord1s, (GLshort s)) +ANT_GL_DECL(void, glTexCoord1sv, (const GLshort *v)) +ANT_GL_DECL(void, glTexCoord2d, (GLdouble s, GLdouble t)) +ANT_GL_DECL(void, glTexCoord2dv, (const GLdouble *v)) +ANT_GL_DECL(void, glTexCoord2f, (GLfloat s, GLfloat t)) +ANT_GL_DECL(void, glTexCoord2fv, (const GLfloat *v)) +ANT_GL_DECL(void, glTexCoord2i, (GLint s, GLint t)) +ANT_GL_DECL(void, glTexCoord2iv, (const GLint *v)) +ANT_GL_DECL(void, glTexCoord2s, (GLshort s, GLshort t)) +ANT_GL_DECL(void, glTexCoord2sv, (const GLshort *v)) +ANT_GL_DECL(void, glTexCoord3d, (GLdouble s, GLdouble t, GLdouble r)) +ANT_GL_DECL(void, glTexCoord3dv, (const GLdouble *v)) +ANT_GL_DECL(void, glTexCoord3f, (GLfloat s, GLfloat t, GLfloat r)) +ANT_GL_DECL(void, glTexCoord3fv, (const GLfloat *v)) +ANT_GL_DECL(void, glTexCoord3i, (GLint s, GLint t, GLint r)) +ANT_GL_DECL(void, glTexCoord3iv, (const GLint *v)) +ANT_GL_DECL(void, glTexCoord3s, (GLshort s, GLshort t, GLshort r)) +ANT_GL_DECL(void, glTexCoord3sv, (const GLshort *v)) +ANT_GL_DECL(void, glTexCoord4d, (GLdouble s, GLdouble t, GLdouble r, GLdouble q)) +ANT_GL_DECL(void, glTexCoord4dv, (const GLdouble *v)) +ANT_GL_DECL(void, glTexCoord4f, (GLfloat s, GLfloat t, GLfloat r, GLfloat q)) +ANT_GL_DECL(void, glTexCoord4fv, (const GLfloat *v)) +ANT_GL_DECL(void, glTexCoord4i, (GLint s, GLint t, GLint r, GLint q)) +ANT_GL_DECL(void, glTexCoord4iv, (const GLint *v)) +ANT_GL_DECL(void, glTexCoord4s, (GLshort s, GLshort t, GLshort r, GLshort q)) +ANT_GL_DECL(void, glTexCoord4sv, (const GLshort *v)) +ANT_GL_DECL(void, glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) +ANT_GL_DECL(void, glTexEnvf, (GLenum target, GLenum pname, GLfloat param)) +ANT_GL_DECL(void, glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params)) +ANT_GL_DECL(void, glTexEnvi, (GLenum target, GLenum pname, GLint param)) +ANT_GL_DECL(void, glTexEnviv, (GLenum target, GLenum pname, const GLint *params)) +ANT_GL_DECL(void, glTexGend, (GLenum coord, GLenum pname, GLdouble param)) +ANT_GL_DECL(void, glTexGendv, (GLenum coord, GLenum pname, const GLdouble *params)) +ANT_GL_DECL(void, glTexGenf, (GLenum coord, GLenum pname, GLfloat param)) +ANT_GL_DECL(void, glTexGenfv, (GLenum coord, GLenum pname, const GLfloat *params)) +ANT_GL_DECL(void, glTexGeni, (GLenum coord, GLenum pname, GLint param)) +ANT_GL_DECL(void, glTexGeniv, (GLenum coord, GLenum pname, const GLint *params)) +#if defined(ANT_OSX) && (MAC_OS_X_VERSION_MAX_ALLOWED < 1070) +// Mac OSX < 10.7 redefines these OpenGL calls: glTexImage1D, glTexImage2D +ANT_GL_DECL(void, glTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_DECL(void, glTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +#else +ANT_GL_DECL(void, glTexImage1D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_DECL(void, glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) +#endif +ANT_GL_DECL(void, glTexParameterf, (GLenum target, GLenum pname, GLfloat param)) +ANT_GL_DECL(void, glTexParameterfv, (GLenum target, GLenum pname, const GLfloat *params)) +ANT_GL_DECL(void, glTexParameteri, (GLenum target, GLenum pname, GLint param)) +ANT_GL_DECL(void, glTexParameteriv, (GLenum target, GLenum pname, const GLint *params)) +ANT_GL_DECL(void, glTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_DECL(void, glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) +ANT_GL_DECL(void, glTranslated, (GLdouble x, GLdouble y, GLdouble z)) +ANT_GL_DECL(void, glTranslatef, (GLfloat x, GLfloat y, GLfloat z)) +ANT_GL_DECL(void, glVertex2d, (GLdouble x, GLdouble y)) +ANT_GL_DECL(void, glVertex2dv, (const GLdouble *v)) +ANT_GL_DECL(void, glVertex2f, (GLfloat x, GLfloat y)) +ANT_GL_DECL(void, glVertex2fv, (const GLfloat *v)) +ANT_GL_DECL(void, glVertex2i, (GLint x, GLint y)) +ANT_GL_DECL(void, glVertex2iv, (const GLint *v)) +ANT_GL_DECL(void, glVertex2s, (GLshort x, GLshort y)) +ANT_GL_DECL(void, glVertex2sv, (const GLshort *v)) +ANT_GL_DECL(void, glVertex3d, (GLdouble x, GLdouble y, GLdouble z)) +ANT_GL_DECL(void, glVertex3dv, (const GLdouble *v)) +ANT_GL_DECL(void, glVertex3f, (GLfloat x, GLfloat y, GLfloat z)) +ANT_GL_DECL(void, glVertex3fv, (const GLfloat *v)) +ANT_GL_DECL(void, glVertex3i, (GLint x, GLint y, GLint z)) +ANT_GL_DECL(void, glVertex3iv, (const GLint *v)) +ANT_GL_DECL(void, glVertex3s, (GLshort x, GLshort y, GLshort z)) +ANT_GL_DECL(void, glVertex3sv, (const GLshort *v)) +ANT_GL_DECL(void, glVertex4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w)) +ANT_GL_DECL(void, glVertex4dv, (const GLdouble *v)) +ANT_GL_DECL(void, glVertex4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w)) +ANT_GL_DECL(void, glVertex4fv, (const GLfloat *v)) +ANT_GL_DECL(void, glVertex4i, (GLint x, GLint y, GLint z, GLint w)) +ANT_GL_DECL(void, glVertex4iv, (const GLint *v)) +ANT_GL_DECL(void, glVertex4s, (GLshort x, GLshort y, GLshort z, GLshort w)) +ANT_GL_DECL(void, glVertex4sv, (const GLshort *v)) +ANT_GL_DECL(void, glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) +ANT_GL_DECL(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height)) + +#ifdef ANT_WINDOWS +ANT_GL_DECL(PROC, wglGetProcAddress, (LPCSTR)) +#endif + + +#endif // !defined ANT_LOAD_OGL_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/Makefile.am ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/Makefile.am --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,34 @@ +noinst_LTLIBRARIES = libAntTweakBar.la + +AM_CPPFLAGS = -I${top_srcdir}/include $(OPENGL_FLAGS) +AM_LDFLAGS = $(OPENGL_LIBS) + +libAntTweakBar_la_SOURCES = AntPerfTimer.h \ + LoadOGL.cpp \ + LoadOGL.h \ + MiniGLFW.h \ + MiniGLUT.h \ + MiniSDL12.h \ + MiniSDL13.h \ + MiniSFML16.h \ + resource.h \ + TwBar.cpp \ + TwBar.h \ + TwColors.cpp \ + TwColors.h \ + TwEventGLFW.c \ + TwEventGLUT.c \ + TwEventSDL.c \ + TwEventSDL12.c \ + TwEventSDL13.c \ + TwEventSFML.cpp \ + TwFonts.cpp \ + TwFonts.h \ + TwGraph.h \ + TwMgr.cpp \ + TwMgr.h \ + TwOpenGL.cpp \ + TwOpenGL.h \ + TwPrecomp.cpp \ + TwPrecomp.h + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniGLFW.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniGLFW.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniGLFW.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniGLFW.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,109 @@ +// --------------------------------------------------------------------------- +// +// @file MiniGLFW.h +// @brief A subset of GLFW definitions needed to compile helper functions +// implemented in TwEventGLFW.c +// +// notes: - Private header +// - AntTweakBar.dll does not need to link with GLFW, +// it just needs some definitions for its helper functions. +// - This header is provided to avoid the need of having GLFW +// installed to recompile AntTweakBar. +// - Do not use this header in your own programs, better use the +// glfw.h header from the actual GLFW library SDK : +// http://glfw.sourceforge.net/ +// +// --------------------------------------------------------------------------- + +#if !defined MINI_GLFW_INCLUDED +#define MINI_GLFW_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + + +// Key and button state/action definitions +#define GLFW_RELEASE 0 +#define GLFW_PRESS 1 + +// Keyboard key definitions +#define GLFW_KEY_UNKNOWN -1 +#define GLFW_KEY_SPACE 32 +#define GLFW_KEY_SPECIAL 256 +#define GLFW_KEY_ESC (GLFW_KEY_SPECIAL+1) +#define GLFW_KEY_F1 (GLFW_KEY_SPECIAL+2) +#define GLFW_KEY_F2 (GLFW_KEY_SPECIAL+3) +#define GLFW_KEY_F3 (GLFW_KEY_SPECIAL+4) +#define GLFW_KEY_F4 (GLFW_KEY_SPECIAL+5) +#define GLFW_KEY_F5 (GLFW_KEY_SPECIAL+6) +#define GLFW_KEY_F6 (GLFW_KEY_SPECIAL+7) +#define GLFW_KEY_F7 (GLFW_KEY_SPECIAL+8) +#define GLFW_KEY_F8 (GLFW_KEY_SPECIAL+9) +#define GLFW_KEY_F9 (GLFW_KEY_SPECIAL+10) +#define GLFW_KEY_F10 (GLFW_KEY_SPECIAL+11) +#define GLFW_KEY_F11 (GLFW_KEY_SPECIAL+12) +#define GLFW_KEY_F12 (GLFW_KEY_SPECIAL+13) +#define GLFW_KEY_F13 (GLFW_KEY_SPECIAL+14) +#define GLFW_KEY_F14 (GLFW_KEY_SPECIAL+15) +#define GLFW_KEY_F15 (GLFW_KEY_SPECIAL+16) +#define GLFW_KEY_F16 (GLFW_KEY_SPECIAL+17) +#define GLFW_KEY_F17 (GLFW_KEY_SPECIAL+18) +#define GLFW_KEY_F18 (GLFW_KEY_SPECIAL+19) +#define GLFW_KEY_F19 (GLFW_KEY_SPECIAL+20) +#define GLFW_KEY_F20 (GLFW_KEY_SPECIAL+21) +#define GLFW_KEY_F21 (GLFW_KEY_SPECIAL+22) +#define GLFW_KEY_F22 (GLFW_KEY_SPECIAL+23) +#define GLFW_KEY_F23 (GLFW_KEY_SPECIAL+24) +#define GLFW_KEY_F24 (GLFW_KEY_SPECIAL+25) +#define GLFW_KEY_F25 (GLFW_KEY_SPECIAL+26) +#define GLFW_KEY_UP (GLFW_KEY_SPECIAL+27) +#define GLFW_KEY_DOWN (GLFW_KEY_SPECIAL+28) +#define GLFW_KEY_LEFT (GLFW_KEY_SPECIAL+29) +#define GLFW_KEY_RIGHT (GLFW_KEY_SPECIAL+30) +#define GLFW_KEY_LSHIFT (GLFW_KEY_SPECIAL+31) +#define GLFW_KEY_RSHIFT (GLFW_KEY_SPECIAL+32) +#define GLFW_KEY_LCTRL (GLFW_KEY_SPECIAL+33) +#define GLFW_KEY_RCTRL (GLFW_KEY_SPECIAL+34) +#define GLFW_KEY_LALT (GLFW_KEY_SPECIAL+35) +#define GLFW_KEY_RALT (GLFW_KEY_SPECIAL+36) +#define GLFW_KEY_TAB (GLFW_KEY_SPECIAL+37) +#define GLFW_KEY_ENTER (GLFW_KEY_SPECIAL+38) +#define GLFW_KEY_BACKSPACE (GLFW_KEY_SPECIAL+39) +#define GLFW_KEY_INSERT (GLFW_KEY_SPECIAL+40) +#define GLFW_KEY_DEL (GLFW_KEY_SPECIAL+41) +#define GLFW_KEY_PAGEUP (GLFW_KEY_SPECIAL+42) +#define GLFW_KEY_PAGEDOWN (GLFW_KEY_SPECIAL+43) +#define GLFW_KEY_HOME (GLFW_KEY_SPECIAL+44) +#define GLFW_KEY_END (GLFW_KEY_SPECIAL+45) +#define GLFW_KEY_KP_0 (GLFW_KEY_SPECIAL+46) +#define GLFW_KEY_KP_1 (GLFW_KEY_SPECIAL+47) +#define GLFW_KEY_KP_2 (GLFW_KEY_SPECIAL+48) +#define GLFW_KEY_KP_3 (GLFW_KEY_SPECIAL+49) +#define GLFW_KEY_KP_4 (GLFW_KEY_SPECIAL+50) +#define GLFW_KEY_KP_5 (GLFW_KEY_SPECIAL+51) +#define GLFW_KEY_KP_6 (GLFW_KEY_SPECIAL+52) +#define GLFW_KEY_KP_7 (GLFW_KEY_SPECIAL+53) +#define GLFW_KEY_KP_8 (GLFW_KEY_SPECIAL+54) +#define GLFW_KEY_KP_9 (GLFW_KEY_SPECIAL+55) +#define GLFW_KEY_KP_DIVIDE (GLFW_KEY_SPECIAL+56) +#define GLFW_KEY_KP_MULTIPLY (GLFW_KEY_SPECIAL+57) +#define GLFW_KEY_KP_SUBTRACT (GLFW_KEY_SPECIAL+58) +#define GLFW_KEY_KP_ADD (GLFW_KEY_SPECIAL+59) +#define GLFW_KEY_KP_DECIMAL (GLFW_KEY_SPECIAL+60) +#define GLFW_KEY_KP_EQUAL (GLFW_KEY_SPECIAL+61) +#define GLFW_KEY_KP_ENTER (GLFW_KEY_SPECIAL+62) +#define GLFW_KEY_LAST GLFW_KEY_KP_ENTER + +// Mouse button +#define GLFW_MOUSE_BUTTON_LEFT 0 +#define GLFW_MOUSE_BUTTON_RIGHT 1 +#define GLFW_MOUSE_BUTTON_MIDDLE 2 + + +#ifdef __cplusplus +} +#endif + +#endif // !defined MINI_GLFW_INCLUDED + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniGLUT.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniGLUT.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniGLUT.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniGLUT.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,142 @@ +// --------------------------------------------------------------------------- +// +// @file MiniGLUT.h +// @brief A subset of GLUT definitions needed to compile helper functions +// implemented in TwEventGLUT.c +// +// notes: - Private header +// - AntTweakBar.dll does not need to link with GLUT, +// it just needs some definitions for its helper functions. +// - This header is provided to avoid the need of having GLUT +// installed to recompile AntTweakBar. +// - Do not use this header in your own programs, better use the +// GLUT.h header from the actual GLUT library SDK : +// http://opengl.org/resources/libraries/glut +// +// --------------------------------------------------------------------------- + +#if !defined MINI_GLUT_INCLUDED +#define MINI_GLUT_INCLUDED + +#if defined(_WIN32) || defined(_WIN64) +# define WIN32_LEAN_AND_MEAN +# include // needed by gl.h +# define GLUT_CALL __stdcall +# define GLUT_CALLBACK __cdecl +# define GLUT_API __declspec(dllimport) +#else +# define GLUT_CALL +# define GLUT_CALLBACK +# define GLUT_API extern +#endif + +#if defined(_MACOSX) +# include +# include +#else +# include // must be included after windows.h +# include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +// Mouse buttons +#define GLUT_LEFT_BUTTON 0 +#define GLUT_MIDDLE_BUTTON 1 +#define GLUT_RIGHT_BUTTON 2 + +// Mouse button state +#define GLUT_DOWN 0 +#define GLUT_UP 1 + +// glutGetModifiers return mask +#define GLUT_ACTIVE_SHIFT 1 +#define GLUT_ACTIVE_CTRL 2 +#define GLUT_ACTIVE_ALT 4 + +// function keys +#define GLUT_KEY_F1 1 +#define GLUT_KEY_F2 2 +#define GLUT_KEY_F3 3 +#define GLUT_KEY_F4 4 +#define GLUT_KEY_F5 5 +#define GLUT_KEY_F6 6 +#define GLUT_KEY_F7 7 +#define GLUT_KEY_F8 8 +#define GLUT_KEY_F9 9 +#define GLUT_KEY_F10 10 +#define GLUT_KEY_F11 11 +#define GLUT_KEY_F12 12 + +// directional keys +#define GLUT_KEY_LEFT 100 +#define GLUT_KEY_UP 101 +#define GLUT_KEY_RIGHT 102 +#define GLUT_KEY_DOWN 103 +#define GLUT_KEY_PAGE_UP 104 +#define GLUT_KEY_PAGE_DOWN 105 +#define GLUT_KEY_HOME 106 +#define GLUT_KEY_END 107 +#define GLUT_KEY_INSERT 108 + +// display mode bit masks +#define GLUT_RGB 0 +#define GLUT_RGBA GLUT_RGB +#define GLUT_INDEX 1 +#define GLUT_SINGLE 0 +#define GLUT_DOUBLE 2 +#define GLUT_ACCUM 4 +#define GLUT_ALPHA 8 +#define GLUT_DEPTH 16 +#define GLUT_STENCIL 32 + +// timer +#define GLUT_ELAPSED_TIME ((GLenum) 700) + + +// functions subset +GLUT_API void GLUT_CALL glutInit(int *argcp, char **argv); +GLUT_API void GLUT_CALL glutInitDisplayMode(unsigned int mode); +GLUT_API int GLUT_CALL glutCreateWindow(const char *title); +GLUT_API int GLUT_CALL glutGetWindow(void); +GLUT_API void GLUT_CALL glutSetWindow(int win); +GLUT_API int GLUT_CALL glutCreateSubWindow(int win, int x, int y, int width, int height); +GLUT_API int GLUT_CALL glutGet(GLenum type); +GLUT_API void GLUT_CALL glutSwapBuffers(); +GLUT_API void GLUT_CALL glutPostRedisplay(); +GLUT_API void GLUT_CALL glutInitWindowPosition(int x, int y); +GLUT_API void GLUT_CALL glutInitWindowSize(int width, int height); +GLUT_API void GLUT_CALL glutPositionWindow(int x, int y); +GLUT_API void GLUT_CALL glutReshapeWindow(int width, int height); +GLUT_API void GLUT_CALL glutMainLoop(); +GLUT_API int GLUT_CALL glutCreateMenu(void (GLUT_CALLBACK *func)(int)); +GLUT_API void GLUT_CALL glutDisplayFunc(void (GLUT_CALLBACK *func)(void)); +GLUT_API void GLUT_CALL glutReshapeFunc(void (GLUT_CALLBACK *func)(int width, int height)); +GLUT_API void GLUT_CALL glutKeyboardFunc(void (GLUT_CALLBACK *func)(unsigned char key, int x, int y)); +GLUT_API void GLUT_CALL glutMouseFunc(void (GLUT_CALLBACK *func)(int button, int state, int x, int y)); +GLUT_API void GLUT_CALL glutMotionFunc(void (GLUT_CALLBACK *func)(int x, int y)); +GLUT_API void GLUT_CALL glutPassiveMotionFunc(void (GLUT_CALLBACK *func)(int x, int y)); +GLUT_API void GLUT_CALL glutSpecialFunc(void (GLUT_CALLBACK *func)(int key, int x, int y)); +GLUT_API int GLUT_CALL glutGetModifiers(void); +GLUT_API void GLUT_CALL glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); +GLUT_API void GLUT_CALL glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); +GLUT_API void GLUT_CALL glutSolidTeapot(GLdouble size); + +// GLUT exit problem workaround (see glut.h) +#if (defined(_WIN32) || defined(_WIN64)) && !defined(GLUT_DISABLE_ATEXIT_HACK) + extern void __cdecl exit(int); + GLUT_API void GLUT_CALL __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); + static void GLUT_CALL glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } + #define glutInit glutInit_ATEXIT_HACK +#endif + + +#ifdef __cplusplus +} +#endif + +#endif // !defined MINI_GLUT_INCLUDED + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSDL12.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSDL12.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSDL12.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSDL12.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,339 @@ +// --------------------------------------------------------------------------- +// +// @file MiniSDL12.h +// @brief A subset of SDL 1.2 definitions needed to compile helper +// functions implemented in TwEventSDL12.c +// +// notes: - Private header +// - AntTweakBar.dll does not need to link with SDL, +// it just needs some definitions for its helper functions. +// - This header is provided to avoid the need of having SDL +// installed to recompile AntTweakBar. +// - Do not use this header in your own programs, better use the +// SDL.h header from the actual SDL library SDK : +// http://www.libsdl.org +// +// --------------------------------------------------------------------------- + +#if !defined MINI_SDL12_INCLUDED +#define MINI_SDL12_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +#define SDL_MAJOR_VERSION 1 +#define SDL_MINOR_VERSION 2 + +#if defined(_WIN32) || defined(_WIN64) +# define SDL_DECLSPEC __declspec(dllimport) +# define SDL_CALL __cdecl +#else +# define SDL_DECLSPEC +# define SDL_CALL +#endif + +typedef unsigned char Uint8; +typedef signed char Sint8; +typedef unsigned short Uint16; +typedef signed short Sint16; +typedef unsigned int Uint32; +typedef signed int Sint32; + +// Subset of SDL keysym +typedef enum { + SDLK_BACKSPACE = 8, + SDLK_TAB = 9, + SDLK_CLEAR = 12, + SDLK_RETURN = 13, + SDLK_PAUSE = 19, + SDLK_ESCAPE = 27, + SDLK_DELETE = 127, + SDLK_UP = 273, + SDLK_DOWN = 274, + SDLK_RIGHT = 275, + SDLK_LEFT = 276, + SDLK_INSERT = 277, + SDLK_HOME = 278, + SDLK_END = 279, + SDLK_PAGEUP = 280, + SDLK_PAGEDOWN = 281, + SDLK_F1 = 282, + SDLK_F2 = 283, + SDLK_F3 = 284, + SDLK_F4 = 285, + SDLK_F5 = 286, + SDLK_F6 = 287, + SDLK_F7 = 288, + SDLK_F8 = 289, + SDLK_F9 = 290, + SDLK_F10 = 291, + SDLK_F11 = 292, + SDLK_F12 = 293, +} SDLKey; + +typedef enum { + KMOD_NONE = 0x0000, + KMOD_LSHIFT = 0x0001, + KMOD_RSHIFT = 0x0002, + KMOD_LCTRL = 0x0040, + KMOD_RCTRL = 0x0080, + KMOD_LALT = 0x0100, + KMOD_RALT = 0x0200, + KMOD_LMETA = 0x0400, + KMOD_RMETA = 0x0800, + KMOD_NUM = 0x1000, + KMOD_CAPS = 0x2000, + KMOD_MODE = 0x4000, + KMOD_RESERVED = 0x8000 +} SDLMod; + +#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL) +#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT) +#define KMOD_ALT (KMOD_LALT|KMOD_RALT) +#define KMOD_META (KMOD_LMETA|KMOD_RMETA) + +typedef enum { + SDL_NOEVENT = 0, + SDL_ACTIVEEVENT, + SDL_KEYDOWN, + SDL_KEYUP, + SDL_MOUSEMOTION, + SDL_MOUSEBUTTONDOWN, + SDL_MOUSEBUTTONUP, + SDL_JOYAXISMOTION, + SDL_JOYBALLMOTION, + SDL_JOYHATMOTION, + SDL_JOYBUTTONDOWN, + SDL_JOYBUTTONUP, + SDL_QUIT, + SDL_SYSWMEVENT, + SDL_EVENT_RESERVEDA, + SDL_EVENT_RESERVEDB, + SDL_VIDEORESIZE, + SDL_VIDEOEXPOSE, + SDL_EVENT_RESERVED2, + SDL_EVENT_RESERVED3, + SDL_EVENT_RESERVED4, + SDL_EVENT_RESERVED5, + SDL_EVENT_RESERVED6, + SDL_EVENT_RESERVED7, + SDL_USEREVENT = 24, + SDL_NUMEVENTS = 32 +} SDLEventEnum; + +typedef struct SDL_keysym { + Uint8 scancode; + SDLKey sym; + SDLMod mod; + Uint16 unicode; +} SDL_keysym; + +typedef struct SDL_ActiveEvent { + Uint8 type; + Uint8 gain; + Uint8 state; +} SDL_ActiveEvent; + +typedef struct SDL_KeyboardEvent { + Uint8 type; + Uint8 which; + Uint8 state; + SDL_keysym keysym; +} SDL_KeyboardEvent; + +typedef struct SDL_MouseMotionEvent { + Uint8 type; + Uint8 which; + Uint8 state; + Uint16 x, y; + Sint16 xrel; + Sint16 yrel; +} SDL_MouseMotionEvent; + +typedef struct SDL_MouseButtonEvent { + Uint8 type; + Uint8 which; + Uint8 button; + Uint8 state; + Uint16 x, y; +} SDL_MouseButtonEvent; + +typedef struct SDL_JoyAxisEvent { + Uint8 type; + Uint8 which; + Uint8 axis; + Sint16 value; +} SDL_JoyAxisEvent; + +typedef struct SDL_JoyBallEvent { + Uint8 type; + Uint8 which; + Uint8 ball; + Sint16 xrel; + Sint16 yrel; +} SDL_JoyBallEvent; + +typedef struct SDL_JoyHatEvent { + Uint8 type; + Uint8 which; + Uint8 hat; + Uint8 value; +} SDL_JoyHatEvent; + +typedef struct SDL_JoyButtonEvent { + Uint8 type; + Uint8 which; + Uint8 button; + Uint8 state; +} SDL_JoyButtonEvent; + +typedef struct SDL_ResizeEvent { + Uint8 type; + int w; + int h; +} SDL_ResizeEvent; + +typedef struct SDL_ExposeEvent { + Uint8 type; +} SDL_ExposeEvent; + +typedef struct SDL_QuitEvent { + Uint8 type; +} SDL_QuitEvent; + +typedef struct SDL_UserEvent { + Uint8 type; + int code; + void *data1; + void *data2; +} SDL_UserEvent; + +struct SDL_SysWMmsg; +typedef struct SDL_SysWMmsg SDL_SysWMmsg; +typedef struct SDL_SysWMEvent { + Uint8 type; + SDL_SysWMmsg *msg; +} SDL_SysWMEvent; + +typedef union { + Uint8 type; + SDL_ActiveEvent active; + SDL_KeyboardEvent key; + SDL_MouseMotionEvent motion; + SDL_MouseButtonEvent button; + SDL_JoyAxisEvent jaxis; + SDL_JoyBallEvent jball; + SDL_JoyHatEvent jhat; + SDL_JoyButtonEvent jbutton; + SDL_ResizeEvent resize; + SDL_ExposeEvent expose; + SDL_QuitEvent quit; + SDL_UserEvent user; + SDL_SysWMEvent syswm; +char full[56]; +} SDL_Event; + +typedef struct SDL_PixelFormat { + void *palette; + Uint8 BitsPerPixel; + Uint8 BytesPerPixel; + Uint8 Rloss; + Uint8 Gloss; + Uint8 Bloss; + Uint8 Aloss; + Uint8 Rshift; + Uint8 Gshift; + Uint8 Bshift; + Uint8 Ashift; + Uint32 Rmask; + Uint32 Gmask; + Uint32 Bmask; + Uint32 Amask; + Uint32 colorkey; + Uint8 alpha; +} SDL_PixelFormat; + +typedef enum { + SDL_GL_RED_SIZE, + SDL_GL_GREEN_SIZE, + SDL_GL_BLUE_SIZE, + SDL_GL_ALPHA_SIZE, + SDL_GL_BUFFER_SIZE, + SDL_GL_DOUBLEBUFFER, + SDL_GL_DEPTH_SIZE, + SDL_GL_STENCIL_SIZE, + SDL_GL_ACCUM_RED_SIZE, + SDL_GL_ACCUM_GREEN_SIZE, + SDL_GL_ACCUM_BLUE_SIZE, + SDL_GL_ACCUM_ALPHA_SIZE, + SDL_GL_STEREO, + SDL_GL_MULTISAMPLEBUFFERS, + SDL_GL_MULTISAMPLESAMPLES, + SDL_GL_ACCELERATED_VISUAL, + SDL_GL_RETAINED_BACKING, + SDL_GL_CONTEXT_MAJOR_VERSION, + SDL_GL_CONTEXT_MINOR_VERSION +} SDL_GLattr; + +typedef struct SDL_VideoInfo { + Uint32 hw_available :1; + Uint32 wm_available :1; + Uint32 UnusedBits1 :6; + Uint32 UnusedBits2 :1; + Uint32 blit_hw :1; + Uint32 blit_hw_CC :1; + Uint32 blit_hw_A :1; + Uint32 blit_sw :1; + Uint32 blit_sw_CC :1; + Uint32 blit_sw_A :1; + Uint32 blit_fill :1; + Uint32 UnusedBits3 :16; + Uint32 video_mem; + SDL_PixelFormat *vfmt; + int current_w; + int current_h; +} SDL_VideoInfo; + +#define SDL_INIT_VIDEO 0x00000020 + +#define SDL_SWSURFACE 0x00000000 +#define SDL_HWSURFACE 0x00000001 +#define SDL_ASYNCBLIT 0x00000004 +#define SDL_ANYFORMAT 0x10000000 +#define SDL_HWPALETTE 0x20000000 +#define SDL_DOUBLEBUF 0x40000000 +#define SDL_FULLSCREEN 0x80000000 +#define SDL_OPENGL 0x00000002 +#define SDL_OPENGLBLIT 0x0000000A +#define SDL_RESIZABLE 0x00000010 +#define SDL_NOFRAME 0x00000020 + +#define SDL_DEFAULT_REPEAT_DELAY 500 +#define SDL_DEFAULT_REPEAT_INTERVAL 30 + + +// functions subset +extern SDL_DECLSPEC int SDL_CALL SDL_Init(Uint32 flags); +extern SDL_DECLSPEC void SDL_CALL SDL_Quit(); +extern SDL_DECLSPEC char * SDL_CALL SDL_GetError(); +extern SDL_DECLSPEC const SDL_VideoInfo * SDL_CALL SDL_GetVideoInfo(); +extern SDL_DECLSPEC struct SDL_Surface * SDL_CALL SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags); +extern SDL_DECLSPEC int SDL_CALL SDL_GL_SetAttribute(SDL_GLattr attr, int value); +extern SDL_DECLSPEC void SDL_CALL SDL_GL_SwapBuffers(); +extern SDL_DECLSPEC void SDL_CALL SDL_WM_SetCaption(const char *title, const char *icon); +extern SDL_DECLSPEC void SDL_CALL SDL_WM_GetCaption(char **title, char **icon); +extern SDL_DECLSPEC int SDL_CALL SDL_EnableUNICODE(int enable); +extern SDL_DECLSPEC int SDL_CALL SDL_EnableKeyRepeat(int delay, int interval); +extern SDL_DECLSPEC Uint32 SDL_CALL SDL_GetTicks(); +extern SDL_DECLSPEC int SDL_CALL SDL_PollEvent(SDL_Event *event); +extern SDL_DECLSPEC int SDL_CALL SDL_WaitEvent(SDL_Event *event); +extern SDL_DECLSPEC int SDL_CALL SDL_PushEvent(SDL_Event *event); + + +#ifdef __cplusplus +} +#endif + +#endif // !defined MINI_SDL12_INCLUDED + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSDL13.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSDL13.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSDL13.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSDL13.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,428 @@ +// --------------------------------------------------------------------------- +// +// @file MiniSDL13.h +// @brief A subset of SDL 1.3 definitions needed to compile helper +// functions implemented in TwEventSDL13.c +// +// notes: - Private header +// - AntTweakBar.dll does not need to link with SDL, +// it just needs some definitions for its helper functions. +// - This header is provided to avoid the need of having SDL +// installed to recompile AntTweakBar. +// - Do not use this header in your own programs, better use the +// SDL.h header from the actual SDL library SDK : +// http://www.libsdl.org +// +// --------------------------------------------------------------------------- + +#if !defined MINI_SDL_INCLUDED +#define MINI_SDL_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +#define SDL_MAJOR_VERSION 1 +#define SDL_MINOR_VERSION 3 + +#if defined(_WIN32) || defined(_WIN64) +# define SDL_DECLSPEC __declspec(dllimport) +# define SDL_CALL __cdecl +#else +# define SDL_DECLSPEC +# define SDL_CALL +#endif + +typedef unsigned char Uint8; +typedef signed char Sint8; +typedef unsigned short Uint16; +typedef signed short Sint16; +typedef unsigned int Uint32; +typedef signed int Sint32; + +#define SDLK_SCANCODE_MASK (1<<30) +#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK) + +// Subset of SDL scancodes. +// Note: some SDL scancodes seems to be wrong in the original +// SDL scancode header file. +typedef enum { + SDL_SCANCODE_F1 = 58, + SDL_SCANCODE_F2 = 59, + SDL_SCANCODE_F3 = 60, + SDL_SCANCODE_F4 = 61, + SDL_SCANCODE_F5 = 62, + SDL_SCANCODE_F6 = 63, + SDL_SCANCODE_F7 = 64, + SDL_SCANCODE_F8 = 65, + SDL_SCANCODE_F9 = 66, + SDL_SCANCODE_F10 = 67, + SDL_SCANCODE_F11 = 68, + SDL_SCANCODE_F12 = 69, + SDL_SCANCODE_INSERT = 98, //73, + SDL_SCANCODE_HOME = 95, //74, + SDL_SCANCODE_PAGEUP = 97, //75, + SDL_SCANCODE_DELETE = 99, //76, + SDL_SCANCODE_END = 89, //77, + SDL_SCANCODE_PAGEDOWN = 91, //78, + SDL_SCANCODE_RIGHT = 94, //79, + SDL_SCANCODE_LEFT = 92, //80, + SDL_SCANCODE_DOWN = 90, //81, + SDL_SCANCODE_UP = 96 //82 +} SDL_scancode; + +// Subset of SDL keysym +typedef enum { + SDLK_BACKSPACE = 8, + SDLK_TAB = 9, + SDLK_CLEAR = 12, + SDLK_RETURN = 13, + SDLK_PAUSE = 19, + SDLK_ESCAPE = 27, + SDLK_DELETE = 127, + SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP), + SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN), + SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT), + SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT), + SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT), + SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME), + SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END), + SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP), + SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN), + SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1), + SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2), + SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3), + SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4), + SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5), + SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6), + SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7), + SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8), + SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9), + SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10), + SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11), + SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12) +} SDLKey; + +typedef enum { + KMOD_NONE = 0x0000, + KMOD_LSHIFT = 0x0001, + KMOD_RSHIFT = 0x0002, + KMOD_LCTRL = 0x0040, + KMOD_RCTRL = 0x0080, + KMOD_LALT = 0x0100, + KMOD_RALT = 0x0200, + KMOD_LGUI = 0x0400, + KMOD_RGUI = 0x0800, + KMOD_NUM = 0x1000, + KMOD_CAPS = 0x2000, + KMOD_MODE = 0x4000, + KMOD_RESERVED = 0x8000 +} SDLMod; + +#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL) +#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT) +#define KMOD_ALT (KMOD_LALT|KMOD_RALT) +#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI) + +typedef enum { + SDL_NOEVENT = 0, + SDL_WINDOWEVENT, + SDL_KEYDOWN, + SDL_KEYUP, + SDL_TEXTEDITING, + SDL_TEXTINPUT, + SDL_MOUSEMOTION, + SDL_MOUSEBUTTONDOWN, + SDL_MOUSEBUTTONUP, + SDL_MOUSEWHEEL, + SDL_JOYAXISMOTION, + SDL_JOYBALLMOTION, + SDL_JOYHATMOTION, + SDL_JOYBUTTONDOWN, + SDL_JOYBUTTONUP, + SDL_QUIT, + SDL_SYSWMEVENT, + SDL_PROXIMITYIN, + SDL_PROXIMITYOUT, + SDL_EVENT_RESERVED1, + SDL_EVENT_RESERVED2, + SDL_EVENT_RESERVED3, + SDL_USEREVENT = 24, + SDL_NUMEVENTS = 32 +} SDL_EventType; + +#define SDL_ACTIVEEVENT SDL_EVENT_RESERVED1 +#define SDL_VIDEORESIZE SDL_EVENT_RESERVED2 +#define SDL_VIDEOEXPOSE SDL_EVENT_RESERVED3 + +typedef Uint32 SDL_WindowID; + +typedef struct SDL_keysym { + SDL_scancode scancode; + SDLKey sym; + Uint16 mod; + Uint32 unicode; +} SDL_keysym; + +typedef struct SDL_WindowEvent { + Uint8 type; + SDL_WindowID windowID; + Uint8 event; + int data1; + int data2; +} SDL_WindowEvent; + +typedef struct SDL_KeyboardEvent { + Uint8 type; + SDL_WindowID windowID; + Uint8 which; + Uint8 state; + SDL_keysym keysym; +} SDL_KeyboardEvent; + +#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32) +typedef struct SDL_TextEditingEvent { + Uint8 type; + char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; + int start; + int length; +} SDL_TextEditingEvent; + +#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32) +typedef struct SDL_TextInputEvent { + Uint8 type; + SDL_WindowID windowID; + Uint8 which; + char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; +} SDL_TextInputEvent; + +typedef struct SDL_MouseMotionEvent { + Uint8 type; + SDL_WindowID windowID; + Uint8 which; + Uint8 state; + int x; + int y; + int z; + int pressure; + int pressure_max; + int pressure_min; + int rotation; + int tilt; + int cursor; + int xrel; + int yrel; +} SDL_MouseMotionEvent; + +typedef struct SDL_MouseButtonEvent { + Uint8 type; + SDL_WindowID windowID; + Uint8 which; + Uint8 button; + Uint8 state; + int x; + int y; +} SDL_MouseButtonEvent; + +typedef struct SDL_MouseWheelEvent { + Uint8 type; + SDL_WindowID windowID; + Uint8 which; + int x; + int y; +} SDL_MouseWheelEvent; + +typedef struct SDL_JoyAxisEvent { + Uint8 type; + Uint8 which; + Uint8 axis; + Sint16 value; +} SDL_JoyAxisEvent; + +typedef struct SDL_JoyBallEvent { + Uint8 type; + Uint8 which; + Uint8 ball; + Sint16 xrel; + Sint16 yrel; +} SDL_JoyBallEvent; + +typedef struct SDL_JoyHatEvent { + Uint8 type; + Uint8 which; + Uint8 hat; + Uint8 value; +} SDL_JoyHatEvent; + +typedef struct SDL_JoyButtonEvent { + Uint8 type; + Uint8 which; + Uint8 button; + Uint8 state; +} SDL_JoyButtonEvent; + +typedef struct SDL_ActiveEvent +{ + Uint8 type; + Uint8 gain; + Uint8 state; +} SDL_ActiveEvent; + +typedef struct SDL_ResizeEvent { + Uint8 type; + int w; + int h; +} SDL_ResizeEvent; + +typedef struct SDL_ExposeEvent { + Uint8 type; +} SDL_ExposeEvent; + +typedef struct SDL_QuitEvent { + Uint8 type; +} SDL_QuitEvent; + +typedef struct SDL_UserEvent { + Uint8 type; + SDL_WindowID windowID; + int code; + void *data1; + void *data2; +} SDL_UserEvent; + +struct SDL_SysWMmsg; +typedef struct SDL_SysWMmsg SDL_SysWMmsg; +typedef struct SDL_SysWMEvent { + Uint8 type; + SDL_SysWMmsg *msg; +} SDL_SysWMEvent; + +typedef struct SDL_ProximityEvent +{ + Uint8 type; + SDL_WindowID windowID; + Uint8 which; + int cursor; + int x; + int y; +} SDL_ProximityEvent; + +typedef union SDL_Event { + Uint8 type; + SDL_WindowEvent window; + SDL_KeyboardEvent key; + SDL_TextEditingEvent edit; + SDL_TextInputEvent text; + SDL_MouseMotionEvent motion; + SDL_MouseButtonEvent button; + SDL_MouseWheelEvent wheel; + SDL_JoyAxisEvent jaxis; + SDL_JoyBallEvent jball; + SDL_JoyHatEvent jhat; + SDL_JoyButtonEvent jbutton; + SDL_QuitEvent quit; + SDL_UserEvent user; + SDL_SysWMEvent syswm; + SDL_ProximityEvent proximity; + SDL_ActiveEvent active; + SDL_ResizeEvent resize; +} SDL_Event; + +typedef struct SDL_PixelFormat { + void *palette; + Uint8 BitsPerPixel; + Uint8 BytesPerPixel; + Uint8 Rloss; + Uint8 Gloss; + Uint8 Bloss; + Uint8 Aloss; + Uint8 Rshift; + Uint8 Gshift; + Uint8 Bshift; + Uint8 Ashift; + Uint32 Rmask; + Uint32 Gmask; + Uint32 Bmask; + Uint32 Amask; +} SDL_PixelFormat; + +typedef enum SDL_GLattr { + SDL_GL_RED_SIZE, + SDL_GL_GREEN_SIZE, + SDL_GL_BLUE_SIZE, + SDL_GL_ALPHA_SIZE, + SDL_GL_BUFFER_SIZE, + SDL_GL_DOUBLEBUFFER, + SDL_GL_DEPTH_SIZE, + SDL_GL_STENCIL_SIZE, + SDL_GL_ACCUM_RED_SIZE, + SDL_GL_ACCUM_GREEN_SIZE, + SDL_GL_ACCUM_BLUE_SIZE, + SDL_GL_ACCUM_ALPHA_SIZE, + SDL_GL_STEREO, + SDL_GL_MULTISAMPLEBUFFERS, + SDL_GL_MULTISAMPLESAMPLES, + SDL_GL_ACCELERATED_VISUAL, + SDL_GL_RETAINED_BACKING, + SDL_GL_CONTEXT_MAJOR_VERSION, + SDL_GL_CONTEXT_MINOR_VERSION +} SDL_GLattr; + +typedef struct SDL_VideoInfo { + Uint32 hw_available :1; + Uint32 wm_available :1; + Uint32 UnusedBits1 :6; + Uint32 UnusedBits2 :1; + Uint32 blit_hw :1; + Uint32 blit_hw_CC :1; + Uint32 blit_hw_A :1; + Uint32 blit_sw :1; + Uint32 blit_sw_CC :1; + Uint32 blit_sw_A :1; + Uint32 blit_fill :1; + Uint32 UnusedBits3 :16; + Uint32 video_mem; + SDL_PixelFormat *vfmt; + int current_w; + int current_h; +} SDL_VideoInfo; + +#define SDL_INIT_VIDEO 0x00000020 + +#define SDL_ANYFORMAT 0x00100000 +#define SDL_HWPALETTE 0x00200000 +#define SDL_DOUBLEBUF 0x00400000 +#define SDL_FULLSCREEN 0x00800000 +#define SDL_RESIZABLE 0x01000000 +#define SDL_NOFRAME 0x02000000 +#define SDL_OPENGL 0x04000000 +#define SDL_HWSURFACE 0x08000001 + +#define SDL_DEFAULT_REPEAT_DELAY 500 +#define SDL_DEFAULT_REPEAT_INTERVAL 30 + + +// functions subset +extern SDL_DECLSPEC int SDL_CALL SDL_Init(Uint32 flags); +extern SDL_DECLSPEC void SDL_CALL SDL_Quit(); +extern SDL_DECLSPEC char * SDL_CALL SDL_GetError(); +extern SDL_DECLSPEC const SDL_VideoInfo * SDL_CALL SDL_GetVideoInfo(); +extern SDL_DECLSPEC struct SDL_Surface * SDL_CALL SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags); +extern SDL_DECLSPEC int SDL_CALL SDL_GL_SetAttribute(SDL_GLattr attr, int value); +extern SDL_DECLSPEC void SDL_CALL SDL_GL_SwapBuffers(); +extern SDL_DECLSPEC void SDL_CALL SDL_WM_SetCaption(const char *title, const char *icon); +extern SDL_DECLSPEC void SDL_CALL SDL_WM_GetCaption(char **title, char **icon); +extern SDL_DECLSPEC int SDL_CALL SDL_EnableUNICODE(int enable); +extern SDL_DECLSPEC int SDL_CALL SDL_EnableKeyRepeat(int delay, int interval); +extern SDL_DECLSPEC Uint32 SDL_CALL SDL_GetTicks(); +extern SDL_DECLSPEC int SDL_CALL SDL_PollEvent(SDL_Event *event); +extern SDL_DECLSPEC int SDL_CALL SDL_WaitEvent(SDL_Event *event); +extern SDL_DECLSPEC int SDL_CALL SDL_PushEvent(SDL_Event *event); + + +#ifdef __cplusplus +} +#endif + +#endif // !defined MINI_SDL_INCLUDED + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSFML16.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSFML16.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSFML16.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/MiniSFML16.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,220 @@ +// --------------------------------------------------------------------------- +// +// @file MiniSFML16.h +// @brief A subset of SFML 1.6 definitions needed to compile helper +// functions implemented in TwEventSFML.cpp +// +// notes: - Private header +// - AntTweakBar.dll does not need to link with SFML, +// it just needs some definitions for its helper functions. +// - This header is provided to avoid the need of having SFML +// installed to recompile AntTweakBar. +// It declares a small and incomplete part of SFML classes. +// For instance, many non-virtual methods have been stripped out. +// - Do not use this header in your own programs, better use the +// SFML headers from the actual SFML library SDK : +// http://www.sfml-dev.org +// +// --------------------------------------------------------------------------- + +#if !defined MINI_SFML16_INCLUDED +#define MINI_SFML16_INCLUDED + +namespace sf +{ + + namespace Key { enum Code + { + A = 'a', B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, + Num0 = '0', Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8, Num9, + Escape = 256, + LControl, LShift, LAlt, LSystem, + RControl, RShift, RAlt, RSystem, Menu, + LBracket, RBracket, SemiColon, Comma, Period, Quote, Slash, BackSlash, + Tilde, Equal, Dash, Space, Return, Back, Tab, + PageUp, PageDown, End, Home, Insert, Delete, + Add, Subtract, Multiply, Divide, Left, Right, Up, Down, + Numpad0, Numpad1, Numpad2, Numpad3, Numpad4, Numpad5, Numpad6, Numpad7, Numpad8, Numpad9, + F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, Pause, + Count + }; } + + namespace Mouse { enum Button { Left, Right, Middle, XButton1, XButton2, Count }; } + + namespace Joy { enum Axis { AxisX, AxisY, AxisZ, AxisR, AxisU, AxisV, AxisPOV, AxisCount }; + enum { Count = 4, ButtonCount = 32}; } + + typedef unsigned char Uint8; + typedef unsigned int Uint32; + + class Event + { + public : + struct KeyEvent { Key::Code Code; bool Alt, Control, Shift; }; + struct TextEvent { Uint32 Unicode; }; + struct MouseMoveEvent { int X, Y; }; + struct MouseButtonEvent { Mouse::Button Button; int X, Y; }; + struct MouseWheelEvent { int Delta; }; + struct JoyMoveEvent { unsigned int JoystickId; Joy::Axis Axis; float Position; }; + struct JoyButtonEvent { unsigned int JoystickId, Button; }; + struct SizeEvent { unsigned int Width, Height; }; + enum EventType + { + Closed, Resized, LostFocus, GainedFocus, TextEntered, KeyPressed, KeyReleased, + MouseWheelMoved, MouseButtonPressed, MouseButtonReleased, MouseMoved, MouseEntered, MouseLeft, + JoyButtonPressed, JoyButtonReleased, JoyMoved + }; + EventType Type; + union + { + KeyEvent Key; + TextEvent Text; + MouseMoveEvent MouseMove; + MouseButtonEvent MouseButton; + MouseWheelEvent MouseWheel; + JoyMoveEvent JoyMove; + JoyButtonEvent JoyButton; + SizeEvent Size; + }; + }; + +} // namespace sf + + +#ifdef USE_MINI_SFML +// we also need some the definition of sf::RenderWindow to compile our SFML example + +#include +#include + +namespace sf +{ + + class Input; + class Drawable; + typedef void* WindowHandle; + namespace priv { class WindowImpl; } + + class WindowListener + { + public : + virtual void OnEvent(const Event& EventReceived) = 0; + protected : + virtual ~WindowListener(); + }; + + class VideoMode + { + public : + VideoMode(unsigned int ModeWidth, unsigned int ModeHeight, unsigned int ModeBpp = 32); + unsigned int Width, Height, BitsPerPixel; + }; + + namespace Style { enum { None = 0, Titlebar = 1 << 0, Resize = 1 << 1, Close = 1 << 2, Fullscreen = 1 << 3 }; } + + struct WindowSettings + { + explicit WindowSettings(unsigned int Depth = 24, unsigned int Stencil = 8, unsigned int Antialiasing = 0); + unsigned int DepthBits, StencilBits, AntialiasingLevel; + }; + + class Clock + { + public : + Clock(); + float GetElapsedTime() const; + void Reset(); + private : + double myStartTime; + }; + + class Input : public WindowListener + { + private : + virtual void OnEvent(const Event& EventReceived); + bool myKeys[Key::Count]; + bool myMouseButtons[Mouse::Count]; + int myMouseX; + int myMouseY; + bool myJoystickButtons[Joy::Count][Joy::ButtonCount]; + float myJoystickAxis[Joy::Count][Joy::AxisCount]; + }; + + class Window : public WindowListener + { + public : + Window(VideoMode Mode, const std::string& Title, unsigned long WindowStyle = Style::Resize | Style::Close, const WindowSettings& Params = WindowSettings()); + virtual ~Window(); + void Close(); + bool IsOpened() const; + unsigned int GetWidth() const; + unsigned int GetHeight() const; + bool GetEvent(Event& EventReceived); + void Display(); + private : + virtual void OnCreate(); + virtual void OnEvent(const Event& EventReceived); + priv::WindowImpl* myWindow; + std::queue myEvents; + Input myInput; + Clock myClock; + WindowSettings mySettings; + float myLastFrameTime; + bool myIsExternal; + unsigned int myFramerateLimit; + int mySetCursorPosX; + int mySetCursorPosY; + }; + + template class Vector2 { public : T x, y; }; + typedef Vector2 Vector2f; + + template class Rect { public : T Left, Top, Right, Bottom; }; + typedef Rect FloatRect; + + class Matrix3 { private : float myData[16]; }; + + class View + { + private : + sf::Vector2f myCenter; + sf::Vector2f myHalfSize; + FloatRect myRect; + Matrix3 myMatrix; + bool myNeedUpdate; + }; + + class RenderTarget + { + public : + virtual ~RenderTarget(); + virtual void Draw(const Drawable& Object); + virtual unsigned int GetWidth() const = 0; + virtual unsigned int GetHeight() const = 0; + void PreserveOpenGLStates(bool Preserve); + private : + virtual bool Activate(bool Active) = 0; + View myDefaultView; + const View* myCurrentView; + bool myPreserveStates; + bool myIsDrawing; + }; + + class RenderWindow : public Window, public RenderTarget + { + public : + RenderWindow(VideoMode Mode, const std::string& Title, unsigned long WindowStyle = Style::Resize | Style::Close, const WindowSettings& Params = WindowSettings()); + virtual ~RenderWindow(); + virtual unsigned int GetWidth() const; + virtual unsigned int GetHeight() const; + private : + virtual void OnCreate(); + virtual bool Activate(bool Active); + }; + +} // namespace sf + +#endif // USE_MINI_SFML + +#endif // !defined MINI_SFML16_INCLUDED + Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00000.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00000.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00001.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00001.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00002.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00002.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00003.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00003.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00004.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00004.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00005.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00005.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00006.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00006.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00007.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00007.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00008.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00008.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00009.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00009.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00010.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00010.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00011.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00011.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00012.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00012.cur differ Binary files /tmp/tmpNfaSSr/5EcxXHrCux/ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00013.cur and /tmp/tmpNfaSSr/_koI2QKgiP/ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00013.cur differ diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs00.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs00.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs00.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs00.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs01.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs01.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs01.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs01.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 +0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs02.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs02.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs02.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs02.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 +0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs03.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs03.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs03.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs03.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 +1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs04.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs04.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs04.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs04.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs05.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs05.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs05.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs05.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 +0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 +0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 +0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs06.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs06.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs06.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs06.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 +0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs07.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs07.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs07.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs07.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 +0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs08.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs08.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs08.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs08.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 +0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs09.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs09.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs09.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs09.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 +1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs10.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs10.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs10.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs10.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs11.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs11.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs11.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs11.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 +0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs12.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs12.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs12.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs12.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 1 +1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 +1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs13.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs13.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs13.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/curs13.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontChars.txt ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontChars.txt --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontChars.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontChars.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,232 @@ + !"#$%&'()*+,-./0123456789:;<=>? +@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ +`abcdefghijklmnopqrstuvwxyz{|}~√ +€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ + ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ +ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß +àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + +032 +033 ! +034 " +035 # +036 $ +037 % +038 & +039 ' +040 ( +041 ) +042 * +043 + +044 , +045 - +046 . +047 / +048 0 +049 1 +050 2 +051 3 +052 4 +053 5 +054 6 +055 7 +056 8 +057 9 +058 : +059 ; +060 < +061 = +062 > +063 ? +064 @ +065 A +066 B +067 C +068 D +069 E +070 F +071 G +072 H +073 I +074 J +075 K +076 L +077 M +078 N +079 O +080 P +081 Q +082 R +083 S +084 T +085 U +086 V +087 W +088 X +089 Y +090 Z +091 [ +092 \ +093 ] +094 ^ +095 _ +096 ` +097 a +098 b +099 c +100 d +101 e +102 f +103 g +104 h +105 i +106 j +107 k +108 l +109 m +110 n +111 o +112 p +113 q +114 r +115 s +116 t +117 u +118 v +119 w +120 x +121 y +122 z +123 { +124 | +125 } +126 ~ +127 √ +128 € +129  +130 ‚ +131 ƒ +132 „ +133 … +134 † +135 ‡ +136 ˆ +137 ‰ +138 Š +139 ‹ +140 Œ +141  +142 Ž +143  +144  +145 ‘ +146 ’ +147 “ +148 ” +149 • +150 – +151 — +152 ˜ +153 ™ +154 š +155 › +156 œ +157  +158 ž +159 Ÿ +160   +161 ¡ +162 ¢ +163 £ +164 ¤ +165 ¥ +166 ¦ +167 § +168 ¨ +169 © +170 ª +171 « +172 ¬ +173 ­ +174 ® +175 ¯ +176 ° +177 ± +178 ² +179 ³ +180 ´ +181 µ +182 ¶ +183 · +184 ¸ +185 ¹ +186 º +187 » +188 ¼ +189 ½ +190 ¾ +191 ¿ +192 À +193 Á +194  +195 à +196 Ä +197 Å +198 Æ +199 Ç +200 È +201 É +202 Ê +203 Ë +204 Ì +205 Í +206 Î +207 Ï +208 Ð +209 Ñ +210 Ò +211 Ó +212 Ô +213 Õ +214 Ö +215 × +216 Ø +217 Ù +218 Ú +219 Û +220 Ü +221 Ý +222 Þ +223 ß +224 à +225 á +226 â +227 ã +228 ä +229 å +230 æ +231 ç +232 è +233 é +234 ê +235 ë +236 ì +237 í +238 î +239 ï +240 ð +241 ñ +242 ò +243 ó +244 ô +245 õ +246 ö +247 ÷ +248 ø +249 ù +250 ú +251 û +252 ü +253 ý +254 þ +255 ÿ diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontLargeAA.pgm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontLargeAA.pgm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontLargeAA.pgm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontLargeAA.pgm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1197 @@ +P2 +# Created by Paint Shop Pro +276 120 +255 +127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 +4 4 4 0 0 0 0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 0 +0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 59 245 125 175 225 21 +0 0 0 0 0 0 0 0 0 0 0 0 0 138 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 59 241 89 0 0 12 235 201 89 255 166 0 0 0 0 0 172 89 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 225 21 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 +0 0 0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 0 0 138 247 34 0 12 +232 89 138 225 21 0 0 0 0 138 125 7 199 34 0 0 0 0 138 125 0 0 0 0 138 +255 255 201 0 0 0 59 215 21 0 0 0 0 59 245 255 255 166 0 0 0 59 241 89 +0 7 206 201 0 0 89 251 89 0 59 215 21 172 89 59 192 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 166 0 0 138 255 251 89 0 0 0 0 0 +138 201 0 0 0 7 206 255 255 255 166 0 0 7 206 255 255 255 201 0 0 0 0 0 +0 138 251 89 0 0 175 255 255 255 255 225 21 0 0 12 235 255 255 125 89 255 +255 255 255 255 251 89 0 12 235 255 255 225 21 0 0 59 245 255 255 166 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 59 245 255 255 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 +4 4 4 0 0 0 0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 0 0 89 247 +34 0 12 232 89 138 201 0 0 0 0 7 202 89 59 215 21 0 0 12 235 255 255 255 +166 0 59 241 89 12 235 125 0 0 172 89 0 0 0 0 7 206 166 0 89 251 89 0 0 +12 228 34 0 89 247 34 0 0 0 175 201 0 0 89 251 191 194 247 34 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 232 89 0 175 201 0 12 235 +125 0 0 138 255 255 201 0 0 0 12 182 0 0 59 245 125 0 12 206 21 0 12 235 +166 0 0 0 0 89 255 251 89 0 0 175 201 0 0 0 0 0 0 89 255 125 0 0 0 0 0 +0 0 0 89 251 89 12 235 166 0 7 206 201 0 59 245 125 0 12 235 166 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 89 166 0 0 138 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 +0 0 0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 0 0 89 247 34 0 12 +228 34 89 201 0 0 0 0 12 206 21 89 166 0 0 12 235 125 138 125 59 192 0 +89 247 34 7 206 166 0 89 201 0 0 0 0 0 12 235 125 0 12 232 89 0 0 12 228 +34 0 175 201 0 0 0 0 59 241 89 0 0 7 206 166 0 0 0 0 0 0 0 138 166 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 225 21 59 241 89 0 0 138 225 21 0 +0 0 175 201 0 0 0 0 0 0 0 7 206 201 0 0 0 0 0 0 175 201 0 0 0 59 241 132 +241 89 0 0 175 201 0 0 0 0 0 7 206 166 0 0 0 0 0 0 0 0 7 206 201 0 59 241 +89 0 0 138 225 21 138 225 21 0 0 138 225 21 89 255 125 0 0 89 255 125 0 +0 0 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 138 201 0 0 0 0 0 0 0 0 +0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 0 0 0 0 +0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 0 0 89 247 34 0 0 0 0 0 0 0 +0 89 255 255 255 255 255 255 255 125 59 238 34 138 125 0 0 0 89 247 34 +7 206 166 7 202 89 0 0 0 0 0 0 175 225 21 138 225 21 0 0 0 0 0 12 235 125 +0 0 0 0 7 206 125 0 89 251 191 194 247 34 0 0 0 0 0 138 166 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 0 89 247 34 0 0 89 247 34 0 0 0 175 201 +0 0 0 0 0 0 0 12 235 166 0 0 0 0 0 59 245 125 0 0 12 235 125 59 241 89 +0 0 175 201 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 89 247 34 0 12 235 201 +0 0 175 201 0 138 225 21 0 0 89 247 34 89 255 125 0 0 89 255 125 0 0 0 +0 0 12 235 255 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 175 255 251 89 0 0 0 0 +0 0 0 0 138 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 0 0 +0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 0 0 89 247 34 0 0 0 0 0 +0 0 0 0 0 175 125 7 199 34 0 0 12 235 166 138 125 0 0 0 59 241 89 12 235 +125 89 201 12 235 255 251 89 0 0 7 206 255 166 0 59 241 89 0 0 0 59 238 +34 0 0 0 0 0 175 166 59 215 21 172 89 59 192 0 0 0 0 0 138 166 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 125 0 138 247 34 0 0 89 247 34 0 0 0 +175 201 0 0 0 0 0 0 0 89 251 89 0 0 0 89 255 247 34 0 0 7 206 166 0 59 +241 89 0 0 175 255 255 255 225 21 0 89 251 226 255 255 247 34 0 0 0 7 206 +166 0 0 0 12 235 255 255 201 0 0 89 255 125 0 0 138 247 34 0 0 0 0 0 0 +0 0 0 0 0 89 255 255 166 0 0 0 0 0 175 255 255 255 255 255 255 225 21 0 +0 0 0 59 245 255 201 0 0 0 0 0 175 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 +0 0 89 225 21 0 0 0 0 0 0 0 0 0 7 199 34 59 215 21 0 0 0 59 245 255 255 +201 0 0 0 138 255 255 201 12 228 34 175 166 0 138 201 0 12 235 125 89 255 +125 59 241 89 0 0 0 59 238 34 0 0 0 0 0 138 201 0 0 0 172 89 0 0 0 7 206 +255 255 255 255 255 255 247 34 0 0 0 0 89 255 255 255 166 0 0 0 0 0 59 +238 34 0 138 247 34 0 0 89 247 34 0 0 0 175 201 0 0 0 0 0 0 59 245 166 +0 0 0 0 0 0 12 235 166 0 138 201 0 0 59 241 89 0 0 0 0 0 12 235 201 0 138 +251 89 0 0 175 225 21 0 0 89 247 34 0 0 7 206 166 0 175 255 166 0 0 89 +255 255 255 223 247 34 0 0 0 0 0 0 0 0 0 0 175 247 34 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 225 21 0 0 175 225 21 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 +0 0 127 0 0 0 0 0 59 215 21 0 0 0 0 0 0 0 12 235 255 255 255 255 255 255 +166 0 0 0 0 138 125 175 225 21 0 0 0 0 0 138 166 7 206 125 0 89 247 34 +138 225 21 0 89 255 166 215 21 0 0 0 59 238 34 0 0 0 0 0 138 201 0 0 0 +0 0 0 0 0 0 0 0 0 138 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 201 0 +0 89 247 34 0 0 89 247 34 0 0 0 175 201 0 0 0 0 0 12 235 201 0 0 0 0 0 +0 0 0 138 225 21 175 255 255 255 255 255 255 125 0 0 0 0 0 138 247 34 89 +247 34 0 0 59 241 89 0 7 206 166 0 0 0 138 247 34 0 0 138 247 34 0 0 0 +0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 89 255 255 166 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 59 245 255 201 0 0 0 0 175 201 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 +127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 166 0 175 125 0 0 0 0 0 0 138 +125 89 247 34 0 0 0 0 12 228 34 7 206 125 0 89 247 34 138 247 34 0 0 89 +255 166 0 0 0 0 59 238 34 0 0 0 0 0 175 166 0 0 0 0 0 0 0 0 0 0 0 0 138 +166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 125 0 0 59 241 89 0 0 138 225 +21 0 0 0 175 201 0 0 0 0 12 235 201 0 0 0 0 0 0 0 0 0 138 225 21 0 0 0 +0 59 241 89 0 0 0 0 0 0 138 225 21 59 241 89 0 0 59 241 89 0 89 247 34 +0 0 0 138 247 34 0 0 89 251 89 0 0 0 0 7 206 166 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 12 235 255 225 21 0 0 175 255 255 255 255 255 255 225 21 0 0 175 +255 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 0 0 89 247 +34 0 0 0 0 0 0 0 0 0 175 125 7 199 34 0 0 0 89 201 0 138 125 175 201 0 +0 0 0 0 138 166 0 0 175 166 0 138 201 0 89 255 166 0 0 89 255 255 125 0 +0 0 12 235 125 0 0 0 0 7 206 125 0 0 0 0 0 0 0 0 0 0 0 0 138 166 0 0 0 +0 0 138 255 125 0 0 0 0 0 0 175 247 34 59 238 34 0 0 0 175 201 0 12 235 +125 0 0 0 0 175 201 0 0 0 12 235 166 0 0 0 0 0 89 166 0 0 59 245 166 0 +0 0 0 0 59 241 89 0 59 215 21 0 12 235 166 0 7 206 201 0 0 175 225 21 7 +206 166 0 0 0 0 59 245 166 0 7 206 225 21 0 0 0 0 175 225 21 0 89 255 125 +0 0 12 235 201 0 0 0 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 138 201 +0 0 0 0 0 0 0 0 0 175 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 0 0 89 247 +34 0 0 0 0 0 0 0 0 7 199 34 59 215 21 0 0 0 12 235 255 255 255 201 0 0 +0 0 0 59 215 21 0 0 12 235 255 251 89 0 0 89 255 255 255 201 0 89 255 0 +0 0 0 175 201 0 0 0 0 59 238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 +201 0 0 0 0 0 0 0 175 247 34 138 201 0 0 0 0 0 138 255 251 89 0 0 0 138 +255 255 255 255 166 0 89 255 255 255 255 255 247 34 12 235 255 255 255 +166 0 0 0 0 0 0 59 241 89 0 12 235 255 255 255 166 0 0 0 7 206 255 255 +225 21 0 138 247 34 0 0 0 0 0 59 245 255 255 201 0 0 0 175 255 255 201 +0 0 0 89 255 125 0 0 89 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 175 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 4 4 4 4 4 4 4 4 52 4 4 4 4 4 4 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 125 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 247 34 0 0 0 175 201 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 232 89 0 0 0 0 0 0 0 0 0 0 175 125 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 125 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 201 0 0 89 251 89 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 201 0 0 0 0 0 0 0 0 0 0 12 232 89 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 232 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 0 0 0 0 0 127 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 201 0 0 201 201 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0 0 127 127 127 0 127 127 127 +127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 0 127 127 0 127 127 127 127 0 127 127 +127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +127 0 127 127 127 0 127 127 127 127 0 127 127 127 0 127 127 127 127 0 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 255 +201 0 138 201 0 0 0 0 89 255 255 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 127 0 0 0 0 175 255 255 255 247 34 0 0 0 0 0 7 206 251 89 0 0 12 0 +235 255 255 255 255 201 0 0 0 0 59 245 255 255 255 201 12 0 235 255 255 +255 255 166 0 0 0 12 235 255 255 255 255 255 127 12 235 255 255 255 255 +251 89 0 0 12 235 255 255 255 251 89 12 235 166 0 0 0 12 235 125 89 255 +255 255 201 0 0 175 255 255 225 21 12 235 166 0 0 7 206 251 102 0 235 166 +0 0 0 0 12 235 251 89 0 0 0 89 255 225 21 12 235 251 89 0 0 12 235 125 +0 0 0 138 255 255 166 0 0 0 12 235 255 255 255 251 89 0 0 0 0 175 255 255 +201 0 0 0 12 235 255 255 255 251 89 0 0 0 12 235 255 255 255 247 47 235 +255 255 255 255 255 255 255 138 0 235 125 0 0 0 59 245 133 206 166 0 0 +0 0 59 245 255 133 201 0 0 0 138 251 89 0 0 12 235 133 206 247 34 0 0 0 +175 229 216 225 21 0 0 0 138 247 124 255 255 255 255 255 255 125 7 206 +125 0 0 0 59 238 34 0 0 0 0 0 12 235 125 0 0 0 0 175 247 34 0 0 0 0 0 0 +0 0 0 0 127 0 0 59 245 166 0 0 0 59 245 166 0 0 0 0 59 245 255 166 0 0 +12 0 235 166 0 0 59 245 125 0 0 138 255 125 0 0 7 202 102 0 235 166 0 0 +59 245 225 21 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 0 89 255 166 +0 0 0 89 127 12 235 166 0 0 0 12 235 125 0 12 235 125 0 0 0 0 0 138 225 +21 12 235 166 0 7 206 225 21 12 0 235 166 0 0 0 0 12 235 255 166 0 0 7 +206 255 225 21 12 235 255 201 0 0 12 235 125 0 59 245 166 0 0 138 251 89 +0 12 235 166 0 0 138 251 89 0 89 255 125 0 0 89 255 125 0 12 235 166 0 +0 138 251 89 0 12 235 166 0 0 7 202 89 0 0 0 138 225 21 0 0 12 0 235 125 +0 0 0 59 245 125 138 225 21 0 0 0 138 225 151 34 247 34 0 0 175 255 125 +0 0 89 247 34 12 235 166 0 0 89 247 34 59 245 125 0 0 59 245 125 0 0 0 +0 0 138 247 34 7 206 125 0 0 0 7 206 125 0 0 0 0 0 12 235 125 0 0 0 138 +225 187 201 0 0 0 0 0 0 0 0 0 0 127 0 12 232 89 0 0 0 0 0 12 232 89 0 0 +0 138 225 151 225 21 0 12 0 235 166 0 0 12 235 166 0 12 235 166 0 0 0 0 +0 12 0 235 166 0 0 0 12 235 166 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 +0 0 12 235 166 0 0 0 0 0 0 12 235 166 0 0 0 12 235 125 0 12 235 125 0 0 +0 0 0 138 225 21 12 235 166 0 175 225 21 0 12 0 235 166 0 0 0 0 12 235 +166 238 34 0 59 215 187 225 21 12 235 166 245 125 0 12 235 125 12 235 125 +0 0 0 0 138 247 34 12 235 166 0 0 12 235 166 12 235 125 0 0 0 0 138 247 +34 12 235 166 0 0 12 235 166 0 89 247 34 0 0 0 0 0 0 0 0 138 225 21 0 0 +12 0 235 125 0 0 0 59 245 125 59 241 89 0 0 7 206 166 59 0 241 89 0 12 +232 194 201 0 0 138 225 21 0 89 251 89 12 235 166 0 0 138 247 34 7 206 +201 0 0 0 0 0 59 245 125 0 7 206 125 0 0 0 0 138 201 0 0 0 0 0 12 235 125 +0 0 59 241 89 12 235 166 0 0 0 0 0 0 0 0 0 127 0 175 166 0 59 245 255 255 +247 34 138 201 0 0 7 206 166 59 241 89 0 12 0 235 166 0 0 89 251 89 0 89 +247 34 0 0 0 0 0 12 0 235 166 0 0 0 0 138 225 21 12 235 166 0 0 0 0 0 12 +235 166 0 0 0 0 0 89 247 34 0 0 0 0 0 0 12 235 166 0 0 0 12 235 125 0 12 +235 125 0 0 0 0 0 138 225 21 12 235 166 175 247 34 0 0 12 0 235 166 0 0 +0 0 12 235 133 206 166 0 175 166 175 225 21 12 235 125 138 225 21 12 235 +125 89 247 34 0 0 0 0 59 245 125 12 235 166 0 0 12 235 166 89 247 34 0 +0 0 0 59 245 125 12 235 166 0 0 12 235 125 0 89 255 125 0 0 0 0 0 0 0 0 +138 225 21 0 0 12 0 235 125 0 0 0 59 245 125 7 206 201 0 0 59 241 89 7 +0 206 166 0 59 215 111 225 21 7 206 166 0 0 0 175 225 187 225 21 0 0 12 +235 166 89 247 34 0 0 0 0 7 206 201 0 0 7 206 125 0 0 0 0 89 225 21 0 0 +0 0 12 235 125 0 12 235 166 0 0 59 241 89 0 0 0 0 0 0 0 0 127 0 202 89 +12 235 125 0 12 228 34 59 215 0 0 59 241 89 7 206 166 0 12 0 235 255 255 +255 255 166 0 0 138 225 21 0 0 0 0 0 12 0 235 166 0 0 0 0 89 247 34 12 +235 255 255 255 255 247 34 12 235 255 255 255 255 247 0 163 225 21 0 0 +0 0 0 0 12 235 255 255 255 255 255 255 125 0 12 235 125 0 0 0 0 0 138 225 +21 12 235 255 247 34 0 0 0 12 0 235 166 0 0 0 0 12 235 125 89 225 34 228 +34 175 225 21 12 235 125 12 235 125 12 235 125 138 225 21 0 0 0 0 12 235 +166 12 235 166 0 0 175 247 34 138 225 21 0 0 0 0 12 235 166 12 235 166 +0 0 175 225 21 0 0 175 255 255 225 21 0 0 0 0 0 138 225 21 0 0 12 0 235 +125 0 0 0 59 245 125 0 138 247 34 0 138 225 21 0 0 175 201 0 138 201 12 +232 89 12 235 125 0 0 0 12 235 251 89 0 0 0 0 89 255 255 125 0 0 0 0 0 +138 247 34 0 0 7 206 125 0 0 0 0 12 232 89 0 0 0 0 12 235 125 7 206 201 +0 0 0 0 138 251 89 0 0 0 0 0 0 0 127 7 228 34 89 225 21 0 12 228 34 12 +228 0 0 138 225 21 0 138 225 21 12 0 235 166 0 0 12 235 201 0 138 225 21 +0 0 0 0 0 12 0 235 166 0 0 0 0 89 247 34 12 235 166 0 0 0 0 0 12 235 166 +0 0 0 0 0 138 225 21 0 12 235 255 255 127 12 235 166 0 0 0 12 235 125 0 +12 235 125 0 0 0 0 0 138 225 21 12 235 229 216 225 21 0 0 12 0 235 166 +0 0 0 0 12 235 125 12 235 223 201 0 175 225 21 12 235 125 0 138 225 34 +235 125 138 225 21 0 0 0 0 12 235 166 12 235 255 255 255 247 34 0 138 225 +21 0 0 0 0 12 235 166 12 235 255 255 255 166 0 0 0 0 0 0 89 255 255 247 +34 0 0 0 138 225 21 0 0 12 0 235 125 0 0 0 59 245 125 0 59 245 125 7 206 +166 0 0 0 89 247 34 175 125 7 206 125 89 247 34 0 0 0 12 235 251 89 0 0 +0 0 7 206 225 21 0 0 0 0 59 245 125 0 0 0 7 206 125 0 0 0 0 0 175 166 0 +0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 12 228 34 89 225 +21 0 12 228 34 59 215 0 7 206 255 255 255 255 251 89 12 0 235 166 0 0 0 +138 247 0 124 247 34 0 0 0 0 0 12 0 235 166 0 0 0 0 138 225 21 12 235 166 +0 0 0 0 0 12 235 166 0 0 0 0 0 89 247 34 0 0 0 0 175 127 12 235 166 0 0 +0 12 235 125 0 12 235 125 0 0 0 0 0 138 225 21 12 235 166 59 245 201 0 +0 12 0 235 166 0 0 0 0 12 235 125 0 138 251 89 0 175 225 21 12 235 125 +0 12 235 138 235 125 89 247 34 0 0 0 0 59 245 125 12 235 166 0 0 0 0 0 +89 247 34 0 0 0 0 59 245 125 12 235 166 0 175 247 34 0 0 0 0 0 0 0 59 245 +166 0 0 0 138 225 21 0 0 12 0 235 125 0 0 0 59 241 89 0 7 206 201 59 241 +89 0 0 0 59 241 102 232 89 0 138 201 138 225 21 0 0 0 175 201 175 225 21 +0 0 0 0 175 225 21 0 0 0 7 206 201 0 0 0 0 7 206 125 0 0 0 0 0 89 225 21 +0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 12 232 89 59 241 +89 0 89 247 34 89 201 0 59 241 89 0 0 7 206 166 12 0 235 166 0 0 0 138 +225 0 81 245 166 0 0 0 0 0 12 0 235 166 0 0 0 12 235 166 0 12 235 166 0 +0 0 0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 175 127 12 235 166 0 0 +0 12 235 125 0 12 235 125 0 0 0 0 0 138 225 21 12 235 166 0 89 255 166 +0 12 0 235 166 0 0 0 0 12 235 125 0 12 182 0 0 175 225 21 12 235 125 0 +0 138 232 245 125 12 235 125 0 0 0 0 138 247 34 12 235 166 0 0 0 0 0 12 +235 125 0 0 0 0 138 247 34 12 235 166 0 7 206 225 21 0 0 0 0 0 0 12 235 +166 0 0 0 138 225 21 0 0 12 0 235 166 0 0 0 89 251 89 0 0 138 247 163 225 +21 0 0 0 7 206 200 215 21 0 89 225 187 166 0 0 0 89 251 89 12 235 166 0 +0 0 0 175 225 21 0 0 0 138 247 34 0 0 0 0 7 206 125 0 0 0 0 0 12 232 89 +0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 12 175 166 0 89 +255 255 210 235 255 255 125 0 138 225 21 0 0 0 138 247 47 0 235 166 0 0 +59 245 166 0 0 138 255 125 0 0 7 202 102 0 235 166 0 0 12 235 225 21 0 +12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 0 138 255 125 0 0 0 175 127 12 +235 166 0 0 0 12 235 125 0 12 235 125 0 0 0 0 7 206 201 0 12 235 166 0 +0 138 255 125 12 0 235 166 0 0 0 12 0 235 125 0 0 0 0 0 175 225 21 12 235 +125 0 0 12 235 255 125 0 89 255 125 0 0 89 251 89 0 12 235 166 0 0 0 0 +0 0 89 255 125 0 0 89 255 125 0 12 235 166 0 0 12 235 201 0 138 166 0 0 +0 138 251 89 0 0 0 138 225 21 0 0 0 0 138 247 34 0 7 206 225 21 0 0 12 +235 255 166 0 0 0 0 0 175 255 201 0 0 12 235 255 125 0 0 12 235 166 0 0 +138 251 89 0 0 0 175 225 21 0 0 89 251 89 0 0 0 0 0 7 206 125 0 0 0 0 0 +0 175 166 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 59 241 +89 0 0 0 0 0 0 0 0 7 206 166 0 0 0 0 59 245 138 0 235 255 255 255 255 125 +0 0 0 0 59 245 255 255 255 201 12 0 235 255 255 255 255 166 0 0 0 12 235 +255 255 255 255 255 127 12 235 166 0 0 0 0 0 0 0 59 245 255 255 255 225 +21 12 235 166 0 0 0 12 235 125 89 255 255 255 210 127 235 255 255 225 21 +0 12 235 166 0 0 0 175 255 127 0 235 255 255 255 247 47 0 235 125 0 0 0 +0 0 175 225 21 12 235 125 0 0 0 138 255 125 0 0 0 175 255 255 201 0 0 0 +12 235 166 0 0 0 0 0 0 0 0 175 255 255 201 0 0 0 12 235 166 0 0 0 89 255 +225 34 235 255 255 255 247 34 0 0 0 0 138 225 21 0 0 0 0 0 138 255 255 +255 201 0 0 0 0 0 175 251 89 0 0 0 0 0 89 255 166 0 0 7 206 247 34 0 7 +206 225 21 0 0 7 206 225 21 0 0 175 225 21 0 0 138 255 255 255 255 255 +255 166 7 206 125 0 0 0 0 0 0 138 201 0 0 0 12 235 125 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 127 0 0 89 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 201 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 7 206 125 0 0 0 0 0 0 59 238 34 0 0 12 235 125 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 127 0 0 0 7 206 255 255 255 225 21 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 251 89 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 7 206 125 0 0 0 0 0 0 7 206 125 0 0 12 235 125 0 0 0 +0 0 0 0 0 0 0 245 255 255 255 255 255 255 127 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 +255 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 255 201 0 0 0 0 0 0 89 89 255 255 +255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +0 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 +127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 59 245 166 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 89 247 34 0 0 0 0 0 0 0 0 0 0 12 235 +125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 12 235 +255 247 0 0 0 0 0 0 0 12 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 +0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 255 251 89 0 7 206 125 0 89 255 251 89 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 84 84 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 7 206 +125 0 0 0 0 0 0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 +225 21 0 0 0 0 0 0 0 0 0 175 201 0 0 0 0 0 0 0 0 0 12 12 235 125 0 0 0 +0 0 59 245 102 0 89 247 34 12 235 125 0 0 0 0 0 12 235 125 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +59 241 89 0 0 0 7 206 125 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 4 4 4 4 4 4 4 100 252 252 84 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 +235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 12 0 +235 125 0 0 0 0 0 0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 +0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 +125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 247 34 0 0 0 7 206 125 0 0 0 59 238 +34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 20 236 252 164 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 +0 0 0 0 0 0 0 12 235 255 255 255 166 0 12 235 166 245 255 247 34 0 0 12 +235 255 255 247 34 0 34 235 255 255 255 225 21 0 12 235 255 255 225 29 +0 206 255 255 255 127 0 12 235 255 255 255 225 21 12 235 138 235 255 247 +34 0 12 235 102 175 255 247 34 12 235 125 0 59 245 201 0 12 235 125 12 +0 235 166 245 255 225 29 206 255 251 89 0 12 235 138 235 255 247 34 0 0 +12 235 255 255 201 0 0 12 235 166 245 255 251 89 0 0 12 235 255 255 255 +225 21 12 235 138 235 247 127 34 138 255 255 255 206 0 206 255 255 255 +201 59 241 89 0 0 89 247 42 206 201 0 0 0 138 225 187 201 0 0 138 225 21 +0 59 241 187 226 247 34 0 7 206 206 206 201 0 0 0 138 225 151 255 255 255 +255 247 0 0 89 247 34 0 0 0 7 206 125 0 0 0 59 238 34 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 4 4 4 4 4 4 4 148 252 236 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 12 206 +21 0 59 245 125 12 235 247 34 0 138 225 21 12 235 166 0 0 134 102 0 235 +166 0 0 138 225 21 12 235 125 0 0 175 201 12 0 235 125 0 0 12 235 166 0 +0 138 225 21 12 235 247 34 0 175 201 0 12 235 102 0 89 247 34 12 235 125 +12 235 166 0 0 12 235 125 12 0 235 225 21 12 235 251 89 0 175 201 0 12 +235 247 34 0 175 201 0 12 235 166 0 7 206 201 0 12 235 225 21 0 175 225 +21 12 235 166 0 0 138 225 21 12 235 247 34 0 0 89 247 34 0 12 206 34 0 +235 125 0 0 59 241 89 0 0 89 247 34 89 247 34 0 7 206 166 138 225 21 7 +206 251 89 0 89 225 138 34 235 201 0 138 225 21 89 247 34 0 7 206 166 0 +0 0 7 206 166 0 0 89 225 21 0 0 0 7 206 125 0 0 0 59 241 89 0 0 0 0 138 +251 89 0 0 7 202 89 0 0 4 4 4 4 4 4 52 252 252 108 4 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 +0 0 0 0 0 0 0 0 7 206 102 12 235 125 0 0 59 241 89 138 225 21 0 0 0 34 +89 225 21 0 0 138 225 21 89 225 21 0 0 89 247 47 0 235 125 0 0 89 225 21 +0 0 138 225 21 12 235 125 0 0 89 247 34 12 235 102 0 89 247 34 12 235 138 +235 166 0 0 0 12 235 125 12 0 235 125 0 7 206 166 0 0 138 225 21 12 235 +125 0 0 89 247 34 138 225 21 0 0 59 238 34 12 235 125 0 0 59 241 89 89 +225 21 0 0 138 225 21 12 235 125 0 0 0 138 225 21 0 0 0 12 0 235 125 0 +0 59 241 89 0 0 89 247 34 12 235 125 0 59 241 89 59 238 34 12 228 198 166 +0 175 166 59 0 89 251 132 241 89 0 12 235 125 0 59 238 34 0 0 0 138 225 +21 0 12 235 166 0 0 0 0 7 206 125 0 0 0 0 175 201 0 0 0 138 166 12 235 +166 0 12 232 89 0 0 12 84 4 4 4 4 204 252 204 4 4 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 +0 0 0 59 245 255 255 255 102 12 235 125 0 0 12 235 125 175 201 0 0 0 0 +0 175 201 0 0 0 138 225 21 175 255 255 255 255 255 247 47 0 235 125 0 0 +175 201 0 0 0 138 225 21 12 235 125 0 0 89 247 34 12 235 102 0 89 247 34 +12 235 255 225 21 0 0 0 12 235 125 12 0 235 125 0 7 206 166 0 0 138 225 +21 12 235 125 0 0 89 247 34 175 201 0 0 0 12 232 89 12 235 125 0 0 12 235 +125 175 201 0 0 0 138 225 21 12 235 125 0 0 0 59 245 255 247 34 0 12 0 +235 125 0 0 59 241 89 0 0 89 247 34 0 175 201 0 138 201 0 12 235 125 89 +201 89 225 29 206 125 12 0 0 175 255 166 0 0 0 175 201 0 138 201 0 0 0 +89 251 89 0 138 247 34 0 0 0 0 0 7 206 125 0 0 0 0 0 89 255 125 7 202 89 +0 89 251 89 89 201 0 0 0 172 252 84 4 4 100 252 252 60 4 4 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 +0 0 0 0 0 0 0 89 255 166 0 7 206 102 12 235 125 0 0 12 235 125 175 201 +0 0 0 0 0 175 201 0 0 0 138 225 21 175 201 0 0 0 0 0 12 0 235 125 0 0 175 +201 0 0 0 138 225 21 12 235 125 0 0 89 247 34 12 235 102 0 89 247 34 12 +235 138 235 201 0 0 0 12 235 125 12 0 235 125 0 7 206 166 0 0 138 225 21 +12 235 125 0 0 89 247 34 175 201 0 0 0 12 232 89 12 235 125 0 0 12 235 +125 175 201 0 0 0 138 225 21 12 235 125 0 0 0 0 0 138 255 255 201 12 0 +235 125 0 0 59 241 89 0 0 89 247 34 0 89 247 42 206 125 0 0 175 166 175 +125 12 232 102 232 89 0 0 0 175 255 201 0 0 0 89 247 47 235 125 0 0 12 +235 166 0 0 0 12 235 125 0 0 0 0 7 206 125 0 0 0 0 138 201 0 0 12 232 89 +0 0 59 245 225 21 0 0 0 196 252 244 60 20 236 252 156 4 4 4 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 +0 0 0 0 0 0 0 175 201 0 0 7 206 102 12 235 125 0 0 59 241 89 138 225 21 +0 0 0 34 89 225 21 0 0 138 225 21 138 247 34 0 0 0 0 12 0 235 125 0 0 138 +225 21 0 0 138 225 21 12 235 125 0 0 89 247 34 12 235 102 0 89 247 34 12 +235 125 59 245 125 0 0 12 235 125 12 0 235 125 0 7 206 166 0 0 138 225 +21 12 235 125 0 0 89 247 34 138 225 21 0 0 89 247 34 12 235 125 0 0 59 +241 89 138 225 21 0 0 138 225 21 12 235 125 0 0 0 0 0 0 0 89 247 47 0 235 +125 0 0 59 241 89 0 0 89 247 34 0 12 235 166 238 34 0 0 138 210 228 34 +0 175 166 215 21 0 0 89 251 159 251 89 0 0 12 235 191 247 34 0 0 175 225 +21 0 0 0 0 138 225 21 0 0 0 7 206 125 0 0 0 12 232 89 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 20 220 252 236 180 252 244 28 4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 +138 225 21 0 138 255 102 12 235 125 0 7 206 201 0 12 235 166 0 0 134 132 +0 245 125 0 59 245 225 21 12 235 201 0 0 12 206 34 0 235 125 0 0 59 245 +125 0 12 235 225 21 12 235 125 0 0 89 247 34 12 235 102 0 89 247 34 12 +235 125 0 138 251 89 0 12 235 125 12 0 235 125 0 7 206 166 0 0 138 225 +21 12 235 125 0 0 89 247 34 12 235 166 0 7 206 201 0 12 235 125 0 7 206 +201 0 59 245 125 0 12 235 225 21 12 235 125 0 0 0 138 125 0 0 138 225 29 +0 206 166 0 0 7 206 166 0 59 245 247 34 0 0 175 255 201 0 0 0 59 245 225 +21 0 89 255 201 0 0 12 235 166 0 175 225 21 0 0 138 255 166 0 0 89 251 +89 0 0 0 0 0 89 247 34 0 0 0 7 206 125 0 0 0 59 238 34 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 4 36 236 252 252 252 108 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 +7 206 255 255 171 206 102 12 232 226 255 255 225 21 0 0 12 235 255 255 +247 34 0 89 255 255 247 163 225 21 0 7 206 255 255 247 34 12 0 235 125 +0 0 0 89 255 255 247 163 225 21 12 235 125 0 0 89 247 34 12 235 102 0 89 +247 34 12 235 125 0 0 175 251 34 0 235 125 12 0 235 125 0 7 206 166 0 0 +138 225 21 12 235 125 0 0 89 247 34 0 12 235 255 255 201 0 0 12 235 255 +255 255 225 21 0 0 89 255 255 247 163 225 21 12 235 125 0 0 0 89 255 255 +255 247 34 0 0 89 255 255 127 0 59 245 255 225 111 247 34 0 0 59 245 125 +0 0 0 12 235 166 0 0 59 245 125 7 0 206 225 21 0 12 235 201 0 0 59 241 +89 0 0 175 255 255 255 255 247 0 0 89 247 34 0 0 0 7 206 125 0 0 0 59 238 +34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 60 252 252 204 4 4 4 4 4 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 201 0 0 0 0 0 0 0 0 0 0 0 0 0 +89 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 138 225 21 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 89 247 34 0 0 0 7 +206 125 0 0 0 59 238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 76 252 60 4 4 +4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 199 34 0 12 232 89 0 0 +0 0 0 0 0 0 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 +0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 166 0 0 0 0 0 0 0 0 +0 0 0 12 235 125 0 0 0 7 206 125 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 76 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +12 235 255 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 255 251 89 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 +125 0 0 0 0 0 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 +247 34 0 0 0 0 0 0 0 0 0 0 0 0 89 255 251 89 0 7 206 125 0 89 255 247 34 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 0 127 127 127 0 127 127 127 127 127 127 127 0 +127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 +127 127 0 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 0 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 +127 127 0 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 127 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 125 0 175 166 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 206 125 0 175 166 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 225 21 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 125 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 125 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 166 0 138 201 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 166 0 138 201 0 7 206 166 12 235 +125 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 125 0 0 0 0 0 175 125 +0 0 0 0 0 175 171 206 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 255 125 0 +31 206 130 255 166 175 247 34 0 0 89 255 125 175 247 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 247 34 138 166 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 59 241 132 238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 59 241 132 238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 +59 245 255 255 255 125 0 12 235 255 255 255 255 255 225 21 0 0 0 0 0 0 +0 0 175 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 125 0 0 0 +0 0 175 125 0 0 0 0 89 225 21 59 238 34 0 0 138 255 255 201 0 0 0 59 215 +21 0 0 0 0 0 0 0 0 0 12 235 255 255 255 247 34 0 0 0 0 0 0 0 12 235 255 +255 255 255 255 255 255 255 251 89 0 12 235 255 255 255 255 255 225 21 +0 89 255 255 255 255 255 255 125 0 12 235 255 255 255 255 255 225 21 0 +0 12 235 255 255 255 255 255 225 21 7 206 201 0 50 206 56 255 201 12 235 +125 0 0 138 225 29 206 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 7 202 89 89 255 225 21 0 89 255 255 255 225 81 245 201 0 138 251 +89 0 0 138 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 255 +255 255 255 225 21 0 0 0 138 255 166 7 206 225 21 0 0 0 138 247 34 0 0 +0 0 127 0 89 255 125 0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 0 89 +247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 125 0 0 0 0 0 175 +125 0 0 0 0 0 0 0 0 0 0 0 59 241 89 12 235 125 0 0 172 89 0 0 0 0 0 0 0 +0 0 12 235 166 0 0 7 202 89 0 0 0 0 0 0 89 255 201 0 0 12 235 125 0 0 0 +0 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 138 247 34 0 12 146 0 0 0 0 0 +144 21 0 0 12 146 0 0 0 0 0 144 21 0 89 225 21 71 157 22 191 225 21 175 +201 0 7 206 125 59 238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 175 125 0 59 196 199 47 206 184 89 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 +0 0 0 59 245 125 0 0 59 245 125 0 0 0 0 0 127 12 235 166 0 0 0 0 0 0 12 +146 0 0 0 0 0 144 21 0 0 0 0 0 0 0 175 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 12 235 255 255 255 255 127 34 235 255 255 255 255 225 21 0 +0 0 0 0 0 0 0 89 247 34 7 206 166 0 89 201 0 0 0 0 0 0 0 0 0 0 89 247 34 +0 0 0 0 0 0 0 0 59 115 12 235 166 0 0 0 12 235 125 0 0 0 0 0 0 12 146 0 +0 0 0 0 144 21 0 0 0 0 0 59 245 125 0 0 12 146 0 0 0 0 0 144 21 0 0 12 +146 0 0 0 0 0 144 21 0 7 202 89 117 104 0 29 202 89 59 215 21 59 215 21 +138 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 175 125 0 59 192 89 223 125 172 89 0 138 255 255 255 201 12 182 +0 0 0 0 0 175 255 255 125 0 89 255 255 247 34 0 0 12 146 0 0 0 0 0 144 +21 0 138 255 255 255 255 247 34 138 247 34 7 206 201 0 0 0 0 0 0 127 89 +251 89 0 0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 7 206 166 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 125 0 0 0 0 0 175 125 0 0 0 +0 0 0 0 0 0 0 0 89 247 34 7 206 166 7 202 89 0 0 0 0 0 0 0 0 0 0 89 255 +125 0 0 0 0 0 0 0 89 255 125 89 247 34 0 0 0 12 235 125 0 0 0 0 0 0 12 +146 0 0 0 0 0 144 21 0 0 0 0 7 206 201 0 0 0 12 146 0 0 0 0 0 144 21 0 +0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 +255 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 +125 0 59 192 12 228 34 172 89 89 247 34 0 12 206 29 206 201 0 0 7 206 166 +0 7 206 255 225 21 0 89 247 34 0 12 146 0 0 0 0 0 144 21 0 0 0 0 7 206 +166 0 12 235 166 89 247 34 0 0 0 0 0 0 127 245 255 255 255 255 255 201 +0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 59 245 255 255 255 127 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 125 0 0 0 0 0 175 125 0 0 0 0 0 0 0 +0 0 0 0 59 241 89 12 235 125 89 201 12 235 255 251 89 0 89 255 255 225 +21 0 175 255 255 225 21 0 0 0 89 251 89 0 138 225 21 0 0 0 12 235 255 255 +255 255 225 21 0 12 146 0 0 0 0 0 144 21 0 0 0 0 138 247 34 0 0 0 12 146 +0 0 0 0 0 144 21 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 12 235 255 255 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 175 125 0 59 192 0 0 0 172 89 138 225 21 0 0 0 +0 7 206 225 21 138 225 21 0 0 89 251 89 0 0 12 235 125 0 12 146 0 0 0 0 +0 144 21 0 0 0 0 138 225 21 0 0 89 255 255 125 0 0 0 0 0 0 0 127 138 225 +21 0 0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 59 241 89 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 125 0 0 12 235 255 255 255 255 +225 21 0 0 0 0 0 0 0 0 0 138 255 255 201 12 228 34 175 166 0 138 201 7 +206 125 7 206 166 0 0 0 89 255 255 247 34 59 241 89 0 0 138 225 21 0 0 +0 12 235 125 0 0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 0 0 59 245 125 0 0 0 +0 12 146 0 0 0 0 0 144 21 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 59 245 255 255 255 207 235 255 255 255 255 255 255 +207 235 255 255 255 255 255 255 255 255 255 255 255 225 21 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 59 245 255 247 34 0 0 0 0 175 166 175 201 0 0 0 +59 245 255 255 255 255 255 125 0 12 146 0 0 0 0 0 144 21 0 0 0 89 251 89 +0 0 0 7 206 225 21 0 0 0 0 0 0 0 127 245 255 255 255 255 255 125 0 0 12 +146 0 0 0 0 0 144 21 0 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 175 125 0 0 0 0 0 175 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 138 166 7 206 125 0 89 247 94 241 89 0 138 201 0 0 0 0 0 59 245 166 +0 89 251 89 0 89 247 34 0 0 0 12 235 125 0 0 0 0 0 0 12 146 0 0 0 0 0 144 +21 0 0 7 206 201 0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 0 12 146 0 0 0 0 0 +144 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 255 255 166 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 138 255 255 201 0 7 206 225 21 175 201 0 0 0 59 241 89 0 0 0 0 +0 0 12 146 0 0 0 0 0 144 21 0 0 12 235 166 0 0 0 0 0 175 225 21 0 0 0 0 +0 0 0 127 89 255 125 0 0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 89 +247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 125 0 0 0 0 0 +175 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 228 34 7 206 125 0 89 247 94 241 +89 0 138 201 0 0 0 0 0 12 235 166 0 0 89 255 125 12 235 166 0 0 0 12 235 +125 0 0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 0 138 247 34 0 0 0 0 0 12 146 +0 0 0 0 0 144 21 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 59 245 255 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 247 42 206 201 0 0 89 +225 21 0 0 89 255 125 0 0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 0 175 225 21 +0 0 0 0 0 175 225 21 0 0 0 0 0 0 0 127 0 175 251 89 0 0 0 0 0 12 146 0 +0 0 0 0 144 21 0 59 245 166 0 0 138 225 21 0 0 0 59 245 166 138 251 89 +7 206 201 0 12 235 125 0 59 241 89 0 0 0 175 125 0 0 0 0 0 175 125 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 0 0 175 166 0 138 201 7 206 125 7 206 +166 138 166 0 0 0 138 251 89 0 0 0 59 115 0 89 255 201 0 0 12 235 125 0 +0 0 0 0 0 12 146 0 0 0 0 0 144 21 0 89 251 89 0 0 0 0 0 0 12 146 0 0 0 +0 0 144 21 0 0 12 146 0 0 0 0 0 144 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 138 125 0 0 138 225 34 182 0 0 0 7 206 166 0 +7 206 255 247 34 0 0 175 125 0 12 146 0 0 0 0 0 144 21 0 89 251 89 0 0 +0 0 0 0 175 225 21 0 0 0 0 0 0 0 127 0 0 138 255 255 255 255 125 0 12 235 +255 255 255 255 255 225 21 0 138 247 34 0 7 206 166 0 0 0 0 89 247 34 175 +201 0 7 206 201 0 12 235 125 0 59 241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 59 215 21 0 0 12 235 255 251 89 0 89 255 255 225 +21 12 235 255 255 255 247 34 0 0 0 0 0 0 0 0 12 235 255 255 255 255 255 +255 255 255 251 89 0 12 235 255 255 255 255 255 225 21 0 138 255 255 255 +255 255 255 166 0 12 235 255 255 255 255 255 225 21 0 0 12 235 255 255 +255 255 255 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 89 255 255 255 247 34 0 0 0 0 0 0 0 175 255 255 125 0 138 255 255 +255 125 0 0 12 235 255 255 255 255 255 225 21 0 175 255 255 255 255 247 +0 0 0 175 225 21 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 175 166 0 255 255 201 0 0 0 0 0 175 166 12 232 89 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 +228 34 0 0 0 0 0 0 0 0 12 232 89 59 215 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 +127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 127 0 127 127 127 0 127 127 0 127 127 127 127 127 0 127 127 127 127 +127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 +0 127 127 127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 245 255 255 255 255 255 255 225 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 225 21 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 7 206 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 247 +34 0 0 0 0 59 192 0 0 0 0 0 7 206 255 255 225 21 0 0 0 0 0 0 0 0 138 247 +34 0 0 89 251 89 0 7 206 125 0 0 7 206 255 255 255 166 0 89 251 89 138 +247 34 0 0 0 0 7 206 255 255 255 247 34 0 0 0 0 175 255 255 251 89 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 255 255 247 +34 0 0 0 0 0 0 0 0 0 0 0 0 89 255 255 247 34 0 0 0 0 0 0 0 0 0 0 0 0 12 +235 255 247 34 0 0 7 206 255 251 89 0 0 7 206 125 0 0 0 0 0 0 0 0 0 0 0 +0 89 255 255 255 255 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 202 89 0 0 0 +59 245 255 247 34 0 0 0 0 0 0 0 0 0 0 0 89 201 0 0 0 0 175 166 0 0 0 0 +0 0 89 201 0 0 0 0 175 166 0 0 0 0 0 59 245 255 201 0 0 0 59 241 89 0 0 +0 0 0 59 245 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 247 34 +0 0 0 0 59 192 0 0 0 0 0 175 201 0 0 144 21 0 0 0 0 0 0 0 0 7 206 166 0 +7 206 166 0 0 7 206 125 0 7 206 201 0 0 89 166 0 0 0 0 0 0 0 0 0 0 89 255 +125 0 0 0 59 245 166 0 0 0 0 0 0 12 206 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 89 255 125 0 0 0 59 245 166 0 0 0 0 0 0 0 0 0 0 59 +241 89 0 138 201 0 0 0 0 0 138 166 0 0 0 0 0 168 34 7 206 166 0 0 172 89 +0 175 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 255 255 255 166 89 225 21 +0 0 0 0 0 0 0 0 0 0 0 0 0 89 255 251 89 0 0 12 235 125 0 138 225 21 0 0 +0 0 0 0 0 0 7 206 255 201 0 0 0 89 225 21 0 0 0 0 7 206 255 201 0 0 0 89 +225 21 0 0 0 0 12 206 21 12 235 125 0 0 175 166 0 0 0 0 0 0 59 245 125 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 175 255 255 255 +166 0 0 12 235 125 0 0 0 0 89 225 21 0 0 12 232 89 0 89 247 34 89 247 34 +0 0 7 206 125 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 89 225 21 0 0 0 0 +0 7 206 125 0 0 7 206 255 255 247 34 0 0 0 85 89 0 85 89 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 89 225 21 0 0 0 0 0 7 206 125 0 0 0 0 0 0 0 0 0 89 201 +0 0 12 228 34 0 0 0 0 138 166 0 0 0 0 0 0 0 7 206 125 0 0 7 206 255 166 +0 0 0 0 0 0 0 0 0 12 235 125 0 0 89 247 34 175 255 255 255 166 89 225 21 +0 89 255 125 0 0 0 0 0 0 0 0 0 0 7 202 89 0 0 89 225 21 0 12 232 89 59 +115 0 59 115 0 0 0 0 0 89 201 0 0 7 206 125 0 0 0 0 0 0 0 89 201 0 0 7 +206 125 0 0 0 0 0 0 0 0 12 232 89 0 59 238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 225 21 0 0 138 247 94 192 12 182 +0 0 12 235 125 0 0 0 0 0 175 255 255 255 255 166 0 0 7 206 171 206 166 +0 0 0 7 206 125 0 7 206 251 89 0 0 0 0 0 0 0 0 0 0 0 7 202 89 0 59 245 +255 255 201 0 12 228 34 12 235 166 0 12 228 34 0 0 138 251 89 138 247 34 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 202 89 0 138 255 255 255 125 0 12 228 34 +0 0 0 0 0 0 0 0 59 241 89 0 138 201 0 0 0 0 0 138 166 0 0 0 0 0 0 0 175 +201 0 0 0 0 0 0 175 201 0 0 0 0 0 0 0 0 12 235 125 0 0 89 247 34 175 255 +255 255 166 89 225 21 0 89 255 125 0 0 0 0 0 0 0 0 0 0 7 202 89 0 0 138 +225 21 0 12 235 125 12 235 166 59 245 166 0 0 0 0 89 201 0 0 89 225 21 +0 0 0 0 0 0 0 89 201 0 0 89 225 21 0 0 0 0 0 0 12 235 255 125 0 0 175 125 +0 0 0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 +225 21 0 12 235 125 59 192 0 0 0 0 12 235 125 0 0 0 0 0 59 215 21 59 238 +34 0 0 0 89 255 247 34 0 0 0 7 206 125 0 0 7 206 255 255 247 34 0 0 0 0 +0 0 0 0 59 192 0 12 235 166 0 7 176 21 0 175 125 59 238 34 0 12 228 34 +0 138 247 34 138 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 192 0 0 138 +201 0 89 247 34 0 175 125 0 0 0 0 0 0 0 0 0 89 255 255 225 21 0 7 206 255 +255 255 255 255 255 247 34 0 12 235 125 0 0 0 7 176 21 0 175 201 0 0 0 +0 0 0 0 0 12 235 125 0 0 89 247 34 89 255 255 255 166 89 225 21 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 7 202 89 0 0 89 225 21 0 12 232 89 0 12 235 166 12 +235 166 0 0 0 89 201 0 7 206 125 0 12 235 166 0 0 0 0 89 201 0 7 206 125 +89 255 255 255 125 0 0 0 0 7 206 125 89 225 21 0 138 225 21 0 0 0 138 255 +125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 247 34 0 59 241 89 59 +192 0 0 0 12 235 255 255 255 225 21 0 0 138 166 0 7 202 89 0 0 0 7 206 +166 0 0 0 0 0 0 0 0 7 206 125 0 12 235 201 0 0 0 0 0 0 0 0 89 166 0 89 +247 34 0 0 0 0 0 89 166 12 232 89 0 138 247 34 89 247 34 59 238 34 0 0 +12 235 255 255 255 255 255 255 247 34 89 255 255 255 166 89 166 0 0 138 +201 0 138 225 21 0 89 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 +0 0 0 0 7 206 255 255 255 247 34 0 59 245 255 247 34 0 0 0 0 0 0 0 0 12 +235 125 0 0 89 247 34 0 89 255 255 166 89 225 21 0 0 0 0 0 0 0 0 0 0 0 +0 0 89 255 255 255 166 0 12 235 125 0 138 225 21 0 0 12 235 125 12 235 +125 0 0 89 201 0 89 201 0 7 206 223 166 0 0 0 0 89 201 0 89 201 0 89 125 +0 138 225 21 12 182 0 7 206 133 206 125 0 89 232 215 21 0 7 206 247 34 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 247 34 0 59 241 89 59 +192 0 0 0 0 12 235 125 0 0 0 0 0 59 215 21 59 238 34 0 59 245 255 255 255 +255 225 21 0 0 0 0 0 59 241 89 0 0 138 225 21 0 0 0 0 0 0 0 89 166 0 89 +247 34 0 0 0 0 0 89 166 0 138 255 255 176 228 34 0 138 247 34 138 247 34 +0 0 0 0 0 0 0 0 59 238 34 0 0 0 0 0 89 166 0 0 138 255 255 225 21 0 0 89 +166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 0 0 89 247 34 0 0 0 138 166 89 225 +21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 255 247 34 0 0 12 235 +166 12 235 166 0 0 0 0 0 12 232 89 0 175 166 138 166 0 0 0 0 0 0 12 232 +89 0 0 0 0 138 201 0 0 89 255 255 201 89 225 21 89 225 81 215 21 0 138 +247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 247 34 0 12 235 +125 59 192 0 0 0 0 59 241 89 0 0 0 0 0 175 255 255 255 255 166 0 0 0 7 +206 166 0 0 0 0 7 206 125 0 12 235 201 0 7 206 166 0 0 0 0 0 0 0 0 59 192 +0 12 235 166 0 7 176 21 0 175 125 0 0 0 0 0 0 0 0 0 138 251 89 138 247 +34 0 0 0 0 0 0 0 59 238 34 0 0 0 0 0 59 192 0 0 138 201 59 245 166 0 0 +175 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 0 0 89 247 34 0 0 0 138 166 +89 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 166 +59 245 166 0 0 0 0 0 0 138 201 0 138 201 0 138 166 0 0 0 0 0 0 138 201 +0 0 0 0 89 247 34 0 0 0 0 0 7 206 125 59 238 34 59 215 21 0 175 225 21 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 247 34 0 0 175 225 81 +192 12 182 0 7 206 125 0 0 0 0 0 89 225 21 0 0 12 232 89 0 0 7 206 166 +0 0 0 0 7 206 125 0 0 59 245 255 255 166 0 0 0 0 0 0 0 0 0 7 202 89 0 59 +245 255 255 166 0 12 228 34 0 0 0 0 0 0 0 0 0 0 85 89 0 85 89 0 0 0 0 0 +0 0 59 238 34 0 0 0 0 0 7 202 89 0 138 201 0 59 245 225 34 228 34 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 255 255 255 255 255 247 34 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 201 0 0 175 247 34 0 0 0 138 166 +89 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 115 0 +59 115 0 0 0 0 0 0 12 232 89 0 175 255 255 255 255 201 0 0 0 0 12 232 89 +0 0 0 138 201 0 0 0 0 0 0 0 89 201 0 89 255 255 255 255 247 34 138 251 +89 0 7 176 21 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 247 34 0 0 0 +175 255 255 255 166 0 89 255 255 255 255 255 247 34 0 0 0 0 0 0 0 0 0 0 +7 206 166 0 0 0 0 7 206 125 0 0 0 0 0 138 255 166 0 0 0 0 0 0 0 0 0 89 +225 21 0 0 0 0 0 7 206 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 59 238 34 0 0 0 0 0 0 89 225 21 0 0 0 0 0 7 206 125 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 12 235 191 255 255 166 238 34 0 0 0 138 166 89 225 21 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 201 0 0 +0 0 0 138 166 0 0 0 0 0 175 201 0 0 0 89 255 255 255 255 125 0 0 0 12 232 +89 0 0 0 0 59 215 21 0 0 138 255 255 255 225 21 0 0 0 0 0 0 0 0 0 0 0 0 +0 127 0 0 0 0 0 0 0 0 0 0 0 0 59 192 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 7 206 125 0 0 0 0 0 0 175 201 0 0 0 0 0 0 0 0 0 0 +89 255 125 0 0 0 59 245 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 89 255 125 0 0 0 59 245 166 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 12 235 125 0 0 0 0 0 0 0 0 138 166 89 225 21 0 0 0 0 0 0 0 0 0 175 +125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 59 192 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 125 0 7 199 34 +0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 7 206 255 255 255 247 34 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 255 +255 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 0 138 166 +89 225 21 0 0 0 0 0 0 0 0 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 7 206 125 0 7 206 255 255 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +127 127 0 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 0 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +0 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 138 225 +21 0 0 0 0 0 12 235 125 0 0 0 0 19 172 255 190 11 0 0 0 0 138 255 201 7 +202 89 0 0 0 0 0 0 0 0 0 0 7 206 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 59 138 225 21 0 0 0 0 0 0 59 245 201 0 0 0 19 172 +255 190 11 0 0 0 0 0 0 0 0 0 7 206 225 21 0 0 0 59 245 201 19 172 255 190 +11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 251 89 89 201 0 0 0 0 0 175 +201 0 0 0 0 0 0 0 0 7 206 225 21 0 0 0 0 0 19 172 255 190 11 0 0 0 0 0 +175 255 166 12 228 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 89 255 125 0 0 0 0 0 0 0 12 175 247 34 0 0 0 19 172 255 +190 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 247 34 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 127 0 0 0 7 206 125 0 0 0 0 0 138 201 0 0 0 0 0 136 190 +45 196 145 0 0 0 59 215 21 175 255 166 0 0 0 175 225 29 206 166 0 0 7 202 +89 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 209 125 +0 0 0 0 0 0 138 225 21 0 0 0 136 190 45 196 145 0 0 0 175 225 29 206 166 +0 0 12 235 125 0 0 12 138 225 21 136 190 45 196 145 159 251 89 138 247 +34 0 0 0 0 0 0 0 0 0 0 0 175 125 59 245 247 34 0 0 0 0 0 12 232 89 0 0 +0 0 0 0 0 175 166 0 0 0 0 0 0 12 136 190 45 196 145 0 0 0 0 138 166 12 +235 255 125 0 0 0 0 7 206 166 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 12 232 89 0 0 0 0 0 0 138 201 0 0 0 0 0 136 190 45 +196 145 34 0 0 0 89 251 89 138 247 34 0 0 0 0 0 138 201 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 202 89 7 202 89 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 255 +255 125 0 0 0 0 127 0 0 7 206 251 89 0 0 0 0 7 206 251 89 0 0 0 0 7 206 +251 89 0 0 0 0 0 7 206 251 89 0 0 0 0 7 206 251 89 0 0 0 0 12 235 255 125 +0 0 0 0 0 89 255 255 255 255 255 255 255 255 125 0 0 0 59 245 255 255 255 +201 12 235 255 255 255 255 255 125 12 235 255 255 255 255 255 125 12 235 +255 255 255 255 255 125 12 235 255 255 255 255 255 125 89 255 255 255 201 +89 255 255 255 201 89 255 255 255 201 89 255 255 255 201 0 175 255 255 +255 255 201 0 0 0 12 235 251 89 0 0 12 235 125 0 0 0 138 255 255 166 0 +0 0 0 0 0 138 255 255 166 0 0 0 0 0 0 138 255 255 166 0 0 0 0 0 0 138 255 +255 166 0 0 0 0 0 0 138 255 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 +255 255 201 89 251 89 12 235 125 0 0 0 59 245 125 12 235 125 0 0 0 59 245 +125 12 235 125 0 0 0 59 245 125 12 235 125 0 0 0 59 245 125 7 206 225 21 +0 0 0 138 247 0 235 166 0 0 0 0 0 0 138 225 21 7 206 166 0 0 0 127 0 0 +59 245 255 166 0 0 0 0 59 245 255 166 0 0 0 0 59 245 255 166 0 0 0 0 0 +59 245 255 166 0 0 0 0 59 245 255 166 0 0 0 0 59 245 255 166 0 0 0 0 0 +175 201 7 206 166 0 0 0 0 0 0 0 138 255 125 0 0 7 202 102 235 166 0 0 0 +0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 0 12 +235 125 0 0 12 235 125 0 0 12 235 125 0 0 12 235 125 0 0 175 201 0 0 7 +206 251 89 0 12 235 255 201 0 0 12 235 125 0 59 245 166 0 0 138 251 89 +0 0 59 245 166 0 0 138 251 89 0 0 59 245 166 0 0 138 251 89 0 0 59 245 +166 0 0 138 251 89 0 0 59 245 166 0 0 138 251 89 0 0 0 0 0 0 0 0 0 0 0 +0 59 245 166 0 0 89 255 166 0 12 235 125 0 0 0 59 245 125 12 235 125 0 +0 0 59 245 125 12 235 125 0 0 0 59 245 125 12 235 125 0 0 0 59 245 125 +0 59 245 125 0 0 59 245 125 12 235 166 0 0 0 0 0 12 235 125 0 0 175 201 +0 0 0 127 0 0 138 225 151 225 21 0 0 0 138 225 151 225 21 0 0 0 138 225 +151 225 21 0 0 0 0 138 225 151 225 21 0 0 0 138 225 151 225 21 0 0 0 138 +225 151 225 21 0 0 0 59 241 89 7 206 166 0 0 0 0 0 0 12 235 166 0 0 0 0 +0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 +166 0 0 0 0 0 0 12 235 125 0 0 12 235 125 0 0 12 235 125 0 0 12 235 125 +0 0 175 201 0 0 0 0 175 225 21 12 235 166 245 125 0 12 235 125 12 235 125 +0 0 0 0 138 247 34 12 235 125 0 0 0 0 138 247 34 12 235 125 0 0 0 0 138 +247 34 12 235 125 0 0 0 0 138 247 34 12 235 125 0 0 0 0 138 247 34 0 138 +225 21 0 0 0 175 201 0 12 235 125 0 0 7 202 159 247 34 12 235 125 0 0 0 +59 245 125 12 235 125 0 0 0 59 245 125 12 235 125 0 0 0 59 245 125 12 235 +125 0 0 0 59 245 125 0 0 138 247 34 7 206 201 0 12 235 255 255 255 251 +89 0 12 235 125 0 12 235 125 0 0 0 127 0 7 206 166 59 241 89 0 0 7 206 +166 59 241 89 0 0 7 206 166 59 241 89 0 0 0 7 206 166 59 241 89 0 0 7 206 +166 59 241 89 0 0 7 206 166 59 241 89 0 0 0 138 225 21 7 206 166 0 0 0 +0 0 0 89 247 34 0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 12 +235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 0 12 235 125 0 0 12 235 125 0 0 +12 235 125 0 0 12 235 125 0 0 175 201 0 0 0 0 59 241 89 12 235 125 138 +225 21 12 235 125 89 247 34 0 0 0 0 59 245 125 89 247 34 0 0 0 0 59 245 +125 89 247 34 0 0 0 0 59 245 125 89 247 34 0 0 0 0 59 245 125 89 247 34 +0 0 0 0 59 245 125 0 0 175 225 21 0 175 225 21 0 89 247 34 0 0 138 166 +12 235 125 12 235 125 0 0 0 59 245 125 12 235 125 0 0 0 59 245 125 12 235 +125 0 0 0 59 245 125 12 235 125 0 0 0 59 245 125 0 0 12 235 166 89 247 +34 0 12 235 166 0 0 138 251 89 12 235 133 206 255 125 0 0 0 0 127 0 59 +241 89 7 206 166 0 0 59 241 89 7 206 166 0 0 59 241 89 7 206 166 0 0 0 +59 241 89 7 206 166 0 0 59 241 89 7 206 166 0 0 59 241 89 7 206 166 0 0 +12 235 125 0 7 206 255 255 255 255 247 34 0 138 225 21 0 0 0 0 0 12 235 +255 255 255 255 247 34 12 235 255 255 255 255 247 34 12 235 255 255 255 +255 247 34 12 235 255 255 255 255 247 34 0 12 235 125 0 0 12 235 125 0 +0 12 235 125 0 0 12 235 125 0 206 255 255 255 247 34 0 12 235 125 12 235 +125 12 235 125 12 235 125 138 225 21 0 0 0 0 12 235 166 138 225 21 0 0 +0 0 12 235 166 138 225 21 0 0 0 0 12 235 166 138 225 21 0 0 0 0 12 235 +166 138 225 21 0 0 0 0 12 235 166 0 0 0 175 225 187 225 21 0 0 138 225 +21 0 59 215 21 7 206 166 12 235 125 0 0 0 59 245 125 12 235 125 0 0 0 59 +245 125 12 235 125 0 0 0 59 245 125 12 235 125 0 0 0 59 245 125 0 0 0 89 +255 255 125 0 0 12 235 166 0 0 12 235 166 12 235 125 0 7 206 201 0 0 0 +127 0 138 225 21 0 138 225 21 0 138 225 21 0 138 225 21 0 138 225 21 0 +138 225 21 0 0 138 225 21 0 138 225 21 0 138 225 21 0 138 225 21 0 138 +225 21 0 138 225 21 0 89 255 255 255 255 255 166 0 0 0 0 0 0 138 225 21 +0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 +0 12 235 166 0 0 0 0 0 0 12 235 125 0 0 12 235 125 0 0 12 235 125 0 0 12 +235 125 0 0 175 201 0 0 0 0 12 235 125 12 235 125 0 138 225 34 235 125 +138 225 21 0 0 0 0 12 235 166 138 225 21 0 0 0 0 12 235 166 138 225 21 +0 0 0 0 12 235 166 138 225 21 0 0 0 0 12 235 166 138 225 21 0 0 0 0 12 +235 166 0 0 0 0 175 225 21 0 0 0 138 225 21 7 202 89 0 7 206 166 12 235 +125 0 0 0 59 245 125 12 235 125 0 0 0 59 245 125 12 235 125 0 0 0 59 245 +125 12 235 125 0 0 0 59 245 125 0 0 0 7 206 225 21 0 0 12 235 166 0 0 12 +235 166 12 235 125 0 0 59 241 89 0 0 127 7 206 255 255 255 255 251 89 7 +206 255 255 255 255 251 89 7 206 255 255 255 255 251 89 0 7 206 255 255 +255 255 251 89 7 206 255 255 255 255 251 89 7 206 255 255 255 255 251 89 +7 206 166 0 0 7 206 166 0 0 0 0 0 0 89 247 34 0 0 0 0 0 12 235 166 0 0 +0 0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 0 +12 235 125 0 0 12 235 125 0 0 12 235 125 0 0 12 235 125 0 0 175 201 0 0 +0 0 59 241 89 12 235 125 0 12 235 138 235 125 89 247 34 0 0 0 0 59 245 +125 89 247 34 0 0 0 0 59 245 125 89 247 34 0 0 0 0 59 245 125 89 247 34 +0 0 0 0 59 245 125 89 247 34 0 0 0 0 59 245 125 0 0 0 175 225 187 225 21 +0 0 138 247 34 175 125 0 0 12 235 125 12 235 125 0 0 0 59 241 89 12 235 +125 0 0 0 59 241 89 12 235 125 0 0 0 59 241 89 12 235 125 0 0 0 59 241 +89 0 0 0 0 175 225 21 0 0 12 235 166 0 0 175 247 34 12 235 125 0 0 12 235 +125 0 0 127 59 241 89 0 0 7 206 166 59 241 89 0 0 7 206 166 59 241 89 0 +0 7 206 166 0 59 241 89 0 0 7 206 166 59 241 89 0 0 7 206 166 59 241 89 +0 0 7 206 166 59 241 89 0 0 7 206 166 0 0 0 0 0 0 59 245 166 0 0 0 0 0 +12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 166 +0 0 0 0 0 0 12 235 125 0 0 12 235 125 0 0 12 235 125 0 0 12 235 125 0 0 +175 201 0 0 0 0 175 225 21 12 235 125 0 0 138 232 245 125 12 235 125 0 +0 0 0 138 247 34 12 235 125 0 0 0 0 138 247 34 12 235 125 0 0 0 0 138 247 +34 12 235 125 0 0 0 0 138 247 34 12 235 125 0 0 0 0 138 247 34 0 0 175 +225 21 0 175 225 21 0 59 245 191 201 0 0 0 89 225 21 12 235 166 0 0 0 89 +251 89 12 235 166 0 0 0 89 251 89 12 235 166 0 0 0 89 251 89 12 235 166 +0 0 0 89 251 89 0 0 0 0 175 225 21 0 0 12 235 255 255 255 247 34 0 12 235 +125 0 0 59 241 89 0 0 127 138 225 21 0 0 0 138 247 163 225 21 0 0 0 138 +247 163 225 21 0 0 0 138 247 34 138 225 21 0 0 0 138 247 163 225 21 0 0 +0 138 247 163 225 21 0 0 0 138 247 198 225 21 0 0 7 206 166 0 0 0 0 0 0 +0 138 255 125 0 0 7 202 102 235 166 0 0 0 0 0 12 235 166 0 0 0 0 0 12 235 +166 0 0 0 0 0 12 235 166 0 0 0 0 0 0 12 235 125 0 0 12 235 125 0 0 12 235 +125 0 0 12 235 125 0 0 175 201 0 0 7 206 251 89 0 12 235 125 0 0 12 235 +255 125 0 89 255 125 0 0 89 251 89 0 0 89 255 125 0 0 89 251 89 0 0 89 +255 125 0 0 89 251 89 0 0 89 255 125 0 0 89 251 89 0 0 89 255 125 0 0 89 +251 89 0 0 138 225 21 0 0 0 175 201 0 0 138 251 89 0 0 89 251 89 0 0 138 +247 34 0 7 206 225 21 0 138 247 34 0 7 206 225 21 0 138 247 34 0 7 206 +225 21 0 138 247 34 0 7 206 225 21 0 0 0 0 175 225 21 0 0 12 235 166 0 +0 0 0 0 12 235 125 0 0 175 225 21 0 0 127 206 166 0 0 0 0 59 245 255 166 +0 0 0 0 59 245 255 166 0 0 0 0 59 245 133 206 166 0 0 0 0 59 245 255 166 +0 0 0 0 59 245 255 166 0 0 0 0 59 245 255 125 0 0 0 7 206 255 255 255 255 +255 125 0 0 0 59 245 255 255 255 201 12 235 255 255 255 255 255 125 12 +235 255 255 255 255 255 125 12 235 255 255 255 255 255 125 12 235 255 255 +255 255 255 125 89 255 255 255 201 89 255 255 255 201 89 255 255 255 201 +89 255 255 255 201 0 175 255 255 255 255 225 21 0 0 12 235 125 0 0 0 138 +255 125 0 0 0 175 255 255 201 0 0 0 0 0 0 175 255 255 201 0 0 0 0 0 0 175 +255 255 201 0 0 0 0 0 0 175 255 255 201 0 0 0 0 0 0 175 255 255 201 0 0 +0 0 0 0 0 0 0 0 0 0 0 7 202 97 206 255 255 201 0 0 0 0 0 138 255 255 255 +201 0 0 0 0 138 255 255 255 201 0 0 0 0 138 255 255 255 201 0 0 0 0 138 +255 255 255 201 0 0 0 0 0 0 175 225 21 0 0 12 235 166 0 0 0 0 0 12 235 +133 206 255 225 21 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 138 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 138 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 175 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 225 21 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 127 127 0 +127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 +127 0 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 7 206 225 21 +0 0 0 0 0 12 235 225 21 0 0 89 255 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 7 206 255 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 247 +34 0 0 0 0 0 0 0 138 251 89 0 0 59 245 247 34 0 0 0 0 0 0 0 0 0 175 247 +34 0 0 175 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 225 21 +0 0 0 0 0 0 0 138 255 125 0 0 0 12 235 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 251 89 0 0 0 0 0 0 +7 206 225 21 0 0 0 7 206 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 166 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 59 241 89 0 0 0 0 +0 89 247 34 0 0 7 206 138 235 125 0 0 89 255 225 21 175 125 0 0 0 0 0 0 +0 0 0 138 201 0 138 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 +235 125 0 0 0 0 0 0 12 235 125 0 0 0 175 171 206 166 0 0 0 0 0 0 0 0 0 +7 206 166 0 59 245 255 166 238 0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 125 59 +215 21 0 0 59 241 89 0 0 0 0 0 0 7 206 166 0 0 0 0 138 201 175 201 0 0 +0 12 235 251 89 89 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 7 206 166 0 0 0 0 0 0 89 247 34 0 0 0 0 89 225 151 201 0 0 0 0 +0 0 0 0 0 0 0 0 0 175 201 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 0 0 0 138 201 0 0 0 0 7 206 125 0 0 0 138 201 0 89 225 21 +12 228 34 138 255 201 0 0 0 138 247 34 175 225 21 0 138 201 0 138 201 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 225 21 0 0 0 0 0 89 225 +21 0 0 89 247 34 59 241 89 0 59 241 89 89 247 34 0 0 89 225 21 175 127 +215 21 206 247 42 206 0 138 255 247 42 206 125 0 0 138 166 12 235 251 89 +0 0 0 0 138 201 0 0 0 0 0 0 89 225 21 0 0 0 59 241 89 12 235 125 0 0 175 +125 59 245 247 34 0 0 12 235 125 89 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 59 238 34 0 0 0 0 0 175 166 0 0 0 0 12 232 89 7 206 125 0 +0 12 235 166 59 245 125 0 0 0 59 238 34 0 12 235 125 0 0 0 0 0 0 89 247 +34 138 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 255 247 34 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 251 89 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 199 34 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 12 235 255 255 255 166 0 12 235 255 +255 255 166 0 12 235 255 255 255 166 0 12 235 255 255 255 166 0 0 12 235 +255 255 255 166 0 12 235 255 255 255 166 0 12 235 255 255 255 166 0 175 +255 255 125 0 0 12 235 255 255 125 0 0 12 235 255 255 225 21 0 0 12 235 +255 255 225 21 0 12 235 255 255 225 21 0 12 235 255 255 225 21 0 12 235 +125 12 235 125 12 235 125 12 235 125 0 12 235 125 89 251 89 0 12 235 138 +235 255 247 34 0 0 12 235 255 255 201 0 0 0 12 235 255 255 201 0 0 0 12 +235 255 255 201 0 0 0 12 235 255 255 201 0 0 0 12 235 255 255 201 0 0 0 +0 0 0 175 247 34 0 0 0 12 235 255 255 255 166 0 59 241 89 0 0 89 247 34 +59 241 89 0 0 89 247 34 59 241 89 0 0 89 247 34 59 241 89 0 0 89 247 42 +206 201 0 0 0 138 232 245 166 245 255 251 89 7 206 201 0 0 0 138 225 21 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 127 12 206 21 0 59 245 125 12 206 21 0 59 245 125 12 206 +21 0 59 245 125 12 206 21 0 59 245 125 0 12 206 21 0 59 245 125 12 206 +21 0 59 245 125 12 206 21 0 12 235 255 125 0 7 206 166 12 235 166 0 0 172 +102 0 235 125 0 0 175 201 0 12 235 125 0 0 175 201 12 235 125 0 0 175 201 +12 235 125 0 0 175 201 0 12 235 125 12 235 125 12 235 125 12 235 125 0 +0 0 0 0 175 201 0 12 235 247 34 0 175 201 0 12 235 166 0 7 206 201 0 12 +235 166 0 7 206 201 0 12 235 166 0 7 206 201 0 12 235 166 0 7 206 201 0 +12 235 166 0 7 206 201 0 0 0 0 0 175 247 34 0 0 12 235 166 0 12 235 201 +0 59 241 89 0 0 89 247 34 59 241 89 0 0 89 247 34 59 241 89 0 0 89 247 +34 59 241 89 0 0 89 247 34 89 247 34 0 7 206 176 235 225 21 0 175 225 21 +89 247 34 0 7 206 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 7 206 166 0 0 0 0 7 +206 166 0 0 0 0 7 206 166 0 0 0 0 7 206 166 0 0 0 0 0 7 206 166 0 0 0 0 +7 206 166 0 0 0 0 0 175 201 0 0 0 89 225 138 225 21 0 0 0 0 89 225 21 0 +0 89 247 34 89 225 21 0 0 89 247 124 225 21 0 0 89 247 124 225 21 0 0 89 +247 34 12 235 125 12 235 125 12 235 125 12 235 125 0 89 255 255 255 255 +247 34 12 235 125 0 0 89 247 34 138 225 21 0 0 59 238 34 138 225 21 0 0 +59 238 34 138 225 21 0 0 59 238 34 138 225 21 0 0 59 238 34 138 225 21 +0 0 59 238 34 0 0 0 0 0 0 0 0 0 138 225 21 0 172 132 238 34 59 241 89 0 +0 89 247 34 59 241 89 0 0 89 247 34 59 241 89 0 0 89 247 34 59 241 89 0 +0 89 247 34 12 235 125 0 59 238 47 235 125 0 0 59 241 89 12 235 125 0 59 +238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 59 245 255 255 255 166 0 59 245 255 255 +255 166 0 59 245 255 255 255 166 0 59 245 255 255 255 166 0 0 59 245 255 +255 255 166 0 59 245 255 255 255 166 0 89 255 255 255 255 255 255 255 255 +255 247 175 201 0 0 0 0 0 175 255 255 255 255 255 247 34 175 255 255 255 +255 255 247 198 255 255 255 255 255 247 198 255 255 255 255 255 247 34 +12 235 125 12 235 125 12 235 125 12 235 125 89 251 89 0 0 59 241 89 12 +235 125 0 0 89 247 34 175 201 0 0 0 12 232 89 175 201 0 0 0 12 232 89 175 +201 0 0 0 12 232 89 175 201 0 0 0 12 232 89 175 201 0 0 0 12 232 89 7 206 +255 255 255 255 255 255 251 226 201 0 89 166 12 232 89 59 241 89 0 0 89 +247 34 59 241 89 0 0 89 247 34 59 241 89 0 0 89 247 34 59 241 89 0 0 89 +247 34 0 175 201 0 138 201 12 235 125 0 0 12 235 125 0 175 201 0 138 201 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 127 89 255 166 0 7 206 166 89 255 166 0 7 206 166 89 +255 166 0 7 206 166 89 255 166 0 7 206 166 0 89 255 166 0 7 206 166 89 +255 166 0 7 206 166 138 255 125 0 0 175 201 0 0 0 0 0 175 201 0 0 0 0 0 +175 201 0 0 0 0 0 0 175 201 0 0 0 0 0 175 201 0 0 0 0 0 175 201 0 0 0 0 +0 0 12 235 125 12 235 125 12 235 125 12 235 125 175 201 0 0 0 59 241 89 +12 235 125 0 0 89 247 34 175 201 0 0 0 12 232 89 175 201 0 0 0 12 232 89 +175 201 0 0 0 12 232 89 175 201 0 0 0 12 232 89 175 201 0 0 0 12 232 89 +0 0 0 0 0 0 0 0 0 175 201 7 176 21 12 232 89 59 241 89 0 0 89 247 34 59 +241 89 0 0 89 247 34 59 241 89 0 0 89 247 34 59 241 89 0 0 89 247 34 0 +89 247 47 235 125 12 235 125 0 0 12 235 125 0 89 247 47 235 125 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 127 175 201 0 0 7 206 166 175 201 0 0 7 206 166 175 201 0 0 +7 206 166 175 201 0 0 7 206 166 0 175 201 0 0 7 206 166 175 201 0 0 7 206 +166 175 201 0 0 0 138 225 21 0 0 0 0 138 225 21 0 0 0 0 138 247 34 0 0 +0 0 0 138 247 34 0 0 0 0 138 247 34 0 0 0 0 138 247 34 0 0 0 0 0 12 235 +125 12 235 125 12 235 125 12 235 125 175 201 0 0 0 89 247 34 12 235 125 +0 0 89 247 34 138 225 21 0 0 89 247 34 138 225 21 0 0 89 247 34 138 225 +21 0 0 89 247 34 138 225 21 0 0 89 247 34 138 225 21 0 0 89 247 34 0 0 +0 0 175 247 34 0 0 138 225 151 125 0 89 247 34 59 241 89 0 0 89 247 34 +59 241 89 0 0 89 247 34 59 241 89 0 0 89 247 34 59 241 89 0 0 89 247 34 +0 12 235 191 247 34 12 235 125 0 0 59 241 89 0 12 235 191 247 34 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 127 138 225 21 0 138 255 166 138 225 21 0 138 255 166 138 +225 21 0 138 255 166 138 225 21 0 138 255 166 0 138 225 21 0 138 255 166 +138 225 21 0 138 255 166 89 247 34 0 89 255 255 166 0 0 12 206 12 235 166 +0 0 127 102 0 235 201 0 0 12 206 21 12 235 201 0 0 12 206 34 235 201 0 +0 12 206 34 235 201 0 0 12 206 21 12 235 125 12 235 125 12 235 125 12 235 +125 89 255 125 0 7 206 166 0 12 235 125 0 0 89 247 34 12 235 166 0 7 206 +201 0 12 235 166 0 7 206 201 0 12 235 166 0 7 206 201 0 12 235 166 0 7 +206 201 0 12 235 166 0 7 206 201 0 0 0 0 0 175 247 34 0 0 12 235 201 0 +7 206 201 0 7 206 166 0 59 245 247 34 7 206 166 0 59 245 247 34 7 206 166 +0 59 245 247 34 7 206 166 0 59 245 247 34 0 0 138 255 166 0 12 235 125 +0 7 206 201 0 0 0 138 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 7 206 255 255 171 +206 166 7 206 255 255 171 206 166 7 206 255 255 171 206 166 7 206 255 255 +171 206 166 0 7 206 255 255 171 206 166 7 206 255 255 171 206 166 0 89 +255 255 201 0 0 175 255 255 247 34 0 12 235 255 255 166 0 0 7 206 255 255 +247 34 0 0 7 206 255 255 247 34 0 7 206 255 255 247 34 0 7 206 255 255 +247 34 0 12 235 125 12 235 125 12 235 125 12 235 125 0 89 255 255 255 201 +0 0 12 235 125 0 0 89 247 34 0 12 235 255 255 201 0 0 0 12 235 255 255 +201 0 0 0 12 235 255 255 201 0 0 0 12 235 255 255 201 0 0 0 12 235 255 +255 201 0 0 0 0 0 0 0 0 0 0 0 7 206 255 255 255 201 0 0 0 59 245 255 225 +111 247 34 0 59 245 255 225 111 247 34 0 59 245 255 225 111 247 34 0 59 +245 255 225 111 247 34 0 0 59 241 89 0 12 235 255 255 255 225 21 0 0 0 +59 241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 175 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 138 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 225 21 0 12 235 125 0 0 0 0 0 0 0 +138 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 166 0 0 12 235 125 0 0 0 0 0 0 7 206 +166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +12 235 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 247 34 0 0 12 235 125 0 0 0 0 0 0 89 247 +34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 127 127 0 127 127 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 0 127 127 0 127 127 0 127 127 0 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontNormalAA.pgm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontNormalAA.pgm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontNormalAA.pgm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontNormalAA.pgm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1012 @@ +P2 +# Created by Paint Shop Pro +264 106 +255 +127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 +0 0 0 4 4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 4 4 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 +59 241 97 206 166 0 0 0 0 0 0 0 0 0 0 0 0 0 168 34 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 251 89 0 0 89 255 125 89 255 125 0 0 0 0 +7 199 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 +0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 225 21 59 238 42 +206 125 0 0 0 0 7 199 34 89 166 0 0 0 0 168 34 0 0 0 175 255 255 166 0 +0 7 202 89 0 0 0 0 59 245 255 251 89 0 0 0 59 238 34 0 12 232 89 0 0 89 +247 34 0 59 245 206 199 124 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 7 202 89 0 12 235 255 247 34 0 0 0 0 12 232 89 0 0 12 235 +255 255 251 89 0 7 206 255 255 255 125 0 0 0 0 138 251 89 0 0 59 245 255 +255 255 251 89 0 0 89 255 255 166 0 89 255 255 255 255 255 201 0 0 59 245 +255 255 125 0 0 12 235 255 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 255 255 255 247 34 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 +0 0 0 0 0 127 0 0 0 0 0 138 225 21 59 238 34 175 125 0 0 0 0 59 192 0 172 +89 0 0 59 245 255 255 251 89 89 247 34 12 228 34 0 138 166 0 0 0 0 12 235 +125 0 175 225 21 0 0 59 238 34 0 138 201 0 0 0 0 175 166 0 0 0 89 255 201 +0 0 0 0 0 0 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 215 21 0 175 +166 0 138 201 0 0 7 206 255 251 89 0 0 59 192 0 0 138 247 34 59 192 0 0 +89 251 89 0 0 59 245 251 89 0 0 59 241 89 0 0 0 0 0 89 247 34 0 0 0 0 0 +0 0 7 206 166 0 7 206 125 0 89 247 34 7 206 166 0 138 225 21 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 12 232 89 0 0 0 0 0 0 0 0 0 0 0 175 166 0 0 0 0 0 +0 0 89 125 0 0 175 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 +0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 225 21 12 206 +21 175 125 0 0 89 255 255 255 255 255 255 166 59 241 89 168 34 138 125 +89 225 21 7 202 89 12 228 34 0 0 0 0 12 232 89 0 138 201 0 0 0 12 206 21 +7 202 89 0 0 0 0 59 215 21 59 245 206 199 124 255 125 0 0 0 0 7 202 89 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 0 12 232 89 0 59 238 34 0 0 +0 59 241 89 0 0 0 0 0 0 59 241 89 0 0 0 0 59 241 89 0 12 232 132 241 89 +0 0 59 241 89 0 0 0 0 7 206 125 0 0 0 0 0 0 0 0 89 247 34 0 12 232 89 0 +12 232 89 59 241 89 0 59 241 89 0 138 247 34 0 0 138 247 34 0 0 0 0 0 12 +235 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 138 255 166 0 0 0 0 0 0 0 0 0 138 +225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 0 +0 0 4 4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 172 +89 59 192 0 0 59 238 34 168 34 0 0 89 247 34 12 228 34 138 166 0 0 0 0 +0 0 138 251 159 247 34 0 0 0 0 0 0 59 238 34 0 0 0 0 7 202 89 0 0 7 199 +34 0 0 0 0 0 0 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 202 89 0 59 +241 89 0 59 241 89 0 0 0 59 241 89 0 0 0 0 0 0 89 247 34 0 0 0 0 138 201 +0 7 206 125 59 241 89 0 0 59 245 255 255 251 89 0 12 235 255 255 255 125 +0 0 0 0 7 206 166 0 0 0 175 251 89 138 201 0 59 241 89 0 12 235 125 0 138 +247 34 0 0 138 247 34 0 0 0 59 245 247 34 0 0 0 0 7 206 255 255 255 255 +255 255 125 0 0 0 0 138 255 201 0 0 0 0 0 0 89 251 89 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 +127 0 0 0 0 0 138 201 0 0 0 0 0 0 0 0 0 12 206 21 138 125 0 0 7 206 255 +247 34 0 0 0 175 255 255 166 59 215 21 175 255 255 125 0 0 138 171 206 +166 0 175 201 0 0 0 0 89 201 0 0 0 0 0 0 175 125 0 0 0 0 0 0 0 0 12 235 +255 255 255 255 255 255 125 0 0 0 0 138 255 255 251 89 0 0 0 0 0 59 215 +21 0 59 241 89 0 59 241 89 0 0 0 59 241 89 0 0 0 0 0 12 235 166 0 0 0 138 +255 255 125 0 175 201 0 59 241 89 0 0 0 0 0 0 175 247 34 59 241 89 0 89 +247 34 0 0 0 89 247 34 0 0 0 89 255 255 255 125 0 12 235 166 0 59 245 125 +0 0 0 0 0 0 0 0 0 0 0 175 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 89 251 89 0 0 7 206 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 4 4 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 201 +0 0 0 0 0 0 0 12 235 255 255 255 255 255 225 21 0 0 0 175 255 251 89 0 +0 0 0 0 175 125 89 225 21 59 238 34 89 225 21 12 235 166 175 166 0 0 0 +0 89 201 0 0 0 0 0 0 175 125 0 0 0 0 0 0 0 0 0 0 0 7 202 89 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 138 166 0 0 59 241 89 0 59 241 89 0 0 0 59 241 89 +0 0 0 0 12 235 166 0 0 0 0 0 0 59 241 97 206 255 255 255 255 255 125 0 +0 0 0 0 59 241 89 59 238 34 0 12 235 125 0 0 12 235 125 0 0 0 12 232 89 +0 59 245 125 0 89 255 255 232 241 89 0 0 0 0 0 0 0 0 0 0 0 0 59 245 247 +34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 255 201 0 0 0 0 7 206 125 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 0 0 0 4 +4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 125 12 206 21 +0 0 0 0 0 168 34 175 166 0 0 0 0 59 215 21 138 201 0 12 228 34 138 225 +21 0 12 235 251 89 0 0 0 0 59 215 21 0 0 0 0 12 232 89 0 0 0 0 0 0 0 0 +0 0 0 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 202 89 0 0 12 232 89 0 +59 238 34 0 0 0 59 241 89 0 0 0 12 235 166 0 0 0 0 0 0 0 12 235 125 0 0 +0 59 241 89 0 0 0 0 0 0 59 241 89 12 232 89 0 12 232 89 0 0 138 225 21 +0 0 0 59 238 34 0 7 206 166 0 0 0 0 89 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 12 235 247 34 0 0 7 206 255 255 255 255 255 255 125 0 0 138 255 166 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 +0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 225 21 0 0 0 0 +0 0 0 0 172 89 89 166 0 0 0 89 166 0 168 42 206 125 0 0 0 7 202 89 0 89 +225 21 59 238 34 89 251 89 0 0 175 255 201 0 0 0 0 7 202 89 0 0 0 0 59 +215 21 0 0 0 0 0 0 0 0 0 0 0 7 202 89 0 0 0 0 138 247 34 0 0 0 0 0 7 206 +201 0 12 228 34 0 0 0 175 166 0 138 201 0 0 0 0 59 241 89 0 0 12 235 166 +0 0 0 0 89 166 0 0 89 251 89 0 0 0 59 241 89 0 0 59 192 0 0 175 225 21 +0 175 201 0 138 225 21 0 12 235 125 0 0 0 0 12 235 166 0 59 241 89 0 0 +0 7 206 166 0 0 138 247 34 0 0 59 245 125 0 0 0 0 0 0 0 12 232 89 0 0 0 +0 0 0 0 0 0 0 0 175 166 0 0 0 0 0 0 0 0 7 206 166 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 +127 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 12 206 21 138 125 0 0 0 12 235 255 +255 255 166 0 0 0 0 138 201 0 0 0 175 255 255 125 0 0 138 255 255 255 125 +12 235 247 0 0 0 0 138 201 0 0 0 0 175 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 7 206 166 0 0 0 0 0 0 7 206 201 0 89 201 0 0 0 0 12 235 255 247 +34 0 0 7 206 255 255 255 225 21 89 255 255 255 255 255 166 59 245 255 255 +251 89 0 0 0 0 59 241 89 0 0 12 235 255 255 225 21 0 0 12 235 255 251 89 +0 0 175 225 21 0 0 0 0 0 59 245 255 255 125 0 0 89 255 255 166 0 0 0 138 +247 34 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 7 206 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 +0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 168 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 12 232 89 0 0 59 238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 175 125 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 125 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 0 0 0 +4 4 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 168 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 +255 125 89 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 201 0 0 0 0 +0 0 0 0 0 0 12 228 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 228 34 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0 0 0 0 0 +127 127 127 127 0 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 0 127 127 127 127 +0 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 127 0 127 127 127 0 127 127 127 127 0 127 127 127 0 127 127 127 127 +0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 0 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 255 125 138 166 0 0 0 89 255 255 247 +34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 89 255 255 +255 255 166 0 0 0 0 0 12 235 225 21 0 0 59 245 255 255 255 251 89 0 0 0 +59 245 255 255 251 89 59 245 255 255 255 247 34 0 0 59 245 255 255 255 +255 127 81 245 255 255 255 255 127 0 0 59 245 255 255 255 166 0 59 241 +89 0 0 0 59 241 89 89 255 255 255 125 7 206 255 251 89 59 241 89 0 0 89 +255 166 59 241 89 0 0 0 0 59 245 225 21 0 0 7 206 251 89 59 245 247 34 +0 0 59 241 89 0 0 138 255 255 255 166 0 0 59 245 255 255 255 225 21 0 0 +0 138 255 255 255 166 0 0 59 245 255 255 255 251 89 0 0 0 59 245 255 255 +201 89 255 255 255 255 255 255 255 125 59 241 89 0 0 0 59 241 97 206 166 +0 0 0 0 175 201 175 201 0 0 7 206 201 0 0 0 175 171 206 225 21 0 0 59 245 +166 245 125 0 0 0 89 251 89 89 255 255 255 255 255 127 0 228 34 0 0 59 +215 21 0 0 0 0 12 228 34 0 0 0 59 245 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 127 0 0 175 225 21 0 0 0 175 225 21 0 0 0 89 232 241 89 0 0 59 +241 89 0 0 138 225 21 0 89 255 125 0 0 59 192 59 241 89 0 0 175 251 89 +0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 0 89 255 125 0 0 7 199 34 59 241 +89 0 0 0 59 241 89 0 59 241 89 0 0 0 59 241 89 59 241 89 0 59 241 89 0 +59 241 89 0 0 0 0 59 245 255 125 0 0 89 255 251 89 59 245 255 201 0 0 59 +241 89 0 138 251 89 0 12 235 166 0 59 241 89 0 7 206 225 21 0 138 251 89 +0 12 235 166 0 59 241 89 0 0 138 247 34 0 12 235 125 0 7 176 21 0 0 59 +241 89 0 0 0 59 241 89 0 0 0 59 241 89 138 225 21 0 0 12 235 125 89 225 +21 0 59 245 247 34 0 12 232 89 12 235 166 0 7 206 166 0 89 247 34 0 7 206 +125 0 0 0 0 0 7 206 166 12 228 34 0 0 7 202 89 0 0 0 0 12 228 34 0 0 12 +235 133 206 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 138 201 0 138 +255 255 255 125 138 166 0 0 7 206 166 175 166 0 0 59 241 89 0 0 89 247 +34 7 206 166 0 0 0 0 0 59 241 89 0 0 0 175 225 21 59 241 89 0 0 0 0 59 +241 89 0 0 0 0 7 206 166 0 0 0 0 0 0 59 241 89 0 0 0 59 241 89 0 59 241 +89 0 0 0 59 241 89 59 241 89 59 241 89 0 0 59 241 89 0 0 0 0 59 241 159 +225 21 0 175 166 241 89 59 241 132 241 89 0 59 241 89 12 235 166 0 0 0 +89 247 34 59 241 89 0 0 89 247 34 12 235 166 0 0 0 89 247 34 59 241 89 +0 0 59 241 89 0 59 238 34 0 0 0 0 0 0 59 241 89 0 0 0 59 241 89 0 0 0 59 +241 89 59 241 89 0 0 89 225 21 59 241 89 0 89 206 202 89 0 59 238 34 0 +89 251 89 138 225 21 0 0 175 201 0 138 225 21 0 0 0 0 0 175 225 21 12 228 +34 0 0 0 138 166 0 0 0 0 12 228 34 0 7 206 166 0 12 235 125 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 127 7 202 89 89 225 21 7 206 125 12 206 21 0 59 238 +34 89 247 34 0 59 241 89 0 0 175 201 0 59 241 89 0 0 0 0 0 59 241 89 0 +0 0 59 241 89 59 241 89 0 0 0 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 0 0 +59 241 89 0 0 0 59 241 89 0 59 241 89 0 0 0 59 241 89 59 241 102 232 89 +0 0 0 59 241 89 0 0 0 0 59 241 102 232 89 59 215 81 241 89 59 241 89 138 +225 21 59 241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 7 206 201 0 59 241 +89 0 0 0 59 241 89 59 241 89 0 0 175 201 0 0 12 235 166 0 0 0 0 0 0 59 +241 89 0 0 0 59 241 89 0 0 0 59 241 89 7 206 166 0 0 175 166 0 7 206 125 +0 175 125 175 166 0 138 201 0 0 0 175 255 251 89 0 0 0 59 245 166 241 89 +0 0 0 0 0 89 247 34 0 12 228 34 0 0 0 89 201 0 0 0 0 12 228 34 12 235 201 +0 0 0 59 245 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 59 215 21 175 125 +0 7 206 125 7 199 34 0 138 201 0 12 235 125 0 59 245 255 255 255 247 34 +0 59 241 89 0 0 0 0 0 59 241 89 0 0 0 59 241 89 59 245 255 255 255 255 +127 59 245 255 255 255 255 127 59 241 89 0 0 0 0 0 0 59 245 255 255 255 +255 255 251 89 0 59 241 89 0 0 0 59 241 89 59 245 255 247 34 0 0 0 59 241 +89 0 0 0 0 59 241 89 138 201 175 166 59 241 89 59 241 89 12 235 125 59 +241 89 59 241 89 0 0 0 12 235 125 59 245 255 255 255 201 0 0 59 241 89 +0 0 0 12 235 125 59 245 255 255 255 125 0 0 0 0 59 245 255 255 125 0 0 +0 59 241 89 0 0 0 59 241 89 0 0 0 59 241 89 0 138 225 21 59 241 89 0 0 +175 201 7 202 89 89 201 0 175 166 0 0 0 12 235 166 0 0 0 0 0 138 255 166 +0 0 0 0 0 59 245 125 0 0 12 228 34 0 0 0 12 228 34 0 0 0 12 228 34 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 59 215 21 175 125 0 7 +206 125 7 199 34 7 206 125 0 0 175 201 0 59 241 89 0 0 89 247 34 59 241 +89 0 0 0 0 0 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 0 59 241 89 0 0 +0 0 59 241 89 0 59 245 255 251 89 59 241 89 0 0 0 59 241 89 0 59 241 89 +0 0 0 59 241 89 59 241 89 175 225 21 0 0 59 241 89 0 0 0 0 59 241 89 12 +235 247 34 59 241 89 59 241 89 0 89 247 94 241 89 59 241 89 0 0 0 59 241 +89 59 241 89 0 0 0 0 0 59 241 89 0 0 0 59 241 89 59 241 89 12 235 166 0 +0 0 0 0 0 0 138 251 89 0 0 59 241 89 0 0 0 59 241 89 0 0 0 59 241 89 0 +12 232 89 138 225 21 0 0 89 225 81 215 21 12 228 47 232 89 0 0 0 175 255 +251 89 0 0 0 0 59 241 89 0 0 0 0 7 206 201 0 0 0 12 228 34 0 0 0 0 175 +125 0 0 0 12 228 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +12 228 34 89 201 0 7 206 125 59 215 21 59 245 255 255 255 255 247 34 59 +241 89 0 0 59 241 89 7 206 166 0 0 0 0 0 59 241 89 0 0 0 138 225 21 59 +241 89 0 0 0 0 59 241 89 0 0 0 0 7 206 166 0 0 0 59 241 89 59 241 89 0 +0 0 59 241 89 0 59 241 89 0 0 0 59 241 89 59 241 89 7 206 201 0 0 59 241 +89 0 0 0 0 59 241 89 0 175 166 0 59 241 89 59 241 89 0 7 206 200 241 89 +12 235 166 0 0 0 89 247 34 59 241 89 0 0 0 0 0 12 235 166 0 0 0 89 247 +34 59 241 89 0 59 245 125 0 0 0 0 0 0 12 232 89 0 0 59 241 89 0 0 0 12 +232 89 0 0 0 59 238 34 0 0 175 171 206 166 0 0 0 12 232 159 201 0 7 202 +132 215 21 0 0 89 247 34 175 225 21 0 0 0 59 241 89 0 0 0 0 138 225 21 +0 0 0 12 228 34 0 0 0 0 89 201 0 0 0 12 228 34 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 138 201 7 206 255 251 226 255 255 166 0 +138 201 0 0 0 12 235 125 59 241 89 0 0 138 247 34 0 89 255 125 0 0 59 192 +59 241 89 0 0 138 251 89 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 0 89 255 +125 0 0 59 241 89 59 241 89 0 0 0 59 241 89 0 59 241 89 0 0 0 89 247 34 +59 241 89 0 12 235 166 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 59 241 89 +59 241 89 0 0 59 245 251 89 0 138 251 89 0 59 245 166 0 59 241 89 0 0 0 +0 0 0 138 251 89 0 59 245 166 0 59 241 89 0 0 138 251 89 0 89 166 0 0 89 +247 34 0 0 59 241 89 0 0 0 0 138 225 21 0 7 206 166 0 0 0 89 255 251 89 +0 0 0 7 206 255 125 0 0 138 255 201 0 0 12 235 125 0 12 235 166 0 0 0 59 +241 89 0 0 0 89 251 89 0 0 0 0 12 228 34 0 0 0 0 12 228 34 0 0 12 228 34 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 7 206 225 21 0 +0 0 0 0 0 7 206 125 0 0 0 0 175 201 59 245 255 255 255 247 34 0 0 0 59 +245 255 255 251 89 59 245 255 255 255 225 21 0 0 59 245 255 255 255 255 +127 81 241 89 0 0 0 0 0 0 59 245 255 255 255 201 0 59 241 89 0 0 0 59 241 +89 89 255 255 255 138 235 255 255 125 0 59 241 89 0 0 89 255 201 59 245 +255 255 255 255 166 59 241 89 0 0 0 0 59 241 89 59 241 89 0 0 0 175 251 +89 0 0 138 255 255 255 166 0 0 59 241 89 0 0 0 0 0 0 0 138 255 255 255 +166 0 0 59 241 89 0 0 0 175 251 89 12 235 255 255 251 89 0 0 0 59 241 89 +0 0 0 0 0 59 245 255 251 89 0 0 0 0 12 235 201 0 0 0 0 0 138 251 89 0 0 +89 255 125 0 7 206 225 21 0 0 89 255 125 0 0 59 241 89 0 0 0 175 255 255 +255 255 255 127 0 228 34 0 0 0 0 0 175 125 0 0 12 228 34 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 89 255 255 255 255 125 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 +228 34 0 0 0 0 0 89 201 0 0 12 228 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 138 255 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 255 125 0 0 0 12 228 +124 255 255 247 34 0 0 0 0 0 0 0 0 0 245 255 255 255 255 255 255 0 0 0 +0 0 0 0 0 0 0 127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 0 127 +127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 127 0 89 255 125 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 89 255 255 166 0 0 0 0 0 +0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 255 201 0 12 228 +34 0 0 89 255 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 4 4 116 116 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 127 0 0 59 241 89 0 0 0 0 0 0 0 0 0 59 241 89 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 12 235 125 0 0 0 0 0 0 +0 0 0 59 241 89 0 0 0 0 59 241 89 0 89 251 89 59 241 89 0 0 0 0 59 241 +89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 225 +21 0 0 12 228 34 0 0 0 0 138 201 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 +4 4 28 244 252 52 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 +241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 59 241 89 0 +0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 59 241 +89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 +0 0 0 12 228 34 0 0 0 0 89 225 21 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 +4 180 252 164 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 7 206 255 255 255 +125 0 59 241 194 255 251 89 0 0 7 206 255 255 201 0 12 235 255 255 251 +89 0 12 235 255 251 89 7 206 255 255 247 34 0 12 235 255 255 251 89 59 +241 194 255 255 125 0 59 241 89 89 255 251 89 59 241 89 0 138 251 89 59 +241 89 59 241 159 255 255 125 89 255 255 166 0 59 241 194 255 255 125 0 +0 0 12 235 255 247 34 0 59 241 194 255 255 125 0 0 12 235 255 255 251 89 +59 241 159 255 201 0 138 255 255 247 34 206 255 255 255 166 59 241 89 0 +59 241 97 206 166 0 0 12 235 125 175 201 0 7 206 166 0 7 206 133 206 225 +21 0 89 255 255 166 0 0 12 235 125 138 255 255 255 255 166 0 0 138 166 +0 0 0 12 228 34 0 0 0 0 89 225 21 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 4 +76 252 244 20 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 89 247 34 +59 245 166 0 138 225 21 7 206 201 0 0 0 7 206 166 0 59 241 89 7 206 125 +0 89 225 21 59 241 89 0 0 7 206 166 0 59 241 89 59 245 166 0 89 247 34 +59 241 89 0 59 241 89 59 241 89 138 225 21 0 59 241 89 59 245 201 0 89 +255 201 0 89 247 34 59 245 166 0 89 247 34 0 7 206 166 0 138 225 21 59 +245 166 0 138 247 34 7 206 166 0 59 241 89 59 245 201 0 0 59 238 34 0 130 +34 59 241 89 0 0 59 241 89 0 59 241 89 89 247 34 0 89 247 34 138 225 21 +12 235 225 21 12 232 89 7 206 166 12 235 125 89 247 34 0 89 247 34 0 0 +0 89 247 34 0 0 138 166 0 0 0 12 228 34 0 0 0 0 89 225 21 0 0 7 206 247 +34 0 0 89 201 0 0 4 4 68 12 4 4 4 220 252 108 4 4 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 0 0 0 0 0 0 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 0 0 59 +241 89 0 59 241 89 59 238 34 0 59 238 34 59 241 89 0 0 59 241 89 0 59 241 +89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 59 241 159 201 0 0 0 59 +241 89 59 241 89 0 59 241 89 0 59 241 89 59 241 89 0 59 241 89 0 59 241 +89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 +0 59 241 89 0 0 0 59 241 89 0 0 59 241 89 0 59 241 89 12 235 125 0 175 +166 0 59 238 34 89 171 202 89 89 225 21 0 59 241 226 201 0 12 235 125 0 +175 166 0 0 0 12 235 125 0 0 59 238 34 0 0 0 12 228 34 0 0 0 0 7 206 125 +0 7 202 89 12 235 166 0 175 125 0 0 4 60 244 172 4 4 132 252 212 4 4 4 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 89 255 255 255 251 89 59 241 89 +0 59 241 89 59 238 34 0 0 0 59 238 34 0 59 241 89 59 245 255 255 255 251 +0 59 241 89 0 0 59 238 34 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 +59 241 89 59 245 255 225 21 0 0 59 241 89 59 241 89 0 59 241 89 0 59 241 +89 59 241 89 0 59 241 89 0 59 238 34 0 12 232 89 59 241 89 0 12 232 89 +59 238 34 0 59 241 89 59 241 89 0 0 0 175 255 255 201 0 59 241 89 0 0 59 +241 89 0 59 241 89 0 175 201 12 232 89 0 7 206 125 172 89 138 166 138 201 +0 0 0 138 247 34 0 0 175 201 12 232 89 0 0 7 206 166 0 0 175 225 21 0 0 +0 0 12 228 34 0 0 0 0 0 0 175 225 34 206 21 0 0 175 255 166 0 0 0 4 52 +244 252 140 36 244 252 60 4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 59 +241 89 0 59 241 89 59 241 89 0 59 238 34 59 241 89 0 0 0 59 241 89 0 59 +241 89 59 238 34 0 0 0 0 59 241 89 0 0 59 241 89 0 59 241 89 59 241 89 +0 59 241 89 59 241 89 0 59 241 89 59 241 97 206 201 0 0 59 241 89 59 241 +89 0 59 241 89 0 59 241 89 59 241 89 0 59 241 89 0 59 241 89 0 59 241 89 +59 241 89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 0 0 0 0 59 245 +125 59 241 89 0 0 59 241 89 0 59 241 89 0 59 238 124 225 21 0 0 175 176 +206 21 59 215 187 125 0 0 59 245 255 201 0 0 89 247 124 225 21 0 0 138 +225 21 0 0 0 59 241 89 0 0 0 12 228 34 0 0 0 0 12 235 125 0 0 0 0 0 0 0 +0 0 0 0 0 4 4 76 252 252 220 252 164 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 +0 0 0 0 0 0 89 247 34 0 89 251 89 59 241 89 0 175 201 0 7 206 201 0 0 0 +7 206 166 0 138 251 89 7 206 166 0 7 199 34 59 241 89 0 0 7 206 166 0 138 +251 89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 12 235 166 +0 59 241 89 59 241 89 0 59 241 89 0 59 241 89 59 241 89 0 59 241 89 0 7 +206 166 0 138 225 21 59 241 89 0 138 225 21 7 206 166 0 89 251 89 59 241 +89 0 0 89 125 0 12 232 89 12 232 89 0 12 12 235 125 0 175 251 89 0 7 206 +255 125 0 0 0 89 255 201 0 7 206 247 34 0 7 206 166 59 245 125 0 7 206 +255 125 0 0 59 241 89 0 0 0 0 0 138 166 0 0 0 12 228 34 0 0 0 0 89 225 +21 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 100 252 252 244 28 4 4 4 4 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 127 0 0 0 0 0 0 0 0 175 255 255 232 241 89 59 245 255 255 247 34 +0 0 12 235 255 255 201 0 59 245 255 200 241 89 0 12 235 255 251 89 0 59 +241 89 0 0 0 12 235 255 200 241 89 59 241 89 0 59 241 89 59 241 89 0 59 +241 89 59 241 89 0 59 245 201 59 241 89 59 241 89 0 59 241 89 0 59 241 +89 59 241 89 0 59 241 89 0 0 12 235 255 247 34 0 59 245 166 255 247 34 +0 0 59 245 255 166 241 89 59 241 89 0 0 59 245 255 255 166 0 0 138 255 +255 125 0 89 255 255 166 241 89 0 0 138 247 34 0 0 0 59 245 125 0 0 138 +225 21 7 206 225 21 0 138 251 0 0 138 247 34 0 0 175 255 255 255 255 166 +0 0 138 166 0 0 0 12 228 34 0 0 0 0 89 225 21 0 0 0 0 0 0 0 0 0 0 0 0 4 +4 4 4 132 252 108 4 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 89 247 34 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 +0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 232 89 0 0 0 0 0 0 0 0 0 0 0 138 +201 0 0 0 12 228 34 0 0 0 0 138 201 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 +116 4 4 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 166 255 255 +247 34 0 0 0 0 0 0 0 0 0 0 0 255 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 59 +241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 0 0 0 0 7 206 255 +201 0 12 228 34 0 0 89 255 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 4 4 +4 4 4 4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 127 127 0 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 0 127 127 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 0 127 127 127 0 127 127 127 +127 127 127 0 127 127 0 127 127 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 0 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 0 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 127 127 127 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 89 247 34 138 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 125 59 238 34 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 255 +225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +12 235 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 238 34 138 201 0 0 0 0 0 +0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 199 34 0 0 0 0 0 7 199 34 0 0 0 0 138 255 +201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 251 89 0 0 138 255 251 97 206 201 0 0 138 +251 102 235 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 255 +201 12 228 34 0 0 0 0 0 0 0 0 0 0 0 0 7 206 166 12 232 89 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 166 12 235 127 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 127 0 0 175 255 255 255 225 21 59 245 255 255 255 +255 255 125 0 0 0 0 0 0 0 7 206 255 247 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 7 199 34 0 0 0 0 0 7 199 34 0 0 0 138 225 21 175 166 0 0 175 255 255 +166 0 0 7 202 89 0 0 0 0 0 0 0 0 0 0 59 245 255 255 201 0 0 0 0 0 0 0 0 +59 245 255 255 255 255 255 255 255 255 125 0 59 245 255 255 255 255 255 +125 0 0 89 255 255 255 255 255 225 21 59 245 255 255 255 255 255 125 0 +0 0 59 245 255 255 255 255 255 125 7 206 166 0 0 175 171 206 166 89 247 +34 0 175 201 59 241 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +12 228 34 175 255 125 0 0 89 255 255 255 125 175 251 89 89 255 125 0 7 +206 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 255 255 255 +255 255 125 0 0 7 206 255 125 59 245 125 0 0 0 89 251 89 0 0 0 0 0 0 0 +127 7 206 225 21 0 0 0 0 59 115 0 0 0 0 59 115 0 0 0 0 0 0 0 175 201 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 255 255 255 255 125 0 59 245 255 +255 255 255 125 0 0 0 0 0 0 0 89 247 34 12 228 34 0 138 166 0 0 0 0 0 0 +0 0 0 0 12 235 125 0 7 176 21 0 0 0 0 0 0 138 251 89 0 0 138 201 0 0 0 +0 0 0 59 115 0 0 0 0 59 115 0 0 0 0 0 0 7 206 166 0 59 115 0 0 0 0 59 115 +0 0 0 59 115 0 0 0 0 59 115 0 89 201 0 12 232 89 89 201 7 202 89 12 232 +89 138 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 7 199 34 0 172 132 196 199 163 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 59 115 0 0 0 0 59 115 0 0 0 0 0 0 0 89 247 34 0 7 +206 125 0 0 0 0 0 0 0 0 127 89 247 34 0 0 0 0 0 59 115 0 0 0 0 59 115 0 +0 0 0 0 0 7 206 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 199 34 0 +0 0 0 0 7 199 34 0 0 0 0 0 0 0 0 0 89 225 21 7 202 89 12 228 34 0 0 0 0 +0 0 0 0 0 0 59 238 34 0 0 0 0 0 0 0 130 34 59 241 89 0 0 0 138 201 0 0 +0 0 0 0 59 115 0 0 0 0 59 115 0 0 0 0 0 0 175 225 21 0 59 115 0 0 0 0 59 +115 0 0 0 59 115 0 0 0 0 59 115 0 12 228 34 59 192 0 12 228 34 138 166 +59 215 21 175 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 7 199 34 0 172 89 175 166 138 125 0 138 255 255 247 34 12 +146 0 0 0 0 89 255 255 255 125 12 235 255 255 125 0 0 0 59 115 0 0 0 0 +59 115 0 138 255 255 255 255 127 0 175 201 0 138 225 21 0 0 0 0 0 0 0 0 +127 245 255 255 255 255 255 125 0 59 115 0 0 0 0 59 115 0 0 0 0 0 0 12 +232 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 199 34 0 0 0 0 0 7 199 +34 0 0 0 0 0 0 0 0 0 89 247 34 12 228 34 138 166 0 0 0 0 0 0 0 0 0 0 0 +12 235 166 0 0 0 0 0 0 175 225 21 138 225 21 0 0 0 138 201 0 0 0 0 0 0 +59 115 0 0 0 0 59 115 0 0 0 0 0 89 247 34 0 0 59 115 0 0 0 0 59 115 0 0 +0 59 115 0 0 0 0 59 115 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 255 166 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 199 34 0 172 +89 0 0 138 125 59 238 34 0 130 34 7 206 201 0 0 59 241 89 0 12 235 255 +125 0 59 241 89 0 0 59 115 0 0 0 0 59 115 0 0 0 0 89 247 34 0 59 245 166 +241 89 0 0 0 0 0 0 0 0 0 127 138 225 21 0 0 0 0 0 59 115 0 0 0 0 59 115 +0 0 0 0 0 89 255 255 255 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 199 +34 0 0 0 0 0 7 199 34 0 0 0 0 0 0 0 0 0 0 175 255 255 166 59 215 21 175 +255 255 125 0 89 255 255 201 0 0 0 59 245 255 255 125 0 12 235 166 0 0 +138 225 21 0 0 0 138 255 255 255 255 247 34 0 59 115 0 0 0 0 59 115 0 0 +0 0 59 245 125 0 0 0 59 115 0 0 0 0 59 115 0 0 0 59 115 0 0 0 0 59 115 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 255 251 102 0 255 255 255 255 +255 0 245 255 255 255 255 255 255 255 255 255 255 127 21 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 59 241 89 0 0 0 0 0 138 247 34 138 201 0 0 0 175 +201 0 0 0 175 166 0 0 59 115 0 0 0 0 59 115 0 0 0 12 235 125 0 0 0 138 +255 166 0 0 0 0 0 0 0 0 0 0 127 245 255 255 255 255 225 21 0 59 115 0 0 +0 0 59 115 0 0 0 0 0 0 89 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 7 199 34 0 0 0 59 245 255 255 255 255 125 0 0 0 0 0 0 0 0 0 0 0 0 175 +125 89 225 21 59 238 47 232 89 7 206 125 0 0 0 0 0 138 251 89 12 235 166 +0 0 138 225 21 0 0 0 138 201 0 0 0 0 0 0 59 115 0 0 0 0 59 115 0 0 0 7 +206 201 0 0 0 0 59 115 0 0 0 0 59 115 0 0 0 59 115 0 0 0 0 59 115 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 255 251 89 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 255 255 201 0 +0 0 138 247 34 175 201 0 0 0 138 255 255 255 255 255 166 0 0 59 115 0 0 +0 0 59 115 0 0 7 206 166 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 127 89 251 +89 0 0 0 0 0 59 115 0 0 0 0 59 115 0 0 0 0 0 0 138 201 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 7 199 34 0 0 0 0 0 7 199 34 0 0 0 0 0 0 0 0 0 +0 0 0 0 59 215 21 138 201 0 12 228 47 228 34 0 175 166 0 0 0 0 0 12 232 +89 0 0 175 225 21 59 241 89 0 0 0 138 201 0 0 0 0 0 0 59 115 0 0 0 0 59 +115 0 0 0 138 225 21 0 0 0 0 59 115 0 0 0 0 59 115 0 0 0 59 115 0 0 0 0 +59 115 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 255 166 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 +245 125 7 206 201 0 0 138 201 0 0 0 175 201 0 0 0 0 0 0 0 59 115 0 0 0 +0 59 115 0 0 138 225 21 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 127 7 206 +247 34 0 0 0 0 59 115 0 0 0 0 59 115 0 59 245 125 0 0 175 166 0 0 0 59 +245 125 175 225 29 206 166 0 89 247 34 7 206 166 0 0 0 7 199 34 0 0 0 0 +0 7 199 34 0 0 0 0 0 0 0 0 0 0 0 0 7 202 89 0 89 225 21 59 238 47 232 89 +7 206 125 0 89 166 0 0 89 247 34 0 0 0 130 34 0 138 255 125 0 0 138 201 +0 0 0 0 0 0 59 115 0 0 0 0 59 115 0 0 89 251 89 0 0 0 0 0 59 115 0 0 0 +0 59 115 0 0 0 59 115 0 0 0 0 59 115 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 89 125 0 12 232 89 12 146 0 0 0 59 241 89 0 12 235 247 +34 0 0 89 125 0 0 59 115 0 0 0 0 59 115 0 59 241 89 0 0 0 0 0 59 241 89 +0 0 0 0 0 0 0 0 0 0 127 0 0 175 255 255 255 225 21 59 245 255 255 255 255 +255 125 0 138 225 21 0 12 235 125 0 0 0 138 225 34 235 125 7 206 166 0 +89 247 34 7 206 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +138 201 0 0 0 175 255 255 125 0 89 255 255 201 0 0 12 235 255 255 251 89 +0 0 0 0 0 0 0 0 89 255 255 255 255 255 255 255 255 255 125 0 59 245 255 +255 255 255 255 125 0 0 175 255 255 255 255 255 247 34 59 245 255 255 255 +255 255 125 0 0 0 59 245 255 255 255 255 255 125 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 255 255 166 0 0 0 0 0 0 0 89 255 255 +255 125 59 245 255 255 201 0 0 0 59 245 255 255 255 255 255 125 0 175 255 +255 255 255 127 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 175 166 0 255 255 201 0 0 0 0 175 166 59 238 34 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 228 34 0 0 +0 0 0 0 0 12 228 34 138 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 0 127 127 127 +127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 0 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 127 0 127 127 127 0 127 127 127 127 127 +127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 0 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 127 0 127 127 0 127 127 0 127 127 127 127 0 +127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 +127 0 127 127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 245 255 255 255 255 255 +251 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 12 228 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 225 21 +0 0 0 138 125 0 0 0 0 59 245 255 255 125 0 0 0 0 0 0 0 0 138 225 21 0 0 +175 166 0 12 228 34 0 0 59 245 255 255 247 34 0 89 225 29 206 166 0 0 0 +0 0 89 255 255 255 255 125 0 0 0 7 206 255 255 247 34 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 255 255 255 255 125 0 0 0 0 0 0 0 +0 0 0 0 0 138 255 255 166 0 0 0 0 7 202 89 0 0 0 0 0 12 235 255 125 0 0 +175 255 255 225 21 0 0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 138 255 255 255 +255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 228 34 0 0 89 255 255 225 21 0 0 +0 0 0 0 0 0 0 0 0 138 166 0 0 0 89 225 21 0 0 0 0 0 138 166 0 0 0 89 225 +21 0 0 0 12 235 255 255 166 0 0 7 206 125 0 0 0 0 0 0 89 247 34 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 225 21 0 0 0 138 125 0 0 0 12 +235 125 0 59 115 0 0 0 0 0 0 0 0 7 206 125 0 59 215 21 0 12 228 34 0 12 +235 125 0 0 168 34 0 0 0 0 0 0 0 0 0 0 175 225 21 0 0 0 175 225 21 0 0 +0 0 0 138 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 225 +21 0 0 0 175 225 21 0 0 0 0 0 0 0 0 0 59 238 34 7 206 125 0 0 0 7 202 89 +0 0 0 0 7 199 34 59 238 34 0 0 0 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 89 255 255 255 125 175 125 0 0 0 0 0 0 0 0 0 0 0 0 0 138 255 247 34 0 +59 241 89 0 175 201 0 0 0 0 0 0 0 0 0 7 206 255 166 0 0 12 232 89 0 0 0 +0 7 206 255 166 0 0 12 232 89 0 0 0 0 0 0 0 59 215 21 0 89 201 0 0 0 0 +0 0 0 89 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 7 +206 255 255 251 89 0 59 241 89 0 0 0 138 201 0 0 0 138 201 0 0 89 225 21 +175 125 0 0 12 228 34 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 0 +89 255 255 247 34 89 201 0 0 89 255 255 255 166 0 0 0 0 168 34 7 151 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 166 7 206 255 255 225 21 89 201 0 0 0 +0 0 0 0 0 0 89 166 0 0 138 166 0 0 0 7 202 89 0 0 0 0 0 0 0 59 238 34 0 +7 206 255 125 0 0 0 0 0 0 0 0 0 59 238 34 0 0 175 166 0 175 255 255 255 +125 175 125 0 138 247 34 0 0 0 0 0 0 0 0 0 0 12 228 34 0 89 201 0 0 89 +225 0 81 115 0 134 89 0 0 0 0 0 138 166 0 0 138 166 0 0 0 0 0 0 0 138 166 +0 0 138 166 0 0 0 0 0 0 59 245 247 34 0 12 232 89 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 89 201 0 7 206 201 138 125 +138 125 0 59 241 89 0 0 0 0 175 255 255 255 225 21 0 0 7 206 166 215 21 +0 0 12 228 34 0 0 138 255 255 251 89 0 0 0 0 0 0 0 0 0 12 206 21 59 241 +89 0 134 89 0 172 89 59 238 34 0 138 166 0 0 7 206 201 12 235 125 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 12 206 21 7 202 89 12 235 125 0 172 89 0 0 0 0 +0 0 0 0 59 238 34 7 206 125 12 235 255 255 255 255 255 255 125 0 0 0 12 +235 125 0 0 0 0 7 206 125 0 0 0 0 0 0 0 0 59 238 34 0 0 175 166 0 175 255 +255 255 125 175 125 0 138 247 34 0 0 0 0 0 0 0 0 0 0 12 228 34 0 89 201 +0 0 89 225 0 29 206 166 59 245 125 0 0 0 0 138 166 0 12 228 34 0 175 225 +21 0 0 0 138 166 0 12 228 42 206 255 255 166 0 0 0 0 12 228 34 138 166 +0 89 247 34 0 0 0 0 59 238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 +0 0 138 201 0 59 241 89 138 125 0 0 59 245 255 255 255 125 0 0 138 166 +0 89 201 0 0 0 0 89 255 125 0 0 0 0 0 0 0 7 206 125 0 138 251 89 0 0 0 +0 0 0 0 0 89 166 0 138 201 0 0 0 0 0 89 166 59 215 21 0 175 166 0 59 245 +125 89 251 89 0 0 12 235 255 255 255 255 255 255 125 138 255 255 251 89 +127 166 0 7 202 89 12 232 89 0 89 166 0 0 0 0 0 0 0 0 0 138 255 255 166 +0 0 0 0 7 202 89 0 0 0 0 0 59 241 89 0 0 0 0 0 7 206 125 0 0 0 0 0 0 0 +0 59 238 34 0 0 175 166 0 89 255 255 255 125 175 125 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 12 228 34 0 59 241 89 0 175 201 0 0 0 175 201 7 206 201 0 0 0 +138 166 0 175 166 0 138 200 215 21 0 0 0 138 166 0 175 166 7 151 0 89 247 +34 0 0 0 59 238 47 228 34 59 219 209 34 0 0 0 89 255 125 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 225 21 59 238 34 138 125 0 0 0 59 +241 89 0 0 0 0 138 166 0 89 201 0 0 59 245 255 255 255 255 125 0 0 0 0 +0 59 238 34 0 7 206 125 0 0 0 0 0 0 0 0 89 166 0 138 201 0 0 0 0 0 89 166 +0 175 255 255 223 166 0 12 235 125 59 241 89 0 0 0 0 0 0 0 0 0 175 125 +0 0 0 0 0 138 125 0 7 206 255 255 125 0 0 59 157 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 7 202 89 0 0 0 0 7 206 255 255 255 166 7 206 255 255 201 0 +0 0 0 0 0 0 0 0 59 238 34 0 0 175 166 0 0 89 255 255 125 175 125 0 0 0 +0 0 0 0 0 0 0 0 0 0 89 255 255 251 89 0 89 255 255 225 21 0 0 0 175 225 +29 206 166 0 0 0 138 166 59 215 21 59 215 81 215 21 0 0 0 138 166 59 215 +21 0 0 0 89 225 21 59 245 255 255 125 138 166 7 202 97 199 34 0 0 89 251 +89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 225 21 59 241 +89 138 125 0 0 0 89 247 34 0 0 0 0 175 255 255 255 225 21 0 0 0 12 232 +89 0 0 0 12 228 34 0 12 235 225 21 59 215 21 0 0 0 0 0 0 0 0 12 206 21 +59 241 89 0 134 89 0 172 89 0 0 0 0 0 0 0 0 7 206 201 12 235 125 0 0 0 +0 0 0 0 0 175 125 0 0 0 0 0 12 206 21 7 202 89 7 206 125 0 172 89 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 59 238 34 0 0 175 166 0 0 0 0 175 125 175 125 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 166 59 245 125 0 0 0 0 0 0 +175 125 12 228 34 59 215 21 0 0 0 0 0 175 125 0 0 0 12 232 89 0 0 0 0 0 +59 238 34 175 125 7 199 34 0 0 175 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 127 0 0 0 0 0 138 225 21 7 206 201 138 125 138 125 7 202 89 0 0 0 +0 138 201 0 0 0 138 166 0 0 0 12 232 89 0 0 0 12 228 34 0 0 0 175 255 255 +166 0 0 0 0 0 0 0 0 0 0 138 166 0 89 255 255 247 34 89 201 0 0 0 0 0 0 +0 0 0 0 0 168 34 7 151 0 0 0 0 0 0 0 0 175 125 0 0 0 0 0 0 138 166 7 202 +89 0 89 247 124 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 255 255 255 +255 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 245 125 0 7 206 +166 0 0 0 0 175 125 175 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 59 115 0 134 89 0 0 0 0 0 0 59 215 21 59 245 255 255 255 225 21 0 +0 0 59 215 21 0 0 59 238 34 0 0 0 0 0 0 175 125 7 206 255 255 255 251 89 +0 138 247 34 0 59 157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 138 225 +21 0 7 206 255 255 251 89 138 255 255 255 255 255 166 0 0 0 0 0 0 0 0 0 +0 12 232 89 0 0 0 12 228 34 0 0 0 0 0 59 241 89 0 0 0 0 0 0 0 0 0 0 175 +225 21 0 0 0 175 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 175 225 21 0 0 0 175 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 238 198 +255 251 194 166 0 0 0 0 175 125 175 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 125 0 0 0 0 89 225 21 0 0 0 +7 206 125 0 0 12 235 255 255 255 166 0 0 0 89 225 21 0 0 0 12 228 34 0 +0 0 175 255 255 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 +0 0 0 0 138 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 228 +34 0 7 176 21 0 89 247 34 0 0 0 0 0 0 0 0 0 0 0 89 255 255 255 255 125 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 +255 255 255 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 238 34 0 0 0 0 0 0 0 0 175 +125 175 125 0 0 0 0 0 0 0 0 59 215 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 +0 0 0 0 0 0 0 138 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +12 228 34 0 7 206 255 255 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 238 34 0 0 0 0 0 0 0 0 175 125 175 125 +0 0 0 0 0 0 59 245 251 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 0 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 127 0 +127 127 127 127 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 89 +255 125 0 0 0 0 0 0 12 235 201 0 0 0 0 12 235 251 89 0 0 0 0 175 255 125 +89 201 0 0 0 0 0 0 0 0 0 0 0 59 245 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 89 255 125 0 0 0 0 0 0 138 251 89 0 0 0 12 235 251 +89 0 0 0 0 0 0 0 0 7 206 225 21 0 0 0 89 255 125 0 89 255 225 21 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 247 34 172 89 0 0 0 0 7 206 225 21 0 0 +0 0 0 0 0 89 255 125 0 0 0 0 0 0 89 255 225 21 0 0 0 0 12 235 247 34 172 +89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 +255 125 0 0 0 0 0 0 0 7 206 225 21 0 0 0 0 89 255 225 21 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 89 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 +0 89 247 34 0 0 0 0 0 175 166 0 0 0 0 7 206 125 59 241 89 0 0 89 201 12 +235 247 34 0 0 7 206 166 59 241 89 0 0 12 228 34 59 215 21 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 238 34 0 0 0 0 89 247 34 0 0 0 7 +206 125 59 241 89 0 7 206 166 59 238 34 0 0 175 166 0 0 59 241 89 0 89 +247 34 138 201 59 238 34 138 201 0 0 0 0 0 0 0 0 0 0 0 175 125 89 255 201 +0 0 0 0 0 0 0 175 201 0 0 0 0 0 0 12 232 89 0 0 0 0 0 0 59 238 34 138 225 +21 0 0 0 175 125 89 255 201 0 0 0 0 59 238 34 138 201 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 89 247 34 0 0 0 0 0 0 138 201 0 0 0 0 +0 59 238 34 138 225 21 0 0 0 59 238 34 138 201 0 0 0 0 12 232 89 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 228 34 59 215 21 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 255 125 0 +0 0 0 127 0 0 12 235 225 21 0 0 0 0 12 235 225 21 0 0 0 0 12 235 225 21 +0 0 0 0 12 235 225 21 0 0 0 0 12 235 225 21 0 0 0 0 12 235 225 21 0 0 0 +0 0 175 255 255 255 255 255 255 255 166 0 0 138 255 255 255 251 89 59 245 +255 255 255 255 127 81 245 255 255 255 255 225 21 59 245 255 255 255 255 +127 81 245 255 255 255 255 127 111 255 255 255 125 89 255 255 255 125 89 +255 255 255 125 89 255 255 255 125 7 206 255 255 255 255 125 0 0 59 245 +247 34 0 0 59 241 89 0 0 0 138 255 255 255 166 0 0 0 0 138 255 255 255 +166 0 0 0 0 0 138 255 255 255 166 0 0 0 0 138 255 255 255 166 0 0 0 0 138 +255 255 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 255 255 255 210 235 166 +59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 +241 89 59 241 89 0 0 0 59 241 132 245 125 0 0 0 89 251 89 12 232 89 0 0 +0 0 7 206 166 0 89 251 89 0 0 0 127 0 0 89 232 241 89 0 0 0 0 89 232 241 +89 0 0 0 0 89 232 241 89 0 0 0 0 89 232 241 89 0 0 0 0 89 232 241 89 0 +0 0 0 89 232 241 89 0 0 0 0 12 232 89 89 225 21 0 0 0 0 0 175 247 34 0 +0 59 192 59 241 89 0 0 0 0 59 241 89 0 0 0 0 0 59 241 89 0 0 0 0 59 241 +89 0 0 0 0 0 59 241 89 0 0 59 241 89 0 0 59 241 89 0 0 59 241 89 0 7 206 +166 0 0 59 245 201 0 59 245 255 201 0 0 59 241 89 0 0 138 251 89 0 12 235 +166 0 0 138 251 89 0 12 235 166 0 0 0 138 251 89 0 12 235 166 0 0 138 251 +89 0 12 235 166 0 0 138 251 89 0 12 235 166 0 0 0 138 166 0 0 0 12 228 +34 0 0 175 247 34 0 0 175 225 21 59 241 89 0 0 0 59 241 89 59 241 89 0 +0 0 59 241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 89 247 +34 0 7 206 125 0 12 232 89 0 0 0 0 59 241 89 0 12 232 89 0 0 0 127 0 7 +206 166 175 166 0 0 0 7 206 166 175 166 0 0 0 7 206 166 175 166 0 0 0 7 +206 166 175 166 0 0 0 7 206 166 175 166 0 0 0 0 175 166 175 166 0 0 0 0 +138 225 21 89 225 21 0 0 0 0 59 241 89 0 0 0 0 0 59 241 89 0 0 0 0 59 241 +89 0 0 0 0 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 0 59 241 89 0 0 59 241 +89 0 0 59 241 89 0 0 59 241 89 0 7 206 166 0 0 0 59 245 125 59 241 132 +241 89 0 59 241 89 0 12 235 166 0 0 0 89 247 34 12 235 166 0 0 0 89 247 +34 0 12 235 166 0 0 0 89 247 34 12 235 166 0 0 0 89 247 34 12 235 166 0 +0 0 89 247 34 0 0 12 235 125 0 12 235 125 0 0 59 241 89 0 0 138 176 235 +166 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 +59 241 89 59 241 89 0 0 0 59 241 89 0 175 201 0 138 225 21 0 12 235 255 +255 255 225 21 59 238 34 0 138 225 21 0 0 0 127 0 59 238 34 89 247 34 0 +0 59 238 34 89 247 34 0 0 59 238 34 89 247 34 0 0 59 238 34 89 247 34 0 +0 59 238 34 89 247 34 0 0 59 241 89 89 225 21 0 0 7 206 125 0 89 225 21 +0 0 0 0 138 225 21 0 0 0 0 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 0 59 241 +89 0 0 0 0 59 241 89 0 0 0 0 0 59 241 89 0 0 59 241 89 0 0 59 241 89 0 +0 59 241 89 0 7 206 166 0 0 0 7 206 166 59 241 89 138 225 21 59 241 89 +0 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 0 59 241 89 0 0 0 +59 241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 0 0 0 12 +235 138 235 125 0 0 0 138 225 21 0 59 215 21 175 201 59 241 89 0 0 0 59 +241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 +0 0 59 241 89 0 59 245 166 241 89 0 0 12 232 89 0 0 175 225 59 238 47 235 +225 21 0 0 0 0 127 0 138 201 0 12 235 125 0 0 138 201 0 12 235 125 0 0 +138 201 0 12 235 125 0 0 138 201 0 12 235 125 0 0 138 201 0 12 235 125 +0 0 138 225 21 12 235 125 0 0 89 247 34 0 89 255 255 255 255 251 89 138 +225 21 0 0 0 0 0 59 245 255 255 255 255 127 59 245 255 255 255 255 166 +0 59 245 255 255 255 255 127 59 245 255 255 255 255 127 0 59 241 89 0 0 +59 241 89 0 0 59 241 89 0 0 59 241 89 7 206 255 255 255 166 0 0 175 201 +59 241 89 12 235 125 59 241 89 0 59 241 89 0 0 0 12 235 125 59 241 89 0 +0 0 12 235 125 0 59 241 89 0 0 0 12 235 125 59 241 89 0 0 0 12 235 125 +59 241 89 0 0 0 12 235 125 0 0 0 0 12 235 125 0 0 0 0 138 225 21 7 199 +34 0 138 225 81 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 59 241 +89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 0 0 138 255 166 0 0 0 12 232 +89 0 0 89 247 59 238 34 0 59 245 125 0 0 0 127 7 206 125 0 0 175 201 0 +7 206 125 0 0 175 201 0 7 206 125 0 0 175 201 0 7 206 125 0 0 175 201 0 +7 206 125 0 0 175 201 0 7 206 125 0 0 175 201 0 7 206 255 255 255 255 225 +21 0 0 0 0 138 225 21 0 0 0 0 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 0 59 +241 89 0 0 0 0 59 241 89 0 0 0 0 0 59 241 89 0 0 59 241 89 0 0 59 241 89 +0 0 59 241 89 0 7 206 166 0 0 0 7 206 166 59 241 89 0 89 247 94 241 89 +0 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 0 59 241 89 0 0 0 +59 241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 0 0 0 12 +235 138 235 125 0 0 0 138 225 21 175 125 0 0 175 201 59 241 89 0 0 0 59 +241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 0 0 59 241 89 59 241 89 0 +0 0 59 241 89 0 0 59 241 89 0 0 0 12 232 89 0 7 206 201 59 238 34 0 0 138 +201 0 0 0 127 59 245 255 255 255 255 247 34 59 245 255 255 255 255 247 +34 59 245 255 255 255 255 247 34 59 245 255 255 255 255 247 34 59 245 255 +255 255 255 247 34 59 245 255 255 255 255 247 34 59 241 89 0 0 89 225 21 +0 0 0 0 59 241 89 0 0 0 0 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 0 59 241 +89 0 0 0 0 59 241 89 0 0 0 0 0 59 241 89 0 0 59 241 89 0 0 59 241 89 0 +0 59 241 89 0 7 206 166 0 0 0 59 241 89 59 241 89 0 7 206 200 241 89 0 +12 235 166 0 0 0 89 247 34 12 235 166 0 0 0 89 247 34 0 12 235 166 0 0 +0 89 247 34 12 235 166 0 0 0 89 247 34 12 235 166 0 0 0 89 247 34 0 0 12 +235 125 0 12 235 125 0 0 59 241 159 166 0 0 12 235 166 12 232 89 0 0 0 +59 238 34 12 232 89 0 0 0 59 238 34 12 232 89 0 0 0 59 238 34 12 232 89 +0 0 0 59 238 34 0 0 59 241 89 0 0 0 12 235 255 255 255 201 0 59 238 34 +0 0 138 201 0 0 0 127 138 201 0 0 0 12 235 125 138 201 0 0 0 12 235 125 +138 201 0 0 0 12 235 125 138 201 0 0 0 12 235 125 138 201 0 0 0 12 235 +125 138 201 0 0 0 12 235 125 175 201 0 0 0 89 225 21 0 0 0 0 0 175 247 +34 0 0 59 192 59 241 89 0 0 0 0 59 241 89 0 0 0 0 0 59 241 89 0 0 0 0 59 +241 89 0 0 0 0 0 59 241 89 0 0 59 241 89 0 0 59 241 89 0 0 59 241 89 0 +7 206 166 0 0 59 245 201 0 59 241 89 0 0 59 245 251 89 0 0 138 251 89 0 +59 245 166 0 0 138 251 89 0 59 245 166 0 0 0 138 251 89 0 59 245 166 0 +0 138 251 89 0 59 245 166 0 0 138 251 89 0 59 245 166 0 0 0 138 166 0 0 +0 12 228 34 0 0 175 247 34 0 7 206 225 21 0 138 225 21 0 7 206 166 0 0 +138 225 21 0 7 206 166 0 0 138 225 21 0 7 206 166 0 0 138 225 21 0 7 206 +166 0 0 0 59 241 89 0 0 0 12 232 89 0 0 0 0 59 238 34 0 12 235 125 0 0 +0 127 206 125 0 0 0 0 175 206 206 125 0 0 0 0 175 206 206 125 0 0 0 0 175 +206 206 125 0 0 0 0 175 206 206 125 0 0 0 0 175 206 206 125 0 0 0 0 175 +232 245 125 0 0 0 89 255 255 255 255 255 166 0 0 138 255 255 255 251 89 +59 245 255 255 255 255 127 81 245 255 255 255 255 225 21 59 245 255 255 +255 255 127 81 245 255 255 255 255 127 111 255 255 255 125 89 255 255 255 +125 89 255 255 255 125 89 255 255 255 125 7 206 255 255 255 255 125 0 0 +59 241 89 0 0 0 175 251 89 0 0 0 138 255 255 255 166 0 0 0 0 138 255 255 +255 166 0 0 0 0 0 138 255 255 255 166 0 0 0 0 138 255 255 255 166 0 0 0 +0 138 255 255 255 166 0 0 0 0 0 0 0 0 0 0 0 0 0 7 202 194 255 255 255 201 +0 0 0 0 59 245 255 251 89 0 0 0 0 59 245 255 251 89 0 0 0 0 59 245 255 +251 89 0 0 0 0 59 245 255 251 89 0 0 0 0 59 241 89 0 0 0 12 232 89 0 0 +0 0 59 238 47 235 255 166 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 12 228 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 +166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 166 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 +127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 0 +0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 201 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 7 206 +225 21 0 0 0 0 0 12 235 201 0 0 0 138 255 201 0 0 0 59 245 225 29 202 89 +0 0 0 0 0 0 0 0 138 166 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +7 206 225 21 0 0 0 0 0 12 235 201 0 0 0 89 255 225 21 0 0 0 0 0 0 0 0 175 +247 34 0 12 235 255 255 166 0 0 0 0 0 0 0 0 0 0 0 0 59 245 225 29 202 89 +0 0 138 251 89 0 0 0 0 0 7 206 225 21 0 0 0 89 255 225 21 0 0 59 245 225 +29 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 225 +21 0 0 0 0 0 89 255 125 0 0 0 89 255 225 21 0 0 0 0 0 0 0 0 0 0 0 0 138 +251 89 0 59 238 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 175 +166 0 0 0 0 7 206 166 0 0 0 89 225 21 175 201 0 7 202 89 138 255 166 0 +0 89 247 34 175 166 0 0 138 166 7 202 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 7 206 166 0 0 0 0 0 175 166 0 0 0 89 247 34 138 201 0 0 89 247 +34 175 201 0 0 138 201 0 175 200 215 34 235 247 47 232 0 138 255 225 111 +225 21 0 0 172 89 138 255 166 0 0 0 0 89 225 21 0 0 0 0 175 201 0 0 0 0 +89 247 34 138 201 0 0 172 89 138 255 166 0 0 59 238 34 138 201 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 175 166 0 0 0 0 59 241 89 0 0 0 89 +247 34 138 201 0 0 0 59 238 34 138 201 0 0 0 89 247 34 0 0 59 238 34 0 +0 0 0 0 138 225 29 206 166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 235 255 201 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 206 225 21 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 12 235 166 0 0 0 0 0 0 0 0 89 166 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 238 34 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 7 206 255 255 255 125 0 7 206 255 255 255 +125 0 7 206 255 255 255 125 0 7 206 255 255 255 125 0 7 206 255 255 255 +125 0 12 235 255 255 251 89 0 12 235 255 255 251 89 59 245 255 166 0 0 +59 245 255 255 201 0 12 235 255 251 89 0 0 12 235 255 251 89 0 0 12 235 +255 251 89 0 0 12 235 255 251 89 0 59 238 34 59 238 34 59 238 34 59 238 +34 0 59 241 89 175 225 21 0 59 241 194 255 255 125 0 0 12 235 255 247 34 +0 0 12 235 255 247 34 0 0 0 12 235 255 247 34 0 0 12 235 255 247 34 0 0 +12 235 255 247 34 0 0 0 0 0 12 235 166 0 0 0 0 7 206 255 255 225 21 0 59 +241 89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 0 59 241 +89 0 59 241 97 206 166 0 0 12 235 125 59 238 163 255 255 201 7 206 166 +0 0 12 235 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 89 247 34 0 0 0 0 89 247 +34 0 0 0 0 89 247 34 0 0 0 0 89 247 34 0 0 0 0 89 247 34 0 0 0 0 138 225 +21 0 0 0 0 89 255 225 21 0 138 201 59 245 125 0 0 0 7 206 125 0 89 225 +21 7 206 125 0 89 225 21 7 206 125 0 89 225 21 7 206 125 0 89 225 21 59 +238 34 59 238 34 59 238 34 59 238 34 0 0 0 0 12 235 125 0 59 245 166 0 +89 247 34 7 206 166 0 138 225 21 7 206 166 0 138 225 21 0 7 206 166 0 138 +225 21 7 206 166 0 138 225 21 7 206 166 0 138 225 21 0 0 0 0 0 0 0 0 0 +0 12 232 89 0 138 251 89 0 59 241 89 0 59 241 89 59 241 89 0 59 241 89 +59 241 89 0 59 241 89 0 59 241 89 0 59 241 89 89 247 34 0 89 247 34 59 +245 166 0 7 206 166 89 247 34 0 89 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 +59 241 89 0 0 0 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 59 241 89 0 0 0 0 +59 241 89 0 0 0 0 59 238 34 0 0 0 0 12 232 89 0 0 59 238 127 225 21 0 0 +0 59 238 34 0 59 238 34 59 238 34 0 59 238 34 59 238 34 0 59 238 34 59 +238 34 0 59 238 34 59 238 34 59 238 34 59 238 34 59 238 34 0 138 255 255 +255 255 201 0 59 241 89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 59 +241 89 0 59 241 89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 59 241 +89 0 12 235 255 255 255 255 255 255 166 138 201 0 59 157 175 201 0 59 241 +89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 0 59 241 89 +0 59 241 89 12 235 125 0 175 166 0 59 238 34 0 0 138 225 34 235 125 0 175 +166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 127 0 89 255 255 255 251 89 0 89 255 255 255 251 +89 0 89 255 255 255 251 89 0 89 255 255 255 251 89 0 89 255 255 255 251 +89 0 138 255 255 255 247 34 0 175 255 255 255 255 255 255 255 255 251 127 +201 0 0 0 0 59 245 255 255 255 251 89 59 245 255 255 255 251 89 59 245 +255 255 255 251 89 59 245 255 255 255 251 89 59 238 34 59 238 34 59 238 +34 59 238 34 138 247 34 0 0 138 201 0 59 241 89 0 59 241 89 59 238 34 0 +12 232 89 59 238 34 0 12 232 89 0 59 238 34 0 12 232 89 59 238 34 0 12 +232 89 59 238 34 0 12 232 89 0 0 0 0 0 0 0 0 0 0 175 201 7 176 21 138 201 +0 59 241 89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 0 59 +241 89 0 59 241 89 0 175 201 12 232 89 0 59 238 34 0 0 138 225 21 175 201 +12 232 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 59 241 89 0 59 241 89 59 241 89 0 59 +241 89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 +138 247 34 0 59 238 34 138 225 21 0 12 232 89 0 0 0 0 138 201 0 0 0 0 59 +238 34 0 0 0 0 59 238 34 0 0 0 0 59 238 34 0 0 0 0 59 238 34 0 0 0 0 59 +238 34 59 238 34 59 238 34 59 238 34 175 201 0 0 0 138 166 0 59 241 89 +0 59 241 89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 0 59 241 89 0 59 +241 89 59 241 89 0 59 241 89 59 241 89 0 59 241 89 0 0 0 0 12 235 166 0 +0 0 138 201 134 89 0 175 166 0 59 241 89 0 59 241 89 59 241 89 0 59 241 +89 59 241 89 0 59 241 89 0 59 241 89 0 59 241 89 0 89 247 124 225 21 0 +59 238 34 0 0 138 201 0 89 247 124 225 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 89 247 +34 0 89 251 89 89 247 34 0 89 251 89 89 247 34 0 89 251 89 89 247 34 0 +89 251 89 89 247 34 0 89 251 89 175 201 0 0 175 247 34 175 201 0 0 59 245 +225 21 0 7 199 94 245 125 0 0 0 7 206 166 0 7 199 34 7 206 166 0 7 199 +34 7 206 166 0 7 199 34 7 206 166 0 7 199 34 59 238 34 59 238 34 59 238 +34 59 238 34 138 247 34 0 12 232 89 0 59 241 89 0 59 241 89 7 206 166 0 +138 225 21 7 206 166 0 138 225 21 0 7 206 166 0 138 225 21 7 206 166 0 +138 225 21 7 206 166 0 138 225 21 0 0 0 0 12 235 166 0 0 0 59 245 166 0 +59 241 89 0 12 235 125 0 175 251 89 12 235 125 0 175 251 89 12 235 125 +0 175 251 89 0 12 235 125 0 175 251 89 0 7 206 255 125 0 0 59 238 34 0 +12 235 125 0 7 206 255 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 175 255 255 232 +241 89 0 175 255 255 232 241 89 0 175 255 255 232 241 89 0 175 255 255 +232 241 89 0 175 255 255 232 241 89 12 235 255 255 166 238 34 12 235 255 +255 225 21 89 255 255 251 89 0 89 255 255 255 201 0 12 235 255 251 89 0 +0 12 235 255 251 89 0 0 12 235 255 251 89 0 0 12 235 255 251 89 0 59 238 +34 59 238 34 59 238 34 59 238 34 0 138 255 255 255 125 0 0 59 241 89 0 +59 241 89 0 12 235 255 247 34 0 0 12 235 255 247 34 0 0 0 12 235 255 247 +34 0 0 12 235 255 247 34 0 0 12 235 255 247 34 0 0 0 0 0 0 0 0 0 0 0 7 +206 255 255 225 21 0 0 0 89 255 255 166 241 89 0 89 255 255 166 241 89 +0 89 255 255 166 241 89 0 0 89 255 255 166 241 89 0 0 138 247 34 0 0 59 +245 166 255 255 166 0 0 0 138 247 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 59 215 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 138 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 232 89 0 0 0 59 238 34 0 0 0 0 0 +12 232 89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 12 235 255 125 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 138 225 21 0 0 0 59 238 34 0 0 0 0 0 138 225 21 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 0 127 127 0 127 127 +0 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontNormal.pgm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontNormal.pgm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontNormal.pgm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontNormal.pgm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,895 @@ +P2 +# Created by Paint Shop Pro +253 106 +255 +127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 255 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 +0 255 0 255 0 0 0 0 0 255 0 0 0 0 255 255 0 0 0 0 255 0 0 0 0 0 255 255 +255 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 255 0 255 0 255 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 255 255 255 0 0 0 0 0 +255 0 0 0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 0 0 0 255 0 0 255 +255 255 255 255 255 0 0 0 255 255 255 0 0 255 255 255 255 255 255 0 0 255 +255 255 255 0 0 0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 127 0 0 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 255 255 +255 0 0 255 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 255 +0 0 0 0 255 0 0 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 255 255 255 0 0 0 255 0 0 0 0 255 0 +255 0 0 0 0 255 0 0 0 0 255 255 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 +0 0 255 0 255 0 255 0 255 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 255 0 0 0 +0 0 0 0 255 0 0 0 0 0 0 255 0 0 255 0 255 0 255 0 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 +0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 255 0 0 255 0 0 0 0 0 0 255 0 0 0 0 +0 0 0 0 0 0 255 0 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 0 0 255 +0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 0 255 +0 0 0 0 255 0 255 0 0 0 255 0 0 255 0 255 0 0 0 0 0 0 0 255 0 255 0 0 0 +0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 +0 255 0 0 0 0 0 0 255 0 0 255 0 0 255 0 0 255 255 255 255 255 0 0 255 255 +255 255 255 0 0 0 0 0 0 255 0 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 +0 0 0 255 0 0 0 0 0 0 255 255 0 0 0 0 255 255 255 255 255 255 0 0 0 0 255 +255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 255 0 0 +0 0 0 0 0 0 0 0 255 0 255 0 0 0 0 0 255 255 0 0 0 0 255 255 0 0 255 0 0 +255 255 0 0 0 255 255 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 +255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 255 255 255 0 0 255 0 0 0 255 +0 0 0 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 255 255 255 +0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 255 255 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 +0 0 0 0 255 0 0 0 0 0 0 0 0 255 255 255 255 255 255 0 0 0 0 0 255 255 0 +0 0 0 0 0 0 255 0 255 0 0 255 0 255 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 +0 0 0 255 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 0 0 0 0 0 255 255 +255 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 255 +0 0 0 0 0 0 0 0 255 0 255 255 255 255 255 255 0 0 0 0 0 0 255 0 255 0 0 +0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 255 255 255 255 255 0 0 0 +0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 255 255 255 255 255 0 0 0 0 0 0 0 +0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 255 0 0 0 0 +0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 255 0 0 255 +0 255 0 0 0 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 +0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 255 +0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 +0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 +0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 255 0 255 0 0 0 0 0 255 0 255 0 255 0 0 0 0 0 255 0 0 255 0 0 255 0 255 +0 0 0 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 +0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 0 +255 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 +255 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 +0 0 255 0 0 0 255 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 255 0 0 0 0 0 +0 0 0 0 255 0 255 0 0 0 0 0 0 255 255 255 0 0 0 0 0 255 0 0 0 0 255 255 +0 0 0 255 255 255 0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 +0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 255 255 +255 0 0 0 255 255 255 255 255 0 255 255 255 255 255 255 0 0 255 255 255 +255 0 0 0 0 0 0 255 0 0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 255 +0 0 0 0 0 0 255 255 255 255 0 0 0 255 255 255 0 0 0 0 255 0 0 0 255 0 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 +0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 0 +127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 0 127 127 127 0 127 127 127 0 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 0 127 127 127 +127 0 127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 0 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 255 0 0 0 0 0 255 255 255 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 255 +255 255 255 0 0 0 0 0 0 0 255 0 0 0 0 255 255 255 255 255 0 0 0 0 255 255 +255 255 0 255 255 255 255 255 0 0 0 255 255 255 255 255 255 0 255 255 255 +255 255 0 0 0 255 255 255 255 0 0 255 0 0 0 0 0 255 0 255 255 255 0 0 255 +255 255 0 255 0 0 0 0 255 0 255 0 0 0 0 0 255 255 0 0 0 0 255 255 0 255 +255 0 0 0 0 255 0 0 0 255 255 255 255 0 0 0 255 255 255 255 255 0 0 0 0 +255 255 255 255 0 0 0 255 255 255 255 0 0 0 0 255 255 255 255 0 0 255 255 +255 255 255 255 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 +0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 255 255 255 +255 255 0 0 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 255 255 0 0 0 0 255 255 0 0 +0 0 255 0 255 0 0 0 255 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 +0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 255 0 +0 255 0 0 0 0 0 255 0 255 0 0 0 255 0 0 255 0 0 0 0 0 255 255 0 0 0 0 255 +255 0 255 255 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 255 +0 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 +0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 0 255 0 0 255 +0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 +0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 127 0 255 0 255 255 255 255 0 255 0 0 0 0 255 0 255 0 0 0 255 0 0 +0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 +0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 255 0 0 +255 0 0 0 255 0 0 0 0 0 255 0 255 0 0 255 0 255 0 255 0 255 0 0 0 255 0 +255 0 0 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 +255 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 +0 255 0 0 0 255 0 0 255 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 0 +255 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 0 255 0 0 +0 255 0 0 255 0 0 0 255 0 255 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 255 +0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 +0 0 0 255 0 0 255 0 0 0 0 0 255 0 255 0 255 0 0 0 0 255 0 0 0 0 0 255 0 +255 0 0 255 0 255 0 255 0 255 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 +0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 +255 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 255 0 0 0 255 0 0 255 0 255 +0 0 255 0 0 0 0 255 255 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 255 +0 0 0 0 255 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 127 255 0 255 0 0 0 255 0 0 255 0 0 255 0 0 0 255 +0 0 255 255 255 255 255 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 255 255 +255 255 255 255 0 255 255 255 255 255 0 255 0 0 0 255 255 255 0 255 255 +255 255 255 255 255 0 0 255 0 0 0 0 0 255 0 255 255 0 0 0 0 0 255 0 0 0 +0 0 255 0 255 0 0 255 0 255 0 255 0 0 255 0 0 255 0 255 0 0 0 0 0 0 255 +0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 255 255 255 0 0 0 0 255 255 +255 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 255 0 0 0 +255 0 0 255 0 255 0 0 255 0 0 0 0 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 +0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 0 255 0 0 0 255 0 0 255 0 0 255 +0 0 0 255 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 255 +0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 255 +0 0 0 0 0 255 0 255 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 255 255 0 0 255 +0 255 0 0 0 255 0 255 0 255 0 0 0 0 0 0 255 0 255 255 255 255 255 0 0 255 +0 0 0 0 0 0 255 0 255 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 +0 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 0 +255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 +0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 127 255 0 255 0 0 0 255 0 0 255 0 0 255 255 255 255 255 0 0 255 0 0 0 +0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 +0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 255 0 0 +255 0 0 0 255 0 0 0 0 0 255 0 0 255 255 0 0 255 0 255 0 0 0 255 0 255 0 +255 0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 255 0 0 0 255 +0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 0 255 0 255 +0 0 0 0 0 255 255 0 0 0 255 255 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 +0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 255 0 255 255 255 255 +255 255 0 0 255 0 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 +0 0 0 255 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 +0 0 0 255 0 0 255 0 0 0 0 0 255 0 255 0 0 0 255 0 0 255 0 0 0 0 0 255 0 +0 0 0 0 0 255 0 255 0 0 0 0 255 255 0 0 255 0 0 0 0 255 0 0 255 0 0 0 0 +0 0 0 255 0 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 255 +0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 +0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 +255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 0 255 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 255 255 255 +255 255 0 0 0 0 255 255 255 255 0 255 255 255 255 255 0 0 0 255 255 255 +255 255 255 0 255 0 0 0 0 0 0 0 255 255 255 255 255 0 255 0 0 0 0 0 255 +0 255 255 255 0 255 255 255 0 0 255 0 0 0 0 255 0 255 255 255 255 255 0 +255 0 0 0 0 0 0 255 0 255 0 0 0 0 255 255 0 0 0 255 255 255 255 0 0 0 255 +0 0 0 0 0 0 0 0 255 255 255 255 0 0 0 255 0 0 0 0 255 0 0 255 255 255 255 +0 0 0 0 0 255 0 0 0 0 0 0 255 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 +0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 255 255 255 255 +255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 255 255 255 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 0 0 0 255 0 0 +255 255 255 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 127 127 127 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +0 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 +0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 +0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 255 +0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 127 0 255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 +0 0 0 255 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 255 255 255 0 0 255 0 255 255 +255 0 0 0 255 255 255 255 0 0 255 255 255 255 255 0 0 255 255 255 255 0 +0 255 255 255 255 0 255 255 255 255 255 0 255 0 255 255 255 0 0 255 0 255 +255 0 255 0 0 0 255 0 255 0 255 255 255 255 0 255 255 255 0 0 255 0 255 +255 255 0 0 0 255 255 255 255 0 0 255 0 255 255 255 0 0 0 255 255 255 255 +255 0 255 0 255 0 0 255 255 255 0 255 255 255 255 0 255 0 0 0 0 255 0 255 +0 0 0 255 0 255 0 0 0 255 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 255 +255 255 255 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 +0 0 0 0 0 0 255 0 255 255 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 255 0 255 +0 0 0 0 255 0 0 255 0 0 255 0 0 0 0 255 0 255 255 0 0 0 255 0 255 0 0 255 +0 255 0 0 255 0 0 255 0 255 0 0 0 255 0 0 0 255 0 255 255 0 0 0 255 0 255 +0 0 0 0 255 0 255 255 0 0 0 255 0 255 0 0 0 0 255 0 255 255 0 0 255 0 0 +0 0 0 255 0 0 0 255 0 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 0 0 255 +0 0 255 0 255 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 0 255 0 0 +0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 255 0 255 0 0 0 0 255 0 255 +0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 0 255 0 0 0 0 255 +0 255 0 0 0 0 255 0 255 0 0 255 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 +0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 +0 0 255 0 255 0 0 0 255 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 255 0 255 +0 0 0 255 0 255 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 0 255 +0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 255 0 0 0 255 0 0 0 +255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 +0 255 255 255 255 0 255 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 255 0 255 +255 255 255 255 255 0 0 255 0 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 +0 0 255 0 255 255 0 0 0 0 255 0 255 0 0 0 255 0 0 0 255 0 255 0 0 0 0 255 +0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 +255 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 255 0 255 0 0 0 255 0 255 0 255 +0 255 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 255 0 0 0 255 255 0 0 0 0 0 0 +255 0 0 0 0 0 255 255 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 0 0 0 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 255 0 0 0 255 0 255 0 +0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 0 255 0 0 255 +0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 255 0 255 0 255 0 0 0 255 0 255 +0 0 0 255 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 +0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 255 0 0 0 255 0 0 0 0 255 0 +0 255 0 255 0 0 0 255 0 255 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 255 +0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 255 +255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 255 +255 0 255 0 0 0 0 255 0 0 255 0 0 255 0 0 0 255 255 0 255 0 0 0 0 255 0 +255 0 0 255 0 255 0 0 255 0 0 255 0 255 0 0 0 255 0 0 0 255 0 255 0 0 0 +0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 255 255 0 255 0 0 +0 0 0 0 255 0 0 255 0 0 0 255 0 0 0 255 255 0 0 0 255 0 0 0 0 0 255 0 0 +0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 +255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 255 255 255 255 0 255 255 +255 255 255 0 0 0 255 255 255 255 0 0 255 255 255 0 255 0 0 255 255 255 +255 0 0 0 255 0 0 0 255 255 255 0 255 0 255 0 0 0 0 255 0 255 0 0 255 0 +255 0 0 0 255 0 255 0 255 0 0 0 255 0 0 0 255 0 255 0 0 0 0 255 0 0 255 +255 255 255 0 0 255 255 255 255 255 0 0 0 255 255 255 0 255 0 255 0 0 0 +255 255 255 0 0 0 0 255 255 0 0 255 255 255 0 255 0 0 0 255 0 0 0 0 0 255 +0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 255 255 255 0 0 0 255 +0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 +255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 +255 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 127 0 127 127 127 127 127 0 +127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 0 127 127 0 127 127 127 127 127 0 127 0 127 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 0 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +0 127 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 0 127 127 +127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 255 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 +0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 255 0 255 +0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 +255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 127 0 0 255 +255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 255 +255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 +255 0 0 255 0 0 0 255 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 255 255 255 +0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 255 255 0 0 0 255 255 255 +255 255 255 255 255 255 0 255 255 255 255 255 255 0 0 0 255 255 255 255 +255 255 255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 0 255 0 0 +0 255 0 255 0 255 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 255 0 255 255 0 0 0 255 255 255 0 255 0 0 0 255 0 0 255 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 255 +255 0 0 255 255 0 0 255 0 0 0 0 0 255 0 127 0 255 0 0 0 0 0 0 0 255 0 0 +0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 +255 255 255 255 0 0 255 255 255 255 255 0 0 0 0 0 0 0 0 255 0 0 255 0 0 +255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 255 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 +0 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 255 0 255 0 0 0 255 0 255 0 255 0 +255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +255 0 0 255 255 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 127 255 0 0 0 0 +0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 +0 255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 255 0 0 0 0 0 255 +0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 +0 0 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 +0 255 0 255 0 0 255 255 255 0 0 255 0 0 0 0 255 255 255 255 0 255 255 255 +0 0 0 0 255 0 0 0 0 0 0 0 255 0 255 255 255 255 0 0 255 0 0 0 255 0 0 127 +255 255 255 255 255 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 +0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 255 0 +0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 255 0 0 +0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 255 0 255 +0 0 0 127 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 255 +255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 +0 0 0 0 0 0 0 0 255 255 0 0 255 0 0 255 255 0 0 0 255 255 0 0 0 255 255 +255 255 0 0 0 255 0 0 0 255 0 0 0 0 0 255 255 255 255 255 0 0 0 255 0 0 +0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 +0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 +0 0 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 255 +0 0 0 255 0 0 0 0 0 255 0 0 0 0 127 255 255 255 255 255 255 0 0 0 255 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 255 0 0 0 0 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 255 +0 0 255 0 255 0 0 255 0 0 0 0 0 0 255 0 0 255 0 0 0 255 0 0 0 0 0 255 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 +0 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 +255 255 255 0 255 255 255 255 255 0 255 255 255 255 255 255 255 255 255 +255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 255 +0 255 0 0 0 0 255 255 255 255 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 255 0 +0 0 0 0 0 255 0 0 0 0 127 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 +255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 255 0 255 0 0 255 0 0 0 +0 0 0 255 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 +0 255 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 +0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 +0 0 255 0 0 0 0 127 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 255 0 +0 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 +255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 255 0 255 0 0 255 0 255 +0 0 0 0 255 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 +0 0 255 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 +0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 +0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 255 0 0 0 0 0 +0 0 255 0 0 0 0 127 0 0 255 255 255 255 0 0 0 255 255 255 255 255 255 255 +255 255 0 0 255 0 0 0 255 0 0 0 0 0 255 0 255 0 0 255 0 0 255 0 0 255 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 255 0 +0 0 255 255 0 0 0 255 255 255 255 0 0 0 0 0 0 0 0 0 255 255 255 255 255 +255 255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 0 255 255 255 +255 255 255 0 0 0 255 255 255 255 255 255 255 255 255 0 0 0 255 255 255 +255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 +255 255 0 0 0 0 0 0 0 0 255 255 255 255 0 255 255 255 255 0 0 0 255 255 +255 255 255 255 255 255 255 0 255 255 255 255 0 0 0 0 255 0 0 0 0 127 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 255 0 0 0 0 0 255 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +127 127 127 0 127 127 0 127 127 127 127 127 127 0 127 127 127 127 0 127 +127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 +127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +127 0 127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 0 +127 127 0 127 127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 +0 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 0 127 127 +127 127 0 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 255 0 0 0 +0 0 255 0 0 0 0 0 255 255 255 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 +255 0 0 0 0 255 255 255 255 0 0 255 0 0 255 0 0 0 0 0 255 255 255 255 0 +0 0 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 +255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 255 +255 255 0 0 0 255 255 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 255 255 +255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 255 255 0 0 0 0 0 0 +0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 255 +255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 +0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 +0 0 0 0 255 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 255 255 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 255 +0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 +255 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 255 0 0 0 255 0 0 +0 0 0 0 0 0 0 255 255 0 0 0 255 0 0 0 0 0 0 255 255 0 0 0 0 255 0 0 0 0 +0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 127 0 0 0 0 0 255 0 0 0 0 255 255 255 255 0 0 255 0 0 0 0 +0 255 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 +0 0 0 0 0 255 0 0 255 255 0 0 255 0 0 0 0 255 255 255 0 0 0 255 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 255 255 255 0 0 255 0 0 0 0 0 0 0 0 +0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 255 255 0 0 0 0 0 +0 0 0 0 255 0 0 0 0 255 0 255 255 255 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 255 0 0 255 0 0 0 255 0 255 0 0 255 0 0 0 0 0 255 0 0 0 255 0 0 0 +0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 255 255 0 0 0 255 0 0 0 0 0 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 255 0 0 +0 255 0 255 0 0 0 0 255 0 0 0 0 0 0 255 255 255 255 0 0 0 0 255 0 255 0 +0 0 0 255 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 255 0 0 255 +0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 +0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 255 0 0 0 0 0 0 255 +0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 255 255 255 255 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 255 0 0 +0 0 255 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 255 +0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 255 0 0 0 +0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 +0 0 0 255 0 0 255 0 0 255 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +255 0 0 255 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 +255 255 255 0 0 255 255 255 255 0 0 255 255 255 0 0 0 0 0 0 0 0 0 255 0 +0 0 0 255 0 0 255 255 255 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 255 255 +0 255 0 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 255 255 0 0 0 0 +255 0 0 255 0 255 255 255 0 0 0 0 0 0 255 0 255 0 0 255 255 0 0 0 255 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 255 0 0 +0 255 0 255 0 0 0 255 255 255 255 255 0 0 0 255 0 0 255 0 0 0 255 255 255 +255 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 +0 255 0 0 0 255 255 255 0 255 0 0 255 0 0 0 0 255 255 255 255 255 255 255 +0 255 255 255 0 255 0 0 255 255 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 +0 0 0 0 255 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 +0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 255 0 255 0 0 0 0 0 0 0 255 0 0 0 0 +255 0 0 255 255 255 0 255 0 0 255 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 +255 0 0 0 0 0 0 255 255 255 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 +0 0 255 0 0 0 0 0 0 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 0 0 0 0 255 +0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 255 0 0 255 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 255 0 0 255 0 0 0 0 0 +0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 255 0 0 0 255 0 255 +0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 +0 255 255 0 0 0 0 0 0 0 0 0 0 255 0 0 255 255 0 0 255 0 0 0 0 0 0 0 0 0 +0 255 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 255 0 0 0 255 255 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 255 0 0 0 0 255 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 255 0 0 255 +255 255 255 255 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 255 0 0 255 255 255 +255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 0 255 0 0 0 0 255 255 255 255 0 255 255 255 255 255 255 0 0 0 0 +0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 +255 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 +0 0 0 0 255 255 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 0 255 0 0 0 +0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 255 255 255 255 0 0 0 0 255 +0 0 0 0 0 0 255 0 0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 255 +255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 255 0 0 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 255 255 +255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 255 0 255 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +127 127 0 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 0 +127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 127 127 127 0 127 127 127 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 +127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 +127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 127 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 255 +0 0 0 0 0 255 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 255 255 0 +0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 255 255 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 +255 0 0 0 0 0 0 0 255 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 255 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 255 0 0 0 +255 0 255 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 0 255 0 +0 0 255 0 0 255 0 0 0 255 0 0 0 255 0 0 255 0 0 255 255 0 255 0 0 0 0 0 +0 0 0 0 0 255 0 255 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 +0 255 0 0 255 0 0 0 0 0 255 0 255 255 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 +0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 255 0 0 0 0 0 0 0 255 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 +0 0 0 0 0 0 255 255 255 255 255 255 255 0 0 0 255 255 255 255 0 255 255 +255 255 255 255 0 255 255 255 255 255 255 0 255 255 255 255 255 255 0 255 +255 255 255 255 255 0 255 255 255 0 255 255 255 0 255 255 255 0 255 255 +255 0 0 255 255 255 255 0 0 0 255 255 0 0 0 0 255 0 0 0 255 255 255 255 +0 0 0 0 0 255 255 255 255 0 0 0 0 0 255 255 255 255 0 0 0 0 0 255 255 255 +255 0 0 0 0 0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 +0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 +0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 0 +0 0 0 0 0 0 0 0 127 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 +0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 0 +255 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 +0 0 0 255 0 0 255 255 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 +255 0 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 +0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 255 0 0 0 +0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 255 0 0 0 255 0 0 255 +0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 127 0 0 255 0 255 0 0 0 +0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 +0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 +0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 +255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 255 0 255 0 255 0 0 0 255 0 255 +0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 +0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 255 +0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 +0 0 255 0 0 255 0 0 0 255 0 0 255 255 255 255 255 0 0 255 0 0 0 255 0 0 +0 0 0 0 0 0 0 0 0 127 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 +255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 +0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 +255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 +0 255 0 0 0 0 255 0 255 0 255 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 +0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 0 +0 255 0 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 255 0 0 0 0 0 255 +0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 255 0 +255 0 0 0 255 0 0 0 0 255 0 255 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 127 0 +255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 +0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 255 255 255 255 +255 0 255 0 0 0 0 0 0 255 255 255 255 255 255 0 255 255 255 255 255 255 +0 255 255 255 255 255 255 0 255 255 255 255 255 255 0 0 255 0 0 0 255 0 +0 0 255 0 0 0 255 0 0 255 255 255 255 0 0 255 0 255 0 0 255 0 0 255 0 255 +0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 +0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 255 0 0 255 0 0 +0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 +0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 255 0 0 0 +0 0 0 0 0 0 0 0 127 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 +255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 +255 255 255 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 +0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 +0 0 255 0 0 0 0 255 0 255 0 0 0 255 0 255 0 255 0 0 0 0 0 0 255 0 255 0 +0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 +0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 255 0 0 0 255 0 255 0 0 0 0 0 255 +0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 255 +0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 127 0 255 +255 255 255 255 0 0 0 255 255 255 255 255 0 0 0 255 255 255 255 255 0 0 +0 255 255 255 255 255 0 0 0 255 255 255 255 255 0 0 0 255 255 255 255 255 +0 0 0 255 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 +0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 +0 0 0 255 0 0 0 0 255 0 255 0 0 0 255 0 255 0 255 0 0 0 0 0 0 255 0 255 +0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 255 0 0 0 +0 0 0 255 0 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 0 +255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 +255 0 0 0 0 255 255 255 255 255 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 +127 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 +0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 255 0 0 0 255 0 0 +0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 +0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 +255 0 0 0 0 255 255 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 255 +0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 +0 255 0 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 +0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 +0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 127 255 0 0 0 0 0 255 0 255 0 0 0 +0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 +0 0 0 0 0 255 0 255 0 0 0 0 255 255 255 255 255 0 0 0 255 255 255 255 0 +255 255 255 255 255 255 0 255 255 255 255 255 255 0 255 255 255 255 255 +255 0 255 255 255 255 255 255 0 255 255 255 0 255 255 255 0 255 255 255 +0 255 255 255 0 0 255 255 255 255 0 0 0 255 0 0 0 0 255 255 0 0 0 255 255 +255 255 0 0 0 0 0 255 255 255 255 0 0 0 0 0 255 255 255 255 0 0 0 0 0 255 +255 255 255 0 0 0 0 0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 +255 255 255 0 0 0 0 0 255 255 255 0 0 0 0 0 255 255 255 0 0 0 0 0 255 255 +255 0 0 0 0 0 255 255 255 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 +255 255 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 127 0 127 127 127 0 127 127 +127 0 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 +127 127 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 255 0 0 0 0 0 0 255 0 0 +0 0 255 255 0 0 0 255 255 0 255 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 255 255 0 0 +0 0 0 0 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 +255 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 255 0 0 0 0 0 255 255 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 255 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 255 0 0 0 0 255 0 0 0 0 255 +0 0 255 0 255 0 255 255 0 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 +0 255 0 0 255 0 0 0 255 0 255 0 255 0 255 255 0 255 0 0 255 0 255 0 0 0 +255 0 255 255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 255 0 0 0 255 +0 255 255 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +255 0 0 0 0 0 0 255 0 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 0 255 0 +0 0 255 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +127 0 255 255 255 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 255 255 255 +0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 255 255 255 0 0 255 255 0 0 0 +0 255 255 255 255 0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 255 255 +255 255 0 0 0 255 255 255 255 0 0 0 255 0 255 0 0 255 0 0 255 0 0 255 255 +0 255 0 0 255 0 255 255 255 0 0 0 255 255 255 255 0 0 0 255 255 255 255 +0 0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 +0 0 0 255 0 0 0 0 0 0 255 255 255 255 0 0 255 0 0 0 0 255 0 255 0 0 0 0 +255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 255 0 255 0 255 255 +255 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 255 0 0 0 0 0 +255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 +255 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 +0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 255 0 0 255 0 0 255 0 0 0 0 0 0 255 +0 255 255 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 +0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 255 +0 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 +0 255 0 0 0 255 0 255 255 0 0 0 255 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 127 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 +255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 +255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 255 +0 0 255 0 0 255 0 0 255 255 255 255 255 0 255 0 0 0 0 255 0 255 0 0 0 0 +255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 +255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 255 0 255 0 0 0 0 255 0 255 0 0 +0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 255 0 0 255 0 0 0 +0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 255 255 255 255 0 0 +255 255 255 255 0 0 255 255 255 255 0 0 255 255 255 255 0 0 255 255 255 +255 0 0 255 255 255 255 0 0 255 255 255 255 255 255 255 255 255 0 255 0 +0 0 0 0 255 255 255 255 255 255 0 255 255 255 255 255 255 0 255 255 255 +255 255 255 0 255 255 255 255 255 255 0 0 255 0 255 0 0 255 0 0 255 0 255 +0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 +0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 255 255 255 255 +255 255 0 255 0 0 255 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 +0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 255 0 0 255 0 0 0 0 255 0 0 255 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 0 0 0 255 0 255 0 0 0 255 0 255 +0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 255 +0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 +0 255 0 0 0 0 0 0 0 255 0 255 0 0 255 0 0 255 0 255 0 0 0 0 255 0 255 0 +0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 +0 0 0 255 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 0 255 0 0 0 255 0 255 +0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 +0 255 0 0 255 0 0 0 0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 +0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 255 +0 255 0 0 0 255 0 255 0 0 0 255 255 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 +0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 255 +0 0 255 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 +255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 +0 0 0 0 255 0 0 0 0 0 255 0 0 0 255 0 0 255 0 0 0 255 255 0 255 0 0 0 255 +255 0 255 0 0 0 255 255 0 255 0 0 0 255 255 0 0 0 255 0 0 0 255 0 0 0 0 +255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 255 255 255 255 0 0 255 +255 255 255 0 0 255 255 255 255 0 0 255 255 255 255 0 0 255 255 255 255 +0 0 255 255 255 255 0 0 255 255 255 0 0 255 255 255 0 0 0 255 255 255 255 +0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 255 +255 255 255 0 0 0 255 0 255 0 0 255 0 0 255 0 0 255 255 255 255 0 0 255 +0 0 0 0 255 0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 255 255 255 +255 0 0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 0 0 0 255 0 0 0 0 +0 255 255 255 255 0 0 0 0 255 255 255 0 255 0 0 255 255 255 0 255 0 0 255 +255 255 0 255 0 0 255 255 255 0 255 0 0 0 255 0 0 0 255 255 255 255 255 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 +0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 +127 127 0 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 +0 127 127 0 127 0 127 127 0 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 +0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 +127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontSmall.pgm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontSmall.pgm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontSmall.pgm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/FontSmall.pgm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,603 @@ +P2 +# Created by Paint Shop Pro +211 84 +255 +127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 +0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 255 0 0 0 255 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 255 0 255 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 0 0 255 255 0 0 +0 255 0 0 0 0 255 255 0 0 0 255 0 0 255 0 0 255 0 0 255 0 255 0 255 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 255 0 0 0 255 0 0 255 255 +255 0 0 255 255 255 0 0 0 0 0 255 0 255 255 255 255 0 0 255 255 0 0 255 +255 255 255 0 0 255 255 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 127 0 0 0 0 255 0 255 0 255 0 0 0 255 0 0 255 0 0 255 255 255 255 +0 255 0 0 255 0 255 0 0 0 0 255 0 0 255 0 0 255 0 255 0 0 0 0 255 0 0 255 +255 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 255 0 255 +255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 255 255 0 255 0 0 0 0 255 0 0 0 0 0 +0 0 255 0 255 0 0 255 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 255 0 0 0 0 0 0 255 255 255 255 255 255 255 0 255 0 0 0 255 0 0 +255 0 255 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 255 0 255 0 255 0 255 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 255 0 0 255 0 0 0 +0 0 255 0 0 0 0 255 0 0 255 0 255 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 +255 0 0 255 0 255 0 0 255 0 0 255 0 0 255 0 0 0 0 0 255 255 0 0 0 0 0 0 +0 0 0 255 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +127 0 0 0 0 255 0 0 0 0 0 0 0 255 0 255 0 0 0 255 255 0 0 0 0 255 255 0 +255 0 255 255 0 0 0 255 255 0 255 0 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 +0 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 255 0 0 255 +0 0 0 0 255 0 0 0 255 255 0 0 255 0 0 255 0 255 255 255 0 0 255 255 255 +0 0 0 0 255 0 0 0 255 255 0 0 0 255 255 255 0 0 255 0 0 255 0 0 0 255 255 +0 0 0 255 255 255 255 255 255 0 0 0 0 255 255 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 255 0 0 0 0 0 255 255 255 255 255 +255 0 0 0 255 255 0 0 0 0 0 255 0 255 0 0 255 0 255 0 0 255 0 0 0 0 255 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 255 0 0 0 0 0 255 0 +0 255 0 0 255 0 0 255 0 0 0 255 0 0 0 0 0 0 255 0 255 255 255 255 255 0 +0 0 255 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 0 0 +0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 0 0 +255 0 255 0 0 0 0 255 0 255 0 0 255 0 255 0 0 255 255 0 0 0 255 0 0 0 0 +255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 255 0 +0 255 0 0 255 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 255 0 +0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 255 0 0 0 255 255 +0 0 0 255 255 255 255 255 255 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 255 0 0 0 0 0 0 255 0 0 255 0 0 255 +255 255 255 0 0 0 0 255 0 0 0 255 255 0 0 0 255 255 0 0 255 0 0 255 0 0 +0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 255 0 0 0 0 255 +255 0 0 255 255 255 0 255 255 255 255 0 255 255 255 0 0 0 0 0 255 0 255 +255 255 0 0 0 255 255 0 0 255 0 0 0 0 0 255 255 0 0 0 255 255 0 0 0 255 +0 0 255 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 255 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 0 127 0 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 +127 127 127 0 127 127 127 127 127 0 127 0 127 127 0 127 127 127 0 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 0 127 127 127 0 127 0 127 +127 127 0 127 127 127 127 0 127 127 127 0 127 127 127 127 0 127 127 127 +127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 +127 0 127 127 127 127 0 127 127 127 127 0 127 127 0 127 127 0 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 255 0 0 0 255 255 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 255 255 255 0 0 0 0 0 +255 255 0 0 0 255 255 255 0 0 0 0 0 255 255 255 0 0 255 255 255 255 0 0 +0 255 255 255 255 255 0 255 255 255 255 255 0 0 0 255 255 255 0 0 255 0 +0 0 0 255 0 255 255 255 0 0 255 255 0 255 0 0 0 255 0 255 0 0 0 255 255 +0 0 0 255 255 0 255 0 0 0 0 255 0 0 0 255 255 255 0 0 0 255 255 255 255 +0 0 0 0 255 255 255 0 0 0 255 255 255 255 0 0 0 255 255 255 255 0 255 255 +255 255 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 255 0 0 255 0 +255 0 0 255 0 255 0 0 0 255 0 255 255 255 255 0 255 0 0 255 0 0 0 0 255 +0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 255 0 +0 0 255 0 0 0 0 255 255 0 0 0 255 0 0 255 0 0 0 255 0 0 0 255 0 255 0 0 +0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 255 +0 0 255 0 0 0 0 255 0 255 0 0 255 0 0 255 0 0 0 255 255 0 0 0 255 255 0 +255 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 255 +0 0 255 0 0 0 255 0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 255 0 +0 0 0 255 0 255 0 0 255 0 0 255 0 255 0 0 255 0 0 255 0 255 0 0 0 0 0 255 +0 255 0 0 0 255 0 0 0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 127 255 0 0 255 255 0 255 0 0 255 0 0 255 0 0 255 0 0 255 +0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 +0 0 0 0 0 255 0 0 0 0 255 0 0 255 0 0 0 0 255 0 255 0 255 0 0 0 255 0 0 +0 255 0 255 0 255 0 255 0 255 0 255 0 0 255 0 255 0 0 0 0 0 255 0 255 0 +0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 0 0 0 0 255 0 0 +0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 255 0 255 0 255 0 0 255 255 +0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 0 0 255 0 0 0 255 0 255 0 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 0 255 0 255 0 255 +0 0 255 0 0 255 0 0 255 255 255 255 0 0 255 0 0 0 0 0 0 255 0 0 0 0 255 +0 255 255 255 255 0 0 255 255 255 255 0 0 255 0 0 255 255 255 0 255 255 +255 255 255 255 0 0 255 0 0 0 0 255 0 255 255 0 0 0 0 255 0 0 0 255 0 255 +0 255 0 255 0 255 0 0 255 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 255 0 255 +0 0 0 0 0 255 0 255 255 255 255 0 0 0 255 255 255 0 0 0 0 255 0 0 0 255 +0 0 0 0 255 0 0 255 0 0 255 0 0 255 0 255 0 255 0 255 0 0 255 255 0 0 0 +0 255 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 0 255 0 255 0 255 0 255 255 255 +255 255 255 0 255 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 +0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 0 0 0 255 +0 255 0 255 0 0 0 255 0 0 0 255 0 0 255 0 0 255 0 255 0 0 0 255 255 0 255 +0 0 0 0 0 255 0 255 255 255 255 0 0 255 0 0 0 0 0 255 0 255 0 255 0 0 0 +0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 255 0 0 255 0 0 255 0 255 +0 255 0 255 0 0 255 255 0 0 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 +0 0 255 255 255 0 0 255 0 0 0 0 255 0 255 0 0 0 255 0 0 255 0 0 0 255 0 +255 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 255 0 0 +0 0 255 0 0 255 0 0 0 0 255 0 255 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 +255 0 255 0 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 0 0 0 255 0 0 0 255 +0 0 255 0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 255 +255 0 0 0 0 255 0 0 0 255 0 0 255 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 255 +0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 127 0 255 0 0 0 0 0 0 255 0 0 0 0 255 0 255 255 255 255 0 0 0 0 255 +255 255 0 0 255 255 255 255 0 0 0 255 255 255 255 255 0 255 0 0 0 0 0 0 +0 255 255 255 255 0 255 0 0 0 0 255 0 255 255 255 0 255 255 0 0 255 0 0 +0 255 0 255 255 255 255 255 0 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 255 255 +255 0 0 0 255 0 0 0 0 0 0 0 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 +255 0 0 0 0 255 0 0 0 0 255 255 255 255 0 0 0 0 255 255 0 0 0 0 255 0 0 +0 255 0 0 255 0 0 255 0 0 0 255 0 0 0 255 255 255 255 0 255 0 0 0 0 255 +0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 +0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 +0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 +0 0 0 0 0 255 255 0 0 0 0 0 0 0 255 255 255 255 255 255 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 +0 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 +0 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 0 +127 127 127 127 127 127 0 127 127 127 0 127 127 127 0 127 127 127 127 127 +0 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 0 +127 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 +127 127 0 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 +0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 0 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 0 127 +127 0 127 127 127 0 127 127 0 127 127 127 127 127 0 127 127 127 127 127 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 +0 0 255 0 0 0 0 0 0 0 255 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 255 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 255 0 0 0 0 0 0 0 255 0 0 +0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 +255 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 4 4 +4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 +0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 +0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 4 4 4 4 12 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +127 0 0 0 0 0 255 255 0 0 255 255 255 0 0 0 255 255 0 0 255 255 255 0 0 +255 255 0 0 255 255 255 0 255 255 255 0 255 255 255 0 0 255 0 255 255 0 +255 0 0 255 0 255 0 255 255 255 0 255 255 0 0 255 255 255 0 0 0 255 255 +0 0 255 255 255 0 0 0 255 255 255 0 255 0 255 255 255 255 0 255 255 0 255 +0 0 255 0 255 0 0 0 255 0 255 0 0 255 0 0 255 0 255 0 255 0 255 0 0 0 255 +0 255 255 255 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 +255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 +255 0 255 0 0 255 0 255 0 0 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 +0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 255 0 0 255 0 255 0 0 255 0 0 +255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 255 0 +255 0 0 0 255 0 0 255 0 0 255 0 0 255 0 255 0 0 255 0 0 255 0 0 255 0 0 +255 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 255 +0 0 255 0 0 255 4 4 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 127 0 0 0 0 0 255 255 255 0 255 0 0 255 0 255 0 0 0 255 0 0 255 0 +255 255 255 255 0 255 0 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 +255 0 0 0 255 0 255 0 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 +0 255 0 255 0 0 255 0 255 0 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 255 +0 0 255 0 255 0 255 0 255 0 0 255 0 0 0 255 0 255 0 0 0 255 0 0 255 0 0 +0 0 255 0 0 0 0 255 0 255 0 0 255 255 0 0 0 255 255 4 255 255 0 4 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 255 0 0 255 0 255 0 +0 255 0 255 0 0 0 255 0 0 255 0 255 0 0 0 0 255 0 0 255 0 0 255 0 255 0 +0 255 0 255 0 0 255 0 255 0 255 0 0 255 0 255 0 0 255 0 0 255 0 255 0 0 +255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 0 0 255 0 255 0 +0 255 0 0 255 0 0 255 0 255 0 0 0 255 255 0 255 255 0 0 0 255 0 0 0 255 +0 255 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 +255 255 0 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 +0 255 255 255 0 255 255 255 0 0 0 255 255 0 0 255 255 255 0 0 255 255 255 +0 255 0 0 0 255 255 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 +0 255 0 0 255 0 0 255 0 255 0 0 255 0 0 255 255 0 0 255 255 255 0 0 0 255 +255 255 0 255 0 0 255 255 255 0 0 255 0 0 255 255 255 0 0 0 255 0 0 0 0 +255 0 0 0 255 0 0 255 0 255 0 0 0 255 0 0 0 255 255 255 0 0 255 0 0 0 255 +0 0 0 255 0 0 0 0 0 0 0 0 0 0 20 0 255 0 4 4 4 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 +0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 4 0 0 0 4 4 4 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 255 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 0 127 127 127 127 0 +127 127 127 127 0 127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 +127 0 127 127 127 127 0 127 127 127 127 0 127 0 127 127 0 127 127 127 127 +0 127 0 127 127 127 127 127 127 127 0 127 127 127 127 0 127 127 127 127 +0 127 127 127 127 0 127 127 127 127 0 127 127 0 127 127 127 0 127 127 0 +127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 +127 127 0 127 127 127 127 127 0 127 127 127 0 127 127 127 0 127 127 127 +0 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 255 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 +255 255 0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 +0 255 0 0 0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 255 255 255 0 0 255 255 255 255 255 255 255 0 0 0 0 0 0 255 255 0 0 0 +0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 255 255 0 0 +0 255 0 0 0 0 0 0 0 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 +0 0 255 255 255 255 255 255 255 0 255 255 255 255 0 0 255 255 255 255 255 +255 255 0 0 255 255 255 255 255 255 255 0 255 0 0 255 255 0 255 0 0 255 +0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 255 255 255 255 255 0 255 +0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 0 +0 255 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 +255 255 255 255 255 0 255 255 255 255 255 0 0 0 0 0 0 255 0 0 255 0 255 +0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 +255 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 255 255 +0 0 255 0 255 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +255 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 +0 0 0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +255 255 255 255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 255 0 255 0 0 0 0 0 +0 0 255 0 0 0 0 0 0 255 0 255 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 +0 255 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 255 0 +255 255 255 0 255 0 0 0 255 255 0 255 255 0 0 0 255 0 0 0 0 0 255 0 255 +255 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 +255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 0 255 255 255 255 255 0 0 0 0 0 0 0 255 255 0 255 0 255 +255 0 255 255 0 0 0 255 255 255 0 0 255 0 0 255 0 0 0 255 255 255 255 0 +0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 0 +255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 255 0 0 255 0 0 255 0 0 255 0 +0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 255 255 255 255 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 0 255 +0 0 255 0 0 255 0 0 0 0 0 255 0 255 0 0 255 0 0 0 255 0 0 0 0 0 255 0 0 +0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 0 255 0 0 0 +0 0 0 0 0 0 0 0 0 0 255 255 255 0 255 255 255 255 0 255 255 255 255 255 +255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 255 0 0 255 255 +255 255 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 255 +0 0 255 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 255 0 255 0 0 255 0 0 255 0 0 0 0 0 255 0 0 255 0 255 0 0 0 255 +0 0 0 0 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 255 0 0 255 0 0 255 0 0 0 0 0 +255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 127 0 255 255 255 0 0 255 255 255 255 255 255 255 0 0 255 +0 255 0 0 0 0 255 0 255 0 255 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 255 0 0 0 255 255 0 255 255 0 0 255 255 255 255 0 0 0 0 0 0 255 +255 255 255 255 255 255 0 0 255 255 255 255 255 255 255 0 255 255 255 255 +0 0 255 255 255 255 255 255 255 0 0 255 255 255 255 255 255 255 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 255 255 255 0 0 0 0 0 255 255 0 255 255 255 0 0 255 255 255 255 255 +255 255 0 255 255 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 255 255 0 0 0 255 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 0 127 127 +127 127 0 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 0 +127 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 127 127 +127 127 127 127 0 127 127 127 127 127 0 127 127 0 127 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 127 127 0 127 127 127 127 0 127 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 0 127 0 127 +127 127 0 127 127 127 0 127 127 127 0 127 127 127 127 0 127 127 127 127 +127 127 127 0 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 +0 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 +0 127 127 127 0 127 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 127 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 255 0 0 0 0 0 0 0 255 0 +0 0 255 0 255 0 0 255 255 255 0 0 255 0 255 0 0 0 255 255 255 255 0 0 255 +255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 0 0 0 0 0 0 0 +0 255 0 0 0 0 0 0 0 0 0 0 255 255 255 0 255 255 255 0 0 255 0 0 0 0 0 0 +0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 255 0 0 0 0 0 0 0 0 255 +0 0 255 0 0 0 0 0 255 0 0 0 255 0 0 0 255 255 255 0 0 255 0 0 0 0 255 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 +0 255 0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 255 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 255 +0 0 0 0 255 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 255 0 255 +0 0 0 0 0 0 0 0 0 0 255 255 0 255 0 0 255 0 0 0 0 0 0 255 255 0 255 0 0 +0 0 0 255 255 0 0 255 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +127 0 0 0 0 0 255 0 0 255 255 255 0 0 255 0 0 0 0 255 255 255 0 0 0 255 +0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 255 0 0 255 255 0 0 255 255 0 255 +0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 255 0 255 255 255 0 0 255 0 0 0 0 0 +0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 255 0 255 +255 0 255 0 0 0 0 0 0 0 0 0 0 0 255 0 255 0 0 255 0 255 0 255 0 0 0 255 +0 255 0 0 0 0 0 0 255 0 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 127 0 0 0 0 0 255 0 255 0 255 0 0 255 255 255 0 0 0 255 0 255 +0 0 0 0 255 0 0 0 0 0 255 255 255 0 0 0 0 0 0 0 255 0 255 0 0 0 0 255 0 +255 255 0 255 0 255 0 0 0 255 255 255 255 255 0 0 0 0 255 0 255 0 0 255 +0 255 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 0 0 255 255 255 0 255 255 +0 0 0 0 0 0 255 0 0 255 0 255 255 0 255 0 0 255 0 0 0 0 0 0 0 255 255 255 +0 255 255 0 0 0 255 0 255 0 0 255 255 0 0 255 255 0 0 0 255 0 255 0 255 +255 0 0 255 255 0 255 0 255 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 +255 0 255 0 255 0 0 0 255 0 0 0 0 255 255 255 0 0 0 255 255 255 0 0 0 0 +255 0 0 255 0 0 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 0 255 0 255 0 0 0 0 +0 0 0 255 0 255 255 0 255 0 255 255 255 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 +255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 255 0 255 0 0 255 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 255 0 0 0 255 0 255 0 255 0 0 0 0 255 +0 0 0 0 255 0 0 0 255 0 255 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 +0 255 0 255 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 +255 255 255 0 0 0 0 0 0 255 0 0 255 255 0 0 255 0 0 0 0 0 255 0 255 0 0 +0 0 0 0 255 0 0 0 0 255 0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 127 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 0 0 255 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 0 255 0 0 0 0 255 0 255 255 255 255 0 0 0 255 +0 0 0 255 0 0 0 0 255 0 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 +0 0 0 255 0 0 255 255 255 0 255 255 255 255 0 0 0 0 0 0 0 0 0 255 0 0 0 +255 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 0 0 255 0 255 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 255 255 +255 0 0 255 0 0 0 0 255 0 0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 +0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 +0 0 0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 +255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 127 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 +0 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 127 127 127 127 0 127 0 127 127 127 127 0 127 127 127 +127 0 127 127 127 127 127 0 127 127 127 127 127 0 127 0 127 127 127 127 +0 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 0 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 0 127 127 127 127 127 127 127 +0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 0 127 127 127 +127 0 127 127 127 0 127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 +127 127 0 127 127 127 0 127 127 127 0 127 127 127 127 0 127 127 127 127 +0 127 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 0 127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 255 0 +0 0 0 0 255 0 0 0 0 0 0 255 0 255 0 0 0 255 0 255 255 0 0 0 255 0 0 255 +0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 +0 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 255 0 0 0 255 0 0 255 0 255 0 255 +0 255 0 0 0 0 0 0 0 0 0 255 0 255 255 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 +0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 255 0 0 0 0 255 0 255 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 255 +0 0 0 255 0 0 255 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 127 0 0 255 255 +0 0 0 0 0 255 255 0 0 0 0 0 255 255 0 0 0 0 0 255 255 0 0 0 0 0 255 255 +0 0 0 0 0 255 255 0 0 0 0 0 255 255 255 255 255 0 0 0 255 255 255 0 0 255 +255 255 255 255 0 255 255 255 255 255 0 255 255 255 255 255 0 255 255 255 +255 255 0 255 255 255 0 255 255 255 0 255 255 255 0 255 255 255 0 255 255 +255 255 0 0 0 255 0 0 0 0 255 0 0 0 255 255 255 0 0 0 0 0 255 255 255 0 +0 0 0 0 255 255 255 0 0 0 0 0 255 255 255 0 0 0 0 0 255 255 255 0 0 0 0 +0 0 0 0 0 0 0 0 255 255 255 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 +255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 255 0 255 0 0 0 0 255 0 0 +255 0 127 0 0 255 255 0 0 0 0 0 255 255 0 0 0 0 0 255 255 0 0 0 0 0 255 +255 0 0 0 0 0 255 255 0 0 0 0 0 255 255 0 0 0 0 255 0 255 0 0 0 0 0 255 +0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 +0 0 0 255 0 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 255 0 0 0 255 0 +0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 +255 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 255 0 0 0 +0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 255 0 255 +0 0 255 255 255 0 0 255 0 0 255 0 127 0 255 0 0 255 0 0 0 255 0 0 255 0 +0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 +0 0 255 0 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 +0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 255 0 0 0 +0 255 0 255 0 255 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 +0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 255 0 0 0 255 +0 255 0 0 0 255 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 +255 0 255 0 0 0 0 255 0 0 255 0 255 0 0 255 0 0 255 0 255 0 255 0 0 127 +0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 +0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 0 0 +0 0 0 255 255 255 255 0 0 255 255 255 255 0 0 255 255 255 255 0 0 255 255 +255 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 255 255 255 0 0 255 +0 255 0 0 255 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 +0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 255 0 255 0 0 255 +0 0 255 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 +255 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 255 0 255 0 0 255 0 127 255 255 +255 255 255 255 0 255 255 255 255 255 255 0 255 255 255 255 255 255 0 255 +255 255 255 255 255 0 255 255 255 255 255 255 0 255 255 255 255 255 255 +0 0 255 255 255 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 +0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 255 0 0 +0 0 255 0 255 0 0 0 255 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 +0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 255 0 0 0 0 255 0 0 0 +255 0 255 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 +0 255 0 0 0 0 255 0 0 0 255 0 0 0 255 0 0 255 0 255 0 0 255 0 127 255 0 +0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 +0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 255 0 0 0 0 0 255 0 0 0 255 0 255 +0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 +0 255 0 0 0 255 0 0 255 0 0 0 255 0 0 255 0 0 0 0 255 0 0 255 0 0 0 255 +0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 0 0 255 0 +0 0 255 0 0 0 0 255 0 255 0 0 0 255 0 0 0 255 0 0 255 0 0 0 0 255 0 255 +0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 0 0 255 0 0 0 255 255 +255 0 0 255 0 0 255 0 127 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 +0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 0 0 255 0 255 0 0 255 +255 255 255 0 0 0 255 255 255 0 0 255 255 255 255 255 0 255 255 255 255 +255 0 255 255 255 255 255 0 255 255 255 255 255 0 255 255 255 0 255 255 +255 0 255 255 255 0 255 255 255 0 255 255 255 255 0 0 0 255 0 0 0 0 255 +0 0 0 255 255 255 0 0 0 0 0 255 255 255 0 0 0 0 0 255 255 255 0 0 0 0 0 +255 255 255 0 0 0 0 0 255 255 255 0 0 0 0 255 0 0 0 255 0 255 0 255 255 +255 0 0 0 0 255 255 255 255 0 0 0 255 255 255 255 0 0 0 255 255 255 255 +0 0 0 255 255 255 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 255 0 0 127 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 +127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 0 127 +127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 +0 127 127 127 0 127 127 127 0 127 127 127 0 127 127 127 127 127 127 0 127 +127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 127 0 127 127 127 127 127 127 127 0 127 +127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 +127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 127 0 127 127 127 +127 127 127 0 127 127 127 127 127 127 0 127 127 127 127 127 0 127 127 127 +127 0 127 127 127 127 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 127 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 255 255 0 255 0 +0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 +0 255 0 0 0 0 0 0 0 255 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 255 255 0 255 +0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 255 255 0 255 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 255 +0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 255 +0 0 0 0 255 0 0 0 255 0 255 0 255 0 255 255 0 0 255 0 255 0 0 255 0 255 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 255 0 255 0 0 255 0 +255 0 0 255 0 255 0 255 0 255 255 0 255 0 0 255 255 0 255 0 255 255 0 0 +0 255 0 0 0 0 255 0 0 0 255 0 255 0 255 0 255 255 0 255 0 0 255 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 255 0 255 0 0 255 0 255 0 +0 0 255 0 0 0 255 0 0 0 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 127 0 255 255 0 0 0 255 255 0 0 0 255 255 0 0 0 255 255 0 0 0 255 +255 0 0 0 255 255 0 0 255 255 255 0 255 255 0 0 0 255 255 0 0 255 255 0 +0 0 255 255 0 0 0 255 255 0 0 0 255 255 0 0 0 255 0 255 0 0 255 0 0 255 +0 0 0 0 255 0 255 255 255 0 0 0 255 255 0 0 0 255 255 0 0 0 255 255 0 0 +0 255 255 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 255 255 255 0 0 255 0 0 255 +0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 0 255 0 255 255 255 +0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 255 0 0 0 +0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 0 0 255 0 0 255 +0 255 0 0 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 0 255 +0 255 0 0 255 0 0 255 0 0 255 255 255 0 255 0 0 255 0 255 0 0 255 0 255 +0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 0 255 255 255 255 255 +0 255 0 0 255 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 +0 0 255 0 255 0 0 255 0 0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 127 0 255 255 255 0 0 255 255 255 0 0 255 255 255 0 0 255 255 255 +0 0 255 255 255 0 0 255 255 255 0 0 255 255 255 255 255 255 0 255 0 0 0 +255 255 255 255 0 255 255 255 255 0 255 255 255 255 0 255 255 255 255 0 +0 255 0 255 0 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 +255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 0 0 0 0 0 0 0 255 +0 255 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 0 +255 0 255 0 0 255 0 0 255 0 0 255 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 127 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 +255 0 255 0 0 255 0 255 0 0 255 0 0 0 0 255 0 0 0 255 0 0 0 0 255 0 0 0 +0 255 0 0 0 0 255 0 0 0 0 0 255 0 255 0 0 255 0 0 255 0 255 0 0 255 0 255 +0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 0 +0 255 0 0 0 0 255 0 0 0 255 255 0 0 255 0 255 0 0 255 0 255 0 0 255 0 255 +0 0 255 0 255 0 0 255 0 0 255 0 255 0 0 255 0 0 255 0 0 255 0 255 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 255 255 255 0 0 255 255 255 0 0 255 +255 255 0 0 255 255 255 0 0 255 255 255 0 0 255 255 255 0 0 255 255 0 255 +255 255 0 0 255 255 0 0 255 255 255 0 0 255 255 255 0 0 255 255 255 0 0 +255 255 255 0 0 255 0 255 0 0 255 0 0 255 0 0 255 255 0 0 255 0 0 255 0 +0 255 255 0 0 0 255 255 0 0 0 255 255 0 0 0 255 255 0 0 0 255 255 0 0 0 +0 0 0 0 0 0 0 255 255 255 0 0 0 255 255 255 0 0 255 255 255 0 0 255 255 +255 0 0 255 255 255 0 0 0 255 0 0 0 255 255 255 0 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 255 0 0 0 0 0 255 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 127 127 127 0 127 127 127 127 0 127 127 +127 127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 127 +127 127 127 127 127 0 127 127 127 0 127 127 127 127 0 127 127 127 127 0 +127 127 127 127 0 127 127 127 127 0 127 127 0 127 0 127 127 0 127 127 0 +127 127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 0 +127 127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 127 127 127 127 +127 0 127 127 127 127 127 0 127 127 127 127 0 127 127 127 127 0 127 127 +127 127 0 127 127 127 127 0 127 127 127 127 127 0 127 127 127 127 0 127 +127 127 127 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask00.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask00.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask00.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask00.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 +1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask01.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask01.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask01.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask01.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 +0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 +1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 0 1 +1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 +1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask02.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask02.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask02.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask02.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 +1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 0 0 +0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0 0 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 +1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask03.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask03.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask03.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask03.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 +0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 1 1 +1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask04.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask04.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask04.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask04.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 +1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 +1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 +1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 +1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask05.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask05.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask05.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask05.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 +1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 +0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask06.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask06.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask06.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask06.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 +1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 +0 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 +1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 +1 0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask07.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask07.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask07.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask07.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 +1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 +0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 +1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 +0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask08.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask08.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask08.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask08.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 +0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 +1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 +1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask09.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask09.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask09.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask09.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 +1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 +0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 +0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 +1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask10.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask10.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask10.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask10.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 +1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 +1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask11.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask11.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask11.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask11.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 +1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 +0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 1 +1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 +1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 +1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask12.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask12.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask12.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask12.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 +1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 +1 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 +0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 +1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask13.pbm ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask13.pbm --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask13.pbm 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/mask13.pbm 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +P1 +# Created by Paint Shop Pro +32 32 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +1 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 +0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 +1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 +1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/TwXCursors.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/TwXCursors.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/TwXCursors.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/TwXCursors.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,908 @@ +// --------------------------------------------------------------------------- +// +// @file TwXCursors.h +// @brief Bitmaps data for cursors +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +static int g_CurHot[][2] = +{ + {16, 15}, // curs00 + {16, 15}, // curs01 + {16, 15}, // curs02 + {16, 15}, // curs03 + {16, 15}, // curs04 + {16, 15}, // curs05 + {16, 15}, // curs06 + {16, 15}, // curs07 + {16, 15}, // curs08 + {16, 15}, // curs09 + {16, 15}, // curs10 + {16, 15}, // curs11 + {16, 15}, // curs12 + {16, 15} // curs13 +}; + + +static bool g_CurPict[][32*32] = +{ + { // curs00 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs01 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs02 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs03 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs04 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs05 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs06 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs07 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs08 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs09 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs10 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs11 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs12 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // curs13 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } +}; + + +static bool g_CurMask[][32*32] = +{ + { // mask00 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask01 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask02 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask03 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask04 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask05 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask06 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask07 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask08 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask09 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, + 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }, + { // mask10 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask11 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask12 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { // mask13 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, + 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } +}; diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/resource.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/resource.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/resource.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/resource.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,29 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by AntTweakBar.rc +// +#define IDC_CURSOR1 101 +#define IDC_CURSOR2 102 +#define IDC_CURSOR3 103 +#define IDC_CURSOR4 104 +#define IDC_CURSOR5 105 +#define IDC_CURSOR6 106 +#define IDC_CURSOR7 107 +#define IDC_CURSOR8 108 +#define IDC_CURSOR9 109 +#define IDC_CURSOR10 110 +#define IDC_CURSOR11 111 +#define IDC_CURSOR12 112 +#define IDC_CURSOR13 113 +#define IDC_CURSOR14 114 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 115 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwBar.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwBar.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwBar.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwBar.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,7756 @@ +// --------------------------------------------------------------------------- +// +// @file TwBar.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include +#include "TwMgr.h" +#include "TwBar.h" +#include "TwColors.h" + +using namespace std; + +extern const char *g_ErrNotFound; +const char *g_ErrUnknownAttrib = "Unknown parameter"; +const char *g_ErrInvalidAttrib = "Invalid parameter"; +const char *g_ErrNotGroup = "Value is not a group"; +const char *g_ErrNoValue = "Value required"; +const char *g_ErrBadValue = "Bad value"; +const char *g_ErrUnknownType = "Unknown type"; +const char *g_ErrNotEnum = "Must be of type Enum"; + +#undef PERF // comment to print benchs +#define PERF(cmd) + + +PerfTimer g_BarTimer; + +#define ANT_SET_CURSOR(_Name) g_TwMgr->SetCursor(g_TwMgr->m_Cursor##_Name) +#define ANT_SET_ROTO_CURSOR(_Num) g_TwMgr->SetCursor(g_TwMgr->m_RotoCursors[_Num]) + +#if !defined(ANT_WINDOWS) +# define _stricmp strcasecmp +# define _strdup strdup +#endif // defined(ANT_WINDOWS) + +#if !defined(M_PI) +# define M_PI 3.1415926535897932384626433832795 +#endif // !defined(M_PI) + +const float FLOAT_MAX = 3.0e+38f; +const double DOUBLE_MAX = 1.0e+308; +const double DOUBLE_EPS = 1.0e-307; + +bool IsCustomType(int _Type) +{ + return (g_TwMgr && _Type>=TW_TYPE_CUSTOM_BASE && _Typem_Customs.size()); +} + +bool IsCSStringType(int _Type) +{ + return (_Type>TW_TYPE_CSSTRING_BASE && _Type<=TW_TYPE_CSSTRING_MAX); +} + +bool IsEnumType(int _Type) +{ + return (g_TwMgr && _Type>=TW_TYPE_ENUM_BASE && _Typem_Enums.size()); +} + +// --------------------------------------------------------------------------- + +CTwVar::CTwVar() +{ + m_IsRoot = false; + m_DontClip = false; + m_Visible = true; + m_LeftMargin = 0; + m_TopMargin = 0; + m_ColorPtr = &COLOR32_WHITE; + m_BgColorPtr = &COLOR32_ZERO; // default +} + +CTwVarAtom::CTwVarAtom() +{ + m_Type = TW_TYPE_UNDEF; + m_Ptr = NULL; + m_SetCallback = NULL; + m_GetCallback = NULL; + m_ClientData = NULL; + m_ReadOnly = false; + m_NoSlider = false; + m_KeyIncr[0] = 0; + m_KeyIncr[1] = 0; + m_KeyDecr[0] = 0; + m_KeyDecr[1] = 0; + memset(&m_Val, 0, sizeof(UVal)); +} + +CTwVarAtom::~CTwVarAtom() +{ + if( m_Type==TW_TYPE_BOOL8 || m_Type==TW_TYPE_BOOL16 || m_Type==TW_TYPE_BOOL32 || m_Type==TW_TYPE_BOOLCPP ) + { + if( m_Val.m_Bool.m_FreeTrueString && m_Val.m_Bool.m_TrueString!=NULL ) + { + free(m_Val.m_Bool.m_TrueString); + m_Val.m_Bool.m_TrueString = NULL; + } + if( m_Val.m_Bool.m_FreeFalseString && m_Val.m_Bool.m_FalseString!=NULL ) + { + free(m_Val.m_Bool.m_FalseString); + m_Val.m_Bool.m_FalseString = NULL; + } + } + else if( m_Type==TW_TYPE_CDSTDSTRING && m_GetCallback==CTwMgr::CCDStdString::GetCB && m_ClientData!=NULL && g_TwMgr!=NULL ) + { + // delete corresponding g_TwMgr->m_CDStdStrings element + const CTwMgr::CCDStdString *CDStdString = (const CTwMgr::CCDStdString *)m_ClientData; + //if( &(*CDStdString->m_This)==CDStdString ) + // g_TwMgr->m_CDStdStrings.erase(CDStdString->m_This); + for( list::iterator it=g_TwMgr->m_CDStdStrings.begin(); it!=g_TwMgr->m_CDStdStrings.end(); ++it ) + if( &(*it)==CDStdString ) + { + g_TwMgr->m_CDStdStrings.erase(it); + break; + } + } + /* + else if( m_Type==TW_TYPE_ENUM8 || m_Type==TW_TYPE_ENUM16 || m_Type==TW_TYPE_ENUM32 ) + { + if( m_Val.m_Enum.m_Entries!=NULL ) + { + delete m_Val.m_Enum.m_Entries; + m_Val.m_Enum.m_Entries = NULL; + } + } + */ +} + +// --------------------------------------------------------------------------- + +void CTwVarAtom::ValueToString(string *_Str) const +{ + assert(_Str!=NULL); + static const char *ErrStr = "unreachable"; + char Tmp[1024]; + if( m_Type==TW_TYPE_UNDEF || m_Type==TW_TYPE_HELP_ATOM || m_Type==TW_TYPE_HELP_GRP || m_Type==TW_TYPE_BUTTON ) // has no value + { + *_Str = ""; + return; + } + else if( m_Type==TW_TYPE_HELP_HEADER ) + { + *_Str = "SHORTCUTS"; + return; + } + else if( m_Type==TW_TYPE_SHORTCUT ) // special case for help bar: display shortcut + { + *_Str = ""; + if( m_ReadOnly && m_Val.m_Shortcut.m_Incr[0]==0 && m_Val.m_Shortcut.m_Decr[0]==0 ) + (*_Str) = "(read only)"; + else + { + if( m_Val.m_Shortcut.m_Incr[0]>0 ) + TwGetKeyString(_Str, m_Val.m_Shortcut.m_Incr[0], m_Val.m_Shortcut.m_Incr[1]); + else + (*_Str) += "(none)"; + if( m_Val.m_Shortcut.m_Decr[0]>0 ) + { + (*_Str) += " "; + TwGetKeyString(_Str, m_Val.m_Shortcut.m_Decr[0], m_Val.m_Shortcut.m_Decr[1]); + } + } + return; + } + else if( m_Type==TW_TYPE_HELP_STRUCT ) + { + int idx = m_Val.m_HelpStruct.m_StructType - TW_TYPE_STRUCT_BASE; + if( idx>=0 && idx<(int)g_TwMgr->m_Structs.size() ) + { + if( g_TwMgr->m_Structs[idx].m_Name.length()>0 ) + (*_Str) = '{' + g_TwMgr->m_Structs[idx].m_Name + '}'; + else + (*_Str) = "{struct}"; + } + return; + } + + if( m_Ptr==NULL && m_GetCallback==NULL ) + { + *_Str = ErrStr; + return; + } + bool UseGet = (m_GetCallback!=NULL); + switch( m_Type ) + { + case TW_TYPE_BOOLCPP: + { + bool Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(bool *)m_Ptr; + if( Val ) + *_Str = (m_Val.m_Bool.m_TrueString!=NULL) ? m_Val.m_Bool.m_TrueString : "1"; + else + *_Str = (m_Val.m_Bool.m_FalseString!=NULL) ? m_Val.m_Bool.m_FalseString : "0"; + } + break; + case TW_TYPE_BOOL8: + { + char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(char *)m_Ptr; + if( Val ) + *_Str = (m_Val.m_Bool.m_TrueString!=NULL) ? m_Val.m_Bool.m_TrueString : "1"; + else + *_Str = (m_Val.m_Bool.m_FalseString!=NULL) ? m_Val.m_Bool.m_FalseString : "0"; + } + break; + case TW_TYPE_BOOL16: + { + short Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(short *)m_Ptr; + if( Val ) + *_Str = (m_Val.m_Bool.m_TrueString!=NULL) ? m_Val.m_Bool.m_TrueString : "1"; + else + *_Str = (m_Val.m_Bool.m_FalseString!=NULL) ? m_Val.m_Bool.m_FalseString : "0"; + } + break; + case TW_TYPE_BOOL32: + { + int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(int *)m_Ptr; + if( Val ) + *_Str = (m_Val.m_Bool.m_TrueString!=NULL) ? m_Val.m_Bool.m_TrueString : "1"; + else + *_Str = (m_Val.m_Bool.m_FalseString!=NULL) ? m_Val.m_Bool.m_FalseString : "0"; + } + break; + case TW_TYPE_CHAR: + { + unsigned char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned char *)m_Ptr; + if( Val!=0 ) + { + int d = Val; + if( m_Val.m_Char.m_Hexa ) + sprintf(Tmp, "%c (0x%.2X)", Val, d); + else + sprintf(Tmp, "%c (%d)", Val, d); + *_Str = Tmp; + } + else + { + *_Str = " (0)"; + const_cast(_Str->c_str())[0] = '\0'; + } + } + break; + case TW_TYPE_INT8: + { + signed char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(signed char *)m_Ptr; + int d = Val; + if( m_Val.m_Int8.m_Hexa ) + sprintf(Tmp, "0x%.2X", d&0xff); + else + sprintf(Tmp, "%d", d); + *_Str = Tmp; + } + break; + case TW_TYPE_UINT8: + { + unsigned char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned char *)m_Ptr; + unsigned int d = Val; + if( m_Val.m_UInt8.m_Hexa ) + sprintf(Tmp, "0x%.2X", d); + else + sprintf(Tmp, "%u", d); + *_Str = Tmp; + } + break; + case TW_TYPE_INT16: + { + short Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(short *)m_Ptr; + int d = Val; + if( m_Val.m_Int16.m_Hexa ) + sprintf(Tmp, "0x%.4X", d&0xffff); + else + sprintf(Tmp, "%d", d); + *_Str = Tmp; + } + break; + case TW_TYPE_UINT16: + { + unsigned short Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned short *)m_Ptr; + unsigned int d = Val; + if( m_Val.m_UInt16.m_Hexa ) + sprintf(Tmp, "0x%.4X", d); + else + sprintf(Tmp, "%u", d); + *_Str = Tmp; + } + break; + case TW_TYPE_INT32: + { + int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(int *)m_Ptr; + if( m_Val.m_Int32.m_Hexa ) + sprintf(Tmp, "0x%.8X", Val); + else + sprintf(Tmp, "%d", Val); + *_Str = Tmp; + } + break; + case TW_TYPE_UINT32: + { + unsigned int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned int *)m_Ptr; + if( m_Val.m_UInt32.m_Hexa ) + sprintf(Tmp, "0x%.8X", Val); + else + sprintf(Tmp, "%u", Val); + *_Str = Tmp; + } + break; + case TW_TYPE_FLOAT: + { + float Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(float *)m_Ptr; + if( m_Val.m_Float32.m_Precision<0 ) + sprintf(Tmp, "%g", Val); + else + { + char Fmt[64]; + sprintf(Fmt, "%%.%df", (int)m_Val.m_Float32.m_Precision); + sprintf(Tmp, Fmt, Val); + } + *_Str = Tmp; + } + break; + case TW_TYPE_DOUBLE: + { + double Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(double *)m_Ptr; + if( m_Val.m_Float64.m_Precision<0 ) + sprintf(Tmp, "%g", Val); + else + { + char Fmt[128]; + sprintf(Fmt, "%%.%dlf", (int)m_Val.m_Float64.m_Precision); + sprintf(Tmp, Fmt, Val); + } + *_Str = Tmp; + } + break; + case TW_TYPE_STDSTRING: + { + if( UseGet ) + m_GetCallback(_Str, m_ClientData); + else + *_Str = *(std::string *)m_Ptr; + } + break; + /* + case TW_TYPE_ENUM8: + case TW_TYPE_ENUM16: + case TW_TYPE_ENUM32: + { + unsigned int d = 0; + if( m_Type==TW_TYPE_ENUM8 ) + { + unsigned char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned char *)m_Ptr; + d = Val; + } + else if( m_Type==TW_TYPE_ENUM16 ) + { + unsigned short Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned short *)m_Ptr; + d = Val; + } + else + { + assert(m_Type==TW_TYPE_ENUM32); + unsigned int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned int *)m_Ptr; + d = Val; + } + bool Found = false; + if( m_Val.m_Enum.m_Entries!=NULL ) + { + UVal::CEnumVal::CEntries::iterator It = m_Val.m_Enum.m_Entries->find(d); + if( It!=m_Val.m_Enum.m_Entries->end() ) + { + *_Str = It->second; + Found = true; + } + } + if( !Found ) + { + sprintf(Tmp, "%u", d); + *_Str = Tmp; + } + } + break; + */ + default: + if( IsEnumType(m_Type) ) + { + unsigned int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned int *)m_Ptr; + + CTwMgr::CEnum& e = g_TwMgr->m_Enums[m_Type-TW_TYPE_ENUM_BASE]; + CTwMgr::CEnum::CEntries::iterator It = e.m_Entries.find(Val); + if( It!=e.m_Entries.end() ) + *_Str = It->second; + else + { + sprintf(Tmp, "%u", Val); + *_Str = Tmp; + } + } + else if( IsCSStringType(m_Type) ) + { + char *Val = NULL; + if( UseGet ) + { + int n = TW_CSSTRING_SIZE(m_Type); + if( n+32>(int)g_TwMgr->m_CSStringBuffer.size() ) + g_TwMgr->m_CSStringBuffer.resize(n+32); + Val = &(g_TwMgr->m_CSStringBuffer[0]); + m_GetCallback(Val , m_ClientData); + Val[n] = '\0'; + } + else + Val = (char *)m_Ptr; + if( Val!=NULL ) + *_Str = Val; + else + *_Str = ""; + } + else if( m_Type==TW_TYPE_CDSTRING || m_Type==TW_TYPE_CDSTDSTRING ) + { + char *Val = NULL; + if( UseGet ) + m_GetCallback(&Val , m_ClientData); + else + Val = *(char **)m_Ptr; + if( Val!=NULL ) + *_Str = Val; + else + *_Str = ""; + } + else if( IsCustom() ) // m_Type>=TW_TYPE_CUSTOM_BASE && m_Typem_Customs.size() ) + { + *_Str = ""; + } + else + { + *_Str = "unknown type"; + const_cast(this)->m_ReadOnly = true; + } + } +} + +// --------------------------------------------------------------------------- + +double CTwVarAtom::ValueToDouble() const +{ + if( m_Ptr==NULL && m_GetCallback==NULL ) + return 0; // unreachable + bool UseGet = (m_GetCallback!=NULL); + switch( m_Type ) + { + case TW_TYPE_BOOLCPP: + { + bool Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(bool *)m_Ptr; + if( Val ) + return 1; + else + return 0; + } + break; + case TW_TYPE_BOOL8: + { + char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(char *)m_Ptr; + if( Val ) + return 1; + else + return 0; + } + break; + case TW_TYPE_BOOL16: + { + short Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(short *)m_Ptr; + if( Val ) + return 1; + else + return 0; + } + break; + case TW_TYPE_BOOL32: + { + int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(int *)m_Ptr; + if( Val ) + return 1; + else + return 0; + } + break; + case TW_TYPE_CHAR: + { + unsigned char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned char *)m_Ptr; + return Val; + } + break; + case TW_TYPE_INT8: + { + signed char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(signed char *)m_Ptr; + int d = Val; + return d; + } + break; + case TW_TYPE_UINT8: + { + unsigned char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned char *)m_Ptr; + unsigned int d = Val; + return d; + } + break; + case TW_TYPE_INT16: + { + short Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(short *)m_Ptr; + int d = Val; + return d; + } + break; + case TW_TYPE_UINT16: + { + unsigned short Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned short *)m_Ptr; + unsigned int d = Val; + return d; + } + break; + case TW_TYPE_INT32: + { + int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(int *)m_Ptr; + return Val; + } + break; + case TW_TYPE_UINT32: + { + unsigned int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned int *)m_Ptr; + return Val; + } + break; + case TW_TYPE_FLOAT: + { + float Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(float *)m_Ptr; + return Val; + } + break; + case TW_TYPE_DOUBLE: + { + double Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(double *)m_Ptr; + return Val; + } + break; + /* + case TW_TYPE_ENUM8: + case TW_TYPE_ENUM16: + case TW_TYPE_ENUM32: + { + unsigned int d = 0; + if( m_Type==TW_TYPE_ENUM8 ) + { + unsigned char Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned char *)m_Ptr; + d = Val; + } + else if( m_Type==TW_TYPE_ENUM16 ) + { + unsigned short Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned short *)m_Ptr; + d = Val; + } + else + { + assert(m_Type==TW_TYPE_ENUM32); + unsigned int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned int *)m_Ptr; + d = Val; + } + return d; + } + break; + */ + default: + if( IsEnumType(m_Type) ) + { + unsigned int Val = 0; + if( UseGet ) + m_GetCallback(&Val, m_ClientData); + else + Val = *(unsigned int *)m_Ptr; + return Val; + } + else + return 0; // unknown type + } +} + +// --------------------------------------------------------------------------- + +void CTwVarAtom::ValueFromDouble(double _Val) +{ + if( m_Ptr==NULL && m_SetCallback==NULL ) + return; // unreachable + bool UseSet = (m_SetCallback!=NULL); + switch( m_Type ) + { + case TW_TYPE_BOOLCPP: + { + bool Val = (_Val!=0); + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(bool*)m_Ptr = Val; + } + break; + case TW_TYPE_BOOL8: + { + char Val = (_Val!=0) ? 1 : 0; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(char*)m_Ptr = Val; + } + break; + case TW_TYPE_BOOL16: + { + short Val = (_Val!=0) ? 1 : 0; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(short*)m_Ptr = Val; + } + break; + case TW_TYPE_BOOL32: + { + int Val = (_Val!=0) ? 1 : 0; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(int*)m_Ptr = Val; + } + break; + case TW_TYPE_CHAR: + { + unsigned char Val = (unsigned char)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(unsigned char*)m_Ptr = Val; + } + break; + case TW_TYPE_INT8: + { + signed char Val = (signed char)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(signed char*)m_Ptr = Val; + } + break; + case TW_TYPE_UINT8: + //case TW_TYPE_ENUM8: + { + unsigned char Val = (unsigned char)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(unsigned char*)m_Ptr = Val; + } + break; + case TW_TYPE_INT16: + { + short Val = (short)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(short*)m_Ptr = Val; + } + break; + case TW_TYPE_UINT16: + //case TW_TYPE_ENUM16: + { + unsigned short Val = (unsigned short)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(unsigned short*)m_Ptr = Val; + } + break; + case TW_TYPE_INT32: + { + int Val = (int)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(int*)m_Ptr = Val; + } + break; + case TW_TYPE_UINT32: + //case TW_TYPE_ENUM32: + { + unsigned int Val = (unsigned int)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(unsigned int*)m_Ptr = Val; + } + break; + case TW_TYPE_FLOAT: + { + float Val = (float)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(float*)m_Ptr = Val; + } + break; + case TW_TYPE_DOUBLE: + { + double Val = (double)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(double*)m_Ptr = Val; + } + break; + default: + if( IsEnumType(m_Type) ) + { + unsigned int Val = (unsigned int)_Val; + if( UseSet ) + m_SetCallback(&Val, m_ClientData); + else + *(unsigned int*)m_Ptr = Val; + } + } +} + +// --------------------------------------------------------------------------- + +void CTwVarAtom::MinMaxStepToDouble(double *_Min, double *_Max, double *_Step) const +{ + double max = DOUBLE_MAX; + double min = -DOUBLE_MAX; + double step = 1; + + switch( m_Type ) + { + case TW_TYPE_BOOLCPP: + case TW_TYPE_BOOL8: + case TW_TYPE_BOOL16: + case TW_TYPE_BOOL32: + min = 0; + max = 1; + step = 1; + break; + case TW_TYPE_CHAR: + min = (double)m_Val.m_Char.m_Min; + max = (double)m_Val.m_Char.m_Max; + step = (double)m_Val.m_Char.m_Step; + break; + case TW_TYPE_INT8: + min = (double)m_Val.m_Int8.m_Min; + max = (double)m_Val.m_Int8.m_Max; + step = (double)m_Val.m_Int8.m_Step; + break; + case TW_TYPE_UINT8: + min = (double)m_Val.m_UInt8.m_Min; + max = (double)m_Val.m_UInt8.m_Max; + step = (double)m_Val.m_UInt8.m_Step; + break; + case TW_TYPE_INT16: + min = (double)m_Val.m_Int16.m_Min; + max = (double)m_Val.m_Int16.m_Max; + step = (double)m_Val.m_Int16.m_Step; + break; + case TW_TYPE_UINT16: + min = (double)m_Val.m_UInt16.m_Min; + max = (double)m_Val.m_UInt16.m_Max; + step = (double)m_Val.m_UInt16.m_Step; + break; + case TW_TYPE_INT32: + min = (double)m_Val.m_Int32.m_Min; + max = (double)m_Val.m_Int32.m_Max; + step = (double)m_Val.m_Int32.m_Step; + break; + case TW_TYPE_UINT32: + min = (double)m_Val.m_UInt32.m_Min; + max = (double)m_Val.m_UInt32.m_Max; + step = (double)m_Val.m_UInt32.m_Step; + break; + case TW_TYPE_FLOAT: + min = (double)m_Val.m_Float32.m_Min; + max = (double)m_Val.m_Float32.m_Max; + step = (double)m_Val.m_Float32.m_Step; + break; + case TW_TYPE_DOUBLE: + min = m_Val.m_Float64.m_Min; + max = m_Val.m_Float64.m_Max; + step = m_Val.m_Float64.m_Step; + break; + default: + {} // nothing + } + + if( _Min!=NULL ) + *_Min = min; + if( _Max!=NULL ) + *_Max = max; + if( _Step!=NULL ) + *_Step = step; +} + +// --------------------------------------------------------------------------- + +const CTwVar *CTwVarAtom::Find(const char *_Name, CTwVarGroup **_Parent, int *_Index) const +{ + if( strcmp(_Name, m_Name.c_str())==0 ) + { + if( _Parent!=NULL ) + *_Parent = NULL; + if( _Index!=NULL ) + *_Index = -1; + return this; + } + else + return NULL; +} + +// --------------------------------------------------------------------------- + +enum EVarAttribs +{ + V_LABEL = 1, + V_HELP, + V_GROUP, + V_SHOW, + V_HIDE, + V_READONLY, + V_READWRITE, + V_ORDER, + V_VISIBLE, + V_ENDTAG +}; + +int CTwVar::HasAttrib(const char *_Attrib, bool *_HasValue) const +{ + *_HasValue = true; + if( _stricmp(_Attrib, "label")==0 ) + return V_LABEL; + else if( _stricmp(_Attrib, "help")==0 ) + return V_HELP; + else if( _stricmp(_Attrib, "group")==0 ) + return V_GROUP; + else if( _stricmp(_Attrib, "order")==0 ) + return V_ORDER; + else if( _stricmp(_Attrib, "visible")==0 ) + return V_VISIBLE; + else if( _stricmp(_Attrib, "readonly")==0 ) + return V_READONLY; + + // for backward compatibility + *_HasValue = false; + if( _stricmp(_Attrib, "show")==0 ) + return V_SHOW; + else if( _stricmp(_Attrib, "hide")==0 ) + return V_HIDE; + if( _stricmp(_Attrib, "readonly")==0 ) + return V_READONLY; + else if( _stricmp(_Attrib, "readwrite")==0 ) + return V_READWRITE; + + return 0; // not found +} + +int CTwVar::SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex) +{ + switch( _AttribID ) + { + case V_LABEL: + case V_HELP: + if( _Value && strlen(_Value)>0 ) + { + /* + if( IsGroup() && static_cast(this)->m_StructValuePtr!=NULL ) + { + int Idx = static_cast(this)->m_StructType-TW_TYPE_STRUCT_BASE; + if( Idx>=0 && Idx<(int)g_TwMgr->m_Structs.size() ) + if( _AttribID==V_LABEL ) + g_TwMgr->m_Structs[Idx].m_Label = _Value; + else // V_HELP + g_TwMgr->m_Structs[Idx].m_Help = _Value; + } + else + */ + { + CTwVarGroup *Parent = NULL; + CTwVar *ThisVar = _Bar->Find(m_Name.c_str(), &Parent); + if( this==ThisVar && Parent!=NULL && Parent->m_StructValuePtr!=NULL ) + { + int Idx = Parent->m_StructType-TW_TYPE_STRUCT_BASE; + if( Idx>=0 && Idx<(int)g_TwMgr->m_Structs.size() ) + { + size_t nl = m_Name.length(); + for( size_t im=0; imm_Structs[Idx].m_Members.size(); ++im ) + { + size_t ml = g_TwMgr->m_Structs[Idx].m_Members[im].m_Name.length(); + if( nl>=ml && strcmp(g_TwMgr->m_Structs[Idx].m_Members[im].m_Name.c_str(), m_Name.c_str()+(nl-ml))==0 ) + { + // TODO: would have to be applied to other vars already created + if( _AttribID==V_LABEL ) + { + g_TwMgr->m_Structs[Idx].m_Members[im].m_Label = _Value; +// m_Label = _Value; + } + else // V_HELP + g_TwMgr->m_Structs[Idx].m_Members[im].m_Help = _Value; + break; + } + } + } + } + else + { + if( _AttribID==V_LABEL ) + m_Label = _Value; + else // V_HELP + m_Help = _Value; + } + } + _Bar->NotUpToDate(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case V_GROUP: + { + CTwVarGroup *Grp = NULL; + if( _Value==NULL || strlen(_Value)<=0 ) + Grp = &(_Bar->m_VarRoot); + else + { + CTwVar *v = _Bar->Find(_Value, NULL, NULL); + if( v && !v->IsGroup() ) + { + g_TwMgr->SetLastError(g_ErrNotGroup); + return 0; + } + Grp = static_cast(v); + if( Grp==NULL ) + { + Grp = new CTwVarGroup; + Grp->m_Name = _Value; + Grp->m_Open = true; + Grp->m_SummaryCallback = NULL; + Grp->m_SummaryClientData = NULL; + Grp->m_StructValuePtr = NULL; + Grp->m_ColorPtr = &(_Bar->m_ColGrpText); + _Bar->m_VarRoot.m_Vars.push_back(Grp); + } + } + Grp->m_Vars.push_back(this); + if( _VarParent!=NULL && _VarIndex>=0 ) + { + _VarParent->m_Vars.erase(_VarParent->m_Vars.begin()+_VarIndex); + if( _VarParent!=&(_Bar->m_VarRoot) && _VarParent->m_Vars.size()<=0 ) + TwRemoveVar(_Bar, _VarParent->m_Name.c_str()); + } + _Bar->NotUpToDate(); + return 1; + } + case V_SHOW: // for backward compatibility + if( !m_Visible ) + { + m_Visible = true; + _Bar->NotUpToDate(); + } + return 1; + case V_HIDE: // for backward compatibility + if( m_Visible ) + { + m_Visible = false; + _Bar->NotUpToDate(); + } + return 1; + /* + case V_READONLY: + SetReadOnly(true); + _Bar->NotUpToDate(); + return 1; + */ + case V_READWRITE: // for backward compatibility + SetReadOnly(false); + _Bar->NotUpToDate(); + return 1; + case V_ORDER: + // a special case for compatibility with deprecated command 'option=ogl/dx' + if( IsGroup() && _Value!=NULL && static_cast(this)->m_SummaryCallback==CColorExt::SummaryCB && static_cast(this)->m_StructValuePtr!=NULL ) // is tw_type_color? + { + if( _stricmp(_Value, "ogl")==0 ) + { + static_cast(static_cast(this)->m_StructValuePtr)->m_OGL = true; + return 1; + } + else if( _stricmp(_Value, "dx")==0 ) + { + static_cast(static_cast(this)->m_StructValuePtr)->m_OGL = false; + return 1; + } + } + // todo: general 'order' command (no else) + return 0; + case V_VISIBLE: + if( _Value!=NULL && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "true")==0 || _stricmp(_Value, "1")==0 ) + { + if( !m_Visible ) + { + m_Visible = true; + _Bar->NotUpToDate(); + } + return 1; + } + else if( _stricmp(_Value, "false")==0 || _stricmp(_Value, "0")==0 ) + { + if( m_Visible ) + { + m_Visible = false; + _Bar->NotUpToDate(); + } + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case V_READONLY: + if( _Value==NULL || strlen(_Value)==0 // no value is acceptable (for backward compatibility) + || _stricmp(_Value, "true")==0 || _stricmp(_Value, "1")==0 ) + { + if( !IsReadOnly() ) + { + SetReadOnly(true); + _Bar->NotUpToDate(); + } + return 1; + } + else if( _stricmp(_Value, "false")==0 || _stricmp(_Value, "0")==0 ) + { + if( IsReadOnly() ) + { + SetReadOnly(false); + _Bar->NotUpToDate(); + } + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + default: + g_TwMgr->SetLastError(g_ErrUnknownAttrib); + return 0; + } +} + + +ERetType CTwVar::GetAttrib(int _AttribID, TwBar * /*_Bar*/, CTwVarGroup * _VarParent, int /*_VarIndex*/, std::vector& outDoubles, std::ostringstream& outString) const +{ + outDoubles.clear(); + outString.clear(); + + switch( _AttribID ) + { + case V_LABEL: + outString << m_Label; + return RET_STRING; + case V_HELP: + outString << m_Help; + return RET_STRING; + case V_GROUP: + if( _VarParent!=NULL ) + outString << _VarParent->m_Name; + return RET_STRING; + case V_VISIBLE: + outDoubles.push_back(m_Visible ? 1 : 0); + return RET_DOUBLE; + case V_READONLY: + outDoubles.push_back(IsReadOnly() ? 1 : 0); + return RET_DOUBLE; + default: + g_TwMgr->SetLastError(g_ErrUnknownAttrib); + return RET_ERROR; + } +} + + +// --------------------------------------------------------------------------- + +enum EVarAtomAttribs +{ + VA_KEY_INCR = V_ENDTAG+1, + VA_KEY_DECR, + VA_MIN, + VA_MAX, + VA_STEP, + VA_PRECISION, + VA_HEXA, + VA_DECIMAL, // for backward compatibility + VA_TRUE, + VA_FALSE, + VA_ENUM, + VA_VALUE +}; + +int CTwVarAtom::HasAttrib(const char *_Attrib, bool *_HasValue) const +{ + *_HasValue = true; + if( _stricmp(_Attrib, "keyincr")==0 || _stricmp(_Attrib, "key")==0 ) + return VA_KEY_INCR; + else if( _stricmp(_Attrib, "keydecr")==0 ) + return VA_KEY_DECR; + else if( _stricmp(_Attrib, "min")==0 ) + return VA_MIN; + else if( _stricmp(_Attrib, "max")==0 ) + return VA_MAX; + else if( _stricmp(_Attrib, "step")==0 ) + return VA_STEP; + else if( _stricmp(_Attrib, "precision")==0 ) + return VA_PRECISION; + else if( _stricmp(_Attrib, "hexa")==0 ) + return VA_HEXA; + else if( _stricmp(_Attrib, "decimal")==0 ) // for backward compatibility + { + *_HasValue = false; + return VA_DECIMAL; + } + else if( _stricmp(_Attrib, "true")==0 ) + return VA_TRUE; + else if( _stricmp(_Attrib, "false")==0 ) + return VA_FALSE; + else if( _stricmp(_Attrib, "enum")==0 + || _stricmp(_Attrib, "val")==0 ) // for backward compatibility + return VA_ENUM; + else if( _stricmp(_Attrib, "value")==0 ) + return VA_VALUE; + + return CTwVar::HasAttrib(_Attrib, _HasValue); +} + +int CTwVarAtom::SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex) +{ + switch( _AttribID ) + { + case VA_KEY_INCR: + { + int Key = 0; + int Mod = 0; + if( TwGetKeyCode(&Key, &Mod, _Value) ) + { + m_KeyIncr[0] = Key; + m_KeyIncr[1] = Mod; + return 1; + } + else + return 0; + } + case VA_KEY_DECR: + { + int Key = 0; + int Mod = 0; + if( TwGetKeyCode(&Key, &Mod, _Value) ) + { + m_KeyDecr[0] = Key; + m_KeyDecr[1] = Mod; + return 1; + } + else + return 0; + } + case VA_TRUE: + if( (m_Type==TW_TYPE_BOOL8 || m_Type==TW_TYPE_BOOL16 || m_Type==TW_TYPE_BOOL32 || m_Type==TW_TYPE_BOOLCPP) && _Value!=NULL ) + { + if( m_Val.m_Bool.m_FreeTrueString && m_Val.m_Bool.m_TrueString!=NULL ) + free(m_Val.m_Bool.m_TrueString); + m_Val.m_Bool.m_TrueString = _strdup(_Value); + m_Val.m_Bool.m_FreeTrueString = true; + return 1; + } + else + return 0; + case VA_FALSE: + if( (m_Type==TW_TYPE_BOOL8 || m_Type==TW_TYPE_BOOL16 || m_Type==TW_TYPE_BOOL32 || m_Type==TW_TYPE_BOOLCPP) && _Value!=NULL ) + { + if( m_Val.m_Bool.m_FreeFalseString && m_Val.m_Bool.m_FalseString!=NULL ) + free(m_Val.m_Bool.m_FalseString); + m_Val.m_Bool.m_FalseString = _strdup(_Value); + m_Val.m_Bool.m_FreeFalseString = true; + return 1; + } + else + return 0; + case VA_MIN: + case VA_MAX: + case VA_STEP: + if( _Value && strlen(_Value)>0 ) + { + void *Ptr = NULL; + const char *Fmt = NULL; + int d = 0; + unsigned int u = 0; + int Num = (_AttribID==VA_STEP) ? 2 : ((_AttribID==VA_MAX) ? 1 : 0); + switch( m_Type ) + { + case TW_TYPE_CHAR: + //Ptr = (&m_Val.m_Char.m_Min) + Num; + //Fmt = "%c"; + Ptr = &u; + Fmt = "%u"; + break; + case TW_TYPE_INT16: + Ptr = (&m_Val.m_Int16.m_Min) + Num; + Fmt = "%hd"; + break; + case TW_TYPE_INT32: + Ptr = (&m_Val.m_Int32.m_Min) + Num; + Fmt = "%d"; + break; + case TW_TYPE_UINT16: + Ptr = (&m_Val.m_UInt16.m_Min) + Num; + Fmt = "%hu"; + break; + case TW_TYPE_UINT32: + Ptr = (&m_Val.m_UInt32.m_Min) + Num; + Fmt = "%u"; + break; + case TW_TYPE_FLOAT: + Ptr = (&m_Val.m_Float32.m_Min) + Num; + Fmt = "%f"; + break; + case TW_TYPE_DOUBLE: + Ptr = (&m_Val.m_Float64.m_Min) + Num; + Fmt = "%lf"; + break; + case TW_TYPE_INT8: + Ptr = &d; + Fmt = "%d"; + break; + case TW_TYPE_UINT8: + Ptr = &u; + Fmt = "%u"; + break; + default: + g_TwMgr->SetLastError(g_ErrUnknownType); + return 0; + } + + if( Fmt!=NULL && Ptr!=NULL && sscanf(_Value, Fmt, Ptr)==1 ) + { + if( m_Type==TW_TYPE_CHAR ) + *((&m_Val.m_Char.m_Min)+Num) = (unsigned char)(u); + else if( m_Type==TW_TYPE_INT8 ) + *((&m_Val.m_Int8.m_Min)+Num) = (signed char)(d); + else if( m_Type==TW_TYPE_UINT8 ) + *((&m_Val.m_UInt8.m_Min)+Num) = (unsigned char)(u); + + // set precision + if( _AttribID==VA_STEP && ((m_Type==TW_TYPE_FLOAT && m_Val.m_Float32.m_Precision<0) || (m_Type==TW_TYPE_DOUBLE && m_Val.m_Float64.m_Precision<0)) ) + { + double Step = fabs( (m_Type==TW_TYPE_FLOAT) ? m_Val.m_Float32.m_Step : m_Val.m_Float64.m_Step ); + signed char *Precision = (m_Type==TW_TYPE_FLOAT) ? &m_Val.m_Float32.m_Precision : &m_Val.m_Float64.m_Precision; + const double K_EPS = 1.0 - 1.0e-6; + if( Step>=1 ) + *Precision = 0; + else if( Step>=0.1*K_EPS ) + *Precision = 1; + else if( Step>=0.01*K_EPS ) + *Precision = 2; + else if( Step>=0.001*K_EPS ) + *Precision = 3; + else if( Step>=0.0001*K_EPS ) + *Precision = 4; + else if( Step>=0.00001*K_EPS ) + *Precision = 5; + else if( Step>=0.000001*K_EPS ) + *Precision = 6; + else if( Step>=0.0000001*K_EPS ) + *Precision = 7; + else if( Step>=0.00000001*K_EPS ) + *Precision = 8; + else if( Step>=0.000000001*K_EPS ) + *Precision = 9; + else if( Step>=0.0000000001*K_EPS ) + *Precision = 10; + else if( Step>=0.00000000001*K_EPS ) + *Precision = 11; + else if( Step>=0.000000000001*K_EPS ) + *Precision = 12; + else + *Precision = -1; + } + + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case VA_PRECISION: + if( _Value && strlen(_Value)>0 ) + { + int Precision = 0; + if( sscanf(_Value, "%d", &Precision)==1 && Precision>=-1 && Precision<=12 ) + { + if( m_Type==TW_TYPE_FLOAT ) + m_Val.m_Float32.m_Precision = (signed char)Precision; + else if ( m_Type==TW_TYPE_DOUBLE ) + m_Val.m_Float64.m_Precision = (signed char)Precision; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case VA_HEXA: + case VA_DECIMAL: + { + bool hexa = false; + if (_AttribID==VA_HEXA) + { + if( _Value==NULL || strlen(_Value)==0 // no value is acceptable (for backward compatibility) + || _stricmp(_Value, "true")==0 || _stricmp(_Value, "1")==0 ) + hexa = true; + } + + switch( m_Type ) + { + case TW_TYPE_CHAR: + m_Val.m_Char.m_Hexa = hexa; + return 1; + case TW_TYPE_INT8: + m_Val.m_Int8.m_Hexa = hexa; + return 1; + case TW_TYPE_INT16: + m_Val.m_Int16.m_Hexa = hexa; + return 1; + case TW_TYPE_INT32: + m_Val.m_Int32.m_Hexa = hexa; + return 1; + case TW_TYPE_UINT8: + m_Val.m_UInt8.m_Hexa = hexa; + return 1; + case TW_TYPE_UINT16: + m_Val.m_UInt16.m_Hexa = hexa; + return 1; + case TW_TYPE_UINT32: + m_Val.m_UInt32.m_Hexa = hexa; + return 1; + default: + return 0; + } + } + case VA_ENUM: + if( _Value && strlen(_Value)>0 && IsEnumType(m_Type) ) + { + const char *s = _Value; + int n = 0, i = 0; + unsigned int u; + bool Cont; + g_TwMgr->m_Enums[m_Type-TW_TYPE_ENUM_BASE].m_Entries.clear(); // anyway reset entries + do + { + Cont = false; + i = 0; + char Sep; + n = sscanf(s, "%u %c%n", &u, &Sep, &i); + if( n==2 && i>0 && ( Sep=='<' || Sep=='{' || Sep=='[' || Sep=='(' ) ) + { + if( Sep=='<' ) // Change to closing separator + Sep = '>'; + else if( Sep=='{' ) + Sep = '}'; + else if( Sep=='[' ) + Sep = ']'; + else if( Sep=='(' ) + Sep = ')'; + s += i; + i = 0; + while( s[i]!=Sep && s[i]!=0 ) + ++i; + if( s[i]==Sep ) + { + //if( m_Val.m_Enum.m_Entries==NULL ) + // m_Val.m_Enum.m_Entries = new UVal::CEnumVal::CEntries; + //UVal::CEnumVal::CEntries::value_type v(u, ""); + CTwMgr::CEnum::CEntries::value_type v(u, ""); + if( i>0 ) + v.second.assign(s, i); + //m_Val.m_Enum.m_Entries->insert(v); + pair ret; + ret = g_TwMgr->m_Enums[m_Type-TW_TYPE_ENUM_BASE].m_Entries.insert(v); + if( !ret.second ) // force overwrite if element already exists + { + g_TwMgr->m_Enums[m_Type-TW_TYPE_ENUM_BASE].m_Entries.erase(ret.first); + g_TwMgr->m_Enums[m_Type-TW_TYPE_ENUM_BASE].m_Entries.insert(v); + } + + s += i+1; + i = 0; + n = sscanf(s, " ,%n", &i); + if( n==0 && i>=1 ) + { + s += i; + Cont = true; + } + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } while( Cont ); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + break; + case VA_VALUE: + if( _Value!=NULL && strlen(_Value)>0 ) // do not check ReadOnly here. + { + if( !( m_Type==TW_TYPE_BUTTON || IsCustom() ) ) // || (m_Type>=TW_TYPE_CUSTOM_BASE && m_Typem_Customs.size()) ) ) + { + if( m_Type==TW_TYPE_CDSTRING || m_Type==TW_TYPE_CDSTDSTRING ) + { + if( m_SetCallback!=NULL ) + { + m_SetCallback(&_Value, m_ClientData); + if( g_TwMgr!=NULL ) // Mgr might have been destroyed by the client inside a callback call + _Bar->NotUpToDate(); + return 1; + } + else if( m_Type!=TW_TYPE_CDSTDSTRING ) + { + char **StringPtr = (char **)m_Ptr; + if( StringPtr!=NULL && g_TwMgr->m_CopyCDStringToClient!=NULL ) + { + g_TwMgr->m_CopyCDStringToClient(StringPtr, _Value); + _Bar->NotUpToDate(); + return 1; + } + } + } + else if( IsCSStringType(m_Type) ) + { + int n = TW_CSSTRING_SIZE(m_Type); + if( n>0 ) + { + string str = _Value; + if( (int)str.length()>n-1 ) + str.resize(n-1); + if( m_SetCallback!=NULL ) + { + m_SetCallback(str.c_str(), m_ClientData); + if( g_TwMgr!=NULL ) // Mgr might have been destroyed by the client inside a callback call + _Bar->NotUpToDate(); + return 1; + } + else if( m_Ptr!=NULL ) + { + if( n>1 ) + strncpy((char *)m_Ptr, str.c_str(), n-1); + ((char *)m_Ptr)[n-1] = '\0'; + _Bar->NotUpToDate(); + return 1; + } + } + } + else + { + double dbl; + if( sscanf(_Value, "%lf", &dbl)==1 ) + { + ValueFromDouble(dbl); + if( g_TwMgr!=NULL ) // Mgr might have been destroyed by the client inside a callback call + _Bar->NotUpToDate(); + return 1; + } + } + } + } + return 0; + default: + return CTwVar::SetAttrib(_AttribID, _Value, _Bar, _VarParent, _VarIndex); + } +} + +ERetType CTwVarAtom::GetAttrib(int _AttribID, TwBar *_Bar, CTwVarGroup *_VarParent, int _VarIndex, std::vector& outDoubles, std::ostringstream& outString) const +{ + outDoubles.clear(); + outString.clear(); + std::string str; + int num = 0; + + switch( _AttribID ) + { + case VA_KEY_INCR: + if( TwGetKeyString(&str, m_KeyIncr[0], m_KeyIncr[1]) ) + outString << str; + return RET_STRING; + case VA_KEY_DECR: + if( TwGetKeyString(&str, m_KeyDecr[0], m_KeyDecr[1]) ) + outString << str; + return RET_STRING; + case VA_TRUE: + if( m_Type==TW_TYPE_BOOL8 || m_Type==TW_TYPE_BOOL16 || m_Type==TW_TYPE_BOOL32 || m_Type==TW_TYPE_BOOLCPP ) + { + outString << m_Val.m_Bool.m_TrueString; + return RET_STRING; + } + else + { + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + } + case VA_FALSE: + if( m_Type==TW_TYPE_BOOL8 || m_Type==TW_TYPE_BOOL16 || m_Type==TW_TYPE_BOOL32 || m_Type==TW_TYPE_BOOLCPP ) + { + outString << m_Val.m_Bool.m_FalseString; + return RET_STRING; + } + else + { + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + } + case VA_MIN: + case VA_MAX: + case VA_STEP: + num = (_AttribID==VA_STEP) ? 2 : ((_AttribID==VA_MAX) ? 1 : 0); + switch( m_Type ) + { + case TW_TYPE_CHAR: + outDoubles.push_back( *((&m_Val.m_Char.m_Min) + num) ); + return RET_DOUBLE; + case TW_TYPE_INT8: + outDoubles.push_back( *((&m_Val.m_Int8.m_Min) + num) ); + return RET_DOUBLE; + case TW_TYPE_UINT8: + outDoubles.push_back( *((&m_Val.m_UInt8.m_Min) + num) ); + return RET_DOUBLE; + case TW_TYPE_INT16: + outDoubles.push_back( *((&m_Val.m_Int16.m_Min) + num) ); + return RET_DOUBLE; + case TW_TYPE_INT32: + outDoubles.push_back( *((&m_Val.m_Int32.m_Min) + num) ); + return RET_DOUBLE; + case TW_TYPE_UINT16: + outDoubles.push_back( *((&m_Val.m_UInt16.m_Min) + num) ); + return RET_DOUBLE; + case TW_TYPE_UINT32: + outDoubles.push_back( *((&m_Val.m_UInt32.m_Min) + num) ); + return RET_DOUBLE; + case TW_TYPE_FLOAT: + outDoubles.push_back( *((&m_Val.m_Float32.m_Min) + num) ); + return RET_DOUBLE; + case TW_TYPE_DOUBLE: + outDoubles.push_back( *((&m_Val.m_Float64.m_Min) + num) ); + return RET_DOUBLE; + default: + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + } + case VA_PRECISION: + if( m_Type==TW_TYPE_FLOAT ) + { + outDoubles.push_back( m_Val.m_Float32.m_Precision ); + return RET_DOUBLE; + } + else if ( m_Type==TW_TYPE_DOUBLE ) + { + outDoubles.push_back( m_Val.m_Float64.m_Precision ); + return RET_DOUBLE; + } + else + { + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + } + case VA_HEXA: + switch( m_Type ) + { + case TW_TYPE_CHAR: + outDoubles.push_back( m_Val.m_Char.m_Hexa ); + return RET_DOUBLE; + case TW_TYPE_INT8: + outDoubles.push_back( m_Val.m_Int8.m_Hexa ); + return RET_DOUBLE; + case TW_TYPE_INT16: + outDoubles.push_back( m_Val.m_Int16.m_Hexa ); + return RET_DOUBLE; + case TW_TYPE_INT32: + outDoubles.push_back( m_Val.m_Int32.m_Hexa ); + return RET_DOUBLE; + case TW_TYPE_UINT8: + outDoubles.push_back( m_Val.m_UInt8.m_Hexa ); + return RET_DOUBLE; + case TW_TYPE_UINT16: + outDoubles.push_back( m_Val.m_UInt16.m_Hexa ); + return RET_DOUBLE; + case TW_TYPE_UINT32: + outDoubles.push_back( m_Val.m_UInt32.m_Hexa ); + return RET_DOUBLE; + default: + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + } + case VA_ENUM: + if( IsEnumType(m_Type) ) + { + CTwMgr::CEnum::CEntries::iterator it = g_TwMgr->m_Enums[m_Type-TW_TYPE_ENUM_BASE].m_Entries.begin(); + for( ; it != g_TwMgr->m_Enums[m_Type-TW_TYPE_ENUM_BASE].m_Entries.end(); ++it ) + { + if( it != g_TwMgr->m_Enums[m_Type-TW_TYPE_ENUM_BASE].m_Entries.begin() ) + outString << ','; + outString << it->first << ' '; + if( it->second.find_first_of("{}")==std::string::npos ) + outString << '{' << it->second << '}'; + else if ( it->second.find_first_of("<>")==std::string::npos ) + outString << '<' << it->second << '>'; + else if ( it->second.find_first_of("()")==std::string::npos ) + outString << '(' << it->second << ')'; + else if ( it->second.find_first_of("[]")==std::string::npos ) + outString << '[' << it->second << ']'; + else + outString << '{' << it->second << '}'; // should not occured (use braces) + } + return RET_STRING; + } + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + case VA_VALUE: + if( !( m_Type==TW_TYPE_BUTTON || IsCustom() ) ) // || (m_Type>=TW_TYPE_CUSTOM_BASE && m_Typem_Customs.size()) ) ) + { + if( m_Type==TW_TYPE_CDSTRING || m_Type==TW_TYPE_CDSTDSTRING || IsCSStringType(m_Type) ) + { + string str; + ValueToString(&str); + outString << str; + return RET_STRING; + } + else + { + outDoubles.push_back( ValueToDouble() ); + return RET_DOUBLE; + } + } + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + default: + return CTwVar::GetAttrib(_AttribID, _Bar, _VarParent, _VarIndex, outDoubles, outString); + } +} + +// --------------------------------------------------------------------------- + +void CTwVarAtom::Increment(int _Step) +{ + if( _Step==0 ) + return; + switch( m_Type ) + { + case TW_TYPE_BOOL8: + { + char v = false; + if( m_Ptr!=NULL ) + v = *((char *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + if( v ) + v = false; + else + v = true; + if( m_Ptr!=NULL ) + *((char *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_BOOL16: + { + short v = false; + if( m_Ptr!=NULL ) + v = *((short *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + if( v ) + v = false; + else + v = true; + if( m_Ptr!=NULL ) + *((short *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_BOOL32: + { + int v = false; + if( m_Ptr!=NULL ) + v = *((int *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + if( v ) + v = false; + else + v = true; + if( m_Ptr!=NULL ) + *((int *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_BOOLCPP: + { + bool v = false; + if( m_Ptr!=NULL ) + v = *((bool *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + if( v ) + v = false; + else + v = true; + if( m_Ptr!=NULL ) + *((bool *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_CHAR: + { + unsigned char v = 0; + if( m_Ptr!=NULL ) + v = *((unsigned char *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + int iv = _Step*(int)m_Val.m_Char.m_Step + (int)v; + if( ivm_Val.m_Char.m_Max ) + iv = m_Val.m_Char.m_Max; + if( iv<0 ) + iv = 0; + else if( iv>0xff ) + iv = 0xff; + v = (unsigned char)iv; + if( m_Ptr!=NULL ) + *((unsigned char *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_INT8: + { + signed char v = 0; + if( m_Ptr!=NULL ) + v = *((signed char *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + int iv = _Step*(int)m_Val.m_Int8.m_Step + (int)v; + if( ivm_Val.m_Int8.m_Max ) + iv = m_Val.m_Int8.m_Max; + v = (signed char)iv; + if( m_Ptr!=NULL ) + *((signed char *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_UINT8: + { + unsigned char v = 0; + if( m_Ptr!=NULL ) + v = *((unsigned char *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + int iv = _Step*(int)m_Val.m_UInt8.m_Step + (int)v; + if( ivm_Val.m_UInt8.m_Max ) + iv = m_Val.m_UInt8.m_Max; + if( iv<0 ) + iv = 0; + else if( iv>0xff ) + iv = 0xff; + v = (unsigned char)iv; + if( m_Ptr!=NULL ) + *((unsigned char *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_INT16: + { + short v = 0; + if( m_Ptr!=NULL ) + v = *((short *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + int iv = _Step*(int)m_Val.m_Int16.m_Step + (int)v; + if( ivm_Val.m_Int16.m_Max ) + iv = m_Val.m_Int16.m_Max; + v = (short)iv; + if( m_Ptr!=NULL ) + *((short *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_UINT16: + { + unsigned short v = 0; + if( m_Ptr!=NULL ) + v = *((unsigned short *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + int iv = _Step*(int)m_Val.m_UInt16.m_Step + (int)v; + if( ivm_Val.m_UInt16.m_Max ) + iv = m_Val.m_UInt16.m_Max; + if( iv<0 ) + iv = 0; + else if( iv>0xffff ) + iv = 0xffff; + v = (unsigned short)iv; + if( m_Ptr!=NULL ) + *((unsigned short *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_INT32: + { + int v = 0; + if( m_Ptr!=NULL ) + v = *((int *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + double dv = (double)_Step*(double)m_Val.m_Int32.m_Step + (double)v; + if( dv>(double)0x7fffffff ) + v = 0x7fffffff; + else if( dv<(double)(-0x7fffffff-1) ) + v = -0x7fffffff-1; + else + v = _Step*m_Val.m_Int32.m_Step + v; + if( vm_Val.m_Int32.m_Max ) + v = m_Val.m_Int32.m_Max; + if( m_Ptr!=NULL ) + *((int *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_UINT32: + { + unsigned int v = 0; + if( m_Ptr!=NULL ) + v = *((unsigned int *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + double dv = (double)_Step*(double)m_Val.m_UInt32.m_Step + (double)v; + if( dv>(double)0xffffffff ) + v = 0xffffffff; + else if( dv<0 ) + v = 0; + else + v = _Step*m_Val.m_UInt32.m_Step + v; + if( vm_Val.m_UInt32.m_Max ) + v = m_Val.m_UInt32.m_Max; + if( m_Ptr!=NULL ) + *((unsigned int *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_FLOAT: + { + float v = 0; + if( m_Ptr!=NULL ) + v = *((float *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + v += _Step*m_Val.m_Float32.m_Step; + if( vm_Val.m_Float32.m_Max ) + v = m_Val.m_Float32.m_Max; + if( m_Ptr!=NULL ) + *((float *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + case TW_TYPE_DOUBLE: + { + double v = 0; + if( m_Ptr!=NULL ) + v = *((double *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + v += _Step*m_Val.m_Float64.m_Step; + if( vm_Val.m_Float64.m_Max ) + v = m_Val.m_Float64.m_Max; + if( m_Ptr!=NULL ) + *((double *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + break; + /* + case TW_TYPE_ENUM8: + { + assert(_Step==1 || _Step==-1); + unsigned char v = 0; + if( m_Ptr!=NULL ) + v = *((unsigned char *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + if( m_Val.m_Enum.m_Entries!=NULL ) + { + UVal::CEnumVal::CEntries::iterator It = m_Val.m_Enum.m_Entries->find(v); + if( It==m_Val.m_Enum.m_Entries->end() ) + It = m_Val.m_Enum.m_Entries->begin(); + else if( _Step==1 ) + { + ++It; + if( It==m_Val.m_Enum.m_Entries->end() ) + It = m_Val.m_Enum.m_Entries->begin(); + } + else if( _Step==-1 ) + { + if( It==m_Val.m_Enum.m_Entries->begin() ) + It = m_Val.m_Enum.m_Entries->end(); + if( It!=m_Val.m_Enum.m_Entries->begin() ) + --It; + } + if( It != m_Val.m_Enum.m_Entries->end() ) + { + v = (unsigned char)(It->first); + if( m_Ptr!=NULL ) + *((unsigned char *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + } + } + break; + case TW_TYPE_ENUM16: + { + assert(_Step==1 || _Step==-1); + unsigned short v = 0; + if( m_Ptr!=NULL ) + v = *((unsigned short *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + if( m_Val.m_Enum.m_Entries!=NULL ) + { + UVal::CEnumVal::CEntries::iterator It = m_Val.m_Enum.m_Entries->find(v); + if( It==m_Val.m_Enum.m_Entries->end() ) + It = m_Val.m_Enum.m_Entries->begin(); + else if( _Step==1 ) + { + ++It; + if( It==m_Val.m_Enum.m_Entries->end() ) + It = m_Val.m_Enum.m_Entries->begin(); + } + else if( _Step==-1 ) + { + if( It==m_Val.m_Enum.m_Entries->begin() ) + It = m_Val.m_Enum.m_Entries->end(); + if( It!=m_Val.m_Enum.m_Entries->begin() ) + --It; + } + if( It != m_Val.m_Enum.m_Entries->end() ) + { + v = (unsigned short)(It->first); + if( m_Ptr!=NULL ) + *((unsigned short *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + } + } + break; + case TW_TYPE_ENUM32: + { + assert(_Step==1 || _Step==-1); + unsigned int v = 0; + if( m_Ptr!=NULL ) + v = *((unsigned int *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + if( m_Val.m_Enum.m_Entries!=NULL ) + { + UVal::CEnumVal::CEntries::iterator It = m_Val.m_Enum.m_Entries->find(v); + if( It==m_Val.m_Enum.m_Entries->end() ) + It = m_Val.m_Enum.m_Entries->begin(); + else if( _Step==1 ) + { + ++It; + if( It==m_Val.m_Enum.m_Entries->end() ) + It = m_Val.m_Enum.m_Entries->begin(); + } + else if( _Step==-1 ) + { + if( It==m_Val.m_Enum.m_Entries->begin() ) + It = m_Val.m_Enum.m_Entries->end(); + if( It!=m_Val.m_Enum.m_Entries->begin() ) + --It; + } + if( It!=m_Val.m_Enum.m_Entries->end() ) + { + v = (unsigned int)(It->first); + if( m_Ptr!=NULL ) + *((unsigned int *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + } + } + break; + */ + default: + if( m_Type==TW_TYPE_BUTTON ) + { + if( m_Val.m_Button.m_Callback!=NULL ) + { + m_Val.m_Button.m_Callback(m_ClientData); + if( g_TwMgr==NULL ) // Mgr might have been destroyed by the client inside a callback call + return; + } + } + else if( IsEnumType(m_Type) ) + { + assert(_Step==1 || _Step==-1); + unsigned int v = 0; + if( m_Ptr!=NULL ) + v = *((unsigned int *)m_Ptr); + else if( m_GetCallback!=NULL ) + m_GetCallback(&v, m_ClientData); + CTwMgr::CEnum& e = g_TwMgr->m_Enums[m_Type-TW_TYPE_ENUM_BASE]; + CTwMgr::CEnum::CEntries::iterator It = e.m_Entries.find(v); + if( It==e.m_Entries.end() ) + It = e.m_Entries.begin(); + else if( _Step==1 ) + { + ++It; + if( It==e.m_Entries.end() ) + It = e.m_Entries.begin(); + } + else if( _Step==-1 ) + { + if( It==e.m_Entries.begin() ) + It = e.m_Entries.end(); + if( It!=e.m_Entries.begin() ) + --It; + } + if( It!=e.m_Entries.end() ) + { + v = (unsigned int)(It->first); + if( m_Ptr!=NULL ) + *((unsigned int *)m_Ptr) = v; + else if( m_SetCallback!=NULL ) + m_SetCallback(&v, m_ClientData); + } + } + else + fprintf(stderr, "CTwVarAtom::Increment : unknown or unimplemented type\n"); + } +} + +// --------------------------------------------------------------------------- + +void CTwVarAtom::SetDefaults() +{ + switch( m_Type ) + { + case TW_TYPE_BOOL8: + case TW_TYPE_BOOL16: + case TW_TYPE_BOOL32: + case TW_TYPE_BOOLCPP: + m_NoSlider = true; + break; + case TW_TYPE_CHAR: + m_Val.m_Char.m_Max = 0xff; + m_Val.m_Char.m_Min = 0; + m_Val.m_Char.m_Step = 1; + m_Val.m_Char.m_Precision = -1; + m_Val.m_Char.m_Hexa = false; + break; + case TW_TYPE_INT8: + m_Val.m_Int8.m_Max = 0x7f; + m_Val.m_Int8.m_Min = -m_Val.m_Int8.m_Max-1; + m_Val.m_Int8.m_Step = 1; + m_Val.m_Int8.m_Precision = -1; + m_Val.m_Int8.m_Hexa = false; + break; + case TW_TYPE_UINT8: + m_Val.m_UInt8.m_Max = 0xff; + m_Val.m_UInt8.m_Min = 0; + m_Val.m_UInt8.m_Step = 1; + m_Val.m_UInt8.m_Precision = -1; + m_Val.m_UInt8.m_Hexa = false; + break; + case TW_TYPE_INT16: + m_Val.m_Int16.m_Max = 0x7fff; + m_Val.m_Int16.m_Min = -m_Val.m_Int16.m_Max-1; + m_Val.m_Int16.m_Step = 1; + m_Val.m_Int16.m_Precision = -1; + m_Val.m_Int16.m_Hexa = false; + break; + case TW_TYPE_UINT16: + m_Val.m_UInt16.m_Max = 0xffff; + m_Val.m_UInt16.m_Min = 0; + m_Val.m_UInt16.m_Step = 1; + m_Val.m_UInt16.m_Precision = -1; + m_Val.m_UInt16.m_Hexa = false; + break; + case TW_TYPE_INT32: + m_Val.m_Int32.m_Max = 0x7fffffff; + m_Val.m_Int32.m_Min = -m_Val.m_Int32.m_Max-1; + m_Val.m_Int32.m_Step = 1; + m_Val.m_Int32.m_Precision = -1; + m_Val.m_Int32.m_Hexa = false; + break; + case TW_TYPE_UINT32: + m_Val.m_UInt32.m_Max = 0xffffffff; + m_Val.m_UInt32.m_Min = 0; + m_Val.m_UInt32.m_Step = 1; + m_Val.m_UInt32.m_Precision = -1; + m_Val.m_UInt32.m_Hexa = false; + break; + case TW_TYPE_FLOAT: + m_Val.m_Float32.m_Max = FLOAT_MAX; + m_Val.m_Float32.m_Min = -FLOAT_MAX; + m_Val.m_Float32.m_Step = 1; + m_Val.m_Float32.m_Precision = -1; + m_Val.m_Float32.m_Hexa = false; + break; + case TW_TYPE_DOUBLE: + m_Val.m_Float64.m_Max = DOUBLE_MAX; + m_Val.m_Float64.m_Min = -DOUBLE_MAX; + m_Val.m_Float64.m_Step = 1; + m_Val.m_Float64.m_Precision = -1; + m_Val.m_Float64.m_Hexa = false; + break; + case TW_TYPE_CDSTRING: + case TW_TYPE_STDSTRING: + m_NoSlider = true; + break; + /* + case TW_TYPE_ENUM8: + case TW_TYPE_ENUM16: + case TW_TYPE_ENUM32: + m_NoSlider = true; + break; + */ + default: + {} // nothing + } + + // special types + if( m_Type==TW_TYPE_BUTTON + || IsEnumType(m_Type) // (m_Type>=TW_TYPE_ENUM_BASE && m_Typem_Enums.size()) + || IsCSStringType(m_Type) // (m_Type>=TW_TYPE_CSSTRING_BASE && m_Type<=TW_TYPE_CSSTRING_MAX) + || m_Type==TW_TYPE_CDSTDSTRING + || IsCustom() ) // (m_Type>=TW_TYPE_CUSTOM_BASE && m_Typem_Customs.size()) ) + m_NoSlider = true; +} + +// --------------------------------------------------------------------------- + +/* +int CTwVarAtom::DefineEnum(const TwEnumVal *_EnumValues, unsigned int _NbValues) +{ + assert(_EnumValues!=NULL); + if( m_Type!=TW_TYPE_ENUM8 && m_Type!=TW_TYPE_ENUM16 && m_Type!=TW_TYPE_ENUM32 ) + { + g_TwMgr->SetLastError(g_ErrNotEnum); + return 0; + } + if( m_Val.m_Enum.m_Entries==NULL ) + m_Val.m_Enum.m_Entries = new UVal::CEnumVal::CEntries; + for(unsigned int i=0; i<_NbValues; ++i) + { + UVal::CEnumVal::CEntries::value_type Entry(_EnumValues[i].Value, (_EnumValues[i].Label!=NULL)?_EnumValues[i].Label:""); + pair Result = m_Val.m_Enum.m_Entries->insert(Entry); + if( !Result.second ) + (Result.first)->second = Entry.second; + } + return 1; +} +*/ + +// --------------------------------------------------------------------------- + +enum EVarGroupAttribs +{ + VG_OPEN = V_ENDTAG+1, // for backward compatibility + VG_CLOSE, // for backward compatibility + VG_OPENED, + VG_TYPEID, // used internally for structs + VG_VALPTR, // used internally for structs + VG_ALPHA, // for backward compatibility + VG_NOALPHA, // for backward compatibility + VG_COLORALPHA, // tw_type_color* only + VG_HLS, // for backward compatibility + VG_RGB, // for backward compatibility + VG_COLORMODE, // tw_type_color* only + VG_COLORORDER, // tw_type_color* only + VG_ARROW, // tw_type_quat* only + VG_ARROWCOLOR, // tw_type_quat* only + VG_AXISX, // tw_type_quat* only + VG_AXISY, // tw_type_quat* only + VG_AXISZ, // tw_type_quat* only + VG_SHOWVAL // tw_type_quat* only +}; + +int CTwVarGroup::HasAttrib(const char *_Attrib, bool *_HasValue) const +{ + *_HasValue = false; + if( _stricmp(_Attrib, "open")==0 ) // for backward compatibility + return VG_OPEN; + else if( _stricmp(_Attrib, "close")==0 ) // for backward compatibility + return VG_CLOSE; + else if( _stricmp(_Attrib, "opened")==0 ) + { + *_HasValue = true; + return VG_OPENED; + } + else if( _stricmp(_Attrib, "typeid")==0 ) + { + *_HasValue = true; + return VG_TYPEID; + } + else if( _stricmp(_Attrib, "valptr")==0 ) + { + *_HasValue = true; + return VG_VALPTR; + } + else if( _stricmp(_Attrib, "alpha")==0 ) // for backward compatibility + return VG_ALPHA; + else if( _stricmp(_Attrib, "noalpha")==0 ) // for backward compatibility + return VG_NOALPHA; + else if( _stricmp(_Attrib, "coloralpha")==0 ) + { + *_HasValue = true; + return VG_COLORALPHA; + } + else if( _stricmp(_Attrib, "hls")==0 ) // for backward compatibility + return VG_HLS; + else if( _stricmp(_Attrib, "rgb")==0 ) // for backward compatibility + return VG_RGB; + else if( _stricmp(_Attrib, "colormode")==0 ) + { + *_HasValue = true; + return VG_COLORMODE; + } + else if( _stricmp(_Attrib, "colororder")==0 ) + { + *_HasValue = true; + return VG_COLORORDER; + } + else if( _stricmp(_Attrib, "arrow")==0 ) + { + *_HasValue = true; + return VG_ARROW; + } + else if( _stricmp(_Attrib, "arrowcolor")==0 ) + { + *_HasValue = true; + return VG_ARROWCOLOR; + } + else if( _stricmp(_Attrib, "axisx")==0 ) + { + *_HasValue = true; + return VG_AXISX; + } + else if( _stricmp(_Attrib, "axisy")==0 ) + { + *_HasValue = true; + return VG_AXISY; + } + else if( _stricmp(_Attrib, "axisz")==0 ) + { + *_HasValue = true; + return VG_AXISZ; + } + else if( _stricmp(_Attrib, "showval")==0 ) + { + *_HasValue = true; + return VG_SHOWVAL; + } + + return CTwVar::HasAttrib(_Attrib, _HasValue); +} + +int CTwVarGroup::SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex) +{ + switch( _AttribID ) + { + case VG_OPEN: // for backward compatibility + if( !m_Open ) + { + m_Open = true; + _Bar->NotUpToDate(); + } + return 1; + case VG_CLOSE: // for backward compatibility + if( m_Open ) + { + m_Open = false; + _Bar->NotUpToDate(); + } + return 1; + case VG_OPENED: + if( _Value!=NULL && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "true")==0 || _stricmp(_Value, "1")==0 ) + { + if( !m_Open ) + { + m_Open = true; + _Bar->NotUpToDate(); + } + return 1; + } + else if( _stricmp(_Value, "false")==0 || _stricmp(_Value, "0")==0 ) + { + if( m_Open ) + { + m_Open = false; + _Bar->NotUpToDate(); + } + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case VG_TYPEID: + { + int type = TW_TYPE_UNDEF; + if( _Value!=NULL && sscanf(_Value, "%d", &type)==1 ) + { + int idx = type - TW_TYPE_STRUCT_BASE; + if( idx>=0 && idx<(int)g_TwMgr->m_Structs.size() ) + { + m_SummaryCallback = g_TwMgr->m_Structs[idx].m_SummaryCallback; + m_SummaryClientData = g_TwMgr->m_Structs[idx].m_SummaryClientData; + m_StructType = (TwType)type; + return 1; + } + } + return 0; + } + case VG_VALPTR: + { + void *structValuePtr = NULL; + if( _Value!=NULL && sscanf(_Value, "%p", &structValuePtr)==1 ) + { + m_StructValuePtr = structValuePtr; + m_ColorPtr = &(_Bar->m_ColStructText); + return 1; + } + return 0; + } + case VG_ALPHA: // for backward compatibility + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + if( static_cast(m_StructValuePtr)->m_CanHaveAlpha ) + { + static_cast(m_StructValuePtr)->m_HasAlpha = true; + _Bar->NotUpToDate(); + return 1; + } + return 0; + case VG_NOALPHA: // for backward compatibility + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + { + static_cast(m_StructValuePtr)->m_HasAlpha = false; + _Bar->NotUpToDate(); + return 1; + } + else + return 0; + case VG_COLORALPHA: + if( _Value!=NULL && strlen(_Value)>0 ) + { + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + { + if( _stricmp(_Value, "true")==0 || _stricmp(_Value, "1")==0 ) + { + if( static_cast(m_StructValuePtr)->m_CanHaveAlpha ) + { + if( !static_cast(m_StructValuePtr)->m_HasAlpha ) + { + static_cast(m_StructValuePtr)->m_HasAlpha = true; + _Bar->NotUpToDate(); + } + return 1; + } + } + else if( _stricmp(_Value, "false")==0 || _stricmp(_Value, "0")==0 ) + { + if( static_cast(m_StructValuePtr)->m_HasAlpha ) + { + static_cast(m_StructValuePtr)->m_HasAlpha = false; + _Bar->NotUpToDate(); + } + return 1; + } + } + } + return 0; + case VG_HLS: // for backward compatibility + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + { + static_cast(m_StructValuePtr)->m_HLS = true; + _Bar->NotUpToDate(); + return 1; + } + else + return 0; + case VG_RGB: // for backward compatibility + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + { + static_cast(m_StructValuePtr)->m_HLS = false; + _Bar->NotUpToDate(); + return 1; + } + else + return 0; + case VG_COLORMODE: + if( _Value!=NULL && strlen(_Value)>0 ) + { + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + { + if( _stricmp(_Value, "hls")==0 ) + { + if( !static_cast(m_StructValuePtr)->m_HLS ) + { + static_cast(m_StructValuePtr)->m_HLS = true; + _Bar->NotUpToDate(); + } + return 1; + } + else if( _stricmp(_Value, "rgb")==0 ) + { + if( static_cast(m_StructValuePtr)->m_HLS ) + { + static_cast(m_StructValuePtr)->m_HLS = false; + _Bar->NotUpToDate(); + } + return 1; + } + } + } + return 0; + case VG_COLORORDER: + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + { + if( _Value!=NULL ) + { + if( _stricmp(_Value, "rgba")==0 ) + static_cast(m_StructValuePtr)->m_OGL = true; + else if( _stricmp(_Value, "argb")==0 ) + static_cast(m_StructValuePtr)->m_OGL = false; + else + return 0; + return 1; + } + return 0; + } + else + return 0; + case VG_ARROW: + if( m_SummaryCallback==CQuaternionExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_quat? + { + if( _Value!=NULL ) + { + double *dir = static_cast(m_StructValuePtr)->m_Dir; + double x, y, z; + if( sscanf(_Value, "%lf %lf %lf", &x, &y, &z)==3 ) + { + dir[0] = x; + dir[1] = y; + dir[2] = z; + } + else if( _stricmp(_Value, "off")==0 || _stricmp(_Value, "0")==0 ) + dir[0] = dir[1] = dir[2] = 0; + else + return 0; + return 1; + } + return 0; + } + else + return 0; + case VG_ARROWCOLOR: + if( m_SummaryCallback==CQuaternionExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_quat? + { + if( _Value!=NULL ) + { + int r, g, b; + if( sscanf(_Value, "%d %d %d", &r, &g, &b)==3 ) + static_cast(m_StructValuePtr)->m_DirColor = Color32FromARGBi(255, r, g, b); + else + return 0; + return 1; + } + return 0; + } + else + return 0; + case VG_AXISX: + case VG_AXISY: + case VG_AXISZ: + if( m_SummaryCallback==CQuaternionExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_quat? + { + if( _Value!=NULL ) + { + float x = 0, y = 0, z = 0; + if( _stricmp(_Value, "x")==0 || _stricmp(_Value, "+x")==0 ) + x = 1; + else if( _stricmp(_Value, "-x")==0 ) + x = -1; + else if( _stricmp(_Value, "y")==0 || _stricmp(_Value, "+y")==0 ) + y = 1; + else if( _stricmp(_Value, "-y")==0 ) + y = -1; + else if( _stricmp(_Value, "z")==0 || _stricmp(_Value, "+z")==0 ) + z = 1; + else if( _stricmp(_Value, "-z")==0 ) + z = -1; + else + return 0; + int i = (_AttribID==VG_AXISX) ? 0 : ((_AttribID==VG_AXISY) ? 1 : 2); + static_cast(m_StructValuePtr)->m_Permute[i][0] = x; + static_cast(m_StructValuePtr)->m_Permute[i][1] = y; + static_cast(m_StructValuePtr)->m_Permute[i][2] = z; + return 1; + } + return 0; + } + else + return 0; + case VG_SHOWVAL: + if( m_SummaryCallback==CQuaternionExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_quat? + { + if( _Value!=NULL ) + { + if( _stricmp(_Value, "true")==0 || _stricmp(_Value, "on")==0 || _stricmp(_Value, "1")==0 ) + { + static_cast(m_StructValuePtr)->m_ShowVal = true; + _Bar->NotUpToDate(); + return 1; + } + else if( _stricmp(_Value, "false")==0 || _stricmp(_Value, "off")==0 || _stricmp(_Value, "0")==0 ) + { + static_cast(m_StructValuePtr)->m_ShowVal = false; + _Bar->NotUpToDate(); + return 1; + } + } + return 0; + } + else + return 0; + default: + return CTwVar::SetAttrib(_AttribID, _Value, _Bar, _VarParent, _VarIndex); + } +} + +ERetType CTwVarGroup::GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector& outDoubles, std::ostringstream& outString) const +{ + outDoubles.clear(); + outString.clear(); + + switch( _AttribID ) + { + case VG_OPENED: + outDoubles.push_back( m_Open ); + return RET_DOUBLE; + case VG_COLORALPHA: + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + { + outDoubles.push_back( static_cast(m_StructValuePtr)->m_HasAlpha ); + return RET_DOUBLE; + } + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + case VG_COLORMODE: + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + { + if( static_cast(m_StructValuePtr)->m_HLS ) + outString << "hls"; + else + outString << "rgb"; + return RET_STRING; + } + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + case VG_COLORORDER: + if( m_SummaryCallback==CColorExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_color? + { + if( static_cast(m_StructValuePtr)->m_OGL ) + outString << "rgba"; + else + outString << "argb"; + return RET_STRING; + } + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + case VG_ARROW: + if( m_SummaryCallback==CQuaternionExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_quat? + { + double *dir = static_cast(m_StructValuePtr)->m_Dir; + outDoubles.push_back(dir[0]); + outDoubles.push_back(dir[1]); + outDoubles.push_back(dir[2]); + return RET_DOUBLE; + } + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + case VG_ARROWCOLOR: + if( m_SummaryCallback==CQuaternionExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_quat? + { + int a, r, g, b; + a = r = g = b = 0; + Color32ToARGBi(static_cast(m_StructValuePtr)->m_DirColor, &a, &r, &g, &b); + outDoubles.push_back(r); + outDoubles.push_back(g); + outDoubles.push_back(b); + return RET_DOUBLE; + } + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + case VG_AXISX: + case VG_AXISY: + case VG_AXISZ: + if( m_SummaryCallback==CQuaternionExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_quat? + { + int i = (_AttribID==VG_AXISX) ? 0 : ((_AttribID==VG_AXISY) ? 1 : 2); + float x = static_cast(m_StructValuePtr)->m_Permute[i][0]; + float y = static_cast(m_StructValuePtr)->m_Permute[i][1]; + float z = static_cast(m_StructValuePtr)->m_Permute[i][2]; + if( x>0 ) + outString << "+x"; + else if( x<0 ) + outString << "-x"; + else if( y>0 ) + outString << "+y"; + else if( y<0 ) + outString << "-y"; + else if( z>0 ) + outString << "+z"; + else if( z<0 ) + outString << "-z"; + else + outString << "0"; // should not happened + return RET_DOUBLE; + } + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + case VG_SHOWVAL: + if( m_SummaryCallback==CQuaternionExt::SummaryCB && m_StructValuePtr!=NULL ) // is tw_type_quat? + { + outDoubles.push_back( static_cast(m_StructValuePtr)->m_ShowVal ); + return RET_DOUBLE; + } + g_TwMgr->SetLastError(g_ErrInvalidAttrib); + return RET_ERROR; + default: + return CTwVar::GetAttrib(_AttribID, _Bar, _VarParent, _VarIndex, outDoubles, outString); + } +} + +// --------------------------------------------------------------------------- + +const CTwVar *CTwVarGroup::Find(const char *_Name, CTwVarGroup **_Parent, int *_Index) const +{ + if( strcmp(_Name, m_Name.c_str())==0 ) + { + if( _Parent!=NULL ) + *_Parent = NULL; + if( _Index!=NULL ) + *_Index = -1; + return this; + } + else + { + const CTwVar *v; + for( size_t i=0; iFind(_Name, _Parent, _Index); + if( v!=NULL ) + { + if( _Parent!=NULL && *_Parent==NULL ) + { + *_Parent = const_cast(this); + if( _Index!=NULL ) + *_Index = (int)i; + } + return v; + } + } + return NULL; + } +} + +// --------------------------------------------------------------------------- + +size_t CTwVar::GetDataSize(TwType _Type) +{ + switch( _Type ) + { + case TW_TYPE_BOOLCPP: + return sizeof(bool); + case TW_TYPE_BOOL8: + case TW_TYPE_CHAR: + case TW_TYPE_INT8: + case TW_TYPE_UINT8: + //case TW_TYPE_ENUM8: + return 1; + case TW_TYPE_BOOL16: + case TW_TYPE_INT16: + case TW_TYPE_UINT16: + //case TW_TYPE_ENUM16: + return 2; + case TW_TYPE_BOOL32: + case TW_TYPE_INT32: + case TW_TYPE_UINT32: + case TW_TYPE_FLOAT: + //case TW_TYPE_ENUM32: + return 4; + case TW_TYPE_DOUBLE: + return 8; + case TW_TYPE_CDSTRING: + return sizeof(char *); + case TW_TYPE_STDSTRING: + return (g_TwMgr!=0) ? g_TwMgr->m_ClientStdStringStructSize : sizeof(std::string); + default: + if( g_TwMgr && _Type>=TW_TYPE_STRUCT_BASE && _Typem_Structs.size() ) + { + const CTwMgr::CStruct& s = g_TwMgr->m_Structs[_Type-TW_TYPE_STRUCT_BASE]; + return s.m_Size; + /* + size_t size = 0; + for( size_t i=0; im_ClientStdStringStructSize : sizeof(std::string); + else // includes TW_TYPE_BUTTON + return 0; + } +} + +// --------------------------------------------------------------------------- + +CTwBar::CTwBar(const char *_Name) +{ + assert(g_TwMgr!=NULL && g_TwMgr->m_Graph!=NULL); + + m_Name = _Name; + m_Visible = true; + m_VarRoot.m_IsRoot = true; + m_VarRoot.m_Open = true; + m_VarRoot.m_SummaryCallback = NULL; + m_VarRoot.m_SummaryClientData = NULL; + m_VarRoot.m_StructValuePtr = NULL; + + m_UpToDate = false; + int n = (int)g_TwMgr->m_Bars.size(); + m_PosX = 24*n-8; + m_PosY = 24*n-8; + m_Width = 200; + m_Height = 320; + int cr, cg, cb; + if( g_TwMgr->m_UseOldColorScheme ) + { + ColorHLSToRGBi(g_TwMgr->m_BarInitColorHue%256, 180, 200, &cr, &cg, &cb); + m_Color = Color32FromARGBi(0xf0, cr, cg, cb); + m_DarkText = true; + } + else + { + ColorHLSToRGBi(g_TwMgr->m_BarInitColorHue%256, 80, 200, &cr, &cg, &cb); + m_Color = Color32FromARGBi(64, cr, cg, cb); + m_DarkText = false; + } + g_TwMgr->m_BarInitColorHue -= 16; + if( g_TwMgr->m_BarInitColorHue<0 ) + g_TwMgr->m_BarInitColorHue += 256; + m_Font = g_TwMgr->m_CurrentFont; + //m_Font = g_DefaultNormalFont; + //m_Font = g_DefaultSmallFont; + //m_Font = g_DefaultLargeFont; + m_TitleWidth = 0; + m_Sep = 1; + m_ValuesWidth = 10*(m_Font->m_CharHeight/2); // about 10 characters + m_NbHierLines = 0; + m_NbDisplayedLines = 0; + m_FirstLine = 0; + m_LastUpdateTime = 0; + m_UpdatePeriod = 2; + m_ScrollYW = 0; + m_ScrollYH = 0; + m_ScrollY0 = 0; + m_ScrollY1 = 0; + + m_DrawHandles = false; + m_DrawIncrDecrBtn = false; + m_DrawRotoBtn = false; + m_DrawClickBtn = false; + m_DrawListBtn = false; + m_DrawBoolBtn = false; + m_MouseDrag = false; + m_MouseDragVar = false; + m_MouseDragTitle = false; + m_MouseDragScroll = false; + m_MouseDragResizeUR = false; + m_MouseDragResizeUL = false; + m_MouseDragResizeLR = false; + m_MouseDragResizeLL = false; + m_MouseDragValWidth = false; + m_MouseOriginX = 0; + m_MouseOriginY = 0; + m_ValuesWidthRatio = 0; + m_VarHasBeenIncr = true; + m_FirstLine0 = 0; + m_HighlightedLine = -1; + m_HighlightedLinePrev = -1; + m_HighlightedLineLastValid = -1; + m_HighlightIncrBtn = false; + m_HighlightDecrBtn = false; + m_HighlightRotoBtn = false; + m_HighlightClickBtn = false; + m_HighlightClickBtnAuto = 0; + m_HighlightListBtn = false; + m_HighlightBoolBtn = false; + m_HighlightTitle = false; + m_HighlightScroll = false; + m_HighlightUpScroll = false; + m_HighlightDnScroll = false; + m_HighlightMinimize = false; + m_HighlightFont = false; + m_HighlightValWidth = false; + m_HighlightLabelsHeader = false; + m_HighlightValuesHeader = false; + m_ButtonAlign = g_TwMgr->m_ButtonAlign; + + m_IsMinimized = false; + m_MinNumber = 0; + m_MinPosX = 0; + m_MinPosY = 0; + m_HighlightMaximize = false; + m_IsHelpBar = false; + m_IsPopupList = false; + m_VarEnumLinkedToPopupList = NULL; + m_BarLinkedToPopupList = NULL; + + m_Resizable = true; + m_Movable = true; + m_Iconifiable = true; + m_Contained = g_TwMgr->m_Contained; + + m_TitleTextObj = g_TwMgr->m_Graph->NewTextObj(); + m_LabelsTextObj = g_TwMgr->m_Graph->NewTextObj(); + m_ValuesTextObj = g_TwMgr->m_Graph->NewTextObj(); + m_ShortcutTextObj = g_TwMgr->m_Graph->NewTextObj(); + m_HeadersTextObj = g_TwMgr->m_Graph->NewTextObj(); + m_ShortcutLine = -1; + + m_RotoMinRadius = 24; + m_RotoNbSubdiv = 256; // number of steps for one turn + + m_CustomActiveStructProxy = NULL; + + UpdateColors(); + NotUpToDate(); +} + +// --------------------------------------------------------------------------- + +CTwBar::~CTwBar() +{ + if( m_IsMinimized ) + g_TwMgr->Maximize(this); + if( m_TitleTextObj ) + g_TwMgr->m_Graph->DeleteTextObj(m_TitleTextObj); + if( m_LabelsTextObj ) + g_TwMgr->m_Graph->DeleteTextObj(m_LabelsTextObj); + if( m_ValuesTextObj ) + g_TwMgr->m_Graph->DeleteTextObj(m_ValuesTextObj); + if( m_ShortcutTextObj ) + g_TwMgr->m_Graph->DeleteTextObj(m_ShortcutTextObj); + if( m_HeadersTextObj ) + g_TwMgr->m_Graph->DeleteTextObj(m_HeadersTextObj); +} + +// --------------------------------------------------------------------------- + +const CTwVar *CTwBar::Find(const char *_Name, CTwVarGroup **_Parent, int *_Index) const +{ + return m_VarRoot.Find(_Name, _Parent, _Index); +} + +CTwVar *CTwBar::Find(const char *_Name, CTwVarGroup **_Parent, int *_Index) +{ + return const_cast(const_cast(this)->Find(_Name, _Parent, _Index)); +} + +// --------------------------------------------------------------------------- + +enum EBarAttribs +{ + BAR_LABEL = 1, + BAR_HELP, + BAR_COLOR, + BAR_ALPHA, + BAR_TEXT, + BAR_SHOW, // deprecated, used BAR_VISIBLE instead + BAR_HIDE, // deprecated, used BAR_VISIBLE instead + BAR_ICONIFY, // deprecated, used BAR_ICONIFIED instead + BAR_VISIBLE, + BAR_ICONIFIED, + BAR_SIZE, + BAR_POSITION, + BAR_REFRESH, + BAR_FONT_SIZE, + BAR_VALUES_WIDTH, + BAR_ICON_POS, + BAR_ICON_ALIGN, + BAR_ICON_MARGIN, + BAR_RESIZABLE, + BAR_MOVABLE, + BAR_ICONIFIABLE, + BAR_FONT_RESIZABLE, + BAR_ALWAYS_TOP, + BAR_ALWAYS_BOTTOM, + BAR_COLOR_SCHEME, + BAR_CONTAINED, + BAR_BUTTON_ALIGN +}; + +int CTwBar::HasAttrib(const char *_Attrib, bool *_HasValue) const +{ + *_HasValue = true; + if( _stricmp(_Attrib, "label")==0 ) + return BAR_LABEL; + else if( _stricmp(_Attrib, "help")==0 ) + return BAR_HELP; + else if( _stricmp(_Attrib, "color")==0 ) + return BAR_COLOR; + else if( _stricmp(_Attrib, "alpha")==0 ) + return BAR_ALPHA; + else if( _stricmp(_Attrib, "text")==0 ) + return BAR_TEXT; + else if( _stricmp(_Attrib, "size")==0 ) + return BAR_SIZE; + else if( _stricmp(_Attrib, "position")==0 ) + return BAR_POSITION; + else if( _stricmp(_Attrib, "refresh")==0 ) + return BAR_REFRESH; + else if( _stricmp(_Attrib, "fontsize")==0 ) + return BAR_FONT_SIZE; + else if( _stricmp(_Attrib, "valueswidth")==0 ) + return BAR_VALUES_WIDTH; + else if( _stricmp(_Attrib, "iconpos")==0 ) + return BAR_ICON_POS; + else if( _stricmp(_Attrib, "iconalign")==0 ) + return BAR_ICON_ALIGN; + else if( _stricmp(_Attrib, "iconmargin")==0 ) + return BAR_ICON_MARGIN; + else if( _stricmp(_Attrib, "resizable")==0 ) + return BAR_RESIZABLE; + else if( _stricmp(_Attrib, "movable")==0 ) + return BAR_MOVABLE; + else if( _stricmp(_Attrib, "iconifiable")==0 ) + return BAR_ICONIFIABLE; + else if( _stricmp(_Attrib, "fontresizable")==0 ) + return BAR_FONT_RESIZABLE; + else if( _stricmp(_Attrib, "alwaystop")==0 ) + return BAR_ALWAYS_TOP; + else if( _stricmp(_Attrib, "alwaysbottom")==0 ) + return BAR_ALWAYS_BOTTOM; + else if( _stricmp(_Attrib, "visible")==0 ) + return BAR_VISIBLE; + else if( _stricmp(_Attrib, "iconified")==0 ) + return BAR_ICONIFIED; + else if( _stricmp(_Attrib, "colorscheme")==0 ) + return BAR_COLOR_SCHEME; + else if( _stricmp(_Attrib, "contained")==0 ) + return BAR_CONTAINED; + else if( _stricmp(_Attrib, "buttonalign")==0 ) + return BAR_BUTTON_ALIGN; + + *_HasValue = false; + if( _stricmp(_Attrib, "show")==0 ) // for backward compatibility + return BAR_SHOW; + else if( _stricmp(_Attrib, "hide")==0 ) // for backward compatibility + return BAR_HIDE; + else if( _stricmp(_Attrib, "iconify")==0 ) // for backward compatibility + return BAR_ICONIFY; + + return 0; // not found +} + +int CTwBar::SetAttrib(int _AttribID, const char *_Value) +{ + switch( _AttribID ) + { + case BAR_LABEL: + if( _Value && strlen(_Value)>0 ) + { + m_Label = _Value; + NotUpToDate(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_HELP: + if( _Value && strlen(_Value)>0 ) + { + m_Help = _Value; + NotUpToDate(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_COLOR: + if( _Value && strlen(_Value)>0 ) + { + int v0, v1, v2, v3; + int n = sscanf(_Value, "%d%d%d%d", &v0, &v1, &v2, &v3); + color32 c; + int alpha = (m_Color>>24) & 0xff; + if( n==3 && v0>=0 && v0<=255 && v1>=0 && v1<=255 && v2>=0 && v2<=255 ) + c = Color32FromARGBi(alpha, v0, v1, v2); + else if( n==4 && v0>=0 && v0<=255 && v1>=0 && v1<=255 && v2>=0 && v2<=255 && v3>=0 && v3<=255 ) + c = Color32FromARGBi(v0, v1, v2, v3); + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + m_Color = c; + NotUpToDate(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_ALPHA: + if( _Value && strlen(_Value)>0 ) + { + int alpha = 255; + int n = sscanf(_Value, "%d", &alpha); + if( n==1 && alpha>=0 && alpha<=255 ) + m_Color = (alpha<<24) | (m_Color & 0xffffff); + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + NotUpToDate(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_TEXT: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "dark")==0 ) + m_DarkText = true; + else if( _stricmp(_Value, "light")==0 ) + m_DarkText = false; + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + NotUpToDate(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_SIZE: + if( _Value && strlen(_Value)>0 ) + { + int sx, sy; + int n = sscanf(_Value, "%d%d", &sx, &sy); + if( n==2 && sx>0 && sy>0 ) + { + m_Width = sx; + m_Height = sy; + NotUpToDate(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_POSITION: + if( _Value && strlen(_Value)>0 ) + { + int x, y; + int n = sscanf(_Value, "%d%d", &x, &y); + if( n==2 && x>=0 && y>=0 ) + { + m_PosX = x; + m_PosY = y; + NotUpToDate(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_REFRESH: + if( _Value && strlen(_Value)>0 ) + { + float r; + int n = sscanf(_Value, "%f", &r); + if( n==1 && r>=0 ) + { + m_UpdatePeriod = r; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_VALUES_WIDTH: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "fit")==0 ) + { + m_ValuesWidth = VALUES_WIDTH_FIT; + NotUpToDate(); + return 1; + } + else + { + int w; + int n = sscanf(_Value, "%d", &w); + if( n==1 && w>0 ) + { + m_ValuesWidth = w; + NotUpToDate(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_FONT_SIZE: + return g_TwMgr->SetAttrib(MGR_FONT_SIZE, _Value); + case BAR_ICON_POS: + return g_TwMgr->SetAttrib(MGR_ICON_POS, _Value); + case BAR_ICON_ALIGN: + return g_TwMgr->SetAttrib(MGR_ICON_ALIGN, _Value); + case BAR_ICON_MARGIN: + return g_TwMgr->SetAttrib(MGR_ICON_MARGIN, _Value); + case BAR_SHOW: // deprecated + TwSetBarState(this, TW_STATE_SHOWN); + return 1; + case BAR_HIDE: // deprecated + TwSetBarState(this, TW_STATE_HIDDEN); + return 1; + case BAR_ICONIFY: // deprecated + TwSetBarState(this, TW_STATE_ICONIFIED); + return 1; + case BAR_RESIZABLE: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + m_Resizable = true; + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + m_Resizable = false; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_MOVABLE: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + m_Movable = true; + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + m_Movable = false; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_ICONIFIABLE: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + m_Iconifiable = true; + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + m_Iconifiable = false; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_FONT_RESIZABLE: + return g_TwMgr->SetAttrib(MGR_FONT_RESIZABLE, _Value); + case BAR_ALWAYS_TOP: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + g_TwMgr->m_BarAlwaysOnTop = m_Name; + if( g_TwMgr->m_BarAlwaysOnBottom.length()>0 && strcmp(g_TwMgr->m_BarAlwaysOnBottom.c_str(), m_Name.c_str())==0 ) + g_TwMgr->m_BarAlwaysOnBottom.clear(); + TwSetTopBar(this); + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + if( g_TwMgr->m_BarAlwaysOnTop.length()>0 && strcmp(g_TwMgr->m_BarAlwaysOnTop.c_str(), m_Name.c_str())==0 ) + g_TwMgr->m_BarAlwaysOnTop.clear(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_ALWAYS_BOTTOM: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + g_TwMgr->m_BarAlwaysOnBottom = m_Name; + if( g_TwMgr->m_BarAlwaysOnTop.length()>0 && strcmp(g_TwMgr->m_BarAlwaysOnTop.c_str(), m_Name.c_str())==0 ) + g_TwMgr->m_BarAlwaysOnTop.clear(); + TwSetBottomBar(this); + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + if( g_TwMgr->m_BarAlwaysOnBottom.length()>0 && strcmp(g_TwMgr->m_BarAlwaysOnBottom.c_str(), m_Name.c_str())==0 ) + g_TwMgr->m_BarAlwaysOnBottom.clear(); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_VISIBLE: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + TwSetBarState(this, TW_STATE_SHOWN); + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + TwSetBarState(this, TW_STATE_HIDDEN); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_ICONIFIED: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + TwSetBarState(this, TW_STATE_ICONIFIED); + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + TwSetBarState(this, TW_STATE_UNICONIFIED); + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_COLOR_SCHEME: + return g_TwMgr->SetAttrib(MGR_COLOR_SCHEME, _Value); + case BAR_CONTAINED: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + m_Contained = true; + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + m_Contained = false; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case BAR_BUTTON_ALIGN: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "left")==0 ) + { + m_ButtonAlign = BUTTON_ALIGN_LEFT; + return 1; + } + else if( _stricmp(_Value, "center")==0 ) + { + m_ButtonAlign = BUTTON_ALIGN_CENTER; + return 1; + } + if( _stricmp(_Value, "right")==0 ) + { + m_ButtonAlign = BUTTON_ALIGN_RIGHT; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + default: + g_TwMgr->SetLastError(g_ErrUnknownAttrib); + return 0; + } +} + +ERetType CTwBar::GetAttrib(int _AttribID, std::vector& outDoubles, std::ostringstream& outString) const +{ + outDoubles.clear(); + outString.clear(); + + switch( _AttribID ) + { + case BAR_LABEL: + outString << m_Label; + return RET_STRING; + case BAR_HELP: + outString << m_Help; + return RET_STRING; + case BAR_COLOR: + { + int a, r, g, b; + a = r = g = b = 0; + Color32ToARGBi(m_Color, &a, &r, &g, &b); + outDoubles.push_back(r); + outDoubles.push_back(g); + outDoubles.push_back(b); + return RET_DOUBLE; + } + case BAR_ALPHA: + { + int a, r, g, b; + a = r = g = b = 0; + Color32ToARGBi(m_Color, &a, &r, &g, &b); + outDoubles.push_back(a); + return RET_DOUBLE; + } + case BAR_TEXT: + if( m_DarkText ) + outString << "dark"; + else + outString << "light"; + return RET_STRING; + case BAR_SIZE: + outDoubles.push_back(m_Width); + outDoubles.push_back(m_Height); + return RET_DOUBLE; + case BAR_POSITION: + outDoubles.push_back(m_PosX); + outDoubles.push_back(m_PosY); + return RET_DOUBLE; + case BAR_REFRESH: + outDoubles.push_back(m_UpdatePeriod); + return RET_DOUBLE; + case BAR_VALUES_WIDTH: + outDoubles.push_back(m_ValuesWidth); + return RET_DOUBLE; + case BAR_FONT_SIZE: + return g_TwMgr->GetAttrib(MGR_FONT_SIZE, outDoubles, outString); + case BAR_ICON_POS: + return g_TwMgr->GetAttrib(MGR_ICON_POS, outDoubles, outString); + case BAR_ICON_ALIGN: + return g_TwMgr->GetAttrib(MGR_ICON_ALIGN, outDoubles, outString); + case BAR_ICON_MARGIN: + return g_TwMgr->GetAttrib(MGR_ICON_MARGIN, outDoubles, outString); + case BAR_RESIZABLE: + outDoubles.push_back(m_Resizable); + return RET_DOUBLE; + case BAR_MOVABLE: + outDoubles.push_back(m_Movable); + return RET_DOUBLE; + case BAR_ICONIFIABLE: + outDoubles.push_back(m_Iconifiable); + return RET_DOUBLE; + case BAR_FONT_RESIZABLE: + return g_TwMgr->GetAttrib(MGR_FONT_RESIZABLE, outDoubles, outString); + case BAR_ALWAYS_TOP: + outDoubles.push_back( g_TwMgr->m_BarAlwaysOnTop == m_Name ); + return RET_DOUBLE; + case BAR_ALWAYS_BOTTOM: + outDoubles.push_back( g_TwMgr->m_BarAlwaysOnBottom == m_Name ); + return RET_DOUBLE; + case BAR_VISIBLE: + outDoubles.push_back(m_Visible); + return RET_DOUBLE; + case BAR_ICONIFIED: + outDoubles.push_back(m_IsMinimized); + return RET_DOUBLE; + case BAR_COLOR_SCHEME: + return g_TwMgr->GetAttrib(MGR_COLOR_SCHEME, outDoubles, outString); + case BAR_CONTAINED: + outDoubles.push_back(m_Contained); + return RET_DOUBLE; + case BAR_BUTTON_ALIGN: + if( m_ButtonAlign==BUTTON_ALIGN_LEFT ) + outString << "left"; + else if( m_ButtonAlign==BUTTON_ALIGN_CENTER ) + outString << "center"; + else + outString << "right"; + return RET_STRING; + default: + g_TwMgr->SetLastError(g_ErrUnknownAttrib); + return RET_ERROR; + } +} + +// --------------------------------------------------------------------------- + +void CTwBar::NotUpToDate() +{ + m_UpToDate = false; +} + +// --------------------------------------------------------------------------- + +void CTwBar::UpdateColors() +{ + float a, r, g, b, h, l, s; + Color32ToARGBf(m_Color, &a, &r, &g, &b); + ColorRGBToHLSf(r, g, b, &h, &l, &s); + bool lightText = !m_DarkText; + + // Colors independant of m_Color + + // Highlighted line background ramp + m_ColHighBg0 = lightText ? Color32FromARGBf(0.4f, 0.9f, 0.9f, 0.9f) : Color32FromARGBf(0.4f, 1.0f, 1.0f, 1.0f); + m_ColHighBg1 = lightText ? Color32FromARGBf(0.4f, 0.2f, 0.2f, 0.2f) : Color32FromARGBf(0.1f, 0.7f, 0.7f, 0.7f); + + // Text colors & background + m_ColLabelText = lightText ? COLOR32_WHITE : COLOR32_BLACK; + m_ColStructText = lightText ? 0xffefef00 : 0xff303000; + + m_ColValText = lightText ? 0xffc7d7ff : 0xff000080; + m_ColValTextRO = lightText ? 0xffb7b7b7 : 0xff505050; + m_ColValMin = lightText ? 0xff9797ff : 0xff0000f0; + m_ColValMax = m_ColValMin; + m_ColValTextNE = lightText ? 0xff97f797 : 0xff004000; + + m_ColValBg = lightText ? Color32FromARGBf(0.2f+0.3f*a, 0.1f, 0.1f, 0.1f) : Color32FromARGBf(0.2f+0.3f*a, 1, 1, 1); + m_ColStructBg = lightText ? Color32FromARGBf(0.4f*a, 0, 0, 0) : Color32FromARGBf(0.4f*a, 1, 1, 1); + + m_ColLine = lightText ? Color32FromARGBf(0.6f, 1, 1, 1) : Color32FromARGBf(0.6f, 0.3f, 0.3f, 0.3f); + m_ColLineShadow = lightText ? Color32FromARGBf(0.6f, 0, 0, 0) : Color32FromARGBf(0.6f, 0, 0, 0); + m_ColUnderline = lightText ? 0xffd0d0d0 : 0xff202000; + + m_ColGrpBg = lightText ? Color32FromARGBf(0.1f+0.25f*a, 1, 1, 1) : Color32FromARGBf(0.1f+0.05f*a, 0, 0, 0); + m_ColGrpText = lightText ? 0xffffff80 : 0xff000000; + + m_ColShortcutText = lightText ? 0xffffb060 : 0xff802000; + m_ColShortcutBg = lightText ? Color32FromARGBf(0.4f*a, 0.2f, 0.2f, 0.2f) : Color32FromARGBf(0.4f*a, 0.8f, 0.8f, 0.8f); + m_ColInfoText = lightText ? Color32FromARGBf(1.0f, 0.7f, 0.7f, 0.7f) : Color32FromARGBf(1.0f, 0.3f, 0.3f, 0.3f); + + m_ColRoto = lightText ? Color32FromARGBf(0.8f, 0.85f, 0.85f, 0.85f) : Color32FromARGBf(0.8f, 0.1f, 0.1f, 0.1f); + m_ColRotoVal = Color32FromARGBf(1, 1.0f, 0.2f, 0.2f); + m_ColRotoBound = lightText ? Color32FromARGBf(0.8f, 0.6f, 0.6f, 0.6f) : Color32FromARGBf(0.8f, 0.3f, 0.3f, 0.3f); + + m_ColEditText = lightText ? COLOR32_WHITE : COLOR32_BLACK; + m_ColEditBg = lightText ? 0xff575757 : 0xffc7c7c7; // must be opaque + m_ColEditSelText = lightText ? COLOR32_BLACK : COLOR32_WHITE; + m_ColEditSelBg = lightText ? 0xffc7c7c7 : 0xff575757; + + // Colors dependant of m_Colors + + // Bar background + ColorHLSToRGBf(h, l, s, &r, &g, &b); + m_ColBg = Color32FromARGBf(a, r, g, b); + ColorHLSToRGBf(h, l-0.05f, s, &r, &g, &b); + m_ColBg1 = Color32FromARGBf(a, r, g, b); + ColorHLSToRGBf(h, l-0.1f, s, &r, &g, &b); + m_ColBg2 = Color32FromARGBf(a, r, g, b); + + ColorHLSToRGBf(h, l-0.15f, s, &r, &g, &b); + m_ColTitleBg = Color32FromARGBf(a+0.9f, r, g, b); + m_ColTitleText = lightText ? COLOR32_WHITE : COLOR32_BLACK; + m_ColTitleShadow = lightText ? 0x40000000 : 0x00000000; + ColorHLSToRGBf(h, l-0.25f, s, &r, &g, &b); + m_ColTitleHighBg = Color32FromARGBf(a+0.8f, r, g, b); + ColorHLSToRGBf(h, l-0.3f, s, &r, &g, &b); + m_ColTitleUnactiveBg = Color32FromARGBf(a+0.2f, r, g, b); + + ColorHLSToRGBf(h, l-0.2f, s, &r, &g, &b); + m_ColHierBg = Color32FromARGBf(a, r, g, b); + + ColorHLSToRGBf(h, l+0.1f, s, &r, &g, &b); + m_ColBtn = Color32FromARGBf(0.2f+0.4f*a, r, g, b); + ColorHLSToRGBf(h, l-0.35f, s, &r, &g, &b); + m_ColHighBtn = Color32FromARGBf(0.4f+0.4f*a, r, g, b); + ColorHLSToRGBf(h, l-0.25f, s, &r, &g, &b); + m_ColFold = Color32FromARGBf(0.1f+0.4f*a, r, g, b); + ColorHLSToRGBf(h, l-0.35f, s, &r, &g, &b); + m_ColHighFold = Color32FromARGBf(0.3f+0.4f*a, r, g, b); + + ColorHLSToRGBf(h, 0.75f, s, &r, &g, &b); + m_ColHelpBg = Color32FromARGBf(0.2f, 1, 1, 1); + m_ColHelpText = lightText ? Color32FromARGBf(1, 0.2f, 1.0f, 0.2f) : Color32FromARGBf(1, 0, 0.4f, 0); + m_ColSeparator = m_ColValTextRO; + m_ColStaticText = m_ColHelpText; +} + +/* +void CTwBar::UpdateColors() +{ + float a, r, g, b, h, l, s; + Color32ToARGBf(m_Color, &a, &r, &g, &b); + ColorRGBToHLSf(r, g, b, &h, &l, &s); + bool lightText = !m_DarkText; // (l<=0.45f); + l = 0.2f + 0.6f*l; + + ColorHLSToRGBf(h, l, s, &r, &g, &b); + m_ColBg = Color32FromARGBf(a, r, g, b); + ColorHLSToRGBf(h, l-0.1f, s, &r, &g, &b); + m_ColBg1 = Color32FromARGBf(a, r, g, b); + ColorHLSToRGBf(h, l-0.2f, s, &r, &g, &b); + m_ColBg2 = Color32FromARGBf(a, r, g, b); + + ColorHLSToRGBf(h, l+0.1f, s, &r, &g, &b); + m_ColHighBg = Color32FromARGBf(0.4f, r, g, b); + //m_ColHighBg = Color32FromARGBf(a, 0.95f, 0.95f, 0.2f); + + m_ColLabelText = lightText ? COLOR32_WHITE : COLOR32_BLACK; + m_ColStructText = lightText ? 0xffefef00 : 0xff505000; + + m_ColValText = lightText ? 0xffb7b7ff : 0xff000080; + m_ColValTextRO = lightText ? 0xffb7b7b7 : 0xff505050; + m_ColValMin = lightText ? 0xff9797ff : 0xff0000f0; + m_ColValMax = m_ColValMin; + m_ColValTextNE = lightText ? 0xff97f797 : 0xff006000; + + ColorHLSToRGBf(h, lightText ? (min(l+0.2f, 0.3f)) : (max(l-0.2f, 0.6f)), s, &r, &g, &b); + m_ColValBg = Color32FromARGBf(0.4f*a, 0, 0, 0); + m_ColStructBg = Color32FromARGBf(0.4f*a, 0, 0, 0); + + ColorHLSToRGBf(h, 0.4f, s, &r, &g, &b); + m_ColTitleBg = Color32FromARGBf(a+0.4f, r, g, b); + m_ColTitleText = lightText ? COLOR32_WHITE : COLOR32_BLACK; + m_ColTitleShadow = lightText ? 0x80000000 : 0x80ffffff; + ColorHLSToRGBf(h, 0.3f, s, &r, &g, &b); + m_ColTitleHighBg = Color32FromARGBf(a+0.4f, r, g, b); + ColorHLSToRGBf(h, 0.4f, s, &r, &g, &b); + m_ColTitleUnactiveBg = Color32FromARGBf(a+0.2f, r, g, b); + + ColorHLSToRGBf(h, 0.8f, s, &r, &g, &b); + m_ColLine = Color32FromARGBf(0.6f, r, g, b); // 0xfff0f0f0; + m_ColLineShadow = Color32FromARGBf(0.6f, 0, 0, 0); //COLOR32_BLACK; + m_ColUnderline = lightText ? 0xffd0d0d0 : 0xff202000; + ColorHLSToRGBf(h, 0.7f, s, &r, &g, &b); + m_ColBtn = Color32FromARGBf(0.6f, r, g, b); + ColorHLSToRGBf(h, 0.4f, s, &r, &g, &b); + m_ColHighBtn = Color32FromARGBf(0.6f, r, g, b); + ColorHLSToRGBf(h, 0.6f, s, &r, &g, &b); + m_ColFold = Color32FromARGBf(0.3f*a, r, g, b); + ColorHLSToRGBf(h, 0.4f, s, &r, &g, &b); + m_ColHighFold = Color32FromARGBf(0.3f, r, g, b); + + ColorHLSToRGBf(h, lightText ? l+0.2f : l-0.2f, s, &r, &g, &b); + m_ColGrpBg = Color32FromARGBf(0.5f*a, r, g, b); + m_ColGrpText = lightText ? 0xffffff80 : 0xff404000; + + ColorHLSToRGBf(h, 0.75f, s, &r, &g, &b); + m_ColHelpBg = Color32FromARGBf(a, r, g, b); + m_ColHelpText = Color32FromARGBf(1, 0, 0.4f, 0); + + ColorHLSToRGBf(h, 0.45f, s, &r, &g, &b); + m_ColHierBg = Color32FromARGBf(0.75f*a, r, g, b); + + m_ColShortcutText = lightText ? 0xffff8040 : 0xff802000; //0xfff0f0f0; + m_ColShortcutBg = Color32FromARGBf(0.4f*a, 0.2f, 0.2f, 0.2f); + m_ColInfoText = Color32FromARGBf(1.0f, 0.7f, 0.7f, 0.7f); + + m_ColRoto = Color32FromARGBf(1, 0.75f, 0.75f, 0.75f); + m_ColRotoVal = Color32FromARGBf(1, 1.0f, 0.2f, 0.2f); + m_ColRotoBound = Color32FromARGBf(1, 0.4f, 0.4f, 0.4f); + + m_ColEditText = lightText ? COLOR32_WHITE : COLOR32_BLACK; + m_ColEditBg = lightText ? 0xb7575757 : 0xb7c7c7c7; + m_ColEditSelText = lightText ? COLOR32_BLACK : COLOR32_WHITE; + m_ColEditSelBg = lightText ? 0xffc7c7c7 : 0xff575757; + + m_ColSeparator = m_ColValTextRO; + m_ColStaticText = m_ColHelpText; +} +*/ + +// --------------------------------------------------------------------------- + +CTwVarGroup::~CTwVarGroup() +{ + for( vector::iterator it= m_Vars.begin(); it!=m_Vars.end(); ++it ) + if( *it != NULL ) + { + CTwVar *Var = *it; + delete Var; + *it = NULL; + } +} + +// --------------------------------------------------------------------------- + +static inline int IncrBtnWidth(int _CharHeight) +{ + return ((2*_CharHeight)/3+2)&0xfffe; // force even value +} + +// --------------------------------------------------------------------------- + +void CTwBar::BrowseHierarchy(int *_CurrLine, int _CurrLevel, const CTwVar *_Var, int _First, int _Last) +{ + assert(_Var!=NULL); + if( !_Var->m_IsRoot ) + { + if( (*_CurrLine)>=_First && (*_CurrLine)<=_Last ) + { + CHierTag Tag; + Tag.m_Level = _CurrLevel; + Tag.m_Var = const_cast(_Var); + Tag.m_Closing = false; + m_HierTags.push_back(Tag); + } + *_CurrLine += 1; + } + else + { + *_CurrLine = 0; + _CurrLevel = -1; + m_HierTags.resize(0); + } + + if( _Var->IsGroup() ) + { + const CTwVarGroup *Grp = static_cast(_Var); + if( Grp->m_Open ) + for( vector::const_iterator it=Grp->m_Vars.begin(); it!=Grp->m_Vars.end(); ++it ) + if( (*it)->m_Visible ) + BrowseHierarchy(_CurrLine, _CurrLevel+1, *it, _First, _Last); + if( m_HierTags.size()>0 ) + m_HierTags[m_HierTags.size()-1].m_Closing = true; + } +} + +// --------------------------------------------------------------------------- + +void CTwBar::ListLabels(vector& _Labels, vector& _Colors, vector& _BgColors, bool *_HasBgColors, const CTexFont *_Font, int _AtomWidthMax, int _GroupWidthMax) +{ + const int NbEtc = 2; + string ValStr; + int Len, i, x, Etc, s; + const unsigned char *Text; + unsigned char ch; + int WidthMax; + + int Space = _Font->m_CharWidth[(int)' ']; + int LevelSpace = max(_Font->m_CharHeight-6, 4); // space used by DrawHierHandles + + int nh = (int)m_HierTags.size(); + for( int h=0; hm_Label.length(); + if( Len>0 ) + Text = (const unsigned char *)(m_HierTags[h].m_Var->m_Label.c_str()); + else + { + Text = (const unsigned char *)(m_HierTags[h].m_Var->m_Name.c_str()); + Len = (int)m_HierTags[h].m_Var->m_Name.length(); + } + x = 0; + Etc = 0; + _Labels.push_back(""); // add a new text line + if( !m_HierTags[h].m_Var->IsGroup() && static_cast(m_HierTags[h].m_Var)->m_Type==TW_TYPE_BUTTON && static_cast(m_HierTags[h].m_Var)->m_ReadOnly && static_cast(m_HierTags[h].m_Var)->m_Val.m_Button.m_Callback!=NULL ) + _Colors.push_back(m_ColValTextRO); // special case for read-only buttons + else + _Colors.push_back(m_HierTags[h].m_Var->m_ColorPtr!=NULL ? *(m_HierTags[h].m_Var->m_ColorPtr) : COLOR32_WHITE); + color32 bg = m_HierTags[h].m_Var->m_BgColorPtr!=NULL ? *(m_HierTags[h].m_Var->m_BgColorPtr) : 0; + _BgColors.push_back(bg); + if( _HasBgColors!=NULL && bg!=0 ) + *_HasBgColors = true; + bool IsCustom = m_HierTags[h].m_Var->IsCustom(); // !m_HierTags[h].m_Var->IsGroup() && (static_cast(m_HierTags[h].m_Var)->m_Type>=TW_TYPE_CUSTOM_BASE && static_cast(m_HierTags[h].m_Var)->m_Typem_Customs.size()); + if( !IsCustom ) + { + string& CurrentLabel = _Labels[_Labels.size()-1]; + if( m_HierTags[h].m_Var->IsGroup() && static_cast(m_HierTags[h].m_Var)->m_SummaryCallback==NULL ) + WidthMax = _GroupWidthMax; + else if( !m_HierTags[h].m_Var->IsGroup() && static_cast(m_HierTags[h].m_Var)->m_Type==TW_TYPE_BUTTON ) + { + if( static_cast(m_HierTags[h].m_Var)->m_Val.m_Button.m_Callback==NULL ) + WidthMax = _GroupWidthMax; + else if( m_ButtonAlign == BUTTON_ALIGN_RIGHT ) + WidthMax = _GroupWidthMax - 2*IncrBtnWidth(m_Font->m_CharHeight); + else + WidthMax = _AtomWidthMax; + } + //else if( m_HighlightedLine==h && m_DrawRotoBtn ) + // WidthMax = _AtomWidthMax - IncrBtnWidth(m_Font->m_CharHeight); + else + WidthMax = _AtomWidthMax; + if( Space>0 ) + for( s=0; sm_CharWidth[(int)'.']m_DontClip) + for( i=0; im_CharWidth[(int)ch]; + if( Etc>0 ) + { + ++Etc; + if( Etc>NbEtc ) + break; + } + else if( im_CharWidth[(int)'.']>=WidthMax && !(m_HierTags[h].m_Var->m_DontClip)) + Etc = 1; + } + } + } +} + +// --------------------------------------------------------------------------- + +void CTwBar::ListValues(vector& _Values, vector& _Colors, vector& _BgColors, const CTexFont *_Font, int _WidthMax) +{ + CTwFPU fpu; // force fpu precision + + const int NbEtc = 2; + const CTwVarAtom *Atom = NULL; + string ValStr; + int Len, i, x, Etc; + const unsigned char *Text; + unsigned char ch; + bool ReadOnly; + bool IsMax; + bool IsMin; + bool IsROText; + bool HasBgColor; + bool AcceptEdit; + size_t SummaryMaxLength = max(_WidthMax/_Font->m_CharWidth[(int)'I'], 4); + static vector Summary; + Summary.resize(SummaryMaxLength+32); + + int nh = (int)m_HierTags.size(); + for( int h=0; hIsGroup() || m_IsHelpBar + || (m_HierTags[h].m_Var->IsGroup() && static_cast(m_HierTags[h].m_Var)->m_SummaryCallback!=NULL) ) + { + ReadOnly = true; + IsMax = false; + IsMin = false; + IsROText = false; + HasBgColor = true; + AcceptEdit = false; + if( !m_HierTags[h].m_Var->IsGroup() ) + { + Atom = static_cast(m_HierTags[h].m_Var); + Atom->ValueToString(&ValStr); + if( !m_IsHelpBar || (Atom->m_Type==TW_TYPE_SHORTCUT && (Atom->m_Val.m_Shortcut.m_Incr[0]>0 || Atom->m_Val.m_Shortcut.m_Decr[0]>0)) ) + ReadOnly = Atom->m_ReadOnly; + if( !Atom->m_NoSlider ) + { + double v, vmin, vmax; + v = Atom->ValueToDouble(); + Atom->MinMaxStepToDouble(&vmin, &vmax, NULL); + IsMax = (v>=vmax); + IsMin = (v<=vmin); + } + if( Atom->m_Type==TW_TYPE_BOOLCPP || Atom->m_Type==TW_TYPE_BOOL8 || Atom->m_Type==TW_TYPE_BOOL16 || Atom->m_Type==TW_TYPE_BOOL32 ) + { + if (ValStr=="1") + ValStr = "\x7f"; // check sign + else if (ValStr=="0") + ValStr = " -"; //"\x97"; // uncheck sign + } + if( (Atom->m_Type==TW_TYPE_CDSTRING && Atom->m_SetCallback==NULL && g_TwMgr->m_CopyCDStringToClient==NULL) + || (Atom->m_Type==TW_TYPE_CDSTDSTRING && Atom->m_SetCallback==NULL) + || (Atom->m_Type==TW_TYPE_STDSTRING && Atom->m_SetCallback==NULL && g_TwMgr->m_CopyStdStringToClient==NULL) ) + IsROText = true; + if( Atom->m_Type==TW_TYPE_HELP_ATOM || Atom->m_Type==TW_TYPE_HELP_GRP || Atom->m_Type==TW_TYPE_BUTTON || Atom->IsCustom() ) // (Atom->m_Type>=TW_TYPE_CUSTOM_BASE && Atom->m_Typem_Customs.size()) ) + HasBgColor = false; + AcceptEdit = EditInPlaceAcceptVar(Atom) || (Atom->m_Type==TW_TYPE_SHORTCUT); + } + else if(m_HierTags[h].m_Var->IsGroup() && static_cast(m_HierTags[h].m_Var)->m_SummaryCallback!=NULL) + { + const CTwVarGroup *Grp = static_cast(m_HierTags[h].m_Var); + // force internal value update + for( size_t v=0; vm_Vars.size(); v++ ) + if( Grp->m_Vars[v]!=NULL && !Grp->m_Vars[v]->IsGroup() && Grp->m_Vars[v]->m_Visible ) + static_cast(Grp->m_Vars[v])->ValueToDouble(); + + Summary[0] = '\0'; + if( Grp->m_SummaryCallback==CTwMgr::CStruct::DefaultSummary ) + Grp->m_SummaryCallback(&Summary[0], SummaryMaxLength, Grp, Grp->m_SummaryClientData); + else + Grp->m_SummaryCallback(&Summary[0], SummaryMaxLength, Grp->m_StructValuePtr, Grp->m_SummaryClientData); + ValStr = (const char *)(&Summary[0]); + } + else + { + ValStr = ""; // is a group in the help bar + HasBgColor = false; + } + Len = (int)ValStr.length(); + Text = (const unsigned char *)(ValStr.c_str()); + x = 0; + Etc = 0; + _Values.push_back(""); // add a new text line + if( ReadOnly || (IsMin && IsMax) || IsROText ) + _Colors.push_back(m_ColValTextRO); + else if( IsMin ) + _Colors.push_back(m_ColValMin); + else if( IsMax ) + _Colors.push_back(m_ColValMax); + else if( !AcceptEdit ) + _Colors.push_back(m_ColValTextNE); + else + _Colors.push_back(m_ColValText); + if( !HasBgColor ) + _BgColors.push_back(0x00000000); + else if( m_HierTags[h].m_Var->IsGroup() ) + { + const CTwVarGroup *Grp = static_cast(m_HierTags[h].m_Var); + // if typecolor set bgcolor + if( Grp->m_SummaryCallback==CColorExt::SummaryCB ) + _BgColors.push_back(0xff000000); + else + _BgColors.push_back(m_ColStructBg); + } + else + _BgColors.push_back(m_ColValBg); + + string& CurrentValue = _Values[_Values.size()-1]; + int wmax = _WidthMax; + if( m_HighlightedLine==h && m_DrawRotoBtn ) + wmax -= 3*IncrBtnWidth(m_Font->m_CharHeight); + else if( m_HighlightedLine==h && m_DrawIncrDecrBtn ) + wmax -= 2*IncrBtnWidth(m_Font->m_CharHeight); + else if( m_HighlightedLine==h && m_DrawListBtn ) + wmax -= 1*IncrBtnWidth(m_Font->m_CharHeight); + else if( m_HighlightedLine==h && m_DrawBoolBtn ) + wmax -= 1*IncrBtnWidth(m_Font->m_CharHeight); + for( i=0; im_CharWidth[(int)ch]; + if( Etc>0 ) + { + ++Etc; + if( Etc>NbEtc ) + break; + } + else if( im_CharWidth[(int)'.'])>=wmax ) + Etc = 1; + } + } + else + { + _Values.push_back(""); // add a new empty line + _Colors.push_back(COLOR32_BLACK); + _BgColors.push_back(0x00000000); + } +} + +// --------------------------------------------------------------------------- + +int CTwBar::ComputeLabelsWidth(const CTexFont *_Font) +{ + int Len, i, x, s; + const unsigned char *Text; + int LabelsWidth = 0; + int Space = _Font->m_CharWidth[(int)' ']; + int LevelSpace = max(_Font->m_CharHeight-6, 4); // space used by DrawHierHandles + + int nh = (int)m_HierTags.size(); + for( int h=0; hm_Label.length(); + if( Len>0 ) + Text = (const unsigned char *)(m_HierTags[h].m_Var->m_Label.c_str()); + else + { + Text = (const unsigned char *)(m_HierTags[h].m_Var->m_Name.c_str()); + Len = (int)m_HierTags[h].m_Var->m_Name.length(); + } + x = 0; + bool IsCustom = m_HierTags[h].m_Var->IsCustom(); // !m_HierTags[h].m_Var->IsGroup() && (static_cast(m_HierTags[h].m_Var)->m_Type>=TW_TYPE_CUSTOM_BASE && static_cast(m_HierTags[h].m_Var)->m_Typem_Customs.size()); + if( !IsCustom ) + { + if( Space>0 ) + for( s=0; sm_CharWidth[(int)Text[i]]; + x += 3*Space; // add little margin + } + if (x > LabelsWidth) + LabelsWidth = x; + } + + return LabelsWidth; +} + +int CTwBar::ComputeValuesWidth(const CTexFont *_Font) +{ + CTwFPU fpu; // force fpu precision + + const CTwVarAtom *Atom = NULL; + string ValStr; + int Len, i, x; + int Space = _Font->m_CharWidth[(int)' ']; + const unsigned char *Text; + int ValuesWidth = 0; + + int nh = (int)m_HierTags.size(); + for( int h=0; hIsGroup() ) + { + Atom = static_cast(m_HierTags[h].m_Var); + Atom->ValueToString(&ValStr); + + Len = (int)ValStr.length(); + Text = (const unsigned char *)(ValStr.c_str()); + x = 0; + for( i=0; im_CharWidth[(int)Text[i]]; + x += 2*Space; // add little margin + if (x > ValuesWidth) + ValuesWidth = x; + } + + return ValuesWidth; +} + +// --------------------------------------------------------------------------- + +static int ClampText(string& _Text, const CTexFont *_Font, int _WidthMax) +{ + int Len = (int)_Text.length(); + unsigned char ch; + int Width = 0; + int i; + for( i=0; im_CharWidth[(int)'.']>=_WidthMax ) + break; + Width += _Font->m_CharWidth[ch]; + } + if( im_CharWidth[(int)'.']; + } + return Width; +} + +// --------------------------------------------------------------------------- + +void CTwBar::Update() +{ + assert(m_UpToDate==false); + assert(m_Font); + ITwGraph *Gr = g_TwMgr->m_Graph; + + bool DoEndDraw = false; + if( !Gr->IsDrawing() ) + { + Gr->BeginDraw(g_TwMgr->m_WndWidth, g_TwMgr->m_WndHeight); + DoEndDraw = true; + } + + bool ValuesWidthFit = false; + if( m_ValuesWidth==VALUES_WIDTH_FIT ) + { + ValuesWidthFit = true; + m_ValuesWidth = 0; + } + int PrevPosY = m_PosY; + int vpx, vpy, vpw, vph; + vpx = 0; + vpy = 0; + vpw = g_TwMgr->m_WndWidth; + vph = g_TwMgr->m_WndHeight; + if( !m_IsMinimized && vpw>0 && vph>0 ) + { + bool Modif = false; + if( m_Resizable ) + { + if( m_Width>vpw && m_Contained ) + { + m_Width = vpw; + Modif = true; + } + if( m_Width<8*m_Font->m_CharHeight ) + { + m_Width = 8*m_Font->m_CharHeight; + Modif = true; + } + if( m_Height>vph && m_Contained ) + { + m_Height = vph; + Modif = true; + } + if( m_Height<5*m_Font->m_CharHeight ) + { + m_Height = 5*m_Font->m_CharHeight; + Modif = true; + } + } + if( m_Movable && m_Contained ) + { + if( m_PosX+m_Width>vpx+vpw ) + m_PosX = vpx+vpw-m_Width; + if( m_PosXvpy+vph ) + m_PosY = vpy+vph-m_Height; + if( m_PosYm_CharHeight ) + { + m_ValuesWidth = 2*m_Font->m_CharHeight; + Modif = true; + } + if( m_ValuesWidth>m_Width-4*m_Font->m_CharHeight ) + { + m_ValuesWidth = m_Width-4*m_Font->m_CharHeight; + Modif = true; + } + if (ValuesWidthFit) + Modif = true; + if( Modif && m_IsHelpBar ) + { + g_TwMgr->m_HelpBarNotUpToDate = true; + g_TwMgr->m_KeyPressedBuildText = true; + g_TwMgr->m_InfoBuildText = true; + } + } + + UpdateColors(); + + // update geometry relatively to (m_PosX, m_PosY) + if( !m_IsPopupList ) + { + //m_VarX0 = 2*m_Font->m_CharHeight+m_Sep; + m_VarX0 = m_Font->m_CharHeight+m_Sep; + //m_VarX2 = m_Width - 4; + m_VarX2 = m_Width - m_Font->m_CharHeight - m_Sep-2; + m_VarX1 = m_VarX2 - m_ValuesWidth; + } + else + { + //m_VarX0 = m_Font->m_CharHeight+6+m_Sep; + m_VarX0 = 2; + //m_VarX2 = m_Width - 4; + m_VarX2 = m_Width - m_Font->m_CharHeight - m_Sep-2; + m_VarX1 = m_VarX2; + } + if( m_VarX1m_VarX2 ) + m_VarX1 = m_VarX2; + if( !m_IsPopupList ) + { + m_VarY0 = m_Font->m_CharHeight+2+m_Sep+6; + m_VarY1 = m_Height-m_Font->m_CharHeight-2-m_Sep; + m_VarY2 = m_Height-1; + } + else + { + m_VarY0 = 4; + m_VarY1 = m_Height-2-m_Sep; + m_VarY2 = m_Height-1; + } + + int NbLines = (m_VarY1-m_VarY0+1)/(m_Font->m_CharHeight+m_Sep); + if( NbLines<= 0 ) + NbLines = 1; + if( !m_IsMinimized ) + { + int LineNum = 0; + BrowseHierarchy(&LineNum, 0, &m_VarRoot, m_FirstLine, m_FirstLine+NbLines); // add a dummy tag at the end to avoid wrong 'tag-closing' problems + if( (int)m_HierTags.size()>NbLines ) + m_HierTags.resize(NbLines); // remove the last dummy tag + m_NbHierLines = LineNum; + m_NbDisplayedLines = (int)m_HierTags.size(); + + if( ValuesWidthFit ) + { + m_ValuesWidth = ComputeValuesWidth(m_Font); + if( m_ValuesWidth<2*m_Font->m_CharHeight ) + m_ValuesWidth = 2*m_Font->m_CharHeight; // enough to draw buttons + if( m_ValuesWidth>m_VarX2 - m_VarX0 ) + m_ValuesWidth = max(m_VarX2 - m_VarX0 - m_Font->m_CharHeight, 0); + m_VarX1 = m_VarX2 - m_ValuesWidth; + if( m_VarX1m_VarX2 ) + m_VarX1 = m_VarX2; + m_ValuesWidth = m_VarX2 - m_VarX1; + } + } + + // scroll bar + int y0 = m_PosY+m_VarY0; + int y1 = m_PosY+m_VarY1; + int x0 = m_PosX+2; + int x1 = m_PosX+m_Font->m_CharHeight-2; + if( ((x0+x1)&1)==1 ) + x1 += 1; + int w = x1-x0+1; + int h = y1-y0-2*w; + int hscr = (m_NbHierLines>0) ? ((h*m_NbDisplayedLines)/m_NbHierLines) : h; + if( hscr<=4 ) + hscr = 4; + if( hscr>h ) + hscr = h; + int yscr = (m_NbHierLines>0) ? ((h*m_FirstLine)/m_NbHierLines) : 0; + if( yscr<=0 ) + yscr = 0; + if( yscr>h-4 ) + yscr = h-4; + if( yscr+hscr>h ) + hscr = h-yscr; + if( hscr>h ) + hscr = h; + if( hscr<=4 ) + hscr = 4; + m_ScrollYW = w; + m_ScrollYH = h; + m_ScrollY0 = y0+w+yscr; + m_ScrollY1 = y0+w+yscr+hscr; + + // Build title + string Title; + if( m_Label.size()>0 ) + Title = m_Label; + else + Title = m_Name; + m_TitleWidth = ClampText(Title, m_Font, (!m_IsMinimized)?(m_Width-5*m_Font->m_CharHeight):(16*m_Font->m_CharHeight)); + Gr->BuildText(m_TitleTextObj, &Title, NULL, NULL, 1, m_Font, 0, 0); + + if( !m_IsMinimized ) + { + // Build labels + vector Labels; + vector Colors; + vector BgColors; + bool HasBgColors = false; + ListLabels(Labels, Colors, BgColors, &HasBgColors, m_Font, m_VarX1-m_VarX0, m_VarX2-m_VarX0); + assert( Labels.size()==Colors.size() && Labels.size()==BgColors.size() ); + if( Labels.size()>0 ) + Gr->BuildText(m_LabelsTextObj, &(Labels[0]), &(Colors[0]), &(BgColors[0]), (int)Labels.size(), m_Font, 1, HasBgColors ? m_VarX1-m_VarX0-m_Font->m_CharHeight+2 : 0); + else + Gr->BuildText(m_LabelsTextObj, NULL, NULL, NULL, 0, m_Font, 1, 0); + + // Should draw click button? + m_DrawClickBtn = ( m_VarX2-m_VarX1>4*IncrBtnWidth(m_Font->m_CharHeight) + && m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() + && m_HierTags[m_HighlightedLine].m_Var!=NULL + && !m_HierTags[m_HighlightedLine].m_Var->IsGroup() + && !static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly + && ( static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BUTTON )); + // || static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BOOLCPP + // || static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BOOL8 + // || static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BOOL16 + // || static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BOOL32 )); + + // Should draw [-/+] button? + m_DrawIncrDecrBtn = ( m_VarX2-m_VarX1>5*IncrBtnWidth(m_Font->m_CharHeight) + && m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() + && m_HierTags[m_HighlightedLine].m_Var!=NULL + && !m_HierTags[m_HighlightedLine].m_Var->IsGroup() + && static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type!=TW_TYPE_BUTTON + && !static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly + && !static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_NoSlider + && !(m_EditInPlace.m_Active && m_EditInPlace.m_Var==m_HierTags[m_HighlightedLine].m_Var) ); + + // Should draw [v] button (list)? + m_DrawListBtn = ( m_VarX2-m_VarX1>2*IncrBtnWidth(m_Font->m_CharHeight) + && m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() + && m_HierTags[m_HighlightedLine].m_Var!=NULL + && !m_HierTags[m_HighlightedLine].m_Var->IsGroup() + && IsEnumType(static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type) + && !static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly ); + + // Should draw [<>] button (bool)? + m_DrawBoolBtn = ( m_VarX2-m_VarX1>4*IncrBtnWidth(m_Font->m_CharHeight) + && m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() + && m_HierTags[m_HighlightedLine].m_Var!=NULL + && !m_HierTags[m_HighlightedLine].m_Var->IsGroup() + && !static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly + && ( static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BOOLCPP + || static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BOOL8 + || static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BOOL16 + || static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BOOL32 )); + + // Should draw [o] button? + m_DrawRotoBtn = m_DrawIncrDecrBtn; + /* + m_DrawRotoBtn = ( m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() + && m_HierTags[m_HighlightedLine].m_Var!=NULL + && !m_HierTags[m_HighlightedLine].m_Var->IsGroup() + && static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type!=TW_TYPE_BUTTON + && !static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly + && !static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_NoSlider ); + */ + + // Build values + vector& Values = Labels; // reuse + Values.resize(0); + Colors.resize(0); + BgColors.resize(0); + ListValues(Values, Colors, BgColors, m_Font, m_VarX2-m_VarX1); + assert( BgColors.size()==Values.size() && Colors.size()==Values.size() ); + if( Values.size()>0 ) + Gr->BuildText(m_ValuesTextObj, &(Values[0]), &(Colors[0]), &(BgColors[0]), (int)Values.size(), m_Font, 1, m_VarX2-m_VarX1); + else + Gr->BuildText(m_ValuesTextObj, NULL, NULL, NULL, 0, m_Font, 1, m_VarX2-m_VarX1); + + // Build key shortcut text + string Shortcut; + m_ShortcutLine = -1; + if( m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() && m_HierTags[m_HighlightedLine].m_Var!=NULL && !m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + const CTwVarAtom *Atom = static_cast(m_HierTags[m_HighlightedLine].m_Var); + if( Atom->m_KeyIncr[0]>0 || Atom->m_KeyDecr[0]>0 ) + { + if( Atom->m_KeyIncr[0]>0 && Atom->m_KeyDecr[0]>0 ) + Shortcut = "Keys: "; + else + Shortcut = "Key: "; + if( Atom->m_KeyIncr[0]>0 ) + TwGetKeyString(&Shortcut, Atom->m_KeyIncr[0], Atom->m_KeyIncr[1]); + else + Shortcut += "(none)"; + if( Atom->m_KeyDecr[0]>0 ) + { + Shortcut += " "; + TwGetKeyString(&Shortcut, Atom->m_KeyDecr[0], Atom->m_KeyDecr[1]); + } + m_ShortcutLine = m_HighlightedLine; + } + } + ClampText(Shortcut, m_Font, m_Width-3*m_Font->m_CharHeight); + Gr->BuildText(m_ShortcutTextObj, &Shortcut, NULL, NULL, 1, m_Font, 0, 0); + + // build headers text + if (m_HighlightLabelsHeader || m_HighlightValuesHeader) { + std::string HeadersText = "Fit column content"; + ClampText(HeadersText, m_Font, m_Width-3*m_Font->m_CharHeight); + Gr->BuildText(m_HeadersTextObj, &HeadersText, NULL, NULL, 1, m_Font, 0, 0); + } + } + + if( DoEndDraw ) + Gr->EndDraw(); + + m_UpToDate = true; + m_LastUpdateTime = float(g_BarTimer.GetTime()); +} + +// --------------------------------------------------------------------------- + +void CTwBar::DrawHierHandle() +{ + assert(m_Font); + ITwGraph *Gr = g_TwMgr->m_Graph; + + //int x0 = m_PosX+m_Font->m_CharHeight+1; + int x0 = m_PosX+3; + //int x2 = m_PosX+m_VarX0-5; + //int x2 = m_PosX+3*m_Font->m_CharWidth[(int)' ']-2; + int x2 = m_PosX+m_Font->m_CharHeight-3; + if( x2-x0<4 ) + x2 = x0+4; + if( (x2-x0)&1 ) + --x2; + int x1 = (x0+x2)/2; + int w = x2-x0+1; + int y0 = m_PosY+m_VarY0 +1; + int y1; + int dh0 = (m_Font->m_CharHeight+m_Sep-1-w)/2; + if( dh0<0 ) + dh0 = 0; + int dh1 = dh0+w-1; + int i, h=0; + + if( !m_IsPopupList ) + { + CTwVarGroup *Grp; + int nh = (int)m_HierTags.size(); + for( h=0; hm_CharHeight+m_Sep-1; + if( m_HierTags[h].m_Var->IsGroup() ) + Grp = static_cast(m_HierTags[h].m_Var); + else + Grp = NULL; + + int dx = m_HierTags[h].m_Level * (x2-x0); + + if( Grp ) + { + if( m_ColGrpBg!=0 && Grp->m_StructValuePtr==NULL ) + { + color32 cb = (Grp->m_StructType==TW_TYPE_HELP_STRUCT) ? m_ColStructBg : m_ColGrpBg; + //Gr->DrawRect(x0+dx-1, y0, m_PosX+m_VarX2, y0+m_Font->m_CharHeight-1, cb); + Gr->DrawRect(x2+dx+3, y0, m_PosX+m_VarX2, y0+m_Font->m_CharHeight-1, cb); + } + + if( m_DrawHandles ) + { + Gr->DrawLine(dx+x2+1,y0+dh0+1, dx+x2+1,y0+dh1+1, m_ColLineShadow); + Gr->DrawLine(dx+x0+1,y0+dh1+1, dx+x2+2,y0+dh1+1, m_ColLineShadow); + } + + //Gr->DrawRect(x0+1,y0+dh0+1,x2-1,y0+dh1-1, (h==m_HighlightedLine) ? m_ColHighBtn : m_ColBtn); + Gr->DrawRect(dx+x0,y0+dh0, dx+x2,y0+dh1, (h==m_HighlightedLine) ? m_ColHighFold : m_ColFold); + if( m_DrawHandles ) + { + Gr->DrawLine(dx+x0,y0+dh0, dx+x2,y0+dh0, m_ColLine); + Gr->DrawLine(dx+x2,y0+dh0, dx+x2,y0+dh1+1, m_ColLine); + Gr->DrawLine(dx+x2,y0+dh1, dx+x0,y0+dh1, m_ColLine); + Gr->DrawLine(dx+x0,y0+dh1, dx+x0,y0+dh0, m_ColLine); + } + + Gr->DrawLine(dx+x0+2,y0+dh0+w/2, dx+x2-1,y0+dh0+w/2, m_ColTitleText); + if( !Grp->m_Open ) + Gr->DrawLine(dx+x1,y0+dh0+2, dx+x1,y0+dh1-1, m_ColTitleText); + + /* + if( m_ColGrpBg!=0 && Grp->m_StructValuePtr==NULL ) + { + color32 cb = (Grp->m_StructType==TW_TYPE_HELP_STRUCT) ? m_ColStructBg : m_ColGrpBg; + //int decal = m_Font->m_CharHeight/2-2+2*m_HierTags[h].m_Level; + //if( decal>m_Font->m_CharHeight-3 ) + // decal = m_Font->m_CharHeight-3; + int margin = dx; //m_Font->m_CharWidth[(int)' ']*m_HierTags[h].m_Level; + //Gr->DrawRect(m_PosX+m_VarX0+margin, y0+decal, m_PosX+m_VarX2, y0+m_Font->m_CharHeight-1, cb); + Gr->DrawRect(m_PosX+m_VarX0+margin-1, y0+1, m_PosX+m_VarX2, y0+m_Font->m_CharHeight, cb);// m_ColHierBg); + //Gr->DrawRect(m_PosX+m_VarX0-4, y0+m_Font->m_CharHeight/2-1, m_PosX+m_VarX0+margin-2, y0+m_Font->m_CharHeight/2, m_ColHierBg); + } + */ + } + else if( static_cast(m_HierTags[h].m_Var)->m_Type==TW_TYPE_HELP_GRP && m_ColHelpBg!=0 ) + Gr->DrawRect(m_PosX+m_VarX0+m_HierTags[h].m_Var->m_LeftMargin, y0+m_HierTags[h].m_Var->m_TopMargin, m_PosX+m_VarX2, y0+m_Font->m_CharHeight-1, m_ColHelpBg); + //else if( static_cast(m_HierTags[h].m_Var)->m_Type==TW_TYPE_HELP_HEADER && m_ColHelpBg!=0 ) + // Gr->DrawRect(m_PosX+m_VarX0+m_HierTags[h].m_Var->m_LeftMargin, y0+m_HierTags[h].m_Var->m_TopMargin, m_PosX+m_VarX2, y0+m_Font->m_CharHeight-1, m_ColHelpBg); + /* + else if( static_cast(m_HierTags[h].m_Var)->m_Type==TW_TYPE_BUTTON && m_ColBtn!=0 ) + { + // draw button + int cbx0 = m_PosX+m_VarX2-2*bw+bw/2, cby0 = y0+2, cbx1 = m_PosX+m_VarX2-2-bw/2, cby1 = y0+m_Font->m_CharHeight-4; + if( m_HighlightClickBtn ) + { + Gr->DrawRect(cbx0+2, cby0+2, cbx1+2, cby1+2, m_ColBtn); + Gr->DrawLine(cbx0+3, cby1+3, cbx1+4, cby1+3, 0x7F000000); + Gr->DrawLine(cbx1+3, cby0+3, cbx1+3, cby1+3, 0x7F000000); + } + else + { + Gr->DrawRect(cbx0+3, cby1+1, cbx1+3, cby1+3, 0x7F000000); + Gr->DrawRect(cbx1+1, cby0+3, cbx1+3, cby1, 0x7F000000); + Gr->DrawRect(cbx0, cby0, cbx1, cby1, m_ColBtn); + } + } + */ + + y0 = y1+1; + } + } + + if( m_NbDisplayedLinesm_CharHeight-2; + x0 = m_PosX + m_VarX2+4; + x1 = x0 + m_Font->m_CharHeight-4; + if( ((x0+x1)&1)==1 ) + x1 += 1; + w = m_ScrollYW; + h = m_ScrollYH; + + Gr->DrawRect(x0+2,y0+w, x1-2,y1-1-w, (m_ColBg&0xffffff)|0x11000000); + if( m_DrawHandles || m_IsPopupList ) + { + // scroll handle shadow lines + Gr->DrawLine(x1-1,m_ScrollY0+1, x1-1,m_ScrollY1+1, m_ColLineShadow); + Gr->DrawLine(x0+2,m_ScrollY1+1, x1,m_ScrollY1+1, m_ColLineShadow); + + // up & down arrow + for( i=0; i<(x1-x0-2)/2; ++i ) + { + Gr->DrawLine(x0+2+i,y0+w-2*i, x1-i,y0+w-2*i, m_ColLineShadow); + Gr->DrawLine(x0+1+i,y0+w-1-2*i, x1-1-i,y0+w-1-2*i, m_HighlightUpScroll?((m_ColLine&0xffffff)|0x4f000000):m_ColLine); + + Gr->DrawLine(x0+2+i,y1-w+2+2*i, x1-i,y1-w+2+2*i, m_ColLineShadow); + Gr->DrawLine(x0+1+i,y1-w+1+2*i, x1-1-i,y1-w+1+2*i, m_HighlightDnScroll?((m_ColLine&0xffffff)|0x4f000000):m_ColLine); + } + + // middle lines + Gr->DrawLine((x0+x1)/2-1,y0+w, (x0+x1)/2-1,m_ScrollY0, m_ColLine); + Gr->DrawLine((x0+x1)/2,y0+w, (x0+x1)/2,m_ScrollY0, m_ColLine); + Gr->DrawLine((x0+x1)/2+1,y0+w, (x0+x1)/2+1,m_ScrollY0, m_ColLineShadow); + Gr->DrawLine((x0+x1)/2-1,m_ScrollY1, (x0+x1)/2-1,y1-w+1, m_ColLine); + Gr->DrawLine((x0+x1)/2,m_ScrollY1, (x0+x1)/2,y1-w+1, m_ColLine); + Gr->DrawLine((x0+x1)/2+1,m_ScrollY1, (x0+x1)/2+1,y1-w+1, m_ColLineShadow); + // scroll handle lines + Gr->DrawRect(x0+2,m_ScrollY0+1, x1-3,m_ScrollY1-1, m_HighlightScroll?m_ColHighBtn:m_ColBtn); + Gr->DrawLine(x1-2,m_ScrollY0, x1-2,m_ScrollY1, m_ColLine); + Gr->DrawLine(x0+1,m_ScrollY0, x0+1,m_ScrollY1, m_ColLine); + Gr->DrawLine(x0+1,m_ScrollY1, x1-1,m_ScrollY1, m_ColLine); + Gr->DrawLine(x0+1,m_ScrollY0, x1-2,m_ScrollY0, m_ColLine); + } + else + Gr->DrawRect(x0+3,m_ScrollY0+1, x1-3,m_ScrollY1-1, m_ColBtn); + } + + if( m_DrawHandles && !m_IsPopupList ) + { + if( m_Resizable ) // Draw resize handles + { + // lower-left + Gr->DrawLine(m_PosX+3, m_PosY+m_Height-m_Font->m_CharHeight+3, m_PosX+3, m_PosY+m_Height-4, m_ColLine); + Gr->DrawLine(m_PosX+4, m_PosY+m_Height-m_Font->m_CharHeight+4, m_PosX+4, m_PosY+m_Height-3, m_ColLineShadow); + Gr->DrawLine(m_PosX+3, m_PosY+m_Height-4, m_PosX+m_Font->m_CharHeight-4, m_PosY+m_Height-4, m_ColLine); + Gr->DrawLine(m_PosX+4, m_PosY+m_Height-3, m_PosX+m_Font->m_CharHeight-3, m_PosY+m_Height-3, m_ColLineShadow); + // lower-right + Gr->DrawLine(m_PosX+m_Width-4, m_PosY+m_Height-m_Font->m_CharHeight+3, m_PosX+m_Width-4, m_PosY+m_Height-4, m_ColLine); + Gr->DrawLine(m_PosX+m_Width-3, m_PosY+m_Height-m_Font->m_CharHeight+4, m_PosX+m_Width-3, m_PosY+m_Height-3, m_ColLineShadow); + Gr->DrawLine(m_PosX+m_Width-4, m_PosY+m_Height-4, m_PosX+m_Width-m_Font->m_CharHeight+3, m_PosY+m_Height-4, m_ColLine); + Gr->DrawLine(m_PosX+m_Width-3, m_PosY+m_Height-3, m_PosX+m_Width-m_Font->m_CharHeight+4, m_PosY+m_Height-3, m_ColLineShadow); + // upper-left + Gr->DrawLine(m_PosX+3, m_PosY+m_Font->m_CharHeight-4, m_PosX+3, m_PosY+3, m_ColLine); + Gr->DrawLine(m_PosX+4, m_PosY+m_Font->m_CharHeight-3, m_PosX+4, m_PosY+4, m_ColLineShadow); + Gr->DrawLine(m_PosX+3, m_PosY+3, m_PosX+m_Font->m_CharHeight-4, m_PosY+3, m_ColLine); + Gr->DrawLine(m_PosX+4, m_PosY+4, m_PosX+m_Font->m_CharHeight-3, m_PosY+4, m_ColLineShadow); + // upper-right + Gr->DrawLine(m_PosX+m_Width-4, m_PosY+3, m_PosX+m_Width-m_Font->m_CharHeight+3, m_PosY+3, m_ColLine); + Gr->DrawLine(m_PosX+m_Width-3, m_PosY+4, m_PosX+m_Width-m_Font->m_CharHeight+4, m_PosY+4, m_ColLineShadow); + Gr->DrawLine(m_PosX+m_Width-4, m_PosY+m_Font->m_CharHeight-4, m_PosX+m_Width-4, m_PosY+3, m_ColLine); + Gr->DrawLine(m_PosX+m_Width-3, m_PosY+m_Font->m_CharHeight-3, m_PosX+m_Width-3, m_PosY+4, m_ColLineShadow); + } + + int xm = m_PosX+m_Width-2*m_Font->m_CharHeight, wm=m_Font->m_CharHeight-6; + wm = (wm<6) ? 6 : wm; + if( m_Iconifiable ) // Draw minimize button + { + Gr->DrawRect(xm+1, m_PosY+4, xm+wm-1, m_PosY+3+wm, m_HighlightMinimize?m_ColHighBtn:((m_ColBtn&0xffffff)|0x4f000000)); + Gr->DrawLine(xm, m_PosY+3, xm+wm, m_PosY+3, m_ColLine); + Gr->DrawLine(xm+wm, m_PosY+3, xm+wm, m_PosY+3+wm, m_ColLine); + Gr->DrawLine(xm+wm, m_PosY+3+wm, xm, m_PosY+3+wm, m_ColLine); + Gr->DrawLine(xm, m_PosY+3+wm, xm, m_PosY+3, m_ColLine); + Gr->DrawLine(xm+wm+1, m_PosY+4, xm+wm+1, m_PosY+4+wm, m_ColLineShadow); + Gr->DrawLine(xm+wm+1, m_PosY+4+wm, xm, m_PosY+4+wm, m_ColLineShadow); + Gr->DrawLine(xm+wm/3+((wm<9)?1:0)-1, m_PosY+4+wm/3-((wm<9)?0:1), xm+wm/2, m_PosY+2+wm-1, m_ColTitleText, true); + Gr->DrawLine(xm+wm-wm/3+((wm<9)?0:1), m_PosY+4+wm/3-((wm<9)?0:1), xm+wm/2, m_PosY+2+wm-1, m_ColTitleText, true); + } + + if( g_TwMgr->m_FontResizable ) // Draw font button + { + xm = m_PosX+m_Font->m_CharHeight+2; + Gr->DrawRect(xm+1, m_PosY+4, xm+wm-1, m_PosY+3+wm, m_HighlightFont?m_ColHighBtn:((m_ColBtn&0xffffff)|0x4f000000)); + Gr->DrawLine(xm, m_PosY+3, xm+wm, m_PosY+3, m_ColLine); + Gr->DrawLine(xm+wm, m_PosY+3, xm+wm, m_PosY+3+wm, m_ColLine); + Gr->DrawLine(xm+wm, m_PosY+3+wm, xm, m_PosY+3+wm, m_ColLine); + Gr->DrawLine(xm, m_PosY+3+wm, xm, m_PosY+3, m_ColLine); + Gr->DrawLine(xm+wm+1, m_PosY+4, xm+wm+1, m_PosY+4+wm, m_ColLineShadow); + Gr->DrawLine(xm+wm+1, m_PosY+4+wm, xm, m_PosY+4+wm, m_ColLineShadow); + Gr->DrawLine(xm+wm/2-wm/6, m_PosY+3+wm/3, xm+wm/2+wm/6+1, m_PosY+3+wm/3, m_ColTitleText); + Gr->DrawLine(xm+wm/2-wm/6, m_PosY+3+wm/3, xm+wm/2-wm/6, m_PosY+4+wm-wm/3+(wm>11?1:0), m_ColTitleText); + Gr->DrawLine(xm+wm/2-wm/6, m_PosY+3+wm/2+(wm>11?1:0), xm+wm/2+wm/6, m_PosY+3+wm/2+(wm>11?1:0), m_ColTitleText); + } + } +} + +// --------------------------------------------------------------------------- + +void CTwBar::Draw(int _DrawPart) +{ + PERF( PerfTimer Timer; double DT; ) + + assert(m_Font); + ITwGraph *Gr = g_TwMgr->m_Graph; + + m_CustomRecords.clear(); + + if( float(g_BarTimer.GetTime())>m_LastUpdateTime+m_UpdatePeriod ) + NotUpToDate(); + + if( m_HighlightedLine!=m_HighlightedLinePrev ) + { + m_HighlightedLinePrev = m_HighlightedLine; + NotUpToDate(); + } + + if( m_IsHelpBar && g_TwMgr->m_HelpBarNotUpToDate ) + g_TwMgr->UpdateHelpBar(); + + if( !m_UpToDate ) + Update(); + + if( !m_IsMinimized ) + { + int y = m_PosY+1; + int LevelSpace = max(m_Font->m_CharHeight-6, 4); // space used by DrawHierHandles + + color32 colBg = m_ColBg, colBg1 = m_ColBg1, colBg2 = m_ColBg2; + if( m_DrawHandles || m_IsPopupList ) + { + unsigned int alphaMin = 0x70; + if( m_IsPopupList ) + alphaMin = 0xa0; + if( (colBg>>24)>24)>24)DrawRect(m_PosX, m_PosY, m_PosX+m_Width-1, m_PosY+m_Font->m_CharHeight+1, (m_HighlightTitle||m_MouseDragTitle) ? m_ColTitleHighBg : (m_DrawHandles ? m_ColTitleBg : m_ColTitleUnactiveBg)); + if( m_HighlightTitle || m_MouseDragTitle ) + Gr->DrawRect(m_PosX, m_PosY, m_PosX+m_Width-1, m_PosY+m_Font->m_CharHeight+1, m_ColTitleHighBg); + else if (m_DrawHandles) + Gr->DrawRect(m_PosX, m_PosY, m_PosX+m_Width-1, m_PosY+m_Font->m_CharHeight+1, m_ColTitleBg, m_ColTitleBg, colBg2, colBg1); + else + Gr->DrawRect(m_PosX, m_PosY, m_PosX+m_Width-1, m_PosY+m_Font->m_CharHeight+1, m_ColTitleBg, m_ColTitleBg, colBg2, colBg1); + } + if( _DrawPart&DRAW_CONTENT ) + { + const color32 COL0 = 0x50ffffff; + const color32 COL1 = 0x501f1f1f; + Gr->DrawRect(m_PosX, m_PosY, m_PosX+m_Width-1, y, COL0, COL0, COL1, COL1); + if( m_ColTitleShadow!=0 ) + Gr->DrawText(m_TitleTextObj, m_PosX+(m_Width-m_TitleWidth)/2+1, m_PosY+1, m_ColTitleShadow, 0); + Gr->DrawText(m_TitleTextObj, m_PosX+(m_Width-m_TitleWidth)/2, m_PosY, m_ColTitleText, 0); + } + y = m_PosY+m_Font->m_CharHeight+1; + if( _DrawPart&DRAW_CONTENT && m_DrawHandles ) + Gr->DrawLine(m_PosX, y, m_PosX+m_Width-1, y, 0x30ffffff); // 0x80afafaf); + y++; + PERF( DT = Timer.GetTime(); printf("Title=%.4fms ", 1000.0*DT); ) + } + + // Draw background + PERF( Timer.Reset(); ) + if( _DrawPart&DRAW_BG ) + { + Gr->DrawRect(m_PosX, y, m_PosX+m_Width-1, m_PosY+m_Height-1, colBg2, colBg1, colBg1, colBg); + //Gr->DrawRect(m_PosX, y, m_PosX+m_VarX0-5, m_PosY+m_Height-1, m_ColHierBg); + Gr->DrawRect(m_PosX+m_VarX2+3, y, m_PosX+m_Width-1, m_PosY+m_Height-1, m_ColHierBg); + } + + if( _DrawPart&DRAW_CONTENT ) + { + // Draw highlighted line + if( m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() && m_HierTags[m_HighlightedLine].m_Var!=NULL + && (m_HierTags[m_HighlightedLine].m_Var->IsGroup() + || (!static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly && !m_IsHelpBar + && !m_HierTags[m_HighlightedLine].m_Var->IsCustom() ) ) ) // !(static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type>=TW_TYPE_CUSTOM_BASE && static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Typem_Customs.size()))) ) + { + int y0 = m_PosY + m_VarY0 + m_HighlightedLine*(m_Font->m_CharHeight+m_Sep); + Gr->DrawRect(m_PosX+LevelSpace+6+LevelSpace*m_HierTags[m_HighlightedLine].m_Level, y0+1, m_PosX+m_VarX2, y0+m_Font->m_CharHeight-1, m_ColHighBg0, m_ColHighBg0, m_ColHighBg1, m_ColHighBg1); + int eps = (g_TwMgr->m_GraphAPI==TW_OPENGL || g_TwMgr->m_GraphAPI==TW_OPENGL_CORE) ? 1 : 0; + if( !m_EditInPlace.m_Active ) + Gr->DrawLine(m_PosX+LevelSpace+6+LevelSpace*m_HierTags[m_HighlightedLine].m_Level, y0+m_Font->m_CharHeight+eps, m_PosX+m_VarX2, y0+m_Font->m_CharHeight+eps, m_ColUnderline); + } + else if( m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() && !m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + int y0 = m_PosY + m_VarY0 + m_HighlightedLine*(m_Font->m_CharHeight+m_Sep); + color32 col = ColorBlend(m_ColHighBg0, m_ColHighBg1, 0.5f); + CTwVarAtom *Atom = static_cast(m_HierTags[m_HighlightedLine].m_Var); + if( !Atom->IsCustom() // !(Atom->m_Type>=TW_TYPE_CUSTOM_BASE && Atom->m_Typem_Customs.size()) + && !(Atom->m_Type==TW_TYPE_BUTTON && Atom->m_Val.m_Button.m_Callback==NULL) ) + Gr->DrawRect(m_PosX+LevelSpace+6+LevelSpace*m_HierTags[m_HighlightedLine].m_Level, y0+1, m_PosX+m_VarX2, y0+m_Font->m_CharHeight-1, col); + else + Gr->DrawRect(m_PosX+LevelSpace+6+LevelSpace*m_HierTags[m_HighlightedLine].m_Level, y0+1, m_PosX+LevelSpace+6+LevelSpace*m_HierTags[m_HighlightedLine].m_Level+4, y0+m_Font->m_CharHeight-1, col); + } + color32 clight = 0x5FFFFFFF; // bar contour + Gr->DrawLine(m_PosX, m_PosY, m_PosX, m_PosY+m_Height, clight); + Gr->DrawLine(m_PosX, m_PosY, m_PosX+m_Width, m_PosY, clight); + Gr->DrawLine(m_PosX+m_Width, m_PosY, m_PosX+m_Width, m_PosY+m_Height, clight); + Gr->DrawLine(m_PosX, m_PosY+m_Height, m_PosX+m_Width, m_PosY+m_Height, clight); + int dshad = 3; // bar shadows + color32 cshad = (((m_Color>>24)/2)<<24) & 0xFF000000; + Gr->DrawRect(m_PosX, m_PosY+m_Height, m_PosX+dshad, m_PosY+m_Height+dshad, 0, cshad, 0, 0); + Gr->DrawRect(m_PosX+dshad+1, m_PosY+m_Height, m_PosX+m_Width-1, m_PosY+m_Height+dshad, cshad, cshad, 0, 0); + Gr->DrawRect(m_PosX+m_Width, m_PosY+m_Height, m_PosX+m_Width+dshad, m_PosY+m_Height+dshad, cshad, 0, 0, 0); + Gr->DrawRect(m_PosX+m_Width, m_PosY, m_PosX+m_Width+dshad, m_PosY+dshad, 0, 0, cshad, 0); + Gr->DrawRect(m_PosX+m_Width, m_PosY+dshad+1, m_PosX+m_Width+dshad, m_PosY+m_Height-1, cshad, 0, cshad, 0); + PERF( DT = Timer.GetTime(); printf("Bg=%.4fms ", 1000.0*DT); ) + + // Draw hierarchy handle + PERF( Timer.Reset(); ) + DrawHierHandle(); + PERF( DT = Timer.GetTime(); printf("Handles=%.4fms ", 1000.0*DT); ) + + // Draw labels + PERF( Timer.Reset(); ) + Gr->DrawText(m_LabelsTextObj, m_PosX+LevelSpace+6, m_PosY+m_VarY0, 0 /*m_ColLabelText*/, 0); + PERF( DT = Timer.GetTime(); printf("Labels=%.4fms ", 1000.0*DT); ) + + // Draw values + if( !m_IsPopupList ) + { + PERF( Timer.Reset(); ) + Gr->DrawText(m_ValuesTextObj, m_PosX+m_VarX1, m_PosY+m_VarY0, 0 /*m_ColValText*/, 0 /*m_ColValBg*/); + PERF( DT = Timer.GetTime(); printf("Values=%.4fms ", 1000.0*DT); ) + } + + // Draw preview for color values and draw buttons and custom types + int h, nh = (int)m_HierTags.size(); + int yh = m_PosY+m_VarY0; + int bw = IncrBtnWidth(m_Font->m_CharHeight); + for( h=0; hIsGroup() ) + { + const CTwVarGroup * Grp = static_cast(m_HierTags[h].m_Var); + if( Grp->m_SummaryCallback==CColorExt::SummaryCB && Grp->m_StructValuePtr!=NULL ) + { + // draw color value + if( Grp->m_Vars.size()>0 && Grp->m_Vars[0]!=NULL && !Grp->m_Vars[0]->IsGroup() ) + static_cast(Grp->m_Vars[0])->ValueToDouble(); // force ext update + int ydecal = (g_TwMgr->m_GraphAPI==TW_OPENGL || g_TwMgr->m_GraphAPI==TW_OPENGL_CORE) ? 1 : 0; + const int checker = 8; + for( int c=0; cDrawRect(m_PosX+m_VarX1+(c*(m_VarX2-m_VarX1))/checker, yh+1+ydecal+((c%2)*(m_Font->m_CharHeight-2))/2, m_PosX+m_VarX1-1+((c+1)*(m_VarX2-m_VarX1))/checker, yh+ydecal+(((c%2)+1)*(m_Font->m_CharHeight-2))/2, 0xffffffff); + Gr->DrawRect(m_PosX+m_VarX1, yh+1+ydecal, m_PosX+m_VarX2-1, yh+ydecal+m_Font->m_CharHeight-2, 0xbfffffff); + const CColorExt *colExt = static_cast(Grp->m_StructValuePtr); + color32 col = Color32FromARGBi((colExt->m_HasAlpha ? colExt->A : 255), colExt->R, colExt->G, colExt->B); + if( col!=0 ) + Gr->DrawRect(m_PosX+m_VarX1, yh+1+ydecal, m_PosX+m_VarX2-1, yh+ydecal+m_Font->m_CharHeight-2, col); + /* + Gr->DrawLine(m_PosX+m_VarX1-1, yh, m_PosX+m_VarX2+1, yh, 0xff000000); + Gr->DrawLine(m_PosX+m_VarX1-1, yh+m_Font->m_CharHeight, m_PosX+m_VarX2+1, yh+m_Font->m_CharHeight, 0xff000000); + Gr->DrawLine(m_PosX+m_VarX1-1, yh, m_PosX+m_VarX1-1, yh+m_Font->m_CharHeight, 0xff000000); + Gr->DrawLine(m_PosX+m_VarX2, yh, m_PosX+m_VarX2, yh+m_Font->m_CharHeight, 0xff000000); + */ + } + //else if( Grp->m_SummaryCallback==CustomTypeSummaryCB && Grp->m_StructValuePtr!=NULL ) + //{ + //} + } + else if( static_cast(m_HierTags[h].m_Var)->m_Type==TW_TYPE_BUTTON && !m_IsPopupList ) + { + // draw button + int cbx0, cbx1; + if( m_ButtonAlign == BUTTON_ALIGN_LEFT ) + { + cbx0 = m_PosX+m_VarX1+2; + cbx1 = m_PosX+m_VarX1+bw; + } + else if( m_ButtonAlign == BUTTON_ALIGN_CENTER ) + { + cbx0 = m_PosX+(m_VarX1+m_VarX2)/2-bw/2+1; + cbx1 = m_PosX+(m_VarX1+m_VarX2)/2+bw/2-1; + } + else + { + cbx0 = m_PosX+m_VarX2-2*bw+bw/2; + cbx1 = m_PosX+m_VarX2-2-bw/2; + } + int cby0 = yh+3; + int cby1 = yh+m_Font->m_CharHeight-3; + if( !static_cast(m_HierTags[h].m_Var)->m_ReadOnly ) + { + double BtnAutoDelta = g_TwMgr->m_Timer.GetTime() - m_HighlightClickBtnAuto; + if( (m_HighlightClickBtn || (BtnAutoDelta>=0 && BtnAutoDelta<0.1)) && h==m_HighlightedLine ) + { + cbx0--; cby0--; cbx1--; cby1--; + Gr->DrawRect(cbx0+2, cby0+2, cbx1+2, cby1+2, m_ColHighBtn); + Gr->DrawLine(cbx0+3, cby1+3, cbx1+4, cby1+3, 0xAF000000); + Gr->DrawLine(cbx1+3, cby0+3, cbx1+3, cby1+3, 0xAF000000); + Gr->DrawLine(cbx0+2, cby0+2, cbx0+2, cby1+2, m_ColLine); + Gr->DrawLine(cbx0+2, cby1+2, cbx1+2, cby1+2, m_ColLine); + Gr->DrawLine(cbx1+2, cby1+2, cbx1+2, cby0+2, m_ColLine); + Gr->DrawLine(cbx1+2, cby0+2, cbx0+2, cby0+2, m_ColLine); + } + else + { + Gr->DrawRect(cbx0+2, cby1+1, cbx1+2, cby1+2, (h==m_HighlightedLine)?0xAF000000:0x7F000000); + Gr->DrawRect(cbx1+1, cby0+2, cbx1+2, cby1, (h==m_HighlightedLine)?0xAF000000:0x7F000000); + Gr->DrawRect(cbx0, cby0, cbx1, cby1, (h==m_HighlightedLine)?m_ColHighBtn:m_ColBtn); + Gr->DrawLine(cbx0, cby0, cbx0, cby1, m_ColLine); + Gr->DrawLine(cbx0, cby1, cbx1, cby1, m_ColLine); + Gr->DrawLine(cbx1, cby1, cbx1, cby0, m_ColLine); + Gr->DrawLine(cbx1, cby0, cbx0, cby0, m_ColLine); + } + } + else if( static_cast(m_HierTags[h].m_Var)->m_Val.m_Button.m_Callback!=NULL ) + { + Gr->DrawRect(cbx0+1, cby0+1, cbx1+1, cby1+1, m_ColBtn); + } + else if( static_cast(m_HierTags[h].m_Var)->m_Val.m_Button.m_Separator==1 ) + { + int LevelSpace = max(m_Font->m_CharHeight-6, 4); // space used by DrawHierHandles + Gr->DrawLine(m_PosX+m_VarX0+m_HierTags[h].m_Level*LevelSpace, yh+m_Font->m_CharHeight/2, m_PosX+m_VarX2, yh+m_Font->m_CharHeight/2, m_ColSeparator ); + } + } + else if( m_HierTags[h].m_Var->IsCustom() ) //static_cast(m_HierTags[h].m_Var)->m_Type>=TW_TYPE_CUSTOM_BASE && static_cast(m_HierTags[h].m_Var)->m_Typem_Customs.size() ) + { // record custom types + CTwMgr::CMemberProxy *mProxy = static_cast(m_HierTags[h].m_Var)->m_Val.m_Custom.m_MemberProxy; + if( mProxy!=NULL && mProxy->m_StructProxy!=NULL ) + { + CustomMap::iterator it = m_CustomRecords.find(mProxy->m_StructProxy); + int xMin = m_PosX + m_VarX0 + m_HierTags[h].m_Level*LevelSpace; + int xMax = m_PosX + m_VarX2 - 2; + int yMin = yh + 1; + int yMax = yh + m_Font->m_CharHeight; + if( it==m_CustomRecords.end() ) + { + std::pair pr; + pr.first = mProxy->m_StructProxy; + pr.second.m_IndexMin = pr.second.m_IndexMax = mProxy->m_MemberIndex; + pr.second.m_XMin = xMin; + pr.second.m_XMax = xMax; + pr.second.m_YMin = yMin; + pr.second.m_YMax = yMax; + pr.second.m_Y0 = 0; // will be filled by the draw loop below + pr.second.m_Y1 = 0; // will be filled by the draw loop below + pr.second.m_Var = mProxy->m_VarParent; + m_CustomRecords.insert(pr); + } + else + { + it->second.m_IndexMin = min(it->second.m_IndexMin, mProxy->m_MemberIndex); + it->second.m_IndexMax = min(it->second.m_IndexMax, mProxy->m_MemberIndex); + it->second.m_XMin = min(it->second.m_XMin, xMin); + it->second.m_XMax = max(it->second.m_XMax, xMax); + it->second.m_YMin = min(it->second.m_YMin, yMin); + it->second.m_YMax = max(it->second.m_YMax, yMax); + it->second.m_Y0 = 0; + it->second.m_Y1 = 0; + assert( it->second.m_Var==mProxy->m_VarParent ); + } + } + } + + yh += m_Font->m_CharHeight+m_Sep; + } + + // Draw custom types + for( CustomMap::iterator it = m_CustomRecords.begin(); it!=m_CustomRecords.end(); ++it ) + { + CTwMgr::CStructProxy *sProxy = it->first; + assert( sProxy!=NULL ); + CCustomRecord& r = it->second; + if( sProxy->m_CustomDrawCallback!=NULL ) + { + int y0 = r.m_YMin - max(r.m_IndexMin - sProxy->m_CustomIndexFirst, 0)*(m_Font->m_CharHeight + m_Sep); + int y1 = y0 + max(sProxy->m_CustomIndexLast - sProxy->m_CustomIndexFirst + 1, 0)*(m_Font->m_CharHeight + m_Sep) - 2; + if( y0ChangeViewport(r.m_XMin, r.m_YMin, r.m_XMax-r.m_XMin+1, r.m_YMax-r.m_YMin+1, 0, y0-r.m_YMin+1); + sProxy->m_CustomDrawCallback(r.m_XMax-r.m_XMin, y1-y0, sProxy->m_StructExtData, sProxy->m_StructClientData, this, r.m_Var); + Gr->RestoreViewport(); + } + } + } + + if( m_DrawHandles && !m_IsPopupList ) + { + // Draw -/+/o/click/v buttons + if( (m_DrawIncrDecrBtn || m_DrawClickBtn || m_DrawListBtn || m_DrawBoolBtn || m_DrawRotoBtn) && m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() ) + { + int y0 = m_PosY + m_VarY0 + m_HighlightedLine*(m_Font->m_CharHeight+m_Sep); + if( m_DrawIncrDecrBtn ) + { + bool IsMin = false; + bool IsMax = false; + if( !m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + const CTwVarAtom *Atom = static_cast(m_HierTags[m_HighlightedLine].m_Var); + double v, vmin, vmax; + v = Atom->ValueToDouble(); + Atom->MinMaxStepToDouble(&vmin, &vmax, NULL); + IsMax = (v>=vmax); + IsMin = (v<=vmin); + } + + /* + Gr->DrawRect(m_PosX+m_VarX2-2*bw+1, y0+1, m_PosX+m_VarX2-bw-1, y0+m_Font->m_CharHeight-2, (m_HighlightDecrBtn && !IsMin)?m_ColHighBtn:m_ColBtn); + Gr->DrawRect(m_PosX+m_VarX2-bw+1, y0+1, m_PosX+m_VarX2-1, y0+m_Font->m_CharHeight-2, (m_HighlightIncrBtn && !IsMax)?m_ColHighBtn:m_ColBtn); + // [-] + Gr->DrawLine(m_PosX+m_VarX2-2*bw+3+(bw>8?1:0), y0+m_Font->m_CharHeight/2, m_PosX+m_VarX2-bw-2-(bw>8?1:0), y0+m_Font->m_CharHeight/2, IsMin?m_ColValTextRO:m_ColTitleText); + // [+] + Gr->DrawLine(m_PosX+m_VarX2-bw+3, y0+m_Font->m_CharHeight/2, m_PosX+m_VarX2-2, y0+m_Font->m_CharHeight/2, IsMax?m_ColValTextRO:m_ColTitleText); + Gr->DrawLine(m_PosX+m_VarX2-bw/2, y0+m_Font->m_CharHeight/2-bw/2+2, m_PosX+m_VarX2-bw/2, y0+m_Font->m_CharHeight/2+bw/2-1, IsMax?m_ColValTextRO:m_ColTitleText); + */ + Gr->DrawRect(m_PosX+m_VarX2-3*bw+1, y0+1, m_PosX+m_VarX2-2*bw-1, y0+m_Font->m_CharHeight-2, (m_HighlightDecrBtn && !IsMin)?m_ColHighBtn:m_ColBtn); + Gr->DrawRect(m_PosX+m_VarX2-2*bw+1, y0+1, m_PosX+m_VarX2-bw-1, y0+m_Font->m_CharHeight-2, (m_HighlightIncrBtn && !IsMax)?m_ColHighBtn:m_ColBtn); + // [-] + Gr->DrawLine(m_PosX+m_VarX2-3*bw+3+(bw>8?1:0), y0+m_Font->m_CharHeight/2, m_PosX+m_VarX2-2*bw-2-(bw>8?1:0), y0+m_Font->m_CharHeight/2, IsMin?m_ColValTextRO:m_ColTitleText); + // [+] + Gr->DrawLine(m_PosX+m_VarX2-2*bw+3, y0+m_Font->m_CharHeight/2, m_PosX+m_VarX2-bw-2, y0+m_Font->m_CharHeight/2, IsMax?m_ColValTextRO:m_ColTitleText); + Gr->DrawLine(m_PosX+m_VarX2-bw-bw/2, y0+m_Font->m_CharHeight/2-bw/2+2, m_PosX+m_VarX2-bw-bw/2, y0+m_Font->m_CharHeight/2+bw/2-1, IsMax?m_ColValTextRO:m_ColTitleText); + } + else if( m_DrawListBtn ) + { + // [v] + int eps = 1; + int dx = -1; + Gr->DrawRect(m_PosX+m_VarX2-bw+1, y0+1, m_PosX+m_VarX2-1, y0+m_Font->m_CharHeight-2, m_HighlightListBtn?m_ColHighBtn:m_ColBtn); + Gr->DrawLine(m_PosX+m_VarX2-bw+4+dx, y0+m_Font->m_CharHeight/2-eps, m_PosX+m_VarX2-bw/2+1+dx, y0+m_Font->m_CharHeight-4, m_ColTitleText, true); + Gr->DrawLine(m_PosX+m_VarX2-bw/2+1+dx, y0+m_Font->m_CharHeight-4, m_PosX+m_VarX2-2+dx, y0+m_Font->m_CharHeight/2-1, m_ColTitleText, true); + } + else if( m_DrawBoolBtn ) + { + Gr->DrawRect(m_PosX+m_VarX2-bw+1, y0+1, m_PosX+m_VarX2-1, y0+m_Font->m_CharHeight-2, m_HighlightBoolBtn?m_ColHighBtn:m_ColBtn); + // [x] + //Gr->DrawLine(m_PosX+m_VarX2-bw/2-bw/6, y0+m_Font->m_CharHeight/2-bw/6, m_PosX+m_VarX2-bw/2+bw/6, y0+m_Font->m_CharHeight/2+bw/6, m_ColTitleText, true); + //Gr->DrawLine(m_PosX+m_VarX2-bw/2-bw/6, y0+m_Font->m_CharHeight/2+bw/6, m_PosX+m_VarX2-bw/2+bw/6, y0+m_Font->m_CharHeight/2-bw/6, m_ColTitleText, true); + // [<>] + int s = bw/4; + int eps = 1; + Gr->DrawLine(m_PosX+m_VarX2-bw/2-1, y0+m_Font->m_CharHeight/2-s, m_PosX+m_VarX2-bw/2-s-1, y0+m_Font->m_CharHeight/2, m_ColTitleText, true); + Gr->DrawLine(m_PosX+m_VarX2-bw/2-s-1, y0+m_Font->m_CharHeight/2, m_PosX+m_VarX2-bw/2-eps, y0+m_Font->m_CharHeight/2+s+1-eps, m_ColTitleText, true); + //Gr->DrawLine(m_PosX+m_VarX2-bw/2+1, y0+m_Font->m_CharHeight/2+s, m_PosX+m_VarX2-bw/2+s+1, y0+m_Font->m_CharHeight/2, m_ColTitleText, true); + //Gr->DrawLine(m_PosX+m_VarX2-bw/2+s+1, y0+m_Font->m_CharHeight/2, m_PosX+m_VarX2-bw/2+1, y0+m_Font->m_CharHeight/2-s, m_ColTitleText, true); + Gr->DrawLine(m_PosX+m_VarX2-bw/2+2, y0+m_Font->m_CharHeight/2-s, m_PosX+m_VarX2-bw/2+s+2, y0+m_Font->m_CharHeight/2, m_ColTitleText, true); + Gr->DrawLine(m_PosX+m_VarX2-bw/2+s+2, y0+m_Font->m_CharHeight/2, m_PosX+m_VarX2-bw/2+1+eps, y0+m_Font->m_CharHeight/2+s+1-eps, m_ColTitleText, true); + } + + if( m_DrawRotoBtn ) + { + // [o] rotoslider button + /* + Gr->DrawRect(m_PosX+m_VarX1-bw-1, y0+1, m_PosX+m_VarX1-3, y0+m_Font->m_CharHeight-2, m_HighlightRotoBtn?m_ColHighBtn:m_ColBtn); + Gr->DrawLine(m_PosX+m_VarX1-bw+bw/2-2, y0+m_Font->m_CharHeight/2-1, m_PosX+m_VarX1-bw+bw/2-1, y0+m_Font->m_CharHeight/2-1, m_ColTitleText); + Gr->DrawLine(m_PosX+m_VarX1-bw+bw/2-3, y0+m_Font->m_CharHeight/2+0, m_PosX+m_VarX1-bw+bw/2+0, y0+m_Font->m_CharHeight/2+0, m_ColTitleText); + Gr->DrawLine(m_PosX+m_VarX1-bw+bw/2-3, y0+m_Font->m_CharHeight/2+1, m_PosX+m_VarX1-bw+bw/2+0, y0+m_Font->m_CharHeight/2+1, m_ColTitleText); + Gr->DrawLine(m_PosX+m_VarX1-bw+bw/2-2, y0+m_Font->m_CharHeight/2+2, m_PosX+m_VarX1-bw+bw/2-1, y0+m_Font->m_CharHeight/2+2, m_ColTitleText); + */ + /* + Gr->DrawRect(m_PosX+m_VarX2-3*bw+1, y0+1, m_PosX+m_VarX2-2*bw-1, y0+m_Font->m_CharHeight-2, m_HighlightRotoBtn?m_ColHighBtn:m_ColBtn); + Gr->DrawLine(m_PosX+m_VarX2-3*bw+bw/2+0, y0+m_Font->m_CharHeight/2-1, m_PosX+m_VarX2-3*bw+bw/2+1, y0+m_Font->m_CharHeight/2-1, m_ColTitleText); + Gr->DrawLine(m_PosX+m_VarX2-3*bw+bw/2-1, y0+m_Font->m_CharHeight/2+0, m_PosX+m_VarX2-3*bw+bw/2+2, y0+m_Font->m_CharHeight/2+0, m_ColTitleText); + Gr->DrawLine(m_PosX+m_VarX2-3*bw+bw/2-1, y0+m_Font->m_CharHeight/2+1, m_PosX+m_VarX2-3*bw+bw/2+2, y0+m_Font->m_CharHeight/2+1, m_ColTitleText); + Gr->DrawLine(m_PosX+m_VarX2-3*bw+bw/2+0, y0+m_Font->m_CharHeight/2+2, m_PosX+m_VarX2-3*bw+bw/2+1, y0+m_Font->m_CharHeight/2+2, m_ColTitleText); + */ + int dy = 0; + Gr->DrawRect(m_PosX+m_VarX2-bw+1, y0+1, m_PosX+m_VarX2-1, y0+m_Font->m_CharHeight-2, m_HighlightRotoBtn?m_ColHighBtn:m_ColBtn); + Gr->DrawLine(m_PosX+m_VarX2-bw+bw/2+0, y0+m_Font->m_CharHeight/2-1+dy, m_PosX+m_VarX2-bw+bw/2+1, y0+m_Font->m_CharHeight/2-1+dy, m_ColTitleText, true); + Gr->DrawLine(m_PosX+m_VarX2-bw+bw/2-1, y0+m_Font->m_CharHeight/2+0+dy, m_PosX+m_VarX2-bw+bw/2+2, y0+m_Font->m_CharHeight/2+0+dy, m_ColTitleText, true); + Gr->DrawLine(m_PosX+m_VarX2-bw+bw/2-1, y0+m_Font->m_CharHeight/2+1+dy, m_PosX+m_VarX2-bw+bw/2+2, y0+m_Font->m_CharHeight/2+1+dy, m_ColTitleText, true); + Gr->DrawLine(m_PosX+m_VarX2-bw+bw/2+0, y0+m_Font->m_CharHeight/2+2+dy, m_PosX+m_VarX2-bw+bw/2+1, y0+m_Font->m_CharHeight/2+2+dy, m_ColTitleText, true); + } + } + + + // Draw value width slider + if( !m_HighlightValWidth ) + { + color32 col = m_DarkText ? COLOR32_WHITE : m_ColTitleText; + Gr->DrawRect(m_PosX+m_VarX1-2, m_PosY+m_VarY0-8, m_PosX+m_VarX1-1, m_PosY+m_VarY0-4, col); + Gr->DrawLine(m_PosX+m_VarX1-1, m_PosY+m_VarY0-3, m_PosX+m_VarX1, m_PosY+m_VarY0-3, m_ColLineShadow); + Gr->DrawLine(m_PosX+m_VarX1, m_PosY+m_VarY0-3, m_PosX+m_VarX1, m_PosY+m_VarY0-8, m_ColLineShadow); + } + else + { + color32 col = m_DarkText ? COLOR32_WHITE : m_ColTitleText; + Gr->DrawRect(m_PosX+m_VarX1-2, m_PosY+m_VarY0-8, m_PosX+m_VarX1-1, m_PosY+m_VarY1, col); + Gr->DrawLine(m_PosX+m_VarX1-1, m_PosY+m_VarY1+1, m_PosX+m_VarX1, m_PosY+m_VarY1+1, m_ColLineShadow); + Gr->DrawLine(m_PosX+m_VarX1, m_PosY+m_VarY1+1, m_PosX+m_VarX1, m_PosY+m_VarY0-8, m_ColLineShadow); + } + + // Draw labels & values headers + if (m_HighlightLabelsHeader) + { + Gr->DrawRect(m_PosX+m_VarX0, m_PosY+m_Font->m_CharHeight+2, m_PosX+m_VarX1-4, m_PosY+m_VarY0-1, m_ColHighBg0, m_ColHighBg0, m_ColHighBg1, m_ColHighBg1); + } + if (m_HighlightValuesHeader) + { + Gr->DrawRect(m_PosX+m_VarX1+2, m_PosY+m_Font->m_CharHeight+2, m_PosX+m_VarX2, m_PosY+m_VarY0-1, m_ColHighBg0, m_ColHighBg0, m_ColHighBg1, m_ColHighBg1); + } + } + + // Draw key shortcut text + if( m_HighlightedLine>=0 && m_HighlightedLine==m_ShortcutLine && !m_IsPopupList && !m_EditInPlace.m_Active ) + { + PERF( Timer.Reset(); ) + Gr->DrawRect(m_PosX+m_Font->m_CharHeight-2, m_PosY+m_VarY1+1, m_PosX+m_Width-m_Font->m_CharHeight-2, m_PosY+m_VarY1+1+m_Font->m_CharHeight, m_ColShortcutBg); + Gr->DrawText(m_ShortcutTextObj, m_PosX+m_Font->m_CharHeight, m_PosY+m_VarY1+1, m_ColShortcutText, 0); + PERF( DT = Timer.GetTime(); printf("Shortcut=%.4fms ", 1000.0*DT); ) + } + else if( (m_HighlightLabelsHeader || m_HighlightValuesHeader) && !m_IsPopupList && !m_EditInPlace.m_Active ) + { + Gr->DrawRect(m_PosX+m_Font->m_CharHeight-2, m_PosY+m_VarY1+1, m_PosX+m_Width-m_Font->m_CharHeight-2, m_PosY+m_VarY1+1+m_Font->m_CharHeight, m_ColShortcutBg); + Gr->DrawText(m_HeadersTextObj, m_PosX+m_Font->m_CharHeight, m_PosY+m_VarY1+1, m_ColShortcutText, 0); + } + else if( m_IsHelpBar ) + { + if( g_TwMgr->m_KeyPressedTextObj && g_TwMgr->m_KeyPressedStr.size()>0 ) // Draw key pressed + { + if( g_TwMgr->m_KeyPressedBuildText ) + { + string Str = g_TwMgr->m_KeyPressedStr; + ClampText(Str, m_Font, m_Width-2*m_Font->m_CharHeight); + g_TwMgr->m_Graph->BuildText(g_TwMgr->m_KeyPressedTextObj, &Str, NULL, NULL, 1, g_TwMgr->m_HelpBar->m_Font, 0, 0); + g_TwMgr->m_KeyPressedBuildText = false; + g_TwMgr->m_KeyPressedTime = (float)g_BarTimer.GetTime(); + } + if( (float)g_BarTimer.GetTime()>g_TwMgr->m_KeyPressedTime+1.0f ) // draw key pressed at least 1 second + g_TwMgr->m_KeyPressedStr = ""; + PERF( Timer.Reset(); ) + Gr->DrawRect(m_PosX+m_Font->m_CharHeight-2, m_PosY+m_VarY1+1, m_PosX+m_Width-m_Font->m_CharHeight-2, m_PosY+m_VarY1+1+m_Font->m_CharHeight, m_ColShortcutBg); + Gr->DrawText(g_TwMgr->m_KeyPressedTextObj, m_PosX+m_Font->m_CharHeight, m_PosY+m_VarY1+1, m_ColShortcutText, 0); + PERF( DT = Timer.GetTime(); printf("KeyPressed=%.4fms ", 1000.0*DT); ) + } + else + { + if( g_TwMgr->m_InfoBuildText ) + { + string Info = "> AntTweakBar"; + char Ver[64]; + sprintf(Ver, " (v%d.%02d)", TW_VERSION/100, TW_VERSION%100); + Info += Ver; + ClampText(Info, m_Font, m_Width-2*m_Font->m_CharHeight); + g_TwMgr->m_Graph->BuildText(g_TwMgr->m_InfoTextObj, &Info, NULL, NULL, 1, g_TwMgr->m_HelpBar->m_Font, 0, 0); + g_TwMgr->m_InfoBuildText = false; + } + PERF( Timer.Reset(); ) + Gr->DrawRect(m_PosX+m_Font->m_CharHeight-2, m_PosY+m_VarY1+1, m_PosX+m_Width-m_Font->m_CharHeight-2, m_PosY+m_VarY1+1+m_Font->m_CharHeight, m_ColShortcutBg); + Gr->DrawText(g_TwMgr->m_InfoTextObj, m_PosX+m_Font->m_CharHeight, m_PosY+m_VarY1+1, m_ColInfoText, 0); + PERF( DT = Timer.GetTime(); printf("Info=%.4fms ", 1000.0*DT); ) + } + } + + if( !m_IsPopupList ) + { + // Draw RotoSlider + RotoDraw(); + + // Draw EditInPlace + EditInPlaceDraw(); + } + + if( g_TwMgr->m_PopupBar!=NULL && this!=g_TwMgr->m_PopupBar ) + { + // darken bar if a popup bar is displayed + Gr->DrawRect(m_PosX, m_PosY, m_PosX+m_Width-1, m_PosY+m_Height-1, 0x1F000000); + } + } + } + else // minimized + { + int vpx, vpy, vpw, vph; + vpx = 0; + vpy = 0; + vpw = g_TwMgr->m_WndWidth; + vph = g_TwMgr->m_WndHeight; + if( g_TwMgr->m_IconMarginX>0 ) + { + vpx = min(g_TwMgr->m_IconMarginX, vpw/3); + vpw -= 2 * vpx; + } + if( g_TwMgr->m_IconMarginY>0 ) + { + vpy = min(g_TwMgr->m_IconMarginY, vph/3); + vph -= 2 * vpy; + } + + int MinXOffset = 0, MinYOffset = 0; + if( g_TwMgr->m_IconPos==3 ) // top-right + { + if( g_TwMgr->m_IconAlign==1 ) // horizontal + { + int n = max(1, vpw/m_Font->m_CharHeight-1); + m_MinPosX = vpx + vpw-((m_MinNumber%n)+1)*m_Font->m_CharHeight; + m_MinPosY = vpy + (m_MinNumber/n)*m_Font->m_CharHeight; + MinYOffset = m_Font->m_CharHeight; + MinXOffset = -m_TitleWidth; + } + else // vertical + { + int n = max(1, vph/m_Font->m_CharHeight-1); + m_MinPosY = vpy + (m_MinNumber%n)*m_Font->m_CharHeight; + m_MinPosX = vpx + vpw-((m_MinNumber/n)+1)*m_Font->m_CharHeight; + MinXOffset = -m_TitleWidth-m_Font->m_CharHeight; + } + } + else if( g_TwMgr->m_IconPos==2 ) // top-left + { + if( g_TwMgr->m_IconAlign==1 ) // horizontal + { + int n = max(1, vpw/m_Font->m_CharHeight-1); + m_MinPosX = vpx + (m_MinNumber%n)*m_Font->m_CharHeight; + m_MinPosY = vpy + (m_MinNumber/n)*m_Font->m_CharHeight; + MinYOffset = m_Font->m_CharHeight; + } + else // vertical + { + int n = max(1, vph/m_Font->m_CharHeight-1); + m_MinPosY = vpy + (m_MinNumber%n)*m_Font->m_CharHeight; + m_MinPosX = vpx + (m_MinNumber/n)*m_Font->m_CharHeight; + MinXOffset = m_Font->m_CharHeight; + } + } + else if( g_TwMgr->m_IconPos==1 ) // bottom-right + { + if( g_TwMgr->m_IconAlign==1 ) // horizontal + { + int n = max(1, vpw/m_Font->m_CharHeight-1); + m_MinPosX = vpx + vpw-((m_MinNumber%n)+1)*m_Font->m_CharHeight; + m_MinPosY = vpy + vph-((m_MinNumber/n)+1)*m_Font->m_CharHeight; + MinYOffset = -m_Font->m_CharHeight; + MinXOffset = -m_TitleWidth; + } + else // vertical + { + int n = max(1, vph/m_Font->m_CharHeight-1); + m_MinPosY = vpy + vph-((m_MinNumber%n)+1)*m_Font->m_CharHeight; + m_MinPosX = vpx + vpw-((m_MinNumber/n)+1)*m_Font->m_CharHeight; + MinXOffset = -m_TitleWidth-m_Font->m_CharHeight; + } + } + else // bottom-left + { + if( g_TwMgr->m_IconAlign==1 ) // horizontal + { + int n = max(1, vpw/m_Font->m_CharHeight-1); + m_MinPosX = vpx + (m_MinNumber%n)*m_Font->m_CharHeight; + m_MinPosY = vpy + vph-((m_MinNumber/n)+1)*m_Font->m_CharHeight; + MinYOffset = -m_Font->m_CharHeight; + } + else // vertical + { + int n = max(1, vph/m_Font->m_CharHeight-1); + m_MinPosY = vpy + vph-((m_MinNumber%n)+1)*m_Font->m_CharHeight; + m_MinPosX = vpx + (m_MinNumber/n)*m_Font->m_CharHeight; + MinXOffset = m_Font->m_CharHeight; + } + } + + if( m_HighlightMaximize ) + { + // Draw title + if( _DrawPart&DRAW_BG ) + { + Gr->DrawRect(m_MinPosX, m_MinPosY, m_MinPosX+m_Font->m_CharHeight, m_MinPosY+m_Font->m_CharHeight, m_ColTitleUnactiveBg); + Gr->DrawRect(m_MinPosX+MinXOffset, m_MinPosY+MinYOffset, m_MinPosX+MinXOffset+m_TitleWidth+m_Font->m_CharHeight, m_MinPosY+MinYOffset+m_Font->m_CharHeight, m_ColTitleUnactiveBg); + } + if( _DrawPart&DRAW_CONTENT ) + { + if( m_ColTitleShadow!=0 ) + Gr->DrawText(m_TitleTextObj, m_MinPosX+MinXOffset+m_Font->m_CharHeight/2, m_MinPosY+1+MinYOffset, m_ColTitleShadow, 0); + Gr->DrawText(m_TitleTextObj, m_MinPosX+MinXOffset+m_Font->m_CharHeight/2, m_MinPosY+MinYOffset, m_ColTitleText, 0); + } + } + + if( !m_IsHelpBar ) + { + // Draw maximize button + int xm = m_MinPosX+2, wm=m_Font->m_CharHeight-6; + wm = (wm<6) ? 6 : wm; + if( _DrawPart&DRAW_BG ) + Gr->DrawRect(xm+1, m_MinPosY+4, xm+wm-1, m_MinPosY+3+wm, m_HighlightMaximize?m_ColHighBtn:m_ColBtn); + if( _DrawPart&DRAW_CONTENT ) + { + Gr->DrawLine(xm, m_MinPosY+3, xm+wm, m_MinPosY+3, m_ColLine); + Gr->DrawLine(xm+wm, m_MinPosY+3, xm+wm, m_MinPosY+3+wm, m_ColLine); + Gr->DrawLine(xm+wm, m_MinPosY+3+wm, xm, m_MinPosY+3+wm, m_ColLine); + Gr->DrawLine(xm, m_MinPosY+3+wm, xm, m_MinPosY+3, m_ColLine); + Gr->DrawLine(xm+wm+1, m_MinPosY+4, xm+wm+1, m_MinPosY+4+wm, m_ColLineShadow); + Gr->DrawLine(xm+wm+1, m_MinPosY+4+wm, xm, m_MinPosY+4+wm, m_ColLineShadow); + Gr->DrawLine(xm+wm/3-1, m_MinPosY+3+wm-wm/3, xm+wm/2, m_MinPosY+6, m_ColTitleText, true); + Gr->DrawLine(xm+wm-wm/3+1, m_MinPosY+3+wm-wm/3, xm+wm/2, m_MinPosY+6, m_ColTitleText, true); + } + } + else + { + // Draw help button + int xm = m_MinPosX+2, wm=m_Font->m_CharHeight-6; + wm = (wm<6) ? 6 : wm; + if( _DrawPart&DRAW_BG ) + Gr->DrawRect(xm+1, m_MinPosY+4, xm+wm-1, m_MinPosY+3+wm, m_HighlightMaximize?m_ColHighBtn:m_ColBtn); + if( _DrawPart&DRAW_CONTENT ) + { + Gr->DrawLine(xm, m_MinPosY+3, xm+wm, m_MinPosY+3, m_ColLine); + Gr->DrawLine(xm+wm, m_MinPosY+3, xm+wm, m_MinPosY+3+wm, m_ColLine); + Gr->DrawLine(xm+wm, m_MinPosY+3+wm, xm, m_MinPosY+3+wm, m_ColLine); + Gr->DrawLine(xm, m_MinPosY+3+wm, xm, m_MinPosY+3, m_ColLine); + Gr->DrawLine(xm+wm+1, m_MinPosY+4, xm+wm+1, m_MinPosY+4+wm, m_ColLineShadow); + Gr->DrawLine(xm+wm+1, m_MinPosY+4+wm, xm, m_MinPosY+4+wm, m_ColLineShadow); + Gr->DrawLine(xm+wm/2-wm/6, m_MinPosY+3+wm/4, xm+wm-wm/3, m_MinPosY+3+wm/4, m_ColTitleText); + Gr->DrawLine(xm+wm-wm/3, m_MinPosY+3+wm/4, xm+wm-wm/3, m_MinPosY+3+wm/2, m_ColTitleText); + Gr->DrawLine(xm+wm-wm/3, m_MinPosY+3+wm/2, xm+wm/2, m_MinPosY+3+wm/2, m_ColTitleText); + Gr->DrawLine(xm+wm/2, m_MinPosY+3+wm/2, xm+wm/2, m_MinPosY+3+wm-wm/4, m_ColTitleText); + Gr->DrawLine(xm+wm/2, m_MinPosY+3+wm-wm/4+1, xm+wm/2, m_MinPosY+3+wm-wm/4+2, m_ColTitleText); + } + } + } +} + +// --------------------------------------------------------------------------- + +bool CTwBar::MouseMotion(int _X, int _Y) +{ + assert(g_TwMgr->m_Graph && g_TwMgr->m_WndHeight>0 && g_TwMgr->m_WndWidth>0); + if( !m_UpToDate ) + Update(); + + bool Handled = false; + bool CustomArea = false; + if( !m_IsMinimized ) + { + bool InBar = (_X>=m_PosX && _X=m_PosY && _Ym_Bars.size(); ++ib ) + if( g_TwMgr->m_Bars[ib]!=NULL ) + { + g_TwMgr->m_Bars[ib]->m_DrawHandles = false; + g_TwMgr->m_Bars[ib]->m_HighlightTitle = false; + } + m_DrawHandles = InBar; + const int ContainedMargin = 32; + + if( !m_MouseDrag ) + { + Handled = InBar; + m_HighlightedLine = -1; + m_HighlightIncrBtn = false; + m_HighlightDecrBtn = false; + m_HighlightRotoBtn = false; + if( abs(m_MouseOriginX-_X)>6 || abs(m_MouseOriginY-_Y)>6 ) + m_HighlightClickBtn = false; + m_HighlightListBtn = false; + m_HighlightTitle = false; + m_HighlightScroll = false; + m_HighlightUpScroll = false; + m_HighlightDnScroll = false; + m_HighlightMinimize = false; + m_HighlightFont = false; + m_HighlightValWidth = false; + m_HighlightLabelsHeader = false; + m_HighlightValuesHeader = false; + //if( InBar && _X>m_PosX+m_Font->m_CharHeight+1 && _X=m_PosY+m_VarY0 && _Ym_PosX+2 && _X=m_PosY+m_VarY0 && _Ym_CharHeight+m_Sep); + if( m_HighlightedLine>=(int)m_HierTags.size() ) + m_HighlightedLine = -1; + else if(m_HighlightedLine>=0) + m_HighlightedLineLastValid = m_HighlightedLine; + if( m_HighlightedLine<0 || m_HierTags[m_HighlightedLine].m_Var==NULL || m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + ANT_SET_CURSOR(Arrow); + else + { + if( !m_HierTags[m_HighlightedLine].m_Var->IsGroup() && static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_NoSlider ) + { + if( static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly && !m_IsHelpBar + && !(static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Type==TW_TYPE_BUTTON && static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_Val.m_Button.m_Callback==NULL) ) + ANT_SET_CURSOR(No); //(Arrow); + else + { + ANT_SET_CURSOR(Arrow); + CustomArea = true; + } + + if( m_DrawListBtn ) + { + m_HighlightListBtn = true; + CustomArea = false; + } + if( m_DrawBoolBtn ) + { + m_HighlightBoolBtn = true; + CustomArea = false; + } + } + else if( m_DrawRotoBtn && ( _X>=m_PosX+m_VarX2-IncrBtnWidth(m_Font->m_CharHeight) || _X=m_PosX+m_VarX2-2*IncrBtnWidth(m_Font->m_CharHeight) ) // [+] button + { + m_HighlightIncrBtn = true; + ANT_SET_CURSOR(Arrow); + } + else if( m_DrawIncrDecrBtn && _X>=m_PosX+m_VarX2-3*IncrBtnWidth(m_Font->m_CharHeight) ) // [-] button + { + m_HighlightDecrBtn = true; + ANT_SET_CURSOR(Arrow); + } + else if( !m_HierTags[m_HighlightedLine].m_Var->IsGroup() && static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly ) + { + if( !m_IsHelpBar ) + ANT_SET_CURSOR(No); + else + ANT_SET_CURSOR(Arrow); + } + else + //ANT_SET_CURSOR(Point); + ANT_SET_CURSOR(IBeam); + } + } + else if( InBar && m_Movable && !m_IsPopupList && _X>=m_PosX+2*m_Font->m_CharHeight && _Xm_CharHeight && _Ym_CharHeight ) + { // mouse over title + m_HighlightTitle = true; + ANT_SET_CURSOR(Move); + } + else if ( InBar && !m_IsPopupList && _X>=m_PosX+m_VarX1-5 && _Xm_PosY+m_Font->m_CharHeight && _Y=m_PosX+m_VarX0 && _Xm_PosY+m_Font->m_CharHeight && _Y=m_PosX+m_VarX1+5 && _Xm_PosY+m_Font->m_CharHeight && _Y=m_PosX && _Xm_CharHeight && _Y>=m_ScrollY0 && _Y=m_PosX+m_VarX2+2 && _X=m_ScrollY0 && _Y=m_PosX+m_VarX2+2 && _X=m_PosY+m_VarY0 && _Y=m_PosX+m_VarX2+2 && _X=m_ScrollY1 && _Y=m_PosX && _Xm_CharHeight && _Y>=m_PosY && _Ym_CharHeight ) + ANT_SET_CURSOR(TopLeft); + else if( InBar && !m_IsPopupList && _X>=m_PosX && _Xm_CharHeight && _Y>=m_PosY+m_Height-m_Font->m_CharHeight && _Y=m_PosX+m_Width-m_Font->m_CharHeight && _X=m_PosY && _Ym_CharHeight ) + ANT_SET_CURSOR(TopRight); + else if( InBar && m_Resizable && !m_IsPopupList && _X>=m_PosX+m_Width-m_Font->m_CharHeight && _X=m_PosY+m_Height-m_Font->m_CharHeight && _Ym_FontResizable && !m_IsPopupList && _X>=m_PosX+m_Font->m_CharHeight && _Xm_CharHeight && _Ym_CharHeight ) + { + m_HighlightFont = true; + ANT_SET_CURSOR(Arrow); + } + else if( InBar && m_Iconifiable && !m_IsPopupList && _X>=m_PosX+m_Width-2*m_Font->m_CharHeight && _Xm_CharHeight && _Ym_CharHeight ) + { + m_HighlightMinimize = true; + ANT_SET_CURSOR(Arrow); + } + else if( m_IsHelpBar && InBar && _X>=m_PosX+m_VarX0 && _Xm_CharHeight && _Y>m_PosY+m_Height-m_Font->m_CharHeight && _Y=0 && m_HighlightedLine<(int)m_HierTags.size() && m_HierTags[m_HighlightedLine].m_Var && !m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + /* + CTwVarAtom *Var = static_cast(m_HierTags[m_HighlightedLine].m_Var); + int Delta = _X-m_MouseOriginX; + if( Delta!=0 ) + { + if( !Var->m_NoSlider && !Var->m_ReadOnly ) + { + Var->Increment(Delta); + NotUpToDate(); + } + m_VarHasBeenIncr = true; + } + m_MouseOriginX = _X; + m_MouseOriginY = _Y; + if( !Var->m_NoSlider && !Var->m_ReadOnly ) + ANT_SET_CURSOR(Center); + //ANT_SET_CURSOR(WE); + else + ANT_SET_CURSOR(Arrow); + Handled = true; + */ + + // move rotoslider + if( !static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_NoSlider ) + RotoOnMouseMove(_X, _Y); + + if( static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly ) + ANT_SET_CURSOR(No); + else if( static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_NoSlider ) + { + ANT_SET_CURSOR(Arrow); + CustomArea = true; + } + m_VarHasBeenIncr = true; + Handled = true; + m_DrawHandles = true; + } + else if( m_MouseDragTitle ) + { + int y = m_PosY; + m_PosX += _X-m_MouseOriginX; + m_PosY += _Y-m_MouseOriginY; + m_MouseOriginX = _X; + m_MouseOriginY = _Y; + int vpx, vpy, vpw, vph; + vpx = 0; + vpy = 0; + vpw = g_TwMgr->m_WndWidth; + vph = g_TwMgr->m_WndHeight; + if( m_Contained ) + { + if( m_PosX+m_Width>vpx+vpw ) + m_PosX = vpx+vpw-m_Width; + if( m_PosXvpy+vph ) + m_PosY = vpy+vph-m_Height; + if( m_PosYvpx+vpw ) + m_PosX = vpx+vpw-ContainedMargin; + if( m_PosX+m_Widthvpy+vph ) + m_PosY = vpy+vph-ContainedMargin; + if( m_PosY+m_Heightm_HelpBarNotUpToDate = true; + ANT_SET_CURSOR(WE); + Handled = true; + m_DrawHandles = true; + } + else if( m_MouseDragScroll ) + { + if( m_ScrollYH>0 ) + { + int dl = ((_Y-m_MouseOriginY)*m_NbHierLines)/m_ScrollYH; + if( m_FirstLine0+dl<0 ) + m_FirstLine = 0; + else if( m_FirstLine0+dl+m_NbDisplayedLines>m_NbHierLines ) + m_FirstLine = m_NbHierLines-m_NbDisplayedLines; + else + m_FirstLine = m_FirstLine0+dl; + NotUpToDate(); + } + #ifdef ANT_WINDOWS + ANT_SET_CURSOR(NS); + #else + ANT_SET_CURSOR(Arrow); + #endif + Handled = true; + m_DrawHandles = true; + } + else if( m_MouseDragResizeUL ) + { + int w = m_Width; + int h = m_Height; + m_PosX += _X-m_MouseOriginX; + m_PosY += _Y-m_MouseOriginY; + m_Width -= _X-m_MouseOriginX; + m_Height -= _Y-m_MouseOriginY; + m_MouseOriginX = _X; + m_MouseOriginY = _Y; + int vpx = 0, vpy = 0, vpw = g_TwMgr->m_WndWidth, vph = g_TwMgr->m_WndHeight; + if( !m_Contained ) + { + if( m_PosX+ContainedMargin>vpx+vpw ) + m_PosX = vpx+vpw-ContainedMargin; + if( m_PosX+m_Widthvpy+vph ) + m_PosY = vpy+vph-ContainedMargin; + if( m_PosY+m_Height 0) + m_ValuesWidth = int(m_ValuesWidthRatio * m_Width + 0.5); + ANT_SET_CURSOR(TopLeft); + NotUpToDate(); + if( m_IsHelpBar ) + { + g_TwMgr->m_HelpBarNotUpToDate = true; + g_TwMgr->m_HelpBarUpdateNow = true; + } + g_TwMgr->m_KeyPressedBuildText = true; + g_TwMgr->m_InfoBuildText = true; + Handled = true; + m_DrawHandles = true; + } + else if( m_MouseDragResizeUR ) + { + int h = m_Height; + m_PosY += _Y-m_MouseOriginY; + m_Width += _X-m_MouseOriginX; + m_Height -= _Y-m_MouseOriginY; + m_MouseOriginX = _X; + m_MouseOriginY = _Y; + int vpx = 0, vpy = 0, vpw = g_TwMgr->m_WndWidth, vph = g_TwMgr->m_WndHeight; + if( !m_Contained ) + { + if( m_PosX+ContainedMargin>vpx+vpw ) + m_PosX = vpx+vpw-ContainedMargin; + if( m_PosX+m_Widthvpy+vph ) + m_PosY = vpy+vph-ContainedMargin; + if( m_PosY+m_Heightvpx+vpw ) + m_Width = vpx+vpw-m_PosX; + if( m_PosY 0) + m_ValuesWidth = int(m_ValuesWidthRatio * m_Width + 0.5); + ANT_SET_CURSOR(TopRight); + NotUpToDate(); + if( m_IsHelpBar ) + { + g_TwMgr->m_HelpBarNotUpToDate = true; + g_TwMgr->m_HelpBarUpdateNow = true; + } + g_TwMgr->m_KeyPressedBuildText = true; + g_TwMgr->m_InfoBuildText = true; + Handled = true; + m_DrawHandles = true; + } + else if( m_MouseDragResizeLL ) + { + int w = m_Width; + m_PosX += _X-m_MouseOriginX; + m_Width -= _X-m_MouseOriginX; + m_Height += _Y-m_MouseOriginY; + m_MouseOriginX = _X; + m_MouseOriginY = _Y; + int vpx = 0, vpy = 0, vpw = g_TwMgr->m_WndWidth, vph = g_TwMgr->m_WndHeight; + if( !m_Contained ) + { + if( m_PosX+ContainedMargin>vpx+vpw ) + m_PosX = vpx+vpw-ContainedMargin; + if( m_PosX+m_Widthvpy+vph ) + m_PosY = vpy+vph-ContainedMargin; + if( m_PosY+m_Heightvpy+vph ) + m_Height = vpy+vph-m_PosY; + if( m_PosX 0) + m_ValuesWidth = int(m_ValuesWidthRatio * m_Width + 0.5); + ANT_SET_CURSOR(BottomLeft); + NotUpToDate(); + if( m_IsHelpBar ) + { + g_TwMgr->m_HelpBarNotUpToDate = true; + g_TwMgr->m_HelpBarUpdateNow = true; + } + g_TwMgr->m_KeyPressedBuildText = true; + g_TwMgr->m_InfoBuildText = true; + Handled = true; + m_DrawHandles = true; + } + else if( m_MouseDragResizeLR ) + { + m_Width += _X-m_MouseOriginX; + m_Height += _Y-m_MouseOriginY; + m_MouseOriginX = _X; + m_MouseOriginY = _Y; + int vpx = 0, vpy = 0, vpw = g_TwMgr->m_WndWidth, vph = g_TwMgr->m_WndHeight; + if( !m_Contained ) + { + if( m_PosX+ContainedMargin>vpx+vpw ) + m_PosX = vpx+vpw-ContainedMargin; + if( m_PosX+m_Widthvpy+vph ) + m_PosY = vpy+vph-ContainedMargin; + if( m_PosY+m_Heightvpx+vpw ) + m_Width = vpx+vpw-m_PosX; + if( m_PosY+m_Height>vpy+vph ) + m_Height = vpy+vph-m_PosY; + } + if (m_ValuesWidthRatio > 0) + m_ValuesWidth = int(m_ValuesWidthRatio * m_Width + 0.5); + ANT_SET_CURSOR(BottomRight); + NotUpToDate(); + if( m_IsHelpBar ) + { + g_TwMgr->m_HelpBarNotUpToDate = true; + g_TwMgr->m_HelpBarUpdateNow = true; + } + g_TwMgr->m_KeyPressedBuildText = true; + g_TwMgr->m_InfoBuildText = true; + Handled = true; + m_DrawHandles = true; + } + else if( m_EditInPlace.m_Active ) + { + EditInPlaceMouseMove(_X, _Y, true); + ANT_SET_CURSOR(IBeam); + Handled = true; + } + //else if( InBar ) + // ANT_SET_CURSOR(Arrow); + } + } + else // minimized + { + if( m_Iconifiable && _X>=m_MinPosX+2 && _Xm_CharHeight && _Y>m_MinPosY && _Ym_CharHeight-2 ) + { + m_HighlightMaximize = true; + if( !m_IsHelpBar ) + ANT_SET_CURSOR(Arrow); + else + #ifdef ANT_WINDOWS + ANT_SET_CURSOR(Help); + #else + ANT_SET_CURSOR(Arrow); + #endif + Handled = true; + } + else + m_HighlightMaximize = false; + } + + // Handled by a custom widget? + CTwMgr::CStructProxy *currentCustomActiveStructProxy = NULL; + if( g_TwMgr!=NULL && (!Handled || CustomArea) && !m_IsMinimized && m_CustomRecords.size()>0 ) + { + bool CustomHandled = false; + for( int s=0; s<2; ++s ) // 2 iterations: first for custom widget having focus, second for others if no focused widget. + for( CustomMap::iterator it=m_CustomRecords.begin(); it!=m_CustomRecords.end(); ++it ) + { + CTwMgr::CStructProxy *sProxy = it->first; + const CCustomRecord& r = it->second; + if( (s==1 || sProxy->m_CustomCaptureFocus) && !CustomHandled && sProxy!=NULL && sProxy->m_CustomMouseMotionCallback!=NULL && r.m_XMin=r.m_Y0 && r.m_YMax<=r.m_Y1 ) + { + if( sProxy->m_CustomCaptureFocus || (_X>=r.m_XMin && _X=r.m_YMin && _Ym_CustomMouseMotionCallback(_X-r.m_XMin, _Y-r.m_Y0, r.m_XMax-r.m_XMin, r.m_Y1-r.m_Y0, sProxy->m_StructExtData, sProxy->m_StructClientData, this, r.m_Var); + currentCustomActiveStructProxy = sProxy; + s = 2; // force s-loop exit + } + } + else if( sProxy!=NULL ) + { + sProxy->m_CustomCaptureFocus = false; // force free focus, just in case. + ANT_SET_CURSOR(Arrow); + } + } + if( CustomHandled ) + Handled = true; + } + // If needed, send a 'MouseLeave' message to previously active custom struct + if( g_TwMgr!=NULL && m_CustomActiveStructProxy!=NULL && m_CustomActiveStructProxy!=currentCustomActiveStructProxy ) + { + bool found = false; + for( list::iterator it=g_TwMgr->m_StructProxies.begin(); it!=g_TwMgr->m_StructProxies.end() && !found; ++it ) + found = (&(*it)==m_CustomActiveStructProxy); + if( found && m_CustomActiveStructProxy->m_CustomMouseLeaveCallback!=NULL ) + m_CustomActiveStructProxy->m_CustomMouseLeaveCallback(m_CustomActiveStructProxy->m_StructExtData, m_CustomActiveStructProxy->m_StructClientData, this); + } + m_CustomActiveStructProxy = currentCustomActiveStructProxy; + + return Handled; +} + +// --------------------------------------------------------------------------- + +#ifdef ANT_WINDOWS +# pragma optimize("", off) +// disable optimizations because the conversion of Enum from unsigned int to double is not always exact if optimized and GraphAPI=DirectX ! +#endif +static void ANT_CALL PopupCallback(void *_ClientData) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr!=NULL && g_TwMgr->m_PopupBar!=NULL ) + { + unsigned int Enum = *(unsigned int *)&_ClientData; + CTwVarAtom *Var = g_TwMgr->m_PopupBar->m_VarEnumLinkedToPopupList; + CTwBar *Bar = g_TwMgr->m_PopupBar->m_BarLinkedToPopupList; + if( Bar!=NULL && Var!=NULL && !Var->m_ReadOnly && IsEnumType(Var->m_Type) ) + { + Var->ValueFromDouble(Enum); + //Bar->UnHighlightLine(); + Bar->HaveFocus(true); + Bar->NotUpToDate(); + } + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } +} +#ifdef ANT_WINDOWS +# pragma optimize("", on) +#endif + +// --------------------------------------------------------------------------- + +bool CTwBar::MouseButton(ETwMouseButtonID _Button, bool _Pressed, int _X, int _Y) +{ + assert(g_TwMgr->m_Graph && g_TwMgr->m_WndHeight>0 && g_TwMgr->m_WndWidth>0); + bool Handled = false; + if( !m_UpToDate ) + Update(); + bool EditInPlaceActive = false; + bool CustomArea = false; + + if( !m_IsMinimized ) + { + Handled = (_X>=m_PosX && _X=m_PosY && _Y=0 && m_HighlightedLine<(int)m_HierTags.size() && m_HierTags[m_HighlightedLine].m_Var ) + { + if( m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + if( _Pressed && !g_TwMgr->m_IsRepeatingMousePressed ) + { + CTwVarGroup *Grp = static_cast(m_HierTags[m_HighlightedLine].m_Var); + Grp->m_Open = !Grp->m_Open; + NotUpToDate(); + ANT_SET_CURSOR(Arrow); + } + } + else if( _Pressed && m_HighlightIncrBtn ) + { + static_cast(m_HierTags[m_HighlightedLine].m_Var)->Increment(1); + if( g_TwMgr==NULL ) // Mgr might have been destroyed by the client inside a callback call + return 1; + NotUpToDate(); + } + else if( _Pressed && m_HighlightDecrBtn ) + { + static_cast(m_HierTags[m_HighlightedLine].m_Var)->Increment(-1); + if( g_TwMgr==NULL ) // Mgr might have been destroyed by the client inside a callback call + return 1; + NotUpToDate(); + } + else if( _Pressed && !m_MouseDrag ) + { + m_MouseDrag = true; + m_MouseDragVar = true; + m_MouseOriginX = _X; + m_MouseOriginY = _Y; + m_VarHasBeenIncr = false; + CTwVarAtom * Var = static_cast(m_HierTags[m_HighlightedLine].m_Var); + if( !Var->m_NoSlider && !Var->m_ReadOnly && m_HighlightRotoBtn ) + { + // begin rotoslider + if( _X>m_PosX+m_VarX1 ) + RotoOnLButtonDown(m_PosX+m_VarX2-(1*IncrBtnWidth(m_Font->m_CharHeight))/2, _Y); + else + RotoOnLButtonDown(_X, _Y); + m_MouseDrag = true; + m_MouseDragVar = true; + } + else if( (Var->m_Type==TW_TYPE_BOOL8 || Var->m_Type==TW_TYPE_BOOL16 || Var->m_Type==TW_TYPE_BOOL32 || Var->m_Type==TW_TYPE_BOOLCPP) && !Var->m_ReadOnly ) + { + Var->Increment(1); + //m_HighlightClickBtn = true; + m_VarHasBeenIncr = true; + m_MouseDragVar = false; + m_MouseDrag = false; + NotUpToDate(); + } + else if( Var->m_Type==TW_TYPE_BUTTON && !Var->m_ReadOnly ) + { + m_HighlightClickBtn = true; + m_MouseDragVar = false; + m_MouseDrag = false; + } + //else if( (Var->m_Type==TW_TYPE_ENUM8 || Var->m_Type==TW_TYPE_ENUM16 || Var->m_Type==TW_TYPE_ENUM32) && !Var->m_ReadOnly ) + else if( IsEnumType(Var->m_Type) && !Var->m_ReadOnly && !g_TwMgr->m_IsRepeatingMousePressed ) + { + m_MouseDragVar = false; + m_MouseDrag = false; + if( g_TwMgr->m_PopupBar!=NULL ) + { + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } + // popup list + CTwMgr::CEnum& e = g_TwMgr->m_Enums[Var->m_Type-TW_TYPE_ENUM_BASE]; + g_TwMgr->m_PopupBar = TwNewBar("~ Enum Popup ~"); + g_TwMgr->m_PopupBar->m_IsPopupList = true; + g_TwMgr->m_PopupBar->m_Color = m_Color; + g_TwMgr->m_PopupBar->m_DarkText = m_DarkText; + g_TwMgr->m_PopupBar->m_PosX = m_PosX + m_VarX1 - 2; + g_TwMgr->m_PopupBar->m_PosY = m_PosY + m_VarY0 + (m_HighlightedLine+1)*(m_Font->m_CharHeight+m_Sep); + g_TwMgr->m_PopupBar->m_Width = m_Width - 2*m_Font->m_CharHeight; + int popHeight0 = (int)e.m_Entries.size()*(m_Font->m_CharHeight+m_Sep) + m_Font->m_CharHeight/2+2; + int popHeight = popHeight0; + if( g_TwMgr->m_PopupBar->m_PosY+popHeight+2 > g_TwMgr->m_WndHeight ) + popHeight = g_TwMgr->m_WndHeight-g_TwMgr->m_PopupBar->m_PosY-2; + if( popHeightm_WndHeight/2 ) + popHeight = min(popHeight0, g_TwMgr->m_WndHeight/2); + if( popHeight<3*(m_Font->m_CharHeight+m_Sep) ) + popHeight = 3*(m_Font->m_CharHeight+m_Sep); + g_TwMgr->m_PopupBar->m_Height = popHeight; + g_TwMgr->m_PopupBar->m_VarEnumLinkedToPopupList = Var; + g_TwMgr->m_PopupBar->m_BarLinkedToPopupList = this; + unsigned int CurrentEnumValue = (unsigned int)((int)Var->ValueToDouble()); + for( CTwMgr::CEnum::CEntries::iterator It=e.m_Entries.begin(); It!=e.m_Entries.end(); ++It ) + { + char ID[64]; + sprintf(ID, "%u", It->first); + //ultoa(It->first, ID, 10); + TwAddButton(g_TwMgr->m_PopupBar, ID, PopupCallback, *(void**)&(It->first), NULL); + CTwVar *Btn = g_TwMgr->m_PopupBar->Find(ID); + if( Btn!=NULL ) + { + Btn->m_Label = It->second.c_str(); + if( It->first==CurrentEnumValue ) + { + Btn->m_ColorPtr = &m_ColValTextNE; + Btn->m_BgColorPtr = &m_ColGrpBg; + } + } + } + g_TwMgr->m_HelpBarNotUpToDate = false; + } + else if( (Var->m_ReadOnly && (Var->m_Type==TW_TYPE_CDSTRING || Var->m_Type==TW_TYPE_CDSTDSTRING || Var->m_Type==TW_TYPE_STDSTRING || IsCSStringType(Var->m_Type)) && EditInPlaceAcceptVar(Var)) + || (!Var->m_ReadOnly && EditInPlaceAcceptVar(Var)) ) + { + int dw = 0; + //if( m_DrawIncrDecrBtn ) + // dw = 2*IncrBtnWidth(m_Font->m_CharHeight); + if( !m_EditInPlace.m_Active || m_EditInPlace.m_Var!=Var ) + { + EditInPlaceStart(Var, m_VarX1, m_VarY0+(m_HighlightedLine)*(m_Font->m_CharHeight+m_Sep), m_VarX2-m_VarX1-dw-1); + if( EditInPlaceIsReadOnly() ) + EditInPlaceMouseMove(_X, _Y, false); + m_MouseDrag = false; + m_MouseDragVar = false; + } + else + { + EditInPlaceMouseMove(_X, _Y, false); + m_MouseDrag = true; + m_MouseDragVar = false; + } + EditInPlaceActive = m_EditInPlace.m_Active; + if( Var->m_ReadOnly ) + ANT_SET_CURSOR(No); + else + ANT_SET_CURSOR(IBeam); + } + else if( Var->m_ReadOnly ) + ANT_SET_CURSOR(No); + else + { + ANT_SET_CURSOR(Arrow); + CustomArea = true; + } + } + else if ( !_Pressed && m_MouseDragVar ) + { + m_MouseDrag = false; + m_MouseDragVar = false; + if( !Handled ) + m_DrawHandles = false; + Handled = true; + // end rotoslider + RotoOnLButtonUp(_X, _Y); + + /* Incr/decr on right or left click + if( !m_VarHasBeenIncr && !static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly ) + { + if( _Button==TW_MOUSE_LEFT ) + static_cast(m_HierTags[m_HighlightedLine].m_Var)->Increment(-1); + else if( _Button==TW_MOUSE_RIGHT ) + static_cast(m_HierTags[m_HighlightedLine].m_Var)->Increment(1); + NotUpToDate(); + } + */ + + if( static_cast(m_HierTags[m_HighlightedLine].m_Var)->m_ReadOnly ) + ANT_SET_CURSOR(No); + else + { + ANT_SET_CURSOR(Arrow); + CustomArea = true; + } + } + else if( !_Pressed && m_HighlightClickBtn ) // a button variable is activated + { + m_HighlightClickBtn = false; + m_MouseDragVar = false; + m_MouseDrag = false; + Handled = true; + NotUpToDate(); + if( !m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + CTwVarAtom * Var = static_cast(m_HierTags[m_HighlightedLine].m_Var); + if( !Var->m_ReadOnly && Var->m_Type==TW_TYPE_BUTTON && Var->m_Val.m_Button.m_Callback!=NULL ) + { + Var->m_Val.m_Button.m_Callback(Var->m_ClientData); + if( g_TwMgr==NULL ) // Mgr might have been destroyed by the client inside a callback call + return 1; + } + } + } + else if( !_Pressed ) + { + m_MouseDragVar = false; + m_MouseDrag = false; + CustomArea = true; + } + } + else if( _Pressed && !m_MouseDrag && m_Movable && !m_IsPopupList + && ( (_Button==TW_MOUSE_LEFT && _X>=m_PosX+2*m_Font->m_CharHeight && _Xm_CharHeight && _Y>=m_PosY && _Ym_CharHeight) + || (_Button==TW_MOUSE_MIDDLE && _X>=m_PosX && _X=m_PosY && _Y=m_PosX+m_VarX1-3 && _Xm_PosY+m_Font->m_CharHeight && _Y=m_PosX+m_VarX2+2 && _X=m_ScrollY0 && _Y=m_PosX+m_VarX2+2 && _X=m_PosY+m_VarY0 && _Y0 ) + { + --m_FirstLine; + NotUpToDate(); + } + } + else if( _Pressed && _Button==TW_MOUSE_LEFT && _X>=m_PosX+m_VarX2+2 && _X=m_ScrollY1 && _Y=m_PosX && _Xm_CharHeight && _Y>=m_PosY && _Ym_CharHeight ) + { + m_MouseDrag = true; + m_MouseDragResizeUL = true; + m_MouseOriginX = _X; + m_MouseOriginY = _Y; + m_ValuesWidthRatio = (m_Width>0) ? (double)m_ValuesWidth/m_Width : 0; + ANT_SET_CURSOR(TopLeft); + } + else if( !_Pressed && m_MouseDragResizeUL ) + { + m_MouseDrag = false; + m_MouseDragResizeUL = false; + ANT_SET_CURSOR(Arrow); + } + else if( _Pressed && !m_MouseDrag && m_Resizable && !m_IsPopupList && _Button==TW_MOUSE_LEFT && _X>=m_PosX+m_Width-m_Font->m_CharHeight && _X=m_PosY && _Ym_CharHeight ) + { + m_MouseDrag = true; + m_MouseDragResizeUR = true; + m_MouseOriginX = _X; + m_MouseOriginY = _Y; + m_ValuesWidthRatio = (m_Width>0) ? (double)m_ValuesWidth/m_Width : 0; + ANT_SET_CURSOR(TopRight); + } + else if( !_Pressed && m_MouseDragResizeUR ) + { + m_MouseDrag = false; + m_MouseDragResizeUR = false; + ANT_SET_CURSOR(Arrow); + } + else if( _Pressed && !m_MouseDrag && m_Resizable && !m_IsPopupList && _Button==TW_MOUSE_LEFT && _X>=m_PosX && _Xm_CharHeight && _Y>=m_PosY+m_Height-m_Font->m_CharHeight && _Y0) ? (double)m_ValuesWidth/m_Width : 0; + ANT_SET_CURSOR(BottomLeft); + } + else if( !_Pressed && m_MouseDragResizeLL ) + { + m_MouseDrag = false; + m_MouseDragResizeLL = false; + ANT_SET_CURSOR(Arrow); + } + else if( _Pressed && !m_MouseDrag && m_Resizable && !m_IsPopupList && _Button==TW_MOUSE_LEFT && _X>=m_PosX+m_Width-m_Font->m_CharHeight && _X=m_PosY+m_Height-m_Font->m_CharHeight && _Y0) ? (double)m_ValuesWidth/m_Width : 0; + ANT_SET_CURSOR(BottomRight); + } + else if( !_Pressed && m_MouseDragResizeLR ) + { + m_MouseDrag = false; + m_MouseDragResizeLR = false; + ANT_SET_CURSOR(Arrow); + } + else if( _Pressed && !m_IsPopupList && _Button==TW_MOUSE_LEFT && m_HighlightLabelsHeader ) + { + int w = ComputeLabelsWidth(m_Font); + if( wm_CharHeight ) + w = m_Font->m_CharHeight; + m_ValuesWidth = m_VarX2 - m_VarX0 - w; + if( m_ValuesWidthm_CharHeight ) + m_ValuesWidth = m_Font->m_CharHeight; + if( m_ValuesWidth>m_VarX2 - m_VarX0 ) + m_ValuesWidth = max(m_VarX2 - m_VarX0 - m_Font->m_CharHeight, 0); + NotUpToDate(); + ANT_SET_CURSOR(Arrow); + } + else if( _Pressed && !m_IsPopupList && _Button==TW_MOUSE_LEFT && m_HighlightValuesHeader ) + { + int w = ComputeValuesWidth(m_Font); + if( w<2*m_Font->m_CharHeight ) + w = 2*m_Font->m_CharHeight; // enough to draw a button + m_ValuesWidth = w; + if( m_ValuesWidth>m_VarX2 - m_VarX0 ) + m_ValuesWidth = max(m_VarX2 - m_VarX0 - m_Font->m_CharHeight, 0); + NotUpToDate(); + ANT_SET_CURSOR(Arrow); + } + else if( _Pressed && g_TwMgr->m_FontResizable && !m_IsPopupList && _X>=m_PosX+m_Font->m_CharHeight && _Xm_CharHeight && _Y>m_PosY && _Ym_CharHeight ) + { + // change font + if( _Button==TW_MOUSE_LEFT ) + { + if( m_Font==g_DefaultSmallFont ) + g_TwMgr->SetFont(g_DefaultNormalFont, true); + else if( m_Font==g_DefaultNormalFont ) + g_TwMgr->SetFont(g_DefaultLargeFont, true); + else if( m_Font==g_DefaultLargeFont ) + g_TwMgr->SetFont(g_DefaultSmallFont, true); + else + g_TwMgr->SetFont(g_DefaultNormalFont, true); + } + else if( _Button==TW_MOUSE_RIGHT ) + { + if( m_Font==g_DefaultSmallFont ) + g_TwMgr->SetFont(g_DefaultLargeFont, true); + else if( m_Font==g_DefaultNormalFont ) + g_TwMgr->SetFont(g_DefaultSmallFont, true); + else if( m_Font==g_DefaultLargeFont ) + g_TwMgr->SetFont(g_DefaultNormalFont, true); + else + g_TwMgr->SetFont(g_DefaultNormalFont, true); + } + + ANT_SET_CURSOR(Arrow); + } + else if( _Pressed && m_Iconifiable && !m_IsPopupList && _Button==TW_MOUSE_LEFT && _X>=m_PosX+m_Width-2*m_Font->m_CharHeight && _Xm_CharHeight && _Y>m_PosY && _Ym_CharHeight ) + { + // minimize + g_TwMgr->Minimize(this); + ANT_SET_CURSOR(Arrow); + } + else if( m_IsHelpBar && _Pressed && !g_TwMgr->m_IsRepeatingMousePressed && _X>=m_PosX+m_VarX0 && _Xm_CharHeight && _Y>m_PosY+m_Height-m_Font->m_CharHeight && _Y& null &", browser, WebPage); + if( system(cmd) ) {} // avoiding warn_unused_result + browser = strtok(NULL, ","); // grab the next browser + } + #elif defined ANT_OSX + char cmd[256]; + snprintf(cmd, sizeof(cmd), "open \"%s\" 1>& null &", WebPage); + if( system(cmd) ) {} // avoiding warn_unused_result + #endif + ANT_SET_CURSOR(Hand); + */ + } + else + { + CustomArea = true; + } + } + else // minimized + { + if( _Pressed && m_HighlightMaximize ) + { + m_HighlightMaximize = false; + g_TwMgr->Maximize(this); + ANT_SET_CURSOR(Arrow); + Handled = true; + } + } + + if( g_TwMgr!=NULL ) // Mgr might have been destroyed by the client inside a callback call + if( _Pressed && !EditInPlaceActive && m_EditInPlace.m_Active ) + EditInPlaceEnd(true); + + // Handled by a custom widget? + if( g_TwMgr!=NULL && (!Handled || CustomArea) && !m_IsMinimized && m_CustomRecords.size()>0 ) + { + bool CustomHandled = false; + for( int s=0; s<2; ++s ) // 2 iterations: first for custom widget having focus, second for others if no focused widget. + for( CustomMap::iterator it=m_CustomRecords.begin(); it!=m_CustomRecords.end(); ++it ) + { + CTwMgr::CStructProxy *sProxy = it->first; + const CCustomRecord& r = it->second; + if( (s==1 || sProxy->m_CustomCaptureFocus) && !CustomHandled && sProxy!=NULL && sProxy->m_CustomMouseButtonCallback!=NULL && r.m_XMin=r.m_Y0 && r.m_YMax<=r.m_Y1 ) + { + if( sProxy->m_CustomCaptureFocus || (_X>=r.m_XMin && _X=r.m_YMin && _Ym_CustomCaptureFocus = _Pressed; + CustomHandled = sProxy->m_CustomMouseButtonCallback(_Button, _Pressed, _X-r.m_XMin, _Y-r.m_Y0, r.m_XMax-r.m_XMin, r.m_Y1-r.m_Y0, sProxy->m_StructExtData, sProxy->m_StructClientData, this, r.m_Var); + s = 2; // force s-loop exit + } + } + else if( sProxy!=NULL ) + { + sProxy->m_CustomCaptureFocus = false; // force free focus, just in case. + ANT_SET_CURSOR(Arrow); + } + } + if( CustomHandled ) + Handled = true; + } + + return Handled; +} + + +// --------------------------------------------------------------------------- + +bool CTwBar::MouseWheel(int _Pos, int _PrevPos, int _MouseX, int _MouseY) +{ + assert(g_TwMgr->m_Graph && g_TwMgr->m_WndHeight>0 && g_TwMgr->m_WndWidth>0); + if( !m_UpToDate ) + Update(); + + bool Handled = false; + if( !m_IsMinimized && _MouseX>=m_PosX && _MouseX=m_PosY && _MouseY_PrevPos && m_FirstLine>0 ) + { + --m_FirstLine; + NotUpToDate(); + } + else if( _Pos<_PrevPos && m_FirstLine' ' && _Key<256 ) // don't test SHIFT if _Key is a common key + Mask &= ~TW_KMOD_SHIFT; + + // don't test KMOD_NUM and KMOD_CAPS modifiers coming from SDL + Mask &= ~(0x1000); // 0x1000 is the KMOD_NUM value defined in SDL_keysym.h + Mask &= ~(0x2000); // 0x2000 is the KMOD_CAPS value defined in SDL_keysym.h + + // complete partial modifiers comming from SDL + if( _Modifiers & TW_KMOD_SHIFT ) + _Modifiers |= TW_KMOD_SHIFT; + if( _Modifiers & TW_KMOD_CTRL ) + _Modifiers |= TW_KMOD_CTRL; + if( _Modifiers & TW_KMOD_ALT ) + _Modifiers |= TW_KMOD_ALT; + if( _Modifiers & TW_KMOD_META ) + _Modifiers |= TW_KMOD_META; + + for(size_t i=0; iIsGroup() ) + { + Atom = static_cast(m_Vars[i])->FindShortcut(_Key, _Modifiers, _DoIncr); + if( Atom!=NULL ) + return Atom; + } + else + { + Atom = static_cast(m_Vars[i]); + if( Atom->m_KeyIncr[0]==_Key && (Atom->m_KeyIncr[1]&Mask)==(_Modifiers&Mask) ) + { + if( _DoIncr!=NULL ) + *_DoIncr = true; + return Atom; + } + else if( Atom->m_KeyDecr[0]==_Key && (Atom->m_KeyDecr[1]&Mask)==(_Modifiers&Mask) ) + { + if( _DoIncr!=NULL ) + *_DoIncr = false; + return Atom; + } + } + } + return NULL; +} + +bool CTwBar::KeyPressed(int _Key, int _Modifiers) +{ + assert(g_TwMgr->m_Graph && g_TwMgr->m_WndHeight>0 && g_TwMgr->m_WndWidth>0); + bool Handled = false; + if( !m_UpToDate ) + Update(); + + if( _Key>0 && _Key0 && _Key<32 ) + _Key += 'a'-1; + + // PAD translation (for SDL keysym) + if( _Key>=256 && _Key<=272 ) // 256=SDLK_KP0 ... 272=SDLK_KP_EQUALS + { + bool Num = ((_Modifiers&TW_KMOD_SHIFT) && !(_Modifiers&0x1000)) || (!(_Modifiers&TW_KMOD_SHIFT) && (_Modifiers&0x1000)); // 0x1000 is SDL's KMOD_NUM + _Modifiers &= ~TW_KMOD_SHIFT; // remove shift modifier + if( _Key==266 ) // SDLK_KP_PERIOD + _Key = Num ? '.' : TW_KEY_DELETE; + else if( _Key==267 ) // SDLK_KP_DIVIDE + _Key = '/'; + else if( _Key==268 ) // SDLK_KP_MULTIPLY + _Key = '*'; + else if( _Key==269 ) // SDLK_KP_MINUS + _Key = '-'; + else if( _Key==270 ) // SDLK_KP_PLUS + _Key = '+'; + else if( _Key==271 ) // SDLK_KP_ENTER + _Key = TW_KEY_RETURN; + else if( _Key==272 ) // SDLK_KP_EQUALS + _Key = '='; + else if( Num ) // num SDLK_KP0..9 + _Key += '0' - 256; + else if( _Key==256 ) // non-num SDLK_KP01 + _Key = TW_KEY_INSERT; + else if( _Key==257 ) // non-num SDLK_KP1 + _Key = TW_KEY_END; + else if( _Key==258 ) // non-num SDLK_KP2 + _Key = TW_KEY_DOWN; + else if( _Key==259 ) // non-num SDLK_KP3 + _Key = TW_KEY_PAGE_DOWN; + else if( _Key==260 ) // non-num SDLK_KP4 + _Key = TW_KEY_LEFT; + else if( _Key==262 ) // non-num SDLK_KP6 + _Key = TW_KEY_RIGHT; + else if( _Key==263 ) // non-num SDLK_KP7 + _Key = TW_KEY_HOME; + else if( _Key==264 ) // non-num SDLK_KP8 + _Key = TW_KEY_UP; + else if( _Key==265 ) // non-num SDLK_KP9 + _Key = TW_KEY_PAGE_UP; + } + */ + + /* + string Str; + TwGetKeyString(&Str, _Key, _Modifiers); + printf("key: %d 0x%04xd %s\n", _Key, _Modifiers, Str.c_str()); + */ + + if( m_EditInPlace.m_Active ) + { + Handled = EditInPlaceKeyPressed(_Key, _Modifiers); + } + else + { + bool BarActive = (m_DrawHandles || m_IsPopupList) && !m_IsMinimized; + bool DoIncr = true; + CTwVarAtom *Atom = m_VarRoot.FindShortcut(_Key, _Modifiers, &DoIncr); + if( Atom!=NULL && Atom->m_Visible ) + { + if( !Atom->m_ReadOnly ) + { + Atom->Increment( DoIncr ? +1 : -1 ); + if( g_TwMgr==NULL ) // Mgr might have been destroyed by the client inside a callback call + return 1; + m_HighlightClickBtnAuto = g_TwMgr->m_Timer.GetTime(); + } + NotUpToDate(); + Show(Atom); + Handled = true; + } + else if( BarActive && m_HighlightedLine>=0 && m_HighlightedLine<(int)m_HierTags.size() && m_HierTags[m_HighlightedLine].m_Var ) + { + if( _Key==TW_KEY_RIGHT ) + { + if( !m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + CTwVarAtom *Atom = static_cast(m_HierTags[m_HighlightedLine].m_Var); + bool Accept = !Atom->m_NoSlider || Atom->m_Type==TW_TYPE_BUTTON + || Atom->m_Type==TW_TYPE_BOOL8 || Atom->m_Type==TW_TYPE_BOOL16 || Atom->m_Type==TW_TYPE_BOOL32 || Atom->m_Type==TW_TYPE_BOOLCPP + || IsEnumType(Atom->m_Type); + if( !Atom->IsReadOnly() && !m_IsPopupList && Accept ) + { + Atom->Increment(+1); + if( g_TwMgr==NULL ) // Mgr might have been destroyed by the client inside a callback call + return 1; + m_HighlightClickBtnAuto = g_TwMgr->m_Timer.GetTime(); + NotUpToDate(); + } + } + else + { + CTwVarGroup *Grp = static_cast(m_HierTags[m_HighlightedLine].m_Var); + if( !Grp->m_Open ) + { + Grp->m_Open = true; + NotUpToDate(); + } + } + Handled = true; + } + else if( _Key==TW_KEY_LEFT ) + { + if( !m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + CTwVarAtom *Atom = static_cast(m_HierTags[m_HighlightedLine].m_Var); + bool Accept = !Atom->m_NoSlider || Atom->m_Type==TW_TYPE_BUTTON + || Atom->m_Type==TW_TYPE_BOOL8 || Atom->m_Type==TW_TYPE_BOOL16 || Atom->m_Type==TW_TYPE_BOOL32 || Atom->m_Type==TW_TYPE_BOOLCPP + || IsEnumType(Atom->m_Type); + if( !Atom->IsReadOnly() && Accept && !m_IsPopupList ) + { + Atom->Increment(-1); + if( g_TwMgr==NULL ) // Mgr might have been destroyed by the client inside a callback call + return 1; + m_HighlightClickBtnAuto = g_TwMgr->m_Timer.GetTime(); + NotUpToDate(); + } + } + else + { + CTwVarGroup *Grp = static_cast(m_HierTags[m_HighlightedLine].m_Var); + if( Grp->m_Open ) + { + Grp->m_Open = false; + NotUpToDate(); + } + } + Handled = true; + } + else if( _Key==TW_KEY_RETURN ) + { + if( !m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + CTwVarAtom *Atom = static_cast(m_HierTags[m_HighlightedLine].m_Var); + if( !Atom->IsReadOnly() ) + { + if( Atom->m_Type==TW_TYPE_BUTTON || Atom->m_Type==TW_TYPE_BOOLCPP + || Atom->m_Type==TW_TYPE_BOOL8 || Atom->m_Type==TW_TYPE_BOOL16 || Atom->m_Type==TW_TYPE_BOOL32 ) + { + bool isPopup = m_IsPopupList; + Atom->Increment(+1); + if( g_TwMgr==NULL // Mgr might have been destroyed by the client inside a callback call + || isPopup ) // A popup destroys itself + return 1; + m_HighlightClickBtnAuto = g_TwMgr->m_Timer.GetTime(); + NotUpToDate(); + } + else // if( IsEnumType(Atom->m_Type) ) + { + // simulate a mouse click + int y = m_PosY + m_VarY0 + m_HighlightedLine*(m_Font->m_CharHeight+m_Sep) + m_Font->m_CharHeight/2; + int x = m_PosX + m_VarX1 + 2; + if( x>m_PosX+m_VarX2-2 ) + x = m_PosX + m_VarX2 - 2; + MouseMotion(x, y); + MouseButton(TW_MOUSE_LEFT, true, x, y); + } + } + } + else + { + CTwVarGroup *Grp = static_cast(m_HierTags[m_HighlightedLine].m_Var); + Grp->m_Open = !Grp->m_Open; + NotUpToDate(); + } + Handled = true; + } + else if( _Key==TW_KEY_UP ) + { + --m_HighlightedLine; + if( m_HighlightedLine<0 ) + { + m_HighlightedLine = 0; + if( m_FirstLine>0 ) + { + --m_FirstLine; + NotUpToDate(); + } + } + m_HighlightedLineLastValid = m_HighlightedLine; + Handled = true; + } + else if( _Key==TW_KEY_DOWN ) + { + ++m_HighlightedLine; + if( m_HighlightedLine>=(int)m_HierTags.size() ) + { + m_HighlightedLine = (int)m_HierTags.size() - 1; + if( m_FirstLinem_PopupBar = NULL; + if( LinkedBar!=NULL ) + LinkedBar->m_DrawHandles = true; + return true; // this bar has been destroyed + } + } + else if( BarActive ) + { + if( _Key==TW_KEY_UP || _Key==TW_KEY_DOWN || _Key==TW_KEY_LEFT || _Key==TW_KEY_RIGHT || _Key==TW_KEY_RETURN ) + { + if( m_HighlightedLineLastValid>=0 && m_HighlightedLineLastValid<(int)m_HierTags.size() ) + m_HighlightedLine = m_HighlightedLineLastValid; + else if( m_HierTags.size()>0 ) + { + if( _Key==TW_KEY_UP ) + m_HighlightedLine = (int)m_HierTags.size()-1; + else + m_HighlightedLine = 0; + } + Handled = true; + } + else if( _Key==TW_KEY_ESCAPE && m_IsPopupList ) + { + Handled = true; + CTwBar *LinkedBar = m_BarLinkedToPopupList; + TwDeleteBar(this); + g_TwMgr->m_PopupBar = NULL; + if( LinkedBar!=NULL ) + LinkedBar->m_DrawHandles = true; + return true; // this bar has been destroyed + } + } + } + } + return Handled; +} + +// --------------------------------------------------------------------------- + +bool CTwBar::KeyTest(int _Key, int _Modifiers) +{ + assert(g_TwMgr->m_Graph && g_TwMgr->m_WndHeight>0 && g_TwMgr->m_WndWidth>0); + bool Handled = false; + if( !m_UpToDate ) + Update(); + + if( _Key>0 && _Keym_Visible ) + Handled = true; + else if( BarActive && ( _Key==TW_KEY_RIGHT || _Key==TW_KEY_LEFT || _Key==TW_KEY_UP || _Key==TW_KEY_DOWN + || _Key==TW_KEY_RETURN || (_Key==TW_KEY_ESCAPE && m_IsPopupList) ) ) + Handled = true; + } + } + return Handled; +} + +// --------------------------------------------------------------------------- + +bool CTwBar::Show(CTwVar *_Var) +{ + if( _Var==NULL || !_Var->m_Visible ) + return false; + if( !m_UpToDate ) + Update(); + + if( OpenHier(&m_VarRoot, _Var) ) + { + if( !m_UpToDate ) + Update(); + int l = LineInHier(&m_VarRoot, _Var); + if( l>=0 ) + { + int NbLines = (m_VarY1-m_VarY0+1)/(m_Font->m_CharHeight+m_Sep); + if( NbLines<= 0 ) + NbLines = 1; + if( l=m_FirstLine+NbLines ) + { + m_FirstLine = l-NbLines/2; + if( m_FirstLine<0 ) + m_FirstLine = 0; + NotUpToDate(); + Update(); + if( m_NbDisplayedLinesm_Vars.size(); ++i) + if( _Root->m_Vars[i]!=NULL ) + { + if( _Var==_Root->m_Vars[i] + || (_Root->m_Vars[i]->IsGroup() && OpenHier(static_cast(_Root->m_Vars[i]), _Var)) ) + { + _Root->m_Open = true; + NotUpToDate(); + return true; + } + } + return false; +} + +// --------------------------------------------------------------------------- + +int CTwBar::LineInHier(CTwVarGroup *_Root, CTwVar *_Var) +{ + assert( _Root!=NULL ); + int l = 0; + for(size_t i=0; i<_Root->m_Vars.size(); ++i) + if( _Root->m_Vars[i]!=NULL && _Root->m_Vars[i]->m_Visible ) + { + if( _Var==_Root->m_Vars[i] ) + return l; + else if( _Root->m_Vars[i]->IsGroup() && static_cast(_Root->m_Vars[i])->m_Open ) + { + ++l; + int ll = LineInHier(static_cast(_Root->m_Vars[i]), _Var); + if( ll>=0 ) + return l+ll; + else + l += -ll-2; + } + ++l; + } + return -l-1; +} + +// --------------------------------------------------------------------------- + +void DrawArc(int _X, int _Y, int _Radius, float _StartAngleDeg, float _EndAngleDeg, color32 _Color) // angles in degree +{ + ITwGraph *Gr = g_TwMgr->m_Graph; + if( Gr==NULL || !Gr->IsDrawing() || _Radius==0 || _StartAngleDeg==_EndAngleDeg ) + return; + + float startAngle = (float)M_PI*_StartAngleDeg/180; + float endAngle = (float)M_PI*_EndAngleDeg/180; + //float stepAngle = 8/(float)_Radius; // segment length = 8 pixels + float stepAngle = 4/(float)_Radius; // segment length = 4 pixels + if( stepAngle>(float)M_PI/4 ) + stepAngle = (float)M_PI/4; + bool fullCircle = fabsf(endAngle-startAngle)>=2.0f*(float)M_PI+fabsf(stepAngle); + int numSteps; + if( fullCircle ) + { + numSteps = int((2.0f*(float)M_PI)/stepAngle); + startAngle = 0; + endAngle = 2.0f*(float)M_PI; + } + else + numSteps = int(fabsf(endAngle-startAngle)/stepAngle); + if( startAngle>endAngle ) + stepAngle = -stepAngle; + + int x0 = int(_X + _Radius * cosf(startAngle) + 0.5f); + int y0 = int(_Y - _Radius * sinf(startAngle) + 0.5f); + int x1, y1; + float angle = startAngle+stepAngle; + + for( int i=0; iDrawLine(x0, y0, x1, y1, _Color, true); + x0 = x1; + y0 = y1; + } + + if( fullCircle ) + { + x1 = int(_X + _Radius * cosf(startAngle) + 0.5f); + y1 = int(_Y - _Radius * sinf(startAngle) + 0.5f); + } + else + { + x1 = int(_X + _Radius * cosf(endAngle) + 0.5f); + y1 = int(_Y - _Radius * sinf(endAngle) + 0.5f); + } + Gr->DrawLine(x0, y0, x1, y1, _Color, true); +} + +// --------------------------------------------------------------------------- + +CTwBar::CRotoSlider::CRotoSlider() +{ + m_Var = NULL; + m_Active = false; + m_ActiveMiddle = false; + m_Subdiv = 256; // will be recalculated in RotoOnLButtonDown +} + +void CTwBar::RotoDraw() +{ + ITwGraph *Gr = g_TwMgr->m_Graph; + if( Gr==NULL || !Gr->IsDrawing() ) + return; + + if( m_Roto.m_Active ) + { + DrawArc(m_Roto.m_Origin.x, m_Roto.m_Origin.y, 32, 0, 360, m_ColRoto); + DrawArc(m_Roto.m_Origin.x+1, m_Roto.m_Origin.y, 32, 0, 360, m_ColRoto); + DrawArc(m_Roto.m_Origin.x, m_Roto.m_Origin.y+1, 32, 0, 360, m_ColRoto); + + if( m_Roto.m_HasPrevious ) + { + double varMax = RotoGetMax(); + double varMin = RotoGetMin(); + double varStep = RotoGetStep(); + if( varMax-DOUBLE_MAX && fabs(varStep)>DOUBLE_EPS && m_Roto.m_Subdiv>0 ) + { + double dtMax = 360.0*(varMax-m_Roto.m_ValueAngle0)/((double)m_Roto.m_Subdiv*varStep);//+2; + double dtMin = 360.0*(varMin-m_Roto.m_ValueAngle0)/((double)m_Roto.m_Subdiv*varStep);//-2; + + if( dtMax>=0 && dtMax<360 && dtMin<=0 && dtMin>-360 && fabs(dtMax-dtMin)<=360 ) + { + int x1, y1, x2, y2; + double da = 2.0*M_PI/m_Roto.m_Subdiv; + + x1 = m_Roto.m_Origin.x + (int)(40*cos(-M_PI*(m_Roto.m_Angle0+dtMax)/180-da)); + y1 = m_Roto.m_Origin.y + (int)(40*sin(-M_PI*(m_Roto.m_Angle0+dtMax)/180-da)+0.5); + x2 = m_Roto.m_Origin.x + (int)(40*cos(-M_PI*(m_Roto.m_Angle0+dtMax-10)/180-da)); + y2 = m_Roto.m_Origin.y + (int)(40*sin(-M_PI*(m_Roto.m_Angle0+dtMax-10)/180-da)+0.5); + Gr->DrawLine(m_Roto.m_Origin.x, m_Roto.m_Origin.y, x1, y1, m_ColRotoBound, true); + Gr->DrawLine(m_Roto.m_Origin.x+1, m_Roto.m_Origin.y, x1+1, y1, m_ColRotoBound, true); + Gr->DrawLine(m_Roto.m_Origin.x, m_Roto.m_Origin.y+1, x1, y1+1, m_ColRotoBound, true); + Gr->DrawLine(x1, y1, x2, y2, m_ColRotoBound, true); + Gr->DrawLine(x1+1, y1, x2+1, y2, m_ColRotoBound, true); + Gr->DrawLine(x1, y1+1, x2, y2+1, m_ColRotoBound, true); + + x1 = m_Roto.m_Origin.x + (int)(40*cos(-M_PI*(m_Roto.m_Angle0+dtMin)/180+da)); + y1 = m_Roto.m_Origin.y + (int)(40*sin(-M_PI*(m_Roto.m_Angle0+dtMin)/180+da)+0.5); + x2 = m_Roto.m_Origin.x + (int)(40*cos(-M_PI*(m_Roto.m_Angle0+dtMin+10)/180+da)); + y2 = m_Roto.m_Origin.y + (int)(40*sin(-M_PI*(m_Roto.m_Angle0+dtMin+10)/180+da)+0.5); + Gr->DrawLine(m_Roto.m_Origin.x, m_Roto.m_Origin.y, x1, y1, m_ColRotoBound, true); + Gr->DrawLine(m_Roto.m_Origin.x+1, m_Roto.m_Origin.y, x1+1, y1, m_ColRotoBound, true); + Gr->DrawLine(m_Roto.m_Origin.x, m_Roto.m_Origin.y+1, x1, y1+1, m_ColRotoBound, true); + Gr->DrawLine(x1, y1, x2, y2, m_ColRotoBound, true); + Gr->DrawLine(x1+1, y1, x2+1, y2, m_ColRotoBound, true); + Gr->DrawLine(x1, y1+1, x2, y2+1, m_ColRotoBound, true); + } + } + } + + Gr->DrawLine(m_Roto.m_Origin.x+1, m_Roto.m_Origin.y, m_Roto.m_Current.x+1, m_Roto.m_Current.y, m_ColRotoVal, true); + Gr->DrawLine(m_Roto.m_Origin.x, m_Roto.m_Origin.y+1, m_Roto.m_Current.x, m_Roto.m_Current.y+1, m_ColRotoVal, true); + Gr->DrawLine(m_Roto.m_Origin.x, m_Roto.m_Origin.y, m_Roto.m_Current.x, m_Roto.m_Current.y, m_ColRotoVal, true); + + if( fabs(m_Roto.m_AngleDT)>=1 ) + { + DrawArc(m_Roto.m_Origin.x, m_Roto.m_Origin.y, 32, float(m_Roto.m_Angle0), float(m_Roto.m_Angle0+m_Roto.m_AngleDT-1), m_ColRotoVal); + DrawArc(m_Roto.m_Origin.x+1, m_Roto.m_Origin.y, 32, float(m_Roto.m_Angle0), float(m_Roto.m_Angle0+m_Roto.m_AngleDT-1), m_ColRotoVal); + DrawArc(m_Roto.m_Origin.x, m_Roto.m_Origin.y+1, 32, float(m_Roto.m_Angle0), float(m_Roto.m_Angle0+m_Roto.m_AngleDT-1), m_ColRotoVal); + } + } +} + +double CTwBar::RotoGetValue() const +{ + assert(m_Roto.m_Var!=NULL); + return m_Roto.m_Var->ValueToDouble(); +} + +void CTwBar::RotoSetValue(double _Val) +{ + assert(m_Roto.m_Var!=NULL); + if( _Val!=m_Roto.m_CurrentValue ) + { + m_Roto.m_CurrentValue = _Val; + m_Roto.m_Var->ValueFromDouble(_Val); + NotUpToDate(); + } +} + +double CTwBar::RotoGetMin() const +{ + assert(m_Roto.m_Var!=NULL); + double min = -DOUBLE_MAX; + m_Roto.m_Var->MinMaxStepToDouble(&min, NULL, NULL); + return min; +} + +double CTwBar::RotoGetMax() const +{ + assert(m_Roto.m_Var!=NULL); + double max = DOUBLE_MAX; + m_Roto.m_Var->MinMaxStepToDouble(NULL, &max, NULL); + return max; +} + +double CTwBar::RotoGetStep() const +{ + assert(m_Roto.m_Var!=NULL); + double step = 1; + m_Roto.m_Var->MinMaxStepToDouble(NULL, NULL, &step); + return step; +} + +double CTwBar::RotoGetSteppedValue() const +{ + double d = m_Roto.m_PreciseValue-m_Roto.m_Value0; + double n = int(d/RotoGetStep()); + return m_Roto.m_Value0 + RotoGetStep()*n; +} + +void CTwBar::RotoOnMouseMove(int _X, int _Y) +{ + CPoint p(_X, _Y); + if( m_Roto.m_Active ) + { + m_Roto.m_Current = p; + RotoSetValue(RotoGetSteppedValue()); + //DrawManip(); + + int ti = -1; + double t = 0; + float r = sqrtf(float( (m_Roto.m_Current.x-m_Roto.m_Origin.x)*(m_Roto.m_Current.x-m_Roto.m_Origin.x) + + (m_Roto.m_Current.y-m_Roto.m_Origin.y)*(m_Roto.m_Current.y-m_Roto.m_Origin.y))); + if( r>m_RotoMinRadius ) + { + t = - atan2(double(m_Roto.m_Current.y-m_Roto.m_Origin.y), double(m_Roto.m_Current.x-m_Roto.m_Origin.x)); + ti = (int((t/(2.0*M_PI)+1.0)*NB_ROTO_CURSORS+0.5)) % NB_ROTO_CURSORS; + if( m_Roto.m_HasPrevious ) + { + CPoint v0 = m_Roto.m_Previous-m_Roto.m_Origin; + CPoint v1 = m_Roto.m_Current-m_Roto.m_Origin; + double l0 = sqrt(double(v0.x*v0.x+v0.y*v0.y)); + double l1 = sqrt(double(v1.x*v1.x+v1.y*v1.y)); + double dt = acos(max(-1+1.0e-30,min(1-1.0e-30,double(v0.x*v1.x+v0.y*v1.y)/(l0*l1)))); + if( v0.x*v1.y-v0.y*v1.x>0 ) + dt = - dt; + double preciseInc = double(m_Roto.m_Subdiv) * dt/(2.0*M_PI) * RotoGetStep(); + if( preciseInc>RotoGetStep() || preciseInc<-RotoGetStep() ) + { + m_Roto.m_PreciseValue += preciseInc; + if( m_Roto.m_PreciseValue>RotoGetMax() ) + { + m_Roto.m_PreciseValue = RotoGetMax(); + m_Roto.m_Value0 = RotoGetMax(); + + double da = 360*(RotoGetMax()-m_Roto.m_ValueAngle0)/(double(m_Roto.m_Subdiv)*RotoGetStep()); + m_Roto.m_Angle0 = ((int((t/(2.0*M_PI)+1.0)*360.0+0.5)) % 360) - da; + m_Roto.m_AngleDT = da; + } + else if( m_Roto.m_PreciseValue=0 && ti=0 && m_HighlightedLine<(int)m_HierTags.size() && m_HierTags[m_HighlightedLine].m_Var && !m_HierTags[m_HighlightedLine].m_Var->IsGroup() ) + { + m_Roto.m_Var = static_cast(m_HierTags[m_HighlightedLine].m_Var); + int y = m_PosY + m_VarY0 + m_HighlightedLine*(m_Font->m_CharHeight+m_Sep) + m_Font->m_CharHeight/2; + m_Roto.m_Origin = CPoint(p.x, y); //r.CenterPoint().y); + m_Roto.m_Current = p; + m_Roto.m_Active = true; + m_Roto.m_HasPrevious = false; + m_Roto.m_Angle0 = 0; + m_Roto.m_AngleDT = 0; + //SetCapture(); + + m_Roto.m_Value0 = RotoGetValue(); + m_Roto.m_CurrentValue = m_Roto.m_Value0; + m_Roto.m_ValueAngle0 = m_Roto.m_Value0; + m_Roto.m_PreciseValue = m_Roto.m_Value0; + //RotoSetValue(RotoGetSteppedValue()); Not here + //DrawManip(); + + m_Roto.m_Subdiv = m_RotoNbSubdiv; + // re-adjust m_Subdiv if needed: + double min=-DOUBLE_MAX, max=DOUBLE_MAX, step=1; + m_Roto.m_Var->MinMaxStepToDouble(&min, &max, &step); + if( fabs(step)>0 && min>-DOUBLE_MAX && maxm_Graph!=NULL ); + + m_Var = NULL; + m_Active = false; + m_EditTextObj = g_TwMgr->m_Graph->NewTextObj(); + m_EditSelTextObj = g_TwMgr->m_Graph->NewTextObj(); + + m_X = m_Y = m_Width = 0; +} + +CTwBar::CEditInPlace::~CEditInPlace() +{ + assert( g_TwMgr!=NULL && g_TwMgr->m_Graph!=NULL ); + + if( m_EditTextObj ) + g_TwMgr->m_Graph->DeleteTextObj(m_EditTextObj); + if( m_EditSelTextObj ) + g_TwMgr->m_Graph->DeleteTextObj(m_EditSelTextObj); +} + +bool CTwBar::EditInPlaceIsReadOnly() +{ + if( m_EditInPlace.m_Var==NULL ) + return true; + else if( m_EditInPlace.m_Var->m_ReadOnly ) + return true; + else if( m_EditInPlace.m_Var->m_Type==TW_TYPE_CDSTRING && ((m_EditInPlace.m_Var->m_Ptr==NULL && m_EditInPlace.m_Var->m_SetCallback==NULL) || (m_EditInPlace.m_Var->m_Ptr!=NULL && g_TwMgr->m_CopyCDStringToClient==NULL)) ) + return true; + else if( m_EditInPlace.m_Var->m_Type==TW_TYPE_CDSTDSTRING && m_EditInPlace.m_Var->m_SetCallback==NULL ) + return true; + else if( m_EditInPlace.m_Var->m_Type==TW_TYPE_STDSTRING && ((m_EditInPlace.m_Var->m_Ptr==NULL && m_EditInPlace.m_Var->m_SetCallback==NULL) || (m_EditInPlace.m_Var->m_Ptr!=NULL && g_TwMgr->m_CopyStdStringToClient==NULL)) ) + return true; + else + return false; +} + +void CTwBar::EditInPlaceDraw() +{ + if( !m_EditInPlace.m_Active || m_EditInPlace.m_Var==NULL || m_EditInPlace.m_Width<=0 ) + return; + + // adjust m_FirstChar to see the caret, and extract the visible sub-string + int i, StringLen = (int)m_EditInPlace.m_String.length(); + if( m_EditInPlace.m_FirstChar>m_EditInPlace.m_CaretPos ) + m_EditInPlace.m_FirstChar = m_EditInPlace.m_CaretPos; + int SubstrWidth = 0; + for( i=min(m_EditInPlace.m_CaretPos, StringLen-1); i>=0 && SubstrWidthm_CharWidth[u]; + } + int FirstChar = max(0, i); + if( SubstrWidth>=m_EditInPlace.m_Width ) + FirstChar += 2; + if( m_EditInPlace.m_FirstChar0 ) + --m_EditInPlace.m_FirstChar; + SubstrWidth = 0; + for( i=m_EditInPlace.m_FirstChar; im_CharWidth[u]; + } + int LastChar = i; + if( SubstrWidth>=m_EditInPlace.m_Width ) + --LastChar; + string Substr = m_EditInPlace.m_String.substr( m_EditInPlace.m_FirstChar, LastChar-m_EditInPlace.m_FirstChar ); + + // compute caret x pos + int CaretX = m_PosX + m_EditInPlace.m_X; + for( i=m_EditInPlace.m_FirstChar; im_CharWidth[u]; + } + + // draw edit text + color32 ColText = EditInPlaceIsReadOnly() ? m_ColValTextRO : m_ColEditText; + color32 ColBg = EditInPlaceIsReadOnly() ? m_ColValBg : m_ColEditBg; + g_TwMgr->m_Graph->BuildText(m_EditInPlace.m_EditTextObj, &Substr, NULL, NULL, 1, m_Font, 0, m_EditInPlace.m_Width); + g_TwMgr->m_Graph->DrawText(m_EditInPlace.m_EditTextObj, m_PosX+m_EditInPlace.m_X, m_PosY+m_EditInPlace.m_Y, ColText, ColBg); + + // draw selected text + string StrSelected = ""; + if( m_EditInPlace.m_CaretPos>m_EditInPlace.m_SelectionStart ) + { + int FirstSel = max(m_EditInPlace.m_SelectionStart, m_EditInPlace.m_FirstChar); + int LastSel = min(m_EditInPlace.m_CaretPos, LastChar); + StrSelected = m_EditInPlace.m_String.substr( FirstSel, LastSel-FirstSel ); + } + else + { + int FirstSel = max(m_EditInPlace.m_CaretPos, m_EditInPlace.m_FirstChar); + int LastSel = min(m_EditInPlace.m_SelectionStart, LastChar); + StrSelected = m_EditInPlace.m_String.substr( FirstSel, LastSel-FirstSel ); + } + int SelWidth = 0; + for( i=0; i<(int)StrSelected.length(); ++i ) + { + unsigned char u = StrSelected.c_str()[i]; + SelWidth += m_Font->m_CharWidth[u]; + } + if( SelWidth>0 && StrSelected.length()>0 ) + { + color32 ColSelBg = EditInPlaceIsReadOnly() ? m_ColValTextRO : m_ColEditSelBg; + g_TwMgr->m_Graph->BuildText(m_EditInPlace.m_EditSelTextObj, &StrSelected, NULL, NULL, 1, m_Font, 0, SelWidth); + if ( m_EditInPlace.m_CaretPos>m_EditInPlace.m_SelectionStart ) + g_TwMgr->m_Graph->DrawText(m_EditInPlace.m_EditSelTextObj, CaretX-SelWidth, m_PosY+m_EditInPlace.m_Y, m_ColEditSelText, ColSelBg); + else + g_TwMgr->m_Graph->DrawText(m_EditInPlace.m_EditSelTextObj, CaretX, m_PosY+m_EditInPlace.m_Y, m_ColEditSelText, ColSelBg); + } + + // draw caret + if( CaretX<=m_PosX+m_EditInPlace.m_X+m_EditInPlace.m_Width ) + g_TwMgr->m_Graph->DrawLine( CaretX, m_PosY+m_EditInPlace.m_Y+1, CaretX, m_PosY+m_EditInPlace.m_Y+m_Font->m_CharHeight, m_ColEditText ); +} + +bool CTwBar::EditInPlaceAcceptVar(const CTwVarAtom* _Var) +{ + if( _Var==NULL ) + return false; + if( _Var->m_Type>=TW_TYPE_CHAR && _Var->m_Type<=TW_TYPE_DOUBLE ) + return true; + if( _Var->m_Type==TW_TYPE_CDSTRING || _Var->m_Type==TW_TYPE_CDSTDSTRING || _Var->m_Type==TW_TYPE_STDSTRING ) + return true; + if( IsCSStringType(_Var->m_Type) ) + return true; + + return false; +} + +void CTwBar::EditInPlaceStart(CTwVarAtom* _Var, int _X, int _Y, int _Width) +{ + if( m_EditInPlace.m_Active ) + EditInPlaceEnd(true); + + m_EditInPlace.m_Active = true; + m_EditInPlace.m_Var = _Var; + m_EditInPlace.m_X = _X; + m_EditInPlace.m_Y = _Y; + m_EditInPlace.m_Width = _Width; + m_EditInPlace.m_Var->ValueToString(&m_EditInPlace.m_String); + if( m_EditInPlace.m_Var->m_Type==TW_TYPE_CHAR ) + m_EditInPlace.m_String = m_EditInPlace.m_String.substr(0, 1); + m_EditInPlace.m_CaretPos = (int)m_EditInPlace.m_String.length(); + if( EditInPlaceIsReadOnly() ) + m_EditInPlace.m_SelectionStart = m_EditInPlace.m_CaretPos; + else + m_EditInPlace.m_SelectionStart = 0; + m_EditInPlace.m_FirstChar = 0; +} + +void CTwBar::EditInPlaceEnd(bool _Commit) +{ + if( _Commit && m_EditInPlace.m_Active && m_EditInPlace.m_Var!=NULL ) + { + if( m_EditInPlace.m_Var->m_Type==TW_TYPE_CDSTRING || m_EditInPlace.m_Var->m_Type==TW_TYPE_CDSTDSTRING ) + { + if( m_EditInPlace.m_Var->m_SetCallback!=NULL ) + { + const char *String = m_EditInPlace.m_String.c_str(); + m_EditInPlace.m_Var->m_SetCallback(&String, m_EditInPlace.m_Var->m_ClientData); + } + else if( m_EditInPlace.m_Var->m_Type!=TW_TYPE_CDSTDSTRING ) + { + char **StringPtr = (char **)m_EditInPlace.m_Var->m_Ptr; + if( StringPtr!=NULL && g_TwMgr->m_CopyCDStringToClient!=NULL ) + g_TwMgr->m_CopyCDStringToClient(StringPtr, m_EditInPlace.m_String.c_str()); + } + } + else if( m_EditInPlace.m_Var->m_Type==TW_TYPE_STDSTRING ) + { + // this case should never happened: TW_TYPE_STDSTRING are converted to TW_TYPE_CDSTDSTRING by TwAddVar + if( m_EditInPlace.m_Var->m_SetCallback!=NULL ) + m_EditInPlace.m_Var->m_SetCallback(&(m_EditInPlace.m_String), m_EditInPlace.m_Var->m_ClientData); + else + { + string *StringPtr = (string *)m_EditInPlace.m_Var->m_Ptr; + if( StringPtr!=NULL && g_TwMgr->m_CopyStdStringToClient!=NULL ) + g_TwMgr->m_CopyStdStringToClient(*StringPtr, m_EditInPlace.m_String); + } + } + else if( IsCSStringType(m_EditInPlace.m_Var->m_Type) ) + { + int n = TW_CSSTRING_SIZE(m_EditInPlace.m_Var->m_Type); + if( n>0 ) + { + if( (int)m_EditInPlace.m_String.length()>n-1 ) + m_EditInPlace.m_String.resize(n-1); + if( m_EditInPlace.m_Var->m_SetCallback!=NULL ) + m_EditInPlace.m_Var->m_SetCallback(m_EditInPlace.m_String.c_str(), m_EditInPlace.m_Var->m_ClientData); + else if( m_EditInPlace.m_Var->m_Ptr!=NULL ) + { + if( n>1 ) + strncpy((char *)m_EditInPlace.m_Var->m_Ptr, m_EditInPlace.m_String.c_str(), n-1); + ((char *)m_EditInPlace.m_Var->m_Ptr)[n-1] = '\0'; + } + } + } + else + { + double Val = 0, Min = 0, Max = 0, Step = 0; + int n = 0; + if( m_EditInPlace.m_Var->m_Type==TW_TYPE_CHAR ) + { + unsigned char Char = 0; + n = sscanf(m_EditInPlace.m_String.c_str(), "%c", &Char); + Val = Char; + } + else + n = sscanf(m_EditInPlace.m_String.c_str(), "%lf", &Val); + if( n==1 ) + { + m_EditInPlace.m_Var->MinMaxStepToDouble(&Min, &Max, &Step); + if( ValMax ) + Val = Max; + m_EditInPlace.m_Var->ValueFromDouble(Val); + } + } + if( g_TwMgr!=NULL ) // Mgr might have been destroyed by the client inside a callback call + NotUpToDate(); + } + m_EditInPlace.m_Active = false; + m_EditInPlace.m_Var = NULL; +} + +bool CTwBar::EditInPlaceKeyPressed(int _Key, int _Modifiers) +{ + if( !m_EditInPlace.m_Active ) + return false; + bool Handled = true; // if EditInPlace is active, it catches all key events + bool DoCopy = false, DoPaste = false; + + switch( _Key ) + { + case TW_KEY_ESCAPE: + EditInPlaceEnd(false); + break; + case TW_KEY_RETURN: + EditInPlaceEnd(true); + break; + case TW_KEY_LEFT: + if( _Modifiers==TW_KMOD_SHIFT ) + m_EditInPlace.m_CaretPos = max(0, m_EditInPlace.m_CaretPos-1); + else + { + if( m_EditInPlace.m_SelectionStart!=m_EditInPlace.m_CaretPos ) + m_EditInPlace.m_CaretPos = min(m_EditInPlace.m_SelectionStart, m_EditInPlace.m_CaretPos); + else + m_EditInPlace.m_CaretPos = max(0, m_EditInPlace.m_CaretPos-1); + m_EditInPlace.m_SelectionStart = m_EditInPlace.m_CaretPos; + } + break; + case TW_KEY_RIGHT: + if( _Modifiers==TW_KMOD_SHIFT ) + m_EditInPlace.m_CaretPos = min((int)m_EditInPlace.m_String.length(), m_EditInPlace.m_CaretPos+1); + else + { + if( m_EditInPlace.m_SelectionStart!=m_EditInPlace.m_CaretPos ) + m_EditInPlace.m_CaretPos = max(m_EditInPlace.m_SelectionStart, m_EditInPlace.m_CaretPos); + else + m_EditInPlace.m_CaretPos = min((int)m_EditInPlace.m_String.length(), m_EditInPlace.m_CaretPos+1); + m_EditInPlace.m_SelectionStart = m_EditInPlace.m_CaretPos; + } + break; + case TW_KEY_BACKSPACE: + if( !EditInPlaceIsReadOnly() ) + { + if( m_EditInPlace.m_SelectionStart==m_EditInPlace.m_CaretPos ) + m_EditInPlace.m_SelectionStart = max(0, m_EditInPlace.m_CaretPos-1); + EditInPlaceEraseSelect(); + } + break; + case TW_KEY_DELETE: + if( !EditInPlaceIsReadOnly() ) + { + if( m_EditInPlace.m_SelectionStart==m_EditInPlace.m_CaretPos ) + m_EditInPlace.m_SelectionStart = min(m_EditInPlace.m_CaretPos+1, (int)m_EditInPlace.m_String.length()); + EditInPlaceEraseSelect(); + } + break; + case TW_KEY_HOME: + m_EditInPlace.m_CaretPos = 0; + if( _Modifiers!=TW_KMOD_SHIFT ) + m_EditInPlace.m_SelectionStart = m_EditInPlace.m_CaretPos; + break; + case TW_KEY_END: + m_EditInPlace.m_CaretPos = (int)m_EditInPlace.m_String.length(); + if( _Modifiers!=TW_KMOD_SHIFT ) + m_EditInPlace.m_SelectionStart = m_EditInPlace.m_CaretPos; + break; + case TW_KEY_INSERT: + if( _Modifiers==TW_KMOD_CTRL ) + DoCopy = true; + else if( _Modifiers==TW_KMOD_SHIFT ) + DoPaste = true; + break; + default: + if( _Modifiers==TW_KMOD_CTRL ) + { + if( _Key=='c' || _Key=='C' ) + DoCopy = true; + else if( _Key=='v' || _Key=='V' ) + DoPaste = true; + } + else if( _Key>=32 && _Key<=255 ) + { + if( !EditInPlaceIsReadOnly() && m_EditInPlace.m_CaretPos>=0 && m_EditInPlace.m_CaretPos<=(int)m_EditInPlace.m_String.length() ) + { + if( m_EditInPlace.m_SelectionStart!=m_EditInPlace.m_CaretPos ) + EditInPlaceEraseSelect(); + string Str(1, (char)_Key); + m_EditInPlace.m_String.insert(m_EditInPlace.m_CaretPos, Str); + ++m_EditInPlace.m_CaretPos; + m_EditInPlace.m_SelectionStart = m_EditInPlace.m_CaretPos; + } + } + } + + if( DoPaste && !EditInPlaceIsReadOnly() ) + { + if( m_EditInPlace.m_SelectionStart!=m_EditInPlace.m_CaretPos ) + EditInPlaceEraseSelect(); + string Str = ""; + if( EditInPlaceGetClipboard(&Str) && Str.length()>0 ) + { + m_EditInPlace.m_String.insert(m_EditInPlace.m_CaretPos, Str); + m_EditInPlace.m_CaretPos += (int)Str.length(); + m_EditInPlace.m_SelectionStart = m_EditInPlace.m_CaretPos; + } + } + if( DoCopy ) + { + string Str = ""; + if( m_EditInPlace.m_CaretPos>m_EditInPlace.m_SelectionStart ) + Str = m_EditInPlace.m_String.substr(m_EditInPlace.m_SelectionStart, m_EditInPlace.m_CaretPos-m_EditInPlace.m_SelectionStart); + else if( m_EditInPlace.m_CaretPosPosMin ) + m_EditInPlace.m_FirstChar = PosMin; + return true; + } + else + return false; +} + + +bool CTwBar::EditInPlaceMouseMove(int _X, int _Y, bool _Select) +{ + if ( !m_EditInPlace.m_Active || _Ym_PosY+m_EditInPlace.m_Y+m_Font->m_CharHeight ) + return false; + + int i, CaretX = m_PosX+m_EditInPlace.m_X; + for( i=m_EditInPlace.m_FirstChar; i<(int)m_EditInPlace.m_String.length() && CaretXm_CharWidth[u]; + if( _X < CaretX + CharWidth / 2 ) + break; + CaretX += CharWidth; + } + if( CaretX>=m_PosX+m_EditInPlace.m_X+m_EditInPlace.m_Width ) + i = max(0, i-1); + + m_EditInPlace.m_CaretPos = i; + if( !_Select ) + m_EditInPlace.m_SelectionStart = m_EditInPlace.m_CaretPos; + return true; +} + + +bool CTwBar::EditInPlaceGetClipboard(std::string *_OutString) +{ + assert( _OutString!=NULL ); + *_OutString = m_EditInPlace.m_Clipboard; // default implementation + +#if defined ANT_WINDOWS + + if( !IsClipboardFormatAvailable(CF_TEXT) ) + return false; + if( !OpenClipboard(NULL) ) + return false; + HGLOBAL TextHandle = GetClipboardData(CF_TEXT); + if( TextHandle!=NULL ) + { + const char *TextString = static_cast(GlobalLock(TextHandle)); + if( TextHandle!=NULL ) + { + *_OutString = TextString; + GlobalUnlock(TextHandle); + } + } + CloseClipboard(); + +#elif defined ANT_UNIX + + if( g_TwMgr->m_CurrentXDisplay!=NULL ) + { + int NbBytes = 0; + char *Buffer = XFetchBytes(g_TwMgr->m_CurrentXDisplay, &NbBytes); + if( Buffer!=NULL ) + { + if( NbBytes>0 ) + { + char *Text = new char[NbBytes+1]; + memcpy(Text, Buffer, NbBytes); + Text[NbBytes] = '\0'; + *_OutString = Text; + delete[] Text; + } + XFree(Buffer); + } + } + +#endif + + return true; +} + + +bool CTwBar::EditInPlaceSetClipboard(const std::string& _String) +{ + if( _String.length()<=0 ) + return false; // keep last clipboard + m_EditInPlace.m_Clipboard = _String; // default implementation + +#if defined ANT_WINDOWS + + if( !OpenClipboard(NULL) ) + return false; + EmptyClipboard(); + HGLOBAL TextHandle = GlobalAlloc(GMEM_MOVEABLE, _String.length()+1); + if( TextHandle==NULL ) + { + CloseClipboard(); + return false; + } + char *TextString = static_cast(GlobalLock(TextHandle)); + memcpy(TextString, _String.c_str(), _String.length()); + TextString[_String.length()] = '\0'; + GlobalUnlock(TextHandle); + SetClipboardData(CF_TEXT, TextHandle); + CloseClipboard(); + +#elif defined ANT_UNIX + + if( g_TwMgr->m_CurrentXDisplay!=NULL ) + { + XSetSelectionOwner(g_TwMgr->m_CurrentXDisplay, XA_PRIMARY, None, CurrentTime); + char *Text = new char[_String.length()+1]; + memcpy(Text, _String.c_str(), _String.length()); + Text[_String.length()] = '\0'; + XStoreBytes(g_TwMgr->m_CurrentXDisplay, Text, _String.length()); + delete[] Text; + } + +#endif + + return true; +} + + +// --------------------------------------------------------------------------- + + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwBar.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwBar.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwBar.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwBar.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,437 @@ +// --------------------------------------------------------------------------- +// +// @file TwBar.h +// @brief Tweak bar and var classes. +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_BAR_INCLUDED +#define ANT_TW_BAR_INCLUDED + +#include +#include "TwColors.h" + +#define ANT_TWEAK_BAR_DLL "AntTweakBar" + + +// --------------------------------------------------------------------------- + +bool IsCustomType(int _Type); + +struct CTwVar +{ + std::string m_Name; + std::string m_Label; + std::string m_Help; + bool m_IsRoot; + bool m_DontClip; + bool m_Visible; + signed short m_LeftMargin; + signed short m_TopMargin; + const color32 * m_ColorPtr; + const color32 * m_BgColorPtr; + + virtual bool IsGroup() const = 0; + virtual bool IsCustom() const { return false; } + virtual const CTwVar * Find(const char *_Name, struct CTwVarGroup **_Parent, int *_Index) const = 0; + virtual int HasAttrib(const char *_Attrib, bool *_HasValue) const; + virtual int SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex); + virtual ERetType GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector& outDouble, std::ostringstream& outString) const; + virtual void SetReadOnly(bool _ReadOnly) = 0; + virtual bool IsReadOnly() const = 0; + CTwVar(); + virtual ~CTwVar() {} + + static size_t GetDataSize(TwType _Type); +}; + + +struct CTwVarAtom : CTwVar +{ + ETwType m_Type; + void * m_Ptr; + TwSetVarCallback m_SetCallback; + TwGetVarCallback m_GetCallback; + void * m_ClientData; + bool m_ReadOnly; + bool m_NoSlider; + int m_KeyIncr[2]; // [0]=key_code [1]=modifiers + int m_KeyDecr[2]; // [0]=key_code [1]=modifiers + + template struct TVal + { + _T m_Min; + _T m_Max; + _T m_Step; + signed char m_Precision; + bool m_Hexa; + }; + union UVal + { + TVal m_Char; + TVal m_Int8; + TVal m_UInt8; + TVal m_Int16; + TValm_UInt16; + TVal m_Int32; + TVal m_UInt32; + TVal m_Float32; + TVal m_Float64; + struct CBoolVal + { + char * m_TrueString; + char * m_FalseString; + bool m_FreeTrueString; + bool m_FreeFalseString; + } m_Bool; + struct CEnumVal // empty -> enum entries are deduced from m_Type + { + //typedef std::map CEntries; + //CEntries * m_Entries; + } m_Enum; + struct CShortcutVal + { + int m_Incr[2]; + int m_Decr[2]; + } m_Shortcut; + struct CHelpStruct + { + int m_StructType; + } m_HelpStruct; + struct CButtonVal + { + TwButtonCallback m_Callback; + int m_Separator; + } m_Button; + struct CCustomVal + { + CTwMgr::CMemberProxy *m_MemberProxy; + } m_Custom; + }; + UVal m_Val; + + virtual bool IsGroup() const { return false; } + virtual bool IsCustom() const { return IsCustomType(m_Type); } + virtual void ValueToString(std::string *_Str) const; + virtual double ValueToDouble() const; + virtual void ValueFromDouble(double _Val); + virtual void MinMaxStepToDouble(double *_Min, double *_Max, double *_Step) const; + virtual const CTwVar * Find(const char *_Name, struct CTwVarGroup **_Parent, int *_Index) const; + virtual int HasAttrib(const char *_Attrib, bool *_HasValue) const; + virtual int SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex); + virtual ERetType GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector& outDouble, std::ostringstream& outString) const; + virtual void Increment(int _Step); + virtual void SetDefaults(); + virtual void SetReadOnly(bool _ReadOnly) { m_ReadOnly=_ReadOnly; if( m_Type!=TW_TYPE_BUTTON && m_SetCallback==NULL && m_Ptr==NULL ) m_ReadOnly=true; } + virtual bool IsReadOnly() const { if( m_Type!=TW_TYPE_BUTTON && m_SetCallback==NULL && m_Ptr==NULL ) return true; else return m_ReadOnly; } + //virtual int DefineEnum(const TwEnumVal *_EnumValues, unsigned int _NbValues); + CTwVarAtom(); + virtual ~CTwVarAtom(); +}; + + +struct CTwVarGroup : CTwVar +{ + std::vector m_Vars; + bool m_Open; + TwSummaryCallback m_SummaryCallback; + void * m_SummaryClientData; + void * m_StructValuePtr; + TwType m_StructType; + + virtual bool IsGroup() const { return true; } + virtual const CTwVar * Find(const char *_Name, CTwVarGroup **_Parent, int *_Index) const; + virtual int HasAttrib(const char *_Attrib, bool *_HasValue) const; + virtual int SetAttrib(int _AttribID, const char *_Value, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex); + virtual ERetType GetAttrib(int _AttribID, TwBar *_Bar, struct CTwVarGroup *_VarParent, int _VarIndex, std::vector& outDouble, std::ostringstream& outString) const; + virtual CTwVarAtom * FindShortcut(int _Key, int _Modifiers, bool *_DoIncr); + virtual void SetReadOnly(bool _ReadOnly) { for(size_t i=0; iSetReadOnly(_ReadOnly); } + virtual bool IsReadOnly() const { for(size_t i=0; iIsReadOnly()) return false; return true; } + CTwVarGroup() { m_Open=false; m_StructType=TW_TYPE_UNDEF; m_SummaryCallback=NULL; m_SummaryClientData=NULL; m_StructValuePtr=NULL; } + virtual ~CTwVarGroup(); +}; + +// --------------------------------------------------------------------------- + +struct CTwBar +{ + std::string m_Name; + std::string m_Label; + std::string m_Help; + bool m_Visible; + int m_PosX; + int m_PosY; + int m_Width; + int m_Height; + color32 m_Color; + bool m_DarkText; + const CTexFont * m_Font; + int m_ValuesWidth; + int m_Sep; + int m_FirstLine; + float m_UpdatePeriod; + bool m_IsHelpBar; + int m_MinNumber; // accessed by TwDeleteBar + bool m_IsPopupList; + CTwVarAtom * m_VarEnumLinkedToPopupList; + CTwBar * m_BarLinkedToPopupList; + bool m_Resizable; + bool m_Movable; + bool m_Iconifiable; + bool m_Contained; + + CTwVarGroup m_VarRoot; + + enum EDrawPart { DRAW_BG=(1<<0), DRAW_CONTENT=(1<<1), DRAW_ALL=DRAW_BG|DRAW_CONTENT }; + void Draw(int _DrawPart=DRAW_ALL); + void NotUpToDate(); + const CTwVar * Find(const char *_Name, CTwVarGroup **_Parent=NULL, int *_Index=NULL) const; + CTwVar * Find(const char *_Name, CTwVarGroup **_Parent=NULL, int *_Index=NULL); + int HasAttrib(const char *_Attrib, bool *_HasValue) const; + int SetAttrib(int _AttribID, const char *_Value); + ERetType GetAttrib(int _AttribID, std::vector& outDouble, std::ostringstream& outString) const; + bool MouseMotion(int _X, int _Y); + bool MouseButton(ETwMouseButtonID _Button, bool _Pressed, int _X, int _Y); + bool MouseWheel(int _Pos, int _PrevPos, int _MouseX, int _MouseY); + bool KeyPressed(int _Key, int _Modifiers); + bool KeyTest(int _Key, int _Modifiers); + bool IsMinimized() const { return m_IsMinimized; } + bool IsDragging() const { return m_MouseDrag; } + bool Show(CTwVar *_Var); // display the line associated to _Var + bool OpenHier(CTwVarGroup *_Root, CTwVar *_Var); // open a hierarchy if it contains _Var + int LineInHier(CTwVarGroup *_Root, CTwVar *_Var); // returns the number of the line associated to _Var + void UnHighlightLine() { m_HighlightedLine = -1; NotUpToDate(); } // used by PopupCallback + void HaveFocus(bool _Focus) { m_DrawHandles = _Focus; } // used by PopupCallback + void StopEditInPlace() { if( m_EditInPlace.m_Active ) EditInPlaceEnd(false); } + CTwBar(const char *_Name); + ~CTwBar(); + + color32 m_ColBg, m_ColBg1, m_ColBg2; + color32 m_ColHighBg0; + color32 m_ColHighBg1; + color32 m_ColLabelText; + color32 m_ColStructText; + color32 m_ColValBg; + color32 m_ColValText; + color32 m_ColValTextRO; + color32 m_ColValTextNE; + color32 m_ColValMin; + color32 m_ColValMax; + color32 m_ColStructBg; + color32 m_ColTitleBg; + color32 m_ColTitleHighBg; + color32 m_ColTitleUnactiveBg; + color32 m_ColTitleText; + color32 m_ColTitleShadow; + color32 m_ColLine; + color32 m_ColLineShadow; + color32 m_ColUnderline; + color32 m_ColBtn; + color32 m_ColHighBtn; + color32 m_ColFold; + color32 m_ColHighFold; + color32 m_ColGrpBg; + color32 m_ColGrpText; + color32 m_ColHierBg; + color32 m_ColShortcutText; + color32 m_ColShortcutBg; + color32 m_ColInfoText; + color32 m_ColHelpBg; + color32 m_ColHelpText; + color32 m_ColRoto; + color32 m_ColRotoVal; + color32 m_ColRotoBound; + color32 m_ColEditBg; + color32 m_ColEditText; + color32 m_ColEditSelBg; + color32 m_ColEditSelText; + color32 m_ColSeparator; + color32 m_ColStaticText; + void UpdateColors(); + +protected: + int m_TitleWidth; + int m_VarX0; + int m_VarX1; + int m_VarX2; + int m_VarY0; + int m_VarY1; + int m_VarY2; + int m_ScrollYW; + int m_ScrollYH; + int m_ScrollY0; + int m_ScrollY1; + int m_NbHierLines; + int m_NbDisplayedLines; + bool m_UpToDate; + float m_LastUpdateTime; + void Update(); + + bool m_MouseDrag; + bool m_MouseDragVar; + bool m_MouseDragTitle; + bool m_MouseDragScroll; + bool m_MouseDragResizeUR; + bool m_MouseDragResizeUL; + bool m_MouseDragResizeLR; + bool m_MouseDragResizeLL; + bool m_MouseDragValWidth; + int m_MouseOriginX; + int m_MouseOriginY; + double m_ValuesWidthRatio; + bool m_VarHasBeenIncr; + int m_FirstLine0; + int m_HighlightedLine; + int m_HighlightedLinePrev; + int m_HighlightedLineLastValid; + bool m_HighlightIncrBtn; + bool m_HighlightDecrBtn; + bool m_HighlightRotoBtn; + bool m_HighlightListBtn; + bool m_HighlightBoolBtn; + bool m_HighlightClickBtn; + double m_HighlightClickBtnAuto; + bool m_HighlightTitle; + bool m_HighlightScroll; + bool m_HighlightUpScroll; + bool m_HighlightDnScroll; + bool m_HighlightMinimize; + bool m_HighlightFont; + bool m_HighlightValWidth; + bool m_HighlightLabelsHeader; + bool m_HighlightValuesHeader; + bool m_DrawHandles; + + bool m_IsMinimized; + int m_MinPosX; + int m_MinPosY; + bool m_HighlightMaximize; + bool m_DrawIncrDecrBtn; + bool m_DrawRotoBtn; + bool m_DrawClickBtn; + bool m_DrawListBtn; + bool m_DrawBoolBtn; + EButtonAlign m_ButtonAlign; + + struct CHierTag + { + CTwVar * m_Var; + int m_Level; + bool m_Closing; + }; + std::vector m_HierTags; + void BrowseHierarchy(int *_LineNum, int _CurrLevel, const CTwVar *_Var, int _First, int _Last); + void * m_TitleTextObj; + void * m_LabelsTextObj; + void * m_ValuesTextObj; + void * m_ShortcutTextObj; + int m_ShortcutLine; + void * m_HeadersTextObj; + void ListLabels(std::vector& _Labels, std::vector& _Colors, std::vector& _BgColors, bool *_HasBgColors, const CTexFont *_Font, int _AtomWidthMax, int _GroupWidthMax); + void ListValues(std::vector& _Values, std::vector& _Colors, std::vector& _BgColors, const CTexFont *_Font, int _WidthMax); + int ComputeLabelsWidth(const CTexFont *_Font); + int ComputeValuesWidth(const CTexFont *_Font); + void DrawHierHandle(); + + enum EValuesWidthFit { VALUES_WIDTH_FIT = -5555 }; + + // RotoSlider + struct CPoint + { + int x, y; + CPoint() {} + CPoint(int _X, int _Y):x(_X), y(_Y) {} + const CPoint operator+ (const CPoint& p) const { return CPoint(x+p.x, y+p.y); } + const CPoint operator- (const CPoint& p) const { return CPoint(x-p.x, y-p.y); } + }; + struct CRotoSlider + { + CRotoSlider(); + CTwVarAtom * m_Var; + double m_PreciseValue; + double m_CurrentValue; + double m_Value0; + double m_ValueAngle0; + bool m_Active; + bool m_ActiveMiddle; + CPoint m_Origin; + CPoint m_Current; + bool m_HasPrevious; + CPoint m_Previous; + double m_Angle0; + double m_AngleDT; + int m_Subdiv; + }; + CRotoSlider m_Roto; + int m_RotoMinRadius; + int m_RotoNbSubdiv; // number of steps for one turn + void RotoDraw(); + void RotoOnMouseMove(int _X, int _Y); + void RotoOnLButtonDown(int _X, int _Y); + void RotoOnLButtonUp(int _X, int _Y); + void RotoOnMButtonDown(int _X, int _Y); + void RotoOnMButtonUp(int _X, int _Y); + double RotoGetValue() const; + void RotoSetValue(double _Val); + double RotoGetMin() const; + double RotoGetMax() const; + double RotoGetStep() const; + double RotoGetSteppedValue() const; + + // Edit-in-place + struct CEditInPlace + { + CEditInPlace(); + ~CEditInPlace(); + CTwVarAtom * m_Var; + bool m_Active; + std::string m_String; + void * m_EditTextObj; + void * m_EditSelTextObj; + int m_CaretPos; + int m_SelectionStart; + int m_X, m_Y; + int m_Width; + int m_FirstChar; + std::string m_Clipboard; + }; + CEditInPlace m_EditInPlace; + void EditInPlaceDraw(); + bool EditInPlaceAcceptVar(const CTwVarAtom* _Var); + bool EditInPlaceIsReadOnly(); + void EditInPlaceStart(CTwVarAtom* _Var, int _X, int _Y, int _Width); + void EditInPlaceEnd(bool _Commit); + bool EditInPlaceKeyPressed(int _Key, int _Modifiers); + bool EditInPlaceEraseSelect(); + bool EditInPlaceMouseMove(int _X, int _Y, bool _Select); + bool EditInPlaceSetClipboard(const std::string& _String); + bool EditInPlaceGetClipboard(std::string *_OutString); + + struct CCustomRecord + { + int m_IndexMin; + int m_IndexMax; + int m_XMin, m_XMax; + int m_YMin, m_YMax; // Y visible range + int m_Y0, m_Y1; // Y widget range + CTwVarGroup * m_Var; + }; + typedef std::map CustomMap; + CustomMap m_CustomRecords; + CTwMgr::CStructProxy * m_CustomActiveStructProxy; + + friend struct CTwMgr; +}; + +void DrawArc(int _X, int _Y, int _Radius, float _StartAngleDeg, float _EndAngleDeg, color32 _Color); + +// --------------------------------------------------------------------------- + + +#endif // !defined ANT_TW_BAR_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwColors.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwColors.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwColors.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwColors.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,153 @@ +// --------------------------------------------------------------------------- +// +// @file TwColors.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include "TwColors.h" + + +void ColorRGBToHLSf(float _R, float _G, float _B, float *_Hue, float *_Light, float *_Saturation) +{ + // Compute HLS from RGB. The r,g,b triplet is between [0,1], + // hue is between [0,360], light and saturation are [0,1]. + + float rnorm, gnorm, bnorm, minval, maxval, msum, mdiff, r, g, b; + r = g = b = 0; + if(_R>0) r = _R; if(r>1) r = 1; + if(_G>0) g = _G; if(g>1) g = 1; + if(_B>0) b = _B; if(b>1) b = 1; + + minval = r; + if(gmaxval) maxval = g; + if(b>maxval) maxval = b; + + rnorm = gnorm = bnorm = 0; + mdiff = maxval - minval; + msum = maxval + minval; + float l = 0.5f * msum; + if(_Light) + *_Light = l; + if(maxval!=minval) + { + rnorm = (maxval - r)/mdiff; + gnorm = (maxval - g)/mdiff; + bnorm = (maxval - b)/mdiff; + } + else + { + if(_Saturation) + *_Saturation = 0; + if(_Hue) + *_Hue = 0; + return; + } + + if(_Saturation) + { + if(l<0.5f) + *_Saturation = mdiff/msum; + else + *_Saturation = mdiff/(2.0f - msum); + } + + if(_Hue) + { + if(r==maxval) + *_Hue = 60.0f * (6.0f + bnorm - gnorm); + else if(g==maxval) + *_Hue = 60.0f * (2.0f + rnorm - bnorm); + else + *_Hue = 60.0f * (4.0f + gnorm - rnorm); + + if(*_Hue>360.0f) + *_Hue -= 360.0f; + } +} + + +void ColorRGBToHLSi(int _R, int _G, int _B, int *_Hue, int *_Light, int *_Saturation) +{ + float h, l, s; + ColorRGBToHLSf((1.0f/255.0f)*float(_R), (1.0f/255.0f)*float(_G), (1.0f/255.0f)*float(_B), &h, &l, &s); + if(_Hue) *_Hue = (int)TClamp(h*(256.0f/360.0f), 0.0f, 255.0f); + if(_Light) *_Light = (int)TClamp(l*256.0f, 0.0f, 255.0f); + if(_Saturation) *_Saturation= (int)TClamp(s*256.0f, 0.0f, 255.0f); +} + + +void ColorHLSToRGBf(float _Hue, float _Light, float _Saturation, float *_R, float *_G, float *_B) +{ + // Compute RGB from HLS. The light and saturation are between [0,1] + // and hue is between [0,360]. The returned r,g,b triplet is between [0,1]. + + // a local auxiliary function + struct CLocal + { + static float HLSToRGB(float _Rn1, float _Rn2, float _Huei) + { + float hue = _Huei; + if(hue>360) hue = hue - 360; + if(hue<0) hue = hue + 360; + if(hue<60 ) return _Rn1 + (_Rn2-_Rn1)*hue/60; + if(hue<180) return _Rn2; + if(hue<240) return _Rn1 + (_Rn2-_Rn1)*(240-hue)/60; + return _Rn1; + } + }; + + float rh, rl, rs, rm1, rm2; + rh = rl = rs = 0; + if(_Hue>0) rh = _Hue; if(rh>360) rh = 360; + if(_Light>0) rl = _Light; if(rl>1) rl = 1; + if(_Saturation>0) rs = _Saturation; if(rs>1) rs = 1; + + if(rl<=0.5f) + rm2 = rl*(1.0f + rs); + else + rm2 = rl + rs - rl*rs; + rm1 = 2.0f*rl - rm2; + + if(!rs) + { + if(_R) *_R = rl; + if(_G) *_G = rl; + if(_B) *_B = rl; + } + else + { + if(_R) *_R = CLocal::HLSToRGB(rm1, rm2, rh+120); + if(_G) *_G = CLocal::HLSToRGB(rm1, rm2, rh); + if(_B) *_B = CLocal::HLSToRGB(rm1, rm2, rh-120); + } +} + + +void ColorHLSToRGBi(int _Hue, int _Light, int _Saturation, int *_R, int *_G, int *_B) +{ + float r, g, b; + ColorHLSToRGBf((360.0f/255.0f)*float(_Hue), (1.0f/255.0f)*float(_Light), (1.0f/255.0f)*float(_Saturation), &r, &g, &b); + if(_R) *_R = (int)TClamp(r*256.0f, 0.0f, 255.0f); + if(_G) *_G = (int)TClamp(g*256.0f, 0.0f, 255.0f); + if(_B) *_B = (int)TClamp(b*256.0f, 0.0f, 255.0f); +} + + +color32 ColorBlend(color32 _Color1, color32 _Color2, float _S) +{ + float a1, r1, g1, b1, a2, r2, g2, b2; + Color32ToARGBf(_Color1, &a1, &r1, &g1, &b1); + Color32ToARGBf(_Color2, &a2, &r2, &g2, &b2); + float t = 1.0f-_S; + return Color32FromARGBf(t*a1+_S*a2, t*r1+_S*r2, t*g1+_S*g2, t*b1+_S*b2); +} + + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwColors.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwColors.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwColors.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwColors.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,80 @@ +// --------------------------------------------------------------------------- +// +// @file TwColors.h +// @brief Color conversions +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_COLORS_INCLUDED +#define ANT_TW_COLORS_INCLUDED + + +// --------------------------------------------------------------------------- + + +typedef unsigned int color32; + + +const color32 COLOR32_BLACK = 0xff000000; // Black +const color32 COLOR32_WHITE = 0xffffffff; // White +const color32 COLOR32_ZERO = 0x00000000; // Zero +const color32 COLOR32_RED = 0xffff0000; // Red +const color32 COLOR32_GREEN = 0xff00ff00; // Green +const color32 COLOR32_BLUE = 0xff0000ff; // Blue + + +template inline const _T& TClamp(const _T& _X, const _T& _Limit1, const _T& _Limit2) +{ + if( _Limit1<_Limit2 ) + return (_X<=_Limit1) ? _Limit1 : ( (_X>=_Limit2) ? _Limit2 : _X ); + else + return (_X<=_Limit2) ? _Limit2 : ( (_X>=_Limit1) ? _Limit1 : _X ); +} + +inline color32 Color32FromARGBi(int _A, int _R, int _G, int _B) +{ + return (((color32)TClamp(_A, 0, 255))<<24) | (((color32)TClamp(_R, 0, 255))<<16) | (((color32)TClamp(_G, 0, 255))<<8) | ((color32)TClamp(_B, 0, 255)); +} + +inline color32 Color32FromARGBf(float _A, float _R, float _G, float _B) +{ + return (((color32)TClamp(_A*256.0f, 0.0f, 255.0f))<<24) | (((color32)TClamp(_R*256.0f, 0.0f, 255.0f))<<16) | (((color32)TClamp(_G*256.0f, 0.0f, 255.0f))<<8) | ((color32)TClamp(_B*256.0f, 0.0f, 255.0f)); +} + +inline void Color32ToARGBi(color32 _Color, int *_A, int *_R, int *_G, int *_B) +{ + if(_A) *_A = (_Color>>24)&0xff; + if(_R) *_R = (_Color>>16)&0xff; + if(_G) *_G = (_Color>>8)&0xff; + if(_B) *_B = _Color&0xff; +} + +inline void Color32ToARGBf(color32 _Color, float *_A, float *_R, float *_G, float *_B) +{ + if(_A) *_A = (1.0f/255.0f)*float((_Color>>24)&0xff); + if(_R) *_R = (1.0f/255.0f)*float((_Color>>16)&0xff); + if(_G) *_G = (1.0f/255.0f)*float((_Color>>8)&0xff); + if(_B) *_B = (1.0f/255.0f)*float(_Color&0xff); +} + +void ColorRGBToHLSf(float _R, float _G, float _B, float *_Hue, float *_Light, float *_Saturation); + +void ColorRGBToHLSi(int _R, int _G, int _B, int *_Hue, int *_Light, int *_Saturation); + +void ColorHLSToRGBf(float _Hue, float _Light, float _Saturation, float *_R, float *_G, float *_B); + +void ColorHLSToRGBi(int _Hue, int _Light, int _Saturation, int *_R, int *_G, int *_B); + +color32 ColorBlend(color32 _Color1, color32 _Color2, float _S); + + +// --------------------------------------------------------------------------- + + +#endif // !defined ANT_TW_COLORS_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D10.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D10.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D10.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D10.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1291 @@ +// --------------------------------------------------------------------------- +// +// @file TwDirect3D10.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include "TwDirect3D10.h" +#include "TwMgr.h" +#include "TwColors.h" + +#include "d3d10vs2003.h" // Workaround to include D3D10.h with VS2003 +#define D3D10_IGNORE_SDK_LAYERS // d3d10sdklayers.h may not exist +#include + + +using namespace std; + +const char *g_ErrCantLoadD3D10 = "Cannot load Direct3D10 library dynamically"; +const char *g_ErrCompileFX10 = "Direct3D10 effect compilation failed"; +const char *g_ErrCreateFX10 = "Direct3D10 effect creation failed"; +const char *g_ErrTechNotFound10 = "Cannot find Direct3D10 technique effect"; +const char *g_ErrCreateLayout10 = "Direct3D10 vertex layout creation failed"; +const char *g_ErrCreateBuffer10 = "Direct3D10 vertex buffer creation failed"; + +// --------------------------------------------------------------------------- + +// Dynamically loaded D3D10 functions (to avoid static linkage with d3d10.lib) +HMODULE g_D3D10Module = NULL; +typedef HRESULT (WINAPI *D3D10CompileEffectFromMemoryProc)(void *pData, SIZE_T DataLength, LPCSTR pSrcFileName, CONST D3D10_SHADER_MACRO *pDefines, ID3D10Include *pInclude, UINT HLSLFlags, UINT FXFlags, ID3D10Blob **ppCompiledEffect, ID3D10Blob **ppErrors); +typedef HRESULT (WINAPI *D3D10CreateEffectFromMemoryProc)(void *pData, SIZE_T DataLength, UINT FXFlags, ID3D10Device *pDevice, ID3D10EffectPool *pEffectPool, ID3D10Effect **ppEffect); +typedef HRESULT (WINAPI *D3D10StateBlockMaskEnableAllProc)(D3D10_STATE_BLOCK_MASK *pMask); +typedef HRESULT (WINAPI *D3D10CreateStateBlockProc)(ID3D10Device *pDevice, D3D10_STATE_BLOCK_MASK *pStateBlockMask, ID3D10StateBlock **ppStateBlock); +D3D10CompileEffectFromMemoryProc _D3D10CompileEffectFromMemory = NULL; +D3D10CreateEffectFromMemoryProc _D3D10CreateEffectFromMemory = NULL; +D3D10StateBlockMaskEnableAllProc _D3D10StateBlockMaskEnableAll = NULL; +D3D10CreateStateBlockProc _D3D10CreateStateBlock = NULL; + +const RECT FullRect = {0, 0, 16000, 16000}; +static bool RectIsFull(const RECT& r) { return r.left==FullRect.left && r.right==FullRect.right && r.top==FullRect.top && r.bottom==FullRect.bottom; } + +static int LoadDirect3D10() +{ + if( g_D3D10Module!=NULL ) + return 1; // Direct3D10 library already loaded + + g_D3D10Module = LoadLibrary("D3D10.DLL"); + if( g_D3D10Module ) + { + int res = 1; + _D3D10CompileEffectFromMemory = reinterpret_cast(GetProcAddress(g_D3D10Module, "D3D10CompileEffectFromMemory")); + if( _D3D10CompileEffectFromMemory==NULL ) + res = 0; + _D3D10CreateEffectFromMemory = reinterpret_cast(GetProcAddress(g_D3D10Module, "D3D10CreateEffectFromMemory")); + if( _D3D10CreateEffectFromMemory==NULL ) + res = 0; + _D3D10StateBlockMaskEnableAll = reinterpret_cast(GetProcAddress(g_D3D10Module, "D3D10StateBlockMaskEnableAll")); + if( _D3D10StateBlockMaskEnableAll==NULL ) + res = 0; + _D3D10CreateStateBlock = reinterpret_cast(GetProcAddress(g_D3D10Module, "D3D10CreateStateBlock")); + if( _D3D10CreateStateBlock==NULL ) + res = 0; + return res; + } + else + return 0; // cannot load DLL +} + +static int UnloadDirect3D10() +{ + _D3D10CompileEffectFromMemory = NULL; + _D3D10CreateEffectFromMemory = NULL; + _D3D10StateBlockMaskEnableAll = NULL; + _D3D10CreateStateBlock = NULL; + + if( g_D3D10Module==NULL ) + return 1; // Direct3D10 library not loaded + + if( FreeLibrary(g_D3D10Module) ) + { + g_D3D10Module = NULL; + return 1; + } + else + return 0; // cannot unload d3d10.dll +} + +// --------------------------------------------------------------------------- + +static ID3D10ShaderResourceView *BindFont(ID3D10Device *_Dev, ID3D10EffectShaderResourceVariable *_ResVar, const CTexFont *_Font) +{ + assert(_Font!=NULL); + assert(_ResVar!=NULL); + + int w = _Font->m_TexWidth; + int h = _Font->m_TexHeight; + color32 *font32 = new color32[w*h]; + color32 *p = font32; + for( int i=0; im_TexBytes[i]))<<24); + + D3D10_TEXTURE2D_DESC desc; + desc.Width = w; + desc.Height = h; + desc.MipLevels = 1; + desc.ArraySize = 1; + desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + desc.SampleDesc.Count = 1; + desc.SampleDesc.Quality = 0; + desc.Usage = D3D10_USAGE_IMMUTABLE; + desc.BindFlags = D3D10_BIND_SHADER_RESOURCE; + desc.CPUAccessFlags = 0; + desc.MiscFlags = 0; + D3D10_SUBRESOURCE_DATA data; + data.pSysMem = font32; + data.SysMemPitch = w*sizeof(color32); + data.SysMemSlicePitch = 0; + ID3D10Texture2D *tex = NULL; + ID3D10ShaderResourceView *texRV = NULL; + if( SUCCEEDED(_Dev->CreateTexture2D(&desc, &data, &tex)) ) + { + if( SUCCEEDED(_Dev->CreateShaderResourceView(tex, NULL, &texRV)) ) + if( _ResVar ) + _ResVar->SetResource(texRV); + tex->Release(); + tex = NULL; + } + + delete[] font32; + return texRV; +} + +// --------------------------------------------------------------------------- + +static void UnbindFont(ID3D10Device *_Dev, ID3D10EffectShaderResourceVariable *_ResVar, ID3D10ShaderResourceView *_TexRV) +{ + (void)_Dev; + + if( _ResVar ) + _ResVar->SetResource(NULL); + + if( _TexRV ) + { + ULONG rc = _TexRV->Release(); + assert( rc==0 ); (void)rc; + } +} + +// --------------------------------------------------------------------------- + +struct CState10 +{ + ID3D10StateBlock * m_StateBlock; + + void Save(); + void Restore(); + CState10(ID3D10Device *_Dev); + ~CState10(); +private: + ID3D10Device * m_D3DDev; +}; + +CState10::CState10(ID3D10Device *_Dev) +{ + ZeroMemory(this, sizeof(CState10)); + m_D3DDev = _Dev; +} + +CState10::~CState10() +{ + if( m_StateBlock ) + { + UINT rc = m_StateBlock->Release(); + assert( rc==0 ); (void)rc; + m_StateBlock = NULL; + } +} + +void CState10::Save() +{ + if( !m_StateBlock ) + { + D3D10_STATE_BLOCK_MASK stateMask; + _D3D10StateBlockMaskEnableAll(&stateMask); + _D3D10CreateStateBlock(m_D3DDev, &stateMask, &m_StateBlock); + } + + if( m_StateBlock ) + m_StateBlock->Capture(); +} + +void CState10::Restore() +{ + if( m_StateBlock ) + m_StateBlock->Apply(); +} + +// --------------------------------------------------------------------------- + +char g_ShaderFX[] = "// AntTweakBar shaders and techniques \n" + " float4 g_Offset = 0; float4 g_CstColor = 1; \n" + " struct LineRectPSInput { float4 Pos : SV_POSITION; float4 Color : COLOR0; }; \n" + " LineRectPSInput LineRectVS(float4 pos : POSITION, float4 color : COLOR, uniform bool useCstColor) { \n" + " LineRectPSInput ps; ps.Pos = pos + g_Offset; \n" + " ps.Color = useCstColor ? g_CstColor : color; return ps; } \n" + " float4 LineRectPS(LineRectPSInput input) : SV_Target { return input.Color; } \n" + " technique10 LineRect { pass P0 { \n" + " SetVertexShader( CompileShader( vs_4_0, LineRectVS(false) ) ); \n" + " SetGeometryShader( NULL ); \n" + " SetPixelShader( CompileShader( ps_4_0, LineRectPS() ) ); \n" + " } }\n" + " technique10 LineRectCstColor { pass P0 { \n" + " SetVertexShader( CompileShader( vs_4_0, LineRectVS(true) ) ); \n" + " SetGeometryShader( NULL ); \n" + " SetPixelShader( CompileShader( ps_4_0, LineRectPS() ) ); \n" + " } }\n" + " Texture2D Font; \n" + " SamplerState FontSampler { Filter = MIN_MAG_MIP_POINT; AddressU = BORDER; AddressV = BORDER; BorderColor=float4(0, 0, 0, 0); }; \n" + " struct TextPSInput { float4 Pos : SV_POSITION; float4 Color : COLOR0; float2 Tex : TEXCOORD0; }; \n" + " TextPSInput TextVS(float4 pos : POSITION, float4 color : COLOR, float2 tex : TEXCOORD0, uniform bool useCstColor) { \n" + " TextPSInput ps; ps.Pos = pos + g_Offset; \n" + " ps.Color = useCstColor ? g_CstColor : color; ps.Tex = tex; return ps; } \n" + " float4 TextPS(TextPSInput input) : SV_Target { return Font.Sample(FontSampler, input.Tex)*input.Color; } \n" + " technique10 Text { pass P0 { \n" + " SetVertexShader( CompileShader( vs_4_0, TextVS(false) ) ); \n" + " SetGeometryShader( NULL ); \n" + " SetPixelShader( CompileShader( ps_4_0, TextPS() ) ); \n" + " } }\n" + " technique10 TextCstColor { pass P0 { \n" + " SetVertexShader( CompileShader( vs_4_0, TextVS(true) ) ); \n" + " SetGeometryShader( NULL ); \n" + " SetPixelShader( CompileShader( ps_4_0, TextPS() ) ); \n" + " } }\n" + " // End of AntTweakBar shaders and techniques \n"; + +// --------------------------------------------------------------------------- + +int CTwGraphDirect3D10::Init() +{ + assert(g_TwMgr!=NULL); + assert(g_TwMgr->m_Device!=NULL); + + m_D3DDev = static_cast(g_TwMgr->m_Device); + m_D3DDevInitialRefCount = m_D3DDev->AddRef() - 1; + + m_Drawing = false; + m_OffsetX = m_OffsetY = 0; + m_ViewportInit = new D3D10_VIEWPORT; + m_FontTex = NULL; + m_FontD3DTexRV = NULL; + m_WndWidth = 0; + m_WndHeight = 0; + m_State = NULL; + m_DepthStencilState = NULL; + m_BlendState = NULL; + m_RasterState = NULL; + m_RasterStateAntialiased = NULL; + m_RasterStateCullCW = NULL; + m_RasterStateCullCCW = NULL; + m_Effect = NULL; + m_LineRectTech = NULL; + m_LineRectCstColorTech = NULL; + m_LineRectVertexLayout = NULL; + m_LineVertexBuffer = NULL; + m_RectVertexBuffer = NULL; + m_TrianglesVertexBuffer = NULL; + m_TrianglesVertexBufferCount = 0; + m_TextTech = NULL; + m_TextCstColorTech = NULL; + m_TextVertexLayout = NULL; + m_FontD3DResVar = NULL; + m_OffsetVar = NULL; + m_CstColorVar = NULL; + + // Load some D3D10 functions + if( !LoadDirect3D10() ) + { + g_TwMgr->SetLastError(g_ErrCantLoadD3D10); + Shut(); + return 0; + } + + // Allocate state object + m_State = new CState10(m_D3DDev); + + // Compile shaders + DWORD shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS; + #if defined( DEBUG ) || defined( _DEBUG ) + // shaderFlags |= D3D10_SHADER_DEBUG; // no more supported + #endif + ID3D10Blob *compiledFX = NULL; + ID3D10Blob *errors = NULL; + HRESULT hr = _D3D10CompileEffectFromMemory(g_ShaderFX, strlen(g_ShaderFX), "AntTweakBarFX", NULL, NULL, shaderFlags, 0, &compiledFX, &errors); + if( FAILED(hr) ) + { + const size_t ERR_MSG_MAX_LEN = 4096; + static char s_ErrorMsg[ERR_MSG_MAX_LEN]; // must be static to be sent to SetLastError + strncpy(s_ErrorMsg, g_ErrCompileFX10, ERR_MSG_MAX_LEN-1); + size_t errOffset = strlen(s_ErrorMsg); + size_t errLen = 0; + if( errors!=NULL ) + { + s_ErrorMsg[errOffset++] = ':'; + s_ErrorMsg[errOffset++] = '\n'; + errLen = min(errors->GetBufferSize(), ERR_MSG_MAX_LEN-errOffset-2); + strncpy(s_ErrorMsg+errOffset, static_cast(errors->GetBufferPointer()), errLen); + errors->Release(); + errors = NULL; + } + s_ErrorMsg[errOffset+errLen] = '\0'; + g_TwMgr->SetLastError(s_ErrorMsg); + Shut(); + return 0; + } + hr = _D3D10CreateEffectFromMemory(compiledFX->GetBufferPointer(), compiledFX->GetBufferSize(), 0, m_D3DDev, NULL, &m_Effect); + compiledFX->Release(); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateFX10); + Shut(); + return 0; + } + + // Obtain the techniques + m_LineRectTech = m_Effect->GetTechniqueByName("LineRect"); + m_LineRectCstColorTech = m_Effect->GetTechniqueByName("LineRectCstColor"); + m_TextTech = m_Effect->GetTechniqueByName("Text"); + m_TextCstColorTech = m_Effect->GetTechniqueByName("TextCstColor"); + if( m_LineRectTech==NULL || m_TextTech==NULL || m_LineRectCstColorTech==NULL || m_TextCstColorTech==NULL ) + { + g_TwMgr->SetLastError(g_ErrTechNotFound10); + Shut(); + return 0; + } + + // Create input layout for lines & rect + D3D10_INPUT_ELEMENT_DESC lineRectLayout[] = + { + { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 }, + { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, offsetof(CLineRectVtx, m_Color), D3D10_INPUT_PER_VERTEX_DATA, 0 } + }; + D3D10_PASS_DESC passDesc; + hr = m_LineRectTech->GetPassByIndex(0)->GetDesc(&passDesc); + if( SUCCEEDED(hr) ) + hr = m_D3DDev->CreateInputLayout(lineRectLayout, sizeof(lineRectLayout)/sizeof(lineRectLayout[0]), passDesc.pIAInputSignature, passDesc.IAInputSignatureSize, &m_LineRectVertexLayout); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateLayout10); + Shut(); + return 0; + } + + // Create line vertex buffer + D3D10_BUFFER_DESC bd; + bd.Usage = D3D10_USAGE_DYNAMIC; + bd.ByteWidth = 2 * sizeof(CLineRectVtx); + bd.BindFlags = D3D10_BIND_VERTEX_BUFFER; + bd.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE; + bd.MiscFlags = 0; + hr = m_D3DDev->CreateBuffer(&bd, NULL, &m_LineVertexBuffer); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateBuffer10); + Shut(); + return 0; + } + + // Create rect vertex buffer + bd.ByteWidth = 4 * sizeof(CLineRectVtx); + hr = m_D3DDev->CreateBuffer(&bd, NULL, &m_RectVertexBuffer); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateBuffer10); + Shut(); + return 0; + } + + // Create input layout for text + D3D10_INPUT_ELEMENT_DESC textLayout[] = + { + { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 }, + { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, offsetof(CTextVtx, m_Color), D3D10_INPUT_PER_VERTEX_DATA, 0 }, + { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, offsetof(CTextVtx, m_UV), D3D10_INPUT_PER_VERTEX_DATA, 0 } + }; + hr = m_TextTech->GetPassByIndex(0)->GetDesc(&passDesc); + if( SUCCEEDED(hr) ) + hr = m_D3DDev->CreateInputLayout(textLayout, sizeof(textLayout)/sizeof(textLayout[0]), passDesc.pIAInputSignature, passDesc.IAInputSignatureSize, &m_TextVertexLayout); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateLayout10); + Shut(); + return 0; + } + + // Create depth stencil state object + D3D10_DEPTH_STENCILOP_DESC od; + od.StencilFunc = D3D10_COMPARISON_ALWAYS; + od.StencilFailOp = D3D10_STENCIL_OP_KEEP; + od.StencilPassOp = D3D10_STENCIL_OP_KEEP; + od.StencilDepthFailOp = D3D10_STENCIL_OP_KEEP; + D3D10_DEPTH_STENCIL_DESC dsd; + dsd.DepthEnable = FALSE; + dsd.DepthWriteMask = D3D10_DEPTH_WRITE_MASK_ZERO; + dsd.DepthFunc = D3D10_COMPARISON_ALWAYS; + dsd.StencilEnable = FALSE; + dsd.StencilReadMask = D3D10_DEFAULT_STENCIL_READ_MASK; + dsd.StencilWriteMask = D3D10_DEFAULT_STENCIL_WRITE_MASK; + dsd.FrontFace = od; + dsd.BackFace = od; + m_D3DDev->CreateDepthStencilState(&dsd, &m_DepthStencilState); + + // Create blend state object + D3D10_BLEND_DESC bsd; + bsd.AlphaToCoverageEnable = FALSE; + for(int i=0; i<8; ++i) + { + bsd.BlendEnable[i] = TRUE; + bsd.RenderTargetWriteMask[i] = D3D10_COLOR_WRITE_ENABLE_ALL; + } + bsd.SrcBlend = D3D10_BLEND_SRC_ALPHA; + bsd.DestBlend = D3D10_BLEND_INV_SRC_ALPHA; + bsd.BlendOp = D3D10_BLEND_OP_ADD; + bsd.SrcBlendAlpha = D3D10_BLEND_SRC_ALPHA; + bsd.DestBlendAlpha = D3D10_BLEND_INV_SRC_ALPHA; + bsd.BlendOpAlpha = D3D10_BLEND_OP_ADD; + m_D3DDev->CreateBlendState(&bsd, &m_BlendState); + + // Create rasterizer state object + D3D10_RASTERIZER_DESC rd; + rd.FillMode = D3D10_FILL_SOLID; + rd.CullMode = D3D10_CULL_NONE; + rd.FrontCounterClockwise = true; + rd.DepthBias = false; + rd.DepthBiasClamp = 0; + rd.SlopeScaledDepthBias = 0; + rd.DepthClipEnable = false; + rd.ScissorEnable = true; + rd.MultisampleEnable = false; + rd.AntialiasedLineEnable = false; + m_D3DDev->CreateRasterizerState(&rd, &m_RasterState); + + rd.AntialiasedLineEnable = true; + m_D3DDev->CreateRasterizerState(&rd, &m_RasterStateAntialiased); + rd.AntialiasedLineEnable = false; + + rd.CullMode = D3D10_CULL_BACK; + m_D3DDev->CreateRasterizerState(&rd, &m_RasterStateCullCW); + + rd.CullMode = D3D10_CULL_FRONT; + m_D3DDev->CreateRasterizerState(&rd, &m_RasterStateCullCCW); + + m_ViewportAndScissorRects[0] = FullRect; + m_ViewportAndScissorRects[1] = FullRect; + m_D3DDev->RSSetScissorRects(1, m_ViewportAndScissorRects); + + // Get effect globals + if( m_Effect->GetVariableByName("Font") ) + m_FontD3DResVar = m_Effect->GetVariableByName("Font")->AsShaderResource(); + assert( m_FontD3DResVar!=NULL ); + if( m_Effect->GetVariableByName("g_Offset") ) + m_OffsetVar = m_Effect->GetVariableByName("g_Offset")->AsVector(); + assert( m_OffsetVar!=NULL ); + if( m_Effect->GetVariableByName("g_CstColor") ) + m_CstColorVar = m_Effect->GetVariableByName("g_CstColor")->AsVector(); + assert( m_CstColorVar!=NULL ); + + return 1; +} + +// --------------------------------------------------------------------------- + +int CTwGraphDirect3D10::Shut() +{ + assert(m_Drawing==false); + + UnbindFont(m_D3DDev, m_FontD3DResVar, m_FontD3DTexRV); + m_FontD3DTexRV = NULL; + if( m_State ) + { + delete m_State; + m_State = NULL; + } + if( m_ViewportInit ) + { + delete m_ViewportInit; + m_ViewportInit = NULL; + } + + if( m_DepthStencilState ) + { + ULONG rc = m_DepthStencilState->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_DepthStencilState = NULL; + } + if( m_BlendState ) + { + ULONG rc = m_BlendState->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_BlendState = NULL; + } + if( m_RasterState ) + { + ULONG rc = m_RasterState->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_RasterState = NULL; + } + if( m_RasterStateAntialiased ) + { + ULONG rc = m_RasterStateAntialiased->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_RasterStateAntialiased = NULL; + } + if( m_RasterStateCullCW ) + { + ULONG rc = m_RasterStateCullCW->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_RasterStateCullCW = NULL; + } + if( m_RasterStateCullCCW ) + { + ULONG rc = m_RasterStateCullCCW->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_RasterStateCullCCW = NULL; + } + + m_FontD3DResVar = NULL; + m_OffsetVar = NULL; + m_CstColorVar = NULL; + + if( m_LineVertexBuffer ) + { + ULONG rc = m_LineVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + m_LineVertexBuffer = NULL; + } + if( m_RectVertexBuffer ) + { + ULONG rc = m_RectVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + m_RectVertexBuffer = NULL; + } + if( m_TrianglesVertexBuffer ) + { + ULONG rc = m_TrianglesVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + m_TrianglesVertexBuffer = NULL; + m_TrianglesVertexBufferCount = 0; + } + if( m_LineRectVertexLayout ) + { + ULONG rc = m_LineRectVertexLayout->Release(); + assert( rc==0 ); (void)rc; + m_LineRectVertexLayout = NULL; + } + if( m_TextVertexLayout ) + { + ULONG rc = m_TextVertexLayout->Release(); + assert( rc==0 ); (void)rc; + m_TextVertexLayout = NULL; + } + if( m_Effect ) + { + ULONG rc = m_Effect->Release(); + assert( rc==0 ); (void)rc; + m_Effect = NULL; + } + + if( m_D3DDev ) + { + //unsigned int rc = m_D3DDev->Release(); + //assert( m_D3DDevInitialRefCount==rc ); (void)rc; + m_D3DDev->Release(); + m_D3DDev = NULL; + } + + // Unload D3D10 + UnloadDirect3D10(); // this is not a problem if it cannot be unloaded + + return 1; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::BeginDraw(int _WndWidth, int _WndHeight) +{ + assert(m_Drawing==false && _WndWidth>0 && _WndHeight>0); + m_Drawing = true; + + m_WndWidth = _WndWidth; + m_WndHeight = _WndHeight; + m_OffsetX = m_OffsetY = 0; + + // save context + m_State->Save(); + + // Setup the viewport + D3D10_VIEWPORT vp; + vp.Width = _WndWidth; + vp.Height = _WndHeight; + vp.MinDepth = 0.0f; + vp.MaxDepth = 1.0f; + vp.TopLeftX = 0; + vp.TopLeftY = 0; + m_D3DDev->RSSetViewports(1, &vp); + *static_cast(m_ViewportInit) = vp; + + m_D3DDev->RSSetState(m_RasterState); + + m_D3DDev->OMSetDepthStencilState(m_DepthStencilState, 0); + float blendFactors[4] = { 1, 1, 1, 1 }; + m_D3DDev->OMSetBlendState(m_BlendState, blendFactors, 0xffffffff); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::EndDraw() +{ + m_D3DDev->RSSetState(NULL); + m_D3DDev->OMSetDepthStencilState(NULL, 0); + m_D3DDev->OMSetBlendState(NULL, NULL, 0xffffffff); + + assert(m_Drawing==true); + m_Drawing = false; + + // restore context + m_State->Restore(); +} + +// --------------------------------------------------------------------------- + +bool CTwGraphDirect3D10::IsDrawing() +{ + return m_Drawing; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::Restore() +{ + if( m_State ) + { + if( m_State->m_StateBlock ) + { + UINT rc = m_State->m_StateBlock->Release(); + assert( rc==0 ); (void)rc; + m_State->m_StateBlock = NULL; + } + } + + UnbindFont(m_D3DDev, m_FontD3DResVar, m_FontD3DTexRV); + m_FontD3DTexRV = NULL; + + m_FontTex = NULL; +} + + +// --------------------------------------------------------------------------- + +static inline float ToNormScreenX(int x, int wndWidth) +{ + return 2.0f*((float)x-0.5f)/wndWidth - 1.0f; +} + +static inline float ToNormScreenY(int y, int wndHeight) +{ + return 1.0f - 2.0f*((float)y-0.5f)/wndHeight; +} + +static inline color32 ToR8G8B8A8(color32 col) +{ + return (col & 0xff00ff00) | ((col>>16) & 0xff) | ((col<<16) & 0xff0000); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased) +{ + assert(m_Drawing==true); + + float x0 = ToNormScreenX(_X0 + m_OffsetX, m_WndWidth); + float y0 = ToNormScreenY(_Y0 + m_OffsetY, m_WndHeight); + float x1 = ToNormScreenX(_X1 + m_OffsetX, m_WndWidth); + float y1 = ToNormScreenY(_Y1 + m_OffsetY, m_WndHeight); + + CLineRectVtx *vertices = NULL; + HRESULT hr = m_LineVertexBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, (void **)&vertices); + if( SUCCEEDED(hr) ) + { + // Fill vertex buffer + vertices[0].m_Pos[0] = x0; + vertices[0].m_Pos[1] = y0; + vertices[0].m_Pos[2] = 0; + vertices[0].m_Color = ToR8G8B8A8(_Color0); + vertices[1].m_Pos[0] = x1; + vertices[1].m_Pos[1] = y1; + vertices[1].m_Pos[2] = 0; + vertices[1].m_Color = ToR8G8B8A8(_Color1); + + m_LineVertexBuffer->Unmap(); + + if( _AntiAliased ) + m_D3DDev->RSSetState(m_RasterStateAntialiased); + + // Reset shader globals + float offsetVec[4] = { 0, 0, 0, 0 }; + if( m_OffsetVar ) + m_OffsetVar->SetFloatVector(offsetVec); + float colorVec[4] = { 1, 1, 1, 1 }; + if( m_CstColorVar ) + m_CstColorVar->SetFloatVector(colorVec); + + // Set the input layout + m_D3DDev->IASetInputLayout(m_LineRectVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CLineRectVtx); + UINT offset = 0; + m_D3DDev->IASetVertexBuffers(0, 1, &m_LineVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDev->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_LINELIST); + + // Render the line + D3D10_TECHNIQUE_DESC techDesc; + m_LineRectTech->GetDesc(&techDesc); + for(UINT p=0; pGetPassByIndex(p)->Apply(0); + m_D3DDev->Draw(2, 0); + } + + if( _AntiAliased ) + m_D3DDev->RSSetState(m_RasterState); // restore default raster state + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11) +{ + assert(m_Drawing==true); + + // border adjustment + if(_X0<_X1) + ++_X1; + else if(_X0>_X1) + ++_X0; + if(_Y0<_Y1) + ++_Y1; + else if(_Y0>_Y1) + ++_Y0; + + float x0 = ToNormScreenX(_X0 + m_OffsetX, m_WndWidth); + float y0 = ToNormScreenY(_Y0 + m_OffsetY, m_WndHeight); + float x1 = ToNormScreenX(_X1 + m_OffsetX, m_WndWidth); + float y1 = ToNormScreenY(_Y1 + m_OffsetY, m_WndHeight); + + CLineRectVtx *vertices = NULL; + HRESULT hr = m_RectVertexBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, (void **)&vertices); + if( SUCCEEDED(hr) ) + { + // Fill vertex buffer + vertices[0].m_Pos[0] = x0; + vertices[0].m_Pos[1] = y0; + vertices[0].m_Pos[2] = 0; + vertices[0].m_Color = ToR8G8B8A8(_Color00); + vertices[1].m_Pos[0] = x1; + vertices[1].m_Pos[1] = y0; + vertices[1].m_Pos[2] = 0; + vertices[1].m_Color = ToR8G8B8A8(_Color10); + vertices[2].m_Pos[0] = x0; + vertices[2].m_Pos[1] = y1; + vertices[2].m_Pos[2] = 0; + vertices[2].m_Color = ToR8G8B8A8(_Color01); + vertices[3].m_Pos[0] = x1; + vertices[3].m_Pos[1] = y1; + vertices[3].m_Pos[2] = 0; + vertices[3].m_Color = ToR8G8B8A8(_Color11); + + m_RectVertexBuffer->Unmap(); + + // Reset shader globals + float offsetVec[4] = { 0, 0, 0, 0 }; + if( m_OffsetVar ) + m_OffsetVar->SetFloatVector(offsetVec); + float colorVec[4] = { 1, 1, 1, 1 }; + if( m_CstColorVar ) + m_CstColorVar->SetFloatVector(colorVec); + + // Set the input layout + m_D3DDev->IASetInputLayout(m_LineRectVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CLineRectVtx); + UINT offset = 0; + m_D3DDev->IASetVertexBuffers(0, 1, &m_RectVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDev->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + + // Render the rect + D3D10_TECHNIQUE_DESC techDesc; + m_LineRectTech->GetDesc(&techDesc); + for(UINT p=0; pGetPassByIndex(p)->Apply(0); + m_D3DDev->Draw(4, 0); + } + } +} + +// --------------------------------------------------------------------------- + +void *CTwGraphDirect3D10::NewTextObj() +{ + CTextObj *textObj = new CTextObj; + memset(textObj, 0, sizeof(CTextObj)); + return textObj; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::DeleteTextObj(void *_TextObj) +{ + assert(_TextObj!=NULL); + CTextObj *textObj = static_cast(_TextObj); + if( textObj->m_TextVertexBuffer ) + textObj->m_TextVertexBuffer->Release(); + if( textObj->m_BgVertexBuffer ) + textObj->m_BgVertexBuffer->Release(); + memset(textObj, 0, sizeof(CTextObj)); + delete textObj; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + assert(_Font!=NULL); + + if( _Font != m_FontTex ) + { + UnbindFont(m_D3DDev, m_FontD3DResVar, m_FontD3DTexRV); + m_FontD3DTexRV = BindFont(m_D3DDev, m_FontD3DResVar, _Font); + m_FontTex = _Font; + } + + int nbTextVerts = 0; + int line; + for( line=0; line<_NbLines; ++line ) + nbTextVerts += 6 * (int)_TextLines[line].length(); + int nbBgVerts = 0; + if( _BgWidth>0 ) + nbBgVerts = _NbLines*6; + + CTextObj *textObj = static_cast(_TextObj); + textObj->m_LineColors = (_LineColors!=NULL); + textObj->m_LineBgColors = (_LineBgColors!=NULL); + + // (re)create text vertex buffer if needed, and map it + CTextVtx *textVerts = NULL; + if( nbTextVerts>0 ) + { + if( textObj->m_TextVertexBuffer==NULL || textObj->m_TextVertexBufferSizem_TextVertexBuffer!=NULL ) + { + ULONG rc = textObj->m_TextVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + textObj->m_TextVertexBuffer = NULL; + } + textObj->m_TextVertexBufferSize = nbTextVerts + 6*256; // add a reserve of 256 characters + D3D10_BUFFER_DESC bd; + bd.Usage = D3D10_USAGE_DYNAMIC; + bd.ByteWidth = textObj->m_TextVertexBufferSize * sizeof(CTextVtx); + bd.BindFlags = D3D10_BIND_VERTEX_BUFFER; + bd.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE; + bd.MiscFlags = 0; + m_D3DDev->CreateBuffer(&bd, NULL, &textObj->m_TextVertexBuffer); + } + + if( textObj->m_TextVertexBuffer!=NULL ) + textObj->m_TextVertexBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, (void **)&textVerts); + } + + // (re)create bg vertex buffer if needed, and map it + CLineRectVtx *bgVerts = NULL; + if( nbBgVerts>0 ) + { + if( textObj->m_BgVertexBuffer==NULL || textObj->m_BgVertexBufferSizem_BgVertexBuffer!=NULL ) + { + ULONG rc = textObj->m_BgVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + textObj->m_BgVertexBuffer = NULL; + } + textObj->m_BgVertexBufferSize = nbBgVerts + 6*32; // add a reserve of 32 rects + D3D10_BUFFER_DESC bd; + bd.Usage = D3D10_USAGE_DYNAMIC; + bd.ByteWidth = textObj->m_BgVertexBufferSize * sizeof(CLineRectVtx); + bd.BindFlags = D3D10_BIND_VERTEX_BUFFER; + bd.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE; + bd.MiscFlags = 0; + m_D3DDev->CreateBuffer(&bd, NULL, &textObj->m_BgVertexBuffer); + } + + if( textObj->m_BgVertexBuffer!=NULL ) + textObj->m_BgVertexBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, (void **)&bgVerts); + } + + int x, x1, y, y1, i, len; + float px, px1, py, py1; + unsigned char ch; + const unsigned char *text; + color32 lineColor = COLOR32_RED; + CTextVtx vtx; + vtx.m_Pos[2] = 0; + CLineRectVtx bgVtx; + bgVtx.m_Pos[2] = 0; + int textVtxIndex = 0; + int bgVtxIndex = 0; + for( line=0; line<_NbLines; ++line ) + { + x = 0; + y = line * (_Font->m_CharHeight+_Sep); + y1 = y+_Font->m_CharHeight; + len = (int)_TextLines[line].length(); + text = (const unsigned char *)(_TextLines[line].c_str()); + if( _LineColors!=NULL ) + lineColor = ToR8G8B8A8(_LineColors[line]); + + if( textVerts!=NULL ) + for( i=0; im_CharWidth[ch]; + + px = ToNormScreenX(x, m_WndWidth); + py = ToNormScreenY(y, m_WndHeight); + px1 = ToNormScreenX(x1, m_WndWidth); + py1 = ToNormScreenY(y1, m_WndHeight); + + vtx.m_Color = lineColor; + + vtx.m_Pos[0] = px; + vtx.m_Pos[1] = py; + vtx.m_UV [0] = _Font->m_CharU0[ch]; + vtx.m_UV [1] = _Font->m_CharV0[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px1; + vtx.m_Pos[1] = py; + vtx.m_UV [0] = _Font->m_CharU1[ch]; + vtx.m_UV [1] = _Font->m_CharV0[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px; + vtx.m_Pos[1] = py1; + vtx.m_UV [0] = _Font->m_CharU0[ch]; + vtx.m_UV [1] = _Font->m_CharV1[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px1; + vtx.m_Pos[1] = py; + vtx.m_UV [0] = _Font->m_CharU1[ch]; + vtx.m_UV [1] = _Font->m_CharV0[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px1; + vtx.m_Pos[1] = py1; + vtx.m_UV [0] = _Font->m_CharU1[ch]; + vtx.m_UV [1] = _Font->m_CharV1[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px; + vtx.m_Pos[1] = py1; + vtx.m_UV [0] = _Font->m_CharU0[ch]; + vtx.m_UV [1] = _Font->m_CharV1[ch]; + textVerts[textVtxIndex++] = vtx; + + x = x1; + } + + if( _BgWidth>0 && bgVerts!=NULL ) + { + if( _LineBgColors!=NULL ) + bgVtx.m_Color = ToR8G8B8A8(_LineBgColors[line]); + else + bgVtx.m_Color = ToR8G8B8A8(COLOR32_BLACK); + + px = ToNormScreenX(-1, m_WndWidth); + py = ToNormScreenY(y, m_WndHeight); + px1 = ToNormScreenX(_BgWidth+1, m_WndWidth); + py1 = ToNormScreenY(y1, m_WndHeight); + + bgVtx.m_Pos[0] = px; + bgVtx.m_Pos[1] = py; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px1; + bgVtx.m_Pos[1] = py; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px; + bgVtx.m_Pos[1] = py1; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px1; + bgVtx.m_Pos[1] = py; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px1; + bgVtx.m_Pos[1] = py1; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px; + bgVtx.m_Pos[1] = py1; + bgVerts[bgVtxIndex++] = bgVtx; + } + } + assert( textVtxIndex==nbTextVerts ); + assert( bgVtxIndex==nbBgVerts ); + textObj->m_NbTextVerts = nbTextVerts; + textObj->m_NbBgVerts = nbBgVerts; + + if( textVerts!=NULL ) + textObj->m_TextVertexBuffer->Unmap(); + if( bgVerts!=NULL ) + textObj->m_BgVertexBuffer->Unmap(); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + CTextObj *textObj = static_cast(_TextObj); + float dx = 2.0f*(float)(_X + m_OffsetX)/m_WndWidth; + float dy = -2.0f*(float)(_Y + m_OffsetY)/m_WndHeight; + + float offsetVec[4] = { 0, 0, 0, 0 }; + offsetVec[0] = dx; + offsetVec[1] = dy; + if( m_OffsetVar ) + m_OffsetVar->SetFloatVector(offsetVec); + + // Draw background + if( textObj->m_NbBgVerts>=4 && textObj->m_BgVertexBuffer!=NULL ) + { + float color[4]; + Color32ToARGBf(_BgColor, color+3, color+0, color+1, color+2); + if( m_CstColorVar ) + m_CstColorVar->SetFloatVector(color); + + // Set the input layout + m_D3DDev->IASetInputLayout(m_LineRectVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CLineRectVtx); + UINT offset = 0; + m_D3DDev->IASetVertexBuffers(0, 1, &textObj->m_BgVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDev->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + + // Render the bg rectangles + ID3D10EffectTechnique *tech; + if( _BgColor!=0 || !textObj->m_LineBgColors ) // use a constant bg color + tech = m_LineRectCstColorTech; + else // use vertex buffer colors + tech = m_LineRectTech; + D3D10_TECHNIQUE_DESC techDesc; + tech->GetDesc(&techDesc); + for( UINT p=0; pGetPassByIndex(p)->Apply(0); + m_D3DDev->Draw(textObj->m_NbBgVerts, 0); + } + } + + // Draw text + if( textObj->m_NbTextVerts>=4 && textObj->m_TextVertexBuffer!=NULL ) + { + float color[4]; + Color32ToARGBf(_Color, color+3, color+0, color+1, color+2); + if( m_CstColorVar ) + m_CstColorVar->SetFloatVector(color); + + // Set the input layout + m_D3DDev->IASetInputLayout(m_TextVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CTextVtx); + UINT offset = 0; + m_D3DDev->IASetVertexBuffers(0, 1, &textObj->m_TextVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDev->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + + // Render text + ID3D10EffectTechnique *tech; + if( _Color!=0 || !textObj->m_LineColors ) // use a constant color + tech = m_TextCstColorTech; + else // use vertex buffer colors + tech = m_TextTech; + D3D10_TECHNIQUE_DESC techDesc; + tech->GetDesc(&techDesc); + for( UINT p=0; pGetPassByIndex(p)->Apply(0); + m_D3DDev->Draw(textObj->m_NbTextVerts, 0); + } + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY) +{ + if( _Width>0 && _Height>0 ) + { + /* viewport changes screen coordinates, use scissor instead + D3D10_VIEWPORT vp; + vp.TopLeftX = _X0; + vp.TopLeftY = _Y0; + vp.Width = _Width; + vp.Height = _Height; + vp.MinDepth = 0; + vp.MaxDepth = 1; + m_D3DDev->RSSetViewports(1, &vp); + */ + + m_ViewportAndScissorRects[0].left = _X0; + m_ViewportAndScissorRects[0].right = _X0 + _Width - 1; + m_ViewportAndScissorRects[0].top = _Y0; + m_ViewportAndScissorRects[0].bottom = _Y0 + _Height - 1; + if( RectIsFull(m_ViewportAndScissorRects[1]) ) + m_D3DDev->RSSetScissorRects(1, m_ViewportAndScissorRects); // viewport clipping only + else + m_D3DDev->RSSetScissorRects(2, m_ViewportAndScissorRects); + + m_OffsetX = _X0 + _OffsetX; + m_OffsetY = _Y0 + _OffsetY; + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::RestoreViewport() +{ + //m_D3DDev->RSSetViewports(1, static_cast(m_ViewportInit)); + m_ViewportAndScissorRects[0] = FullRect; + m_D3DDev->RSSetScissorRects(1, m_ViewportAndScissorRects+1); // scissor only + + m_OffsetX = m_OffsetY = 0; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::SetScissor(int _X0, int _Y0, int _Width, int _Height) +{ + if( _Width>0 && _Height>0 ) + { + m_ViewportAndScissorRects[1].left = _X0 - 2; + m_ViewportAndScissorRects[1].right = _X0 + _Width - 3; + m_ViewportAndScissorRects[1].top = _Y0 - 1; + m_ViewportAndScissorRects[1].bottom = _Y0 + _Height - 1; + if( RectIsFull(m_ViewportAndScissorRects[0]) ) + m_D3DDev->RSSetScissorRects(1, m_ViewportAndScissorRects+1); // no viewport clipping + else + m_D3DDev->RSSetScissorRects(2, m_ViewportAndScissorRects); + } + else + { + m_ViewportAndScissorRects[1] = FullRect; + m_D3DDev->RSSetScissorRects(1, m_ViewportAndScissorRects); // apply viewport clipping only + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D10::DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode) +{ + assert(m_Drawing==true); + + if( _NumTriangles<=0 ) + return; + + if( m_TrianglesVertexBufferCount<3*_NumTriangles ) // force re-creation + { + if( m_TrianglesVertexBuffer!=NULL ) + m_TrianglesVertexBuffer->Release(); + m_TrianglesVertexBuffer = NULL; + m_TrianglesVertexBufferCount = 0; + } + + // DrawTriangles uses LineRect layout and technique + + if( m_TrianglesVertexBuffer==NULL ) + { + // Create triangles vertex buffer + D3D10_BUFFER_DESC bd; + bd.Usage = D3D10_USAGE_DYNAMIC; + bd.BindFlags = D3D10_BIND_VERTEX_BUFFER; + bd.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE; + bd.MiscFlags = 0; + bd.ByteWidth = 3*_NumTriangles * sizeof(CLineRectVtx); + HRESULT hr = m_D3DDev->CreateBuffer(&bd, NULL, &m_TrianglesVertexBuffer); + if( SUCCEEDED(hr) ) + m_TrianglesVertexBufferCount = 3*_NumTriangles; + else + { + m_TrianglesVertexBuffer = NULL; + m_TrianglesVertexBufferCount = 0; + return; // Problem: cannot create triangles VB + } + } + assert( m_TrianglesVertexBufferCount>=3*_NumTriangles ); + assert( m_TrianglesVertexBuffer!=NULL ); + + CLineRectVtx *vertices = NULL; + HRESULT hr = m_TrianglesVertexBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, (void **)&vertices); + if( SUCCEEDED(hr) ) + { + // Fill vertex buffer + for( int i=0; i<3*_NumTriangles; ++ i ) + { + vertices[i].m_Pos[0] = ToNormScreenX(_Vertices[2*i+0] + m_OffsetX, m_WndWidth); + vertices[i].m_Pos[1] = ToNormScreenY(_Vertices[2*i+1] + m_OffsetY, m_WndHeight); + vertices[i].m_Pos[2] = 0; + vertices[i].m_Color = ToR8G8B8A8(_Colors[i]); + } + m_TrianglesVertexBuffer->Unmap(); + + // Reset shader globals + float offsetVec[4] = { 0, 0, 0, 0 }; + if( m_OffsetVar ) + m_OffsetVar->SetFloatVector(offsetVec); + float colorVec[4] = { 1, 1, 1, 1 }; + if( m_CstColorVar ) + m_CstColorVar->SetFloatVector(colorVec); + + // Set the input layout + m_D3DDev->IASetInputLayout(m_LineRectVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CLineRectVtx); + UINT offset = 0; + m_D3DDev->IASetVertexBuffers(0, 1, &m_TrianglesVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDev->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + + if( _CullMode==CULL_CW ) + m_D3DDev->RSSetState(m_RasterStateCullCW); + else if( _CullMode==CULL_CCW ) + m_D3DDev->RSSetState(m_RasterStateCullCCW); + + // Render the triangles + D3D10_TECHNIQUE_DESC techDesc; + m_LineRectTech->GetDesc(&techDesc); + for(UINT p=0; pGetPassByIndex(p)->Apply(0); + m_D3DDev->Draw(3*_NumTriangles, 0); + } + + if( _CullMode==CULL_CW || _CullMode==CULL_CCW ) + m_D3DDev->RSSetState(m_RasterState); // restore default raster state + + // Unset vertex buffer + ID3D10Buffer *vb = NULL; + m_D3DDev->IASetVertexBuffers(0, 1, &vb, &stride, &offset); + } +} + +// --------------------------------------------------------------------------- diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D10.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D10.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D10.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D10.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,108 @@ +// --------------------------------------------------------------------------- +// +// @file TwDirect3D10.h +// @brief Direct3D10 graph functions +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_DIRECT3D10_INCLUDED +#define ANT_TW_DIRECT3D10_INCLUDED + +#include "TwGraph.h" + +// --------------------------------------------------------------------------- + +class CTwGraphDirect3D10 : public ITwGraph +{ +public: + virtual int Init(); + virtual int Shut(); + virtual void BeginDraw(int _WndWidth, int _WndHeight); + virtual void EndDraw(); + virtual bool IsDrawing(); + virtual void Restore(); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased=false); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color, bool _AntiAliased=false) { DrawLine(_X0, _Y0, _X1, _Y1, _Color, _Color, _AntiAliased); } + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11); + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color) { DrawRect(_X0, _Y0, _X1, _Y1, _Color, _Color, _Color, _Color); } + virtual void DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode); + + virtual void * NewTextObj(); + virtual void DeleteTextObj(void *_TextObj); + virtual void BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth); + virtual void DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor); + + virtual void ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY); + virtual void RestoreViewport(); + virtual void SetScissor(int _X0, int _Y0, int _Width, int _Height); + +protected: + struct ID3D10Device * m_D3DDev; + unsigned int m_D3DDevInitialRefCount; + bool m_Drawing; + const CTexFont * m_FontTex; + struct ID3D10ShaderResourceView *m_FontD3DTexRV; + int m_WndWidth; + int m_WndHeight; + int m_OffsetX; + int m_OffsetY; + void * m_ViewportInit; + RECT m_ViewportAndScissorRects[2]; + + struct CLineRectVtx + { + float m_Pos[3]; + color32 m_Color; + }; + struct CTextVtx + { + float m_Pos[3]; + color32 m_Color; + float m_UV[2]; + }; + + struct CTextObj + { + struct ID3D10Buffer * m_TextVertexBuffer; + struct ID3D10Buffer * m_BgVertexBuffer; + int m_NbTextVerts; + int m_NbBgVerts; + int m_TextVertexBufferSize; + int m_BgVertexBufferSize; + bool m_LineColors; + bool m_LineBgColors; + }; + + struct CState10 * m_State; + struct ID3D10DepthStencilState *m_DepthStencilState; + struct ID3D10BlendState * m_BlendState; + struct ID3D10RasterizerState * m_RasterState; + struct ID3D10RasterizerState * m_RasterStateAntialiased; + struct ID3D10RasterizerState * m_RasterStateCullCW; + struct ID3D10RasterizerState * m_RasterStateCullCCW; + struct ID3D10Effect * m_Effect; + struct ID3D10EffectTechnique* m_LineRectTech; + struct ID3D10EffectTechnique* m_LineRectCstColorTech; + struct ID3D10InputLayout * m_LineRectVertexLayout; + struct ID3D10Buffer * m_LineVertexBuffer; + struct ID3D10Buffer * m_RectVertexBuffer; + struct ID3D10Buffer * m_TrianglesVertexBuffer; + int m_TrianglesVertexBufferCount; + struct ID3D10EffectTechnique* m_TextTech; + struct ID3D10EffectTechnique* m_TextCstColorTech; + struct ID3D10InputLayout * m_TextVertexLayout; + struct ID3D10EffectShaderResourceVariable *m_FontD3DResVar; + struct ID3D10EffectVectorVariable *m_OffsetVar; + struct ID3D10EffectVectorVariable *m_CstColorVar; +}; + +// --------------------------------------------------------------------------- + + +#endif // !defined ANT_TW_DIRECT3D10_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1653 @@ +// --------------------------------------------------------------------------- +// +// @file TwDirect3D11.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include "TwDirect3D11.h" +#include "TwMgr.h" +#include "TwColors.h" + +#include "d3d10vs2003.h" // Workaround to include D3D10.h and D3D11.h with VS2003 +#define D3D11_IGNORE_SDK_LAYERS // d3d11sdklayers.h may not exist +#include + + +using namespace std; + +const char *g_ErrCantLoadD3D11 = "Cannot load Direct3D11 library dynamically"; +const char *g_ErrCreateVS11 = "Direct3D11 vertex shader creation failed"; +const char *g_ErrCreatePS11 = "Direct3D11 pixel shader creation failed"; +const char *g_ErrCreateLayout11 = "Direct3D11 vertex layout creation failed"; +const char *g_ErrCreateBuffer11 = "Direct3D11 vertex buffer creation failed"; +const char *g_ErrCreateSampler11 = "Direct3D11 sampler state creation failed"; + +// --------------------------------------------------------------------------- +// Shaders : In order to avoid linkage with D3DX11 or D3DCompile libraries, +// vertex and pixel shaders are compiled offline in a pre-build step using +// the fxc.exe compiler (from the DirectX SDK Aug'09 or later) + +#ifdef _WIN64 +# ifdef _DEBUG +# include "debug64\TwDirect3D11_LineRectVS.h" +# include "debug64\TwDirect3D11_LineRectCstColorVS.h" +# include "debug64\TwDirect3D11_LineRectPS.h" +# include "debug64\TwDirect3D11_TextVS.h" +# include "debug64\TwDirect3D11_TextCstColorVS.h" +# include "debug64\TwDirect3D11_TextPS.h" +# else +# include "release64\TwDirect3D11_LineRectVS.h" +# include "release64\TwDirect3D11_LineRectCstColorVS.h" +# include "release64\TwDirect3D11_LineRectPS.h" +# include "release64\TwDirect3D11_TextVS.h" +# include "release64\TwDirect3D11_TextCstColorVS.h" +# include "release64\TwDirect3D11_TextPS.h" +# endif +#else +# ifdef _DEBUG +# include "debug32\TwDirect3D11_LineRectVS.h" +# include "debug32\TwDirect3D11_LineRectCstColorVS.h" +# include "debug32\TwDirect3D11_LineRectPS.h" +# include "debug32\TwDirect3D11_TextVS.h" +# include "debug32\TwDirect3D11_TextCstColorVS.h" +# include "debug32\TwDirect3D11_TextPS.h" +# else +# include "release32\TwDirect3D11_LineRectVS.h" +# include "release32\TwDirect3D11_LineRectCstColorVS.h" +# include "release32\TwDirect3D11_LineRectPS.h" +# include "release32\TwDirect3D11_TextVS.h" +# include "release32\TwDirect3D11_TextCstColorVS.h" +# include "release32\TwDirect3D11_TextPS.h" +# endif +#endif + +// --------------------------------------------------------------------------- + +const RECT FullRect = {0, 0, 16000, 16000}; +static bool RectIsFull(const RECT& r) { return r.left==FullRect.left && r.right==FullRect.right && r.top==FullRect.top && r.bottom==FullRect.bottom; } + +// --------------------------------------------------------------------------- + +static void BindFont(ID3D11Device *_Dev, const CTexFont *_Font, ID3D11Texture2D **_Tex, ID3D11ShaderResourceView **_TexRV) +{ + assert(_Font!=NULL); + *_Tex = NULL; + *_TexRV = NULL; + + int w = _Font->m_TexWidth; + int h = _Font->m_TexHeight; + color32 *font32 = new color32[w*h]; + color32 *p = font32; + for( int i=0; im_TexBytes[i]))<<24); + + D3D11_TEXTURE2D_DESC desc; + desc.Width = w; + desc.Height = h; + desc.MipLevels = 1; + desc.ArraySize = 1; + desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + desc.SampleDesc.Count = 1; + desc.SampleDesc.Quality = 0; + desc.Usage = D3D11_USAGE_IMMUTABLE; + desc.BindFlags = D3D11_BIND_SHADER_RESOURCE; + desc.CPUAccessFlags = 0; + desc.MiscFlags = 0; + D3D11_SUBRESOURCE_DATA data; + data.pSysMem = font32; + data.SysMemPitch = w*sizeof(color32); + data.SysMemSlicePitch = 0; + + if( SUCCEEDED(_Dev->CreateTexture2D(&desc, &data, _Tex)) ) + _Dev->CreateShaderResourceView(*_Tex, NULL, _TexRV); + + delete[] font32; +} + +// --------------------------------------------------------------------------- + +static void UnbindFont(ID3D11Device *_Dev, ID3D11Texture2D *_Tex, ID3D11ShaderResourceView *_TexRV) +{ + (void)_Dev; + + if( _TexRV ) + { + ULONG rc = _TexRV->Release(); + assert( rc==0 ); (void)rc; + } + if( _Tex ) + { + ULONG rc = _Tex->Release(); + assert( rc==0 ); (void)rc; + } +} + +// --------------------------------------------------------------------------- + +struct CState11 +{ + ID3D11ComputeShader * m_CSShader; + ID3D11ClassInstance ** m_CSClassInstances; + UINT m_CSNumClassInstances; + ID3D11DomainShader * m_DSShader; + ID3D11ClassInstance ** m_DSClassInstances; + UINT m_DSNumClassInstances; + ID3D11GeometryShader * m_GSShader; + ID3D11ClassInstance ** m_GSClassInstances; + UINT m_GSNumClassInstances; + ID3D11HullShader * m_HSShader; + ID3D11ClassInstance ** m_HSClassInstances; + UINT m_HSNumClassInstances; + ID3D11PixelShader * m_PSShader; + ID3D11ClassInstance ** m_PSClassInstances; + UINT m_PSNumClassInstances; + ID3D11Buffer * m_PSConstantBuffer; // backup the first constant buffer only + ID3D11SamplerState * m_PSSampler; // backup the first sampler only + ID3D11ShaderResourceView*m_PSShaderResourceView; // backup the first shader resource only + ID3D11VertexShader * m_VSShader; + ID3D11ClassInstance ** m_VSClassInstances; + UINT m_VSNumClassInstances; + ID3D11Buffer * m_VSConstantBuffer; // backup the first constant buffer only + + ID3D11Buffer * m_IAIndexBuffer; + DXGI_FORMAT m_IAIndexBufferFormat; + UINT m_IAIndexBufferOffset; + ID3D11InputLayout * m_IAInputLayout; + D3D11_PRIMITIVE_TOPOLOGY m_IATopology; + ID3D11Buffer * m_IAVertexBuffer; // backup the first buffer only + UINT m_IAVertexBufferStride; + UINT m_IAVertexBufferOffset; + + ID3D11BlendState * m_OMBlendState; + FLOAT m_OMBlendFactor[4]; + UINT m_OMSampleMask; + ID3D11DepthStencilState*m_OMDepthStencilState; + UINT m_OMStencilRef; + + UINT m_RSScissorNumRects; + D3D11_RECT m_RSScissorRects[D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE]; + ID3D11RasterizerState * m_RSRasterizerState; + UINT m_RSNumViewports; + D3D11_VIEWPORT m_RSViewports[D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE]; + + void Save(); + void Restore(); + void Release(); + CState11(ID3D11Device *_Dev, ID3D11DeviceContext *_ImmCtx); + ~CState11(); +private: + ID3D11Device * m_D3DDev; + ID3D11DeviceContext * m_D3DDevImmContext; +}; + +CState11::CState11(ID3D11Device *_Dev, ID3D11DeviceContext *_ImmCtx) +{ + ZeroMemory(this, sizeof(CState11)); + m_D3DDev = _Dev; + m_D3DDevImmContext = _ImmCtx; +} + +CState11::~CState11() +{ + Release(); + m_D3DDev = NULL; + m_D3DDevImmContext = NULL; +} + +void CState11::Save() +{ + // Release previous state if needed + Release(); + + // Save shaders. + // Not sure how xxGetShader works, D3D11 doc is evasive... Attempt: + // First call GetShader with NULL ClassInstances to get the number of class instances. + // Second, if not zero allocate an array of class instances and call GetShader again + // with this array ptr to get the class instances and release the shader since its + // ref count has been incremented a second time. + + m_CSShader = NULL; + m_CSClassInstances = NULL; + m_CSNumClassInstances = 0; + m_D3DDevImmContext->CSGetShader(&m_CSShader, NULL, &m_CSNumClassInstances); + if (m_CSNumClassInstances > 0) + { + m_CSClassInstances = new ID3D11ClassInstance*[m_CSNumClassInstances]; + for (UINT i = 0; i < m_CSNumClassInstances; i++) + m_CSClassInstances[i] = NULL; + m_D3DDevImmContext->CSGetShader(&m_CSShader, m_CSClassInstances, &m_CSNumClassInstances); + if (m_CSShader != NULL) + m_CSShader->Release(); + } + + m_DSShader = NULL; + m_DSClassInstances = NULL; + m_DSNumClassInstances = 0; + m_D3DDevImmContext->DSGetShader(&m_DSShader, NULL, &m_DSNumClassInstances); + if (m_DSNumClassInstances > 0) + { + m_DSClassInstances = new ID3D11ClassInstance*[m_DSNumClassInstances]; + for (UINT i = 0; i < m_DSNumClassInstances; i++) + m_DSClassInstances[i] = NULL; + m_D3DDevImmContext->DSGetShader(&m_DSShader, m_DSClassInstances, &m_DSNumClassInstances); + if (m_DSShader != NULL) + m_DSShader->Release(); + } + + m_GSShader = NULL; + m_GSClassInstances = NULL; + m_GSNumClassInstances = 0; + m_D3DDevImmContext->GSGetShader(&m_GSShader, NULL, &m_GSNumClassInstances); + if (m_GSNumClassInstances > 0) + { + m_GSClassInstances = new ID3D11ClassInstance*[m_GSNumClassInstances]; + for (UINT i = 0; i < m_GSNumClassInstances; i++) + m_GSClassInstances[i] = NULL; + m_D3DDevImmContext->GSGetShader(&m_GSShader, m_GSClassInstances, &m_GSNumClassInstances); + if (m_GSShader != NULL) + m_GSShader->Release(); + } + + m_HSShader = NULL; + m_HSClassInstances = NULL; + m_HSNumClassInstances = 0; + m_D3DDevImmContext->HSGetShader(&m_HSShader, NULL, &m_HSNumClassInstances); + if (m_HSNumClassInstances > 0) + { + m_HSClassInstances = new ID3D11ClassInstance*[m_HSNumClassInstances]; + for (UINT i = 0; i < m_HSNumClassInstances; i++) + m_HSClassInstances[i] = NULL; + m_D3DDevImmContext->HSGetShader(&m_HSShader, m_HSClassInstances, &m_HSNumClassInstances); + if (m_HSShader != NULL) + m_HSShader->Release(); + } + + m_PSShader = NULL; + m_PSClassInstances = NULL; + m_PSNumClassInstances = 0; + m_D3DDevImmContext->PSGetShader(&m_PSShader, NULL, &m_PSNumClassInstances); + if (m_PSNumClassInstances > 0) + { + m_PSClassInstances = new ID3D11ClassInstance*[m_PSNumClassInstances]; + for (UINT i = 0; i < m_PSNumClassInstances; i++) + m_PSClassInstances[i] = NULL; + m_D3DDevImmContext->PSGetShader(&m_PSShader, m_PSClassInstances, &m_PSNumClassInstances); + if (m_PSShader != NULL) + m_PSShader->Release(); + } + m_D3DDevImmContext->PSGetConstantBuffers(0, 1, &m_PSConstantBuffer); + m_D3DDevImmContext->PSGetSamplers(0, 1, &m_PSSampler); + m_D3DDevImmContext->PSGetShaderResources(0, 1, &m_PSShaderResourceView); + + m_VSShader = NULL; + m_VSClassInstances = NULL; + m_VSNumClassInstances = 0; + m_D3DDevImmContext->VSGetShader(&m_VSShader, NULL, &m_VSNumClassInstances); + if (m_VSNumClassInstances > 0) + { + m_VSClassInstances = new ID3D11ClassInstance*[m_VSNumClassInstances]; + for (UINT i = 0; i < m_VSNumClassInstances; i++) + m_VSClassInstances[i] = NULL; + m_D3DDevImmContext->VSGetShader(&m_VSShader, m_VSClassInstances, &m_VSNumClassInstances); + if (m_VSShader != NULL) + m_VSShader->Release(); + } + m_D3DDevImmContext->VSGetConstantBuffers(0, 1, &m_VSConstantBuffer); + + // Save Input-Assembler states + m_D3DDevImmContext->IAGetIndexBuffer(&m_IAIndexBuffer, &m_IAIndexBufferFormat, &m_IAIndexBufferOffset); + m_D3DDevImmContext->IAGetInputLayout(&m_IAInputLayout); + m_D3DDevImmContext->IAGetPrimitiveTopology(&m_IATopology); + m_D3DDevImmContext->IAGetVertexBuffers(0, 1, &m_IAVertexBuffer, &m_IAVertexBufferStride, &m_IAVertexBufferOffset); + + // Save Ouput-Merger states + m_D3DDevImmContext->OMGetBlendState(&m_OMBlendState, m_OMBlendFactor, &m_OMSampleMask); + m_D3DDevImmContext->OMGetDepthStencilState(&m_OMDepthStencilState, &m_OMStencilRef); + + // Save Rasterizer states + m_D3DDevImmContext->RSGetScissorRects(&m_RSScissorNumRects, NULL); + if (m_RSScissorNumRects > 0) + m_D3DDevImmContext->RSGetScissorRects(&m_RSScissorNumRects, m_RSScissorRects); + m_D3DDevImmContext->RSGetViewports(&m_RSNumViewports, NULL); + if (m_RSNumViewports > 0) + m_D3DDevImmContext->RSGetViewports(&m_RSNumViewports, m_RSViewports); + m_D3DDevImmContext->RSGetState(&m_RSRasterizerState); +} + +void CState11::Restore() +{ + // Restore shaders + m_D3DDevImmContext->CSSetShader(m_CSShader, m_CSClassInstances, m_CSNumClassInstances); + m_D3DDevImmContext->DSSetShader(m_DSShader, m_DSClassInstances, m_DSNumClassInstances); + m_D3DDevImmContext->GSSetShader(m_GSShader, m_GSClassInstances, m_GSNumClassInstances); + m_D3DDevImmContext->HSSetShader(m_HSShader, m_HSClassInstances, m_HSNumClassInstances); + m_D3DDevImmContext->PSSetShader(m_PSShader, m_PSClassInstances, m_PSNumClassInstances); + m_D3DDevImmContext->PSSetConstantBuffers(0, 1, &m_PSConstantBuffer); + m_D3DDevImmContext->PSSetSamplers(0, 1, &m_PSSampler); + m_D3DDevImmContext->PSSetShaderResources(0, 1, &m_PSShaderResourceView); + m_D3DDevImmContext->VSSetShader(m_VSShader, m_VSClassInstances, m_VSNumClassInstances); + m_D3DDevImmContext->VSSetConstantBuffers(0, 1, &m_VSConstantBuffer); + + // Restore Input-Assembler + m_D3DDevImmContext->IASetIndexBuffer(m_IAIndexBuffer, m_IAIndexBufferFormat, m_IAIndexBufferOffset); + m_D3DDevImmContext->IASetInputLayout(m_IAInputLayout); + m_D3DDevImmContext->IASetPrimitiveTopology(m_IATopology); + m_D3DDevImmContext->IASetVertexBuffers(0, 1, &m_IAVertexBuffer, &m_IAVertexBufferStride, &m_IAVertexBufferOffset); + + // Restore Ouput-Merger + m_D3DDevImmContext->OMSetBlendState(m_OMBlendState, m_OMBlendFactor, m_OMSampleMask); + m_D3DDevImmContext->OMSetDepthStencilState(m_OMDepthStencilState, m_OMStencilRef); + + // Restore Rasterizer states + m_D3DDevImmContext->RSSetScissorRects(m_RSScissorNumRects, m_RSScissorRects); + m_D3DDevImmContext->RSSetViewports(m_RSNumViewports, m_RSViewports); + m_D3DDevImmContext->RSSetState(m_RSRasterizerState); +} + +void CState11::Release() +{ + // Release stored shaders + + if (m_CSClassInstances != NULL) + { + for (UINT i = 0; i < m_CSNumClassInstances; i++) + if (m_CSClassInstances[i] != NULL) + m_CSClassInstances[i]->Release(); + delete[] m_CSClassInstances; + m_CSClassInstances = NULL; + m_CSNumClassInstances = 0; + } + if (m_CSShader != NULL) + { + m_CSShader->Release(); + m_CSShader = NULL; + } + + if (m_DSClassInstances != NULL) + { + for (UINT i = 0; i < m_DSNumClassInstances; i++) + if (m_DSClassInstances[i] != NULL) + m_DSClassInstances[i]->Release(); + delete[] m_DSClassInstances; + m_DSClassInstances = NULL; + m_DSNumClassInstances = 0; + } + if (m_DSShader != NULL) + { + m_DSShader->Release(); + m_DSShader = NULL; + } + + if (m_GSClassInstances != NULL) + { + for (UINT i = 0; i < m_GSNumClassInstances; i++) + if (m_GSClassInstances[i] != NULL) + m_GSClassInstances[i]->Release(); + delete[] m_GSClassInstances; + m_GSClassInstances = NULL; + m_GSNumClassInstances = 0; + } + if (m_GSShader != NULL) + { + m_GSShader->Release(); + m_GSShader = NULL; + } + + if (m_HSClassInstances != NULL) + { + for (UINT i = 0; i < m_HSNumClassInstances; i++) + if (m_HSClassInstances[i] != NULL) + m_HSClassInstances[i]->Release(); + delete[] m_HSClassInstances; + m_HSClassInstances = NULL; + m_HSNumClassInstances = 0; + } + if (m_HSShader != NULL) + { + m_HSShader->Release(); + m_HSShader = NULL; + } + + if (m_PSClassInstances != NULL) + { + for (UINT i = 0; i < m_PSNumClassInstances; i++) + if (m_PSClassInstances[i] != NULL) + m_PSClassInstances[i]->Release(); + delete[] m_PSClassInstances; + m_PSClassInstances = NULL; + m_PSNumClassInstances = 0; + } + if (m_PSShader != NULL) + { + m_PSShader->Release(); + m_PSShader = NULL; + } + if (m_PSConstantBuffer != NULL) + { + m_PSConstantBuffer->Release(); + m_PSConstantBuffer = NULL; + } + if (m_PSSampler != NULL) + { + m_PSSampler->Release(); + m_PSSampler = NULL; + } + if (m_PSShaderResourceView != NULL) + { + m_PSShaderResourceView->Release(); + m_PSShaderResourceView = NULL; + } + + if (m_VSClassInstances != NULL) + { + for (UINT i = 0; i < m_VSNumClassInstances; i++) + if (m_VSClassInstances[i] != NULL) + m_VSClassInstances[i]->Release(); + delete[] m_VSClassInstances; + m_VSClassInstances = NULL; + m_VSNumClassInstances = 0; + } + if (m_VSShader != NULL) + { + m_VSShader->Release(); + m_VSShader = NULL; + } + if (m_VSConstantBuffer != NULL) + { + m_VSConstantBuffer->Release(); + m_VSConstantBuffer = NULL; + } + + // Release Input-Assembler states + if (m_IAIndexBuffer != NULL) + { + m_IAIndexBuffer->Release(); + m_IAIndexBuffer = NULL; + } + if (m_IAInputLayout != NULL) + { + m_IAInputLayout->Release(); + m_IAInputLayout = 0; + } + if (m_IAVertexBuffer != NULL) + { + m_IAVertexBuffer->Release(); + m_IAVertexBuffer = NULL; + } + + // Release Output-Merger states + if (m_OMBlendState != NULL) + { + m_OMBlendState->Release(); + m_OMBlendState = NULL; + } + if (m_OMDepthStencilState != NULL) + { + m_OMDepthStencilState->Release(); + m_OMDepthStencilState = NULL; + } + + // Release Rasterizer state + if (m_RSRasterizerState != 0) + { + m_RSRasterizerState->Release(); + m_RSRasterizerState = NULL; + } + m_RSNumViewports = 0; + m_RSScissorNumRects = 0; +} + +// --------------------------------------------------------------------------- + +int CTwGraphDirect3D11::Init() +{ + assert(g_TwMgr!=NULL); + assert(g_TwMgr->m_Device!=NULL); + + m_D3DDev = static_cast(g_TwMgr->m_Device); + m_D3DDevInitialRefCount = m_D3DDev->AddRef() - 1; + m_D3DDev->GetImmediateContext(&m_D3DDevImmContext); + + m_Drawing = false; + m_OffsetX = m_OffsetY = 0; + m_ViewportInit = new D3D11_VIEWPORT; + m_FontTex = NULL; + m_FontD3DTex = NULL; + m_FontD3DTexRV = NULL; + m_WndWidth = 0; + m_WndHeight = 0; + m_State = NULL; + m_DepthStencilState = NULL; + m_BlendState = NULL; + m_RasterState = NULL; + m_RasterStateAntialiased = NULL; + m_RasterStateMultisample = NULL; + m_RasterStateCullCW = NULL; + m_RasterStateCullCCW = NULL; + m_LineRectVS = NULL; + m_LineRectCstColorVS = NULL; + m_LineRectPS = NULL; + m_LineRectVertexLayout = NULL; + m_TextVS = NULL; + m_TextCstColorVS = NULL; + m_TextPS = NULL; + m_TextVertexLayout = NULL; + m_LineVertexBuffer = NULL; + m_RectVertexBuffer = NULL; + m_TrianglesVertexBuffer = NULL; + m_TrianglesVertexBufferCount = 0; + m_ConstantBuffer = NULL; + m_SamplerState = NULL; + + // Allocate state object + m_State = new CState11(m_D3DDev, m_D3DDevImmContext); + + // Disable client shaders + m_D3DDevImmContext->CSSetShader(NULL, NULL, 0); + m_D3DDevImmContext->DSSetShader(NULL, NULL, 0); + m_D3DDevImmContext->GSSetShader(NULL, NULL, 0); + m_D3DDevImmContext->HSSetShader(NULL, NULL, 0); + m_D3DDevImmContext->PSSetShader(NULL, NULL, 0); + m_D3DDevImmContext->VSSetShader(NULL, NULL, 0); + + // Create shaders + HRESULT hr = m_D3DDev->CreateVertexShader(g_LineRectVS, sizeof(g_LineRectVS), NULL, &m_LineRectVS); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateVS11); + Shut(); + return 0; + } + hr = m_D3DDev->CreateVertexShader(g_LineRectCstColorVS, sizeof(g_LineRectCstColorVS), NULL, &m_LineRectCstColorVS); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateVS11); + Shut(); + return 0; + } + hr = m_D3DDev->CreatePixelShader(g_LineRectPS, sizeof(g_LineRectPS), NULL, &m_LineRectPS); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreatePS11); + Shut(); + return 0; + } + hr = m_D3DDev->CreateVertexShader(g_TextVS, sizeof(g_TextVS), NULL, &m_TextVS); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateVS11); + Shut(); + return 0; + } + hr = m_D3DDev->CreateVertexShader(g_TextCstColorVS, sizeof(g_TextCstColorVS), NULL, &m_TextCstColorVS); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateVS11); + Shut(); + return 0; + } + hr = m_D3DDev->CreatePixelShader(g_TextPS, sizeof(g_TextPS), NULL, &m_TextPS); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreatePS11); + Shut(); + return 0; + } + + // Create input layout for lines & rect + D3D11_INPUT_ELEMENT_DESC lineRectLayout[] = + { + { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 }, + { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, offsetof(CLineRectVtx, m_Color), D3D11_INPUT_PER_VERTEX_DATA, 0 } + }; + hr = m_D3DDev->CreateInputLayout(lineRectLayout, sizeof(lineRectLayout)/sizeof(lineRectLayout[0]), g_LineRectVS, sizeof(g_LineRectVS), &m_LineRectVertexLayout); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateLayout11); + Shut(); + return 0; + } + + // Create line vertex buffer + D3D11_BUFFER_DESC bd; + bd.Usage = D3D11_USAGE_DYNAMIC; + bd.ByteWidth = 2 * sizeof(CLineRectVtx); + bd.BindFlags = D3D11_BIND_VERTEX_BUFFER; + bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + bd.MiscFlags = 0; + bd.StructureByteStride = 0; + hr = m_D3DDev->CreateBuffer(&bd, NULL, &m_LineVertexBuffer); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateBuffer11); + Shut(); + return 0; + } + + // Create rect vertex buffer + bd.ByteWidth = 4 * sizeof(CLineRectVtx); + hr = m_D3DDev->CreateBuffer(&bd, NULL, &m_RectVertexBuffer); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateBuffer11); + Shut(); + return 0; + } + + // Create constant buffer + bd.ByteWidth = sizeof(CConstants); + bd.BindFlags = D3D11_BIND_CONSTANT_BUFFER; + hr = m_D3DDev->CreateBuffer(&bd, NULL, &m_ConstantBuffer); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateBuffer11); + Shut(); + return 0; + } + + // Create sampler + D3D11_SAMPLER_DESC sd; + sd.AddressU = sd.AddressV = sd.AddressW = D3D11_TEXTURE_ADDRESS_BORDER; + sd.BorderColor[0] = sd.BorderColor[1] = sd.BorderColor[2] = sd.BorderColor[3] = 0; + sd.ComparisonFunc = D3D11_COMPARISON_NEVER; + sd.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT; + sd.MaxAnisotropy = 1; + sd.MaxLOD = sd.MinLOD = 0; + sd.MipLODBias = 0; + hr = m_D3DDev->CreateSamplerState(&sd, &m_SamplerState); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateSampler11); + Shut(); + return 0; + } + + // Create input layout for text + D3D11_INPUT_ELEMENT_DESC textLayout[] = + { + { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 }, + { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, offsetof(CTextVtx, m_Color), D3D11_INPUT_PER_VERTEX_DATA, 0 }, + { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, offsetof(CTextVtx, m_UV), D3D11_INPUT_PER_VERTEX_DATA, 0 } + }; + hr = m_D3DDev->CreateInputLayout(textLayout, sizeof(textLayout)/sizeof(textLayout[0]), g_TextVS, sizeof(g_TextVS), &m_TextVertexLayout); + if( FAILED(hr) ) + { + g_TwMgr->SetLastError(g_ErrCreateLayout11); + Shut(); + return 0; + } + + // Create depth stencil state object + D3D11_DEPTH_STENCILOP_DESC od; + od.StencilFunc = D3D11_COMPARISON_ALWAYS; + od.StencilFailOp = D3D11_STENCIL_OP_KEEP; + od.StencilPassOp = D3D11_STENCIL_OP_KEEP; + od.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP; + D3D11_DEPTH_STENCIL_DESC dsd; + dsd.DepthEnable = FALSE; + dsd.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO; + dsd.DepthFunc = D3D11_COMPARISON_ALWAYS; + dsd.StencilEnable = FALSE; + dsd.StencilReadMask = D3D11_DEFAULT_STENCIL_READ_MASK; + dsd.StencilWriteMask = D3D11_DEFAULT_STENCIL_WRITE_MASK; + dsd.FrontFace = od; + dsd.BackFace = od; + m_D3DDev->CreateDepthStencilState(&dsd, &m_DepthStencilState); + + // Create blend state object + D3D11_BLEND_DESC bsd; + bsd.AlphaToCoverageEnable = FALSE; + bsd.IndependentBlendEnable = FALSE; + for(int i=0; i<8; ++i) + { + bsd.RenderTarget[i].BlendEnable = TRUE; + bsd.RenderTarget[i].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; + bsd.RenderTarget[i].SrcBlend = D3D11_BLEND_SRC_ALPHA; + bsd.RenderTarget[i].DestBlend = D3D11_BLEND_INV_SRC_ALPHA; + bsd.RenderTarget[i].BlendOp = D3D11_BLEND_OP_ADD; + bsd.RenderTarget[i].SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA; + bsd.RenderTarget[i].DestBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA; + bsd.RenderTarget[i].BlendOpAlpha = D3D11_BLEND_OP_ADD; + } + m_D3DDev->CreateBlendState(&bsd, &m_BlendState); + + // Create rasterizer state object + D3D11_RASTERIZER_DESC rd; + rd.FillMode = D3D11_FILL_SOLID; + rd.CullMode = D3D11_CULL_NONE; + rd.FrontCounterClockwise = true; + rd.DepthBias = false; + rd.DepthBiasClamp = 0; + rd.SlopeScaledDepthBias = 0; + rd.DepthClipEnable = false; + rd.ScissorEnable = true; + rd.MultisampleEnable = false; // do not allow msaa (fonts would be degraded) + rd.AntialiasedLineEnable = false; + m_D3DDev->CreateRasterizerState(&rd, &m_RasterState); + + rd.AntialiasedLineEnable = true; + m_D3DDev->CreateRasterizerState(&rd, &m_RasterStateAntialiased); + rd.AntialiasedLineEnable = false; + + // the three following raster states allow msaa + rd.MultisampleEnable = true; + m_D3DDev->CreateRasterizerState(&rd, &m_RasterStateMultisample); + + rd.CullMode = D3D11_CULL_BACK; + m_D3DDev->CreateRasterizerState(&rd, &m_RasterStateCullCW); + + rd.CullMode = D3D11_CULL_FRONT; + m_D3DDev->CreateRasterizerState(&rd, &m_RasterStateCullCCW); + + return 1; +} + +// --------------------------------------------------------------------------- + +int CTwGraphDirect3D11::Shut() +{ + assert(m_Drawing==false); + + UnbindFont(m_D3DDev, m_FontD3DTex, m_FontD3DTexRV); + m_FontD3DTex = NULL; + m_FontD3DTexRV = NULL; + if( m_State ) + { + delete m_State; + m_State = NULL; + } + if( m_ViewportInit ) + { + delete m_ViewportInit; + m_ViewportInit = NULL; + } + + if( m_DepthStencilState ) + { + ULONG rc = m_DepthStencilState->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_DepthStencilState = NULL; + } + if( m_BlendState ) + { + ULONG rc = m_BlendState->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_BlendState = NULL; + } + if( m_RasterState ) + { + ULONG rc = m_RasterState->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_RasterState = NULL; + } + if( m_RasterStateAntialiased ) + { + ULONG rc = m_RasterStateAntialiased->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_RasterStateAntialiased = NULL; + } + if( m_RasterStateMultisample ) + { + ULONG rc = m_RasterStateMultisample->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_RasterStateMultisample = NULL; + } + if( m_RasterStateCullCW ) + { + ULONG rc = m_RasterStateCullCW->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_RasterStateCullCW = NULL; + } + if( m_RasterStateCullCCW ) + { + ULONG rc = m_RasterStateCullCCW->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_RasterStateCullCCW = NULL; + } + if( m_SamplerState ) + { + ULONG rc = m_SamplerState->Release(); + //assert( rc==0 ); // no assert: the client can use a similar (then shared) state + (void)rc; + m_SamplerState = NULL; + } + + if( m_LineRectVS ) + { + ULONG rc = m_LineRectVS->Release(); + assert( rc==0 ); (void)rc; + m_LineRectVS = NULL; + } + if( m_LineRectCstColorVS ) + { + ULONG rc = m_LineRectCstColorVS->Release(); + assert( rc==0 ); (void)rc; + m_LineRectCstColorVS = NULL; + } + if( m_LineRectPS ) + { + ULONG rc = m_LineRectPS->Release(); + assert( rc==0 ); (void)rc; + m_LineRectPS = NULL; + } + if( m_TextVS ) + { + ULONG rc = m_TextVS->Release(); + assert( rc==0 ); (void)rc; + m_TextVS = NULL; + } + if( m_TextCstColorVS ) + { + ULONG rc = m_TextCstColorVS->Release(); + assert( rc==0 ); (void)rc; + m_TextCstColorVS = NULL; + } + if( m_TextPS ) + { + ULONG rc = m_TextPS->Release(); + assert( rc==0 ); (void)rc; + m_TextPS = NULL; + } + if( m_LineVertexBuffer ) + { + ULONG rc = m_LineVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + m_LineVertexBuffer = NULL; + } + if( m_RectVertexBuffer ) + { + ULONG rc = m_RectVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + m_RectVertexBuffer = NULL; + } + if( m_TrianglesVertexBuffer ) + { + ULONG rc = m_TrianglesVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + m_TrianglesVertexBuffer = NULL; + m_TrianglesVertexBufferCount = 0; + } + if( m_ConstantBuffer ) + { + ULONG rc = m_ConstantBuffer->Release(); + assert( rc==0 ); (void)rc; + m_ConstantBuffer = NULL; + } + if( m_LineRectVertexLayout ) + { + ULONG rc = m_LineRectVertexLayout->Release(); + assert( rc==0 ); (void)rc; + m_LineRectVertexLayout = NULL; + } + if( m_TextVertexLayout ) + { + ULONG rc = m_TextVertexLayout->Release(); + assert( rc==0 ); (void)rc; + m_TextVertexLayout = NULL; + } + + if( m_D3DDevImmContext ) + { + m_D3DDevImmContext->Release(); + m_D3DDevImmContext = NULL; + } + + if( m_D3DDev ) + { + //unsigned int rc = m_D3DDev->Release(); + //assert( m_D3DDevInitialRefCount==rc ); (void)rc; + m_D3DDev->Release(); + m_D3DDev = NULL; + } + + return 1; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::BeginDraw(int _WndWidth, int _WndHeight) +{ + assert(m_Drawing==false && _WndWidth>0 && _WndHeight>0); + m_Drawing = true; + + m_WndWidth = _WndWidth; + m_WndHeight = _WndHeight; + m_OffsetX = m_OffsetY = 0; + + // save client context state + m_State->Save(); + + // Setup the viewport + D3D11_VIEWPORT vp; + vp.Width = (FLOAT)_WndWidth; + vp.Height = (FLOAT)_WndHeight; + vp.MinDepth = 0.0f; + vp.MaxDepth = 1.0f; + vp.TopLeftX = 0; + vp.TopLeftY = 0; + m_D3DDevImmContext->RSSetViewports(1, &vp); + *static_cast(m_ViewportInit) = vp; + + m_ViewportAndScissorRects[0] = FullRect; + m_ViewportAndScissorRects[1] = FullRect; + m_D3DDevImmContext->RSSetScissorRects(1, m_ViewportAndScissorRects); + + m_D3DDevImmContext->RSSetState(m_RasterState); + + m_D3DDevImmContext->OMSetDepthStencilState(m_DepthStencilState, 0); + float blendFactors[4] = { 1, 1, 1, 1 }; + m_D3DDevImmContext->OMSetBlendState(m_BlendState, blendFactors, 0xffffffff); + + m_D3DDevImmContext->CSSetShader(NULL, NULL, 0); + m_D3DDevImmContext->DSSetShader(NULL, NULL, 0); + m_D3DDevImmContext->GSSetShader(NULL, NULL, 0); + m_D3DDevImmContext->HSSetShader(NULL, NULL, 0); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::EndDraw() +{ + m_D3DDevImmContext->RSSetState(NULL); + m_D3DDevImmContext->OMSetDepthStencilState(NULL, 0); + m_D3DDevImmContext->OMSetBlendState(NULL, NULL, 0xffffffff); + + assert(m_Drawing==true); + m_Drawing = false; + + // restore and release client context state + m_State->Restore(); + m_State->Release(); +} + +// --------------------------------------------------------------------------- + +bool CTwGraphDirect3D11::IsDrawing() +{ + return m_Drawing; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::Restore() +{ + if( m_State ) + m_State->Release(); + + UnbindFont(m_D3DDev, m_FontD3DTex, m_FontD3DTexRV); + m_FontD3DTexRV = NULL; + m_FontD3DTex = NULL; + + m_FontTex = NULL; +} + +// --------------------------------------------------------------------------- + +static inline float ToNormScreenX(int x, int wndWidth) +{ + return 2.0f*((float)x-0.5f)/wndWidth - 1.0f; +} + +static inline float ToNormScreenY(int y, int wndHeight) +{ + return 1.0f - 2.0f*((float)y-0.5f)/wndHeight; +} + +static inline color32 ToR8G8B8A8(color32 col) +{ + return (col & 0xff00ff00) | ((col>>16) & 0xff) | ((col<<16) & 0xff0000); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased) +{ + assert(m_Drawing==true); + + float x0 = ToNormScreenX(_X0 + m_OffsetX, m_WndWidth); + float y0 = ToNormScreenY(_Y0 + m_OffsetY, m_WndHeight); + float x1 = ToNormScreenX(_X1 + m_OffsetX, m_WndWidth); + float y1 = ToNormScreenY(_Y1 + m_OffsetY, m_WndHeight); + + D3D11_MAPPED_SUBRESOURCE mappedResource; + HRESULT hr = m_D3DDevImmContext->Map(m_LineVertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + if( SUCCEEDED(hr) ) + { + CLineRectVtx *vertices = (CLineRectVtx *)mappedResource.pData; + // Fill vertex buffer + vertices[0].m_Pos[0] = x0; + vertices[0].m_Pos[1] = y0; + vertices[0].m_Pos[2] = 0; + vertices[0].m_Color = ToR8G8B8A8(_Color0); + vertices[1].m_Pos[0] = x1; + vertices[1].m_Pos[1] = y1; + vertices[1].m_Pos[2] = 0; + vertices[1].m_Color = ToR8G8B8A8(_Color1); + + m_D3DDevImmContext->Unmap(m_LineVertexBuffer, 0); + + if( _AntiAliased ) + m_D3DDevImmContext->RSSetState(m_RasterStateAntialiased); + + // Reset shader constants + hr = m_D3DDevImmContext->Map(m_ConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + if( SUCCEEDED(hr) ) + { + CConstants *constants = (CConstants *)mappedResource.pData; + constants->m_Offset[0] = 0; + constants->m_Offset[1] = 0; + constants->m_Offset[2] = 0; + constants->m_Offset[3] = 0; + constants->m_CstColor[0] = 1; + constants->m_CstColor[1] = 1; + constants->m_CstColor[2] = 1; + constants->m_CstColor[3] = 1; + + m_D3DDevImmContext->Unmap(m_ConstantBuffer, 0); + } + + // Set the input layout + m_D3DDevImmContext->IASetInputLayout(m_LineRectVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CLineRectVtx); + UINT offset = 0; + m_D3DDevImmContext->IASetVertexBuffers(0, 1, &m_LineVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDevImmContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST); + + // Render the line + m_D3DDevImmContext->VSSetConstantBuffers(0, 1, &m_ConstantBuffer); + m_D3DDevImmContext->VSSetShader(m_LineRectVS, NULL, 0); + m_D3DDevImmContext->PSSetShader(m_LineRectPS, NULL, 0); + m_D3DDevImmContext->Draw(2, 0); + + if( _AntiAliased ) + m_D3DDevImmContext->RSSetState(m_RasterState); // restore default raster state + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11) +{ + assert(m_Drawing==true); + + // border adjustment + if(_X0<_X1) + ++_X1; + else if(_X0>_X1) + ++_X0; + if(_Y0<_Y1) + ++_Y1; + else if(_Y0>_Y1) + ++_Y0; + + float x0 = ToNormScreenX(_X0 + m_OffsetX, m_WndWidth); + float y0 = ToNormScreenY(_Y0 + m_OffsetY, m_WndHeight); + float x1 = ToNormScreenX(_X1 + m_OffsetX, m_WndWidth); + float y1 = ToNormScreenY(_Y1 + m_OffsetY, m_WndHeight); + + D3D11_MAPPED_SUBRESOURCE mappedResource; + HRESULT hr = m_D3DDevImmContext->Map(m_RectVertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + if( SUCCEEDED(hr) ) + { + CLineRectVtx *vertices = (CLineRectVtx *)mappedResource.pData; + // Fill vertex buffer + vertices[0].m_Pos[0] = x0; + vertices[0].m_Pos[1] = y0; + vertices[0].m_Pos[2] = 0; + vertices[0].m_Color = ToR8G8B8A8(_Color00); + vertices[1].m_Pos[0] = x1; + vertices[1].m_Pos[1] = y0; + vertices[1].m_Pos[2] = 0; + vertices[1].m_Color = ToR8G8B8A8(_Color10); + vertices[2].m_Pos[0] = x0; + vertices[2].m_Pos[1] = y1; + vertices[2].m_Pos[2] = 0; + vertices[2].m_Color = ToR8G8B8A8(_Color01); + vertices[3].m_Pos[0] = x1; + vertices[3].m_Pos[1] = y1; + vertices[3].m_Pos[2] = 0; + vertices[3].m_Color = ToR8G8B8A8(_Color11); + + m_D3DDevImmContext->Unmap(m_RectVertexBuffer, 0); + + // Reset shader constants + hr = m_D3DDevImmContext->Map(m_ConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + if( SUCCEEDED(hr) ) + { + CConstants *constants = (CConstants *)mappedResource.pData; + constants->m_Offset[0] = 0; + constants->m_Offset[1] = 0; + constants->m_Offset[2] = 0; + constants->m_Offset[3] = 0; + constants->m_CstColor[0] = 1; + constants->m_CstColor[1] = 1; + constants->m_CstColor[2] = 1; + constants->m_CstColor[3] = 1; + + m_D3DDevImmContext->Unmap(m_ConstantBuffer, 0); + } + + // Set the input layout + m_D3DDevImmContext->IASetInputLayout(m_LineRectVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CLineRectVtx); + UINT offset = 0; + m_D3DDevImmContext->IASetVertexBuffers(0, 1, &m_RectVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDevImmContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + + // Render the rect + m_D3DDevImmContext->VSSetConstantBuffers(0, 1, &m_ConstantBuffer); + m_D3DDevImmContext->VSSetShader(m_LineRectVS, NULL, 0); + m_D3DDevImmContext->PSSetShader(m_LineRectPS, NULL, 0); + m_D3DDevImmContext->Draw(4, 0); + } +} + +// --------------------------------------------------------------------------- + +void *CTwGraphDirect3D11::NewTextObj() +{ + CTextObj *textObj = new CTextObj; + memset(textObj, 0, sizeof(CTextObj)); + return textObj; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::DeleteTextObj(void *_TextObj) +{ + assert(_TextObj!=NULL); + CTextObj *textObj = static_cast(_TextObj); + if( textObj->m_TextVertexBuffer ) + textObj->m_TextVertexBuffer->Release(); + if( textObj->m_BgVertexBuffer ) + textObj->m_BgVertexBuffer->Release(); + memset(textObj, 0, sizeof(CTextObj)); + delete textObj; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + assert(_Font!=NULL); + + if( _Font != m_FontTex ) + { + UnbindFont(m_D3DDev, m_FontD3DTex, m_FontD3DTexRV); + BindFont(m_D3DDev, _Font, &m_FontD3DTex, &m_FontD3DTexRV); + m_FontTex = _Font; + } + + int nbTextVerts = 0; + int line; + for( line=0; line<_NbLines; ++line ) + nbTextVerts += 6 * (int)_TextLines[line].length(); + int nbBgVerts = 0; + if( _BgWidth>0 ) + nbBgVerts = _NbLines*6; + + CTextObj *textObj = static_cast(_TextObj); + textObj->m_LineColors = (_LineColors!=NULL); + textObj->m_LineBgColors = (_LineBgColors!=NULL); + + // (re)create text vertex buffer if needed, and map it + CTextVtx *textVerts = NULL; + if( nbTextVerts>0 ) + { + if( textObj->m_TextVertexBuffer==NULL || textObj->m_TextVertexBufferSizem_TextVertexBuffer!=NULL ) + { + ULONG rc = textObj->m_TextVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + textObj->m_TextVertexBuffer = NULL; + } + textObj->m_TextVertexBufferSize = nbTextVerts + 6*256; // add a reserve of 256 characters + D3D11_BUFFER_DESC bd; + bd.Usage = D3D11_USAGE_DYNAMIC; + bd.ByteWidth = textObj->m_TextVertexBufferSize * sizeof(CTextVtx); + bd.BindFlags = D3D11_BIND_VERTEX_BUFFER; + bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + bd.MiscFlags = 0; + bd.StructureByteStride = 0; + m_D3DDev->CreateBuffer(&bd, NULL, &textObj->m_TextVertexBuffer); + } + + if( textObj->m_TextVertexBuffer!=NULL ) + { + D3D11_MAPPED_SUBRESOURCE mappedResource; + m_D3DDevImmContext->Map(textObj->m_TextVertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + textVerts = (CTextVtx *)mappedResource.pData; + } + } + + // (re)create bg vertex buffer if needed, and map it + CLineRectVtx *bgVerts = NULL; + if( nbBgVerts>0 ) + { + if( textObj->m_BgVertexBuffer==NULL || textObj->m_BgVertexBufferSizem_BgVertexBuffer!=NULL ) + { + ULONG rc = textObj->m_BgVertexBuffer->Release(); + assert( rc==0 ); (void)rc; + textObj->m_BgVertexBuffer = NULL; + } + textObj->m_BgVertexBufferSize = nbBgVerts + 6*32; // add a reserve of 32 rects + D3D11_BUFFER_DESC bd; + bd.Usage = D3D11_USAGE_DYNAMIC; + bd.ByteWidth = textObj->m_BgVertexBufferSize * sizeof(CLineRectVtx); + bd.BindFlags = D3D11_BIND_VERTEX_BUFFER; + bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + bd.MiscFlags = 0; + bd.StructureByteStride = 0; + m_D3DDev->CreateBuffer(&bd, NULL, &textObj->m_BgVertexBuffer); + } + + if( textObj->m_BgVertexBuffer!=NULL ) + { + D3D11_MAPPED_SUBRESOURCE mappedResource; + m_D3DDevImmContext->Map(textObj->m_BgVertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + bgVerts = (CLineRectVtx *)mappedResource.pData; + } + } + + int x, x1, y, y1, i, len; + float px, px1, py, py1; + unsigned char ch; + const unsigned char *text; + color32 lineColor = COLOR32_RED; + CTextVtx vtx; + vtx.m_Pos[2] = 0; + CLineRectVtx bgVtx; + bgVtx.m_Pos[2] = 0; + int textVtxIndex = 0; + int bgVtxIndex = 0; + for( line=0; line<_NbLines; ++line ) + { + x = 0; + y = line * (_Font->m_CharHeight+_Sep); + y1 = y+_Font->m_CharHeight; + len = (int)_TextLines[line].length(); + text = (const unsigned char *)(_TextLines[line].c_str()); + if( _LineColors!=NULL ) + lineColor = ToR8G8B8A8(_LineColors[line]); + + if( textVerts!=NULL ) + for( i=0; im_CharWidth[ch]; + + px = ToNormScreenX(x, m_WndWidth); + py = ToNormScreenY(y, m_WndHeight); + px1 = ToNormScreenX(x1, m_WndWidth); + py1 = ToNormScreenY(y1, m_WndHeight); + + vtx.m_Color = lineColor; + + vtx.m_Pos[0] = px; + vtx.m_Pos[1] = py; + vtx.m_UV [0] = _Font->m_CharU0[ch]; + vtx.m_UV [1] = _Font->m_CharV0[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px1; + vtx.m_Pos[1] = py; + vtx.m_UV [0] = _Font->m_CharU1[ch]; + vtx.m_UV [1] = _Font->m_CharV0[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px; + vtx.m_Pos[1] = py1; + vtx.m_UV [0] = _Font->m_CharU0[ch]; + vtx.m_UV [1] = _Font->m_CharV1[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px1; + vtx.m_Pos[1] = py; + vtx.m_UV [0] = _Font->m_CharU1[ch]; + vtx.m_UV [1] = _Font->m_CharV0[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px1; + vtx.m_Pos[1] = py1; + vtx.m_UV [0] = _Font->m_CharU1[ch]; + vtx.m_UV [1] = _Font->m_CharV1[ch]; + textVerts[textVtxIndex++] = vtx; + + vtx.m_Pos[0] = px; + vtx.m_Pos[1] = py1; + vtx.m_UV [0] = _Font->m_CharU0[ch]; + vtx.m_UV [1] = _Font->m_CharV1[ch]; + textVerts[textVtxIndex++] = vtx; + + x = x1; + } + + if( _BgWidth>0 && bgVerts!=NULL ) + { + if( _LineBgColors!=NULL ) + bgVtx.m_Color = ToR8G8B8A8(_LineBgColors[line]); + else + bgVtx.m_Color = ToR8G8B8A8(COLOR32_BLACK); + + px = ToNormScreenX(-1, m_WndWidth); + py = ToNormScreenY(y, m_WndHeight); + px1 = ToNormScreenX(_BgWidth+1, m_WndWidth); + py1 = ToNormScreenY(y1, m_WndHeight); + + bgVtx.m_Pos[0] = px; + bgVtx.m_Pos[1] = py; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px1; + bgVtx.m_Pos[1] = py; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px; + bgVtx.m_Pos[1] = py1; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px1; + bgVtx.m_Pos[1] = py; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px1; + bgVtx.m_Pos[1] = py1; + bgVerts[bgVtxIndex++] = bgVtx; + + bgVtx.m_Pos[0] = px; + bgVtx.m_Pos[1] = py1; + bgVerts[bgVtxIndex++] = bgVtx; + } + } + assert( textVtxIndex==nbTextVerts ); + assert( bgVtxIndex==nbBgVerts ); + textObj->m_NbTextVerts = nbTextVerts; + textObj->m_NbBgVerts = nbBgVerts; + + if( textVerts!=NULL ) + m_D3DDevImmContext->Unmap(textObj->m_TextVertexBuffer, 0); + if( bgVerts!=NULL ) + m_D3DDevImmContext->Unmap(textObj->m_BgVertexBuffer, 0); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + CTextObj *textObj = static_cast(_TextObj); + float dx = 2.0f*(float)(_X + m_OffsetX)/m_WndWidth; + float dy = -2.0f*(float)(_Y + m_OffsetY)/m_WndHeight; + + // Draw background + if( textObj->m_NbBgVerts>=4 && textObj->m_BgVertexBuffer!=NULL ) + { + // Set offset and constant color + D3D11_MAPPED_SUBRESOURCE mappedResource; + HRESULT hr = m_D3DDevImmContext->Map(m_ConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + if( SUCCEEDED(hr) ) + { + CConstants *constants = (CConstants *)mappedResource.pData; + constants->m_Offset[0] = dx; + constants->m_Offset[1] = dy; + constants->m_Offset[2] = 0; + constants->m_Offset[3] = 0; + Color32ToARGBf(_BgColor, constants->m_CstColor+3, constants->m_CstColor+0, constants->m_CstColor+1, constants->m_CstColor+2); + m_D3DDevImmContext->Unmap(m_ConstantBuffer, 0); + } + + // Set the input layout + m_D3DDevImmContext->IASetInputLayout(m_LineRectVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CLineRectVtx); + UINT offset = 0; + m_D3DDevImmContext->IASetVertexBuffers(0, 1, &textObj->m_BgVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDevImmContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + + // Render the bg rectangles + m_D3DDevImmContext->VSSetConstantBuffers(0, 1, &m_ConstantBuffer); + if( _BgColor!=0 || !textObj->m_LineBgColors ) // use a constant bg color + m_D3DDevImmContext->VSSetShader(m_LineRectCstColorVS, NULL, 0); + else + m_D3DDevImmContext->VSSetShader(m_LineRectVS, NULL, 0); + m_D3DDevImmContext->PSSetSamplers(0, 1, &m_SamplerState); + m_D3DDevImmContext->PSSetShader(m_LineRectPS, NULL, 0); + m_D3DDevImmContext->Draw(textObj->m_NbBgVerts, 0); + } + + // Draw text + if( textObj->m_NbTextVerts>=4 && textObj->m_TextVertexBuffer!=NULL ) + { + // Set offset and constant color + D3D11_MAPPED_SUBRESOURCE mappedResource; + HRESULT hr = m_D3DDevImmContext->Map(m_ConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + if( SUCCEEDED(hr) ) + { + CConstants *constants = (CConstants *)mappedResource.pData; + constants->m_Offset[0] = dx; + constants->m_Offset[1] = dy; + constants->m_Offset[2] = 0; + constants->m_Offset[3] = 0; + Color32ToARGBf(_Color, constants->m_CstColor+3, constants->m_CstColor+0, constants->m_CstColor+1, constants->m_CstColor+2); + m_D3DDevImmContext->Unmap(m_ConstantBuffer, 0); + } + + // Set the input layout + m_D3DDevImmContext->IASetInputLayout(m_TextVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CTextVtx); + UINT offset = 0; + m_D3DDevImmContext->IASetVertexBuffers(0, 1, &textObj->m_TextVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDevImmContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + + // Render the text + m_D3DDevImmContext->VSSetConstantBuffers(0, 1, &m_ConstantBuffer); + if( _Color!=0 || !textObj->m_LineColors ) // use a constant color + m_D3DDevImmContext->VSSetShader(m_TextCstColorVS, NULL, 0); + else + m_D3DDevImmContext->VSSetShader(m_TextVS, NULL, 0); + m_D3DDevImmContext->PSSetShaderResources(0, 1, &m_FontD3DTexRV); + m_D3DDevImmContext->PSSetSamplers(0, 1, &m_SamplerState); + m_D3DDevImmContext->PSSetShader(m_TextPS, NULL, 0); + m_D3DDevImmContext->Draw(textObj->m_NbTextVerts, 0); + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY) +{ + if( _Width>0 && _Height>0 ) + { + /* viewport changes screen coordinates, use scissor instead + D3D11_VIEWPORT vp; + vp.TopLeftX = _X0; + vp.TopLeftY = _Y0; + vp.Width = _Width; + vp.Height = _Height; + vp.MinDepth = 0; + vp.MaxDepth = 1; + m_D3DDev->RSSetViewports(1, &vp); + */ + + m_ViewportAndScissorRects[0].left = _X0; + m_ViewportAndScissorRects[0].right = _X0 + _Width - 1; + m_ViewportAndScissorRects[0].top = _Y0; + m_ViewportAndScissorRects[0].bottom = _Y0 + _Height - 1; + if( RectIsFull(m_ViewportAndScissorRects[1]) ) + m_D3DDevImmContext->RSSetScissorRects(1, m_ViewportAndScissorRects); // viewport clipping only + else + m_D3DDevImmContext->RSSetScissorRects(2, m_ViewportAndScissorRects); + + m_OffsetX = _X0 + _OffsetX; + m_OffsetY = _Y0 + _OffsetY; + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::RestoreViewport() +{ + //m_D3DDevImmContext->RSSetViewports(1, static_cast(m_ViewportInit)); + m_ViewportAndScissorRects[0] = FullRect; + m_D3DDevImmContext->RSSetScissorRects(1, m_ViewportAndScissorRects+1); // scissor only + + m_OffsetX = m_OffsetY = 0; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::SetScissor(int _X0, int _Y0, int _Width, int _Height) +{ + if( _Width>0 && _Height>0 ) + { + m_ViewportAndScissorRects[1].left = _X0 - 2; + m_ViewportAndScissorRects[1].right = _X0 + _Width - 3; + m_ViewportAndScissorRects[1].top = _Y0 - 1; + m_ViewportAndScissorRects[1].bottom = _Y0 + _Height - 1; + if( RectIsFull(m_ViewportAndScissorRects[0]) ) + m_D3DDevImmContext->RSSetScissorRects(1, m_ViewportAndScissorRects+1); // no viewport clipping + else + m_D3DDevImmContext->RSSetScissorRects(2, m_ViewportAndScissorRects); + } + else + { + m_ViewportAndScissorRects[1] = FullRect; + m_D3DDevImmContext->RSSetScissorRects(1, m_ViewportAndScissorRects); // apply viewport clipping only + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D11::DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode) +{ + assert(m_Drawing==true); + + if( _NumTriangles<=0 ) + return; + + if( m_TrianglesVertexBufferCount<3*_NumTriangles ) // force re-creation + { + if( m_TrianglesVertexBuffer!=NULL ) + m_TrianglesVertexBuffer->Release(); + m_TrianglesVertexBuffer = NULL; + m_TrianglesVertexBufferCount = 0; + } + + // DrawTriangles uses LineRect layout and shaders + + if( m_TrianglesVertexBuffer==NULL ) + { + // Create triangles vertex buffer + D3D11_BUFFER_DESC bd; + bd.Usage = D3D11_USAGE_DYNAMIC; + bd.BindFlags = D3D11_BIND_VERTEX_BUFFER; + bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + bd.MiscFlags = 0; + bd.ByteWidth = 3*_NumTriangles * sizeof(CLineRectVtx); + bd.StructureByteStride = 0; + HRESULT hr = m_D3DDev->CreateBuffer(&bd, NULL, &m_TrianglesVertexBuffer); + if( SUCCEEDED(hr) ) + m_TrianglesVertexBufferCount = 3*_NumTriangles; + else + { + m_TrianglesVertexBuffer = NULL; + m_TrianglesVertexBufferCount = 0; + return; // Problem: cannot create triangles VB + } + } + assert( m_TrianglesVertexBufferCount>=3*_NumTriangles ); + assert( m_TrianglesVertexBuffer!=NULL ); + + D3D11_MAPPED_SUBRESOURCE mappedResource; + HRESULT hr = m_D3DDevImmContext->Map(m_TrianglesVertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + if( SUCCEEDED(hr) ) + { + CLineRectVtx *vertices = (CLineRectVtx *)mappedResource.pData; + // Fill vertex buffer + for( int i=0; i<3*_NumTriangles; ++ i ) + { + vertices[i].m_Pos[0] = ToNormScreenX(_Vertices[2*i+0] + m_OffsetX, m_WndWidth); + vertices[i].m_Pos[1] = ToNormScreenY(_Vertices[2*i+1] + m_OffsetY, m_WndHeight); + vertices[i].m_Pos[2] = 0; + vertices[i].m_Color = ToR8G8B8A8(_Colors[i]); + } + m_D3DDevImmContext->Unmap(m_TrianglesVertexBuffer, 0); + + // Reset shader constants + hr = m_D3DDevImmContext->Map(m_ConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); + if( SUCCEEDED(hr) ) + { + CConstants *constants = (CConstants *)mappedResource.pData; + constants->m_Offset[0] = 0; + constants->m_Offset[1] = 0; + constants->m_Offset[2] = 0; + constants->m_Offset[3] = 0; + constants->m_CstColor[0] = 1; + constants->m_CstColor[1] = 1; + constants->m_CstColor[2] = 1; + constants->m_CstColor[3] = 1; + m_D3DDevImmContext->Unmap(m_ConstantBuffer, 0); + } + + // Set the input layout + m_D3DDevImmContext->IASetInputLayout(m_LineRectVertexLayout); + + // Set vertex buffer + UINT stride = sizeof(CLineRectVtx); + UINT offset = 0; + m_D3DDevImmContext->IASetVertexBuffers(0, 1, &m_TrianglesVertexBuffer, &stride, &offset); + + // Set primitive topology + m_D3DDevImmContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + + if( _CullMode==CULL_CW ) + m_D3DDevImmContext->RSSetState(m_RasterStateCullCW); + else if( _CullMode==CULL_CCW ) + m_D3DDevImmContext->RSSetState(m_RasterStateCullCCW); + else + m_D3DDevImmContext->RSSetState(m_RasterStateMultisample); + + // Render the triangles + m_D3DDevImmContext->VSSetConstantBuffers(0, 1, &m_ConstantBuffer); + m_D3DDevImmContext->VSSetShader(m_LineRectVS, NULL, 0); + m_D3DDevImmContext->PSSetShader(m_LineRectPS, NULL, 0); + m_D3DDevImmContext->Draw(3*_NumTriangles, 0); + + m_D3DDevImmContext->RSSetState(m_RasterState); // restore default raster state + } +} + +// --------------------------------------------------------------------------- diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,117 @@ +// --------------------------------------------------------------------------- +// +// @file TwDirect3D11.h +// @brief Direct3D11 graphic functions +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_DIRECT3D11_INCLUDED +#define ANT_TW_DIRECT3D11_INCLUDED + +#include "TwGraph.h" + +// --------------------------------------------------------------------------- + +class CTwGraphDirect3D11 : public ITwGraph +{ +public: + virtual int Init(); + virtual int Shut(); + virtual void BeginDraw(int _WndWidth, int _WndHeight); + virtual void EndDraw(); + virtual bool IsDrawing(); + virtual void Restore(); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased=false); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color, bool _AntiAliased=false) { DrawLine(_X0, _Y0, _X1, _Y1, _Color, _Color, _AntiAliased); } + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11); + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color) { DrawRect(_X0, _Y0, _X1, _Y1, _Color, _Color, _Color, _Color); } + virtual void DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode); + + virtual void * NewTextObj(); + virtual void DeleteTextObj(void *_TextObj); + virtual void BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth); + virtual void DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor); + + virtual void ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY); + virtual void RestoreViewport(); + virtual void SetScissor(int _X0, int _Y0, int _Width, int _Height); + +protected: + struct ID3D11Device * m_D3DDev; + struct ID3D11DeviceContext *m_D3DDevImmContext; + unsigned int m_D3DDevInitialRefCount; + bool m_Drawing; + const CTexFont * m_FontTex; + struct ID3D11Texture2D * m_FontD3DTex; + struct ID3D11ShaderResourceView *m_FontD3DTexRV; + int m_WndWidth; + int m_WndHeight; + int m_OffsetX; + int m_OffsetY; + void * m_ViewportInit; + RECT m_ViewportAndScissorRects[2]; + + struct CLineRectVtx + { + float m_Pos[3]; + color32 m_Color; + }; + struct CTextVtx + { + float m_Pos[3]; + color32 m_Color; + float m_UV[2]; + }; + struct CConstants + { + float m_Offset[4]; + float m_CstColor[4]; + }; + + struct CTextObj + { + struct ID3D11Buffer * m_TextVertexBuffer; + struct ID3D11Buffer * m_BgVertexBuffer; + int m_NbTextVerts; + int m_NbBgVerts; + int m_TextVertexBufferSize; + int m_BgVertexBufferSize; + bool m_LineColors; + bool m_LineBgColors; + }; + + struct CState11 * m_State; + struct ID3D11DepthStencilState *m_DepthStencilState; + struct ID3D11BlendState * m_BlendState; + struct ID3D11RasterizerState * m_RasterState; + struct ID3D11RasterizerState * m_RasterStateAntialiased; + struct ID3D11RasterizerState * m_RasterStateMultisample; + struct ID3D11RasterizerState * m_RasterStateCullCW; + struct ID3D11RasterizerState * m_RasterStateCullCCW; + + struct ID3D11VertexShader * m_LineRectVS; + struct ID3D11VertexShader * m_LineRectCstColorVS; + struct ID3D11PixelShader * m_LineRectPS; + struct ID3D11InputLayout * m_LineRectVertexLayout; + struct ID3D11VertexShader * m_TextVS; + struct ID3D11VertexShader * m_TextCstColorVS; + struct ID3D11PixelShader * m_TextPS; + struct ID3D11InputLayout * m_TextVertexLayout; + struct ID3D11Buffer * m_LineVertexBuffer; + struct ID3D11Buffer * m_RectVertexBuffer; + struct ID3D11Buffer * m_TrianglesVertexBuffer; + int m_TrianglesVertexBufferCount; + struct ID3D11Buffer * m_ConstantBuffer; + struct ID3D11SamplerState * m_SamplerState; +}; + +// --------------------------------------------------------------------------- + + +#endif // !defined ANT_TW_DIRECT3D11_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.hlsl ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.hlsl --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.hlsl 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D11.hlsl 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,83 @@ +// --------------------------------------------------------------------------- +// +// @file TwDirect3D11.hlsl +// @author Philippe Decaudin - http://www.antisphere.com +// @brief AntTweakBar shaders and techniques for Direct3D11 support +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + +float4 g_Offset : register(c0) = 0; +float4 g_CstColor : register(c1) = 1; + +// Shaders for lines and rectangles + +struct LineRectPSInput +{ + float4 Pos : SV_POSITION; + float4 Color : COLOR0; +}; + +LineRectPSInput LineRectVS(float4 pos : POSITION, float4 color : COLOR) +{ + LineRectPSInput ps; + ps.Pos = pos + g_Offset; + ps.Color = color; + return ps; +} + +LineRectPSInput LineRectCstColorVS(float4 pos : POSITION, float4 color : COLOR) +{ + LineRectPSInput ps; + ps.Pos = pos + g_Offset; + ps.Color = g_CstColor; + return ps; +} + +float4 LineRectPS(LineRectPSInput input) : SV_TARGET +{ + return input.Color; +} + +// Shaders for text + +Texture2D g_Font : register(t0); + +SamplerState g_FontSampler : register(s0) +{ + Filter = MIN_MAG_MIP_POINT; + AddressU = BORDER; + AddressV = BORDER; + BorderColor = float4(0, 0, 0, 0); +}; + +struct TextPSInput +{ + float4 Pos : SV_POSITION; + float4 Color : COLOR0; + float2 Tex : TEXCOORD0; +}; + +TextPSInput TextVS(float4 pos : POSITION, float4 color : COLOR, float2 tex : TEXCOORD0) +{ + TextPSInput ps; + ps.Pos = pos + g_Offset; + ps.Color = color; + ps.Tex = tex; + return ps; +} + +TextPSInput TextCstColorVS(float4 pos : POSITION, float4 color : COLOR, float2 tex : TEXCOORD0) +{ + TextPSInput ps; + ps.Pos = pos + g_Offset; + ps.Color = g_CstColor; + ps.Tex = tex; + return ps; +} + +float4 TextPS(TextPSInput input) : SV_TARGET +{ + return g_Font.Sample(g_FontSampler, input.Tex) * input.Color; +} diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D9.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D9.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D9.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D9.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,631 @@ +// --------------------------------------------------------------------------- +// +// @file TwDirect3D9.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include "TwDirect3D9.h" +#include "TwMgr.h" + +#include +#ifdef _DEBUG +// #include +// #pragma comment(lib, "dxerr9") +#endif // _DEBUG + + +using namespace std; + +const char *g_ErrCantLoadD3D9 = "Cannot load Direct3D9 library dynamically"; +const char *g_ErrCantUnloadD3D9 = "Cannot unload Direct3D9 library"; + + +// --------------------------------------------------------------------------- + +static IDirect3DTexture9 *BindFont(IDirect3DDevice9 *_Dev, const CTexFont *_Font) +{ + assert(_Font!=NULL); + + IDirect3DTexture9 *Tex = NULL; + HRESULT hr = _Dev->CreateTexture(_Font->m_TexWidth, _Font->m_TexHeight, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &Tex, NULL); + if( FAILED(hr) ) + return NULL; + + D3DLOCKED_RECT r; + hr = Tex->LockRect(0, &r, NULL, 0); + if( SUCCEEDED(hr) ) + { + color32 *p = static_cast(r.pBits); + for( int i=0; i<_Font->m_TexWidth*_Font->m_TexHeight; ++i, ++p ) + *p = 0x00ffffff | (((color32)(_Font->m_TexBytes[i]))<<24); + Tex->UnlockRect(0); + } + return Tex; +} + +// --------------------------------------------------------------------------- + +static void UnbindFont(IDirect3DDevice9 *_Dev, IDirect3DTexture9 *_Tex) +{ + (void)_Dev; + + if( _Tex ) + _Tex->Release(); +} + +// --------------------------------------------------------------------------- + +struct CState +{ + IDirect3DStateBlock9 *m_StateBlock; + + // DeviceCaps (filled by constructor) + D3DCAPS9 m_Caps; + + void Save(); + void Restore(); + CState(IDirect3DDevice9 *_Dev); + ~CState(); +private: + IDirect3DDevice9 *m_D3DDev; +}; + +CState::CState(IDirect3DDevice9 *_Dev) +{ + ZeroMemory(this, sizeof(CState)); + m_D3DDev = _Dev; + + m_D3DDev->GetDeviceCaps(&m_Caps); +} + +CState::~CState() +{ + if( m_StateBlock ) + { + UINT rc = m_StateBlock->Release(); + assert( rc==0 ); (void)rc; + m_StateBlock = NULL; + } +} + +void CState::Save() +{ + if( !m_StateBlock && m_D3DDev ) + m_D3DDev->CreateStateBlock(D3DSBT_ALL, &m_StateBlock); + + if( m_StateBlock ) + m_StateBlock->Capture(); +} + +void CState::Restore() +{ + if( m_StateBlock ) + m_StateBlock->Apply(); +} + +// --------------------------------------------------------------------------- + +int CTwGraphDirect3D9::Init() +{ + assert(g_TwMgr->m_Device!=NULL); + + m_D3DDev = static_cast(g_TwMgr->m_Device); + m_Drawing = false; + m_FontTex = NULL; + m_FontD3DTex = NULL; + D3DDEVICE_CREATION_PARAMETERS cp; + m_D3DDev->GetCreationParameters(&cp); + m_PureDevice = ( cp.BehaviorFlags & D3DCREATE_PUREDEVICE ) ? true : false; + m_WndWidth = 0; + m_WndHeight = 0; + m_State = new CState(m_D3DDev); + m_ViewportInit = new D3DVIEWPORT9; + ZeroMemory(m_ViewportInit, sizeof(D3DVIEWPORT9)); + m_OffsetX = 0; + m_OffsetY = 0; + + return 1; +} + +// --------------------------------------------------------------------------- + +int CTwGraphDirect3D9::Shut() +{ + assert(m_Drawing==false); + + UnbindFont(m_D3DDev, m_FontD3DTex); + m_FontD3DTex = NULL; + delete m_State; + m_State = NULL; + m_D3DDev = NULL; + delete m_ViewportInit; + m_ViewportInit = NULL; + + return 1; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::BeginDraw(int _WndWidth, int _WndHeight) +{ + assert(m_Drawing==false && _WndWidth>0 && _WndHeight>0); + m_Drawing = true; + + m_WndWidth = _WndWidth; + m_WndHeight = _WndHeight; + m_OffsetX = 0; + m_OffsetY = 0; + + // save context + if( !m_PureDevice ) + m_State->Save(); + + if( m_WndWidth>0 && m_WndHeight>0 ) + { + D3DVIEWPORT9 Vp; + Vp.X = 0; + Vp.Y = 0; + Vp.Width = m_WndWidth; + Vp.Height = m_WndHeight; + Vp.MinZ = 0; + Vp.MaxZ = 1; + m_D3DDev->SetViewport(&Vp); + + //D3DMATRIX Transfo = { 2.0f/_WndWidth,0,0,0, 0,2.0f/_WndHeight,0,0, 0,0,-1,0, 0,0,0,1 }; + //m_D3DDev->SetTransform(D3DTS_PROJECTION, &Transfo); + } + m_D3DDev->GetViewport(static_cast(m_ViewportInit)); + // const D3DMATRIX id = { 1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1 }; + // m_D3DDev->SetTransform(D3DTS_VIEW, &id); + // m_D3DDev->SetTransform(D3DTS_WORLD, &id); + // m_D3DDev->SetTransform(D3DTS_TEXTURE0, &id); + + m_D3DDev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); + m_D3DDev->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); + m_D3DDev->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); + m_D3DDev->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + m_D3DDev->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD); + m_D3DDev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + m_D3DDev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + m_D3DDev->SetRenderState(D3DRS_CLIPPLANEENABLE, 0); + m_D3DDev->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID); + m_D3DDev->SetRenderState(D3DRS_LASTPIXEL, FALSE); + m_D3DDev->SetRenderState(D3DRS_FOGENABLE, FALSE); + m_D3DDev->SetRenderState(D3DRS_STENCILENABLE, FALSE); + m_D3DDev->SetRenderState(D3DRS_COLORWRITEENABLE, 0x0000000F); + m_D3DDev->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE); + if( m_State->m_Caps.PrimitiveMiscCaps & D3DPMISCCAPS_SEPARATEALPHABLEND ) + m_D3DDev->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, FALSE); + //if( m_State->m_Caps.LineCaps & D3DLINECAPS_ANTIALIAS ) + m_D3DDev->SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, FALSE); + + m_D3DDev->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); + m_D3DDev->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); + m_D3DDev->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); + m_D3DDev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); + m_D3DDev->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); + m_D3DDev->SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_PASSTHRU); + m_D3DDev->SetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE); + m_D3DDev->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); + m_D3DDev->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); + m_D3DDev->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); + m_D3DDev->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT); + m_D3DDev->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); + + m_D3DDev->SetVertexShader(NULL); + m_D3DDev->SetPixelShader(NULL); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::EndDraw() +{ + assert(m_Drawing==true); + m_Drawing = false; + + // restore context + if( !m_PureDevice ) + m_State->Restore(); +} + +// --------------------------------------------------------------------------- + +bool CTwGraphDirect3D9::IsDrawing() +{ + return m_Drawing; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::Restore() +{ + if( m_State ) + if( m_State->m_StateBlock ) + { + UINT rc = m_State->m_StateBlock->Release(); + assert( rc==0 ); (void)rc; + m_State->m_StateBlock = NULL; + } + + UnbindFont(m_D3DDev, m_FontD3DTex); + m_FontD3DTex = NULL; + + m_FontTex = NULL; +} + + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased) +{ + assert(m_Drawing==true); + + struct CVtx + { + float m_Pos[4]; + DWORD m_Color; + }; + CVtx p[2]; + + p[0].m_Pos[0] = (float)(_X0 + m_OffsetX); + p[0].m_Pos[1] = (float)(_Y0 + m_OffsetY); + p[0].m_Pos[2] = 0; + p[0].m_Pos[3] = 0; + p[0].m_Color = _Color0; + + p[1].m_Pos[0] = (float)(_X1 + m_OffsetX); + p[1].m_Pos[1] = (float)(_Y1 + m_OffsetY); + p[1].m_Pos[2] = 0; + p[1].m_Pos[3] = 0; + p[1].m_Color = _Color1; + + //if( m_State->m_Caps.LineCaps & D3DLINECAPS_ANTIALIAS ) + m_D3DDev->SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, (_AntiAliased ? TRUE : FALSE)); + m_D3DDev->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_DISABLE); + m_D3DDev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); + m_D3DDev->SetFVF(D3DFVF_XYZRHW|D3DFVF_DIFFUSE); + m_D3DDev->DrawPrimitiveUP(D3DPT_LINELIST, 1, p, sizeof(CVtx)); + //if( m_State->m_Caps.LineCaps & D3DLINECAPS_ANTIALIAS ) + m_D3DDev->SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, FALSE); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11) +{ + assert(m_Drawing==true); + + // border adjustment + if(_X0<_X1) + ++_X1; + else if(_X0>_X1) + ++_X0; + if(_Y0<_Y1) + ++_Y1; + else if(_Y0>_Y1) + ++_Y0; + + struct CVtx + { + float m_Pos[4]; + DWORD m_Color; + }; + CVtx p[4]; + + p[0].m_Pos[0] = (float)(_X1 + m_OffsetX); + p[0].m_Pos[1] = (float)(_Y0 + m_OffsetY); + p[0].m_Pos[2] = 0; + p[0].m_Pos[3] = 1; + p[0].m_Color = _Color10; + + p[1].m_Pos[0] = (float)(_X0 + m_OffsetX); + p[1].m_Pos[1] = (float)(_Y0 + m_OffsetY); + p[1].m_Pos[2] = 0; + p[1].m_Pos[3] = 1; + p[1].m_Color = _Color00; + + p[2].m_Pos[0] = (float)(_X1 + m_OffsetX); + p[2].m_Pos[1] = (float)(_Y1 + m_OffsetY); + p[2].m_Pos[2] = 0; + p[2].m_Pos[3] = 1; + p[2].m_Color = _Color11; + + p[3].m_Pos[0] = (float)(_X0 + m_OffsetX); + p[3].m_Pos[1] = (float)(_Y1 + m_OffsetY); + p[3].m_Pos[2] = 0; + p[3].m_Pos[3] = 1; + p[3].m_Color = _Color01; + + m_D3DDev->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_DISABLE); + m_D3DDev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); + m_D3DDev->SetFVF(D3DFVF_XYZRHW|D3DFVF_DIFFUSE); + m_D3DDev->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, p, sizeof(CVtx)); +} + +// --------------------------------------------------------------------------- + +void *CTwGraphDirect3D9::NewTextObj() +{ + return new CTextObj; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::DeleteTextObj(void *_TextObj) +{ + assert(_TextObj!=NULL); + delete static_cast(_TextObj); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + assert(_Font!=NULL); + + if( _Font != m_FontTex ) + { + UnbindFont(m_D3DDev, m_FontD3DTex); + m_FontD3DTex = BindFont(m_D3DDev, _Font); + m_FontTex = _Font; + } + + CTextObj *TextObj = static_cast(_TextObj); + TextObj->m_TextVerts.resize(0); + TextObj->m_BgVerts.resize(0); + TextObj->m_LineColors = (_LineColors!=NULL); + TextObj->m_LineBgColors = (_LineBgColors!=NULL); + + int x, x1, y, y1, i, Len; + unsigned char ch; + const unsigned char *Text; + color32 LineColor = COLOR32_RED; + CTextVtx Vtx; + Vtx.m_Pos[2] = 0; + Vtx.m_Pos[3] = 1; + CBgVtx BgVtx; + BgVtx.m_Pos[2] = 0; + BgVtx.m_Pos[3] = 1; + for( int Line=0; Line<_NbLines; ++Line ) + { + x = 0; + y = Line * (_Font->m_CharHeight+_Sep); + y1 = y+_Font->m_CharHeight; + Len = (int)_TextLines[Line].length(); + Text = (const unsigned char *)(_TextLines[Line].c_str()); + if( _LineColors!=NULL ) + LineColor = _LineColors[Line]; + + for( i=0; im_CharWidth[ch]; + + Vtx.m_Color = LineColor; + + Vtx.m_Pos[0] = (float)x; + Vtx.m_Pos[1] = (float)y; + Vtx.m_UV [0] = _Font->m_CharU0[ch]; + Vtx.m_UV [1] = _Font->m_CharV0[ch]; + TextObj->m_TextVerts.push_back(Vtx); + + Vtx.m_Pos[0] = (float)x1; + Vtx.m_Pos[1] = (float)y; + Vtx.m_UV [0] = _Font->m_CharU1[ch]; + Vtx.m_UV [1] = _Font->m_CharV0[ch]; + TextObj->m_TextVerts.push_back(Vtx); + + Vtx.m_Pos[0] = (float)x; + Vtx.m_Pos[1] = (float)y1; + Vtx.m_UV [0] = _Font->m_CharU0[ch]; + Vtx.m_UV [1] = _Font->m_CharV1[ch]; + TextObj->m_TextVerts.push_back(Vtx); + + Vtx.m_Pos[0] = (float)x1; + Vtx.m_Pos[1] = (float)y; + Vtx.m_UV [0] = _Font->m_CharU1[ch]; + Vtx.m_UV [1] = _Font->m_CharV0[ch]; + TextObj->m_TextVerts.push_back(Vtx); + + Vtx.m_Pos[0] = (float)x1; + Vtx.m_Pos[1] = (float)y1; + Vtx.m_UV [0] = _Font->m_CharU1[ch]; + Vtx.m_UV [1] = _Font->m_CharV1[ch]; + TextObj->m_TextVerts.push_back(Vtx); + + Vtx.m_Pos[0] = (float)x; + Vtx.m_Pos[1] = (float)y1; + Vtx.m_UV [0] = _Font->m_CharU0[ch]; + Vtx.m_UV [1] = _Font->m_CharV1[ch]; + TextObj->m_TextVerts.push_back(Vtx); + + x = x1; + } + if( _BgWidth>0 ) + { + if( _LineBgColors!=NULL ) + BgVtx.m_Color = _LineBgColors[Line]; + else + BgVtx.m_Color = COLOR32_BLACK; + + BgVtx.m_Pos[0] = -1; + BgVtx.m_Pos[1] = (float)y; + TextObj->m_BgVerts.push_back(BgVtx); + + BgVtx.m_Pos[0] = (float)(_BgWidth+1); + BgVtx.m_Pos[1] = (float)y; + TextObj->m_BgVerts.push_back(BgVtx); + + BgVtx.m_Pos[0] = -1; + BgVtx.m_Pos[1] = (float)y1; + TextObj->m_BgVerts.push_back(BgVtx); + + BgVtx.m_Pos[0] = (float)(_BgWidth+1); + BgVtx.m_Pos[1] = (float)y; + TextObj->m_BgVerts.push_back(BgVtx); + + BgVtx.m_Pos[0] = (float)(_BgWidth+1); + BgVtx.m_Pos[1] = (float)y1; + TextObj->m_BgVerts.push_back(BgVtx); + + BgVtx.m_Pos[0] = -1; + BgVtx.m_Pos[1] = (float)y1; + TextObj->m_BgVerts.push_back(BgVtx); + } + } + +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + CTextObj *TextObj = static_cast(_TextObj); + float x = (float)_X; + float y = (float)_Y; + + int i; + int nv = (int)TextObj->m_TextVerts.size(); + int nb = (int)TextObj->m_BgVerts.size(); + + if( nb>=4 ) + { + for( i=0; im_BgVerts[i].m_Pos[0] += x + m_OffsetX; + TextObj->m_BgVerts[i].m_Pos[1] += y + m_OffsetY; + if( _BgColor!=0 || !TextObj->m_LineBgColors ) + TextObj->m_BgVerts[i].m_Color = _BgColor; + } + + m_D3DDev->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_DISABLE); + m_D3DDev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); + m_D3DDev->SetFVF(D3DFVF_XYZRHW|D3DFVF_DIFFUSE); + m_D3DDev->DrawPrimitiveUP(D3DPT_TRIANGLELIST, nb/3, &(TextObj->m_BgVerts[0]), sizeof(CBgVtx)); + + for( i=0; im_BgVerts[i].m_Pos[0] -= x + m_OffsetX; + TextObj->m_BgVerts[i].m_Pos[1] -= y + m_OffsetY; + } + } + + if( nv>=4 ) + { + for( i=0; im_TextVerts[i].m_Pos[0] += x + m_OffsetX; + TextObj->m_TextVerts[i].m_Pos[1] += y + m_OffsetY; + } + if( _Color!=0 || !TextObj->m_LineColors ) + for( i=0; im_TextVerts[i].m_Color = _Color; + + m_D3DDev->SetTexture(0, m_FontD3DTex); + m_D3DDev->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); + m_D3DDev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); + m_D3DDev->SetFVF(D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1|D3DFVF_TEXCOORDSIZE2(0)); + m_D3DDev->DrawPrimitiveUP(D3DPT_TRIANGLELIST, nv/3, &(TextObj->m_TextVerts[0]), sizeof(CTextVtx)); + + for( i=0; im_TextVerts[i].m_Pos[0] -= x + m_OffsetX; + TextObj->m_TextVerts[i].m_Pos[1] -= y + m_OffsetY; + } + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY) +{ + if( _Width>0 && _Height>0 ) + { + D3DVIEWPORT9 Vp; + Vp.X = _X0; + Vp.Y = _Y0; + Vp.Width = _Width; + Vp.Height = _Height; + Vp.MinZ = 0; + Vp.MaxZ = 1; + m_D3DDev->SetViewport(&Vp); + + m_OffsetX = _X0 + _OffsetX; + m_OffsetY = _Y0 + _OffsetY - 1; + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::RestoreViewport() +{ + m_D3DDev->SetViewport(static_cast(m_ViewportInit)); + m_OffsetX = m_OffsetY = 0; +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::SetScissor(int _X0, int _Y0, int _Width, int _Height) +{ + if( _Width>0 && _Height>0 ) + { + RECT Rect; + Rect.left = _X0 - 1; + Rect.right = Rect.left + _Width - 1; + Rect.top = _Y0; + Rect.bottom = Rect.top + _Height; + m_D3DDev->SetScissorRect(&Rect); + m_D3DDev->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE); + } + else + m_D3DDev->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE); +} + +// --------------------------------------------------------------------------- + +void CTwGraphDirect3D9::DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode) +{ + assert(m_Drawing==true); + + if( _NumTriangles<0 ) + return; + + DWORD prevCullMode = D3DCULL_NONE; + m_D3DDev->GetRenderState(D3DRS_CULLMODE, &prevCullMode); + if( _CullMode==CULL_CW ) + m_D3DDev->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW); + else if( _CullMode==CULL_CCW ) + m_D3DDev->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); + else + m_D3DDev->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); + + if( (int)m_TriVertices.size()<3*_NumTriangles ) + m_TriVertices.resize(3*_NumTriangles); + + for( int i=0; i<3*_NumTriangles; ++i ) + { + m_TriVertices[i].m_Pos[0] = (float)(_Vertices[2*i+0] + m_OffsetX); + m_TriVertices[i].m_Pos[1] = (float)(_Vertices[2*i+1] + m_OffsetY); + m_TriVertices[i].m_Pos[2] = 0; + m_TriVertices[i].m_Pos[3] = 1; + m_TriVertices[i].m_Color = _Colors[i]; + } + + m_D3DDev->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_DISABLE); + m_D3DDev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); + m_D3DDev->SetFVF(D3DFVF_XYZRHW|D3DFVF_DIFFUSE); + m_D3DDev->DrawPrimitiveUP(D3DPT_TRIANGLELIST, _NumTriangles, &(m_TriVertices[0]), sizeof(CTriVtx)); + + m_D3DDev->SetRenderState(D3DRS_CULLMODE, prevCullMode); +} + +// --------------------------------------------------------------------------- diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D9.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D9.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D9.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwDirect3D9.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,90 @@ +// --------------------------------------------------------------------------- +// +// @file TwDirect3D9.h +// @brief Direct3D9 graph functions +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_DIRECT3D9_INCLUDED +#define ANT_TW_DIRECT3D9_INCLUDED + +#include "TwGraph.h" + +// --------------------------------------------------------------------------- + +class CTwGraphDirect3D9 : public ITwGraph +{ +public: + virtual int Init(); + virtual int Shut(); + virtual void BeginDraw(int _WndWidth, int _WndHeight); + virtual void EndDraw(); + virtual bool IsDrawing(); + virtual void Restore(); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased=false); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color, bool _AntiAliased=false) { DrawLine(_X0, _Y0, _X1, _Y1, _Color, _Color, _AntiAliased); } + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11); + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color) { DrawRect(_X0, _Y0, _X1, _Y1, _Color, _Color, _Color, _Color); } + virtual void DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode); + + virtual void * NewTextObj(); + virtual void DeleteTextObj(void *_TextObj); + virtual void BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth); + virtual void DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor); + + virtual void ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY); + virtual void RestoreViewport(); + virtual void SetScissor(int _X0, int _Y0, int _Width, int _Height); + +protected: + struct IDirect3DDevice9 * m_D3DDev; + bool m_Drawing; + const CTexFont * m_FontTex; + struct IDirect3DTexture9 * m_FontD3DTex; + bool m_PureDevice; + int m_WndWidth; + int m_WndHeight; + void * m_ViewportInit; + int m_OffsetX; + int m_OffsetY; + + struct CTextVtx + { + float m_Pos[4]; + color32 m_Color; + float m_UV[2]; + }; + struct CBgVtx + { + float m_Pos[4]; + color32 m_Color; + }; + + struct CTextObj + { + std::vector m_TextVerts; + std::vector m_BgVerts; + bool m_LineColors; + bool m_LineBgColors; + }; + + struct CTriVtx + { + float m_Pos[4]; + DWORD m_Color; + }; + std::vector m_TriVertices; + + struct CState * m_State; +}; + +// --------------------------------------------------------------------------- + + +#endif // !defined ANT_TW_DIRECT3D9_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventGLFW.c ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventGLFW.c --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventGLFW.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventGLFW.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,212 @@ +// --------------------------------------------------------------------------- +// +// @file TwEventGLFW.c +// @brief Helper: +// translate and re-send mouse and keyboard events +// from GLFW event callbacks to AntTweakBar +// +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + +// #include +#include "MiniGLFW.h" // a subset of GLFW.h needed to compile TwEventGLFW.c +// note: AntTweakBar.dll does not need to link with GLFW, +// it just needs some definitions for its helper functions. + +#include + + +int TW_CALL TwEventMouseButtonGLFW(int glfwButton, int glfwAction) +{ + int handled = 0; + TwMouseAction action = (glfwAction==GLFW_PRESS) ? TW_MOUSE_PRESSED : TW_MOUSE_RELEASED; + + if( glfwButton==GLFW_MOUSE_BUTTON_LEFT ) + handled = TwMouseButton(action, TW_MOUSE_LEFT); + else if( glfwButton==GLFW_MOUSE_BUTTON_RIGHT ) + handled = TwMouseButton(action, TW_MOUSE_RIGHT); + else if( glfwButton==GLFW_MOUSE_BUTTON_MIDDLE ) + handled = TwMouseButton(action, TW_MOUSE_MIDDLE); + + return handled; +} + + +int g_KMod = 0; + + +int TW_CALL TwEventKeyGLFW(int glfwKey, int glfwAction) +{ + int handled = 0; + + // Register of modifiers state + if( glfwAction==GLFW_PRESS ) + { + switch( glfwKey ) + { + case GLFW_KEY_LSHIFT: + case GLFW_KEY_RSHIFT: + g_KMod |= TW_KMOD_SHIFT; + break; + case GLFW_KEY_LCTRL: + case GLFW_KEY_RCTRL: + g_KMod |= TW_KMOD_CTRL; + break; + case GLFW_KEY_LALT: + case GLFW_KEY_RALT: + g_KMod |= TW_KMOD_ALT; + break; + } + } + else + { + switch( glfwKey ) + { + case GLFW_KEY_LSHIFT: + case GLFW_KEY_RSHIFT: + g_KMod &= ~TW_KMOD_SHIFT; + break; + case GLFW_KEY_LCTRL: + case GLFW_KEY_RCTRL: + g_KMod &= ~TW_KMOD_CTRL; + break; + case GLFW_KEY_LALT: + case GLFW_KEY_RALT: + g_KMod &= ~TW_KMOD_ALT; + break; + } + } + + // Process key pressed + if( glfwAction==GLFW_PRESS ) + { + int mod = g_KMod; + int testkp = ((mod&TW_KMOD_CTRL) || (mod&TW_KMOD_ALT)) ? 1 : 0; + + if( (mod&TW_KMOD_CTRL) && glfwKey>0 && glfwKey=GLFW_KEY_SPECIAL ) + { + int k = 0; + + if( glfwKey>=GLFW_KEY_F1 && glfwKey<=GLFW_KEY_F15 ) + k = TW_KEY_F1 + (glfwKey-GLFW_KEY_F1); + else if( testkp && glfwKey>=GLFW_KEY_KP_0 && glfwKey<=GLFW_KEY_KP_9 ) + k = '0' + (glfwKey-GLFW_KEY_KP_0); + else + { + switch( glfwKey ) + { + case GLFW_KEY_ESC: + k = TW_KEY_ESCAPE; + break; + case GLFW_KEY_UP: + k = TW_KEY_UP; + break; + case GLFW_KEY_DOWN: + k = TW_KEY_DOWN; + break; + case GLFW_KEY_LEFT: + k = TW_KEY_LEFT; + break; + case GLFW_KEY_RIGHT: + k = TW_KEY_RIGHT; + break; + case GLFW_KEY_TAB: + k = TW_KEY_TAB; + break; + case GLFW_KEY_ENTER: + k = TW_KEY_RETURN; + break; + case GLFW_KEY_BACKSPACE: + k = TW_KEY_BACKSPACE; + break; + case GLFW_KEY_INSERT: + k = TW_KEY_INSERT; + break; + case GLFW_KEY_DEL: + k = TW_KEY_DELETE; + break; + case GLFW_KEY_PAGEUP: + k = TW_KEY_PAGE_UP; + break; + case GLFW_KEY_PAGEDOWN: + k = TW_KEY_PAGE_DOWN; + break; + case GLFW_KEY_HOME: + k = TW_KEY_HOME; + break; + case GLFW_KEY_END: + k = TW_KEY_END; + break; + case GLFW_KEY_KP_ENTER: + k = TW_KEY_RETURN; + break; + case GLFW_KEY_KP_DIVIDE: + if( testkp ) + k = '/'; + break; + case GLFW_KEY_KP_MULTIPLY: + if( testkp ) + k = '*'; + break; + case GLFW_KEY_KP_SUBTRACT: + if( testkp ) + k = '-'; + break; + case GLFW_KEY_KP_ADD: + if( testkp ) + k = '+'; + break; + case GLFW_KEY_KP_DECIMAL: + if( testkp ) + k = '.'; + break; + case GLFW_KEY_KP_EQUAL: + if( testkp ) + k = '='; + break; + } + } + + if( k>0 ) + handled = TwKeyPressed(k, mod); + } + } + + return handled; +} + + +int TW_CALL TwEventCharGLFW(int glfwChar, int glfwAction) +{ + if( glfwAction==GLFW_PRESS && (glfwChar & 0xff00)==0 ) + return TwKeyPressed(glfwChar, g_KMod); + + return 0; +} + +// functions with __cdecl calling convension +TW_API int TW_CDECL_CALL TwEventMouseButtonGLFWcdecl(int glfwButton, int glfwAction) +{ + return TwEventMouseButtonGLFW(glfwButton, glfwAction); +} +TW_API int TW_CDECL_CALL TwEventKeyGLFWcdecl(int glfwKey, int glfwAction) +{ + return TwEventKeyGLFW(glfwKey, glfwAction); +} +TW_API int TW_CDECL_CALL TwEventCharGLFWcdecl(int glfwChar, int glfwAction) +{ + return TwEventCharGLFW(glfwChar, glfwAction); +} +TW_API int TW_CDECL_CALL TwEventMousePosGLFWcdecl(int mouseX, int mouseY) +{ + return TwMouseMotion(mouseX, mouseY); +} +TW_API int TW_CDECL_CALL TwEventMouseWheelGLFWcdecl(int wheelPos) +{ + return TwMouseWheel(wheelPos); +} diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventGLUT.c ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventGLUT.c --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventGLUT.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventGLUT.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,150 @@ +// --------------------------------------------------------------------------- +// +// @file TwEventGLUT.c +// @brief Helper: +// translate and re-send mouse and keyboard events +// from GLUT event callbacks to AntTweakBar +// +// @author Philippe Decaudin - http://www.antisphere.com +// @date 2006/05/10 +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#define GLUT_NO_LIB_PRAGMA // we do not want to force linkage with glut +#ifdef _MSC_VER +# pragma warning(disable: 4505) // glut generates 'unreferenced function' warnings +# pragma warning(disable: 4100) // unreferenced parameter +#endif // _MSC_VER + +// #include +#include "MiniGLUT.h" // a subset of glut.h needed to compile TwEventGLUT.c +// note: AntTweakBar.dll does not need to link with GLUT, +// it just needs some definitions for its helper functions. + +#include + + +int TW_GLUT_CALL TwEventMouseButtonGLUT(int glutButton, int glutState, int mouseX, int mouseY) +{ + TwMouseAction action = (glutState==GLUT_DOWN) ? TW_MOUSE_PRESSED : TW_MOUSE_RELEASED; + + TwMouseMotion(mouseX, mouseY); + switch( glutButton ) + { + case GLUT_LEFT_BUTTON: + return TwMouseButton(action, TW_MOUSE_LEFT); + case GLUT_RIGHT_BUTTON: + return TwMouseButton(action, TW_MOUSE_RIGHT); + case GLUT_MIDDLE_BUTTON: + return TwMouseButton(action, TW_MOUSE_MIDDLE); + default: + return 0; + } +} + +int TW_GLUT_CALL TwEventMouseMotionGLUT(int mouseX, int mouseY) +{ + return TwMouseMotion(mouseX, mouseY); +} + + +// GLUT does not send modifiers state to 'Key' and 'Special' callbacks, +// and we cannot call glutGetModifiers here because we do not want to link +// AntTweakBar with glut, so the following function is used to store +// a pointer to the glutGetModifiers function of the calling application. +// It must be called at initialisation of the application. + +int (TW_CALL *g_GLUTGetModifiers)(void) = NULL; + +int TW_CALL TwGLUTModifiersFunc(int (TW_CALL *glutGetModifiersFunc)(void)) +{ + g_GLUTGetModifiers = glutGetModifiersFunc; + return (g_GLUTGetModifiers==NULL) ? 0 : 1; +} + + +int TW_GLUT_CALL TwEventKeyboardGLUT(unsigned char glutKey, int mouseX, int mouseY) +{ + int kmod = 0; + + if( g_GLUTGetModifiers!=NULL ) + { + int glutMod = g_GLUTGetModifiers(); + + if( glutMod&GLUT_ACTIVE_SHIFT ) + kmod |= TW_KMOD_SHIFT; + if( glutMod&GLUT_ACTIVE_CTRL ) + kmod |= TW_KMOD_CTRL; + if( glutMod&GLUT_ACTIVE_ALT ) + kmod |= TW_KMOD_ALT; + } + + if( (kmod&TW_KMOD_CTRL) && (glutKey>0 && glutKey<27) ) // CTRL special case + glutKey += 'a'-1; + + return TwKeyPressed((int)glutKey, kmod); +} + + +int TW_GLUT_CALL TwEventSpecialGLUT(int glutKey, int mouseX, int mouseY) +{ + int k = 0, kmod = 0; + + if( g_GLUTGetModifiers!=NULL ) + { + int glutMod = g_GLUTGetModifiers(); + + if( glutMod&GLUT_ACTIVE_SHIFT ) + kmod |= TW_KMOD_SHIFT; + if( glutMod&GLUT_ACTIVE_CTRL ) + kmod |= TW_KMOD_CTRL; + if( glutMod&GLUT_ACTIVE_ALT ) + kmod |= TW_KMOD_ALT; + } + + if( glutKey>=GLUT_KEY_F1 && glutKey<=GLUT_KEY_F12 ) + k = TW_KEY_F1 + (glutKey-GLUT_KEY_F1); + else + { + switch( glutKey ) + { + case GLUT_KEY_LEFT: + k = TW_KEY_LEFT; + break; + case GLUT_KEY_UP: + k = TW_KEY_UP; + break; + case GLUT_KEY_RIGHT: + k = TW_KEY_RIGHT; + break; + case GLUT_KEY_DOWN: + k = TW_KEY_DOWN; + break; + case GLUT_KEY_PAGE_UP: + k = TW_KEY_PAGE_UP; + break; + case GLUT_KEY_PAGE_DOWN: + k = TW_KEY_PAGE_DOWN; + break; + case GLUT_KEY_HOME: + k = TW_KEY_HOME; + break; + case GLUT_KEY_END: + k = TW_KEY_END; + break; + case GLUT_KEY_INSERT: + k = TW_KEY_INSERT; + break; + } + } + + if( k>0 && k + + +// TwEventSDL12 returns zero if msg has not been handled, +// and a non-zero value if it has been handled by the AntTweakBar library. +int TW_CALL TwEventSDL12(const void *sdlEvent) +{ + int handled = 0; + const SDL_Event *event = (const SDL_Event *)sdlEvent; + + if( event==NULL ) + return 0; + + switch( event->type ) + { + case SDL_KEYDOWN: + if( event->key.keysym.unicode!=0 && (event->key.keysym.unicode & 0xFF00)==0 ) + { + if( (event->key.keysym.unicode & 0xFF)<32 && (event->key.keysym.unicode & 0xFF)!=event->key.keysym.sym ) + handled = TwKeyPressed((event->key.keysym.unicode & 0xFF)+'a'-1, event->key.keysym.mod); + else + handled = TwKeyPressed(event->key.keysym.unicode & 0xFF, event->key.keysym.mod); + } + else + handled = TwKeyPressed(event->key.keysym.sym, event->key.keysym.mod); + break; + case SDL_MOUSEMOTION: + handled = TwMouseMotion(event->motion.x, event->motion.y); + break; + case SDL_MOUSEBUTTONUP: + case SDL_MOUSEBUTTONDOWN: + if( event->type==SDL_MOUSEBUTTONDOWN && (event->button.button==4 || event->button.button==5) ) // mouse wheel + { + static int s_WheelPos = 0; + if( event->button.button==4 ) + ++s_WheelPos; + else + --s_WheelPos; + handled = TwMouseWheel(s_WheelPos); + } + else + handled = TwMouseButton((event->type==SDL_MOUSEBUTTONUP)?TW_MOUSE_RELEASED:TW_MOUSE_PRESSED, (TwMouseButtonID)event->button.button); + break; + case SDL_VIDEORESIZE: + // tell the new size to TweakBar + TwWindowSize(event->resize.w, event->resize.h); + // do not set 'handled', SDL_VIDEORESIZE may be also processed by the calling application + break; + } + + return handled; +} diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSDL13.c ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSDL13.c --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSDL13.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSDL13.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,129 @@ +// --------------------------------------------------------------------------- +// +// @file TwEventSDL13.c +// @brief Helper: +// translate and re-send mouse and keyboard events +// from SDL 1.3 event loop to AntTweakBar +// +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "MiniSDL13.h" // a subset of SDL.h needed to compile TwEventSDL.c +// note: AntTweakBar.dll does not need to link with SDL, +// it just needs some definitions for its helper functions. + +#include + + +// The way SDL handles keyboard events has changed between version 1.2 +// and 1.3. It is now more difficult to translate SDL keyboard events to +// AntTweakBar events. The following code is an attempt to do so, but +// it is rather complex and not always accurate (eg, CTRL+1 is not handled). +// If someone knows a better and more robust way to do the keyboard events +// translation, please let me know. + +// TwEventSDL returns zero if msg has not been handled, +// and a non-zero value if it has been handled by the AntTweakBar library. +int TW_CALL TwEventSDL13(const void *sdlEvent) +{ + int handled = 0; + static int s_KeyMod = 0; + const SDL_Event *event = (const SDL_Event *)sdlEvent; + + if( event==NULL ) + return 0; + + switch( event->type ) + { + case SDL_TEXTINPUT: + if( event->text.text[0]!=0 && event->text.text[1]==0 ) + { + if( s_KeyMod & TW_KMOD_CTRL && event->text.text[0]<32 ) + handled = TwKeyPressed(event->text.text[0]+'a'-1, s_KeyMod); + else + { + if (s_KeyMod & KMOD_RALT) + s_KeyMod &= ~KMOD_CTRL; + handled = TwKeyPressed(event->text.text[0], s_KeyMod); + } + } + s_KeyMod = 0; + break; + case SDL_KEYDOWN: + if( event->key.keysym.sym & SDLK_SCANCODE_MASK ) + { + int key = 0; + switch( event->key.keysym.sym ) + { + case SDLK_UP: + key = TW_KEY_UP; + break; + case SDLK_DOWN: + key = TW_KEY_DOWN; + break; + case SDLK_RIGHT: + key = TW_KEY_RIGHT; + break; + case SDLK_LEFT: + key = TW_KEY_LEFT; + break; + case SDLK_INSERT: + key = TW_KEY_INSERT; + break; + case SDLK_HOME: + key = TW_KEY_HOME; + break; + case SDLK_END: + key = TW_KEY_END; + break; + case SDLK_PAGEUP: + key = TW_KEY_PAGE_UP; + break; + case SDLK_PAGEDOWN: + key = TW_KEY_PAGE_DOWN; + break; + default: + if( event->key.keysym.sym>=SDLK_F1 && event->key.keysym.sym<=SDLK_F12 ) + key = event->key.keysym.sym + TW_KEY_F1 - SDLK_F1; + } + if( key!=0 ) + handled = TwKeyPressed(key, event->key.keysym.mod); + } + else if( event->key.keysym.mod & TW_KMOD_ALT ) + handled = TwKeyPressed(event->key.keysym.sym & 0xFF, event->key.keysym.mod); + else + s_KeyMod = event->key.keysym.mod; + break; + case SDL_KEYUP: + s_KeyMod = 0; + break; + case SDL_MOUSEMOTION: + handled = TwMouseMotion(event->motion.x, event->motion.y); + break; + case SDL_MOUSEBUTTONUP: + case SDL_MOUSEBUTTONDOWN: + if( event->type==SDL_MOUSEBUTTONDOWN && (event->button.button==4 || event->button.button==5) ) // mouse wheel + { + static int s_WheelPos = 0; + if( event->button.button==4 ) + ++s_WheelPos; + else + --s_WheelPos; + handled = TwMouseWheel(s_WheelPos); + } + else + handled = TwMouseButton((event->type==SDL_MOUSEBUTTONUP)?TW_MOUSE_RELEASED:TW_MOUSE_PRESSED, (TwMouseButtonID)event->button.button); + break; + case SDL_VIDEORESIZE: + // tell the new size to TweakBar + TwWindowSize(event->resize.w, event->resize.h); + // do not set 'handled', SDL_VIDEORESIZE may be also processed by the calling application + break; + } + + return handled; +} diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSDL.c ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSDL.c --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSDL.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSDL.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,43 @@ +// --------------------------------------------------------------------------- +// +// @file TwEventSDL.c +// @brief Helper: +// translate and re-send mouse and keyboard events +// from SDL event loop to AntTweakBar +// +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: AntTweakBar.dll does not need to link with SDL, +// it just needs some definitions for its helper functions. +// +// --------------------------------------------------------------------------- + +#include + +int TW_CALL TwEventSDL12(const void *sdlEvent); // implemented in TwEventSDL12.c +int TW_CALL TwEventSDL13(const void *sdlEvent); // implmeneted in TwEventSDL13.c +#ifdef __cplusplus + extern "C" { int TW_CALL TwSetLastError(const char *staticErrorMessage); } +#else + int TW_CALL TwSetLastError(const char *staticErrorMessage); +#endif // __cplusplus + + +// TwEventSDL returns zero if msg has not been handled or the SDL version +// is not supported, and a non-zero value if it has been handled by the +// AntTweakBar library. +int TW_CALL TwEventSDL(const void *sdlEvent, unsigned char majorVersion, unsigned char minorVersion) +{ + if (majorVersion < 1 || (majorVersion == 1 && minorVersion < 2)) + { + static const char *g_ErrBadSDLVersion = "Unsupported SDL version"; + TwSetLastError(g_ErrBadSDLVersion); + return 0; + } + else if (majorVersion == 1 && minorVersion == 2) + return TwEventSDL12(sdlEvent); + else // if( majorVersion==1 && minorVersion==3 ) + return TwEventSDL13(sdlEvent); // will probably not work for version > 1.3, but give it a chance +} diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSFML.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSFML.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSFML.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventSFML.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,173 @@ +// --------------------------------------------------------------------------- +// +// @file TwEventSFML.cpp +// @brief Helper: +// translate and re-send mouse and keyboard events +// from SFML 1.6 event loop to AntTweakBar +// +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "MiniSFML16.h" // a subset of SFML 1.6 headers needed to compile TwEventSFML.cpp +// note: AntTweakBar.dll does not need to link with SFML, +// it just needs some definitions for its helper functions. + +#include + + +// TwEventSFML returns zero if msg has not been handled, +// and a non-zero value if it has been handled by the AntTweakBar library. +int TW_CALL TwEventSFML(const void *sfmlEvent, unsigned char majorVersion, unsigned char minorVersion) +{ + // Assume version 1.6 (will possibly not work for version != 1.6, but give it a chance) + /* + if (majorVersion > 1 || (majorVersion == 1 && minorVersion > 6) + { + static const char *g_ErrBadSFMLVersion = "Unsupported SFML version"; + TwSetLastError(g_ErrBadSFMLVersion); + return 0; + } + */ + (void)majorVersion, (void)minorVersion; + + int handled = 0; + const sf::Event *event = (const sf::Event *)sfmlEvent; + TwMouseAction mouseAction; + int key = 0; + static int s_KMod = 0; + static bool s_PreventTextHandling = false; + static int s_WheelPos = 0; + + if (event == NULL) + return 0; + + switch (event->Type) + { + case sf::Event::KeyPressed: + s_PreventTextHandling = false; + s_KMod = 0; + if (event->Key.Shift) s_KMod |= TW_KMOD_SHIFT; + if (event->Key.Alt) s_KMod |= TW_KMOD_ALT; + if (event->Key.Control) s_KMod |= TW_KMOD_CTRL; + key = 0; + switch (event->Key.Code) + { + case sf::Key::Escape: + key = TW_KEY_ESCAPE; + break; + case sf::Key::Return: + key = TW_KEY_RETURN; + break; + case sf::Key::Tab: + key = TW_KEY_TAB; + break; + case sf::Key::Back: + key = TW_KEY_BACKSPACE; + break; + case sf::Key::PageUp: + key = TW_KEY_PAGE_UP; + break; + case sf::Key::PageDown: + key = TW_KEY_PAGE_DOWN; + break; + case sf::Key::Up: + key = TW_KEY_UP; + break; + case sf::Key::Down: + key = TW_KEY_DOWN; + break; + case sf::Key::Left: + key = TW_KEY_LEFT; + break; + case sf::Key::Right: + key = TW_KEY_RIGHT; + break; + case sf::Key::End: + key = TW_KEY_END; + break; + case sf::Key::Home: + key = TW_KEY_HOME; + break; + case sf::Key::Insert: + key = TW_KEY_INSERT; + break; + case sf::Key::Delete: + key = TW_KEY_DELETE; + break; + case sf::Key::Space: + key = TW_KEY_SPACE; + break; + default: + if (event->Key.Code >= sf::Key::F1 && event->Key.Code <= sf::Key::F15) + key = TW_KEY_F1 + event->Key.Code - sf::Key::F1; + else if (s_KMod & TW_KMOD_ALT) + { + if (event->Key.Code >= sf::Key::A && event->Key.Code <= sf::Key::Z) + { + if (s_KMod & TW_KMOD_SHIFT) + key = 'A' + event->Key.Code - sf::Key::A; + else + key = 'a' + event->Key.Code - sf::Key::A; + } + } + } + if (key != 0) + { + handled = TwKeyPressed(key, s_KMod); + s_PreventTextHandling = true; + } + break; + case sf::Event::KeyReleased: + s_PreventTextHandling = false; + s_KMod = 0; + break; + case sf::Event::TextEntered: + if (!s_PreventTextHandling && event->Text.Unicode != 0 && (event->Text.Unicode & 0xFF00) == 0) + { + if ((event->Text.Unicode & 0xFF) < 32) // CTRL+letter + handled = TwKeyPressed((event->Text.Unicode & 0xFF)+'a'-1, TW_KMOD_CTRL|s_KMod); + else + handled = TwKeyPressed(event->Text.Unicode & 0xFF, 0); + } + s_PreventTextHandling = false; + break; + case sf::Event::MouseMoved: + handled = TwMouseMotion(event->MouseMove.X, event->MouseMove.Y); + break; + case sf::Event::MouseButtonPressed: + case sf::Event::MouseButtonReleased: + mouseAction = (event->Type==sf::Event::MouseButtonPressed) ? TW_MOUSE_PRESSED : TW_MOUSE_RELEASED; + switch (event->MouseButton.Button) + { + case sf::Mouse::Left: + handled = TwMouseButton(mouseAction, TW_MOUSE_LEFT); + break; + case sf::Mouse::Middle: + handled = TwMouseButton(mouseAction, TW_MOUSE_MIDDLE); + break; + case sf::Mouse::Right: + handled = TwMouseButton(mouseAction, TW_MOUSE_RIGHT); + break; + default: + break; + } + break; + case sf::Event::MouseWheelMoved: + s_WheelPos += event->MouseWheel.Delta; + handled = TwMouseWheel(s_WheelPos); + break; + case sf::Event::Resized: + // tell the new size to TweakBar + TwWindowSize(event->Size.Width, event->Size.Height); + // do not set 'handled', sf::Event::Resized may be also processed by the client application + break; + default: + break; + } + + return handled; +} diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventWin.c ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventWin.c --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventWin.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwEventWin.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,256 @@ +// --------------------------------------------------------------------------- +// +// @file TwEventWin.c +// @brief Helper: +// translate and re-send mouse and keyboard events +// from Windows message proc to AntTweakBar +// +// @author Philippe Decaudin - http://www.antisphere.com +// @date 2006/05/10 +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + +#include + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#include + +// Mouse wheel support +#if !defined WM_MOUSEWHEEL +# define WM_MOUSEWHEEL 0x020A +#endif // WM_MOUSEWHEEL +#if !defined WHEEL_DELTA +#define WHEEL_DELTA 120 +#endif // WHEEL_DELTA + +#ifdef _WIN64 +#define PARAM_INT __int64 +#else +#define PARAM_INT int +#endif + +// TwEventWin returns zero if msg has not been handled, +// and a non-zero value if it has been handled by the AntTweakBar library. +int TW_CALL TwEventWin(void *wnd, unsigned int msg, unsigned PARAM_INT _W64 wParam, PARAM_INT _W64 lParam) +{ + int handled = 0; + static unsigned PARAM_INT s_PrevKeyDown = 0; + static PARAM_INT s_PrevKeyDownMod = 0; + static int s_PrevKeyDownHandled = 0; + + switch( msg ) + { + case WM_MOUSEMOVE: + // send signed! mouse coordinates + handled = TwMouseMotion((short)LOWORD(lParam), (short)HIWORD(lParam)); + break; + case WM_LBUTTONDOWN: + case WM_LBUTTONDBLCLK: + SetCapture(wnd); + handled = TwMouseButton(TW_MOUSE_PRESSED, TW_MOUSE_LEFT); + break; + case WM_LBUTTONUP: + ReleaseCapture(); + handled = TwMouseButton(TW_MOUSE_RELEASED, TW_MOUSE_LEFT); + break; + case WM_MBUTTONDOWN: + case WM_MBUTTONDBLCLK: + SetCapture(wnd); + handled = TwMouseButton(TW_MOUSE_PRESSED, TW_MOUSE_MIDDLE); + break; + case WM_MBUTTONUP: + ReleaseCapture(); + handled = TwMouseButton(TW_MOUSE_RELEASED, TW_MOUSE_MIDDLE); + break; + case WM_RBUTTONDOWN: + case WM_RBUTTONDBLCLK: + SetCapture(wnd); + handled = TwMouseButton(TW_MOUSE_PRESSED, TW_MOUSE_RIGHT); + break; + case WM_RBUTTONUP: + ReleaseCapture(); + handled = TwMouseButton(TW_MOUSE_RELEASED, TW_MOUSE_RIGHT); + break; + case WM_CHAR: + case WM_SYSCHAR: + { + int key = (int)(wParam&0xff); + int kmod = 0; + + if( GetAsyncKeyState(VK_SHIFT)<0 ) + kmod |= TW_KMOD_SHIFT; + if( GetAsyncKeyState(VK_CONTROL)<0 ) + { + kmod |= TW_KMOD_CTRL; + if( key>0 && key<27 ) + key += 'a'-1; + } + if( GetAsyncKeyState(VK_MENU)<0 ) + kmod |= TW_KMOD_ALT; + if( key>0 && key<256 ) + handled = TwKeyPressed(key, kmod); + } + break; + case WM_KEYDOWN: + case WM_SYSKEYDOWN: + { + int kmod = 0; + int testkp = 0; + int k = 0; + + if( GetAsyncKeyState(VK_SHIFT)<0 ) + kmod |= TW_KMOD_SHIFT; + if( GetAsyncKeyState(VK_CONTROL)<0 ) + { + kmod |= TW_KMOD_CTRL; + testkp = 1; + } + if( GetAsyncKeyState(VK_MENU)<0 ) + { + kmod |= TW_KMOD_ALT; + testkp = 1; + } + if( wParam>=VK_F1 && wParam<=VK_F15 ) + k = TW_KEY_F1 + ((int)wParam-VK_F1); + else if( testkp && wParam>=VK_NUMPAD0 && wParam<=VK_NUMPAD9 ) + k = '0' + ((int)wParam-VK_NUMPAD0); + else + { + switch( wParam ) + { + case VK_UP: + k = TW_KEY_UP; + break; + case VK_DOWN: + k = TW_KEY_DOWN; + break; + case VK_LEFT: + k = TW_KEY_LEFT; + break; + case VK_RIGHT: + k = TW_KEY_RIGHT; + break; + case VK_INSERT: + k = TW_KEY_INSERT; + break; + case VK_DELETE: + k = TW_KEY_DELETE; + break; + case VK_PRIOR: + k = TW_KEY_PAGE_UP; + break; + case VK_NEXT: + k = TW_KEY_PAGE_DOWN; + break; + case VK_HOME: + k = TW_KEY_HOME; + break; + case VK_END: + k = TW_KEY_END; + break; + case VK_DIVIDE: + if( testkp ) + k = '/'; + break; + case VK_MULTIPLY: + if( testkp ) + k = '*'; + break; + case VK_SUBTRACT: + if( testkp ) + k = '-'; + break; + case VK_ADD: + if( testkp ) + k = '+'; + break; + case VK_DECIMAL: + if( testkp ) + k = '.'; + break; + default: + if( (kmod&TW_KMOD_CTRL) && (kmod&TW_KMOD_ALT) ) + k = MapVirtualKey( (UINT)wParam, 2 ) & 0x0000FFFF; + } + } + if( k!=0 ) + handled = TwKeyPressed(k, kmod); + else + { + // if the key will be handled at next WM_CHAR report this event as handled + int key = (int)(wParam&0xff); + if( kmod&TW_KMOD_CTRL && key>0 && key<27 ) + key += 'a'-1; + if( key>0 && key<256 ) + handled = TwKeyTest(key, kmod); + } + s_PrevKeyDown = wParam; + s_PrevKeyDownMod = kmod; + s_PrevKeyDownHandled = handled; + } + break; + case WM_KEYUP: + case WM_SYSKEYUP: + { + int kmod = 0; + if( GetAsyncKeyState(VK_SHIFT)<0 ) + kmod |= TW_KMOD_SHIFT; + if( GetAsyncKeyState(VK_CONTROL)<0 ) + kmod |= TW_KMOD_CTRL; + if( GetAsyncKeyState(VK_MENU)<0 ) + kmod |= TW_KMOD_ALT; + // if the key has been handled at previous WM_KEYDOWN report this event as handled + if( s_PrevKeyDown==wParam && s_PrevKeyDownMod==kmod ) + handled = s_PrevKeyDownHandled; + else + { + // if the key would have been handled report this event as handled + int key = (int)(wParam&0xff); + if( kmod&TW_KMOD_CTRL && key>0 && key<27 ) + key += 'a'-1; + if( key>0 && key<256 ) + handled = TwKeyTest(key, kmod); + } + // reset previous keydown + s_PrevKeyDown = 0; + s_PrevKeyDownMod = 0; + s_PrevKeyDownHandled = 0; + } + break; + case WM_MOUSEWHEEL: + { + static int s_WheelPos = 0; + s_WheelPos += ((short)HIWORD(wParam))/WHEEL_DELTA; + handled = TwMouseWheel(s_WheelPos); + } + break; + case WM_SIZE: + // tell the new size to AntTweakBar + TwWindowSize(LOWORD(lParam), HIWORD(lParam)); + // do not set 'handled', WM_SIZE may be also processed by the calling application + break; + } + + if( handled ) + // Event has been handled by AntTweakBar, so we invalidate the window + // content to send a WM_PAINT which will redraw the tweak bar(s). + InvalidateRect(wnd, NULL, FALSE); + + return handled; +} + + +// For compatibility with AntTweakBar versions prior to 1.11 +#undef TwEventWin32 +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus +TW_EXPORT_API int TW_CALL TwEventWin32(void *wnd, unsigned int msg, unsigned int _W64 wParam, int _W64 lParam) +{ + return TwEventWin(wnd, msg, wParam, lParam); +} +#ifdef __cplusplus +} +#endif // __cplusplus diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,3944 @@ +// --------------------------------------------------------------------------- +// +// @file TwFonts.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include "TwMgr.h" +#include "TwFonts.h" + +// Fedora patch: memset() +using std::memset; + +// --------------------------------------------------------------------------- + +CTexFont::CTexFont() +{ + for( int i=0; i<256; ++i ) + { + m_CharU0[i] = 0; + m_CharU1[i] = 0; + m_CharV0[i] = 0; + m_CharV1[i] = 0; + m_CharWidth[i] = 0; + } + m_TexWidth = 0; + m_TexHeight = 0; + m_TexBytes = NULL; + m_NbCharRead = 0; + m_CharHeight = 0; +} + +// --------------------------------------------------------------------------- + +CTexFont::~CTexFont() +{ + if( m_TexBytes ) + delete[] m_TexBytes; + m_TexBytes = NULL; + m_TexWidth = 0; + m_TexHeight = 0; + m_NbCharRead = 0; +} + +// --------------------------------------------------------------------------- + +static int NextPow2(int _n) +{ + int r = 1; + while( r<_n ) + r *= 2; + return r; +} + +// --------------------------------------------------------------------------- + +const char *g_ErrBadFontHeight = "Cannot determine font height while reading font bitmap (check first pixel column)"; + +CTexFont *TwGenerateFont(const unsigned char *_Bitmap, int _BmWidth, int _BmHeight) +{ + // find height of the font + int x, y; + int h = 0, hh = 0; + int r, NbRow = 0; + for( y=0; y<_BmHeight; ++y ) + if( _Bitmap[y*_BmWidth]==0 ) + { + if( (hh<=0 && h<=0) || (h!=hh && h>0 && hh>0) ) + { + g_TwMgr->SetLastError(g_ErrBadFontHeight); + return NULL; + } + else if( h<=0 ) + h = hh; + else if( hh<=0 ) + break; + hh = 0; + ++NbRow; + } + else + ++hh; + + // find width and position of each character + int w = 0; + int x0[224], y0[224], x1[224], y1[224]; + int ch = 32; + int start; + for( r=0; rlmax ) + lmax = l; + } + // A little empty margin is added between chars to avoid artefact when antialiasing is on + const int MARGIN_X = 2; + const int MARGIN_Y = 2; + lmax += 16*MARGIN_X; + // - Second, build the texture + CTexFont *TexFont = new CTexFont; + TexFont->m_NbCharRead = ch-32; + TexFont->m_CharHeight = h; + TexFont->m_TexWidth = NextPow2(lmax); + TexFont->m_TexHeight = NextPow2(14*(h+MARGIN_Y)); + TexFont->m_TexBytes = new unsigned char[TexFont->m_TexWidth*TexFont->m_TexHeight]; + memset(TexFont->m_TexBytes, 0, TexFont->m_TexWidth*TexFont->m_TexHeight); + int xx; + float du = 0.4f; + float dv = 0.4f; + assert( g_TwMgr!=NULL ); + if( g_TwMgr ) + { + if( g_TwMgr->m_GraphAPI==TW_OPENGL || g_TwMgr->m_GraphAPI==TW_OPENGL_CORE ) + { + du = 0; + dv = 0; + } + else // texel alignement for D3D + { + du = 0.5f; + dv = 0.5f; + } + } + float alpha; + for( r=0; r<14; ++r ) + for( xx=0, ch=r*16; ch<(r+1)*16; ++ch ) + if( y1[ch]-y0[ch]==h-1 ) + { + for( y=0; ym_TexBytes[(xx+x-x0[ch])+(r*(h+MARGIN_Y)+y)*TexFont->m_TexWidth] = (unsigned char)(alpha*256.0f); + } + TexFont->m_CharU0[ch+32] = (float(xx)+du)/float(TexFont->m_TexWidth); + xx += x1[ch]-x0[ch]+1; + TexFont->m_CharU1[ch+32] = (float(xx)+du)/float(TexFont->m_TexWidth); + TexFont->m_CharV0[ch+32] = (float(r*(h+MARGIN_Y))+dv)/float(TexFont->m_TexHeight); + TexFont->m_CharV1[ch+32] = (float(r*(h+MARGIN_Y)+h)+dv)/float(TexFont->m_TexHeight); + TexFont->m_CharWidth[ch+32] = x1[ch]-x0[ch]+1; + xx += MARGIN_X; + } + + const unsigned char Undef = 127; // default character used as for undifined ones (having ascii codes from 0 to 31) + for( ch=0; ch<32; ++ch ) + { + TexFont->m_CharU0[ch] = TexFont->m_CharU0[Undef]; + TexFont->m_CharU1[ch] = TexFont->m_CharU1[Undef]; + TexFont->m_CharV0[ch] = TexFont->m_CharV0[Undef]; + TexFont->m_CharV1[ch] = TexFont->m_CharV1[Undef]; + TexFont->m_CharWidth[ch] = TexFont->m_CharWidth[Undef]/2; + } + + return TexFont; +} + +// --------------------------------------------------------------------------- + +CTexFont *g_DefaultSmallFont = NULL; +CTexFont *g_DefaultNormalFont = NULL; +CTexFont *g_DefaultLargeFont = NULL; + +// Small font +const int FONT0_BM_W = 211; +const int FONT0_BM_H = 84; +static const unsigned char s_Font0[] = +{ + 127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0, + 0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,255,0,0,0,255,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,255,0,255,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,0,0,255,255,0,0, + 0,255,0,0,0,0,255,255,0,0,0,255,0,0,255,0,0,255,0,0,255,0,255,0,255,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,255,0,0,0,255,0,0,255,255, + 255,0,0,255,255,255,0,0,0,0,0,255,0,255,255,255,255,0,0,255,255,0,0,255, + 255,255,255,0,0,255,255,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,127,0,0,0,0,255,0,255,0,255,0,0,0,255,0,0,255,0,0,255,255,255,255, + 0,255,0,0,255,0,255,0,0,0,0,255,0,0,255,0,0,255,0,255,0,0,0,0,255,0,0,255, + 255,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,255,0,255, + 255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,255,255,0,255,0,0,0,0,255,0,0,0,0,0, + 0,0,255,0,255,0,0,255,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,255,0,0,0,0,0,0,255,255,255,255,255,255,255,0,255,0,0,0,255,0,0, + 255,0,255,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,255,0,255,0,255,0,255, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0, + 0,0,255,0,0,0,0,255,0,0,255,0,255,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0, + 255,0,0,255,0,255,0,0,255,0,0,255,0,0,255,0,0,0,0,0,255,255,0,0,0,0,0,0, + 0,0,0,255,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 127,0,0,0,0,255,0,0,0,0,0,0,0,255,0,255,0,0,0,255,255,0,0,0,0,255,255,0, + 255,0,255,255,0,0,0,255,255,0,255,0,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0, + 0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,255,0,0,255, + 0,0,0,0,255,0,0,0,255,255,0,0,255,0,0,255,0,255,255,255,0,0,255,255,255, + 0,0,0,0,255,0,0,0,255,255,0,0,0,255,255,255,0,0,255,0,0,255,0,0,0,255,255, + 0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,255,0,0,0,0,0,255,255,255,255,255, + 255,0,0,0,255,255,0,0,0,0,0,255,0,255,0,0,255,0,255,0,0,255,0,0,0,0,255, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,255,0,0,0,0,0,255,0, + 0,255,0,0,255,0,0,255,0,0,0,255,0,0,0,0,0,0,255,0,255,255,255,255,255,0, + 0,0,255,0,255,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,0,0, + 0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0, + 255,0,255,0,0,0,0,255,0,255,0,0,255,0,255,0,0,255,255,0,0,0,255,0,0,0,0, + 255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,255,0, + 0,255,0,0,255,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,255,0, + 0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,0,255,0,0,255,0,0,255,0,0,0,255,255, + 0,0,0,255,255,255,255,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,255,0,0,0,0,0,0,255,0,0,255,0,0,255, + 255,255,255,0,0,0,0,255,0,0,0,255,255,0,0,0,255,255,0,0,255,0,0,255,0,0, + 0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,255,0,0,0,0,255, + 255,0,0,255,255,255,0,255,255,255,255,0,255,255,255,0,0,0,0,0,255,0,255, + 255,255,0,0,0,255,255,0,0,255,0,0,0,0,0,255,255,0,0,0,255,255,0,0,0,255, + 0,0,255,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,255,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,0,127,0,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127, + 127,127,127,0,127,127,127,127,127,0,127,0,127,127,0,127,127,127,0,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,0,127,127,127,0,127,0,127, + 127,127,0,127,127,127,127,0,127,127,127,0,127,127,127,127,0,127,127,127, + 127,0,127,127,127,127,0,127,127,127,127,0,127,127,127,127,0,127,127,127, + 127,0,127,127,127,127,0,127,127,127,127,0,127,127,0,127,127,0,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,255,0,0,0,255,255,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,255,255,255,0,0,0,0,0, + 255,255,0,0,0,255,255,255,0,0,0,0,0,255,255,255,0,0,255,255,255,255,0,0, + 0,255,255,255,255,255,0,255,255,255,255,255,0,0,0,255,255,255,0,0,255,0, + 0,0,0,255,0,255,255,255,0,0,255,255,0,255,0,0,0,255,0,255,0,0,0,255,255, + 0,0,0,255,255,0,255,0,0,0,0,255,0,0,0,255,255,255,0,0,0,255,255,255,255, + 0,0,0,0,255,255,255,0,0,0,255,255,255,255,0,0,0,255,255,255,255,0,255,255, + 255,255,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,255,0,0,255,0, + 255,0,0,255,0,255,0,0,0,255,0,255,255,255,255,0,255,0,0,255,0,0,0,0,255, + 0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,255,0, + 0,0,255,0,0,0,0,255,255,0,0,0,255,0,0,255,0,0,0,255,0,0,0,255,0,255,0,0, + 0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0,255, + 0,0,255,0,0,0,0,255,0,255,0,0,255,0,0,255,0,0,0,255,255,0,0,0,255,255,0, + 255,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,255, + 0,0,255,0,0,0,255,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,255,0, + 0,0,0,255,0,255,0,0,255,0,0,255,0,255,0,0,255,0,0,255,0,255,0,0,0,0,0,255, + 0,255,0,0,0,255,0,0,0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,127,255,0,0,255,255,0,255,0,0,255,0,0,255,0,0,255,0,0,255, + 0,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0, + 0,0,0,0,0,255,0,0,0,0,255,0,0,255,0,0,0,0,255,0,255,0,255,0,0,0,255,0,0, + 0,255,0,255,0,255,0,255,0,255,0,255,0,0,255,0,255,0,0,0,0,0,255,0,255,0, + 0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,0,0,0,0,255,0,0, + 0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,255,0,255,0,255,0,0,255,255, + 0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,0,0,255,0,0,0,255,0,255,0,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255,0,255,0,255,0,255, + 0,0,255,0,0,255,0,0,255,255,255,255,0,0,255,0,0,0,0,0,0,255,0,0,0,0,255, + 0,255,255,255,255,0,0,255,255,255,255,0,0,255,0,0,255,255,255,0,255,255, + 255,255,255,255,0,0,255,0,0,0,0,255,0,255,255,0,0,0,0,255,0,0,0,255,0,255, + 0,255,0,255,0,255,0,0,255,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,255,0,255, + 0,0,0,0,0,255,0,255,255,255,255,0,0,0,255,255,255,0,0,0,0,255,0,0,0,255, + 0,0,0,0,255,0,0,255,0,0,255,0,0,255,0,255,0,255,0,255,0,0,255,255,0,0,0, + 0,255,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255,0,255,0,255,0,255,0,255,255,255, + 255,255,255,0,255,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0, + 0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,0,0,0,255, + 0,255,0,255,0,0,0,255,0,0,0,255,0,0,255,0,0,255,0,255,0,0,0,255,255,0,255, + 0,0,0,0,0,255,0,255,255,255,255,0,0,255,0,0,0,0,0,255,0,255,0,255,0,0,0, + 0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,255,0,0,255,0,0,255,0,255, + 0,255,0,255,0,0,255,255,0,0,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255, + 0,0,255,255,255,0,0,255,0,0,0,0,255,0,255,0,0,0,255,0,0,255,0,0,0,255,0, + 255,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,255,0,0, + 0,0,255,0,0,255,0,0,0,0,255,0,255,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0, + 255,0,255,0,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,0,0,0,255,0,0,0,255, + 0,0,255,0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,255, + 255,0,0,0,0,255,0,0,0,255,0,0,255,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,255, + 0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,127,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,255,255,255,255,0,0,0,0,255, + 255,255,0,0,255,255,255,255,0,0,0,255,255,255,255,255,0,255,0,0,0,0,0,0, + 0,255,255,255,255,0,255,0,0,0,0,255,0,255,255,255,0,255,255,0,0,255,0,0, + 0,255,0,255,255,255,255,255,0,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,255,255, + 255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,0,0,0,255,0,0,0,255,0,255,255,255, + 255,0,0,0,0,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,0,0,0,0,255,0,0, + 0,255,0,0,255,0,0,255,0,0,0,255,0,0,0,255,255,255,255,0,255,0,0,0,0,255, + 0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0, + 0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0, + 0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, + 0,0,0,0,0,255,255,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 0,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127, + 0,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,0, + 127,127,127,127,127,127,0,127,127,127,0,127,127,127,0,127,127,127,127,127, + 0,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0, + 127,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127, + 127,127,0,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,0,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,0,127, + 127,0,127,127,127,0,127,127,0,127,127,127,127,127,0,127,127,127,127,127, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,127,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0, + 0,0,255,0,0,0,0,0,0,0,255,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,255,0,0,0,0,0,0,0,255,0,0, + 0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0, + 255,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,4,4, + 4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0, + 0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0, + 0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,4,4,4,4,12,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 127,0,0,0,0,0,255,255,0,0,255,255,255,0,0,0,255,255,0,0,255,255,255,0,0, + 255,255,0,0,255,255,255,0,255,255,255,0,255,255,255,0,0,255,0,255,255,0, + 255,0,0,255,0,255,0,255,255,255,0,255,255,0,0,255,255,255,0,0,0,255,255, + 0,0,255,255,255,0,0,0,255,255,255,0,255,0,255,255,255,255,0,255,255,0,255, + 0,0,255,0,255,0,0,0,255,0,255,0,0,255,0,0,255,0,255,0,255,0,255,0,0,0,255, + 0,255,255,255,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,4,4,4,4,0, + 255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0, + 255,0,255,0,0,255,0,255,0,0,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0, + 0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,255,0,0,255,0,255,0,0,255,0,0, + 255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,255,0, + 255,0,0,0,255,0,0,255,0,0,255,0,0,255,0,255,0,0,255,0,0,255,0,0,255,0,0, + 255,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,255, + 0,0,255,0,0,255,4,4,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,127,0,0,0,0,0,255,255,255,0,255,0,0,255,0,255,0,0,0,255,0,0,255,0, + 255,255,255,255,0,255,0,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255, + 255,0,0,0,255,0,255,0,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0, + 0,255,0,255,0,0,255,0,255,0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,255, + 0,0,255,0,255,0,255,0,255,0,0,255,0,0,0,255,0,255,0,0,0,255,0,0,255,0,0, + 0,0,255,0,0,0,0,255,0,255,0,0,255,255,0,0,0,255,255,4,255,255,0,4,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,255,0,0,255,0,255,0, + 0,255,0,255,0,0,0,255,0,0,255,0,255,0,0,0,0,255,0,0,255,0,0,255,0,255,0, + 0,255,0,255,0,0,255,0,255,0,255,0,0,255,0,255,0,0,255,0,0,255,0,255,0,0, + 255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,0,0,255,0,255,0, + 0,255,0,0,255,0,0,255,0,255,0,0,0,255,255,0,255,255,0,0,0,255,0,0,0,255, + 0,255,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255, + 255,255,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0, + 0,255,255,255,0,255,255,255,0,0,0,255,255,0,0,255,255,255,0,0,255,255,255, + 0,255,0,0,0,255,255,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255, + 0,255,0,0,255,0,0,255,0,255,0,0,255,0,0,255,255,0,0,255,255,255,0,0,0,255, + 255,255,0,255,0,0,255,255,255,0,0,255,0,0,255,255,255,0,0,0,255,0,0,0,0, + 255,0,0,0,255,0,0,255,0,255,0,0,0,255,0,0,0,255,255,255,0,0,255,0,0,0,255, + 0,0,0,255,0,0,0,0,0,0,0,0,0,0,20,0,255,0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,255, + 0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,4,4,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,0,127,127,127,127,0, + 127,127,127,127,0,127,127,127,0,127,127,127,127,0,127,127,127,127,0,127, + 127,0,127,127,127,127,0,127,127,127,127,0,127,0,127,127,0,127,127,127,127, + 0,127,0,127,127,127,127,127,127,127,0,127,127,127,127,0,127,127,127,127, + 0,127,127,127,127,0,127,127,127,127,0,127,127,0,127,127,127,0,127,127,0, + 127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127, + 127,127,0,127,127,127,127,127,0,127,127,127,0,127,127,127,0,127,127,127, + 0,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0, + 255,255,0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, + 0,255,0,0,0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,255,255,255,0,0,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,0,0,0, + 0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,255,255,0,0, + 0,255,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,255,255,255,255,255,255,255, + 0,0,255,255,255,255,255,255,255,0,255,255,255,255,0,0,255,255,255,255,255, + 255,255,0,0,255,255,255,255,255,255,255,0,255,0,0,255,255,0,255,0,0,255, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,255,255,255,255,0,255, + 0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,0, + 0,255,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0, + 255,255,255,255,255,0,255,255,255,255,255,0,0,0,0,0,0,255,0,0,255,0,255, + 0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0, + 255,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,255,255, + 0,0,255,0,255,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 255,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255, + 0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 255,255,255,255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,255,0,255,0,0,0,0,0, + 0,0,255,0,0,0,0,0,0,255,0,255,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0, + 0,255,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,255,0, + 255,255,255,0,255,0,0,0,255,255,0,255,255,0,0,0,255,0,0,0,0,0,255,0,255, + 255,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,255,255,0,255,0,255, + 255,0,255,255,0,0,0,255,255,255,0,0,255,0,0,255,0,0,0,255,255,255,255,0, + 0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,0, + 255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,255,0,0,255,0,0,255,0, + 0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,255,255,255,255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,0,255, + 0,0,255,0,0,255,0,0,0,0,0,255,0,255,0,0,255,0,0,0,255,0,0,0,0,0,255,0,0, + 0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0, + 0,0,0,0,0,0,0,0,0,0,255,255,255,0,255,255,255,255,0,255,255,255,255,255, + 255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,255,0,0,255,255, + 255,255,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,255, + 0,0,255,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,255,0,255,0,0,255,0,0,255,0,0,0,0,0,255,0,0,255,0,255,0,0,0,255, + 0,0,0,0,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,0,0,255,0,0,255,0,0,0,0,0, + 255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,127,0,255,255,255,0,0,255,255,255,255,255,255,255,0,0,255, + 0,255,0,0,0,0,255,0,255,0,255,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,255,0,0,0,255,255,0,255,255,0,0,255,255,255,255,0,0,0,0,0,0,255, + 255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,0,255,255,255,255, + 0,0,255,255,255,255,255,255,255,0,0,255,255,255,255,255,255,255,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,255,255,255,0,0,0,0,0,255,255,0,255,255,255,0,0,255,255,255,255,255, + 255,255,0,255,255,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,255,0,0,0,255,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,0,127,127, + 127,127,0,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,0, + 127,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,0,127,127,0,127,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,0,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,0,127,0,127, + 127,127,0,127,127,127,0,127,127,127,0,127,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 0,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 0,127,127,127,0,127,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,127,0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,255,0,0,0,0,0,0,0,255,0, + 0,0,255,0,255,0,0,255,255,255,0,0,255,0,255,0,0,0,255,255,255,255,0,0,255, + 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0, + 0,255,0,0,0,0,0,0,0,0,0,0,255,255,255,0,255,255,255,0,0,255,0,0,0,0,0,0, + 0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,255,0,0,0,0,0,0,0,0,255, + 0,0,255,0,0,0,0,0,255,0,0,0,255,0,0,0,255,255,255,0,0,255,0,0,0,0,255,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0, + 0,255,0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,255,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,255, + 0,0,0,0,255,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,255,0,255, + 0,0,0,0,0,0,0,0,0,0,255,255,0,255,0,0,255,0,0,0,0,0,0,255,255,0,255,0,0, + 0,0,0,255,255,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 127,0,0,0,0,0,255,0,0,255,255,255,0,0,255,0,0,0,0,255,255,255,0,0,0,255, + 0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,255,0,0,255,255,0,0,255,255,0,255, + 0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,255,0,255,255,255,0,0,255,0,0,0,0,0, + 0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,255, + 255,0,255,0,0,0,0,0,0,0,0,0,0,0,255,0,255,0,0,255,0,255,0,255,0,0,0,255, + 0,255,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,0,0,0,0,0,255,0,255,0,255,0,0,255,255,255,0,0,0,255,0,255, + 0,0,0,0,255,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,255,0,255,0,0,0,0,255,0, + 255,255,0,255,0,255,0,0,0,255,255,255,255,255,0,0,0,0,255,0,255,0,0,255, + 0,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,255,255,255,0,255,255, + 0,0,0,0,0,0,255,0,0,255,0,255,255,0,255,0,0,255,0,0,0,0,0,0,0,255,255,255, + 0,255,255,0,0,0,255,0,255,0,0,255,255,0,0,255,255,0,0,0,255,0,255,0,255, + 255,0,0,255,255,0,255,0,255,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0, + 255,0,255,0,255,0,0,0,255,0,0,0,0,255,255,255,0,0,0,255,255,255,0,0,0,0, + 255,0,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0, + 0,0,0,255,0,255,255,0,255,0,255,255,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0, + 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,255,0,255,0,0,255,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,0,0,0,255,0,255,0,255,0,0,0,0,255, + 0,0,0,0,255,0,0,0,255,0,255,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0, + 0,255,0,255,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0, + 255,255,255,0,0,0,0,0,0,255,0,0,255,255,0,0,255,0,0,0,0,0,255,0,255,0,0, + 0,0,0,0,255,0,0,0,0,255,0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,255,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,0,255,0,0,0,0,255,0,255,255,255,255,0,0,0,255, + 0,0,0,255,0,0,0,0,255,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0, + 0,0,0,255,0,0,255,255,255,0,255,255,255,255,0,0,0,0,0,0,0,0,0,255,0,0,0, + 255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,255,255, + 255,0,0,255,0,0,0,0,255,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0, + 0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0, + 0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, + 255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,127,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, + 0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,127,127,127,127,0,127,0,127,127,127,127,0,127,127,127, + 127,0,127,127,127,127,127,0,127,127,127,127,127,0,127,0,127,127,127,127, + 0,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,0,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127,0,127,127,127, + 127,0,127,127,127,0,127,127,127,0,127,127,127,127,0,127,127,127,127,0,127, + 127,127,0,127,127,127,0,127,127,127,0,127,127,127,127,0,127,127,127,127, + 0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,0,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,255,0, + 0,0,0,0,255,0,0,0,0,0,0,255,0,255,0,0,0,255,0,255,255,0,0,0,255,0,0,255, + 0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255, + 0,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0,0,0,255,0,0,255,0,255,0,255, + 0,255,0,0,0,0,0,0,0,0,0,255,0,255,255,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0, + 0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,255,0,0,0,0,255,0,255,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,255, + 0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,127,0,0,255,255, + 0,0,0,0,0,255,255,0,0,0,0,0,255,255,0,0,0,0,0,255,255,0,0,0,0,0,255,255, + 0,0,0,0,0,255,255,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,0,0,255, + 255,255,255,255,0,255,255,255,255,255,0,255,255,255,255,255,0,255,255,255, + 255,255,0,255,255,255,0,255,255,255,0,255,255,255,0,255,255,255,0,255,255, + 255,255,0,0,0,255,0,0,0,0,255,0,0,0,255,255,255,0,0,0,0,0,255,255,255,0, + 0,0,0,0,255,255,255,0,0,0,0,0,255,255,255,0,0,0,0,0,255,255,255,0,0,0,0, + 0,0,0,0,0,0,0,0,255,255,255,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0, + 255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,0,255,0,0, + 255,0,127,0,0,255,255,0,0,0,0,0,255,255,0,0,0,0,0,255,255,0,0,0,0,0,255, + 255,0,0,0,0,0,255,255,0,0,0,0,0,255,255,0,0,0,0,255,0,255,0,0,0,0,0,255, + 0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255, + 0,0,0,255,0,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,255,0,0,0,255,0, + 0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0, + 255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,255,0,0,0, + 0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,255, + 0,0,255,255,255,0,0,255,0,0,255,0,127,0,255,0,0,255,0,0,0,255,0,0,255,0, + 0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0, + 0,0,255,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0, + 0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,255,0,0,0, + 0,255,0,255,0,255,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255, + 0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,255,0,0,0,255, + 0,255,0,0,0,255,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0, + 255,0,255,0,0,0,0,255,0,0,255,0,255,0,0,255,0,0,255,0,255,0,255,0,0,127, + 0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0, + 0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,255,255,255,255,0,255,0,0,0, + 0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255, + 255,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,255,255,255,0,0,255, + 0,255,0,0,255,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0, + 0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,255,0,255,0,0,255, + 0,0,255,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0, + 255,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,255,0,255,0,0,255,0,127,255,255, + 255,255,255,255,0,255,255,255,255,255,255,0,255,255,255,255,255,255,0,255, + 255,255,255,255,255,0,255,255,255,255,255,255,0,255,255,255,255,255,255, + 0,0,255,255,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255, + 0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,255,0,0, + 0,0,255,0,255,0,0,0,255,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255, + 0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0, + 255,0,255,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255, + 0,255,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,255,0,255,0,0,255,0,127,255,0, + 0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0, + 0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,255,0,0,0,0,0,255,0,0,0,255,0,255, + 0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0, + 0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,0,255,0,0,255,0,0,0,255, + 0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0, + 0,0,255,0,0,0,0,255,0,255,0,0,0,255,0,0,0,255,0,0,255,0,0,0,0,255,0,255, + 0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,255,0,0,0,255,255, + 255,0,0,255,0,0,255,0,127,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0, + 0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,255, + 255,255,255,0,0,0,255,255,255,0,0,255,255,255,255,255,0,255,255,255,255, + 255,0,255,255,255,255,255,0,255,255,255,255,255,0,255,255,255,0,255,255, + 255,0,255,255,255,0,255,255,255,0,255,255,255,255,0,0,0,255,0,0,0,0,255, + 0,0,0,255,255,255,0,0,0,0,0,255,255,255,0,0,0,0,0,255,255,255,0,0,0,0,0, + 255,255,255,0,0,0,0,0,255,255,255,0,0,0,0,255,0,0,0,255,0,255,0,255,255, + 255,0,0,0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0,255,255,255,255, + 0,0,0,255,255,255,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,255,0,0,127,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,0,127, + 127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127, + 0,127,127,127,0,127,127,127,0,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127, + 127,0,127,127,127,127,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,127,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0,255,255,0,255,0, + 0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0, + 0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,255,255,0,255, + 0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0,255,255,0,255,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255, + 0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,255, + 0,0,0,0,255,0,0,0,255,0,255,0,255,0,255,255,0,0,255,0,255,0,0,255,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,255,0,255,0,0,255,0, + 255,0,0,255,0,255,0,255,0,255,255,0,255,0,0,255,255,0,255,0,255,255,0,0, + 0,255,0,0,0,0,255,0,0,0,255,0,255,0,255,0,255,255,0,255,0,0,255,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,255,0,255,0,0,255,0,255,0, + 0,0,255,0,0,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,127,0,255,255,0,0,0,255,255,0,0,0,255,255,0,0,0,255,255,0,0,0,255, + 255,0,0,0,255,255,0,0,255,255,255,0,255,255,0,0,0,255,255,0,0,255,255,0, + 0,0,255,255,0,0,0,255,255,0,0,0,255,255,0,0,0,255,0,255,0,0,255,0,0,255, + 0,0,0,0,255,0,255,255,255,0,0,0,255,255,0,0,0,255,255,0,0,0,255,255,0,0, + 0,255,255,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,0,0,255,0,0,255, + 0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,0,255,0,255,255,255, + 0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,255,0,0,0, + 0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,255, + 0,255,0,0,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,0,255, + 0,255,0,0,255,0,0,255,0,0,255,255,255,0,255,0,0,255,0,255,0,0,255,0,255, + 0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,0,255,255,255,255,255, + 0,255,0,0,255,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255, + 0,0,255,0,255,0,0,255,0,0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,127,0,255,255,255,0,0,255,255,255,0,0,255,255,255,0,0,255,255,255, + 0,0,255,255,255,0,0,255,255,255,0,0,255,255,255,255,255,255,0,255,0,0,0, + 255,255,255,255,0,255,255,255,255,0,255,255,255,255,0,255,255,255,255,0, + 0,255,0,255,0,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0, + 255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,0,0,0,0,0,0,0,255, + 0,255,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,0, + 255,0,255,0,0,255,0,0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,127,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0, + 255,0,255,0,0,255,0,255,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0, + 0,255,0,0,0,0,255,0,0,0,0,0,255,0,255,0,0,255,0,0,255,0,255,0,0,255,0,255, + 0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255,0, + 0,255,0,0,0,0,255,0,0,0,255,255,0,0,255,0,255,0,0,255,0,255,0,0,255,0,255, + 0,0,255,0,255,0,0,255,0,0,255,0,255,0,0,255,0,0,255,0,0,255,0,255,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,255,255,255,0,0,255,255,255,0,0,255, + 255,255,0,0,255,255,255,0,0,255,255,255,0,0,255,255,255,0,0,255,255,0,255, + 255,255,0,0,255,255,0,0,255,255,255,0,0,255,255,255,0,0,255,255,255,0,0, + 255,255,255,0,0,255,0,255,0,0,255,0,0,255,0,0,255,255,0,0,255,0,0,255,0, + 0,255,255,0,0,0,255,255,0,0,0,255,255,0,0,0,255,255,0,0,0,255,255,0,0,0, + 0,0,0,0,0,0,0,255,255,255,0,0,0,255,255,255,0,0,255,255,255,0,0,255,255, + 255,0,0,255,255,255,0,0,0,255,0,0,0,255,255,255,0,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,0,127,127,127,127,0,127,127, + 127,127,0,127,127,127,127,0,127,127,127,127,0,127,127,127,127,0,127,127, + 127,127,127,127,127,0,127,127,127,0,127,127,127,127,0,127,127,127,127,0, + 127,127,127,127,0,127,127,127,127,0,127,127,0,127,0,127,127,0,127,127,0, + 127,127,127,127,0,127,127,127,127,0,127,127,127,127,0,127,127,127,127,0, + 127,127,127,127,0,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,127,127,127,0,127,127,127,127,0,127,127,127,127,0,127,127, + 127,127,0,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,0,127, + 127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +}; + + +// Normal font +const int FONT1_BM_W = 253; +const int FONT1_BM_H = 106; +static const unsigned char s_Font1[] = +{ + 127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,255, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0, + 0,255,0,255,0,0,0,0,0,255,0,0,0,0,255,255,0,0,0,0,255,0,0,0,0,0,255,255, + 255,0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,255,0,255,0,255,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,255,255,255,0,0,0,0,0, + 255,0,0,0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0,0,0,0,255,0,0,255, + 255,255,255,255,255,0,0,0,255,255,255,0,0,255,255,255,255,255,255,0,0,255, + 255,255,255,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,127,0,0,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,255,255, + 255,0,0,255,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,255, + 0,0,0,0,255,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,255,255,255,0,0,0,255,0,0,0,0,255,0, + 255,0,0,0,0,255,0,0,0,0,255,255,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255, + 0,0,255,0,255,0,255,0,255,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,255,0,0,0, + 0,0,0,0,255,0,0,0,0,0,0,255,0,0,255,0,255,0,255,0,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0, + 0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,255,0,0,255,0,0,0,0,0,0,255,0,0,0,0, + 0,0,0,0,0,0,255,0,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,0,0,255, + 0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255,0,255, + 0,0,0,0,255,0,255,0,0,0,255,0,0,255,0,255,0,0,0,0,0,0,0,255,0,255,0,0,0, + 0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0, + 0,255,0,0,0,0,0,0,255,0,0,255,0,0,255,0,0,255,255,255,255,255,0,0,255,255, + 255,255,255,0,0,0,0,0,0,255,0,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255, + 0,0,0,255,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,255,255,0,0,0,0,255, + 255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,255,0,0, + 0,0,0,0,0,0,0,0,255,0,255,0,0,0,0,0,255,255,0,0,0,0,255,255,0,0,255,0,0, + 255,255,0,0,0,255,255,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0, + 255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,255,255,255,0,0,255,0,0,0,255, + 0,0,0,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,255,255,255, + 0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,255,255,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0, + 0,0,0,0,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,255,255,0, + 0,0,0,0,0,0,255,0,255,0,0,255,0,255,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0, + 0,0,0,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,0,0,0,0,0,255,255, + 255,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,255, + 0,0,0,0,0,0,0,0,255,0,255,255,255,255,255,255,0,0,0,0,0,0,255,0,255,0,0, + 0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,255,255,255,255,255,0,0,0, + 0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0, + 0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,255,0,0,0,0, + 0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,255,0,0,255, + 0,255,0,0,0,255,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0, + 0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,255, + 0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0, + 0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, + 0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,255,0,255,0,0,0,0,0,255,0,255,0,255,0,0,0,0,0,255,0,0,255,0,0,255,0,255, + 0,0,0,255,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255, + 0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,0, + 255,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0, + 255,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0, + 0,0,255,0,0,0,255,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,255,0,0,0,0,0, + 0,0,0,0,255,0,255,0,0,0,0,0,0,255,255,255,0,0,0,0,0,255,0,0,0,0,255,255, + 0,0,0,255,255,255,0,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0, + 0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,255,255, + 255,0,0,0,255,255,255,255,255,0,255,255,255,255,255,255,0,0,255,255,255, + 255,0,0,0,0,0,0,255,0,0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0,255, + 0,0,0,0,0,0,255,255,255,255,0,0,0,255,255,255,0,0,0,0,255,0,0,0,255,0,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0, + 0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,0, + 127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,0,127,127,127,0,127,127,127,0,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,0,127,127,127, + 127,0,127,127,127,0,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,0,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0,255,0,0,0,0,0,255,255,255,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,255, + 255,255,255,0,0,0,0,0,0,0,255,0,0,0,0,255,255,255,255,255,0,0,0,0,255,255, + 255,255,0,255,255,255,255,255,0,0,0,255,255,255,255,255,255,0,255,255,255, + 255,255,0,0,0,255,255,255,255,0,0,255,0,0,0,0,0,255,0,255,255,255,0,0,255, + 255,255,0,255,0,0,0,0,255,0,255,0,0,0,0,0,255,255,0,0,0,0,255,255,0,255, + 255,0,0,0,0,255,0,0,0,255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,0, + 255,255,255,255,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,255,255, + 255,255,255,255,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0, + 0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,255,255,255, + 255,255,0,0,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,255,255,0,0,0,0,255,255,0,0, + 0,0,255,0,255,0,0,0,255,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0, + 0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,255,0, + 0,255,0,0,0,0,0,255,0,255,0,0,0,255,0,0,255,0,0,0,0,0,255,255,0,0,0,0,255, + 255,0,255,255,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,255, + 0,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255, + 0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,0,255,0,0,255, + 0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0, + 0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,127,0,255,0,255,255,255,255,0,255,0,0,0,0,255,0,255,0,0,0,255,0,0, + 0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0, + 0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,255,0,0, + 255,0,0,0,255,0,0,0,0,0,255,0,255,0,0,255,0,255,0,255,0,255,0,0,0,255,0, + 255,0,0,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0, + 255,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0, + 0,255,0,0,0,255,0,0,255,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,0, + 255,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255,0,255,0,0, + 0,255,0,0,255,0,0,0,255,0,255,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,0,255, + 0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0, + 0,0,0,255,0,0,255,0,0,0,0,0,255,0,255,0,255,0,0,0,0,255,0,0,0,0,0,255,0, + 255,0,0,255,0,255,0,255,0,255,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0, + 0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0, + 255,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,255,0,0,0,255,0,0,255,0,255, + 0,0,255,0,0,0,0,255,255,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,255, + 0,0,0,0,255,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,127,255,0,255,0,0,0,255,0,0,255,0,0,255,0,0,0,255, + 0,0,255,255,255,255,255,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,255,255, + 255,255,255,255,0,255,255,255,255,255,0,255,0,0,0,255,255,255,0,255,255, + 255,255,255,255,255,0,0,255,0,0,0,0,0,255,0,255,255,0,0,0,0,0,255,0,0,0, + 0,0,255,0,255,0,0,255,0,255,0,255,0,0,255,0,0,255,0,255,0,0,0,0,0,0,255, + 0,255,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,255,255,255,0,0,0,0,255,255, + 255,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0,255,0,0,0, + 255,0,0,255,0,255,0,0,255,0,0,0,0,255,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255, + 0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255,0,255,0,0,0,255,0,0,255,0,0,255, + 0,0,0,255,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,255, + 0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,255, + 0,0,0,0,0,255,0,255,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,255,255,0,0,255, + 0,255,0,0,0,255,0,255,0,255,0,0,0,0,0,0,255,0,255,255,255,255,255,0,0,255, + 0,0,0,0,0,0,255,0,255,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255, + 0,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,0, + 255,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0, + 0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,127,255,0,255,0,0,0,255,0,0,255,0,0,255,255,255,255,255,0,0,255,0,0,0, + 0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0, + 0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,255,0,0, + 255,0,0,0,255,0,0,0,0,0,255,0,0,255,255,0,0,255,0,255,0,0,0,255,0,255,0, + 255,0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,255,0,0,0,255, + 0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,0,255,0,255, + 0,0,0,0,0,255,255,0,0,0,255,255,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0, + 0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,255,0,255,255,255,255, + 255,255,0,0,255,0,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0, + 0,0,0,255,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0, + 0,0,0,255,0,0,255,0,0,0,0,0,255,0,255,0,0,0,255,0,0,255,0,0,0,0,0,255,0, + 0,0,0,0,0,255,0,255,0,0,0,0,255,255,0,0,255,0,0,0,0,255,0,0,255,0,0,0,0, + 0,0,0,255,0,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,255, + 0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0, + 0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0, + 255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,0,255,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,255,255,255, + 255,255,0,0,0,0,255,255,255,255,0,255,255,255,255,255,0,0,0,255,255,255, + 255,255,255,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,255,0,0,0,0,0,255, + 0,255,255,255,0,255,255,255,0,0,255,0,0,0,0,255,0,255,255,255,255,255,0, + 255,0,0,0,0,0,0,255,0,255,0,0,0,0,255,255,0,0,0,255,255,255,255,0,0,0,255, + 0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,255,0,0,0,0,255,0,0,255,255,255,255, + 0,0,0,0,0,255,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0, + 0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,255,255,255,255, + 255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,255,255,255,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0,0,0,0,255,0,0, + 255,255,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,127,127,127,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 0,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 127,0,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255, + 0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0, + 0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,255, + 0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,127,0,255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0, + 0,0,0,255,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,255,255,255,0,0,255,0,255,255, + 255,0,0,0,255,255,255,255,0,0,255,255,255,255,255,0,0,255,255,255,255,0, + 0,255,255,255,255,0,255,255,255,255,255,0,255,0,255,255,255,0,0,255,0,255, + 255,0,255,0,0,0,255,0,255,0,255,255,255,255,0,255,255,255,0,0,255,0,255, + 255,255,0,0,0,255,255,255,255,0,0,255,0,255,255,255,0,0,0,255,255,255,255, + 255,0,255,0,255,0,0,255,255,255,0,255,255,255,255,0,255,0,0,0,0,255,0,255, + 0,0,0,255,0,255,0,0,0,255,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0,255, + 255,255,255,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0, + 0,0,0,0,0,0,255,0,255,255,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,255,0,255, + 0,0,0,0,255,0,0,255,0,0,255,0,0,0,0,255,0,255,255,0,0,0,255,0,255,0,0,255, + 0,255,0,0,255,0,0,255,0,255,0,0,0,255,0,0,0,255,0,255,255,0,0,0,255,0,255, + 0,0,0,0,255,0,255,255,0,0,0,255,0,255,0,0,0,0,255,0,255,255,0,0,255,0,0, + 0,0,0,255,0,0,0,255,0,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0,0,0,255, + 0,0,255,0,255,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,0,255,0,0, + 0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,255,0,255,0,0,0,0,255,0,255, + 0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,0,255,0,0,0,0,255, + 0,255,0,0,0,0,255,0,255,0,0,255,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0, + 0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0, + 0,0,255,0,255,0,0,0,255,0,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,255,0,255, + 0,0,0,255,0,255,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,0,255, + 0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,255,0,0,0,255,0,0,0, + 255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0, + 0,255,255,255,255,0,255,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,255,0,255, + 255,255,255,255,255,0,0,255,0,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255, + 0,0,255,0,255,255,0,0,0,0,255,0,255,0,0,0,255,0,0,0,255,0,255,0,0,0,0,255, + 0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255, + 255,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,255,0,255,0,0,0,255,0,255,0,255, + 0,255,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,255,0,0,0,255,255,0,0,0,0,0,0, + 255,0,0,0,0,0,255,255,0,0,255,0,0,255,0,0,255,0,0,0,255,0,0,0,0,0,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,255,0,0,0,255,0,255,0, + 0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,0,0,255,0,0,255, + 0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,255,0,255,0,255,0,0,0,255,0,255, + 0,0,0,255,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255, + 0,255,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,255,0,0,0,255,0,0,0,0,255,0, + 0,255,0,255,0,0,0,255,0,255,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0,255, + 0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,255, + 255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,255, + 255,0,255,0,0,0,0,255,0,0,255,0,0,255,0,0,0,255,255,0,255,0,0,0,0,255,0, + 255,0,0,255,0,255,0,0,255,0,0,255,0,255,0,0,0,255,0,0,0,255,0,255,0,0,0, + 0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,255,255,0,255,0,0, + 0,0,0,0,255,0,0,255,0,0,0,255,0,0,0,255,255,0,0,0,255,0,0,0,0,0,255,0,0, + 0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0, + 255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,255,255,255,255,0,255,255, + 255,255,255,0,0,0,255,255,255,255,0,0,255,255,255,0,255,0,0,255,255,255, + 255,0,0,0,255,0,0,0,255,255,255,0,255,0,255,0,0,0,0,255,0,255,0,0,255,0, + 255,0,0,0,255,0,255,0,255,0,0,0,255,0,0,0,255,0,255,0,0,0,0,255,0,0,255, + 255,255,255,0,0,255,255,255,255,255,0,0,0,255,255,255,0,255,0,255,0,0,0, + 255,255,255,0,0,0,0,255,255,0,0,255,255,255,0,255,0,0,0,255,0,0,0,0,0,255, + 0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,255,255,255,0,0,0,255, + 0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255, + 255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0, + 255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,127,0,127,127,127,127,127,0, + 127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,0,127,127,0,127,127,127,127,127,0,127,0,127,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 0,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,0,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 0,127,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127,0,127,127, + 127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,255,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0, + 0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,255,0,255, + 0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, + 255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,127,0,0,255, + 255,255,255,0,0,0,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255, + 255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0, + 255,0,0,255,0,0,0,255,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255,255,255,255, + 0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,0,0,0,255,255,255, + 255,255,255,255,255,255,0,255,255,255,255,255,255,0,0,0,255,255,255,255, + 255,255,255,255,255,0,0,0,255,255,255,255,255,255,255,255,255,0,255,0,0, + 0,255,0,255,0,255,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,255,0,255,255,0,0,0,255,255,255,0,255,0,0,0,255,0,0,255,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255, + 255,0,0,255,255,0,0,255,0,0,0,0,0,255,0,127,0,255,0,0,0,0,0,0,0,255,0,0, + 0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, + 255,255,255,255,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,255,0,0,255,0,0, + 255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,255,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0, + 0,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,255,0,255,0,0,0,255,0,255,0,255,0, + 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 255,0,0,255,255,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,127,255,0,0,0,0, + 0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0, + 0,255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,255,0,0,0,0,0,255, + 0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0, + 0,0,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255, + 0,255,0,255,0,0,255,255,255,0,0,255,0,0,0,0,255,255,255,255,0,255,255,255, + 0,0,0,0,255,0,0,0,0,0,0,0,255,0,255,255,255,255,0,0,255,0,0,0,255,0,0,127, + 255,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0, + 0,0,0,0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,255, + 0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,255,0, + 0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,255,0,0, + 0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,255,0,255, + 0,0,0,127,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,255, + 255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0, + 0,0,0,0,0,0,0,0,255,255,0,0,255,0,0,255,255,0,0,0,255,255,0,0,0,255,255, + 255,255,0,0,0,255,0,0,0,255,0,0,0,0,0,255,255,255,255,255,0,0,0,255,0,0, + 0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0, + 0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0, + 0,0,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,255, + 0,0,0,255,0,0,0,0,0,255,0,0,0,0,127,255,255,255,255,255,255,0,0,0,255,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,255,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255, + 0,0,255,0,255,0,0,255,0,0,0,0,0,0,255,0,0,255,0,0,0,255,0,0,0,0,0,255,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0, + 0,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, + 255,255,255,0,255,255,255,255,255,0,255,255,255,255,255,255,255,255,255, + 255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,255, + 0,255,0,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,255,0, + 0,0,0,0,0,255,0,0,0,0,127,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0, + 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,255,0,255,0,0,255,0,0,0, + 0,0,0,255,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0, + 0,255,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255, + 0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0, + 0,0,255,0,0,0,0,127,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,255,0, + 0,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0, + 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,255,0,255,0,0,255,0,255, + 0,0,0,0,255,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0, + 0,0,255,0,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0, + 0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0, + 0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,255,0,0,0,0,0, + 0,0,255,0,0,0,0,127,0,0,255,255,255,255,0,0,0,255,255,255,255,255,255,255, + 255,255,0,0,255,0,0,0,255,0,0,0,0,0,255,0,255,0,0,255,0,0,255,0,0,255,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,255,0, + 0,0,255,255,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,255,255,255,255,255, + 255,255,255,255,0,0,0,255,255,255,255,255,255,255,255,255,0,255,255,255, + 255,255,255,0,0,0,255,255,255,255,255,255,255,255,255,0,0,0,255,255,255, + 255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, + 255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,255,255,255,255,0,0,0,255,255, + 255,255,255,255,255,255,255,0,255,255,255,255,0,0,0,0,255,0,0,0,0,127,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,255,0,0,0,0,0,255,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,127,127,0,127,127,0,127,127,127,127,127,127,0,127,127,127,127,0,127, + 127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127, + 127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 127,0,127,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,0, + 127,127,0,127,127,0,127,127,127,127,0,127,127,127,127,0,127,127,127,127, + 0,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,0,127,127, + 127,127,0,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,255,0,0,0, + 0,0,255,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0, + 255,0,0,0,0,255,255,255,255,0,0,255,0,0,255,0,0,0,0,0,255,255,255,255,0, + 0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255, + 255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,255, + 255,255,0,0,0,255,255,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,255,255, + 255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,255,255,0,0,0,0,0,0, + 0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,255, + 255,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0, + 0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, + 0,0,0,0,255,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,255, + 0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, + 255,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,0,0,0,255,0,0, + 0,0,0,0,0,0,0,255,255,0,0,0,255,0,0,0,0,0,0,255,255,0,0,0,0,255,0,0,0,0, + 0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,127,0,0,0,0,0,255,0,0,0,0,255,255,255,255,0,0,255,0,0,0,0, + 0,255,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0, + 0,0,0,0,0,255,0,0,255,255,0,0,255,0,0,0,0,255,255,255,0,0,0,255,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,255,255,0,0,255,0,0,0,0,0,0,0,0, + 0,0,255,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,255,255,0,0,0,0,0, + 0,0,0,0,255,0,0,0,0,255,0,255,255,255,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,255,0,0,255,0,0,0,255,0,255,0,0,255,0,0,0,0,0,255,0,0,0,255,0,0,0, + 0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,255,255,0,0,0,255,0,0,0,0,0,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,255,0,0, + 0,255,0,255,0,0,0,0,255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,0,255,0, + 0,0,0,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,255,0,0,255, + 0,0,255,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255, + 0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,255,0,0,0,0,0,0,255, + 0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,255,255,255,255,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,255,0,0, + 0,0,255,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,255, + 0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0,255,0,0,0, + 0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0, + 0,0,0,255,0,0,255,0,0,255,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 255,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, + 255,255,255,0,0,255,255,255,255,0,0,255,255,255,0,0,0,0,0,0,0,0,0,255,0, + 0,0,0,255,0,0,255,255,255,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,255,255, + 0,255,0,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,255,255,0,0,0,0, + 255,0,0,255,0,255,255,255,0,0,0,0,0,0,255,0,255,0,0,255,255,0,0,0,255,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,255,0,0, + 0,255,0,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,255,0,0,0,255,255,255, + 255,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0, + 0,255,0,0,0,255,255,255,0,255,0,0,255,0,0,0,0,255,255,255,255,255,255,255, + 0,255,255,255,0,255,0,0,255,255,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255, + 0,0,0,0,255,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,0, + 0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,255,0,255,0,0,0,0,0,0,0,255,0,0,0,0, + 255,0,0,255,255,255,0,255,0,0,255,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0, + 255,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255, + 0,0,255,0,0,0,0,0,0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0,0,0,255, + 0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,255,0,0,255,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,255,0,0,255,0,0,0,0,0, + 0,255,0,0,0,0,255,0,0,0,0,0,0,255,0,0,255,0,0,255,0,255,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,255,0,0,0,255,0,255, + 0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0, + 0,255,255,0,0,0,0,0,0,0,0,0,0,255,0,0,255,255,0,0,255,0,0,0,0,0,0,0,0,0, + 0,255,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,255,0,0,0,255,255,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,255,0,0,0,0,255,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,255,0,0,255, + 255,255,255,255,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,255,0,0,255,255,255, + 255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,0,255,0,0,0,0,255,255,255,255,0,255,255,255,255,255,255,0,0,0,0, + 0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255, + 255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0, + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,255,0,0,0, + 0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,255,255,255,255,0,0,0,0,255, + 0,0,0,0,0,0,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,255,255, + 255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,255,0,0,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,255,255, + 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,0,255,0,255,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 127,127,0,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,0, + 127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,127,127,127,0,127,127,127,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127, + 127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,127,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,255, + 0,0,0,0,0,255,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0,0,255,255,0, + 0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,255,255,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255, + 255,0,0,0,0,0,0,0,255,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,255,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,255,0,0,0, + 255,0,255,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,0,255,0, + 0,0,255,0,0,255,0,0,0,255,0,0,0,255,0,0,255,0,0,255,255,0,255,0,0,0,0,0, + 0,0,0,0,0,255,0,255,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0, + 0,255,0,0,255,0,0,0,0,0,255,0,255,255,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,255, + 0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,255,0,0,0,0,0,0,0,255,0, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0, + 0,0,0,0,0,0,255,255,255,255,255,255,255,0,0,0,255,255,255,255,0,255,255, + 255,255,255,255,0,255,255,255,255,255,255,0,255,255,255,255,255,255,0,255, + 255,255,255,255,255,0,255,255,255,0,255,255,255,0,255,255,255,0,255,255, + 255,0,0,255,255,255,255,0,0,0,255,255,0,0,0,0,255,0,0,0,255,255,255,255, + 0,0,0,0,0,255,255,255,255,0,0,0,0,0,255,255,255,255,0,0,0,0,0,255,255,255, + 255,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255, + 0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255, + 0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,255,0,0,0, + 0,0,0,0,0,0,0,0,127,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255, + 0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,0, + 255,0,255,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255, + 0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255, + 0,0,0,255,0,0,255,255,0,0,0,0,255,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0, + 255,0,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0, + 0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,255,0,0,0, + 0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,255,0,0,0,255,0,0,255, + 0,0,0,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,127,0,0,255,0,255,0,0,0, + 0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255, + 0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255, + 0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0, + 255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,255,0,255,0,255,0,0,0,255,0,255, + 0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0, + 0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,0,255, + 0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0, + 0,0,255,0,0,255,0,0,0,255,0,0,255,255,255,255,255,0,0,255,0,0,0,255,0,0, + 0,0,0,0,0,0,0,0,0,127,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0, + 255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0, + 0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0, + 255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0, + 0,255,0,0,0,0,255,0,255,0,255,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0, + 0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0,0, + 0,255,0,0,0,255,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,255,0,0,0,0,0,255, + 0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,255,0, + 255,0,0,0,255,0,0,0,0,255,0,255,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,127,0, + 255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255, + 0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,255,255,255,255, + 255,0,255,0,0,0,0,0,0,255,255,255,255,255,255,0,255,255,255,255,255,255, + 0,255,255,255,255,255,255,0,255,255,255,255,255,255,0,0,255,0,0,0,255,0, + 0,0,255,0,0,0,255,0,0,255,255,255,255,0,0,255,0,255,0,0,255,0,0,255,0,255, + 0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0, + 0,0,0,255,0,255,0,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,255,0,0,255,0,0, + 0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255, + 0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,255,0,0,0, + 0,0,0,0,0,0,0,0,127,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0, + 255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255, + 255,255,255,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0, + 0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0, + 0,0,255,0,0,0,0,255,0,255,0,0,0,255,0,255,0,255,0,0,0,0,0,0,255,0,255,0, + 0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0, + 0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,255,0,0,0,255,0,255,0,0,0,0,0,255, + 0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0,255, + 0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,127,0,255, + 255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255,0,0, + 0,255,255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255, + 0,0,0,255,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0, + 0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255, + 0,0,0,255,0,0,0,0,255,0,255,0,0,0,255,0,255,0,255,0,0,0,0,0,0,255,0,255, + 0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0,0,0,0,255,0,255,0,0,0, + 0,0,0,255,0,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,0, + 255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0, + 255,0,0,0,0,255,255,255,255,255,0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0, + 127,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0, + 0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,255,0,0,0,255,0,0, + 0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255, + 0,0,0,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0, + 255,0,0,0,0,255,255,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,255, + 0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,0,255,0,0,0,0,255,0,0, + 0,255,0,0,0,255,0,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0, + 0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0, + 0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,127,255,0,0,0,0,0,255,0,255,0,0,0, + 0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255,0,0,0,0,0,255,0,255, + 0,0,0,0,0,255,0,255,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,0, + 255,255,255,255,255,255,0,255,255,255,255,255,255,0,255,255,255,255,255, + 255,0,255,255,255,255,255,255,0,255,255,255,0,255,255,255,0,255,255,255, + 0,255,255,255,0,0,255,255,255,255,0,0,0,255,0,0,0,0,255,255,0,0,0,255,255, + 255,255,0,0,0,0,0,255,255,255,255,0,0,0,0,0,255,255,255,255,0,0,0,0,0,255, + 255,255,255,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255, + 255,255,255,0,0,0,0,0,255,255,255,0,0,0,0,0,255,255,255,0,0,0,0,0,255,255, + 255,0,0,0,0,0,255,255,255,0,0,0,0,0,0,255,0,0,0,0,255,0,0,0,0,0,0,255,0, + 255,255,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,127,0,127,127,127,0,127,127, + 127,0,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127, + 127,127,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,255,0,0,0,0,0,0,255,0,0, + 0,0,255,255,0,0,0,255,255,0,255,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,255,255,0,0, + 0,0,0,0,0,0,0,0,255,0,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0, + 255,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,255,255,0,0,0,0,0,255,255,0,255, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0, + 0,255,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,255,0,0,0,0,255,0,0,0,0,255, + 0,0,255,0,255,0,255,255,0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,255,0,0, + 0,255,0,0,255,0,0,0,255,0,255,0,255,0,255,255,0,255,0,0,255,0,255,0,0,0, + 255,0,255,255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,255,0,0,255,0,0,0,255, + 0,255,255,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 255,0,0,0,0,0,0,255,0,0,0,0,255,0,0,255,0,0,0,255,0,0,255,0,0,0,0,255,0, + 0,0,255,0,0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 127,0,255,255,255,0,0,0,255,255,255,0,0,0,255,255,255,0,0,0,255,255,255, + 0,0,0,255,255,255,0,0,0,255,255,255,0,0,0,255,255,255,0,0,255,255,0,0,0, + 0,255,255,255,255,0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0,255,255, + 255,255,0,0,0,255,255,255,255,0,0,0,255,0,255,0,0,255,0,0,255,0,0,255,255, + 0,255,0,0,255,0,255,255,255,0,0,0,255,255,255,255,0,0,0,255,255,255,255, + 0,0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0, + 0,0,0,255,0,0,0,0,0,0,255,255,255,255,0,0,255,0,0,0,0,255,0,255,0,0,0,0, + 255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,255,0,255,0,255,255, + 255,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,255,0,0,0,0,0, + 255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255, + 255,0,0,255,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0, + 0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,255,0,0,255,0,0,255,0,0,0,0,0,0,255, + 0,255,255,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255, + 0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,255, + 0,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255, + 0,255,0,0,0,255,0,255,255,0,0,0,255,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,127,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0, + 255,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0,0, + 255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,255, + 0,0,255,0,0,255,0,0,255,255,255,255,255,0,255,0,0,0,0,255,0,255,0,0,0,0, + 255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0, + 255,0,0,0,0,0,0,0,0,0,0,255,0,0,0,255,0,255,0,255,0,0,0,0,255,0,255,0,0, + 0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,255,0,0,255,0,0,0, + 0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,255,255,255,255,0,0, + 255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255, + 255,0,0,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,0,255,0, + 0,0,0,0,255,255,255,255,255,255,0,255,255,255,255,255,255,0,255,255,255, + 255,255,255,0,255,255,255,255,255,255,0,0,255,0,255,0,0,255,0,0,255,0,255, + 0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255, + 0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,255,255,255,255, + 255,255,0,255,0,0,255,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255, + 0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,255,0,0,255,0,0,0,0,255,0,0,255, + 0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255,0,0,0,255,0,255,0,0,0,255,0,255, + 0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,255, + 0,0,0,0,0,0,255,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0,0,255,0,0,0,0,0, + 0,255,0,0,0,0,0,0,0,255,0,255,0,0,255,0,0,255,0,255,0,0,0,0,255,0,255,0, + 0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0, + 0,0,0,255,0,255,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,255,0,255,0,0,0,255,0,255, + 0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255, + 0,255,0,0,255,0,0,0,0,255,0,0,255,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255, + 0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,255,0,255,0,0,0,255, + 0,255,0,0,0,255,0,255,0,0,0,255,255,0,0,0,255,0,255,0,0,0,0,0,255,0,0,0, + 0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,0,255,0,255, + 0,0,255,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0, + 255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0,255,0,0,0,0,255,0, + 0,0,0,0,255,0,0,0,0,0,255,0,0,0,255,0,0,255,0,0,0,255,255,0,255,0,0,0,255, + 255,0,255,0,0,0,255,255,0,255,0,0,0,255,255,0,0,0,255,0,0,0,255,0,0,0,0, + 255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,255,255,255,255,0,0,255, + 255,255,255,0,0,255,255,255,255,0,0,255,255,255,255,0,0,255,255,255,255, + 0,0,255,255,255,255,0,0,255,255,255,0,0,255,255,255,0,0,0,255,255,255,255, + 0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0,255, + 255,255,255,0,0,0,255,0,255,0,0,255,0,0,255,0,0,255,255,255,255,0,0,255, + 0,0,0,0,255,0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0,255,255,255, + 255,0,0,0,255,255,255,255,0,0,0,255,255,255,255,0,0,0,0,0,0,255,0,0,0,0, + 0,255,255,255,255,0,0,0,0,255,255,255,0,255,0,0,255,255,255,0,255,0,0,255, + 255,255,0,255,0,0,255,255,255,0,255,0,0,0,255,0,0,0,255,255,255,255,255, + 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0, + 0,255,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,255,0,0,0,0,255,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127, + 127,127,0,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127, + 0,127,127,0,127,0,127,127,0,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +}; + +// Normal font anti-aliased +const int FONT1AA_BM_W = 264; +const int FONT1AA_BM_H = 106; +static const unsigned char s_Font1AA[] = +{ + 127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0, + 0,0,0,4,4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0, + 59,241,97,206,166,0,0,0,0,0,0,0,0,0,0,0,0,0,168,34,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,251,89,0,0,89,255,125,89,255,125,0,0,0,0, + 7,199,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,166, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0, + 0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,225,21,59,238,42, + 206,125,0,0,0,0,7,199,34,89,166,0,0,0,0,168,34,0,0,0,175,255,255,166,0, + 0,7,202,89,0,0,0,0,59,245,255,251,89,0,0,0,59,238,34,0,12,232,89,0,0,89, + 247,34,0,59,245,206,199,124,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,7,202,89,0,12,235,255,247,34,0,0,0,0,12,232,89,0,0,12,235, + 255,255,251,89,0,7,206,255,255,255,125,0,0,0,0,138,251,89,0,0,59,245,255, + 255,255,251,89,0,0,89,255,255,166,0,89,255,255,255,255,255,201,0,0,59,245, + 255,255,125,0,0,12,235,255,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,255,255,255,247,34,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0, + 0,0,0,0,0,127,0,0,0,0,0,138,225,21,59,238,34,175,125,0,0,0,0,59,192,0,172, + 89,0,0,59,245,255,255,251,89,89,247,34,12,228,34,0,138,166,0,0,0,0,12,235, + 125,0,175,225,21,0,0,59,238,34,0,138,201,0,0,0,0,175,166,0,0,0,89,255,201, + 0,0,0,0,0,0,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,215,21,0,175, + 166,0,138,201,0,0,7,206,255,251,89,0,0,59,192,0,0,138,247,34,59,192,0,0, + 89,251,89,0,0,59,245,251,89,0,0,59,241,89,0,0,0,0,0,89,247,34,0,0,0,0,0, + 0,0,7,206,166,0,7,206,125,0,89,247,34,7,206,166,0,138,225,21,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,12,232,89,0,0,0,0,0,0,0,0,0,0,0,175,166,0,0,0,0,0, + 0,0,89,125,0,0,175,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0, + 0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,225,21,12,206, + 21,175,125,0,0,89,255,255,255,255,255,255,166,59,241,89,168,34,138,125, + 89,225,21,7,202,89,12,228,34,0,0,0,0,12,232,89,0,138,201,0,0,0,12,206,21, + 7,202,89,0,0,0,0,59,215,21,59,245,206,199,124,255,125,0,0,0,0,7,202,89, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,166,0,12,232,89,0,59,238,34,0,0, + 0,59,241,89,0,0,0,0,0,0,59,241,89,0,0,0,0,59,241,89,0,12,232,132,241,89, + 0,0,59,241,89,0,0,0,0,7,206,125,0,0,0,0,0,0,0,0,89,247,34,0,12,232,89,0, + 12,232,89,59,241,89,0,59,241,89,0,138,247,34,0,0,138,247,34,0,0,0,0,0,12, + 235,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,138,255,166,0,0,0,0,0,0,0,0,0,138, + 225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0, + 0,0,4,4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,172, + 89,59,192,0,0,59,238,34,168,34,0,0,89,247,34,12,228,34,138,166,0,0,0,0, + 0,0,138,251,159,247,34,0,0,0,0,0,0,59,238,34,0,0,0,0,7,202,89,0,0,7,199, + 34,0,0,0,0,0,0,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,202,89,0,59, + 241,89,0,59,241,89,0,0,0,59,241,89,0,0,0,0,0,0,89,247,34,0,0,0,0,138,201, + 0,7,206,125,59,241,89,0,0,59,245,255,255,251,89,0,12,235,255,255,255,125, + 0,0,0,0,7,206,166,0,0,0,175,251,89,138,201,0,59,241,89,0,12,235,125,0,138, + 247,34,0,0,138,247,34,0,0,0,59,245,247,34,0,0,0,0,7,206,255,255,255,255, + 255,255,125,0,0,0,0,138,255,201,0,0,0,0,0,0,89,251,89,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0, + 127,0,0,0,0,0,138,201,0,0,0,0,0,0,0,0,0,12,206,21,138,125,0,0,7,206,255, + 247,34,0,0,0,175,255,255,166,59,215,21,175,255,255,125,0,0,138,171,206, + 166,0,175,201,0,0,0,0,89,201,0,0,0,0,0,0,175,125,0,0,0,0,0,0,0,0,12,235, + 255,255,255,255,255,255,125,0,0,0,0,138,255,255,251,89,0,0,0,0,0,59,215, + 21,0,59,241,89,0,59,241,89,0,0,0,59,241,89,0,0,0,0,0,12,235,166,0,0,0,138, + 255,255,125,0,175,201,0,59,241,89,0,0,0,0,0,0,175,247,34,59,241,89,0,89, + 247,34,0,0,0,89,247,34,0,0,0,89,255,255,255,125,0,12,235,166,0,59,245,125, + 0,0,0,0,0,0,0,0,0,0,0,175,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,89,251,89,0,0,7,206,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89,201, + 0,0,0,0,0,0,0,12,235,255,255,255,255,255,225,21,0,0,0,175,255,251,89,0, + 0,0,0,0,175,125,89,225,21,59,238,34,89,225,21,12,235,166,175,166,0,0,0, + 0,89,201,0,0,0,0,0,0,175,125,0,0,0,0,0,0,0,0,0,0,0,7,202,89,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,138,166,0,0,59,241,89,0,59,241,89,0,0,0,59,241,89, + 0,0,0,0,12,235,166,0,0,0,0,0,0,59,241,97,206,255,255,255,255,255,125,0, + 0,0,0,0,59,241,89,59,238,34,0,12,235,125,0,0,12,235,125,0,0,0,12,232,89, + 0,59,245,125,0,89,255,255,232,241,89,0,0,0,0,0,0,0,0,0,0,0,0,59,245,247, + 34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,255,201,0,0,0,0,7,206,125,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4, + 4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,125,12,206,21, + 0,0,0,0,0,168,34,175,166,0,0,0,0,59,215,21,138,201,0,12,228,34,138,225, + 21,0,12,235,251,89,0,0,0,0,59,215,21,0,0,0,0,12,232,89,0,0,0,0,0,0,0,0, + 0,0,0,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,202,89,0,0,12,232,89,0, + 59,238,34,0,0,0,59,241,89,0,0,0,12,235,166,0,0,0,0,0,0,0,12,235,125,0,0, + 0,59,241,89,0,0,0,0,0,0,59,241,89,12,232,89,0,12,232,89,0,0,138,225,21, + 0,0,0,59,238,34,0,7,206,166,0,0,0,0,89,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,12,235,247,34,0,0,7,206,255,255,255,255,255,255,125,0,0,138,255,166,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0, + 0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,225,21,0,0,0,0, + 0,0,0,0,172,89,89,166,0,0,0,89,166,0,168,42,206,125,0,0,0,7,202,89,0,89, + 225,21,59,238,34,89,251,89,0,0,175,255,201,0,0,0,0,7,202,89,0,0,0,0,59, + 215,21,0,0,0,0,0,0,0,0,0,0,0,7,202,89,0,0,0,0,138,247,34,0,0,0,0,0,7,206, + 201,0,12,228,34,0,0,0,175,166,0,138,201,0,0,0,0,59,241,89,0,0,12,235,166, + 0,0,0,0,89,166,0,0,89,251,89,0,0,0,59,241,89,0,0,59,192,0,0,175,225,21, + 0,175,201,0,138,225,21,0,12,235,125,0,0,0,0,12,235,166,0,59,241,89,0,0, + 0,7,206,166,0,0,138,247,34,0,0,59,245,125,0,0,0,0,0,0,0,12,232,89,0,0,0, + 0,0,0,0,0,0,0,0,175,166,0,0,0,0,0,0,0,0,7,206,166,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0, + 127,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,12,206,21,138,125,0,0,0,12,235,255, + 255,255,166,0,0,0,0,138,201,0,0,0,175,255,255,125,0,0,138,255,255,255,125, + 12,235,247,0,0,0,0,138,201,0,0,0,0,175,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,7,206,166,0,0,0,0,0,0,7,206,201,0,89,201,0,0,0,0,12,235,255,247, + 34,0,0,7,206,255,255,255,225,21,89,255,255,255,255,255,166,59,245,255,255, + 251,89,0,0,0,0,59,241,89,0,0,12,235,255,255,225,21,0,0,12,235,255,251,89, + 0,0,175,225,21,0,0,0,0,0,59,245,255,255,125,0,0,89,255,255,166,0,0,0,138, + 247,34,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,7,206,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4, + 0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,12,232,89,0,0,59,238,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,175,125,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,125, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0, + 4,4,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,168,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89, + 255,125,89,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,201,0,0,0,0, + 0,0,0,0,0,0,12,228,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,228,34,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0, + 127,127,127,127,0,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,0,127,127,127,127, + 0,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,127,0,127,127,127,0,127,127,127,127,0,127,127,127,0,127,127,127,127, + 0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,0, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,255,125,138,166,0,0,0,89,255,255,247, + 34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,89,255,255, + 255,255,166,0,0,0,0,0,12,235,225,21,0,0,59,245,255,255,255,251,89,0,0,0, + 59,245,255,255,251,89,59,245,255,255,255,247,34,0,0,59,245,255,255,255, + 255,127,81,245,255,255,255,255,127,0,0,59,245,255,255,255,166,0,59,241, + 89,0,0,0,59,241,89,89,255,255,255,125,7,206,255,251,89,59,241,89,0,0,89, + 255,166,59,241,89,0,0,0,0,59,245,225,21,0,0,7,206,251,89,59,245,247,34, + 0,0,59,241,89,0,0,138,255,255,255,166,0,0,59,245,255,255,255,225,21,0,0, + 0,138,255,255,255,166,0,0,59,245,255,255,255,251,89,0,0,0,59,245,255,255, + 201,89,255,255,255,255,255,255,255,125,59,241,89,0,0,0,59,241,97,206,166, + 0,0,0,0,175,201,175,201,0,0,7,206,201,0,0,0,175,171,206,225,21,0,0,59,245, + 166,245,125,0,0,0,89,251,89,89,255,255,255,255,255,127,0,228,34,0,0,59, + 215,21,0,0,0,0,12,228,34,0,0,0,59,245,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,127,0,0,175,225,21,0,0,0,175,225,21,0,0,0,89,232,241,89,0,0,59, + 241,89,0,0,138,225,21,0,89,255,125,0,0,59,192,59,241,89,0,0,175,251,89, + 0,59,241,89,0,0,0,0,59,241,89,0,0,0,0,0,89,255,125,0,0,7,199,34,59,241, + 89,0,0,0,59,241,89,0,59,241,89,0,0,0,59,241,89,59,241,89,0,59,241,89,0, + 59,241,89,0,0,0,0,59,245,255,125,0,0,89,255,251,89,59,245,255,201,0,0,59, + 241,89,0,138,251,89,0,12,235,166,0,59,241,89,0,7,206,225,21,0,138,251,89, + 0,12,235,166,0,59,241,89,0,0,138,247,34,0,12,235,125,0,7,176,21,0,0,59, + 241,89,0,0,0,59,241,89,0,0,0,59,241,89,138,225,21,0,0,12,235,125,89,225, + 21,0,59,245,247,34,0,12,232,89,12,235,166,0,7,206,166,0,89,247,34,0,7,206, + 125,0,0,0,0,0,7,206,166,12,228,34,0,0,7,202,89,0,0,0,0,12,228,34,0,0,12, + 235,133,206,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,138,201,0,138, + 255,255,255,125,138,166,0,0,7,206,166,175,166,0,0,59,241,89,0,0,89,247, + 34,7,206,166,0,0,0,0,0,59,241,89,0,0,0,175,225,21,59,241,89,0,0,0,0,59, + 241,89,0,0,0,0,7,206,166,0,0,0,0,0,0,59,241,89,0,0,0,59,241,89,0,59,241, + 89,0,0,0,59,241,89,59,241,89,59,241,89,0,0,59,241,89,0,0,0,0,59,241,159, + 225,21,0,175,166,241,89,59,241,132,241,89,0,59,241,89,12,235,166,0,0,0, + 89,247,34,59,241,89,0,0,89,247,34,12,235,166,0,0,0,89,247,34,59,241,89, + 0,0,59,241,89,0,59,238,34,0,0,0,0,0,0,59,241,89,0,0,0,59,241,89,0,0,0,59, + 241,89,59,241,89,0,0,89,225,21,59,241,89,0,89,206,202,89,0,59,238,34,0, + 89,251,89,138,225,21,0,0,175,201,0,138,225,21,0,0,0,0,0,175,225,21,12,228, + 34,0,0,0,138,166,0,0,0,0,12,228,34,0,7,206,166,0,12,235,125,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,127,7,202,89,89,225,21,7,206,125,12,206,21,0,59,238, + 34,89,247,34,0,59,241,89,0,0,175,201,0,59,241,89,0,0,0,0,0,59,241,89,0, + 0,0,59,241,89,59,241,89,0,0,0,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0,0,0, + 59,241,89,0,0,0,59,241,89,0,59,241,89,0,0,0,59,241,89,59,241,102,232,89, + 0,0,0,59,241,89,0,0,0,0,59,241,102,232,89,59,215,81,241,89,59,241,89,138, + 225,21,59,241,89,59,241,89,0,0,0,59,241,89,59,241,89,0,7,206,201,0,59,241, + 89,0,0,0,59,241,89,59,241,89,0,0,175,201,0,0,12,235,166,0,0,0,0,0,0,59, + 241,89,0,0,0,59,241,89,0,0,0,59,241,89,7,206,166,0,0,175,166,0,7,206,125, + 0,175,125,175,166,0,138,201,0,0,0,175,255,251,89,0,0,0,59,245,166,241,89, + 0,0,0,0,0,89,247,34,0,12,228,34,0,0,0,89,201,0,0,0,0,12,228,34,12,235,201, + 0,0,0,59,245,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,59,215,21,175,125, + 0,7,206,125,7,199,34,0,138,201,0,12,235,125,0,59,245,255,255,255,247,34, + 0,59,241,89,0,0,0,0,0,59,241,89,0,0,0,59,241,89,59,245,255,255,255,255, + 127,59,245,255,255,255,255,127,59,241,89,0,0,0,0,0,0,59,245,255,255,255, + 255,255,251,89,0,59,241,89,0,0,0,59,241,89,59,245,255,247,34,0,0,0,59,241, + 89,0,0,0,0,59,241,89,138,201,175,166,59,241,89,59,241,89,12,235,125,59, + 241,89,59,241,89,0,0,0,12,235,125,59,245,255,255,255,201,0,0,59,241,89, + 0,0,0,12,235,125,59,245,255,255,255,125,0,0,0,0,59,245,255,255,125,0,0, + 0,59,241,89,0,0,0,59,241,89,0,0,0,59,241,89,0,138,225,21,59,241,89,0,0, + 175,201,7,202,89,89,201,0,175,166,0,0,0,12,235,166,0,0,0,0,0,138,255,166, + 0,0,0,0,0,59,245,125,0,0,12,228,34,0,0,0,12,228,34,0,0,0,12,228,34,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,59,215,21,175,125,0,7, + 206,125,7,199,34,7,206,125,0,0,175,201,0,59,241,89,0,0,89,247,34,59,241, + 89,0,0,0,0,0,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,0,59,241,89,0,0, + 0,0,59,241,89,0,59,245,255,251,89,59,241,89,0,0,0,59,241,89,0,59,241,89, + 0,0,0,59,241,89,59,241,89,175,225,21,0,0,59,241,89,0,0,0,0,59,241,89,12, + 235,247,34,59,241,89,59,241,89,0,89,247,94,241,89,59,241,89,0,0,0,59,241, + 89,59,241,89,0,0,0,0,0,59,241,89,0,0,0,59,241,89,59,241,89,12,235,166,0, + 0,0,0,0,0,0,138,251,89,0,0,59,241,89,0,0,0,59,241,89,0,0,0,59,241,89,0, + 12,232,89,138,225,21,0,0,89,225,81,215,21,12,228,47,232,89,0,0,0,175,255, + 251,89,0,0,0,0,59,241,89,0,0,0,0,7,206,201,0,0,0,12,228,34,0,0,0,0,175, + 125,0,0,0,12,228,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 12,228,34,89,201,0,7,206,125,59,215,21,59,245,255,255,255,255,247,34,59, + 241,89,0,0,59,241,89,7,206,166,0,0,0,0,0,59,241,89,0,0,0,138,225,21,59, + 241,89,0,0,0,0,59,241,89,0,0,0,0,7,206,166,0,0,0,59,241,89,59,241,89,0, + 0,0,59,241,89,0,59,241,89,0,0,0,59,241,89,59,241,89,7,206,201,0,0,59,241, + 89,0,0,0,0,59,241,89,0,175,166,0,59,241,89,59,241,89,0,7,206,200,241,89, + 12,235,166,0,0,0,89,247,34,59,241,89,0,0,0,0,0,12,235,166,0,0,0,89,247, + 34,59,241,89,0,59,245,125,0,0,0,0,0,0,12,232,89,0,0,59,241,89,0,0,0,12, + 232,89,0,0,0,59,238,34,0,0,175,171,206,166,0,0,0,12,232,159,201,0,7,202, + 132,215,21,0,0,89,247,34,175,225,21,0,0,0,59,241,89,0,0,0,0,138,225,21, + 0,0,0,12,228,34,0,0,0,0,89,201,0,0,0,12,228,34,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,138,201,7,206,255,251,226,255,255,166,0, + 138,201,0,0,0,12,235,125,59,241,89,0,0,138,247,34,0,89,255,125,0,0,59,192, + 59,241,89,0,0,138,251,89,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0,0,89,255, + 125,0,0,59,241,89,59,241,89,0,0,0,59,241,89,0,59,241,89,0,0,0,89,247,34, + 59,241,89,0,12,235,166,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0,59,241,89, + 59,241,89,0,0,59,245,251,89,0,138,251,89,0,59,245,166,0,59,241,89,0,0,0, + 0,0,0,138,251,89,0,59,245,166,0,59,241,89,0,0,138,251,89,0,89,166,0,0,89, + 247,34,0,0,59,241,89,0,0,0,0,138,225,21,0,7,206,166,0,0,0,89,255,251,89, + 0,0,0,7,206,255,125,0,0,138,255,201,0,0,12,235,125,0,12,235,166,0,0,0,59, + 241,89,0,0,0,89,251,89,0,0,0,0,12,228,34,0,0,0,0,12,228,34,0,0,12,228,34, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,7,206,225,21,0, + 0,0,0,0,0,7,206,125,0,0,0,0,175,201,59,245,255,255,255,247,34,0,0,0,59, + 245,255,255,251,89,59,245,255,255,255,225,21,0,0,59,245,255,255,255,255, + 127,81,241,89,0,0,0,0,0,0,59,245,255,255,255,201,0,59,241,89,0,0,0,59,241, + 89,89,255,255,255,138,235,255,255,125,0,59,241,89,0,0,89,255,201,59,245, + 255,255,255,255,166,59,241,89,0,0,0,0,59,241,89,59,241,89,0,0,0,175,251, + 89,0,0,138,255,255,255,166,0,0,59,241,89,0,0,0,0,0,0,0,138,255,255,255, + 166,0,0,59,241,89,0,0,0,175,251,89,12,235,255,255,251,89,0,0,0,59,241,89, + 0,0,0,0,0,59,245,255,251,89,0,0,0,0,12,235,201,0,0,0,0,0,138,251,89,0,0, + 89,255,125,0,7,206,225,21,0,0,89,255,125,0,0,59,241,89,0,0,0,175,255,255, + 255,255,255,127,0,228,34,0,0,0,0,0,175,125,0,0,12,228,34,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,89,255,255,255,255,125,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12, + 228,34,0,0,0,0,0,89,201,0,0,12,228,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,138,255,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,255,125,0,0,0,12,228, + 124,255,255,247,34,0,0,0,0,0,0,0,0,0,245,255,255,255,255,255,255,0,0,0, + 0,0,0,0,0,0,0,127,127,127,127,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,127,0,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,0,127, + 127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,127,0,89,255,125,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,89,255,255,166,0,0,0,0,0, + 0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,255,201,0,12,228, + 34,0,0,89,255,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,116,116, + 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,127,0,0,59,241,89,0,0,0,0,0,0,0,0,0,59,241,89,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,12,235,125,0,0,0,0,0,0, + 0,0,0,59,241,89,0,0,0,0,59,241,89,0,89,251,89,59,241,89,0,0,0,0,59,241, + 89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,225, + 21,0,0,12,228,34,0,0,0,0,138,201,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4, + 4,4,28,244,252,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59, + 241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,59,241,89,0, + 0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,59,241, + 89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,166, + 0,0,0,12,228,34,0,0,0,0,89,225,21,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4, + 4,180,252,164,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,7,206,255,255,255, + 125,0,59,241,194,255,251,89,0,0,7,206,255,255,201,0,12,235,255,255,251, + 89,0,12,235,255,251,89,7,206,255,255,247,34,0,12,235,255,255,251,89,59, + 241,194,255,255,125,0,59,241,89,89,255,251,89,59,241,89,0,138,251,89,59, + 241,89,59,241,159,255,255,125,89,255,255,166,0,59,241,194,255,255,125,0, + 0,0,12,235,255,247,34,0,59,241,194,255,255,125,0,0,12,235,255,255,251,89, + 59,241,159,255,201,0,138,255,255,247,34,206,255,255,255,166,59,241,89,0, + 59,241,97,206,166,0,0,12,235,125,175,201,0,7,206,166,0,7,206,133,206,225, + 21,0,89,255,255,166,0,0,12,235,125,138,255,255,255,255,166,0,0,138,166, + 0,0,0,12,228,34,0,0,0,0,89,225,21,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4, + 76,252,244,20,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,89,247,34, + 59,245,166,0,138,225,21,7,206,201,0,0,0,7,206,166,0,59,241,89,7,206,125, + 0,89,225,21,59,241,89,0,0,7,206,166,0,59,241,89,59,245,166,0,89,247,34, + 59,241,89,0,59,241,89,59,241,89,138,225,21,0,59,241,89,59,245,201,0,89, + 255,201,0,89,247,34,59,245,166,0,89,247,34,0,7,206,166,0,138,225,21,59, + 245,166,0,138,247,34,7,206,166,0,59,241,89,59,245,201,0,0,59,238,34,0,130, + 34,59,241,89,0,0,59,241,89,0,59,241,89,89,247,34,0,89,247,34,138,225,21, + 12,235,225,21,12,232,89,7,206,166,12,235,125,89,247,34,0,89,247,34,0,0, + 0,89,247,34,0,0,138,166,0,0,0,12,228,34,0,0,0,0,89,225,21,0,0,7,206,247, + 34,0,0,89,201,0,0,4,4,68,12,4,4,4,220,252,108,4,4,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,0,0,0,0,0,0,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,0,0,59, + 241,89,0,59,241,89,59,238,34,0,59,238,34,59,241,89,0,0,59,241,89,0,59,241, + 89,59,241,89,0,59,241,89,59,241,89,0,59,241,89,59,241,159,201,0,0,0,59, + 241,89,59,241,89,0,59,241,89,0,59,241,89,59,241,89,0,59,241,89,0,59,241, + 89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0, + 0,59,241,89,0,0,0,59,241,89,0,0,59,241,89,0,59,241,89,12,235,125,0,175, + 166,0,59,238,34,89,171,202,89,89,225,21,0,59,241,226,201,0,12,235,125,0, + 175,166,0,0,0,12,235,125,0,0,59,238,34,0,0,0,12,228,34,0,0,0,0,7,206,125, + 0,7,202,89,12,235,166,0,175,125,0,0,4,60,244,172,4,4,132,252,212,4,4,4, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,89,255,255,255,251,89,59,241,89, + 0,59,241,89,59,238,34,0,0,0,59,238,34,0,59,241,89,59,245,255,255,255,251, + 0,59,241,89,0,0,59,238,34,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0, + 59,241,89,59,245,255,225,21,0,0,59,241,89,59,241,89,0,59,241,89,0,59,241, + 89,59,241,89,0,59,241,89,0,59,238,34,0,12,232,89,59,241,89,0,12,232,89, + 59,238,34,0,59,241,89,59,241,89,0,0,0,175,255,255,201,0,59,241,89,0,0,59, + 241,89,0,59,241,89,0,175,201,12,232,89,0,7,206,125,172,89,138,166,138,201, + 0,0,0,138,247,34,0,0,175,201,12,232,89,0,0,7,206,166,0,0,175,225,21,0,0, + 0,0,12,228,34,0,0,0,0,0,0,175,225,34,206,21,0,0,175,255,166,0,0,0,4,52, + 244,252,140,36,244,252,60,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,59, + 241,89,0,59,241,89,59,241,89,0,59,238,34,59,241,89,0,0,0,59,241,89,0,59, + 241,89,59,238,34,0,0,0,0,59,241,89,0,0,59,241,89,0,59,241,89,59,241,89, + 0,59,241,89,59,241,89,0,59,241,89,59,241,97,206,201,0,0,59,241,89,59,241, + 89,0,59,241,89,0,59,241,89,59,241,89,0,59,241,89,0,59,241,89,0,59,241,89, + 59,241,89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,0,0,0,0,59,245, + 125,59,241,89,0,0,59,241,89,0,59,241,89,0,59,238,124,225,21,0,0,175,176, + 206,21,59,215,187,125,0,0,59,245,255,201,0,0,89,247,124,225,21,0,0,138, + 225,21,0,0,0,59,241,89,0,0,0,12,228,34,0,0,0,0,12,235,125,0,0,0,0,0,0,0, + 0,0,0,0,0,4,4,76,252,252,220,252,164,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0, + 0,0,0,0,0,0,89,247,34,0,89,251,89,59,241,89,0,175,201,0,7,206,201,0,0,0, + 7,206,166,0,138,251,89,7,206,166,0,7,199,34,59,241,89,0,0,7,206,166,0,138, + 251,89,59,241,89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,12,235,166, + 0,59,241,89,59,241,89,0,59,241,89,0,59,241,89,59,241,89,0,59,241,89,0,7, + 206,166,0,138,225,21,59,241,89,0,138,225,21,7,206,166,0,89,251,89,59,241, + 89,0,0,89,125,0,12,232,89,12,232,89,0,12,12,235,125,0,175,251,89,0,7,206, + 255,125,0,0,0,89,255,201,0,7,206,247,34,0,7,206,166,59,245,125,0,7,206, + 255,125,0,0,59,241,89,0,0,0,0,0,138,166,0,0,0,12,228,34,0,0,0,0,89,225, + 21,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,100,252,252,244,28,4,4,4,4,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,127,0,0,0,0,0,0,0,0,175,255,255,232,241,89,59,245,255,255,247,34, + 0,0,12,235,255,255,201,0,59,245,255,200,241,89,0,12,235,255,251,89,0,59, + 241,89,0,0,0,12,235,255,200,241,89,59,241,89,0,59,241,89,59,241,89,0,59, + 241,89,59,241,89,0,59,245,201,59,241,89,59,241,89,0,59,241,89,0,59,241, + 89,59,241,89,0,59,241,89,0,0,12,235,255,247,34,0,59,245,166,255,247,34, + 0,0,59,245,255,166,241,89,59,241,89,0,0,59,245,255,255,166,0,0,138,255, + 255,125,0,89,255,255,166,241,89,0,0,138,247,34,0,0,0,59,245,125,0,0,138, + 225,21,7,206,225,21,0,138,251,0,0,138,247,34,0,0,175,255,255,255,255,166, + 0,0,138,166,0,0,0,12,228,34,0,0,0,0,89,225,21,0,0,0,0,0,0,0,0,0,0,0,0,4, + 4,4,4,132,252,108,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,89,247,34,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0, + 0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,232,89,0,0,0,0,0,0,0,0,0,0,0,138, + 201,0,0,0,12,228,34,0,0,0,0,138,201,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4, + 116,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,255,255, + 247,34,0,0,0,0,0,0,0,0,0,0,0,255,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,59, + 241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,7,206,255, + 201,0,12,228,34,0,0,89,255,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4, + 4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,127,127,0,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,0,127,127,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,0,127,127,127,0,127,127,127, + 127,127,127,0,127,127,0,127,127,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127,0,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,0,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,127,127,127,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,89,247,34,138,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125,59,238,34,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,255, + 225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,235,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,238,34,138,201,0,0,0,0,0, + 0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,199,34,0,0,0,0,0,7,199,34,0,0,0,0,138,255, + 201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,251,89,0,0,138,255,251,97,206,201,0,0,138, + 251,102,235,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,255, + 201,12,228,34,0,0,0,0,0,0,0,0,0,0,0,0,7,206,166,12,232,89,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,166,12,235,127,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,127,0,0,175,255,255,255,225,21,59,245,255,255,255, + 255,255,125,0,0,0,0,0,0,0,7,206,255,247,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,7,199,34,0,0,0,0,0,7,199,34,0,0,0,138,225,21,175,166,0,0,175,255,255, + 166,0,0,7,202,89,0,0,0,0,0,0,0,0,0,0,59,245,255,255,201,0,0,0,0,0,0,0,0, + 59,245,255,255,255,255,255,255,255,255,125,0,59,245,255,255,255,255,255, + 125,0,0,89,255,255,255,255,255,225,21,59,245,255,255,255,255,255,125,0, + 0,0,59,245,255,255,255,255,255,125,7,206,166,0,0,175,171,206,166,89,247, + 34,0,175,201,59,241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,228,34,175,255,125,0,0,89,255,255,255,125,175,251,89,89,255,125,0,7, + 206,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,255,255,255, + 255,255,125,0,0,7,206,255,125,59,245,125,0,0,0,89,251,89,0,0,0,0,0,0,0, + 127,7,206,225,21,0,0,0,0,59,115,0,0,0,0,59,115,0,0,0,0,0,0,0,175,201,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,255,255,255,255,125,0,59,245,255, + 255,255,255,125,0,0,0,0,0,0,0,89,247,34,12,228,34,0,138,166,0,0,0,0,0,0, + 0,0,0,0,12,235,125,0,7,176,21,0,0,0,0,0,0,138,251,89,0,0,138,201,0,0,0, + 0,0,0,59,115,0,0,0,0,59,115,0,0,0,0,0,0,7,206,166,0,59,115,0,0,0,0,59,115, + 0,0,0,59,115,0,0,0,0,59,115,0,89,201,0,12,232,89,89,201,7,202,89,12,232, + 89,138,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,7,199,34,0,172,132,196,199,163,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,59,115,0,0,0,0,59,115,0,0,0,0,0,0,0,89,247,34,0,7, + 206,125,0,0,0,0,0,0,0,0,127,89,247,34,0,0,0,0,0,59,115,0,0,0,0,59,115,0, + 0,0,0,0,0,7,206,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,199,34,0, + 0,0,0,0,7,199,34,0,0,0,0,0,0,0,0,0,89,225,21,7,202,89,12,228,34,0,0,0,0, + 0,0,0,0,0,0,59,238,34,0,0,0,0,0,0,0,130,34,59,241,89,0,0,0,138,201,0,0, + 0,0,0,0,59,115,0,0,0,0,59,115,0,0,0,0,0,0,175,225,21,0,59,115,0,0,0,0,59, + 115,0,0,0,59,115,0,0,0,0,59,115,0,12,228,34,59,192,0,12,228,34,138,166, + 59,215,21,175,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,7,199,34,0,172,89,175,166,138,125,0,138,255,255,247,34,12, + 146,0,0,0,0,89,255,255,255,125,12,235,255,255,125,0,0,0,59,115,0,0,0,0, + 59,115,0,138,255,255,255,255,127,0,175,201,0,138,225,21,0,0,0,0,0,0,0,0, + 127,245,255,255,255,255,255,125,0,59,115,0,0,0,0,59,115,0,0,0,0,0,0,12, + 232,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,199,34,0,0,0,0,0,7,199, + 34,0,0,0,0,0,0,0,0,0,89,247,34,12,228,34,138,166,0,0,0,0,0,0,0,0,0,0,0, + 12,235,166,0,0,0,0,0,0,175,225,21,138,225,21,0,0,0,138,201,0,0,0,0,0,0, + 59,115,0,0,0,0,59,115,0,0,0,0,0,89,247,34,0,0,59,115,0,0,0,0,59,115,0,0, + 0,59,115,0,0,0,0,59,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,255,166, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,199,34,0,172, + 89,0,0,138,125,59,238,34,0,130,34,7,206,201,0,0,59,241,89,0,12,235,255, + 125,0,59,241,89,0,0,59,115,0,0,0,0,59,115,0,0,0,0,89,247,34,0,59,245,166, + 241,89,0,0,0,0,0,0,0,0,0,127,138,225,21,0,0,0,0,0,59,115,0,0,0,0,59,115, + 0,0,0,0,0,89,255,255,255,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,199, + 34,0,0,0,0,0,7,199,34,0,0,0,0,0,0,0,0,0,0,175,255,255,166,59,215,21,175, + 255,255,125,0,89,255,255,201,0,0,0,59,245,255,255,125,0,12,235,166,0,0, + 138,225,21,0,0,0,138,255,255,255,255,247,34,0,59,115,0,0,0,0,59,115,0,0, + 0,0,59,245,125,0,0,0,59,115,0,0,0,0,59,115,0,0,0,59,115,0,0,0,0,59,115, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,255,251,102,0,255,255,255,255, + 255,0,245,255,255,255,255,255,255,255,255,255,255,127,21,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,59,241,89,0,0,0,0,0,138,247,34,138,201,0,0,0,175, + 201,0,0,0,175,166,0,0,59,115,0,0,0,0,59,115,0,0,0,12,235,125,0,0,0,138, + 255,166,0,0,0,0,0,0,0,0,0,0,127,245,255,255,255,255,225,21,0,59,115,0,0, + 0,0,59,115,0,0,0,0,0,0,89,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,7,199,34,0,0,0,59,245,255,255,255,255,125,0,0,0,0,0,0,0,0,0,0,0,0,175, + 125,89,225,21,59,238,47,232,89,7,206,125,0,0,0,0,0,138,251,89,12,235,166, + 0,0,138,225,21,0,0,0,138,201,0,0,0,0,0,0,59,115,0,0,0,0,59,115,0,0,0,7, + 206,201,0,0,0,0,59,115,0,0,0,0,59,115,0,0,0,59,115,0,0,0,0,59,115,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,255,251,89,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,255,255,201,0, + 0,0,138,247,34,175,201,0,0,0,138,255,255,255,255,255,166,0,0,59,115,0,0, + 0,0,59,115,0,0,7,206,166,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,127,89,251, + 89,0,0,0,0,0,59,115,0,0,0,0,59,115,0,0,0,0,0,0,138,201,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,7,199,34,0,0,0,0,0,7,199,34,0,0,0,0,0,0,0,0,0, + 0,0,0,0,59,215,21,138,201,0,12,228,47,228,34,0,175,166,0,0,0,0,0,12,232, + 89,0,0,175,225,21,59,241,89,0,0,0,138,201,0,0,0,0,0,0,59,115,0,0,0,0,59, + 115,0,0,0,138,225,21,0,0,0,0,59,115,0,0,0,0,59,115,0,0,0,59,115,0,0,0,0, + 59,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,255,166,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59, + 245,125,7,206,201,0,0,138,201,0,0,0,175,201,0,0,0,0,0,0,0,59,115,0,0,0, + 0,59,115,0,0,138,225,21,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,127,7,206, + 247,34,0,0,0,0,59,115,0,0,0,0,59,115,0,59,245,125,0,0,175,166,0,0,0,59, + 245,125,175,225,29,206,166,0,89,247,34,7,206,166,0,0,0,7,199,34,0,0,0,0, + 0,7,199,34,0,0,0,0,0,0,0,0,0,0,0,0,7,202,89,0,89,225,21,59,238,47,232,89, + 7,206,125,0,89,166,0,0,89,247,34,0,0,0,130,34,0,138,255,125,0,0,138,201, + 0,0,0,0,0,0,59,115,0,0,0,0,59,115,0,0,89,251,89,0,0,0,0,0,59,115,0,0,0, + 0,59,115,0,0,0,59,115,0,0,0,0,59,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,89,125,0,12,232,89,12,146,0,0,0,59,241,89,0,12,235,247, + 34,0,0,89,125,0,0,59,115,0,0,0,0,59,115,0,59,241,89,0,0,0,0,0,59,241,89, + 0,0,0,0,0,0,0,0,0,0,127,0,0,175,255,255,255,225,21,59,245,255,255,255,255, + 255,125,0,138,225,21,0,12,235,125,0,0,0,138,225,34,235,125,7,206,166,0, + 89,247,34,7,206,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 138,201,0,0,0,175,255,255,125,0,89,255,255,201,0,0,12,235,255,255,251,89, + 0,0,0,0,0,0,0,0,89,255,255,255,255,255,255,255,255,255,125,0,59,245,255, + 255,255,255,255,125,0,0,175,255,255,255,255,255,247,34,59,245,255,255,255, + 255,255,125,0,0,0,59,245,255,255,255,255,255,125,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,255,255,166,0,0,0,0,0,0,0,89,255,255, + 255,125,59,245,255,255,201,0,0,0,59,245,255,255,255,255,255,125,0,175,255, + 255,255,255,127,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,175,166,0,255,255,201,0,0,0,0,175,166,59,238,34,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,228,34,0,0, + 0,0,0,0,0,12,228,34,138,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,0,127,127,127, + 127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,0,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,127,0,127,127,127,0,127,127,127,127,127, + 127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,0, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,127,0,127,127,0,127,127,0,127,127,127,127,0, + 127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127, + 127,0,127,127,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,245,255,255,255,255,255, + 251,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,12,228,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,225,21, + 0,0,0,138,125,0,0,0,0,59,245,255,255,125,0,0,0,0,0,0,0,0,138,225,21,0,0, + 175,166,0,12,228,34,0,0,59,245,255,255,247,34,0,89,225,29,206,166,0,0,0, + 0,0,89,255,255,255,255,125,0,0,0,7,206,255,255,247,34,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,255,255,255,255,125,0,0,0,0,0,0,0, + 0,0,0,0,0,138,255,255,166,0,0,0,0,7,202,89,0,0,0,0,0,12,235,255,125,0,0, + 175,255,255,225,21,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,138,255,255,255, + 255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,228,34,0,0,89,255,255,225,21,0,0, + 0,0,0,0,0,0,0,0,0,138,166,0,0,0,89,225,21,0,0,0,0,0,138,166,0,0,0,89,225, + 21,0,0,0,12,235,255,255,166,0,0,7,206,125,0,0,0,0,0,0,89,247,34,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,225,21,0,0,0,138,125,0,0,0,12, + 235,125,0,59,115,0,0,0,0,0,0,0,0,7,206,125,0,59,215,21,0,12,228,34,0,12, + 235,125,0,0,168,34,0,0,0,0,0,0,0,0,0,0,175,225,21,0,0,0,175,225,21,0,0, + 0,0,0,138,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,225, + 21,0,0,0,175,225,21,0,0,0,0,0,0,0,0,0,59,238,34,7,206,125,0,0,0,7,202,89, + 0,0,0,0,7,199,34,59,238,34,0,0,0,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,89,255,255,255,125,175,125,0,0,0,0,0,0,0,0,0,0,0,0,0,138,255,247,34,0, + 59,241,89,0,175,201,0,0,0,0,0,0,0,0,0,7,206,255,166,0,0,12,232,89,0,0,0, + 0,7,206,255,166,0,0,12,232,89,0,0,0,0,0,0,0,59,215,21,0,89,201,0,0,0,0, + 0,0,0,89,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,7, + 206,255,255,251,89,0,59,241,89,0,0,0,138,201,0,0,0,138,201,0,0,89,225,21, + 175,125,0,0,12,228,34,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,138,166,0, + 89,255,255,247,34,89,201,0,0,89,255,255,255,166,0,0,0,0,168,34,7,151,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,166,7,206,255,255,225,21,89,201,0,0,0, + 0,0,0,0,0,0,89,166,0,0,138,166,0,0,0,7,202,89,0,0,0,0,0,0,0,59,238,34,0, + 7,206,255,125,0,0,0,0,0,0,0,0,0,59,238,34,0,0,175,166,0,175,255,255,255, + 125,175,125,0,138,247,34,0,0,0,0,0,0,0,0,0,0,12,228,34,0,89,201,0,0,89, + 225,0,81,115,0,134,89,0,0,0,0,0,138,166,0,0,138,166,0,0,0,0,0,0,0,138,166, + 0,0,138,166,0,0,0,0,0,0,59,245,247,34,0,12,232,89,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89,201,0,7,206,201,138,125, + 138,125,0,59,241,89,0,0,0,0,175,255,255,255,225,21,0,0,7,206,166,215,21, + 0,0,12,228,34,0,0,138,255,255,251,89,0,0,0,0,0,0,0,0,0,12,206,21,59,241, + 89,0,134,89,0,172,89,59,238,34,0,138,166,0,0,7,206,201,12,235,125,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,12,206,21,7,202,89,12,235,125,0,172,89,0,0,0,0, + 0,0,0,0,59,238,34,7,206,125,12,235,255,255,255,255,255,255,125,0,0,0,12, + 235,125,0,0,0,0,7,206,125,0,0,0,0,0,0,0,0,59,238,34,0,0,175,166,0,175,255, + 255,255,125,175,125,0,138,247,34,0,0,0,0,0,0,0,0,0,0,12,228,34,0,89,201, + 0,0,89,225,0,29,206,166,59,245,125,0,0,0,0,138,166,0,12,228,34,0,175,225, + 21,0,0,0,138,166,0,12,228,42,206,255,255,166,0,0,0,0,12,228,34,138,166, + 0,89,247,34,0,0,0,0,59,238,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0, + 0,0,138,201,0,59,241,89,138,125,0,0,59,245,255,255,255,125,0,0,138,166, + 0,89,201,0,0,0,0,89,255,125,0,0,0,0,0,0,0,7,206,125,0,138,251,89,0,0,0, + 0,0,0,0,0,89,166,0,138,201,0,0,0,0,0,89,166,59,215,21,0,175,166,0,59,245, + 125,89,251,89,0,0,12,235,255,255,255,255,255,255,125,138,255,255,251,89, + 127,166,0,7,202,89,12,232,89,0,89,166,0,0,0,0,0,0,0,0,0,138,255,255,166, + 0,0,0,0,7,202,89,0,0,0,0,0,59,241,89,0,0,0,0,0,7,206,125,0,0,0,0,0,0,0, + 0,59,238,34,0,0,175,166,0,89,255,255,255,125,175,125,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,12,228,34,0,59,241,89,0,175,201,0,0,0,175,201,7,206,201,0,0,0, + 138,166,0,175,166,0,138,200,215,21,0,0,0,138,166,0,175,166,7,151,0,89,247, + 34,0,0,0,59,238,47,228,34,59,219,209,34,0,0,0,89,255,125,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,225,21,59,238,34,138,125,0,0,0,59, + 241,89,0,0,0,0,138,166,0,89,201,0,0,59,245,255,255,255,255,125,0,0,0,0, + 0,59,238,34,0,7,206,125,0,0,0,0,0,0,0,0,89,166,0,138,201,0,0,0,0,0,89,166, + 0,175,255,255,223,166,0,12,235,125,59,241,89,0,0,0,0,0,0,0,0,0,175,125, + 0,0,0,0,0,138,125,0,7,206,255,255,125,0,0,59,157,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,7,202,89,0,0,0,0,7,206,255,255,255,166,7,206,255,255,201,0, + 0,0,0,0,0,0,0,0,59,238,34,0,0,175,166,0,0,89,255,255,125,175,125,0,0,0, + 0,0,0,0,0,0,0,0,0,0,89,255,255,251,89,0,89,255,255,225,21,0,0,0,175,225, + 29,206,166,0,0,0,138,166,59,215,21,59,215,81,215,21,0,0,0,138,166,59,215, + 21,0,0,0,89,225,21,59,245,255,255,125,138,166,7,202,97,199,34,0,0,89,251, + 89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,225,21,59,241, + 89,138,125,0,0,0,89,247,34,0,0,0,0,175,255,255,255,225,21,0,0,0,12,232, + 89,0,0,0,12,228,34,0,12,235,225,21,59,215,21,0,0,0,0,0,0,0,0,12,206,21, + 59,241,89,0,134,89,0,172,89,0,0,0,0,0,0,0,0,7,206,201,12,235,125,0,0,0, + 0,0,0,0,0,175,125,0,0,0,0,0,12,206,21,7,202,89,7,206,125,0,172,89,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,59,238,34,0,0,175,166,0,0,0,0,175,125,175,125,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,166,59,245,125,0,0,0,0,0,0, + 175,125,12,228,34,59,215,21,0,0,0,0,0,175,125,0,0,0,12,232,89,0,0,0,0,0, + 59,238,34,175,125,7,199,34,0,0,175,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,127,0,0,0,0,0,138,225,21,7,206,201,138,125,138,125,7,202,89,0,0,0, + 0,138,201,0,0,0,138,166,0,0,0,12,232,89,0,0,0,12,228,34,0,0,0,175,255,255, + 166,0,0,0,0,0,0,0,0,0,0,138,166,0,89,255,255,247,34,89,201,0,0,0,0,0,0, + 0,0,0,0,0,168,34,7,151,0,0,0,0,0,0,0,0,175,125,0,0,0,0,0,0,138,166,7,202, + 89,0,89,247,124,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,255,255,255, + 255,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,125,0,7,206, + 166,0,0,0,0,175,125,175,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,59,115,0,134,89,0,0,0,0,0,0,59,215,21,59,245,255,255,255,225,21,0, + 0,0,59,215,21,0,0,59,238,34,0,0,0,0,0,0,175,125,7,206,255,255,255,251,89, + 0,138,247,34,0,59,157,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,225, + 21,0,7,206,255,255,251,89,138,255,255,255,255,255,166,0,0,0,0,0,0,0,0,0, + 0,12,232,89,0,0,0,12,228,34,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,175, + 225,21,0,0,0,175,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,175,225,21,0,0,0,175,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,238,198, + 255,251,194,166,0,0,0,0,175,125,175,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,125,0,0,0,0,89,225,21,0,0,0, + 7,206,125,0,0,12,235,255,255,255,166,0,0,0,89,225,21,0,0,0,12,228,34,0, + 0,0,175,255,255,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0, + 0,0,0,0,138,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,228, + 34,0,7,176,21,0,89,247,34,0,0,0,0,0,0,0,0,0,0,0,89,255,255,255,255,125, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89, + 255,255,255,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,238,34,0,0,0,0,0,0,0,0,175, + 125,175,125,0,0,0,0,0,0,0,0,59,215,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0, + 0,0,0,0,0,0,0,138,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,228,34,0,7,206,255,255,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,238,34,0,0,0,0,0,0,0,0,175,125,175,125, + 0,0,0,0,0,0,59,245,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,0,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,0,127,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,127,0, + 127,127,127,127,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,89, + 255,125,0,0,0,0,0,0,12,235,201,0,0,0,0,12,235,251,89,0,0,0,0,175,255,125, + 89,201,0,0,0,0,0,0,0,0,0,0,0,59,245,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,89,255,125,0,0,0,0,0,0,138,251,89,0,0,0,12,235,251, + 89,0,0,0,0,0,0,0,0,7,206,225,21,0,0,0,89,255,125,0,89,255,225,21,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,247,34,172,89,0,0,0,0,7,206,225,21,0,0, + 0,0,0,0,0,89,255,125,0,0,0,0,0,0,89,255,225,21,0,0,0,0,12,235,247,34,172, + 89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89, + 255,125,0,0,0,0,0,0,0,7,206,225,21,0,0,0,0,89,255,225,21,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,89,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0, + 0,89,247,34,0,0,0,0,0,175,166,0,0,0,0,7,206,125,59,241,89,0,0,89,201,12, + 235,247,34,0,0,7,206,166,59,241,89,0,0,12,228,34,59,215,21,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,238,34,0,0,0,0,89,247,34,0,0,0,7, + 206,125,59,241,89,0,7,206,166,59,238,34,0,0,175,166,0,0,59,241,89,0,89, + 247,34,138,201,59,238,34,138,201,0,0,0,0,0,0,0,0,0,0,0,175,125,89,255,201, + 0,0,0,0,0,0,0,175,201,0,0,0,0,0,0,12,232,89,0,0,0,0,0,0,59,238,34,138,225, + 21,0,0,0,175,125,89,255,201,0,0,0,0,59,238,34,138,201,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,247,34,0,0,0,0,0,0,138,201,0,0,0,0, + 0,59,238,34,138,225,21,0,0,0,59,238,34,138,201,0,0,0,0,12,232,89,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,228,34,59,215,21,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,255,125,0, + 0,0,0,127,0,0,12,235,225,21,0,0,0,0,12,235,225,21,0,0,0,0,12,235,225,21, + 0,0,0,0,12,235,225,21,0,0,0,0,12,235,225,21,0,0,0,0,12,235,225,21,0,0,0, + 0,0,175,255,255,255,255,255,255,255,166,0,0,138,255,255,255,251,89,59,245, + 255,255,255,255,127,81,245,255,255,255,255,225,21,59,245,255,255,255,255, + 127,81,245,255,255,255,255,127,111,255,255,255,125,89,255,255,255,125,89, + 255,255,255,125,89,255,255,255,125,7,206,255,255,255,255,125,0,0,59,245, + 247,34,0,0,59,241,89,0,0,0,138,255,255,255,166,0,0,0,0,138,255,255,255, + 166,0,0,0,0,0,138,255,255,255,166,0,0,0,0,138,255,255,255,166,0,0,0,0,138, + 255,255,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,255,255,255,210,235,166, + 59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59, + 241,89,59,241,89,0,0,0,59,241,132,245,125,0,0,0,89,251,89,12,232,89,0,0, + 0,0,7,206,166,0,89,251,89,0,0,0,127,0,0,89,232,241,89,0,0,0,0,89,232,241, + 89,0,0,0,0,89,232,241,89,0,0,0,0,89,232,241,89,0,0,0,0,89,232,241,89,0, + 0,0,0,89,232,241,89,0,0,0,0,12,232,89,89,225,21,0,0,0,0,0,175,247,34,0, + 0,59,192,59,241,89,0,0,0,0,59,241,89,0,0,0,0,0,59,241,89,0,0,0,0,59,241, + 89,0,0,0,0,0,59,241,89,0,0,59,241,89,0,0,59,241,89,0,0,59,241,89,0,7,206, + 166,0,0,59,245,201,0,59,245,255,201,0,0,59,241,89,0,0,138,251,89,0,12,235, + 166,0,0,138,251,89,0,12,235,166,0,0,0,138,251,89,0,12,235,166,0,0,138,251, + 89,0,12,235,166,0,0,138,251,89,0,12,235,166,0,0,0,138,166,0,0,0,12,228, + 34,0,0,175,247,34,0,0,175,225,21,59,241,89,0,0,0,59,241,89,59,241,89,0, + 0,0,59,241,89,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,89,247, + 34,0,7,206,125,0,12,232,89,0,0,0,0,59,241,89,0,12,232,89,0,0,0,127,0,7, + 206,166,175,166,0,0,0,7,206,166,175,166,0,0,0,7,206,166,175,166,0,0,0,7, + 206,166,175,166,0,0,0,7,206,166,175,166,0,0,0,0,175,166,175,166,0,0,0,0, + 138,225,21,89,225,21,0,0,0,0,59,241,89,0,0,0,0,0,59,241,89,0,0,0,0,59,241, + 89,0,0,0,0,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0,0,59,241,89,0,0,59,241, + 89,0,0,59,241,89,0,0,59,241,89,0,7,206,166,0,0,0,59,245,125,59,241,132, + 241,89,0,59,241,89,0,12,235,166,0,0,0,89,247,34,12,235,166,0,0,0,89,247, + 34,0,12,235,166,0,0,0,89,247,34,12,235,166,0,0,0,89,247,34,12,235,166,0, + 0,0,89,247,34,0,0,12,235,125,0,12,235,125,0,0,59,241,89,0,0,138,176,235, + 166,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0, + 59,241,89,59,241,89,0,0,0,59,241,89,0,175,201,0,138,225,21,0,12,235,255, + 255,255,225,21,59,238,34,0,138,225,21,0,0,0,127,0,59,238,34,89,247,34,0, + 0,59,238,34,89,247,34,0,0,59,238,34,89,247,34,0,0,59,238,34,89,247,34,0, + 0,59,238,34,89,247,34,0,0,59,241,89,89,225,21,0,0,7,206,125,0,89,225,21, + 0,0,0,0,138,225,21,0,0,0,0,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0,0,59,241, + 89,0,0,0,0,59,241,89,0,0,0,0,0,59,241,89,0,0,59,241,89,0,0,59,241,89,0, + 0,59,241,89,0,7,206,166,0,0,0,7,206,166,59,241,89,138,225,21,59,241,89, + 0,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,0,59,241,89,0,0,0, + 59,241,89,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,0,0,0,12, + 235,138,235,125,0,0,0,138,225,21,0,59,215,21,175,201,59,241,89,0,0,0,59, + 241,89,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,59,241,89,0, + 0,0,59,241,89,0,59,245,166,241,89,0,0,12,232,89,0,0,175,225,59,238,47,235, + 225,21,0,0,0,0,127,0,138,201,0,12,235,125,0,0,138,201,0,12,235,125,0,0, + 138,201,0,12,235,125,0,0,138,201,0,12,235,125,0,0,138,201,0,12,235,125, + 0,0,138,225,21,12,235,125,0,0,89,247,34,0,89,255,255,255,255,251,89,138, + 225,21,0,0,0,0,0,59,245,255,255,255,255,127,59,245,255,255,255,255,166, + 0,59,245,255,255,255,255,127,59,245,255,255,255,255,127,0,59,241,89,0,0, + 59,241,89,0,0,59,241,89,0,0,59,241,89,7,206,255,255,255,166,0,0,175,201, + 59,241,89,12,235,125,59,241,89,0,59,241,89,0,0,0,12,235,125,59,241,89,0, + 0,0,12,235,125,0,59,241,89,0,0,0,12,235,125,59,241,89,0,0,0,12,235,125, + 59,241,89,0,0,0,12,235,125,0,0,0,0,12,235,125,0,0,0,0,138,225,21,7,199, + 34,0,138,225,81,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,59,241, + 89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,0,0,138,255,166,0,0,0,12,232, + 89,0,0,89,247,59,238,34,0,59,245,125,0,0,0,127,7,206,125,0,0,175,201,0, + 7,206,125,0,0,175,201,0,7,206,125,0,0,175,201,0,7,206,125,0,0,175,201,0, + 7,206,125,0,0,175,201,0,7,206,125,0,0,175,201,0,7,206,255,255,255,255,225, + 21,0,0,0,0,138,225,21,0,0,0,0,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0,0,59, + 241,89,0,0,0,0,59,241,89,0,0,0,0,0,59,241,89,0,0,59,241,89,0,0,59,241,89, + 0,0,59,241,89,0,7,206,166,0,0,0,7,206,166,59,241,89,0,89,247,94,241,89, + 0,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,0,59,241,89,0,0,0, + 59,241,89,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,0,0,0,12, + 235,138,235,125,0,0,0,138,225,21,175,125,0,0,175,201,59,241,89,0,0,0,59, + 241,89,59,241,89,0,0,0,59,241,89,59,241,89,0,0,0,59,241,89,59,241,89,0, + 0,0,59,241,89,0,0,59,241,89,0,0,0,12,232,89,0,7,206,201,59,238,34,0,0,138, + 201,0,0,0,127,59,245,255,255,255,255,247,34,59,245,255,255,255,255,247, + 34,59,245,255,255,255,255,247,34,59,245,255,255,255,255,247,34,59,245,255, + 255,255,255,247,34,59,245,255,255,255,255,247,34,59,241,89,0,0,89,225,21, + 0,0,0,0,59,241,89,0,0,0,0,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0,0,59,241, + 89,0,0,0,0,59,241,89,0,0,0,0,0,59,241,89,0,0,59,241,89,0,0,59,241,89,0, + 0,59,241,89,0,7,206,166,0,0,0,59,241,89,59,241,89,0,7,206,200,241,89,0, + 12,235,166,0,0,0,89,247,34,12,235,166,0,0,0,89,247,34,0,12,235,166,0,0, + 0,89,247,34,12,235,166,0,0,0,89,247,34,12,235,166,0,0,0,89,247,34,0,0,12, + 235,125,0,12,235,125,0,0,59,241,159,166,0,0,12,235,166,12,232,89,0,0,0, + 59,238,34,12,232,89,0,0,0,59,238,34,12,232,89,0,0,0,59,238,34,12,232,89, + 0,0,0,59,238,34,0,0,59,241,89,0,0,0,12,235,255,255,255,201,0,59,238,34, + 0,0,138,201,0,0,0,127,138,201,0,0,0,12,235,125,138,201,0,0,0,12,235,125, + 138,201,0,0,0,12,235,125,138,201,0,0,0,12,235,125,138,201,0,0,0,12,235, + 125,138,201,0,0,0,12,235,125,175,201,0,0,0,89,225,21,0,0,0,0,0,175,247, + 34,0,0,59,192,59,241,89,0,0,0,0,59,241,89,0,0,0,0,0,59,241,89,0,0,0,0,59, + 241,89,0,0,0,0,0,59,241,89,0,0,59,241,89,0,0,59,241,89,0,0,59,241,89,0, + 7,206,166,0,0,59,245,201,0,59,241,89,0,0,59,245,251,89,0,0,138,251,89,0, + 59,245,166,0,0,138,251,89,0,59,245,166,0,0,0,138,251,89,0,59,245,166,0, + 0,138,251,89,0,59,245,166,0,0,138,251,89,0,59,245,166,0,0,0,138,166,0,0, + 0,12,228,34,0,0,175,247,34,0,7,206,225,21,0,138,225,21,0,7,206,166,0,0, + 138,225,21,0,7,206,166,0,0,138,225,21,0,7,206,166,0,0,138,225,21,0,7,206, + 166,0,0,0,59,241,89,0,0,0,12,232,89,0,0,0,0,59,238,34,0,12,235,125,0,0, + 0,127,206,125,0,0,0,0,175,206,206,125,0,0,0,0,175,206,206,125,0,0,0,0,175, + 206,206,125,0,0,0,0,175,206,206,125,0,0,0,0,175,206,206,125,0,0,0,0,175, + 232,245,125,0,0,0,89,255,255,255,255,255,166,0,0,138,255,255,255,251,89, + 59,245,255,255,255,255,127,81,245,255,255,255,255,225,21,59,245,255,255, + 255,255,127,81,245,255,255,255,255,127,111,255,255,255,125,89,255,255,255, + 125,89,255,255,255,125,89,255,255,255,125,7,206,255,255,255,255,125,0,0, + 59,241,89,0,0,0,175,251,89,0,0,0,138,255,255,255,166,0,0,0,0,138,255,255, + 255,166,0,0,0,0,0,138,255,255,255,166,0,0,0,0,138,255,255,255,166,0,0,0, + 0,138,255,255,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,7,202,194,255,255,255,201, + 0,0,0,0,59,245,255,251,89,0,0,0,0,59,245,255,251,89,0,0,0,0,59,245,255, + 251,89,0,0,0,0,59,245,255,251,89,0,0,0,0,59,241,89,0,0,0,12,232,89,0,0, + 0,0,59,238,47,235,255,166,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,12,228,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138, + 166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,166,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,0,127,127,127,127,0,127, + 127,127,127,0,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,0, + 0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,201,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,7,206, + 225,21,0,0,0,0,0,12,235,201,0,0,0,138,255,201,0,0,0,59,245,225,29,202,89, + 0,0,0,0,0,0,0,0,138,166,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,206,225,21,0,0,0,0,0,12,235,201,0,0,0,89,255,225,21,0,0,0,0,0,0,0,0,175, + 247,34,0,12,235,255,255,166,0,0,0,0,0,0,0,0,0,0,0,0,59,245,225,29,202,89, + 0,0,138,251,89,0,0,0,0,0,7,206,225,21,0,0,0,89,255,225,21,0,0,59,245,225, + 29,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,225, + 21,0,0,0,0,0,89,255,125,0,0,0,89,255,225,21,0,0,0,0,0,0,0,0,0,0,0,0,138, + 251,89,0,59,238,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,175, + 166,0,0,0,0,7,206,166,0,0,0,89,225,21,175,201,0,7,202,89,138,255,166,0, + 0,89,247,34,175,166,0,0,138,166,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,7,206,166,0,0,0,0,0,175,166,0,0,0,89,247,34,138,201,0,0,89,247, + 34,175,201,0,0,138,201,0,175,200,215,34,235,247,47,232,0,138,255,225,111, + 225,21,0,0,172,89,138,255,166,0,0,0,0,89,225,21,0,0,0,0,175,201,0,0,0,0, + 89,247,34,138,201,0,0,172,89,138,255,166,0,0,59,238,34,138,201,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,166,0,0,0,0,59,241,89,0,0,0,89, + 247,34,138,201,0,0,0,59,238,34,138,201,0,0,0,89,247,34,0,0,59,238,34,0, + 0,0,0,0,138,225,29,206,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,201,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,225,21,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,12,235,166,0,0,0,0,0,0,0,0,89,166,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,238,34,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,7,206,255,255,255,125,0,7,206,255,255,255, + 125,0,7,206,255,255,255,125,0,7,206,255,255,255,125,0,7,206,255,255,255, + 125,0,12,235,255,255,251,89,0,12,235,255,255,251,89,59,245,255,166,0,0, + 59,245,255,255,201,0,12,235,255,251,89,0,0,12,235,255,251,89,0,0,12,235, + 255,251,89,0,0,12,235,255,251,89,0,59,238,34,59,238,34,59,238,34,59,238, + 34,0,59,241,89,175,225,21,0,59,241,194,255,255,125,0,0,12,235,255,247,34, + 0,0,12,235,255,247,34,0,0,0,12,235,255,247,34,0,0,12,235,255,247,34,0,0, + 12,235,255,247,34,0,0,0,0,0,12,235,166,0,0,0,0,7,206,255,255,225,21,0,59, + 241,89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,59,241,89,0,59,241, + 89,0,59,241,97,206,166,0,0,12,235,125,59,238,163,255,255,201,7,206,166, + 0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,89,247,34,0,0,0,0,89,247, + 34,0,0,0,0,89,247,34,0,0,0,0,89,247,34,0,0,0,0,89,247,34,0,0,0,0,138,225, + 21,0,0,0,0,89,255,225,21,0,138,201,59,245,125,0,0,0,7,206,125,0,89,225, + 21,7,206,125,0,89,225,21,7,206,125,0,89,225,21,7,206,125,0,89,225,21,59, + 238,34,59,238,34,59,238,34,59,238,34,0,0,0,0,12,235,125,0,59,245,166,0, + 89,247,34,7,206,166,0,138,225,21,7,206,166,0,138,225,21,0,7,206,166,0,138, + 225,21,7,206,166,0,138,225,21,7,206,166,0,138,225,21,0,0,0,0,0,0,0,0,0, + 0,12,232,89,0,138,251,89,0,59,241,89,0,59,241,89,59,241,89,0,59,241,89, + 59,241,89,0,59,241,89,0,59,241,89,0,59,241,89,89,247,34,0,89,247,34,59, + 245,166,0,7,206,166,89,247,34,0,89,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0, + 59,241,89,0,0,0,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0,59,241,89,0,0,0,0, + 59,241,89,0,0,0,0,59,238,34,0,0,0,0,12,232,89,0,0,59,238,127,225,21,0,0, + 0,59,238,34,0,59,238,34,59,238,34,0,59,238,34,59,238,34,0,59,238,34,59, + 238,34,0,59,238,34,59,238,34,59,238,34,59,238,34,59,238,34,0,138,255,255, + 255,255,201,0,59,241,89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,59, + 241,89,0,59,241,89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,59,241, + 89,0,12,235,255,255,255,255,255,255,166,138,201,0,59,157,175,201,0,59,241, + 89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,59,241,89,0,59,241,89, + 0,59,241,89,12,235,125,0,175,166,0,59,238,34,0,0,138,225,34,235,125,0,175, + 166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,127,0,89,255,255,255,251,89,0,89,255,255,255,251, + 89,0,89,255,255,255,251,89,0,89,255,255,255,251,89,0,89,255,255,255,251, + 89,0,138,255,255,255,247,34,0,175,255,255,255,255,255,255,255,255,251,127, + 201,0,0,0,0,59,245,255,255,255,251,89,59,245,255,255,255,251,89,59,245, + 255,255,255,251,89,59,245,255,255,255,251,89,59,238,34,59,238,34,59,238, + 34,59,238,34,138,247,34,0,0,138,201,0,59,241,89,0,59,241,89,59,238,34,0, + 12,232,89,59,238,34,0,12,232,89,0,59,238,34,0,12,232,89,59,238,34,0,12, + 232,89,59,238,34,0,12,232,89,0,0,0,0,0,0,0,0,0,0,175,201,7,176,21,138,201, + 0,59,241,89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,59,241,89,0,59, + 241,89,0,59,241,89,0,175,201,12,232,89,0,59,238,34,0,0,138,225,21,175,201, + 12,232,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,59,241,89,0,59,241,89,59,241,89,0,59, + 241,89,59,241,89,0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,59,241,89, + 138,247,34,0,59,238,34,138,225,21,0,12,232,89,0,0,0,0,138,201,0,0,0,0,59, + 238,34,0,0,0,0,59,238,34,0,0,0,0,59,238,34,0,0,0,0,59,238,34,0,0,0,0,59, + 238,34,59,238,34,59,238,34,59,238,34,175,201,0,0,0,138,166,0,59,241,89, + 0,59,241,89,59,241,89,0,59,241,89,59,241,89,0,59,241,89,0,59,241,89,0,59, + 241,89,59,241,89,0,59,241,89,59,241,89,0,59,241,89,0,0,0,0,12,235,166,0, + 0,0,138,201,134,89,0,175,166,0,59,241,89,0,59,241,89,59,241,89,0,59,241, + 89,59,241,89,0,59,241,89,0,59,241,89,0,59,241,89,0,89,247,124,225,21,0, + 59,238,34,0,0,138,201,0,89,247,124,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,89,247, + 34,0,89,251,89,89,247,34,0,89,251,89,89,247,34,0,89,251,89,89,247,34,0, + 89,251,89,89,247,34,0,89,251,89,175,201,0,0,175,247,34,175,201,0,0,59,245, + 225,21,0,7,199,94,245,125,0,0,0,7,206,166,0,7,199,34,7,206,166,0,7,199, + 34,7,206,166,0,7,199,34,7,206,166,0,7,199,34,59,238,34,59,238,34,59,238, + 34,59,238,34,138,247,34,0,12,232,89,0,59,241,89,0,59,241,89,7,206,166,0, + 138,225,21,7,206,166,0,138,225,21,0,7,206,166,0,138,225,21,7,206,166,0, + 138,225,21,7,206,166,0,138,225,21,0,0,0,0,12,235,166,0,0,0,59,245,166,0, + 59,241,89,0,12,235,125,0,175,251,89,12,235,125,0,175,251,89,12,235,125, + 0,175,251,89,0,12,235,125,0,175,251,89,0,7,206,255,125,0,0,59,238,34,0, + 12,235,125,0,7,206,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,175,255,255,232, + 241,89,0,175,255,255,232,241,89,0,175,255,255,232,241,89,0,175,255,255, + 232,241,89,0,175,255,255,232,241,89,12,235,255,255,166,238,34,12,235,255, + 255,225,21,89,255,255,251,89,0,89,255,255,255,201,0,12,235,255,251,89,0, + 0,12,235,255,251,89,0,0,12,235,255,251,89,0,0,12,235,255,251,89,0,59,238, + 34,59,238,34,59,238,34,59,238,34,0,138,255,255,255,125,0,0,59,241,89,0, + 59,241,89,0,12,235,255,247,34,0,0,12,235,255,247,34,0,0,0,12,235,255,247, + 34,0,0,12,235,255,247,34,0,0,12,235,255,247,34,0,0,0,0,0,0,0,0,0,0,0,7, + 206,255,255,225,21,0,0,0,89,255,255,166,241,89,0,89,255,255,166,241,89, + 0,89,255,255,166,241,89,0,0,89,255,255,166,241,89,0,0,138,247,34,0,0,59, + 245,166,255,255,166,0,0,0,138,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,215,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,232,89,0,0,0,59,238,34,0,0,0,0,0, + 12,232,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,12,235,255,125,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,138,225,21,0,0,0,59,238,34,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,0,127,127,0,127,127, + 0,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +}; + + +// Large font anti-aliased +const int FONT2AA_BM_W = 276; +const int FONT2AA_BM_H = 120; +static const unsigned char s_Font2AA[] = +{ + 127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, + 4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0, + 0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,59,245,125,175,225,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,138,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,59,241,89,0,0,12,235,201,89,255,166,0,0,0,0,0,172,89,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,225,21,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,0, + 0,0,0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0,0,0,138,247,34,0,12, + 232,89,138,225,21,0,0,0,0,138,125,7,199,34,0,0,0,0,138,125,0,0,0,0,138, + 255,255,201,0,0,0,59,215,21,0,0,0,0,59,245,255,255,166,0,0,0,59,241,89, + 0,7,206,201,0,0,89,251,89,0,59,215,21,172,89,59,192,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,166,0,0,138,255,251,89,0,0,0,0,0, + 138,201,0,0,0,7,206,255,255,255,166,0,0,7,206,255,255,255,201,0,0,0,0,0, + 0,138,251,89,0,0,175,255,255,255,255,225,21,0,0,12,235,255,255,125,89,255, + 255,255,255,255,251,89,0,12,235,255,255,225,21,0,0,59,245,255,255,166,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,59,245,255,255,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, + 4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0,0,0,89,247, + 34,0,12,232,89,138,201,0,0,0,0,7,202,89,59,215,21,0,0,12,235,255,255,255, + 166,0,59,241,89,12,235,125,0,0,172,89,0,0,0,0,7,206,166,0,89,251,89,0,0, + 12,228,34,0,89,247,34,0,0,0,175,201,0,0,89,251,191,194,247,34,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,232,89,0,175,201,0,12,235, + 125,0,0,138,255,255,201,0,0,0,12,182,0,0,59,245,125,0,12,206,21,0,12,235, + 166,0,0,0,0,89,255,251,89,0,0,175,201,0,0,0,0,0,0,89,255,125,0,0,0,0,0, + 0,0,0,89,251,89,12,235,166,0,7,206,201,0,59,245,125,0,12,235,166,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,89,166,0,0,138,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,0, + 0,0,0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0,0,0,89,247,34,0,12, + 228,34,89,201,0,0,0,0,12,206,21,89,166,0,0,12,235,125,138,125,59,192,0, + 89,247,34,7,206,166,0,89,201,0,0,0,0,0,12,235,125,0,12,232,89,0,0,12,228, + 34,0,175,201,0,0,0,0,59,241,89,0,0,7,206,166,0,0,0,0,0,0,0,138,166,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,225,21,59,241,89,0,0,138,225,21,0, + 0,0,175,201,0,0,0,0,0,0,0,7,206,201,0,0,0,0,0,0,175,201,0,0,0,59,241,132, + 241,89,0,0,175,201,0,0,0,0,0,7,206,166,0,0,0,0,0,0,0,0,7,206,201,0,59,241, + 89,0,0,138,225,21,138,225,21,0,0,138,225,21,89,255,125,0,0,89,255,125,0, + 0,0,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,138,201,0,0,0,0,0,0,0,0, + 0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0, + 0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0,0,0,89,247,34,0,0,0,0,0,0,0, + 0,89,255,255,255,255,255,255,255,125,59,238,34,138,125,0,0,0,89,247,34, + 7,206,166,7,202,89,0,0,0,0,0,0,175,225,21,138,225,21,0,0,0,0,0,12,235,125, + 0,0,0,0,7,206,125,0,89,251,191,194,247,34,0,0,0,0,0,138,166,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,138,166,0,89,247,34,0,0,89,247,34,0,0,0,175,201, + 0,0,0,0,0,0,0,12,235,166,0,0,0,0,0,59,245,125,0,0,12,235,125,59,241,89, + 0,0,175,201,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,89,247,34,0,12,235,201, + 0,0,175,201,0,138,225,21,0,0,89,247,34,89,255,125,0,0,89,255,125,0,0,0, + 0,0,12,235,255,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,175,255,251,89,0,0,0,0, + 0,0,0,0,138,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,0, + 0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0,0,0,89,247,34,0,0,0,0,0, + 0,0,0,0,0,175,125,7,199,34,0,0,12,235,166,138,125,0,0,0,59,241,89,12,235, + 125,89,201,12,235,255,251,89,0,0,7,206,255,166,0,59,241,89,0,0,0,59,238, + 34,0,0,0,0,0,175,166,59,215,21,172,89,59,192,0,0,0,0,0,138,166,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,125,0,138,247,34,0,0,89,247,34,0,0,0, + 175,201,0,0,0,0,0,0,0,89,251,89,0,0,0,89,255,247,34,0,0,7,206,166,0,59, + 241,89,0,0,175,255,255,255,225,21,0,89,251,226,255,255,247,34,0,0,0,7,206, + 166,0,0,0,12,235,255,255,201,0,0,89,255,125,0,0,138,247,34,0,0,0,0,0,0, + 0,0,0,0,0,89,255,255,166,0,0,0,0,0,175,255,255,255,255,255,255,225,21,0, + 0,0,0,59,245,255,201,0,0,0,0,0,175,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0, + 0,0,89,225,21,0,0,0,0,0,0,0,0,0,7,199,34,59,215,21,0,0,0,59,245,255,255, + 201,0,0,0,138,255,255,201,12,228,34,175,166,0,138,201,0,12,235,125,89,255, + 125,59,241,89,0,0,0,59,238,34,0,0,0,0,0,138,201,0,0,0,172,89,0,0,0,7,206, + 255,255,255,255,255,255,247,34,0,0,0,0,89,255,255,255,166,0,0,0,0,0,59, + 238,34,0,138,247,34,0,0,89,247,34,0,0,0,175,201,0,0,0,0,0,0,59,245,166, + 0,0,0,0,0,0,12,235,166,0,138,201,0,0,59,241,89,0,0,0,0,0,12,235,201,0,138, + 251,89,0,0,175,225,21,0,0,89,247,34,0,0,7,206,166,0,175,255,166,0,0,89, + 255,255,255,223,247,34,0,0,0,0,0,0,0,0,0,0,175,247,34,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,225,21,0,0,175,225,21,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0, + 0,0,127,0,0,0,0,0,59,215,21,0,0,0,0,0,0,0,12,235,255,255,255,255,255,255, + 166,0,0,0,0,138,125,175,225,21,0,0,0,0,0,138,166,7,206,125,0,89,247,34, + 138,225,21,0,89,255,166,215,21,0,0,0,59,238,34,0,0,0,0,0,138,201,0,0,0, + 0,0,0,0,0,0,0,0,0,138,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,201,0, + 0,89,247,34,0,0,89,247,34,0,0,0,175,201,0,0,0,0,0,12,235,201,0,0,0,0,0, + 0,0,0,138,225,21,175,255,255,255,255,255,255,125,0,0,0,0,0,138,247,34,89, + 247,34,0,0,59,241,89,0,7,206,166,0,0,0,138,247,34,0,0,138,247,34,0,0,0, + 0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,89,255,255,166,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,59,245,255,201,0,0,0,0,175,201,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0, + 127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,166,0,175,125,0,0,0,0,0,0,138, + 125,89,247,34,0,0,0,0,12,228,34,7,206,125,0,89,247,34,138,247,34,0,0,89, + 255,166,0,0,0,0,59,238,34,0,0,0,0,0,175,166,0,0,0,0,0,0,0,0,0,0,0,0,138, + 166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,125,0,0,59,241,89,0,0,138,225, + 21,0,0,0,175,201,0,0,0,0,12,235,201,0,0,0,0,0,0,0,0,0,138,225,21,0,0,0, + 0,59,241,89,0,0,0,0,0,0,138,225,21,59,241,89,0,0,59,241,89,0,89,247,34, + 0,0,0,138,247,34,0,0,89,251,89,0,0,0,0,7,206,166,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,12,235,255,225,21,0,0,175,255,255,255,255,255,255,225,21,0,0,175, + 255,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0,0,0,89,247, + 34,0,0,0,0,0,0,0,0,0,175,125,7,199,34,0,0,0,89,201,0,138,125,175,201,0, + 0,0,0,0,138,166,0,0,175,166,0,138,201,0,89,255,166,0,0,89,255,255,125,0, + 0,0,12,235,125,0,0,0,0,7,206,125,0,0,0,0,0,0,0,0,0,0,0,0,138,166,0,0,0, + 0,0,138,255,125,0,0,0,0,0,0,175,247,34,59,238,34,0,0,0,175,201,0,12,235, + 125,0,0,0,0,175,201,0,0,0,12,235,166,0,0,0,0,0,89,166,0,0,59,245,166,0, + 0,0,0,0,59,241,89,0,59,215,21,0,12,235,166,0,7,206,201,0,0,175,225,21,7, + 206,166,0,0,0,0,59,245,166,0,7,206,225,21,0,0,0,0,175,225,21,0,89,255,125, + 0,0,12,235,201,0,0,0,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,138,201, + 0,0,0,0,0,0,0,0,0,175,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0,0,0,89,247, + 34,0,0,0,0,0,0,0,0,7,199,34,59,215,21,0,0,0,12,235,255,255,255,201,0,0, + 0,0,0,59,215,21,0,0,12,235,255,251,89,0,0,89,255,255,255,201,0,89,255,0, + 0,0,0,175,201,0,0,0,0,59,238,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175, + 201,0,0,0,0,0,0,0,175,247,34,138,201,0,0,0,0,0,138,255,251,89,0,0,0,138, + 255,255,255,255,166,0,89,255,255,255,255,255,247,34,12,235,255,255,255, + 166,0,0,0,0,0,0,59,241,89,0,12,235,255,255,255,166,0,0,0,7,206,255,255, + 225,21,0,138,247,34,0,0,0,0,0,59,245,255,255,201,0,0,0,175,255,255,201, + 0,0,0,89,255,125,0,0,89,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,175,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,4,4,4,4,4,4,4,4,52,4,4,4,4,4,4,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,125,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,247,34,0,0,0,175,201,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,232,89,0,0,0,0,0,0,0,0,0,0,175,125, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,125,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,201,0,0,89,251,89,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,201,0,0,0,0,0,0,0,0,0,0,12,232,89, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,232,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,4,4,0,0,0,0,0,127,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,201,0,0,201,201,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,127,127,127,0,127,127,127, + 127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,0,127,127,0,127,127,127,127,0,127,127, + 127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 127,0,127,127,127,0,127,127,127,127,0,127,127,127,0,127,127,127,127,0,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,255, + 201,0,138,201,0,0,0,0,89,255,255,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,127,0,0,0,0,175,255,255,255,247,34,0,0,0,0,0,7,206,251,89,0,0,12,0, + 235,255,255,255,255,201,0,0,0,0,59,245,255,255,255,201,12,0,235,255,255, + 255,255,166,0,0,0,12,235,255,255,255,255,255,127,12,235,255,255,255,255, + 251,89,0,0,12,235,255,255,255,251,89,12,235,166,0,0,0,12,235,125,89,255, + 255,255,201,0,0,175,255,255,225,21,12,235,166,0,0,7,206,251,102,0,235,166, + 0,0,0,0,12,235,251,89,0,0,0,89,255,225,21,12,235,251,89,0,0,12,235,125, + 0,0,0,138,255,255,166,0,0,0,12,235,255,255,255,251,89,0,0,0,0,175,255,255, + 201,0,0,0,12,235,255,255,255,251,89,0,0,0,12,235,255,255,255,247,47,235, + 255,255,255,255,255,255,255,138,0,235,125,0,0,0,59,245,133,206,166,0,0, + 0,0,59,245,255,133,201,0,0,0,138,251,89,0,0,12,235,133,206,247,34,0,0,0, + 175,229,216,225,21,0,0,0,138,247,124,255,255,255,255,255,255,125,7,206, + 125,0,0,0,59,238,34,0,0,0,0,0,12,235,125,0,0,0,0,175,247,34,0,0,0,0,0,0, + 0,0,0,0,127,0,0,59,245,166,0,0,0,59,245,166,0,0,0,0,59,245,255,166,0,0, + 12,0,235,166,0,0,59,245,125,0,0,138,255,125,0,0,7,202,102,0,235,166,0,0, + 59,245,225,21,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,0,89,255,166, + 0,0,0,89,127,12,235,166,0,0,0,12,235,125,0,12,235,125,0,0,0,0,0,138,225, + 21,12,235,166,0,7,206,225,21,12,0,235,166,0,0,0,0,12,235,255,166,0,0,7, + 206,255,225,21,12,235,255,201,0,0,12,235,125,0,59,245,166,0,0,138,251,89, + 0,12,235,166,0,0,138,251,89,0,89,255,125,0,0,89,255,125,0,12,235,166,0, + 0,138,251,89,0,12,235,166,0,0,7,202,89,0,0,0,138,225,21,0,0,12,0,235,125, + 0,0,0,59,245,125,138,225,21,0,0,0,138,225,151,34,247,34,0,0,175,255,125, + 0,0,89,247,34,12,235,166,0,0,89,247,34,59,245,125,0,0,59,245,125,0,0,0, + 0,0,138,247,34,7,206,125,0,0,0,7,206,125,0,0,0,0,0,12,235,125,0,0,0,138, + 225,187,201,0,0,0,0,0,0,0,0,0,0,127,0,12,232,89,0,0,0,0,0,12,232,89,0,0, + 0,138,225,151,225,21,0,12,0,235,166,0,0,12,235,166,0,12,235,166,0,0,0,0, + 0,12,0,235,166,0,0,0,12,235,166,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0, + 0,0,12,235,166,0,0,0,0,0,0,12,235,166,0,0,0,12,235,125,0,12,235,125,0,0, + 0,0,0,138,225,21,12,235,166,0,175,225,21,0,12,0,235,166,0,0,0,0,12,235, + 166,238,34,0,59,215,187,225,21,12,235,166,245,125,0,12,235,125,12,235,125, + 0,0,0,0,138,247,34,12,235,166,0,0,12,235,166,12,235,125,0,0,0,0,138,247, + 34,12,235,166,0,0,12,235,166,0,89,247,34,0,0,0,0,0,0,0,0,138,225,21,0,0, + 12,0,235,125,0,0,0,59,245,125,59,241,89,0,0,7,206,166,59,0,241,89,0,12, + 232,194,201,0,0,138,225,21,0,89,251,89,12,235,166,0,0,138,247,34,7,206, + 201,0,0,0,0,0,59,245,125,0,7,206,125,0,0,0,0,138,201,0,0,0,0,0,12,235,125, + 0,0,59,241,89,12,235,166,0,0,0,0,0,0,0,0,0,127,0,175,166,0,59,245,255,255, + 247,34,138,201,0,0,7,206,166,59,241,89,0,12,0,235,166,0,0,89,251,89,0,89, + 247,34,0,0,0,0,0,12,0,235,166,0,0,0,0,138,225,21,12,235,166,0,0,0,0,0,12, + 235,166,0,0,0,0,0,89,247,34,0,0,0,0,0,0,12,235,166,0,0,0,12,235,125,0,12, + 235,125,0,0,0,0,0,138,225,21,12,235,166,175,247,34,0,0,12,0,235,166,0,0, + 0,0,12,235,133,206,166,0,175,166,175,225,21,12,235,125,138,225,21,12,235, + 125,89,247,34,0,0,0,0,59,245,125,12,235,166,0,0,12,235,166,89,247,34,0, + 0,0,0,59,245,125,12,235,166,0,0,12,235,125,0,89,255,125,0,0,0,0,0,0,0,0, + 138,225,21,0,0,12,0,235,125,0,0,0,59,245,125,7,206,201,0,0,59,241,89,7, + 0,206,166,0,59,215,111,225,21,7,206,166,0,0,0,175,225,187,225,21,0,0,12, + 235,166,89,247,34,0,0,0,0,7,206,201,0,0,7,206,125,0,0,0,0,89,225,21,0,0, + 0,0,12,235,125,0,12,235,166,0,0,59,241,89,0,0,0,0,0,0,0,0,127,0,202,89, + 12,235,125,0,12,228,34,59,215,0,0,59,241,89,7,206,166,0,12,0,235,255,255, + 255,255,166,0,0,138,225,21,0,0,0,0,0,12,0,235,166,0,0,0,0,89,247,34,12, + 235,255,255,255,255,247,34,12,235,255,255,255,255,247,0,163,225,21,0,0, + 0,0,0,0,12,235,255,255,255,255,255,255,125,0,12,235,125,0,0,0,0,0,138,225, + 21,12,235,255,247,34,0,0,0,12,0,235,166,0,0,0,0,12,235,125,89,225,34,228, + 34,175,225,21,12,235,125,12,235,125,12,235,125,138,225,21,0,0,0,0,12,235, + 166,12,235,166,0,0,175,247,34,138,225,21,0,0,0,0,12,235,166,12,235,166, + 0,0,175,225,21,0,0,175,255,255,225,21,0,0,0,0,0,138,225,21,0,0,12,0,235, + 125,0,0,0,59,245,125,0,138,247,34,0,138,225,21,0,0,175,201,0,138,201,12, + 232,89,12,235,125,0,0,0,12,235,251,89,0,0,0,0,89,255,255,125,0,0,0,0,0, + 138,247,34,0,0,7,206,125,0,0,0,0,12,232,89,0,0,0,0,12,235,125,7,206,201, + 0,0,0,0,138,251,89,0,0,0,0,0,0,0,127,7,228,34,89,225,21,0,12,228,34,12, + 228,0,0,138,225,21,0,138,225,21,12,0,235,166,0,0,12,235,201,0,138,225,21, + 0,0,0,0,0,12,0,235,166,0,0,0,0,89,247,34,12,235,166,0,0,0,0,0,12,235,166, + 0,0,0,0,0,138,225,21,0,12,235,255,255,127,12,235,166,0,0,0,12,235,125,0, + 12,235,125,0,0,0,0,0,138,225,21,12,235,229,216,225,21,0,0,12,0,235,166, + 0,0,0,0,12,235,125,12,235,223,201,0,175,225,21,12,235,125,0,138,225,34, + 235,125,138,225,21,0,0,0,0,12,235,166,12,235,255,255,255,247,34,0,138,225, + 21,0,0,0,0,12,235,166,12,235,255,255,255,166,0,0,0,0,0,0,89,255,255,247, + 34,0,0,0,138,225,21,0,0,12,0,235,125,0,0,0,59,245,125,0,59,245,125,7,206, + 166,0,0,0,89,247,34,175,125,7,206,125,89,247,34,0,0,0,12,235,251,89,0,0, + 0,0,7,206,225,21,0,0,0,0,59,245,125,0,0,0,7,206,125,0,0,0,0,0,175,166,0, + 0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,12,228,34,89,225, + 21,0,12,228,34,59,215,0,7,206,255,255,255,255,251,89,12,0,235,166,0,0,0, + 138,247,0,124,247,34,0,0,0,0,0,12,0,235,166,0,0,0,0,138,225,21,12,235,166, + 0,0,0,0,0,12,235,166,0,0,0,0,0,89,247,34,0,0,0,0,175,127,12,235,166,0,0, + 0,12,235,125,0,12,235,125,0,0,0,0,0,138,225,21,12,235,166,59,245,201,0, + 0,12,0,235,166,0,0,0,0,12,235,125,0,138,251,89,0,175,225,21,12,235,125, + 0,12,235,138,235,125,89,247,34,0,0,0,0,59,245,125,12,235,166,0,0,0,0,0, + 89,247,34,0,0,0,0,59,245,125,12,235,166,0,175,247,34,0,0,0,0,0,0,0,59,245, + 166,0,0,0,138,225,21,0,0,12,0,235,125,0,0,0,59,241,89,0,7,206,201,59,241, + 89,0,0,0,59,241,102,232,89,0,138,201,138,225,21,0,0,0,175,201,175,225,21, + 0,0,0,0,175,225,21,0,0,0,7,206,201,0,0,0,0,7,206,125,0,0,0,0,0,89,225,21, + 0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,12,232,89,59,241, + 89,0,89,247,34,89,201,0,59,241,89,0,0,7,206,166,12,0,235,166,0,0,0,138, + 225,0,81,245,166,0,0,0,0,0,12,0,235,166,0,0,0,12,235,166,0,12,235,166,0, + 0,0,0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,175,127,12,235,166,0,0, + 0,12,235,125,0,12,235,125,0,0,0,0,0,138,225,21,12,235,166,0,89,255,166, + 0,12,0,235,166,0,0,0,0,12,235,125,0,12,182,0,0,175,225,21,12,235,125,0, + 0,138,232,245,125,12,235,125,0,0,0,0,138,247,34,12,235,166,0,0,0,0,0,12, + 235,125,0,0,0,0,138,247,34,12,235,166,0,7,206,225,21,0,0,0,0,0,0,12,235, + 166,0,0,0,138,225,21,0,0,12,0,235,166,0,0,0,89,251,89,0,0,138,247,163,225, + 21,0,0,0,7,206,200,215,21,0,89,225,187,166,0,0,0,89,251,89,12,235,166,0, + 0,0,0,175,225,21,0,0,0,138,247,34,0,0,0,0,7,206,125,0,0,0,0,0,12,232,89, + 0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,12,175,166,0,89, + 255,255,210,235,255,255,125,0,138,225,21,0,0,0,138,247,47,0,235,166,0,0, + 59,245,166,0,0,138,255,125,0,0,7,202,102,0,235,166,0,0,12,235,225,21,0, + 12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,0,138,255,125,0,0,0,175,127,12, + 235,166,0,0,0,12,235,125,0,12,235,125,0,0,0,0,7,206,201,0,12,235,166,0, + 0,138,255,125,12,0,235,166,0,0,0,12,0,235,125,0,0,0,0,0,175,225,21,12,235, + 125,0,0,12,235,255,125,0,89,255,125,0,0,89,251,89,0,12,235,166,0,0,0,0, + 0,0,89,255,125,0,0,89,255,125,0,12,235,166,0,0,12,235,201,0,138,166,0,0, + 0,138,251,89,0,0,0,138,225,21,0,0,0,0,138,247,34,0,7,206,225,21,0,0,12, + 235,255,166,0,0,0,0,0,175,255,201,0,0,12,235,255,125,0,0,12,235,166,0,0, + 138,251,89,0,0,0,175,225,21,0,0,89,251,89,0,0,0,0,0,7,206,125,0,0,0,0,0, + 0,175,166,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,59,241, + 89,0,0,0,0,0,0,0,0,7,206,166,0,0,0,0,59,245,138,0,235,255,255,255,255,125, + 0,0,0,0,59,245,255,255,255,201,12,0,235,255,255,255,255,166,0,0,0,12,235, + 255,255,255,255,255,127,12,235,166,0,0,0,0,0,0,0,59,245,255,255,255,225, + 21,12,235,166,0,0,0,12,235,125,89,255,255,255,210,127,235,255,255,225,21, + 0,12,235,166,0,0,0,175,255,127,0,235,255,255,255,247,47,0,235,125,0,0,0, + 0,0,175,225,21,12,235,125,0,0,0,138,255,125,0,0,0,175,255,255,201,0,0,0, + 12,235,166,0,0,0,0,0,0,0,0,175,255,255,201,0,0,0,12,235,166,0,0,0,89,255, + 225,34,235,255,255,255,247,34,0,0,0,0,138,225,21,0,0,0,0,0,138,255,255, + 255,201,0,0,0,0,0,175,251,89,0,0,0,0,0,89,255,166,0,0,7,206,247,34,0,7, + 206,225,21,0,0,7,206,225,21,0,0,175,225,21,0,0,138,255,255,255,255,255, + 255,166,7,206,125,0,0,0,0,0,0,138,201,0,0,0,12,235,125,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,127,0,0,89,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,201,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,7,206,125,0,0,0,0,0,0,59,238,34,0,0,12,235,125,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,127,0,0,0,7,206,255,255,255,225,21,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,251,89,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,7,206,125,0,0,0,0,0,0,7,206,125,0,0,12,235,125,0,0,0, + 0,0,0,0,0,0,0,245,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138, + 255,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,255,201,0,0,0,0,0,0,89,89,255,255, + 255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 0,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127, + 127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,59,245,166,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,89,247,34,0,0,0,0,0,0,0,0,0,0,12,235, + 125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,12,235, + 255,247,0,0,0,0,0,0,0,12,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125, + 0,0,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,255,251,89,0,7,206,125,0,89,255,251,89, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,84,84,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,7,206, + 125,0,0,0,0,0,0,0,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138, + 225,21,0,0,0,0,0,0,0,0,0,175,201,0,0,0,0,0,0,0,0,0,12,12,235,125,0,0,0, + 0,0,59,245,102,0,89,247,34,12,235,125,0,0,0,0,0,12,235,125,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 59,241,89,0,0,0,7,206,125,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 4,4,4,4,4,4,4,4,100,252,252,84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12, + 235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,12,0, + 235,125,0,0,0,0,0,0,0,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125, + 0,0,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235, + 125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,247,34,0,0,0,7,206,125,0,0,0,59,238, + 34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,20,236,252,164,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0, + 0,0,0,0,0,0,0,12,235,255,255,255,166,0,12,235,166,245,255,247,34,0,0,12, + 235,255,255,247,34,0,34,235,255,255,255,225,21,0,12,235,255,255,225,29, + 0,206,255,255,255,127,0,12,235,255,255,255,225,21,12,235,138,235,255,247, + 34,0,12,235,102,175,255,247,34,12,235,125,0,59,245,201,0,12,235,125,12, + 0,235,166,245,255,225,29,206,255,251,89,0,12,235,138,235,255,247,34,0,0, + 12,235,255,255,201,0,0,12,235,166,245,255,251,89,0,0,12,235,255,255,255, + 225,21,12,235,138,235,247,127,34,138,255,255,255,206,0,206,255,255,255, + 201,59,241,89,0,0,89,247,42,206,201,0,0,0,138,225,187,201,0,0,138,225,21, + 0,59,241,187,226,247,34,0,7,206,206,206,201,0,0,0,138,225,151,255,255,255, + 255,247,0,0,89,247,34,0,0,0,7,206,125,0,0,0,59,238,34,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,4,4,4,4,4,4,4,148,252,236,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,12,206, + 21,0,59,245,125,12,235,247,34,0,138,225,21,12,235,166,0,0,134,102,0,235, + 166,0,0,138,225,21,12,235,125,0,0,175,201,12,0,235,125,0,0,12,235,166,0, + 0,138,225,21,12,235,247,34,0,175,201,0,12,235,102,0,89,247,34,12,235,125, + 12,235,166,0,0,12,235,125,12,0,235,225,21,12,235,251,89,0,175,201,0,12, + 235,247,34,0,175,201,0,12,235,166,0,7,206,201,0,12,235,225,21,0,175,225, + 21,12,235,166,0,0,138,225,21,12,235,247,34,0,0,89,247,34,0,12,206,34,0, + 235,125,0,0,59,241,89,0,0,89,247,34,89,247,34,0,7,206,166,138,225,21,7, + 206,251,89,0,89,225,138,34,235,201,0,138,225,21,89,247,34,0,7,206,166,0, + 0,0,7,206,166,0,0,89,225,21,0,0,0,7,206,125,0,0,0,59,241,89,0,0,0,0,138, + 251,89,0,0,7,202,89,0,0,4,4,4,4,4,4,52,252,252,108,4,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0, + 0,0,0,0,0,0,0,0,7,206,102,12,235,125,0,0,59,241,89,138,225,21,0,0,0,34, + 89,225,21,0,0,138,225,21,89,225,21,0,0,89,247,47,0,235,125,0,0,89,225,21, + 0,0,138,225,21,12,235,125,0,0,89,247,34,12,235,102,0,89,247,34,12,235,138, + 235,166,0,0,0,12,235,125,12,0,235,125,0,7,206,166,0,0,138,225,21,12,235, + 125,0,0,89,247,34,138,225,21,0,0,59,238,34,12,235,125,0,0,59,241,89,89, + 225,21,0,0,138,225,21,12,235,125,0,0,0,138,225,21,0,0,0,12,0,235,125,0, + 0,59,241,89,0,0,89,247,34,12,235,125,0,59,241,89,59,238,34,12,228,198,166, + 0,175,166,59,0,89,251,132,241,89,0,12,235,125,0,59,238,34,0,0,0,138,225, + 21,0,12,235,166,0,0,0,0,7,206,125,0,0,0,0,175,201,0,0,0,138,166,12,235, + 166,0,12,232,89,0,0,12,84,4,4,4,4,204,252,204,4,4,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0, + 0,0,0,59,245,255,255,255,102,12,235,125,0,0,12,235,125,175,201,0,0,0,0, + 0,175,201,0,0,0,138,225,21,175,255,255,255,255,255,247,47,0,235,125,0,0, + 175,201,0,0,0,138,225,21,12,235,125,0,0,89,247,34,12,235,102,0,89,247,34, + 12,235,255,225,21,0,0,0,12,235,125,12,0,235,125,0,7,206,166,0,0,138,225, + 21,12,235,125,0,0,89,247,34,175,201,0,0,0,12,232,89,12,235,125,0,0,12,235, + 125,175,201,0,0,0,138,225,21,12,235,125,0,0,0,59,245,255,247,34,0,12,0, + 235,125,0,0,59,241,89,0,0,89,247,34,0,175,201,0,138,201,0,12,235,125,89, + 201,89,225,29,206,125,12,0,0,175,255,166,0,0,0,175,201,0,138,201,0,0,0, + 89,251,89,0,138,247,34,0,0,0,0,0,7,206,125,0,0,0,0,0,89,255,125,7,202,89, + 0,89,251,89,89,201,0,0,0,172,252,84,4,4,100,252,252,60,4,4,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0, + 0,0,0,0,0,0,0,89,255,166,0,7,206,102,12,235,125,0,0,12,235,125,175,201, + 0,0,0,0,0,175,201,0,0,0,138,225,21,175,201,0,0,0,0,0,12,0,235,125,0,0,175, + 201,0,0,0,138,225,21,12,235,125,0,0,89,247,34,12,235,102,0,89,247,34,12, + 235,138,235,201,0,0,0,12,235,125,12,0,235,125,0,7,206,166,0,0,138,225,21, + 12,235,125,0,0,89,247,34,175,201,0,0,0,12,232,89,12,235,125,0,0,12,235, + 125,175,201,0,0,0,138,225,21,12,235,125,0,0,0,0,0,138,255,255,201,12,0, + 235,125,0,0,59,241,89,0,0,89,247,34,0,89,247,42,206,125,0,0,175,166,175, + 125,12,232,102,232,89,0,0,0,175,255,201,0,0,0,89,247,47,235,125,0,0,12, + 235,166,0,0,0,12,235,125,0,0,0,0,7,206,125,0,0,0,0,138,201,0,0,12,232,89, + 0,0,59,245,225,21,0,0,0,196,252,244,60,20,236,252,156,4,4,4,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0, + 0,0,0,0,0,0,0,175,201,0,0,7,206,102,12,235,125,0,0,59,241,89,138,225,21, + 0,0,0,34,89,225,21,0,0,138,225,21,138,247,34,0,0,0,0,12,0,235,125,0,0,138, + 225,21,0,0,138,225,21,12,235,125,0,0,89,247,34,12,235,102,0,89,247,34,12, + 235,125,59,245,125,0,0,12,235,125,12,0,235,125,0,7,206,166,0,0,138,225, + 21,12,235,125,0,0,89,247,34,138,225,21,0,0,89,247,34,12,235,125,0,0,59, + 241,89,138,225,21,0,0,138,225,21,12,235,125,0,0,0,0,0,0,0,89,247,47,0,235, + 125,0,0,59,241,89,0,0,89,247,34,0,12,235,166,238,34,0,0,138,210,228,34, + 0,175,166,215,21,0,0,89,251,159,251,89,0,0,12,235,191,247,34,0,0,175,225, + 21,0,0,0,0,138,225,21,0,0,0,7,206,125,0,0,0,12,232,89,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,20,220,252,236,180,252,244,28,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0, + 138,225,21,0,138,255,102,12,235,125,0,7,206,201,0,12,235,166,0,0,134,132, + 0,245,125,0,59,245,225,21,12,235,201,0,0,12,206,34,0,235,125,0,0,59,245, + 125,0,12,235,225,21,12,235,125,0,0,89,247,34,12,235,102,0,89,247,34,12, + 235,125,0,138,251,89,0,12,235,125,12,0,235,125,0,7,206,166,0,0,138,225, + 21,12,235,125,0,0,89,247,34,12,235,166,0,7,206,201,0,12,235,125,0,7,206, + 201,0,59,245,125,0,12,235,225,21,12,235,125,0,0,0,138,125,0,0,138,225,29, + 0,206,166,0,0,7,206,166,0,59,245,247,34,0,0,175,255,201,0,0,0,59,245,225, + 21,0,89,255,201,0,0,12,235,166,0,175,225,21,0,0,138,255,166,0,0,89,251, + 89,0,0,0,0,0,89,247,34,0,0,0,7,206,125,0,0,0,59,238,34,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,4,36,236,252,252,252,108,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0, + 7,206,255,255,171,206,102,12,232,226,255,255,225,21,0,0,12,235,255,255, + 247,34,0,89,255,255,247,163,225,21,0,7,206,255,255,247,34,12,0,235,125, + 0,0,0,89,255,255,247,163,225,21,12,235,125,0,0,89,247,34,12,235,102,0,89, + 247,34,12,235,125,0,0,175,251,34,0,235,125,12,0,235,125,0,7,206,166,0,0, + 138,225,21,12,235,125,0,0,89,247,34,0,12,235,255,255,201,0,0,12,235,255, + 255,255,225,21,0,0,89,255,255,247,163,225,21,12,235,125,0,0,0,89,255,255, + 255,247,34,0,0,89,255,255,127,0,59,245,255,225,111,247,34,0,0,59,245,125, + 0,0,0,12,235,166,0,0,59,245,125,7,0,206,225,21,0,12,235,201,0,0,59,241, + 89,0,0,175,255,255,255,255,247,0,0,89,247,34,0,0,0,7,206,125,0,0,0,59,238, + 34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,60,252,252,204,4,4,4,4,4,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,201,0,0,0,0,0,0,0,0,0,0,0,0,0, + 89,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,138,225,21,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,89,247,34,0,0,0,7, + 206,125,0,0,0,59,238,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,76,252,60,4,4, + 4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,199,34,0,12,232,89,0,0, + 0,0,0,0,0,0,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0, + 0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,166,0,0,0,0,0,0,0,0, + 0,0,0,12,235,125,0,0,0,7,206,125,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,235,255,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,255,251,89,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235, + 125,0,0,0,0,0,0,0,0,0,0,138,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89, + 247,34,0,0,0,0,0,0,0,0,0,0,0,0,89,255,251,89,0,7,206,125,0,89,255,247,34, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,0,127,127,127,0,127,127,127,127,127,127,127,0, + 127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127, + 127,127,0,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,0,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127, + 127,127,0,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,127,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,125,0,175,166,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,125,0,175,166, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,225,21,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,125,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,125,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,166,0,138,201,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,166,0,138,201,0,7,206,166,12,235, + 125,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,125,0,0,0,0,0,175,125, + 0,0,0,0,0,175,171,206,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,255,125,0, + 31,206,130,255,166,175,247,34,0,0,89,255,125,175,247,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,247,34,138,166,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,59,241,132,238,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,59,241,132,238,34,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0, + 59,245,255,255,255,125,0,12,235,255,255,255,255,255,225,21,0,0,0,0,0,0, + 0,0,175,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,125,0,0,0, + 0,0,175,125,0,0,0,0,89,225,21,59,238,34,0,0,138,255,255,201,0,0,0,59,215, + 21,0,0,0,0,0,0,0,0,0,12,235,255,255,255,247,34,0,0,0,0,0,0,0,12,235,255, + 255,255,255,255,255,255,255,251,89,0,12,235,255,255,255,255,255,225,21, + 0,89,255,255,255,255,255,255,125,0,12,235,255,255,255,255,255,225,21,0, + 0,12,235,255,255,255,255,255,225,21,7,206,201,0,50,206,56,255,201,12,235, + 125,0,0,138,225,29,206,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,7,202,89,89,255,225,21,0,89,255,255,255,225,81,245,201,0,138,251, + 89,0,0,138,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,255, + 255,255,255,225,21,0,0,0,138,255,166,7,206,225,21,0,0,0,138,247,34,0,0, + 0,0,127,0,89,255,125,0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,0,89, + 247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,125,0,0,0,0,0,175, + 125,0,0,0,0,0,0,0,0,0,0,0,59,241,89,12,235,125,0,0,172,89,0,0,0,0,0,0,0, + 0,0,12,235,166,0,0,7,202,89,0,0,0,0,0,0,89,255,201,0,0,12,235,125,0,0,0, + 0,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,138,247,34,0,12,146,0,0,0,0,0, + 144,21,0,0,12,146,0,0,0,0,0,144,21,0,89,225,21,71,157,22,191,225,21,175, + 201,0,7,206,125,59,238,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,175,125,0,59,196,199,47,206,184,89,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0, + 0,0,0,59,245,125,0,0,59,245,125,0,0,0,0,0,127,12,235,166,0,0,0,0,0,0,12, + 146,0,0,0,0,0,144,21,0,0,0,0,0,0,0,175,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,12,235,255,255,255,255,127,34,235,255,255,255,255,225,21,0, + 0,0,0,0,0,0,0,89,247,34,7,206,166,0,89,201,0,0,0,0,0,0,0,0,0,0,89,247,34, + 0,0,0,0,0,0,0,0,59,115,12,235,166,0,0,0,12,235,125,0,0,0,0,0,0,12,146,0, + 0,0,0,0,144,21,0,0,0,0,0,59,245,125,0,0,12,146,0,0,0,0,0,144,21,0,0,12, + 146,0,0,0,0,0,144,21,0,7,202,89,117,104,0,29,202,89,59,215,21,59,215,21, + 138,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,175,125,0,59,192,89,223,125,172,89,0,138,255,255,255,201,12,182, + 0,0,0,0,0,175,255,255,125,0,89,255,255,247,34,0,0,12,146,0,0,0,0,0,144, + 21,0,138,255,255,255,255,247,34,138,247,34,7,206,201,0,0,0,0,0,0,127,89, + 251,89,0,0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,7,206,166,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,125,0,0,0,0,0,175,125,0,0,0, + 0,0,0,0,0,0,0,0,89,247,34,7,206,166,7,202,89,0,0,0,0,0,0,0,0,0,0,89,255, + 125,0,0,0,0,0,0,0,89,255,125,89,247,34,0,0,0,12,235,125,0,0,0,0,0,0,12, + 146,0,0,0,0,0,144,21,0,0,0,0,7,206,201,0,0,0,12,146,0,0,0,0,0,144,21,0, + 0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245, + 255,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175, + 125,0,59,192,12,228,34,172,89,89,247,34,0,12,206,29,206,201,0,0,7,206,166, + 0,7,206,255,225,21,0,89,247,34,0,12,146,0,0,0,0,0,144,21,0,0,0,0,7,206, + 166,0,12,235,166,89,247,34,0,0,0,0,0,0,127,245,255,255,255,255,255,201, + 0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,59,245,255,255,255,127,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,125,0,0,0,0,0,175,125,0,0,0,0,0,0,0, + 0,0,0,0,59,241,89,12,235,125,89,201,12,235,255,251,89,0,89,255,255,225, + 21,0,175,255,255,225,21,0,0,0,89,251,89,0,138,225,21,0,0,0,12,235,255,255, + 255,255,225,21,0,12,146,0,0,0,0,0,144,21,0,0,0,0,138,247,34,0,0,0,12,146, + 0,0,0,0,0,144,21,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,12,235,255,255,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,175,125,0,59,192,0,0,0,172,89,138,225,21,0,0,0, + 0,7,206,225,21,138,225,21,0,0,89,251,89,0,0,12,235,125,0,12,146,0,0,0,0, + 0,144,21,0,0,0,0,138,225,21,0,0,89,255,255,125,0,0,0,0,0,0,0,127,138,225, + 21,0,0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,59,241,89,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,125,0,0,12,235,255,255,255,255, + 225,21,0,0,0,0,0,0,0,0,0,138,255,255,201,12,228,34,175,166,0,138,201,7, + 206,125,7,206,166,0,0,0,89,255,255,247,34,59,241,89,0,0,138,225,21,0,0, + 0,12,235,125,0,0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,0,0,59,245,125,0,0,0, + 0,12,146,0,0,0,0,0,144,21,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,59,245,255,255,255,207,235,255,255,255,255,255,255, + 207,235,255,255,255,255,255,255,255,255,255,255,255,225,21,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,59,245,255,247,34,0,0,0,0,175,166,175,201,0,0,0, + 59,245,255,255,255,255,255,125,0,12,146,0,0,0,0,0,144,21,0,0,0,89,251,89, + 0,0,0,7,206,225,21,0,0,0,0,0,0,0,127,245,255,255,255,255,255,125,0,0,12, + 146,0,0,0,0,0,144,21,0,0,0,0,0,0,59,241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,175,125,0,0,0,0,0,175,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,138,166,7,206,125,0,89,247,94,241,89,0,138,201,0,0,0,0,0,59,245,166, + 0,89,251,89,0,89,247,34,0,0,0,12,235,125,0,0,0,0,0,0,12,146,0,0,0,0,0,144, + 21,0,0,7,206,201,0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,0,12,146,0,0,0,0,0, + 144,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,255,255,166,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,138,255,255,201,0,7,206,225,21,175,201,0,0,0,59,241,89,0,0,0,0, + 0,0,12,146,0,0,0,0,0,144,21,0,0,12,235,166,0,0,0,0,0,175,225,21,0,0,0,0, + 0,0,0,127,89,255,125,0,0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,89, + 247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,125,0,0,0,0,0, + 175,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,228,34,7,206,125,0,89,247,94,241, + 89,0,138,201,0,0,0,0,0,12,235,166,0,0,89,255,125,12,235,166,0,0,0,12,235, + 125,0,0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,0,138,247,34,0,0,0,0,0,12,146, + 0,0,0,0,0,144,21,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,59,245,255,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,247,42,206,201,0,0,89, + 225,21,0,0,89,255,125,0,0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,0,175,225,21, + 0,0,0,0,0,175,225,21,0,0,0,0,0,0,0,127,0,175,251,89,0,0,0,0,0,12,146,0, + 0,0,0,0,144,21,0,59,245,166,0,0,138,225,21,0,0,0,59,245,166,138,251,89, + 7,206,201,0,12,235,125,0,59,241,89,0,0,0,175,125,0,0,0,0,0,175,125,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,138,166,0,0,175,166,0,138,201,7,206,125,7,206, + 166,138,166,0,0,0,138,251,89,0,0,0,59,115,0,89,255,201,0,0,12,235,125,0, + 0,0,0,0,0,12,146,0,0,0,0,0,144,21,0,89,251,89,0,0,0,0,0,0,12,146,0,0,0, + 0,0,144,21,0,0,12,146,0,0,0,0,0,144,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,138,125,0,0,138,225,34,182,0,0,0,7,206,166,0, + 7,206,255,247,34,0,0,175,125,0,12,146,0,0,0,0,0,144,21,0,89,251,89,0,0, + 0,0,0,0,175,225,21,0,0,0,0,0,0,0,127,0,0,138,255,255,255,255,125,0,12,235, + 255,255,255,255,255,225,21,0,138,247,34,0,7,206,166,0,0,0,0,89,247,34,175, + 201,0,7,206,201,0,12,235,125,0,59,241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,59,215,21,0,0,12,235,255,251,89,0,89,255,255,225, + 21,12,235,255,255,255,247,34,0,0,0,0,0,0,0,0,12,235,255,255,255,255,255, + 255,255,255,251,89,0,12,235,255,255,255,255,255,225,21,0,138,255,255,255, + 255,255,255,166,0,12,235,255,255,255,255,255,225,21,0,0,12,235,255,255, + 255,255,255,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,89,255,255,255,247,34,0,0,0,0,0,0,0,175,255,255,125,0,138,255,255, + 255,125,0,0,12,235,255,255,255,255,255,225,21,0,175,255,255,255,255,247, + 0,0,0,175,225,21,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,175,166,0,255,255,201,0,0,0,0,0,175,166,12,232,89,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12, + 228,34,0,0,0,0,0,0,0,0,12,232,89,59,215,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127,0,127, + 127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,127,0,127,127,127,0,127,127,0,127,127,127,127,127,0,127,127,127,127, + 127,0,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127, + 0,127,127,127,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,245,255,255,255,255,255,255,225,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,225,21,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,7,206,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89,247, + 34,0,0,0,0,59,192,0,0,0,0,0,7,206,255,255,225,21,0,0,0,0,0,0,0,0,138,247, + 34,0,0,89,251,89,0,7,206,125,0,0,7,206,255,255,255,166,0,89,251,89,138, + 247,34,0,0,0,0,7,206,255,255,255,247,34,0,0,0,0,175,255,255,251,89,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,255,255,247, + 34,0,0,0,0,0,0,0,0,0,0,0,0,89,255,255,247,34,0,0,0,0,0,0,0,0,0,0,0,0,12, + 235,255,247,34,0,0,7,206,255,251,89,0,0,7,206,125,0,0,0,0,0,0,0,0,0,0,0, + 0,89,255,255,255,255,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,202,89,0,0,0, + 59,245,255,247,34,0,0,0,0,0,0,0,0,0,0,0,89,201,0,0,0,0,175,166,0,0,0,0, + 0,0,89,201,0,0,0,0,175,166,0,0,0,0,0,59,245,255,201,0,0,0,59,241,89,0,0, + 0,0,0,59,245,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89,247,34, + 0,0,0,0,59,192,0,0,0,0,0,175,201,0,0,144,21,0,0,0,0,0,0,0,0,7,206,166,0, + 7,206,166,0,0,7,206,125,0,7,206,201,0,0,89,166,0,0,0,0,0,0,0,0,0,0,89,255, + 125,0,0,0,59,245,166,0,0,0,0,0,0,12,206,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,89,255,125,0,0,0,59,245,166,0,0,0,0,0,0,0,0,0,0,59, + 241,89,0,138,201,0,0,0,0,0,138,166,0,0,0,0,0,168,34,7,206,166,0,0,172,89, + 0,175,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,255,255,255,166,89,225,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,89,255,251,89,0,0,12,235,125,0,138,225,21,0,0, + 0,0,0,0,0,0,7,206,255,201,0,0,0,89,225,21,0,0,0,0,7,206,255,201,0,0,0,89, + 225,21,0,0,0,0,12,206,21,12,235,125,0,0,175,166,0,0,0,0,0,0,59,245,125, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,175,255,255,255, + 166,0,0,12,235,125,0,0,0,0,89,225,21,0,0,12,232,89,0,89,247,34,89,247,34, + 0,0,7,206,125,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,89,225,21,0,0,0,0, + 0,7,206,125,0,0,7,206,255,255,247,34,0,0,0,85,89,0,85,89,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,89,225,21,0,0,0,0,0,7,206,125,0,0,0,0,0,0,0,0,0,89,201, + 0,0,12,228,34,0,0,0,0,138,166,0,0,0,0,0,0,0,7,206,125,0,0,7,206,255,166, + 0,0,0,0,0,0,0,0,0,12,235,125,0,0,89,247,34,175,255,255,255,166,89,225,21, + 0,89,255,125,0,0,0,0,0,0,0,0,0,0,7,202,89,0,0,89,225,21,0,12,232,89,59, + 115,0,59,115,0,0,0,0,0,89,201,0,0,7,206,125,0,0,0,0,0,0,0,89,201,0,0,7, + 206,125,0,0,0,0,0,0,0,0,12,232,89,0,59,238,34,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89,225,21,0,0,138,247,94,192,12,182, + 0,0,12,235,125,0,0,0,0,0,175,255,255,255,255,166,0,0,7,206,171,206,166, + 0,0,0,7,206,125,0,7,206,251,89,0,0,0,0,0,0,0,0,0,0,0,7,202,89,0,59,245, + 255,255,201,0,12,228,34,12,235,166,0,12,228,34,0,0,138,251,89,138,247,34, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,202,89,0,138,255,255,255,125,0,12,228,34, + 0,0,0,0,0,0,0,0,59,241,89,0,138,201,0,0,0,0,0,138,166,0,0,0,0,0,0,0,175, + 201,0,0,0,0,0,0,175,201,0,0,0,0,0,0,0,0,12,235,125,0,0,89,247,34,175,255, + 255,255,166,89,225,21,0,89,255,125,0,0,0,0,0,0,0,0,0,0,7,202,89,0,0,138, + 225,21,0,12,235,125,12,235,166,59,245,166,0,0,0,0,89,201,0,0,89,225,21, + 0,0,0,0,0,0,0,89,201,0,0,89,225,21,0,0,0,0,0,0,12,235,255,125,0,0,175,125, + 0,0,0,0,0,0,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89, + 225,21,0,12,235,125,59,192,0,0,0,0,12,235,125,0,0,0,0,0,59,215,21,59,238, + 34,0,0,0,89,255,247,34,0,0,0,7,206,125,0,0,7,206,255,255,247,34,0,0,0,0, + 0,0,0,0,59,192,0,12,235,166,0,7,176,21,0,175,125,59,238,34,0,12,228,34, + 0,138,247,34,138,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,192,0,0,138, + 201,0,89,247,34,0,175,125,0,0,0,0,0,0,0,0,0,89,255,255,225,21,0,7,206,255, + 255,255,255,255,255,247,34,0,12,235,125,0,0,0,7,176,21,0,175,201,0,0,0, + 0,0,0,0,0,12,235,125,0,0,89,247,34,89,255,255,255,166,89,225,21,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,7,202,89,0,0,89,225,21,0,12,232,89,0,12,235,166,12, + 235,166,0,0,0,89,201,0,7,206,125,0,12,235,166,0,0,0,0,89,201,0,7,206,125, + 89,255,255,255,125,0,0,0,0,7,206,125,89,225,21,0,138,225,21,0,0,0,138,255, + 125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89,247,34,0,59,241,89,59, + 192,0,0,0,12,235,255,255,255,225,21,0,0,138,166,0,7,202,89,0,0,0,7,206, + 166,0,0,0,0,0,0,0,0,7,206,125,0,12,235,201,0,0,0,0,0,0,0,0,89,166,0,89, + 247,34,0,0,0,0,0,89,166,12,232,89,0,138,247,34,89,247,34,59,238,34,0,0, + 12,235,255,255,255,255,255,255,247,34,89,255,255,255,166,89,166,0,0,138, + 201,0,138,225,21,0,89,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,166, + 0,0,0,0,7,206,255,255,255,247,34,0,59,245,255,247,34,0,0,0,0,0,0,0,0,12, + 235,125,0,0,89,247,34,0,89,255,255,166,89,225,21,0,0,0,0,0,0,0,0,0,0,0, + 0,0,89,255,255,255,166,0,12,235,125,0,138,225,21,0,0,12,235,125,12,235, + 125,0,0,89,201,0,89,201,0,7,206,223,166,0,0,0,0,89,201,0,89,201,0,89,125, + 0,138,225,21,12,182,0,7,206,133,206,125,0,89,232,215,21,0,7,206,247,34, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89,247,34,0,59,241,89,59, + 192,0,0,0,0,12,235,125,0,0,0,0,0,59,215,21,59,238,34,0,59,245,255,255,255, + 255,225,21,0,0,0,0,0,59,241,89,0,0,138,225,21,0,0,0,0,0,0,0,89,166,0,89, + 247,34,0,0,0,0,0,89,166,0,138,255,255,176,228,34,0,138,247,34,138,247,34, + 0,0,0,0,0,0,0,0,59,238,34,0,0,0,0,0,89,166,0,0,138,255,255,225,21,0,0,89, + 166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,166,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125,0,0,89,247,34,0,0,0,138,166,89,225, + 21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,255,247,34,0,0,12,235, + 166,12,235,166,0,0,0,0,0,12,232,89,0,175,166,138,166,0,0,0,0,0,0,12,232, + 89,0,0,0,0,138,201,0,0,89,255,255,201,89,225,21,89,225,81,215,21,0,138, + 247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89,247,34,0,12,235, + 125,59,192,0,0,0,0,59,241,89,0,0,0,0,0,175,255,255,255,255,166,0,0,0,7, + 206,166,0,0,0,0,7,206,125,0,12,235,201,0,7,206,166,0,0,0,0,0,0,0,0,59,192, + 0,12,235,166,0,7,176,21,0,175,125,0,0,0,0,0,0,0,0,0,138,251,89,138,247, + 34,0,0,0,0,0,0,0,59,238,34,0,0,0,0,0,59,192,0,0,138,201,59,245,166,0,0, + 175,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,166,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125,0,0,89,247,34,0,0,0,138,166, + 89,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,166, + 59,245,166,0,0,0,0,0,0,138,201,0,138,201,0,138,166,0,0,0,0,0,0,138,201, + 0,0,0,0,89,247,34,0,0,0,0,0,7,206,125,59,238,34,59,215,21,0,175,225,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,89,247,34,0,0,175,225,81, + 192,12,182,0,7,206,125,0,0,0,0,0,89,225,21,0,0,12,232,89,0,0,7,206,166, + 0,0,0,0,7,206,125,0,0,59,245,255,255,166,0,0,0,0,0,0,0,0,0,7,202,89,0,59, + 245,255,255,166,0,12,228,34,0,0,0,0,0,0,0,0,0,0,85,89,0,85,89,0,0,0,0,0, + 0,0,59,238,34,0,0,0,0,0,7,202,89,0,138,201,0,59,245,225,34,228,34,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,255,255,255,255,255,247,34,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,201,0,0,175,247,34,0,0,0,138,166, + 89,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,115,0, + 59,115,0,0,0,0,0,0,12,232,89,0,175,255,255,255,255,201,0,0,0,0,12,232,89, + 0,0,0,138,201,0,0,0,0,0,0,0,89,201,0,89,255,255,255,255,247,34,138,251, + 89,0,7,176,21,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,138,247,34,0,0,0, + 175,255,255,255,166,0,89,255,255,255,255,255,247,34,0,0,0,0,0,0,0,0,0,0, + 7,206,166,0,0,0,0,7,206,125,0,0,0,0,0,138,255,166,0,0,0,0,0,0,0,0,0,89, + 225,21,0,0,0,0,0,7,206,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,59,238,34,0,0,0,0,0,0,89,225,21,0,0,0,0,0,7,206,125,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,12,235,191,255,255,166,238,34,0,0,0,138,166,89,225,21,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,201,0,0, + 0,0,0,138,166,0,0,0,0,0,175,201,0,0,0,89,255,255,255,255,125,0,0,0,12,232, + 89,0,0,0,0,59,215,21,0,0,138,255,255,255,225,21,0,0,0,0,0,0,0,0,0,0,0,0, + 0,127,0,0,0,0,0,0,0,0,0,0,0,0,59,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,7,206,125,0,0,0,0,0,0,175,201,0,0,0,0,0,0,0,0,0,0, + 89,255,125,0,0,0,59,245,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,89,255,125,0,0,0,59,245,166,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,12,235,125,0,0,0,0,0,0,0,0,138,166,89,225,21,0,0,0,0,0,0,0,0,0,175, + 125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,59,192,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,125,0,7,199,34, + 0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,7,206,255,255,255,247,34,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,255, + 255,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125,0,0,0,0,0,0,0,0,138,166, + 89,225,21,0,0,0,0,0,0,0,0,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,7,206,125,0,7,206,255,255,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,12,235,255,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127, + 127,127,0,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,0,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 0,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,127,0,127, + 127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,0,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,0,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,138,225, + 21,0,0,0,0,0,12,235,125,0,0,0,0,19,172,255,190,11,0,0,0,0,138,255,201,7, + 202,89,0,0,0,0,0,0,0,0,0,0,7,206,255,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,59,138,225,21,0,0,0,0,0,0,59,245,201,0,0,0,19,172, + 255,190,11,0,0,0,0,0,0,0,0,0,7,206,225,21,0,0,0,59,245,201,19,172,255,190, + 11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,251,89,89,201,0,0,0,0,0,175, + 201,0,0,0,0,0,0,0,0,7,206,225,21,0,0,0,0,0,19,172,255,190,11,0,0,0,0,0, + 175,255,166,12,228,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,89,255,125,0,0,0,0,0,0,0,12,175,247,34,0,0,0,19,172,255, + 190,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,247,34,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,127,0,0,0,7,206,125,0,0,0,0,0,138,201,0,0,0,0,0,136,190, + 45,196,145,0,0,0,59,215,21,175,255,166,0,0,0,175,225,29,206,166,0,0,7,202, + 89,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,125, + 0,0,0,0,0,0,138,225,21,0,0,0,136,190,45,196,145,0,0,0,175,225,29,206,166, + 0,0,12,235,125,0,0,12,138,225,21,136,190,45,196,145,159,251,89,138,247, + 34,0,0,0,0,0,0,0,0,0,0,0,175,125,59,245,247,34,0,0,0,0,0,12,232,89,0,0, + 0,0,0,0,0,175,166,0,0,0,0,0,0,12,136,190,45,196,145,0,0,0,0,138,166,12, + 235,255,125,0,0,0,0,7,206,166,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,12,232,89,0,0,0,0,0,0,138,201,0,0,0,0,0,136,190,45, + 196,145,34,0,0,0,89,251,89,138,247,34,0,0,0,0,0,138,201,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,202,89,7,202,89,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,255, + 255,125,0,0,0,0,127,0,0,7,206,251,89,0,0,0,0,7,206,251,89,0,0,0,0,7,206, + 251,89,0,0,0,0,0,7,206,251,89,0,0,0,0,7,206,251,89,0,0,0,0,12,235,255,125, + 0,0,0,0,0,89,255,255,255,255,255,255,255,255,125,0,0,0,59,245,255,255,255, + 201,12,235,255,255,255,255,255,125,12,235,255,255,255,255,255,125,12,235, + 255,255,255,255,255,125,12,235,255,255,255,255,255,125,89,255,255,255,201, + 89,255,255,255,201,89,255,255,255,201,89,255,255,255,201,0,175,255,255, + 255,255,201,0,0,0,12,235,251,89,0,0,12,235,125,0,0,0,138,255,255,166,0, + 0,0,0,0,0,138,255,255,166,0,0,0,0,0,0,138,255,255,166,0,0,0,0,0,0,138,255, + 255,166,0,0,0,0,0,0,138,255,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138, + 255,255,201,89,251,89,12,235,125,0,0,0,59,245,125,12,235,125,0,0,0,59,245, + 125,12,235,125,0,0,0,59,245,125,12,235,125,0,0,0,59,245,125,7,206,225,21, + 0,0,0,138,247,0,235,166,0,0,0,0,0,0,138,225,21,7,206,166,0,0,0,127,0,0, + 59,245,255,166,0,0,0,0,59,245,255,166,0,0,0,0,59,245,255,166,0,0,0,0,0, + 59,245,255,166,0,0,0,0,59,245,255,166,0,0,0,0,59,245,255,166,0,0,0,0,0, + 175,201,7,206,166,0,0,0,0,0,0,0,138,255,125,0,0,7,202,102,235,166,0,0,0, + 0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,0,12, + 235,125,0,0,12,235,125,0,0,12,235,125,0,0,12,235,125,0,0,175,201,0,0,7, + 206,251,89,0,12,235,255,201,0,0,12,235,125,0,59,245,166,0,0,138,251,89, + 0,0,59,245,166,0,0,138,251,89,0,0,59,245,166,0,0,138,251,89,0,0,59,245, + 166,0,0,138,251,89,0,0,59,245,166,0,0,138,251,89,0,0,0,0,0,0,0,0,0,0,0, + 0,59,245,166,0,0,89,255,166,0,12,235,125,0,0,0,59,245,125,12,235,125,0, + 0,0,59,245,125,12,235,125,0,0,0,59,245,125,12,235,125,0,0,0,59,245,125, + 0,59,245,125,0,0,59,245,125,12,235,166,0,0,0,0,0,12,235,125,0,0,175,201, + 0,0,0,127,0,0,138,225,151,225,21,0,0,0,138,225,151,225,21,0,0,0,138,225, + 151,225,21,0,0,0,0,138,225,151,225,21,0,0,0,138,225,151,225,21,0,0,0,138, + 225,151,225,21,0,0,0,59,241,89,7,206,166,0,0,0,0,0,0,12,235,166,0,0,0,0, + 0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,12,235, + 166,0,0,0,0,0,0,12,235,125,0,0,12,235,125,0,0,12,235,125,0,0,12,235,125, + 0,0,175,201,0,0,0,0,175,225,21,12,235,166,245,125,0,12,235,125,12,235,125, + 0,0,0,0,138,247,34,12,235,125,0,0,0,0,138,247,34,12,235,125,0,0,0,0,138, + 247,34,12,235,125,0,0,0,0,138,247,34,12,235,125,0,0,0,0,138,247,34,0,138, + 225,21,0,0,0,175,201,0,12,235,125,0,0,7,202,159,247,34,12,235,125,0,0,0, + 59,245,125,12,235,125,0,0,0,59,245,125,12,235,125,0,0,0,59,245,125,12,235, + 125,0,0,0,59,245,125,0,0,138,247,34,7,206,201,0,12,235,255,255,255,251, + 89,0,12,235,125,0,12,235,125,0,0,0,127,0,7,206,166,59,241,89,0,0,7,206, + 166,59,241,89,0,0,7,206,166,59,241,89,0,0,0,7,206,166,59,241,89,0,0,7,206, + 166,59,241,89,0,0,7,206,166,59,241,89,0,0,0,138,225,21,7,206,166,0,0,0, + 0,0,0,89,247,34,0,0,0,0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,12, + 235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,0,12,235,125,0,0,12,235,125,0,0, + 12,235,125,0,0,12,235,125,0,0,175,201,0,0,0,0,59,241,89,12,235,125,138, + 225,21,12,235,125,89,247,34,0,0,0,0,59,245,125,89,247,34,0,0,0,0,59,245, + 125,89,247,34,0,0,0,0,59,245,125,89,247,34,0,0,0,0,59,245,125,89,247,34, + 0,0,0,0,59,245,125,0,0,175,225,21,0,175,225,21,0,89,247,34,0,0,138,166, + 12,235,125,12,235,125,0,0,0,59,245,125,12,235,125,0,0,0,59,245,125,12,235, + 125,0,0,0,59,245,125,12,235,125,0,0,0,59,245,125,0,0,12,235,166,89,247, + 34,0,12,235,166,0,0,138,251,89,12,235,133,206,255,125,0,0,0,0,127,0,59, + 241,89,7,206,166,0,0,59,241,89,7,206,166,0,0,59,241,89,7,206,166,0,0,0, + 59,241,89,7,206,166,0,0,59,241,89,7,206,166,0,0,59,241,89,7,206,166,0,0, + 12,235,125,0,7,206,255,255,255,255,247,34,0,138,225,21,0,0,0,0,0,12,235, + 255,255,255,255,247,34,12,235,255,255,255,255,247,34,12,235,255,255,255, + 255,247,34,12,235,255,255,255,255,247,34,0,12,235,125,0,0,12,235,125,0, + 0,12,235,125,0,0,12,235,125,0,206,255,255,255,247,34,0,12,235,125,12,235, + 125,12,235,125,12,235,125,138,225,21,0,0,0,0,12,235,166,138,225,21,0,0, + 0,0,12,235,166,138,225,21,0,0,0,0,12,235,166,138,225,21,0,0,0,0,12,235, + 166,138,225,21,0,0,0,0,12,235,166,0,0,0,175,225,187,225,21,0,0,138,225, + 21,0,59,215,21,7,206,166,12,235,125,0,0,0,59,245,125,12,235,125,0,0,0,59, + 245,125,12,235,125,0,0,0,59,245,125,12,235,125,0,0,0,59,245,125,0,0,0,89, + 255,255,125,0,0,12,235,166,0,0,12,235,166,12,235,125,0,7,206,201,0,0,0, + 127,0,138,225,21,0,138,225,21,0,138,225,21,0,138,225,21,0,138,225,21,0, + 138,225,21,0,0,138,225,21,0,138,225,21,0,138,225,21,0,138,225,21,0,138, + 225,21,0,138,225,21,0,89,255,255,255,255,255,166,0,0,0,0,0,0,138,225,21, + 0,0,0,0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0, + 0,12,235,166,0,0,0,0,0,0,12,235,125,0,0,12,235,125,0,0,12,235,125,0,0,12, + 235,125,0,0,175,201,0,0,0,0,12,235,125,12,235,125,0,138,225,34,235,125, + 138,225,21,0,0,0,0,12,235,166,138,225,21,0,0,0,0,12,235,166,138,225,21, + 0,0,0,0,12,235,166,138,225,21,0,0,0,0,12,235,166,138,225,21,0,0,0,0,12, + 235,166,0,0,0,0,175,225,21,0,0,0,138,225,21,7,202,89,0,7,206,166,12,235, + 125,0,0,0,59,245,125,12,235,125,0,0,0,59,245,125,12,235,125,0,0,0,59,245, + 125,12,235,125,0,0,0,59,245,125,0,0,0,7,206,225,21,0,0,12,235,166,0,0,12, + 235,166,12,235,125,0,0,59,241,89,0,0,127,7,206,255,255,255,255,251,89,7, + 206,255,255,255,255,251,89,7,206,255,255,255,255,251,89,0,7,206,255,255, + 255,255,251,89,7,206,255,255,255,255,251,89,7,206,255,255,255,255,251,89, + 7,206,166,0,0,7,206,166,0,0,0,0,0,0,89,247,34,0,0,0,0,0,12,235,166,0,0, + 0,0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,0, + 12,235,125,0,0,12,235,125,0,0,12,235,125,0,0,12,235,125,0,0,175,201,0,0, + 0,0,59,241,89,12,235,125,0,12,235,138,235,125,89,247,34,0,0,0,0,59,245, + 125,89,247,34,0,0,0,0,59,245,125,89,247,34,0,0,0,0,59,245,125,89,247,34, + 0,0,0,0,59,245,125,89,247,34,0,0,0,0,59,245,125,0,0,0,175,225,187,225,21, + 0,0,138,247,34,175,125,0,0,12,235,125,12,235,125,0,0,0,59,241,89,12,235, + 125,0,0,0,59,241,89,12,235,125,0,0,0,59,241,89,12,235,125,0,0,0,59,241, + 89,0,0,0,0,175,225,21,0,0,12,235,166,0,0,175,247,34,12,235,125,0,0,12,235, + 125,0,0,127,59,241,89,0,0,7,206,166,59,241,89,0,0,7,206,166,59,241,89,0, + 0,7,206,166,0,59,241,89,0,0,7,206,166,59,241,89,0,0,7,206,166,59,241,89, + 0,0,7,206,166,59,241,89,0,0,7,206,166,0,0,0,0,0,0,59,245,166,0,0,0,0,0, + 12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,12,235,166, + 0,0,0,0,0,0,12,235,125,0,0,12,235,125,0,0,12,235,125,0,0,12,235,125,0,0, + 175,201,0,0,0,0,175,225,21,12,235,125,0,0,138,232,245,125,12,235,125,0, + 0,0,0,138,247,34,12,235,125,0,0,0,0,138,247,34,12,235,125,0,0,0,0,138,247, + 34,12,235,125,0,0,0,0,138,247,34,12,235,125,0,0,0,0,138,247,34,0,0,175, + 225,21,0,175,225,21,0,59,245,191,201,0,0,0,89,225,21,12,235,166,0,0,0,89, + 251,89,12,235,166,0,0,0,89,251,89,12,235,166,0,0,0,89,251,89,12,235,166, + 0,0,0,89,251,89,0,0,0,0,175,225,21,0,0,12,235,255,255,255,247,34,0,12,235, + 125,0,0,59,241,89,0,0,127,138,225,21,0,0,0,138,247,163,225,21,0,0,0,138, + 247,163,225,21,0,0,0,138,247,34,138,225,21,0,0,0,138,247,163,225,21,0,0, + 0,138,247,163,225,21,0,0,0,138,247,198,225,21,0,0,7,206,166,0,0,0,0,0,0, + 0,138,255,125,0,0,7,202,102,235,166,0,0,0,0,0,12,235,166,0,0,0,0,0,12,235, + 166,0,0,0,0,0,12,235,166,0,0,0,0,0,0,12,235,125,0,0,12,235,125,0,0,12,235, + 125,0,0,12,235,125,0,0,175,201,0,0,7,206,251,89,0,12,235,125,0,0,12,235, + 255,125,0,89,255,125,0,0,89,251,89,0,0,89,255,125,0,0,89,251,89,0,0,89, + 255,125,0,0,89,251,89,0,0,89,255,125,0,0,89,251,89,0,0,89,255,125,0,0,89, + 251,89,0,0,138,225,21,0,0,0,175,201,0,0,138,251,89,0,0,89,251,89,0,0,138, + 247,34,0,7,206,225,21,0,138,247,34,0,7,206,225,21,0,138,247,34,0,7,206, + 225,21,0,138,247,34,0,7,206,225,21,0,0,0,0,175,225,21,0,0,12,235,166,0, + 0,0,0,0,12,235,125,0,0,175,225,21,0,0,127,206,166,0,0,0,0,59,245,255,166, + 0,0,0,0,59,245,255,166,0,0,0,0,59,245,133,206,166,0,0,0,0,59,245,255,166, + 0,0,0,0,59,245,255,166,0,0,0,0,59,245,255,125,0,0,0,7,206,255,255,255,255, + 255,125,0,0,0,59,245,255,255,255,201,12,235,255,255,255,255,255,125,12, + 235,255,255,255,255,255,125,12,235,255,255,255,255,255,125,12,235,255,255, + 255,255,255,125,89,255,255,255,201,89,255,255,255,201,89,255,255,255,201, + 89,255,255,255,201,0,175,255,255,255,255,225,21,0,0,12,235,125,0,0,0,138, + 255,125,0,0,0,175,255,255,201,0,0,0,0,0,0,175,255,255,201,0,0,0,0,0,0,175, + 255,255,201,0,0,0,0,0,0,175,255,255,201,0,0,0,0,0,0,175,255,255,201,0,0, + 0,0,0,0,0,0,0,0,0,0,0,7,202,97,206,255,255,201,0,0,0,0,0,138,255,255,255, + 201,0,0,0,0,138,255,255,255,201,0,0,0,0,138,255,255,255,201,0,0,0,0,138, + 255,255,255,201,0,0,0,0,0,0,175,225,21,0,0,12,235,166,0,0,0,0,0,12,235, + 133,206,255,225,21,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,138,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,138,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,175,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,225,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,127,127,127,127,127,127,0, + 127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,0,127,127,127,127,0,127,127,127,127,0,127,127,127, + 127,0,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,127,0,127,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,7,206,225,21, + 0,0,0,0,0,12,235,225,21,0,0,89,255,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,7,206,255,247,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,247, + 34,0,0,0,0,0,0,0,138,251,89,0,0,59,245,247,34,0,0,0,0,0,0,0,0,0,175,247, + 34,0,0,175,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,225,21, + 0,0,0,0,0,0,0,138,255,125,0,0,0,12,235,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,251,89,0,0,0,0,0,0, + 7,206,225,21,0,0,0,7,206,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,59,245,166,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,59,241,89,0,0,0,0, + 0,89,247,34,0,0,7,206,138,235,125,0,0,89,255,225,21,175,125,0,0,0,0,0,0, + 0,0,0,138,201,0,138,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12, + 235,125,0,0,0,0,0,0,12,235,125,0,0,0,175,171,206,166,0,0,0,0,0,0,0,0,0, + 7,206,166,0,59,245,255,166,238,0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,125,59, + 215,21,0,0,59,241,89,0,0,0,0,0,0,7,206,166,0,0,0,0,138,201,175,201,0,0, + 0,12,235,251,89,89,201,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,7,206,166,0,0,0,0,0,0,89,247,34,0,0,0,0,89,225,151,201,0,0,0,0, + 0,0,0,0,0,0,0,0,0,175,201,0,12,235,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,127,0,0,0,138,201,0,0,0,0,7,206,125,0,0,0,138,201,0,89,225,21, + 12,228,34,138,255,201,0,0,0,138,247,34,175,225,21,0,138,201,0,138,201,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,225,21,0,0,0,0,0,89,225, + 21,0,0,89,247,34,59,241,89,0,59,241,89,89,247,34,0,0,89,225,21,175,127, + 215,21,206,247,42,206,0,138,255,247,42,206,125,0,0,138,166,12,235,251,89, + 0,0,0,0,138,201,0,0,0,0,0,0,89,225,21,0,0,0,59,241,89,12,235,125,0,0,175, + 125,59,245,247,34,0,0,12,235,125,89,251,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,59,238,34,0,0,0,0,0,175,166,0,0,0,0,12,232,89,7,206,125,0, + 0,12,235,166,59,245,125,0,0,0,59,238,34,0,12,235,125,0,0,0,0,0,0,89,247, + 34,138,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,255,247,34,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,251,89,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,199,34,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,235,125,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,12,235,255,255,255,166,0,12,235,255, + 255,255,166,0,12,235,255,255,255,166,0,12,235,255,255,255,166,0,0,12,235, + 255,255,255,166,0,12,235,255,255,255,166,0,12,235,255,255,255,166,0,175, + 255,255,125,0,0,12,235,255,255,125,0,0,12,235,255,255,225,21,0,0,12,235, + 255,255,225,21,0,12,235,255,255,225,21,0,12,235,255,255,225,21,0,12,235, + 125,12,235,125,12,235,125,12,235,125,0,12,235,125,89,251,89,0,12,235,138, + 235,255,247,34,0,0,12,235,255,255,201,0,0,0,12,235,255,255,201,0,0,0,12, + 235,255,255,201,0,0,0,12,235,255,255,201,0,0,0,12,235,255,255,201,0,0,0, + 0,0,0,175,247,34,0,0,0,12,235,255,255,255,166,0,59,241,89,0,0,89,247,34, + 59,241,89,0,0,89,247,34,59,241,89,0,0,89,247,34,59,241,89,0,0,89,247,42, + 206,201,0,0,0,138,232,245,166,245,255,251,89,7,206,201,0,0,0,138,225,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,127,12,206,21,0,59,245,125,12,206,21,0,59,245,125,12,206, + 21,0,59,245,125,12,206,21,0,59,245,125,0,12,206,21,0,59,245,125,12,206, + 21,0,59,245,125,12,206,21,0,12,235,255,125,0,7,206,166,12,235,166,0,0,172, + 102,0,235,125,0,0,175,201,0,12,235,125,0,0,175,201,12,235,125,0,0,175,201, + 12,235,125,0,0,175,201,0,12,235,125,12,235,125,12,235,125,12,235,125,0, + 0,0,0,0,175,201,0,12,235,247,34,0,175,201,0,12,235,166,0,7,206,201,0,12, + 235,166,0,7,206,201,0,12,235,166,0,7,206,201,0,12,235,166,0,7,206,201,0, + 12,235,166,0,7,206,201,0,0,0,0,0,175,247,34,0,0,12,235,166,0,12,235,201, + 0,59,241,89,0,0,89,247,34,59,241,89,0,0,89,247,34,59,241,89,0,0,89,247, + 34,59,241,89,0,0,89,247,34,89,247,34,0,7,206,176,235,225,21,0,175,225,21, + 89,247,34,0,7,206,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,7,206,166,0,0,0,0,7, + 206,166,0,0,0,0,7,206,166,0,0,0,0,7,206,166,0,0,0,0,0,7,206,166,0,0,0,0, + 7,206,166,0,0,0,0,0,175,201,0,0,0,89,225,138,225,21,0,0,0,0,89,225,21,0, + 0,89,247,34,89,225,21,0,0,89,247,124,225,21,0,0,89,247,124,225,21,0,0,89, + 247,34,12,235,125,12,235,125,12,235,125,12,235,125,0,89,255,255,255,255, + 247,34,12,235,125,0,0,89,247,34,138,225,21,0,0,59,238,34,138,225,21,0,0, + 59,238,34,138,225,21,0,0,59,238,34,138,225,21,0,0,59,238,34,138,225,21, + 0,0,59,238,34,0,0,0,0,0,0,0,0,0,138,225,21,0,172,132,238,34,59,241,89,0, + 0,89,247,34,59,241,89,0,0,89,247,34,59,241,89,0,0,89,247,34,59,241,89,0, + 0,89,247,34,12,235,125,0,59,238,47,235,125,0,0,59,241,89,12,235,125,0,59, + 238,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,59,245,255,255,255,166,0,59,245,255,255, + 255,166,0,59,245,255,255,255,166,0,59,245,255,255,255,166,0,0,59,245,255, + 255,255,166,0,59,245,255,255,255,166,0,89,255,255,255,255,255,255,255,255, + 255,247,175,201,0,0,0,0,0,175,255,255,255,255,255,247,34,175,255,255,255, + 255,255,247,198,255,255,255,255,255,247,198,255,255,255,255,255,247,34, + 12,235,125,12,235,125,12,235,125,12,235,125,89,251,89,0,0,59,241,89,12, + 235,125,0,0,89,247,34,175,201,0,0,0,12,232,89,175,201,0,0,0,12,232,89,175, + 201,0,0,0,12,232,89,175,201,0,0,0,12,232,89,175,201,0,0,0,12,232,89,7,206, + 255,255,255,255,255,255,251,226,201,0,89,166,12,232,89,59,241,89,0,0,89, + 247,34,59,241,89,0,0,89,247,34,59,241,89,0,0,89,247,34,59,241,89,0,0,89, + 247,34,0,175,201,0,138,201,12,235,125,0,0,12,235,125,0,175,201,0,138,201, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,127,89,255,166,0,7,206,166,89,255,166,0,7,206,166,89, + 255,166,0,7,206,166,89,255,166,0,7,206,166,0,89,255,166,0,7,206,166,89, + 255,166,0,7,206,166,138,255,125,0,0,175,201,0,0,0,0,0,175,201,0,0,0,0,0, + 175,201,0,0,0,0,0,0,175,201,0,0,0,0,0,175,201,0,0,0,0,0,175,201,0,0,0,0, + 0,0,12,235,125,12,235,125,12,235,125,12,235,125,175,201,0,0,0,59,241,89, + 12,235,125,0,0,89,247,34,175,201,0,0,0,12,232,89,175,201,0,0,0,12,232,89, + 175,201,0,0,0,12,232,89,175,201,0,0,0,12,232,89,175,201,0,0,0,12,232,89, + 0,0,0,0,0,0,0,0,0,175,201,7,176,21,12,232,89,59,241,89,0,0,89,247,34,59, + 241,89,0,0,89,247,34,59,241,89,0,0,89,247,34,59,241,89,0,0,89,247,34,0, + 89,247,47,235,125,12,235,125,0,0,12,235,125,0,89,247,47,235,125,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,127,175,201,0,0,7,206,166,175,201,0,0,7,206,166,175,201,0,0, + 7,206,166,175,201,0,0,7,206,166,0,175,201,0,0,7,206,166,175,201,0,0,7,206, + 166,175,201,0,0,0,138,225,21,0,0,0,0,138,225,21,0,0,0,0,138,247,34,0,0, + 0,0,0,138,247,34,0,0,0,0,138,247,34,0,0,0,0,138,247,34,0,0,0,0,0,12,235, + 125,12,235,125,12,235,125,12,235,125,175,201,0,0,0,89,247,34,12,235,125, + 0,0,89,247,34,138,225,21,0,0,89,247,34,138,225,21,0,0,89,247,34,138,225, + 21,0,0,89,247,34,138,225,21,0,0,89,247,34,138,225,21,0,0,89,247,34,0,0, + 0,0,175,247,34,0,0,138,225,151,125,0,89,247,34,59,241,89,0,0,89,247,34, + 59,241,89,0,0,89,247,34,59,241,89,0,0,89,247,34,59,241,89,0,0,89,247,34, + 0,12,235,191,247,34,12,235,125,0,0,59,241,89,0,12,235,191,247,34,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,127,138,225,21,0,138,255,166,138,225,21,0,138,255,166,138, + 225,21,0,138,255,166,138,225,21,0,138,255,166,0,138,225,21,0,138,255,166, + 138,225,21,0,138,255,166,89,247,34,0,89,255,255,166,0,0,12,206,12,235,166, + 0,0,127,102,0,235,201,0,0,12,206,21,12,235,201,0,0,12,206,34,235,201,0, + 0,12,206,34,235,201,0,0,12,206,21,12,235,125,12,235,125,12,235,125,12,235, + 125,89,255,125,0,7,206,166,0,12,235,125,0,0,89,247,34,12,235,166,0,7,206, + 201,0,12,235,166,0,7,206,201,0,12,235,166,0,7,206,201,0,12,235,166,0,7, + 206,201,0,12,235,166,0,7,206,201,0,0,0,0,0,175,247,34,0,0,12,235,201,0, + 7,206,201,0,7,206,166,0,59,245,247,34,7,206,166,0,59,245,247,34,7,206,166, + 0,59,245,247,34,7,206,166,0,59,245,247,34,0,0,138,255,166,0,12,235,125, + 0,7,206,201,0,0,0,138,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,7,206,255,255,171, + 206,166,7,206,255,255,171,206,166,7,206,255,255,171,206,166,7,206,255,255, + 171,206,166,0,7,206,255,255,171,206,166,7,206,255,255,171,206,166,0,89, + 255,255,201,0,0,175,255,255,247,34,0,12,235,255,255,166,0,0,7,206,255,255, + 247,34,0,0,7,206,255,255,247,34,0,7,206,255,255,247,34,0,7,206,255,255, + 247,34,0,12,235,125,12,235,125,12,235,125,12,235,125,0,89,255,255,255,201, + 0,0,12,235,125,0,0,89,247,34,0,12,235,255,255,201,0,0,0,12,235,255,255, + 201,0,0,0,12,235,255,255,201,0,0,0,12,235,255,255,201,0,0,0,12,235,255, + 255,201,0,0,0,0,0,0,0,0,0,0,0,7,206,255,255,255,201,0,0,0,59,245,255,225, + 111,247,34,0,59,245,255,225,111,247,34,0,59,245,255,225,111,247,34,0,59, + 245,255,225,111,247,34,0,0,59,241,89,0,12,235,255,255,255,225,21,0,0,0, + 59,241,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,175,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,138,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,225,21,0,12,235,125,0,0,0,0,0,0,0, + 138,225,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,7,202,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,206,166,0,0,12,235,125,0,0,0,0,0,0,7,206, + 166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,235,255,166,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,247,34,0,0,12,235,125,0,0,0,0,0,0,89,247, + 34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,127,127,0,127,127,127,127, + 127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,0,127,127,0,127,127,0,127,127,0,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127, + 127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127, + 127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,127, + 0,127,127,127,127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127, + 127,127,127,127,0,127,127,127,127,127,127,127,0,127,127,127,127,127,127, + 127,0,127,127,127,127,127,127,0,127,127,127,127,127,127,0,127,127,127,127, + 127,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0 +}; + + +void TwGenerateDefaultFonts() +{ + g_DefaultSmallFont = TwGenerateFont(s_Font0, FONT0_BM_W, FONT0_BM_H); + assert(g_DefaultSmallFont && g_DefaultSmallFont->m_NbCharRead==224); + g_DefaultNormalFont = TwGenerateFont(s_Font1AA, FONT1AA_BM_W, FONT1AA_BM_H); + assert(g_DefaultNormalFont && g_DefaultNormalFont->m_NbCharRead==224); + g_DefaultLargeFont = TwGenerateFont(s_Font2AA, FONT2AA_BM_W, FONT2AA_BM_H); + assert(g_DefaultLargeFont && g_DefaultLargeFont->m_NbCharRead==224); +} + +// --------------------------------------------------------------------------- + +void TwDeleteDefaultFonts() +{ + delete g_DefaultSmallFont; + g_DefaultSmallFont = NULL; + delete g_DefaultNormalFont; + g_DefaultNormalFont = NULL; + delete g_DefaultLargeFont; + g_DefaultLargeFont = NULL; +} + +// --------------------------------------------------------------------------- diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,65 @@ +// --------------------------------------------------------------------------- +// +// @file TwFonts.h +// @brief Bitmaps fonts +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_FONTS_INCLUDED +#define ANT_TW_FONTS_INCLUDED + +//#include + +/* +A source bitmap includes 224 characters starting from ascii char 32 (i.e. space) to ascii char 255: + + !"#$%&'()*+,-./0123456789:;<=>? +@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ +`abcdefghijklmnopqrstuvwxyz{|}~ + + + + + +First column of a source bitmap is a delimiter with color=zero at the end of each line of characters. +Last row of a line of characters is a delimiter with color=zero at the last pixel of each character. + +*/ + + +struct CTexFont +{ + unsigned char * m_TexBytes; + int m_TexWidth; // power of 2 + int m_TexHeight; // power of 2 + float m_CharU0[256]; + float m_CharV0[256]; + float m_CharU1[256]; + float m_CharV1[256]; + int m_CharWidth[256]; + int m_CharHeight; + int m_NbCharRead; + + CTexFont(); + ~CTexFont(); +}; + + +CTexFont *TwGenerateFont(const unsigned char *_Bitmap, int _BmWidth, int _BmHeight); + + +extern CTexFont *g_DefaultSmallFont; +extern CTexFont *g_DefaultNormalFont; +extern CTexFont *g_DefaultLargeFont; + +void TwGenerateDefaultFonts(); +void TwDeleteDefaultFonts(); + + +#endif // !defined ANT_TW_FONTS_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwGraph.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwGraph.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwGraph.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwGraph.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,58 @@ +// --------------------------------------------------------------------------- +// +// @file TwGraph.h +// @brief ITwGraph pure interface +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_GRAPH_INCLUDED +#define ANT_TW_GRAPH_INCLUDED + +#include "TwColors.h" +#include "TwFonts.h" + + +// --------------------------------------------------------------------------- + +#ifdef DrawText // DirectX redefines 'DrawText' !! +# undef DrawText +#endif // DrawText + +class ITwGraph +{ +public: + virtual int Init() = 0; + virtual int Shut() = 0; + virtual void BeginDraw(int _WndWidth, int _WndHeight) = 0; + virtual void EndDraw() = 0; + virtual bool IsDrawing() = 0; + virtual void Restore() = 0; + + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased=false) = 0; + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color, bool _AntiAliased=false) = 0; + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11) = 0; + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color) = 0; + enum Cull { CULL_NONE, CULL_CW, CULL_CCW }; + virtual void DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode) = 0; + + virtual void * NewTextObj() = 0; + virtual void DeleteTextObj(void *_TextObj) = 0; + virtual void BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth) = 0; + virtual void DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor) = 0; + + virtual void ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY) = 0; + virtual void RestoreViewport() = 0; + virtual void SetScissor(int _X0, int _Y0, int _Width, int _Height) = 0; + + virtual ~ITwGraph() {} // required by gcc +}; + +// --------------------------------------------------------------------------- + +#endif // ANT_TW_GRAPH_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwMgr.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwMgr.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwMgr.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwMgr.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6626 @@ +// --------------------------------------------------------------------------- +// +// @file TwMgr.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include +#include "TwMgr.h" +#include "TwBar.h" +#include "TwFonts.h" +#include "TwOpenGL.h" +//#include "TwOpenGLCore.h" +#ifdef ANT_WINDOWS +# include "TwDirect3D9.h" +# include "TwDirect3D10.h" +# include "TwDirect3D11.h" +# include "resource.h" +# ifdef _DEBUG +# include +# endif // _DEBUG +#endif // ANT_WINDOWS + +#if !defined(ANT_WINDOWS) +# define _snprintf snprintf +#endif // defined(ANT_WINDOWS) + + +using namespace std; + +CTwMgr *g_TwMgr = NULL; // current TwMgr +bool g_BreakOnError = false; +TwErrorHandler g_ErrorHandler = NULL; +int g_TabLength = 4; +CTwBar * const TW_GLOBAL_BAR = (CTwBar *)(-1); +int g_InitWndWidth = -1; +int g_InitWndHeight = -1; +TwCopyCDStringToClient g_InitCopyCDStringToClient = NULL; +TwCopyStdStringToClient g_InitCopyStdStringToClient = NULL; + +// multi-windows +const int TW_MASTER_WINDOW_ID = 0; +typedef map CTwWndMap; +CTwWndMap g_Wnds; +CTwMgr *g_TwMasterMgr = NULL; + +// error messages +extern const char *g_ErrUnknownAttrib; +extern const char *g_ErrNoValue; +extern const char *g_ErrBadValue; +const char *g_ErrInit = "Already initialized"; +const char *g_ErrShut = "Already shutdown"; +const char *g_ErrNotInit = "Not initialized"; +const char *g_ErrUnknownAPI = "Unsupported graph API"; +const char *g_ErrBadDevice = "Invalid graph device"; +const char *g_ErrBadParam = "Invalid parameter"; +const char *g_ErrExist = "Exists already"; +const char *g_ErrNotFound = "Not found"; +const char *g_ErrNthToDo = "Nothing to do"; +const char *g_ErrBadSize = "Bad size"; +const char *g_ErrIsDrawing = "Asynchronous drawing detected"; +const char *g_ErrIsProcessing="Asynchronous processing detected"; +const char *g_ErrOffset = "Offset larger than StructSize"; +const char *g_ErrDelStruct = "Cannot delete a struct member"; +const char *g_ErrNoBackQuote= "Name cannot include back-quote"; +const char *g_ErrStdString = "Debug/Release std::string mismatch"; +const char *g_ErrCStrParam = "Value count for TW_PARAM_CSTRING must be 1"; +const char *g_ErrOutOfRange = "Index out of range"; +const char *g_ErrHasNoValue = "Has no value"; +const char *g_ErrBadType = "Incompatible type"; +const char *g_ErrDelHelp = "Cannot delete help bar"; +char g_ErrParse[512]; + +void ANT_CALL TwGlobalError(const char *_ErrorMessage); + +#if defined(ANT_UNIX) || defined(ANT_OSX) +#define _stricmp strcasecmp +#define _strdup strdup +#endif + +#ifdef ANT_WINDOWS + bool g_UseCurRsc = true; // use dll resources for rotoslider cursors +#endif + +// --------------------------------------------------------------------------- + +const float FLOAT_EPS = 1.0e-7f; +const float FLOAT_EPS_SQ = 1.0e-14f; +const float FLOAT_PI = 3.14159265358979323846f; +const double DOUBLE_EPS = 1.0e-14; +const double DOUBLE_EPS_SQ = 1.0e-28; +const double DOUBLE_PI = 3.14159265358979323846; + +inline double DegToRad(double degree) { return degree * (DOUBLE_PI/180.0); } +inline double RadToDeg(double radian) { return radian * (180.0/DOUBLE_PI); } + +// --------------------------------------------------------------------------- + +// a static global object to verify that Tweakbar module has been properly terminated (in debug mode only) +#ifdef _DEBUG +static struct CTwVerif +{ + ~CTwVerif() + { + if( g_TwMgr!=NULL ) + g_TwMgr->SetLastError("Tweak bar module has not been terminated properly: call TwTerminate()\n"); + } +} s_Verif; +#endif // _DEBUG + +// --------------------------------------------------------------------------- +// Color ext type +// --------------------------------------------------------------------------- + +void CColorExt::RGB2HLS() +{ + float fH = 0, fL = 0, fS = 0; + ColorRGBToHLSf((float)R/255.0f, (float)G/255.0f, (float)B/255.0f, &fH, &fL, &fS); + H = (int)fH; + if( H>=360 ) + H -= 360; + else if( H<0 ) + H += 360; + L = (int)(255.0f*fL + 0.5f); + if( L<0 ) + L = 0; + else if( L>255 ) + L = 255; + S = (int)(255.0f*fS + 0.5f); + if( S<0 ) + S = 0; + else if( S>255 ) + S = 255; +} + +void CColorExt::HLS2RGB() +{ + float fR = 0, fG = 0, fB = 0; + ColorHLSToRGBf((float)H, (float)L/255.0f, (float)S/255.0f, &fR, &fG, &fB); + R = (int)(255.0f*fR + 0.5f); + if( R<0 ) + R = 0; + else if( R>255 ) + R = 255; + G = (int)(255.0f*fG + 0.5f); + if( G<0 ) + G = 0; + else if( G>255 ) + G = 255; + B = (int)(255.0f*fB + 0.5f); + if( B<0 ) + B = 0; + else if( B>255 ) + B = 255; +} + +void ANT_CALL CColorExt::InitColor32CB(void *_ExtValue, void *_ClientData) +{ + CColorExt *ext = static_cast(_ExtValue); + if( ext ) + { + ext->m_IsColorF = false; + ext->R = 0; + ext->G = 0; + ext->B = 0; + ext->H = 0; + ext->L = 0; + ext->S = 0; + ext->A = 255; + ext->m_HLS = false; + ext->m_HasAlpha = false; + ext->m_CanHaveAlpha = true; + if( g_TwMgr && g_TwMgr->m_GraphAPI==TW_DIRECT3D9 ) // D3D10 now use OGL rgba order! + ext->m_OGL = false; + else + ext->m_OGL = true; + ext->m_PrevConvertedColor = Color32FromARGBi(ext->A, ext->R, ext->G, ext->B); + ext->m_StructProxy = (CTwMgr::CStructProxy *)_ClientData; + } +} + +void ANT_CALL CColorExt::InitColor3FCB(void *_ExtValue, void *_ClientData) +{ + InitColor32CB(_ExtValue, _ClientData); + CColorExt *ext = static_cast(_ExtValue); + if( ext ) + { + ext->m_IsColorF = true; + ext->m_HasAlpha = false; + ext->m_CanHaveAlpha = false; + } +} + +void ANT_CALL CColorExt::InitColor4FCB(void *_ExtValue, void *_ClientData) +{ + InitColor32CB(_ExtValue, _ClientData); + CColorExt *ext = static_cast(_ExtValue); + if( ext ) + { + ext->m_IsColorF = true; + ext->m_HasAlpha = true; + ext->m_CanHaveAlpha = true; + } +} + +void ANT_CALL CColorExt::CopyVarFromExtCB(void *_VarValue, const void *_ExtValue, unsigned int _ExtMemberIndex, void *_ClientData) +{ + unsigned int *var32 = static_cast(_VarValue); + float *varF = static_cast(_VarValue); + CColorExt *ext = (CColorExt *)(_ExtValue); + CTwMgr::CMemberProxy *mProxy = static_cast(_ClientData); + if( _VarValue && ext ) + { + if( ext->m_HasAlpha && mProxy && mProxy->m_StructProxy && mProxy->m_StructProxy->m_Type==g_TwMgr->m_TypeColor3F ) + ext->m_HasAlpha = false; + + // Synchronize HLS and RGB + if( _ExtMemberIndex>=0 && _ExtMemberIndex<=2 ) + ext->RGB2HLS(); + else if( _ExtMemberIndex>=3 && _ExtMemberIndex<=5 ) + ext->HLS2RGB(); + else if( mProxy && _ExtMemberIndex==7 && mProxy->m_VarParent ) + { + assert( mProxy->m_VarParent->m_Vars.size()==8 ); + if( mProxy->m_VarParent->m_Vars[0]->m_Visible != !ext->m_HLS + || mProxy->m_VarParent->m_Vars[1]->m_Visible != !ext->m_HLS + || mProxy->m_VarParent->m_Vars[2]->m_Visible != !ext->m_HLS + || mProxy->m_VarParent->m_Vars[3]->m_Visible != ext->m_HLS + || mProxy->m_VarParent->m_Vars[4]->m_Visible != ext->m_HLS + || mProxy->m_VarParent->m_Vars[5]->m_Visible != ext->m_HLS ) + { + mProxy->m_VarParent->m_Vars[0]->m_Visible = !ext->m_HLS; + mProxy->m_VarParent->m_Vars[1]->m_Visible = !ext->m_HLS; + mProxy->m_VarParent->m_Vars[2]->m_Visible = !ext->m_HLS; + mProxy->m_VarParent->m_Vars[3]->m_Visible = ext->m_HLS; + mProxy->m_VarParent->m_Vars[4]->m_Visible = ext->m_HLS; + mProxy->m_VarParent->m_Vars[5]->m_Visible = ext->m_HLS; + mProxy->m_Bar->NotUpToDate(); + } + if( mProxy->m_VarParent->m_Vars[6]->m_Visible != ext->m_HasAlpha ) + { + mProxy->m_VarParent->m_Vars[6]->m_Visible = ext->m_HasAlpha; + mProxy->m_Bar->NotUpToDate(); + } + if( static_cast(mProxy->m_VarParent->m_Vars[7])->m_ReadOnly ) + { + static_cast(mProxy->m_VarParent->m_Vars[7])->m_ReadOnly = false; + mProxy->m_Bar->NotUpToDate(); + } + } + // Convert to color32 + color32 col = Color32FromARGBi((ext->m_HasAlpha ? ext->A : 255), ext->R, ext->G, ext->B); + if( ext->m_OGL && !ext->m_IsColorF ) + col = (col&0xff00ff00) | (unsigned char)(col>>16) | (((unsigned char)(col))<<16); + if( ext->m_IsColorF ) + Color32ToARGBf(col, (ext->m_HasAlpha ? varF+3 : NULL), varF+0, varF+1, varF+2); + else + { + if( ext->m_HasAlpha ) + *var32 = col; + else + *var32 = ((*var32)&0xff000000) | (col&0x00ffffff); + } + ext->m_PrevConvertedColor = col; + } +} + +void ANT_CALL CColorExt::CopyVarToExtCB(const void *_VarValue, void *_ExtValue, unsigned int _ExtMemberIndex, void *_ClientData) +{ + const unsigned int *var32 = static_cast(_VarValue); + const float *varF = static_cast(_VarValue); + CColorExt *ext = static_cast(_ExtValue); + CTwMgr::CMemberProxy *mProxy = static_cast(_ClientData); + if( _VarValue && ext ) + { + if( ext->m_HasAlpha && mProxy && mProxy->m_StructProxy && mProxy->m_StructProxy->m_Type==g_TwMgr->m_TypeColor3F ) + ext->m_HasAlpha = false; + + if( mProxy && _ExtMemberIndex==7 && mProxy->m_VarParent ) + { + assert( mProxy->m_VarParent->m_Vars.size()==8 ); + if( mProxy->m_VarParent->m_Vars[0]->m_Visible != !ext->m_HLS + || mProxy->m_VarParent->m_Vars[1]->m_Visible != !ext->m_HLS + || mProxy->m_VarParent->m_Vars[2]->m_Visible != !ext->m_HLS + || mProxy->m_VarParent->m_Vars[3]->m_Visible != ext->m_HLS + || mProxy->m_VarParent->m_Vars[4]->m_Visible != ext->m_HLS + || mProxy->m_VarParent->m_Vars[5]->m_Visible != ext->m_HLS ) + { + mProxy->m_VarParent->m_Vars[0]->m_Visible = !ext->m_HLS; + mProxy->m_VarParent->m_Vars[1]->m_Visible = !ext->m_HLS; + mProxy->m_VarParent->m_Vars[2]->m_Visible = !ext->m_HLS; + mProxy->m_VarParent->m_Vars[3]->m_Visible = ext->m_HLS; + mProxy->m_VarParent->m_Vars[4]->m_Visible = ext->m_HLS; + mProxy->m_VarParent->m_Vars[5]->m_Visible = ext->m_HLS; + mProxy->m_Bar->NotUpToDate(); + } + if( mProxy->m_VarParent->m_Vars[6]->m_Visible != ext->m_HasAlpha ) + { + mProxy->m_VarParent->m_Vars[6]->m_Visible = ext->m_HasAlpha; + mProxy->m_Bar->NotUpToDate(); + } + if( static_cast(mProxy->m_VarParent->m_Vars[7])->m_ReadOnly ) + { + static_cast(mProxy->m_VarParent->m_Vars[7])->m_ReadOnly = false; + mProxy->m_Bar->NotUpToDate(); + } + } + color32 col; + if( ext->m_IsColorF ) + col = Color32FromARGBf((ext->m_HasAlpha ? varF[3] : 1), varF[0], varF[1], varF[2]); + else + col = *var32; + if( ext->m_OGL && !ext->m_IsColorF ) + col = (col&0xff00ff00) | (unsigned char)(col>>16) | (((unsigned char)(col))<<16); + Color32ToARGBi(col, (ext->m_HasAlpha ? &ext->A : NULL), &ext->R, &ext->G, &ext->B); + if( (col & 0x00ffffff)!=(ext->m_PrevConvertedColor & 0x00ffffff) ) + ext->RGB2HLS(); + ext->m_PrevConvertedColor = col; + } +} + +void ANT_CALL CColorExt::SummaryCB(char *_SummaryString, size_t /*_SummaryMaxLength*/, const void *_ExtValue, void * /*_ClientData*/) +{ + // copy var + CColorExt *ext = (CColorExt *)(_ExtValue); + if( ext && ext->m_StructProxy && ext->m_StructProxy->m_StructData ) + { + if( ext->m_StructProxy->m_StructGetCallback ) + ext->m_StructProxy->m_StructGetCallback(ext->m_StructProxy->m_StructData, ext->m_StructProxy->m_StructClientData); + //if( *(unsigned int *)(ext->m_StructProxy->m_StructData)!=ext->m_PrevConvertedColor ) + CopyVarToExtCB(ext->m_StructProxy->m_StructData, ext, 99, NULL); + } + + //unsigned int col = 0; + //CopyVar32FromExtCB(&col, _ExtValue, 99, _ClientData); + //_snprintf(_SummaryString, _SummaryMaxLength, "0x%.8X", col); + //(void) _SummaryMaxLength, _ExtValue, _ClientData; + _SummaryString[0] = ' '; // required to force background color for this value + _SummaryString[1] = '\0'; +} + +void CColorExt::CreateTypes() +{ + if( g_TwMgr==NULL ) + return; + TwStructMember ColorExtMembers[] = { { "Red", TW_TYPE_INT32, offsetof(CColorExt, R), "min=0 max=255" }, + { "Green", TW_TYPE_INT32, offsetof(CColorExt, G), "min=0 max=255" }, + { "Blue", TW_TYPE_INT32, offsetof(CColorExt, B), "min=0 max=255" }, + { "Hue", TW_TYPE_INT32, offsetof(CColorExt, H), "hide min=0 max=359" }, + { "Lightness", TW_TYPE_INT32, offsetof(CColorExt, L), "hide min=0 max=255" }, + { "Saturation", TW_TYPE_INT32, offsetof(CColorExt, S), "hide min=0 max=255" }, + { "Alpha", TW_TYPE_INT32, offsetof(CColorExt, A), "hide min=0 max=255" }, + { "Mode", TW_TYPE_BOOLCPP, offsetof(CColorExt, m_HLS), "true='HLS' false='RGB' readwrite" } }; + g_TwMgr->m_TypeColor32 = TwDefineStructExt("COLOR32", ColorExtMembers, 8, sizeof(unsigned int), sizeof(CColorExt), CColorExt::InitColor32CB, CColorExt::CopyVarFromExtCB, CColorExt::CopyVarToExtCB, CColorExt::SummaryCB, CTwMgr::CStruct::s_PassProxyAsClientData, "A 32-bit-encoded color."); + g_TwMgr->m_TypeColor3F = TwDefineStructExt("COLOR3F", ColorExtMembers, 8, 3*sizeof(float), sizeof(CColorExt), CColorExt::InitColor3FCB, CColorExt::CopyVarFromExtCB, CColorExt::CopyVarToExtCB, CColorExt::SummaryCB, CTwMgr::CStruct::s_PassProxyAsClientData, "A 3-floats-encoded RGB color."); + g_TwMgr->m_TypeColor4F = TwDefineStructExt("COLOR4F", ColorExtMembers, 8, 4*sizeof(float), sizeof(CColorExt), CColorExt::InitColor4FCB, CColorExt::CopyVarFromExtCB, CColorExt::CopyVarToExtCB, CColorExt::SummaryCB, CTwMgr::CStruct::s_PassProxyAsClientData, "A 4-floats-encoded RGBA color."); + // Do not name them "TW_COLOR*" because the name is displayed in the help bar. +} + +// --------------------------------------------------------------------------- +// Quaternion ext type +// --------------------------------------------------------------------------- + +void ANT_CALL CQuaternionExt::InitQuat4FCB(void *_ExtValue, void *_ClientData) +{ + CQuaternionExt *ext = static_cast(_ExtValue); + if( ext ) + { + ext->Qx = ext->Qy = ext->Qz = 0; + ext->Qs = 1; + ext->Vx = 1; + ext->Vy = ext->Vz = 0; + ext->Angle = 0; + ext->Dx = ext->Dy = ext->Dz = 0; + ext->m_AAMode = false; // Axis & angle mode hidden + ext->m_ShowVal = false; + ext->m_IsFloat = true; + ext->m_IsDir = false; + ext->m_Dir[0] = ext->m_Dir[1] = ext->m_Dir[2] = 0; + ext->m_DirColor = 0xffffff00; + int i, j; + for(i=0; i<3; ++i) + for(j=0; j<3; ++j) + ext->m_Permute[i][j] = (i==j) ? 1.0f : 0.0f; + ext->m_StructProxy = (CTwMgr::CStructProxy *)_ClientData; + ext->ConvertToAxisAngle(); + ext->m_Highlighted = false; + ext->m_Rotating = false; + if( ext->m_StructProxy!=NULL ) + { + ext->m_StructProxy->m_CustomDrawCallback = CQuaternionExt::DrawCB; + ext->m_StructProxy->m_CustomMouseButtonCallback = CQuaternionExt::MouseButtonCB; + ext->m_StructProxy->m_CustomMouseMotionCallback = CQuaternionExt::MouseMotionCB; + ext->m_StructProxy->m_CustomMouseLeaveCallback = CQuaternionExt::MouseLeaveCB; + } + } +} + +void ANT_CALL CQuaternionExt::InitQuat4DCB(void *_ExtValue, void *_ClientData) +{ + CQuaternionExt *ext = static_cast(_ExtValue); + if( ext ) + { + ext->Qx = ext->Qy = ext->Qz = 0; + ext->Qs = 1; + ext->Vx = 1; + ext->Vy = ext->Vz = 0; + ext->Angle = 0; + ext->Dx = ext->Dy = ext->Dz = 0; + ext->m_AAMode = false; // Axis & angle mode hidden + ext->m_ShowVal = false; + ext->m_IsFloat = false; + ext->m_IsDir = false; + ext->m_Dir[0] = ext->m_Dir[1] = ext->m_Dir[2] = 0; + ext->m_DirColor = 0xffffff00; + int i, j; + for(i=0; i<3; ++i) + for(j=0; j<3; ++j) + ext->m_Permute[i][j] = (i==j) ? 1.0f : 0.0f; + ext->m_StructProxy = (CTwMgr::CStructProxy *)_ClientData; + ext->ConvertToAxisAngle(); + ext->m_Highlighted = false; + ext->m_Rotating = false; + if( ext->m_StructProxy!=NULL ) + { + ext->m_StructProxy->m_CustomDrawCallback = CQuaternionExt::DrawCB; + ext->m_StructProxy->m_CustomMouseButtonCallback = CQuaternionExt::MouseButtonCB; + ext->m_StructProxy->m_CustomMouseMotionCallback = CQuaternionExt::MouseMotionCB; + ext->m_StructProxy->m_CustomMouseLeaveCallback = CQuaternionExt::MouseLeaveCB; + } + } +} + +void ANT_CALL CQuaternionExt::InitDir3FCB(void *_ExtValue, void *_ClientData) +{ + CQuaternionExt *ext = static_cast(_ExtValue); + if( ext ) + { + ext->Qx = ext->Qy = ext->Qz = 0; + ext->Qs = 1; + ext->Vx = 1; + ext->Vy = ext->Vz = 0; + ext->Angle = 0; + ext->Dx = 1; + ext->Dy = ext->Dz = 0; + ext->m_AAMode = false; // Axis & angle mode hidden + ext->m_ShowVal = true; + ext->m_IsFloat = true; + ext->m_IsDir = true; + ext->m_Dir[0] = ext->m_Dir[1] = ext->m_Dir[2] = 0; + ext->m_DirColor = 0xffffff00; + int i, j; + for(i=0; i<3; ++i) + for(j=0; j<3; ++j) + ext->m_Permute[i][j] = (i==j) ? 1.0f : 0.0f; + ext->m_StructProxy = (CTwMgr::CStructProxy *)_ClientData; + ext->ConvertToAxisAngle(); + ext->m_Highlighted = false; + ext->m_Rotating = false; + if( ext->m_StructProxy!=NULL ) + { + ext->m_StructProxy->m_CustomDrawCallback = CQuaternionExt::DrawCB; + ext->m_StructProxy->m_CustomMouseButtonCallback = CQuaternionExt::MouseButtonCB; + ext->m_StructProxy->m_CustomMouseMotionCallback = CQuaternionExt::MouseMotionCB; + ext->m_StructProxy->m_CustomMouseLeaveCallback = CQuaternionExt::MouseLeaveCB; + } + } +} + +void ANT_CALL CQuaternionExt::InitDir3DCB(void *_ExtValue, void *_ClientData) +{ + CQuaternionExt *ext = static_cast(_ExtValue); + if( ext ) + { + ext->Qx = ext->Qy = ext->Qz = 0; + ext->Qs = 1; + ext->Vx = 1; + ext->Vy = ext->Vz = 0; + ext->Angle = 0; + ext->Dx = 1; + ext->Dy = ext->Dz = 0; + ext->m_AAMode = false; // Axis & angle mode hidden + ext->m_ShowVal = true; + ext->m_IsFloat = false; + ext->m_IsDir = true; + ext->m_Dir[0] = ext->m_Dir[1] = ext->m_Dir[2] = 0; + ext->m_DirColor = 0xffffff00; + int i, j; + for(i=0; i<3; ++i) + for(j=0; j<3; ++j) + ext->m_Permute[i][j] = (i==j) ? 1.0f : 0.0f; + ext->m_StructProxy = (CTwMgr::CStructProxy *)_ClientData; + ext->ConvertToAxisAngle(); + ext->m_Highlighted = false; + ext->m_Rotating = false; + if( ext->m_StructProxy!=NULL ) + { + ext->m_StructProxy->m_CustomDrawCallback = CQuaternionExt::DrawCB; + ext->m_StructProxy->m_CustomMouseButtonCallback = CQuaternionExt::MouseButtonCB; + ext->m_StructProxy->m_CustomMouseMotionCallback = CQuaternionExt::MouseMotionCB; + ext->m_StructProxy->m_CustomMouseLeaveCallback = CQuaternionExt::MouseLeaveCB; + } + } +} + +void ANT_CALL CQuaternionExt::CopyVarFromExtCB(void *_VarValue, const void *_ExtValue, unsigned int _ExtMemberIndex, void *_ClientData) +{ + CQuaternionExt *ext = (CQuaternionExt *)(_ExtValue); + CTwMgr::CMemberProxy *mProxy = static_cast(_ClientData); + if( _VarValue && ext ) + { + // Synchronize Quat and AxisAngle + if( _ExtMemberIndex>=4 && _ExtMemberIndex<=7 ) + { + ext->ConvertToAxisAngle(); + // show/hide quat values + if( _ExtMemberIndex==4 && mProxy && mProxy->m_VarParent ) + { + assert( mProxy->m_VarParent->m_Vars.size()==16 ); + bool visible = ext->m_ShowVal; + if( ext->m_IsDir ) + { + if( mProxy->m_VarParent->m_Vars[13]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[14]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[15]->m_Visible != visible ) + { + mProxy->m_VarParent->m_Vars[13]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[14]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[15]->m_Visible = visible; + mProxy->m_Bar->NotUpToDate(); + } + } + else + { + if( mProxy->m_VarParent->m_Vars[4]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[5]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[6]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[7]->m_Visible != visible ) + { + mProxy->m_VarParent->m_Vars[4]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[5]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[6]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[7]->m_Visible = visible; + mProxy->m_Bar->NotUpToDate(); + } + } + } + } + else if( _ExtMemberIndex>=8 && _ExtMemberIndex<=11 ) + ext->ConvertFromAxisAngle(); + else if( mProxy && _ExtMemberIndex==12 && mProxy->m_VarParent && !ext->m_IsDir ) + { + assert( mProxy->m_VarParent->m_Vars.size()==16 ); + bool aa = ext->m_AAMode; + if( mProxy->m_VarParent->m_Vars[4]->m_Visible != !aa + || mProxy->m_VarParent->m_Vars[5]->m_Visible != !aa + || mProxy->m_VarParent->m_Vars[6]->m_Visible != !aa + || mProxy->m_VarParent->m_Vars[7]->m_Visible != !aa + || mProxy->m_VarParent->m_Vars[8 ]->m_Visible != aa + || mProxy->m_VarParent->m_Vars[9 ]->m_Visible != aa + || mProxy->m_VarParent->m_Vars[10]->m_Visible != aa + || mProxy->m_VarParent->m_Vars[11]->m_Visible != aa ) + { + mProxy->m_VarParent->m_Vars[4]->m_Visible = !aa; + mProxy->m_VarParent->m_Vars[5]->m_Visible = !aa; + mProxy->m_VarParent->m_Vars[6]->m_Visible = !aa; + mProxy->m_VarParent->m_Vars[7]->m_Visible = !aa; + mProxy->m_VarParent->m_Vars[8 ]->m_Visible = aa; + mProxy->m_VarParent->m_Vars[9 ]->m_Visible = aa; + mProxy->m_VarParent->m_Vars[10]->m_Visible = aa; + mProxy->m_VarParent->m_Vars[11]->m_Visible = aa; + mProxy->m_Bar->NotUpToDate(); + } + if( static_cast(mProxy->m_VarParent->m_Vars[12])->m_ReadOnly ) + { + static_cast(mProxy->m_VarParent->m_Vars[12])->m_ReadOnly = false; + mProxy->m_Bar->NotUpToDate(); + } + } + + if( ext->m_IsFloat ) + { + float *var = static_cast(_VarValue); + if( ext->m_IsDir ) + { + var[0] = (float)ext->Dx; + var[1] = (float)ext->Dy; + var[2] = (float)ext->Dz; + } + else // quat + { + var[0] = (float)ext->Qx; + var[1] = (float)ext->Qy; + var[2] = (float)ext->Qz; + var[3] = (float)ext->Qs; + } + } + else + { + double *var = static_cast(_VarValue); + if( ext->m_IsDir ) + { + var[0] = ext->Dx; + var[1] = ext->Dy; + var[2] = ext->Dz; + } + else // quat + { + var[0] = ext->Qx; + var[1] = ext->Qy; + var[2] = ext->Qz; + var[3] = ext->Qs; + } + } + } +} + +void ANT_CALL CQuaternionExt::CopyVarToExtCB(const void *_VarValue, void *_ExtValue, unsigned int _ExtMemberIndex, void *_ClientData) +{ + CQuaternionExt *ext = static_cast(_ExtValue); + CTwMgr::CMemberProxy *mProxy = static_cast(_ClientData); + (void)mProxy; + if( _VarValue && ext ) + { + if( mProxy && _ExtMemberIndex==12 && mProxy->m_VarParent && !ext->m_IsDir ) + { + assert( mProxy->m_VarParent->m_Vars.size()==16 ); + bool aa = ext->m_AAMode; + if( mProxy->m_VarParent->m_Vars[4]->m_Visible != !aa + || mProxy->m_VarParent->m_Vars[5]->m_Visible != !aa + || mProxy->m_VarParent->m_Vars[6]->m_Visible != !aa + || mProxy->m_VarParent->m_Vars[7]->m_Visible != !aa + || mProxy->m_VarParent->m_Vars[8 ]->m_Visible != aa + || mProxy->m_VarParent->m_Vars[9 ]->m_Visible != aa + || mProxy->m_VarParent->m_Vars[10]->m_Visible != aa + || mProxy->m_VarParent->m_Vars[11]->m_Visible != aa ) + { + mProxy->m_VarParent->m_Vars[4]->m_Visible = !aa; + mProxy->m_VarParent->m_Vars[5]->m_Visible = !aa; + mProxy->m_VarParent->m_Vars[6]->m_Visible = !aa; + mProxy->m_VarParent->m_Vars[7]->m_Visible = !aa; + mProxy->m_VarParent->m_Vars[8 ]->m_Visible = aa; + mProxy->m_VarParent->m_Vars[9 ]->m_Visible = aa; + mProxy->m_VarParent->m_Vars[10]->m_Visible = aa; + mProxy->m_VarParent->m_Vars[11]->m_Visible = aa; + mProxy->m_Bar->NotUpToDate(); + } + if( static_cast(mProxy->m_VarParent->m_Vars[12])->m_ReadOnly ) + { + static_cast(mProxy->m_VarParent->m_Vars[12])->m_ReadOnly = false; + mProxy->m_Bar->NotUpToDate(); + } + } + else if( mProxy && _ExtMemberIndex==4 && mProxy->m_VarParent ) + { + assert( mProxy->m_VarParent->m_Vars.size()==16 ); + bool visible = ext->m_ShowVal; + if( ext->m_IsDir ) + { + if( mProxy->m_VarParent->m_Vars[13]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[14]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[15]->m_Visible != visible ) + { + mProxy->m_VarParent->m_Vars[13]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[14]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[15]->m_Visible = visible; + mProxy->m_Bar->NotUpToDate(); + } + } + else + { + if( mProxy->m_VarParent->m_Vars[4]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[5]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[6]->m_Visible != visible + || mProxy->m_VarParent->m_Vars[7]->m_Visible != visible ) + { + mProxy->m_VarParent->m_Vars[4]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[5]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[6]->m_Visible = visible; + mProxy->m_VarParent->m_Vars[7]->m_Visible = visible; + mProxy->m_Bar->NotUpToDate(); + } + } + } + + if( ext->m_IsFloat ) + { + const float *var = static_cast(_VarValue); + if( ext->m_IsDir ) + { + ext->Dx = var[0]; + ext->Dy = var[1]; + ext->Dz = var[2]; + QuatFromDir(&ext->Qx, &ext->Qy, &ext->Qz, &ext->Qs, var[0], var[1], var[2]); + } + else + { + ext->Qx = var[0]; + ext->Qy = var[1]; + ext->Qz = var[2]; + ext->Qs = var[3]; + } + + } + else + { + const double *var = static_cast(_VarValue); + if( ext->m_IsDir ) + { + ext->Dx = var[0]; + ext->Dy = var[1]; + ext->Dz = var[2]; + QuatFromDir(&ext->Qx, &ext->Qy, &ext->Qz, &ext->Qs, var[0], var[1], var[2]); + } + else + { + ext->Qx = var[0]; + ext->Qy = var[1]; + ext->Qz = var[2]; + ext->Qs = var[3]; + } + } + ext->ConvertToAxisAngle(); + } +} + +void ANT_CALL CQuaternionExt::SummaryCB(char *_SummaryString, size_t _SummaryMaxLength, const void *_ExtValue, void * /*_ClientData*/) +{ + const CQuaternionExt *ext = static_cast(_ExtValue); + if( ext ) + { + if( ext->m_AAMode ) + _snprintf(_SummaryString, _SummaryMaxLength, "V={%.2f,%.2f,%.2f} A=%.0f", ext->Vx, ext->Vy, ext->Vz, ext->Angle); + else if( ext->m_IsDir ) + { + //float d[] = {1, 0, 0}; + //ApplyQuat(d+0, d+1, d+2, 1, 0, 0, (float)ext->Qx, (float)ext->Qy, (float)ext->Qz, (float)ext->Qs); + _snprintf(_SummaryString, _SummaryMaxLength, "V={%.2f,%.2f,%.2f}", ext->Dx, ext->Dy, ext->Dz); + } + else + _snprintf(_SummaryString, _SummaryMaxLength, "Q={x:%.2f,y:%.2f,z:%.2f,s:%.2f}", ext->Qx, ext->Qy, ext->Qz, ext->Qs); + } + else + { + _SummaryString[0] = ' '; // required to force background color for this value + _SummaryString[1] = '\0'; + } +} + +TwType CQuaternionExt::s_CustomType = TW_TYPE_UNDEF; +vector CQuaternionExt::s_SphTri; +vector CQuaternionExt::s_SphCol; +vector CQuaternionExt::s_SphTriProj; +vector CQuaternionExt::s_SphColLight; +vector CQuaternionExt::s_ArrowTri[4]; +vector CQuaternionExt::s_ArrowNorm[4]; +vector CQuaternionExt::s_ArrowTriProj[4]; +vector CQuaternionExt::s_ArrowColLight[4]; + +void CQuaternionExt::CreateTypes() +{ + if( g_TwMgr==NULL ) + return; + s_CustomType = (TwType)(TW_TYPE_CUSTOM_BASE + (int)g_TwMgr->m_Customs.size()); + g_TwMgr->m_Customs.push_back(NULL); // increment custom type number + + for(int pass=0; pass<2; pass++) // pass 0: create quat types; pass 1: create dir types + { + const char *quatDefPass0 = "step=0.01 hide"; + const char *quatDefPass1 = "step=0.01 hide"; + const char *quatSDefPass0 = "step=0.01 min=-1 max=1 hide"; + const char *quatSDefPass1 = "step=0.01 min=-1 max=1 hide"; + const char *dirDefPass0 = "step=0.01 hide"; + const char *dirDefPass1 = "step=0.01"; + const char *quatDef = (pass==0) ? quatDefPass0 : quatDefPass1; + const char *quatSDef = (pass==0) ? quatSDefPass0 : quatSDefPass1; + const char *dirDef = (pass==0) ? dirDefPass0 : dirDefPass1; + + TwStructMember QuatExtMembers[] = { { "0", s_CustomType, 0, "" }, + { "1", s_CustomType, 0, "" }, + { "2", s_CustomType, 0, "" }, + { "3", s_CustomType, 0, "" }, + { "Quat X", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Qx), quatDef }, // copy of the source quaternion + { "Quat Y", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Qy), quatDef }, + { "Quat Z", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Qz), quatDef }, + { "Quat S", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Qs), quatSDef }, + { "Axis X", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Vx), "step=0.01 hide" }, // axis and angle conversion -> Mode hidden because it is not equivalent to a quat (would have required vector renormalization) + { "Axis Y", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Vy), "step=0.01 hide" }, + { "Axis Z", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Vz), "step=0.01 hide" }, + { "Angle (degree)", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Angle), "step=1 min=-360 max=360 hide" }, + { "Mode", TW_TYPE_BOOLCPP, offsetof(CQuaternionExt, m_AAMode), "true='Axis Angle' false='Quaternion' readwrite hide" }, + { "Dir X", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Dx), dirDef }, // copy of the source direction + { "Dir Y", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Dy), dirDef }, + { "Dir Z", TW_TYPE_DOUBLE, offsetof(CQuaternionExt, Dz), dirDef } }; + if( pass==0 ) + { + g_TwMgr->m_TypeQuat4F = TwDefineStructExt("QUAT4F", QuatExtMembers, sizeof(QuatExtMembers)/sizeof(QuatExtMembers[0]), 4*sizeof(float), sizeof(CQuaternionExt), CQuaternionExt::InitQuat4FCB, CQuaternionExt::CopyVarFromExtCB, CQuaternionExt::CopyVarToExtCB, CQuaternionExt::SummaryCB, CTwMgr::CStruct::s_PassProxyAsClientData, "A 4-floats-encoded quaternion"); + g_TwMgr->m_TypeQuat4D = TwDefineStructExt("QUAT4D", QuatExtMembers, sizeof(QuatExtMembers)/sizeof(QuatExtMembers[0]), 4*sizeof(double), sizeof(CQuaternionExt), CQuaternionExt::InitQuat4DCB, CQuaternionExt::CopyVarFromExtCB, CQuaternionExt::CopyVarToExtCB, CQuaternionExt::SummaryCB, CTwMgr::CStruct::s_PassProxyAsClientData, "A 4-doubles-encoded quaternion"); + } + else if( pass==1 ) + { + g_TwMgr->m_TypeDir3F = TwDefineStructExt("DIR4F", QuatExtMembers, sizeof(QuatExtMembers)/sizeof(QuatExtMembers[0]), 3*sizeof(float), sizeof(CQuaternionExt), CQuaternionExt::InitDir3FCB, CQuaternionExt::CopyVarFromExtCB, CQuaternionExt::CopyVarToExtCB, CQuaternionExt::SummaryCB, CTwMgr::CStruct::s_PassProxyAsClientData, "A 3-floats-encoded direction"); + g_TwMgr->m_TypeDir3D = TwDefineStructExt("DIR4D", QuatExtMembers, sizeof(QuatExtMembers)/sizeof(QuatExtMembers[0]), 3*sizeof(double), sizeof(CQuaternionExt), CQuaternionExt::InitDir3DCB, CQuaternionExt::CopyVarFromExtCB, CQuaternionExt::CopyVarToExtCB, CQuaternionExt::SummaryCB, CTwMgr::CStruct::s_PassProxyAsClientData, "A 3-doubles-encoded direction"); + } + } + + CreateSphere(); + CreateArrow(); +} + +void CQuaternionExt::ConvertToAxisAngle() +{ + if( fabs(Qs)>(1.0 + FLOAT_EPS) ) + { + //Vx = Vy = Vz = 0; // no, keep the previous value + Angle = 0; + } + else + { + double a; + if( Qs>=1.0f ) + a = 0; // and keep V + else if( Qs<=-1.0f ) + a = DOUBLE_PI; // and keep V + else if( fabs(Qx*Qx+Qy*Qy+Qz*Qz+Qs*Qs)FLOAT_PI ) + // Angle -= 2.0f*FLOAT_PI; + // else if( Angle<-FLOAT_PI ) + // Angle += 2.0f*FLOAT_PI; + Angle = RadToDeg(Angle); + + if( fabs(Angle)FLOAT_EPS_SQ ) + { + double f = 0.5*DegToRad(Angle); + Qs = cos(f); + //do not normalize + //if( fabs(n - 1.0)>FLOAT_EPS_SQ ) + // f = sin(f) * (1.0/sqrt(n)) ; + //else + // f = sin(f); + f = sin(f); + + Qx = Vx * f; + Qy = Vy * f; + Qz = Vz * f; + } + else + { + Qs = 1.0; + Qx = Qy = Qz = 0.0; + } +} + +void CQuaternionExt::CopyToVar() +{ + if( m_StructProxy!=NULL ) + { + if( m_StructProxy->m_StructSetCallback!=NULL ) + { + if( m_IsFloat ) + { + if( m_IsDir ) + { + float d[] = {1, 0, 0}; + ApplyQuat(d+0, d+1, d+2, 1, 0, 0, (float)Qx, (float)Qy, (float)Qz, (float)Qs); + float l = (float)sqrt(Dx*Dx + Dy*Dy + Dz*Dz); + d[0] *= l; d[1] *= l; d[2] *= l; + Dx = d[0]; Dy = d[1]; Dz = d[2]; // update also Dx,Dy,Dz + m_StructProxy->m_StructSetCallback(d, m_StructProxy->m_StructClientData); + } + else + { + float q[] = { (float)Qx, (float)Qy, (float)Qz, (float)Qs }; + m_StructProxy->m_StructSetCallback(q, m_StructProxy->m_StructClientData); + } + } + else + { + if( m_IsDir ) + { + float d[] = {1, 0, 0}; + ApplyQuat(d+0, d+1, d+2, 1, 0, 0, (float)Qx, (float)Qy, (float)Qz, (float)Qs); + double l = sqrt(Dx*Dx + Dy*Dy + Dz*Dz); + double dd[] = {l*d[0], l*d[1], l*d[2]}; + Dx = dd[0]; Dy = dd[1]; Dz = dd[2]; // update also Dx,Dy,Dz + m_StructProxy->m_StructSetCallback(dd, m_StructProxy->m_StructClientData); + } + else + { + double q[] = { Qx, Qy, Qz, Qs }; + m_StructProxy->m_StructSetCallback(q, m_StructProxy->m_StructClientData); + } + } + } + else if( m_StructProxy->m_StructData!=NULL ) + { + if( m_IsFloat ) + { + if( m_IsDir ) + { + float *d = static_cast(m_StructProxy->m_StructData); + ApplyQuat(d+0, d+1, d+2, 1, 0, 0, (float)Qx, (float)Qy, (float)Qz, (float)Qs); + float l = (float)sqrt(Dx*Dx + Dy*Dy + Dz*Dz); + d[0] *= l; d[1] *= l; d[2] *= l; + Dx = d[0]; Dy = d[1]; Dz = d[2]; // update also Dx,Dy,Dz + } + else + { + float *q = static_cast(m_StructProxy->m_StructData); + q[0] = (float)Qx; q[1] = (float)Qy; q[2] = (float)Qz; q[3] = (float)Qs; + } + } + else + { + if( m_IsDir ) + { + double *dd = static_cast(m_StructProxy->m_StructData); + float d[] = {1, 0, 0}; + ApplyQuat(d+0, d+1, d+2, 1, 0, 0, (float)Qx, (float)Qy, (float)Qz, (float)Qs); + double l = sqrt(Dx*Dx + Dy*Dy + Dz*Dz); + dd[0] = l*d[0]; dd[1] = l*d[1]; dd[2] = l*d[2]; + Dx = dd[0]; Dy = dd[1]; Dz = dd[2]; // update also Dx,Dy,Dz + } + else + { + double *q = static_cast(m_StructProxy->m_StructData); + q[0] = Qx; q[1] = Qy; q[2] = Qz; q[3] = Qs; + } + } + } + } +} + +void CQuaternionExt::CreateSphere() +{ + const int SUBDIV = 7; + s_SphTri.clear(); + s_SphCol.clear(); + + const float A[8*3] = { 1,0,0, 0,0,-1, -1,0,0, 0,0,1, 0,0,1, 1,0,0, 0,0,-1, -1,0,0 }; + const float B[8*3] = { 0,1,0, 0,1,0, 0,1,0, 0,1,0, 0,-1,0, 0,-1,0, 0,-1,0, 0,-1,0 }; + const float C[8*3] = { 0,0,1, 1,0,0, 0,0,-1, -1,0,0, 1,0,0, 0,0,-1, -1,0,0, 0,0,1 }; + //const color32 COL_A[8] = { 0xffff8080, 0xff000080, 0xff800000, 0xff8080ff, 0xff8080ff, 0xffff8080, 0xff000080, 0xff800000 }; + //const color32 COL_B[8] = { 0xff80ff80, 0xff80ff80, 0xff80ff80, 0xff80ff80, 0xff008000, 0xff008000, 0xff008000, 0xff008000 }; + //const color32 COL_C[8] = { 0xff8080ff, 0xffff8080, 0xff000080, 0xff800000, 0xffff8080, 0xff000080, 0xff800000, 0xff8080ff }; + const color32 COL_A[8] = { 0xffffffff, 0xffffff40, 0xff40ff40, 0xff40ffff, 0xffff40ff, 0xffff4040, 0xff404040, 0xff4040ff }; + const color32 COL_B[8] = { 0xffffffff, 0xffffff40, 0xff40ff40, 0xff40ffff, 0xffff40ff, 0xffff4040, 0xff404040, 0xff4040ff }; + const color32 COL_C[8] = { 0xffffffff, 0xffffff40, 0xff40ff40, 0xff40ffff, 0xffff40ff, 0xffff4040, 0xff404040, 0xff4040ff }; + + int i, j, k, l; + float xa, ya, za, xb, yb, zb, xc, yc, zc, x, y, z, norm, u[3], v[3]; + color32 col; + for( i=0; i<8; ++i ) + { + xa = A[3*i+0]; ya = A[3*i+1]; za = A[3*i+2]; + xb = B[3*i+0]; yb = B[3*i+1]; zb = B[3*i+2]; + xc = C[3*i+0]; yc = C[3*i+1]; zc = C[3*i+2]; + for( j=0; j<=SUBDIV; ++j ) + for( k=0; k<=2*(SUBDIV-j); ++k ) + { + if( k%2==0 ) + { + u[0] = ((float)j)/(SUBDIV+1); + v[0] = ((float)(k/2))/(SUBDIV+1); + u[1] = ((float)(j+1))/(SUBDIV+1); + v[1] = ((float)(k/2))/(SUBDIV+1); + u[2] = ((float)j)/(SUBDIV+1); + v[2] = ((float)(k/2+1))/(SUBDIV+1); + } + else + { + u[0] = ((float)j)/(SUBDIV+1); + v[0] = ((float)(k/2+1))/(SUBDIV+1); + u[1] = ((float)(j+1))/(SUBDIV+1); + v[1] = ((float)(k/2))/(SUBDIV+1); + u[2] = ((float)(j+1))/(SUBDIV+1); + v[2] = ((float)(k/2+1))/(SUBDIV+1); + } + + for( l=0; l<3; ++l ) + { + x = (1.0f-u[l]-v[l])*xa + u[l]*xb + v[l]*xc; + y = (1.0f-u[l]-v[l])*ya + u[l]*yb + v[l]*yc; + z = (1.0f-u[l]-v[l])*za + u[l]*zb + v[l]*zc; + norm = sqrtf(x*x+y*y+z*z); + x /= norm; y /= norm; z /= norm; + s_SphTri.push_back(x); s_SphTri.push_back(y); s_SphTri.push_back(z); + if( u[l]+v[l]>FLOAT_EPS ) + col = ColorBlend(COL_A[i], ColorBlend(COL_B[i], COL_C[i], v[l]/(u[l]+v[l])), u[l]+v[l]); + else + col = COL_A[i]; + //if( (j==0 && k==0) || (j==0 && k==2*SUBDIV) || (j==SUBDIV && k==0) ) + // col = 0xffff0000; + s_SphCol.push_back(col); + } + } + } + s_SphTriProj.clear(); + s_SphTriProj.resize(2*s_SphCol.size(), 0); + s_SphColLight.clear(); + s_SphColLight.resize(s_SphCol.size(), 0); +} + +void CQuaternionExt::CreateArrow() +{ + const int SUBDIV = 15; + const float CYL_RADIUS = 0.08f; + const float CONE_RADIUS = 0.16f; + const float CONE_LENGTH = 0.25f; + const float ARROW_BGN = -1.1f; + const float ARROW_END = 1.15f; + int i; + for(i=0; i<4; ++i) + { + s_ArrowTri[i].clear(); + s_ArrowNorm[i].clear(); + } + + float x0, x1, y0, y1, z0, z1, a0, a1, nx, nn; + for(i=0; iDOUBLE_EPS ) + { + double f = 0.5*angle; + out[3] = cos(f); + f = sin(f)/sqrt(n); + out[0] = axis[0]*f; + out[1] = axis[1]*f; + out[2] = axis[2]*f; + } + else + { + out[3] = 1.0; + out[0] = out[1] = out[2] = 0.0; + } +} + +static inline void Vec3Cross(double *out, const double *a, const double *b) +{ + out[0] = a[1]*b[2]-a[2]*b[1]; + out[1] = a[2]*b[0]-a[0]*b[2]; + out[2] = a[0]*b[1]-a[1]*b[0]; +} + +static inline double Vec3Dot(const double *a, const double *b) +{ + return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; +} + +static inline void Vec3RotY(float *x, float *y, float *z) +{ + (void)y; + float tmp = *x; + *x = - *z; + *z = tmp; +} + +static inline void Vec3RotZ(float *x, float *y, float *z) +{ + (void)z; + float tmp = *x; + *x = - *y; + *y = tmp; +} + +void CQuaternionExt::ApplyQuat(float *outX, float *outY, float *outZ, float x, float y, float z, float qx, float qy, float qz, float qs) +{ + float ps = - qx * x - qy * y - qz * z; + float px = qs * x + qy * z - qz * y; + float py = qs * y + qz * x - qx * z; + float pz = qs * z + qx * y - qy * x; + *outX = - ps * qx + px * qs - py * qz + pz * qy; + *outY = - ps * qy + py * qs - pz * qx + px * qz; + *outZ = - ps * qz + pz * qs - px * qy + py * qx; +} + +void CQuaternionExt::QuatFromDir(double *outQx, double *outQy, double *outQz, double *outQs, double dx, double dy, double dz) +{ + // compute a quaternion that rotates (1,0,0) to (dx,dy,dz) + + double dn = sqrt(dx*dx + dy*dy + dz*dz); + if( dnm_Graph==NULL ) + return; + assert( g_TwMgr->m_Graph->IsDrawing() ); + CQuaternionExt *ext = static_cast(_ExtValue); + assert( ext!=NULL ); + (void)_ClientData; (void)_Bar; + + // show/hide quat values + assert( varGrp->m_Vars.size()==16 ); + bool visible = ext->m_ShowVal; + if( ext->m_IsDir ) + { + if( varGrp->m_Vars[13]->m_Visible != visible + || varGrp->m_Vars[14]->m_Visible != visible + || varGrp->m_Vars[15]->m_Visible != visible ) + { + varGrp->m_Vars[13]->m_Visible = visible; + varGrp->m_Vars[14]->m_Visible = visible; + varGrp->m_Vars[15]->m_Visible = visible; + _Bar->NotUpToDate(); + } + } + else + { + if( varGrp->m_Vars[4]->m_Visible != visible + || varGrp->m_Vars[5]->m_Visible != visible + || varGrp->m_Vars[6]->m_Visible != visible + || varGrp->m_Vars[7]->m_Visible != visible ) + { + varGrp->m_Vars[4]->m_Visible = visible; + varGrp->m_Vars[5]->m_Visible = visible; + varGrp->m_Vars[6]->m_Visible = visible; + varGrp->m_Vars[7]->m_Visible = visible; + _Bar->NotUpToDate(); + } + } + + // force ext update + static_cast(varGrp->m_Vars[4])->ValueToDouble(); + + assert( s_SphTri.size()>0 ); + assert( s_SphTri.size()==3*s_SphCol.size() ); + assert( s_SphTriProj.size()==2*s_SphCol.size() ); + assert( s_SphColLight.size()==s_SphCol.size() ); + + if( QuatD(w, h)<=2 ) + return; + float x, y, z, nx, ny, nz, kx, ky, kz, qx, qy, qz, qs; + int i, j, k, l, m; + + // normalize quaternion + float qn = (float)sqrt(ext->Qs*ext->Qs+ext->Qx*ext->Qx+ext->Qy*ext->Qy+ext->Qz*ext->Qz); + if( qn>FLOAT_EPS ) + { + qx = (float)ext->Qx/qn; + qy = (float)ext->Qy/qn; + qz = (float)ext->Qz/qn; + qs = (float)ext->Qs/qn; + } + else + { + qx = qy = qz = 0; + qs = 1; + } + + double normDir = sqrt(ext->m_Dir[0]*ext->m_Dir[0] + ext->m_Dir[1]*ext->m_Dir[1] + ext->m_Dir[2]*ext->m_Dir[2]); + bool drawDir = ext->m_IsDir || (normDir>DOUBLE_EPS); + color32 alpha = ext->m_Highlighted ? 0xffffffff : 0xb0ffffff; + + // check if frame is right-handed + ext->Permute(&kx, &ky, &kz, 1, 0, 0); + double px[3] = { (double)kx, (double)ky, (double)kz }; + ext->Permute(&kx, &ky, &kz, 0, 1, 0); + double py[3] = { (double)kx, (double)ky, (double)kz }; + ext->Permute(&kx, &ky, &kz, 0, 0, 1); + double pz[3] = { (double)kx, (double)ky, (double)kz }; + double ez[3]; + Vec3Cross(ez, px, py); + bool frameRightHanded = (ez[0]*pz[0]+ez[1]*pz[1]+ez[2]*pz[2] >= 0); + ITwGraph::Cull cull = frameRightHanded ? ITwGraph::CULL_CW : ITwGraph::CULL_CCW; + + if( drawDir ) + { + float dir[] = {(float)ext->m_Dir[0], (float)ext->m_Dir[1], (float)ext->m_Dir[2]}; + if( normDirPermute(&x, &y, &z, kx, ky, kz); + j = (z>0) ? 3-k : k; + + assert( s_ArrowTriProj[j].size()==2*(s_ArrowTri[j].size()/3) && s_ArrowColLight[j].size()==s_ArrowTri[j].size()/3 && s_ArrowNorm[j].size()==s_ArrowTri[j].size() ); + const int ntri = (int)s_ArrowTri[j].size()/3; + const float *tri = &(s_ArrowTri[j][0]); + const float *norm = &(s_ArrowNorm[j][0]); + int *triProj = &(s_ArrowTriProj[j][0]); + color32 *colLight = &(s_ArrowColLight[j][0]); + for(i=0; i0 ) + x = 2.5f*x - 2.0f; + else + x += 0.2f; + y *= 1.5f; + z *= 1.5f; + ApplyQuat(&x, &y, &z, x, y, z, (float)rotDirQuat[0], (float)rotDirQuat[1], (float)rotDirQuat[2], (float)rotDirQuat[3]); + ApplyQuat(&x, &y, &z, x, y, z, qx, qy, qz, qs); + ext->Permute(&x, &y, &z, x, y, z); + ApplyQuat(&nx, &ny, &nz, nx, ny, nz, (float)rotDirQuat[0], (float)rotDirQuat[1], (float)rotDirQuat[2], (float)rotDirQuat[3]); + ApplyQuat(&nx, &ny, &nz, nx, ny, nz, qx, qy, qz, qs); + ext->Permute(&nx, &ny, &nz, nx, ny, nz); + triProj[2*i+0] = QuatPX(x, w, h); + triProj[2*i+1] = QuatPY(y, w, h); + color32 col = (ext->m_DirColor|0xff000000) & alpha; + colLight[i] = ColorBlend(0xff000000, col, fabsf(TClamp(nz, -1.0f, 1.0f))); + } + if( s_ArrowTri[j].size()>=9 ) // 1 tri = 9 floats + g_TwMgr->m_Graph->DrawTriangles((int)s_ArrowTri[j].size()/9, triProj, colLight, cull); + } + } + else + { + /* + int px0 = QuatPX(0, w, h)-1, py0 = QuatPY(0, w, h), r0 = (int)(0.5f*QuatD(w, h)-0.5f); + color32 col0 = 0x80000000; + DrawArc(px0-1, py0, r0, 0, 360, col0); + DrawArc(px0+1, py0, r0, 0, 360, col0); + DrawArc(px0, py0-1, r0, 0, 360, col0); + DrawArc(px0, py0+1, r0, 0, 360, col0); + */ + // draw arrows & sphere + const float SPH_RADIUS = 0.75f; + for(m=0; m<2; ++m) // m=0: back, m=1: front + { + for(l=0; l<3; ++l) // draw 3 arrows + { + kx = 1; ky = 0; kz = 0; + if( l==1 ) + Vec3RotZ(&kx, &ky, &kz); + else if( l==2 ) + Vec3RotY(&kx, &ky, &kz); + ApplyQuat(&kx, &ky, &kz, kx, ky, kz, qx, qy, qz, qs); + for(k=0; k<4; ++k) // 4 parts of the arrow + { + // draw order + ext->Permute(&x, &y, &z, kx, ky, kz); + j = (z>0) ? 3-k : k; + + bool cone = true; + if( (m==0 && z>0) || (m==1 && z<=0) ) + { + if( j==ARROW_CONE || j==ARROW_CONE_CAP ) // do not draw cone + continue; + else + cone = false; + } + assert( s_ArrowTriProj[j].size()==2*(s_ArrowTri[j].size()/3) && s_ArrowColLight[j].size()==s_ArrowTri[j].size()/3 && s_ArrowNorm[j].size()==s_ArrowTri[j].size() ); + const int ntri = (int)s_ArrowTri[j].size()/3; + const float *tri = &(s_ArrowTri[j][0]); + const float *norm = &(s_ArrowNorm[j][0]); + int *triProj = &(s_ArrowTriProj[j][0]); + color32 *colLight = &(s_ArrowColLight[j][0]); + for(i=0; i0 ) + x = -SPH_RADIUS; + nx = norm[3*i+0]; ny = norm[3*i+1]; nz = norm[3*i+2]; + if( l==1 ) + { + Vec3RotZ(&x, &y, &z); + Vec3RotZ(&nx, &ny, &nz); + } + else if( l==2 ) + { + Vec3RotY(&x, &y, &z); + Vec3RotY(&nx, &ny, &nz); + } + ApplyQuat(&x, &y, &z, x, y, z, qx, qy, qz, qs); + ext->Permute(&x, &y, &z, x, y, z); + ApplyQuat(&nx, &ny, &nz, nx, ny, nz, qx, qy, qz, qs); + ext->Permute(&nx, &ny, &nz, nx, ny, nz); + triProj[2*i+0] = QuatPX(x, w, h); + triProj[2*i+1] = QuatPY(y, w, h); + float fade = ( m==0 && z<0 ) ? TClamp(2.0f*z*z, 0.0f, 1.0f) : 0; + float alphaFade = 1.0f; + Color32ToARGBf(alpha, &alphaFade, NULL, NULL, NULL); + alphaFade *= (1.0f-fade); + color32 alphaFadeCol = Color32FromARGBf(alphaFade, 1, 1, 1); + color32 col = (l==0) ? 0xffff0000 : ( (l==1) ? 0xff00ff00 : 0xff0000ff ); + colLight[i] = ColorBlend(0xff000000, col, fabsf(TClamp(nz, -1.0f, 1.0f))) & alphaFadeCol; + } + if( s_ArrowTri[j].size()>=9 ) // 1 tri = 9 floats + g_TwMgr->m_Graph->DrawTriangles((int)s_ArrowTri[j].size()/9, triProj, colLight, cull); + } + } + + if( m==0 ) + { + const float *tri = &(s_SphTri[0]); + int *triProj = &(s_SphTriProj[0]); + const color32 *col = &(s_SphCol[0]); + color32 *colLight = &(s_SphColLight[0]); + const int ntri = (int)s_SphTri.size()/3; + for(i=0; iPermute(&x, &y, &z, x, y, z); + triProj[2*i+0] = QuatPX(x, w, h); + triProj[2*i+1] = QuatPY(y, w, h); + colLight[i] = ColorBlend(0xff000000, col[i], fabsf(TClamp(z/SPH_RADIUS, -1.0f, 1.0f))) & alpha; + } + g_TwMgr->m_Graph->DrawTriangles((int)s_SphTri.size()/9, triProj, colLight, cull); + } + } + + // draw x + g_TwMgr->m_Graph->DrawLine(w-12, h-36, w-12+5, h-36+5, 0xffc00000, true); + g_TwMgr->m_Graph->DrawLine(w-12+5, h-36, w-12, h-36+5, 0xffc00000, true); + // draw y + g_TwMgr->m_Graph->DrawLine(w-12, h-25, w-12+3, h-25+4, 0xff00c000, true); + g_TwMgr->m_Graph->DrawLine(w-12+5, h-25, w-12, h-25+7, 0xff00c000, true); + // draw z + g_TwMgr->m_Graph->DrawLine(w-12, h-12, w-12+5, h-12, 0xff0000c0, true); + g_TwMgr->m_Graph->DrawLine(w-12, h-12+5, w-12+5, h-12+5, 0xff0000c0, true); + g_TwMgr->m_Graph->DrawLine(w-12, h-12+5, w-12+5, h-12, 0xff0000c0, true); + } + + // draw borders + g_TwMgr->m_Graph->DrawLine(1, 0, w-1, 0, 0x40000000); + g_TwMgr->m_Graph->DrawLine(w-1, 0, w-1, h-1, 0x40000000); + g_TwMgr->m_Graph->DrawLine(w-1, h-1, 1, h-1, 0x40000000); + g_TwMgr->m_Graph->DrawLine(1, h-1, 1, 0, 0x40000000); +} + +bool CQuaternionExt::MouseMotionCB(int mouseX, int mouseY, int w, int h, void *structExtValue, void *clientData, TwBar *bar, CTwVarGroup *varGrp) +{ + CQuaternionExt *ext = static_cast(structExtValue); + if( ext==NULL ) + return false; + (void)clientData, (void)varGrp; + + if( mouseX>0 && mouseX0 && mouseYm_Highlighted = true; + + if( ext->m_Rotating ) + { + double x = QuatIX(mouseX, w, h); + double y = QuatIY(mouseY, w, h); + double z = 1; + double px, py, pz, ox, oy, oz; + ext->PermuteInv(&px, &py, &pz, x, y, z); + ext->PermuteInv(&ox, &oy, &oz, ext->m_OrigX, ext->m_OrigY, 1); + double n0 = sqrt(ox*ox + oy*oy + oz*oz); + double n1 = sqrt(px*px + py*py + pz*pz); + if( n0>DOUBLE_EPS && n1>DOUBLE_EPS ) + { + double v0[] = { ox/n0, oy/n0, oz/n0 }; + double v1[] = { px/n1, py/n1, pz/n1 }; + double axis[3]; + Vec3Cross(axis, v0, v1); + double sa = sqrt(Vec3Dot(axis, axis)); + double ca = Vec3Dot(v0, v1); + double angle = atan2(sa, ca); + if( x*x+y*y>1.0 ) + angle *= 1.0 + 0.2f*(sqrt(x*x+y*y)-1.0); + double qrot[4], qres[4], qorig[4]; + QuatFromAxisAngle(qrot, axis, angle); + double nqorig = sqrt(ext->m_OrigQuat[0]*ext->m_OrigQuat[0]+ext->m_OrigQuat[1]*ext->m_OrigQuat[1]+ext->m_OrigQuat[2]*ext->m_OrigQuat[2]+ext->m_OrigQuat[3]*ext->m_OrigQuat[3]); + if( fabs(nqorig)>DOUBLE_EPS_SQ ) + { + qorig[0] = ext->m_OrigQuat[0]/nqorig; + qorig[1] = ext->m_OrigQuat[1]/nqorig; + qorig[2] = ext->m_OrigQuat[2]/nqorig; + qorig[3] = ext->m_OrigQuat[3]/nqorig; + QuatMult(qres, qrot, qorig); + ext->Qx = qres[0]; + ext->Qy = qres[1]; + ext->Qz = qres[2]; + ext->Qs = qres[3]; + } + else + { + ext->Qx = qrot[0]; + ext->Qy = qrot[1]; + ext->Qz = qrot[2]; + ext->Qs = qrot[3]; + } + ext->CopyToVar(); + if( bar!=NULL ) + bar->NotUpToDate(); + + ext->m_PrevX = x; + ext->m_PrevY = y; + } + } + + return true; +} + +bool CQuaternionExt::MouseButtonCB(TwMouseButtonID button, bool pressed, int mouseX, int mouseY, int w, int h, void *structExtValue, void *clientData, TwBar *bar, CTwVarGroup *varGrp) +{ + CQuaternionExt *ext = static_cast(structExtValue); + if( ext==NULL ) + return false; + (void)clientData; (void)bar, (void)varGrp; + + if( button==TW_MOUSE_LEFT ) + { + if( pressed ) + { + ext->m_OrigQuat[0] = ext->Qx; + ext->m_OrigQuat[1] = ext->Qy; + ext->m_OrigQuat[2] = ext->Qz; + ext->m_OrigQuat[3] = ext->Qs; + ext->m_OrigX = QuatIX(mouseX, w, h); + ext->m_OrigY = QuatIY(mouseY, w, h); + ext->m_PrevX = ext->m_OrigX; + ext->m_PrevY = ext->m_OrigY; + ext->m_Rotating = true; + } + else + ext->m_Rotating = false; + } + + //printf("Click %x\n", structExtValue); + return true; +} + +void CQuaternionExt::MouseLeaveCB(void *structExtValue, void *clientData, TwBar *bar) +{ + CQuaternionExt *ext = static_cast(structExtValue); + if( ext==NULL ) + return; + (void)clientData; (void)bar; + + //printf("Leave %x\n", structExtValue); + ext->m_Highlighted = false; + ext->m_Rotating = false; +} + + +// --------------------------------------------------------------------------- +// Convertion between VC++ Debug/Release std::string +// (Needed because VC++ adds some extra info to std::string in Debug mode!) +// --------------------------------------------------------------------------- + + +CTwMgr::CClientStdString::CClientStdString() +{ + memset(m_Data, 0, sizeof(m_Data)); +} + +void CTwMgr::CClientStdString::FromLib(const char *libStr) +{ + m_LibStr = libStr; // it is ok to have a local copy here + memcpy(m_Data + sizeof(void *), &m_LibStr, sizeof(std::string)); +} + +std::string& CTwMgr::CClientStdString::ToClient() +{ + assert( g_TwMgr!=NULL ); + if( g_TwMgr->m_ClientStdStringStructSize==sizeof(std::string)+sizeof(void *) ) + return *(std::string *)(m_Data); + else if( g_TwMgr->m_ClientStdStringStructSize+sizeof(void *)==sizeof(std::string) ) + return *(std::string *)(m_Data + 2*sizeof(void *)); + else + { + assert( g_TwMgr->m_ClientStdStringStructSize==sizeof(std::string) ); + return *(std::string *)(m_Data + sizeof(void *)); + } +} + + +CTwMgr::CLibStdString::CLibStdString() +{ + memset(m_Data, 0, sizeof(m_Data)); +} + +void CTwMgr::CLibStdString::FromClient(const std::string& clientStr) +{ + assert( g_TwMgr!=NULL ); + memcpy(m_Data + sizeof(void *), &clientStr, g_TwMgr->m_ClientStdStringStructSize); +} + +std::string& CTwMgr::CLibStdString::ToLib() +{ + assert( g_TwMgr!=NULL ); + if( g_TwMgr->m_ClientStdStringStructSize==sizeof(std::string)+sizeof(void *) ) + return *(std::string *)(m_Data + 2*sizeof(void *)); + else if( g_TwMgr->m_ClientStdStringStructSize+sizeof(void *)==sizeof(std::string) ) + return *(std::string *)(m_Data); + else + { + assert( g_TwMgr->m_ClientStdStringStructSize==sizeof(std::string) ); + return *(std::string *)(m_Data + sizeof(void *)); + } +} + + +// --------------------------------------------------------------------------- +// Management functions +// --------------------------------------------------------------------------- + + +static int TwCreateGraph(ETwGraphAPI _GraphAPI) +{ + assert( g_TwMgr!=NULL && g_TwMgr->m_Graph==NULL ); + + switch( _GraphAPI ) + { + case TW_OPENGL: + g_TwMgr->m_Graph = new CTwGraphOpenGL; + break; + /* WIP + case TW_OPENGL_CORE: + g_TwMgr->m_Graph = new CTwGraphOpenGLCore; + break; + */ + case TW_DIRECT3D9: + #ifdef ANT_WINDOWS + if( g_TwMgr->m_Device!=NULL ) + g_TwMgr->m_Graph = new CTwGraphDirect3D9; + else + { + g_TwMgr->SetLastError(g_ErrBadDevice); + return 0; + } + #endif // ANT_WINDOWS + break; + case TW_DIRECT3D10: + #ifdef ANT_WINDOWS + if( g_TwMgr->m_Device!=NULL ) + g_TwMgr->m_Graph = new CTwGraphDirect3D10; + else + { + g_TwMgr->SetLastError(g_ErrBadDevice); + return 0; + } + #endif // ANT_WINDOWS + break; + case TW_DIRECT3D11: + #ifdef ANT_WINDOWS + if( g_TwMgr->m_Device!=NULL ) + g_TwMgr->m_Graph = new CTwGraphDirect3D11; + else + { + g_TwMgr->SetLastError(g_ErrBadDevice); + return 0; + } + #endif // ANT_WINDOWS + break; + } + + if( g_TwMgr->m_Graph==NULL ) + { + g_TwMgr->SetLastError(g_ErrUnknownAPI); + return 0; + } + else + return g_TwMgr->m_Graph->Init(); +} + +// --------------------------------------------------------------------------- + +static inline int TwFreeAsyncDrawing() +{ + if( g_TwMgr && g_TwMgr->m_Graph && g_TwMgr->m_Graph->IsDrawing() ) + { + const double SLEEP_MAX = 0.25; // wait at most 1/4 second + PerfTimer timer; + while( g_TwMgr->m_Graph->IsDrawing() && timer.GetTime()m_Graph->IsDrawing() ) + { + g_TwMgr->SetLastError(g_ErrIsDrawing); + return 0; + } + } + return 1; +} + +// --------------------------------------------------------------------------- + +/* +static inline int TwFreeAsyncProcessing() +{ + if( g_TwMgr && g_TwMgr->IsProcessing() ) + { + const double SLEEP_MAX = 0.25; // wait at most 1/4 second + PerfTimer timer; + while( g_TwMgr->IsProcessing() && timer.GetTime()IsProcessing() ) + { + g_TwMgr->SetLastError(g_ErrIsProcessing); + return 0; + } + } + return 1; +} + +static inline int TwBeginProcessing() +{ + if( !TwFreeAsyncProcessing() ) + return 0; + if( g_TwMgr ) + g_TwMgr->SetProcessing(true); +} + +static inline int TwEndProcessing() +{ + if( g_TwMgr ) + g_TwMgr->SetProcessing(false); +} +*/ + +// --------------------------------------------------------------------------- + +static int TwInitMgr() +{ + assert( g_TwMasterMgr!=NULL ); + assert( g_TwMgr!=NULL ); + + g_TwMgr->m_CurrentFont = g_DefaultNormalFont; + g_TwMgr->m_Graph = g_TwMasterMgr->m_Graph; + + g_TwMgr->m_KeyPressedTextObj = g_TwMgr->m_Graph->NewTextObj(); + g_TwMgr->m_InfoTextObj = g_TwMgr->m_Graph->NewTextObj(); + + g_TwMgr->m_HelpBar = TwNewBar("TW_HELP"); + if( g_TwMgr->m_HelpBar ) + { + g_TwMgr->m_HelpBar->m_Label = "~ Help & Shortcuts ~"; + g_TwMgr->m_HelpBar->m_PosX = 32; + g_TwMgr->m_HelpBar->m_PosY = 32; + g_TwMgr->m_HelpBar->m_Width = 400; + g_TwMgr->m_HelpBar->m_Height = 200; + g_TwMgr->m_HelpBar->m_ValuesWidth = 12*(g_TwMgr->m_HelpBar->m_Font->m_CharHeight/2); + g_TwMgr->m_HelpBar->m_Color = 0xa05f5f5f; //0xd75f5f5f; + g_TwMgr->m_HelpBar->m_DarkText = false; + g_TwMgr->m_HelpBar->m_IsHelpBar = true; + g_TwMgr->Minimize(g_TwMgr->m_HelpBar); + } + else + return 0; + + CColorExt::CreateTypes(); + CQuaternionExt::CreateTypes(); + + return 1; +} + + +int ANT_CALL TwInit(ETwGraphAPI _GraphAPI, void *_Device) +{ +#if defined(_DEBUG) && defined(ANT_WINDOWS) + _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF)); +#endif + + if( g_TwMasterMgr!=NULL ) + { + g_TwMasterMgr->SetLastError(g_ErrInit); + return 0; + } + assert( g_TwMgr==0 ); + assert( g_Wnds.empty() ); + + g_TwMasterMgr = new CTwMgr(_GraphAPI, _Device, TW_MASTER_WINDOW_ID); + g_Wnds[TW_MASTER_WINDOW_ID] = g_TwMasterMgr; + g_TwMgr = g_TwMasterMgr; + + TwGenerateDefaultFonts(); + g_TwMgr->m_CurrentFont = g_DefaultNormalFont; + + int Res = TwCreateGraph(_GraphAPI); + if( Res ) + Res = TwInitMgr(); + + if( !Res ) + TwTerminate(); + + return Res; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwSetLastError(const char *_StaticErrorMessage) +{ + if( g_TwMasterMgr!=0 ) + { + g_TwMasterMgr->SetLastError(_StaticErrorMessage); + return 1; + } + else + return 0; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwTerminate() +{ + if( g_TwMgr==NULL ) + { + //TwGlobalError(g_ErrShut); -> not an error + return 0; // already shutdown + } + + // For multi-thread safety + if( !TwFreeAsyncDrawing() ) + return 0; + + CTwWndMap::iterator it; + for( it=g_Wnds.begin(); it!=g_Wnds.end(); it++ ) + { + g_TwMgr = it->second; + + g_TwMgr->m_Terminating = true; + TwDeleteAllBars(); + if( g_TwMgr->m_CursorsCreated ) + g_TwMgr->FreeCursors(); + + if( g_TwMgr->m_Graph ) + { + if( g_TwMgr->m_KeyPressedTextObj ) + { + g_TwMgr->m_Graph->DeleteTextObj(g_TwMgr->m_KeyPressedTextObj); + g_TwMgr->m_KeyPressedTextObj = NULL; + } + if( g_TwMgr->m_InfoTextObj ) + { + g_TwMgr->m_Graph->DeleteTextObj(g_TwMgr->m_InfoTextObj); + g_TwMgr->m_InfoTextObj = NULL; + } + if (g_TwMgr != g_TwMasterMgr) + g_TwMgr->m_Graph = NULL; + } + + if (g_TwMgr != g_TwMasterMgr) + { + delete g_TwMgr; + g_TwMgr = NULL; + } + } + + // delete g_TwMasterMgr + int Res = 1; + g_TwMgr = g_TwMasterMgr; + if( g_TwMasterMgr->m_Graph ) + { + Res = g_TwMasterMgr->m_Graph->Shut(); + delete g_TwMasterMgr->m_Graph; + g_TwMasterMgr->m_Graph = NULL; + } + TwDeleteDefaultFonts(); + delete g_TwMasterMgr; + g_TwMasterMgr = NULL; + g_TwMgr = NULL; + g_Wnds.clear(); + + return Res; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwGetCurrentWindow() +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + + return g_TwMgr->m_WndID; +} + +int ANT_CALL TwSetCurrentWindow(int wndID) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + + if (wndID != g_TwMgr->m_WndID) + { + CTwWndMap::iterator foundWnd = g_Wnds.find(wndID); + if (foundWnd == g_Wnds.end()) + { + // create a new CTwMgr + g_TwMgr = new CTwMgr(g_TwMasterMgr->m_GraphAPI, g_TwMasterMgr->m_Device, wndID); + g_Wnds[wndID] = g_TwMgr; + return TwInitMgr(); + } + else + { + g_TwMgr = foundWnd->second; + return 1; + } + } + else + return 1; +} + +int ANT_CALL TwWindowExists(int wndID) +{ + CTwWndMap::iterator foundWnd = g_Wnds.find(wndID); + if (foundWnd == g_Wnds.end()) + return 0; + else + return 1; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwDraw() +{ + PERF( PerfTimer Timer; double DT; ) + //CTwFPU fpu; // fpu precision only forced in update (do not modif dx draw calls) + + if( g_TwMgr==NULL || g_TwMgr->m_Graph==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + + assert(g_TwMgr->m_Bars.size()==g_TwMgr->m_Order.size()); + + // For multi-thread savety + if( !TwFreeAsyncDrawing() ) + return 0; + + // Create cursors + #if defined(ANT_WINDOWS) || defined(ANT_OSX) + if( !g_TwMgr->m_CursorsCreated ) + g_TwMgr->CreateCursors(); + #elif defined(ANT_UNIX) + if( !g_TwMgr->m_CurrentXDisplay ) + g_TwMgr->m_CurrentXDisplay = glXGetCurrentDisplay(); + if( !g_TwMgr->m_CurrentXWindow ) + g_TwMgr->m_CurrentXWindow = glXGetCurrentDrawable(); + if( g_TwMgr->m_CurrentXDisplay && !g_TwMgr->m_CursorsCreated ) + g_TwMgr->CreateCursors(); + #endif + + // Autorepeat TW_MOUSE_PRESSED + double CurrTime = g_TwMgr->m_Timer.GetTime(); + double RepeatDT = CurrTime - g_TwMgr->m_LastMousePressedTime; + double DrawDT = CurrTime - g_TwMgr->m_LastDrawTime; + if( RepeatDT>2.0*g_TwMgr->m_RepeatMousePressedDelay + || DrawDT>2.0*g_TwMgr->m_RepeatMousePressedDelay + || abs(g_TwMgr->m_LastMousePressedPosition[0]-g_TwMgr->m_LastMouseX)>4 + || abs(g_TwMgr->m_LastMousePressedPosition[1]-g_TwMgr->m_LastMouseY)>4 ) + { + g_TwMgr->m_CanRepeatMousePressed = false; + g_TwMgr->m_IsRepeatingMousePressed = false; + } + if( g_TwMgr->m_CanRepeatMousePressed ) + { + if( (!g_TwMgr->m_IsRepeatingMousePressed && RepeatDT>g_TwMgr->m_RepeatMousePressedDelay) + || (g_TwMgr->m_IsRepeatingMousePressed && RepeatDT>g_TwMgr->m_RepeatMousePressedPeriod) ) + { + g_TwMgr->m_IsRepeatingMousePressed = true; + g_TwMgr->m_LastMousePressedTime = g_TwMgr->m_Timer.GetTime(); + TwMouseButton(TW_MOUSE_PRESSED, g_TwMgr->m_LastMousePressedButtonID); + } + } + g_TwMgr->m_LastDrawTime = CurrTime; + + if( g_TwMgr->m_WndWidth<0 || g_TwMgr->m_WndHeight<0 ) + { + g_TwMgr->SetLastError(g_ErrBadSize); + return 0; + } + else if( g_TwMgr->m_WndWidth==0 || g_TwMgr->m_WndHeight==0 ) // probably iconified + return 1; // nothing to do + + // count number of bars to draw + size_t i, j; + int Nb = 0; + for( i=0; im_Bars.size(); ++i ) + if( g_TwMgr->m_Bars[i]!=NULL && g_TwMgr->m_Bars[i]->m_Visible ) + ++Nb; + + if( Nb>0 ) + { + PERF( Timer.Reset(); ) + g_TwMgr->m_Graph->BeginDraw(g_TwMgr->m_WndWidth, g_TwMgr->m_WndHeight); + PERF( DT = Timer.GetTime(); printf("\nBegin=%.4fms ", 1000.0*DT); ) + + PERF( Timer.Reset(); ) + vector TopBarsRects, ClippedBarRects; + for( i=0; im_Bars.size(); ++i ) + { + CTwBar *Bar = g_TwMgr->m_Bars[ g_TwMgr->m_Order[i] ]; + if( Bar->m_Visible ) + { + if( g_TwMgr->m_OverlapContent || Bar->IsMinimized() ) + Bar->Draw(); + else + { + // Clip overlapped transparent bars to make them more readable + const int Margin = 4; + CRect BarRect(Bar->m_PosX - Margin, Bar->m_PosY - Margin, Bar->m_Width + 2*Margin, Bar->m_Height + 2*Margin); + TopBarsRects.clear(); + for( j=i+1; jm_Bars.size(); ++j ) + { + CTwBar *TopBar = g_TwMgr->m_Bars[g_TwMgr->m_Order[j]]; + if( TopBar->m_Visible && !TopBar->IsMinimized() ) + TopBarsRects.push_back(CRect(TopBar->m_PosX, TopBar->m_PosY, TopBar->m_Width, TopBar->m_Height)); + } + ClippedBarRects.clear(); + BarRect.Subtract(TopBarsRects, ClippedBarRects); + + if( ClippedBarRects.size()==1 && ClippedBarRects[0]==BarRect ) + //g_TwMgr->m_Graph->DrawRect(Bar->m_PosX, Bar->m_PosY, Bar->m_PosX+Bar->m_Width-1, Bar->m_PosY+Bar->m_Height-1, 0x70ffffff); // Clipping test + Bar->Draw(); // unclipped + else + { + Bar->Draw(CTwBar::DRAW_BG); // draw background only + + // draw content for each clipped rectangle + for( j=0; j1 && ClippedBarRects[j].H>1) + { + g_TwMgr->m_Graph->SetScissor(ClippedBarRects[j].X+1, ClippedBarRects[j].Y, ClippedBarRects[j].W, ClippedBarRects[j].H-1); + //g_TwMgr->m_Graph->DrawRect(0, 0, 1000, 1000, 0x70ffffff); // Clipping test + Bar->Draw(CTwBar::DRAW_CONTENT); + } + g_TwMgr->m_Graph->SetScissor(0, 0, 0, 0); + } + } + } + } + PERF( DT = Timer.GetTime(); printf("Draw=%.4fms ", 1000.0*DT); ) + + PERF( Timer.Reset(); ) + g_TwMgr->m_Graph->EndDraw(); + PERF( DT = Timer.GetTime(); printf("End=%.4fms\n", 1000.0*DT); ) + } + + return 1; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwWindowSize(int _Width, int _Height) +{ + g_InitWndWidth = _Width; + g_InitWndHeight = _Height; + + if( g_TwMgr==NULL || g_TwMgr->m_Graph==NULL ) + { + //TwGlobalError(g_ErrNotInit); -> not an error here + return 0; // not initialized + } + + if( _Width<0 || _Height<0 ) + { + g_TwMgr->SetLastError(g_ErrBadSize); + return 0; + } + + // For multi-thread savety + if( !TwFreeAsyncDrawing() ) + return 0; + + // Delete the extra text objects + if( g_TwMgr->m_KeyPressedTextObj ) + { + g_TwMgr->m_Graph->DeleteTextObj(g_TwMgr->m_KeyPressedTextObj); + g_TwMgr->m_KeyPressedTextObj = NULL; + } + if( g_TwMgr->m_InfoTextObj ) + { + g_TwMgr->m_Graph->DeleteTextObj(g_TwMgr->m_InfoTextObj); + g_TwMgr->m_InfoTextObj = NULL; + } + + g_TwMgr->m_WndWidth = _Width; + g_TwMgr->m_WndHeight = _Height; + g_TwMgr->m_Graph->Restore(); + + // Recreate extra text objects + if( g_TwMgr->m_WndWidth!=0 && g_TwMgr->m_WndHeight!=0 ) + { + if( g_TwMgr->m_KeyPressedTextObj==NULL ) + { + g_TwMgr->m_KeyPressedTextObj = g_TwMgr->m_Graph->NewTextObj(); + g_TwMgr->m_KeyPressedBuildText = true; + } + if( g_TwMgr->m_InfoTextObj==NULL ) + { + g_TwMgr->m_InfoTextObj = g_TwMgr->m_Graph->NewTextObj(); + g_TwMgr->m_InfoBuildText = true; + } + } + + for( std::vector::iterator it=g_TwMgr->m_Bars.begin(); it!=g_TwMgr->m_Bars.end(); ++it ) + (*it)->NotUpToDate(); + + return 1; +} + +// --------------------------------------------------------------------------- + +CTwMgr::CTwMgr(ETwGraphAPI _GraphAPI, void *_Device, int _WndID) +{ + m_GraphAPI = _GraphAPI; + m_Device = _Device; + m_WndID = _WndID; + m_LastError = NULL; + m_CurrentDbgFile = ""; + m_CurrentDbgLine = 0; + //m_Processing = false; + m_Graph = NULL; + m_WndWidth = g_InitWndWidth; + m_WndHeight = g_InitWndHeight; + m_CurrentFont = NULL; // set after by TwIntialize + m_NbMinimizedBars = 0; + m_HelpBar = NULL; + m_HelpBarNotUpToDate = true; + m_HelpBarUpdateNow = false; + m_LastHelpUpdateTime = 0; + m_LastMouseX = -1; + m_LastMouseY = -1; + m_LastMouseWheelPos = 0; + m_IconPos = 0; + m_IconAlign = 0; + m_IconMarginX = m_IconMarginY = 8; + m_FontResizable = true; + m_KeyPressedTextObj = NULL; + m_KeyPressedBuildText = false; + m_KeyPressedTime = 0; + m_InfoTextObj = NULL; + m_InfoBuildText = true; + m_BarInitColorHue = 155; + m_PopupBar = NULL; + m_TypeColor32 = TW_TYPE_UNDEF; + m_TypeColor3F = TW_TYPE_UNDEF; + m_TypeColor4F = TW_TYPE_UNDEF; + m_LastMousePressedTime = 0; + m_LastMousePressedButtonID = TW_MOUSE_MIDDLE; + m_LastMousePressedPosition[0] = -1000; + m_LastMousePressedPosition[1] = -1000; + m_RepeatMousePressedDelay = 0.5; + m_RepeatMousePressedPeriod = 0.1; + m_CanRepeatMousePressed = false; + m_IsRepeatingMousePressed = false; + m_LastDrawTime = 0; + m_UseOldColorScheme = false; + m_Contained = false; + m_ButtonAlign = BUTTON_ALIGN_RIGHT; + m_OverlapContent = false; + m_Terminating = false; + + m_CursorsCreated = false; + #if defined(ANT_UNIX) + m_CurrentXDisplay = NULL; + m_CurrentXWindow = 0; + #endif // defined(ANT_UNIX) + + m_CopyCDStringToClient = g_InitCopyCDStringToClient; + m_CopyStdStringToClient = g_InitCopyStdStringToClient; + m_ClientStdStringStructSize = 0; +} + +// --------------------------------------------------------------------------- + +CTwMgr::~CTwMgr() +{ +} + +// --------------------------------------------------------------------------- + +int CTwMgr::FindBar(const char *_Name) const +{ + if( _Name==NULL || strlen(_Name)<=0 ) + return -1; + int i; + for( i=0; i<(int)m_Bars.size(); ++i ) + if( m_Bars[i]!=NULL && strcmp(_Name, m_Bars[i]->m_Name.c_str())==0 ) + return i; + return -1; +} + + +// --------------------------------------------------------------------------- + +int CTwMgr::HasAttrib(const char *_Attrib, bool *_HasValue) const +{ + *_HasValue = true; + if( _stricmp(_Attrib, "help")==0 ) + return MGR_HELP; + else if( _stricmp(_Attrib, "fontsize")==0 ) + return MGR_FONT_SIZE; + else if( _stricmp(_Attrib, "iconpos")==0 ) + return MGR_ICON_POS; + else if( _stricmp(_Attrib, "iconalign")==0 ) + return MGR_ICON_ALIGN; + else if( _stricmp(_Attrib, "iconmargin")==0 ) + return MGR_ICON_MARGIN; + else if( _stricmp(_Attrib, "fontresizable")==0 ) + return MGR_FONT_RESIZABLE; + else if( _stricmp(_Attrib, "colorscheme")==0 ) + return MGR_COLOR_SCHEME; + else if( _stricmp(_Attrib, "contained")==0 ) + return MGR_CONTAINED; + else if( _stricmp(_Attrib, "buttonalign")==0 ) + return MGR_BUTTON_ALIGN; + else if( _stricmp(_Attrib, "overlap")==0 ) + return MGR_OVERLAP; + + *_HasValue = false; + return 0; // not found +} + +int CTwMgr::SetAttrib(int _AttribID, const char *_Value) +{ + switch( _AttribID ) + { + case MGR_HELP: + if( _Value && strlen(_Value)>0 ) + { + m_Help = _Value; + m_HelpBarNotUpToDate = true; + return 1; + } + else + { + SetLastError(g_ErrNoValue); + return 0; + } + case MGR_FONT_SIZE: + if( _Value && strlen(_Value)>0 ) + { + int s; + int n = sscanf(_Value, "%d", &s); + if( n==1 && s>=1 && s<=3 ) + { + if( s==1 ) + SetFont(g_DefaultSmallFont, true); + else if( s==2 ) + SetFont(g_DefaultNormalFont, true); + else if( s==3 ) + SetFont(g_DefaultLargeFont, true); + return 1; + } + else + { + SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + SetLastError(g_ErrNoValue); + return 0; + } + case MGR_ICON_POS: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "bl")==0 || _stricmp(_Value, "lb")==0 || _stricmp(_Value, "bottomleft")==0 || _stricmp(_Value, "leftbottom")==0 ) + { + m_IconPos = 0; + return 1; + } + else if( _stricmp(_Value, "br")==0 || _stricmp(_Value, "rb")==0 || _stricmp(_Value, "bottomright")==0 || _stricmp(_Value, "rightbottom")==0 ) + { + m_IconPos = 1; + return 1; + } + else if( _stricmp(_Value, "tl")==0 || _stricmp(_Value, "lt")==0 || _stricmp(_Value, "topleft")==0 || _stricmp(_Value, "lefttop")==0 ) + { + m_IconPos = 2; + return 1; + } + else if( _stricmp(_Value, "tr")==0 || _stricmp(_Value, "rt")==0 || _stricmp(_Value, "topright")==0 || _stricmp(_Value, "righttop")==0 ) + { + m_IconPos = 3; + return 1; + } + else + { + SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + SetLastError(g_ErrNoValue); + return 0; + } + case MGR_ICON_ALIGN: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "vert")==0 || _stricmp(_Value, "vertical")==0 ) + { + m_IconAlign = 0; + return 1; + } + else if( _stricmp(_Value, "horiz")==0 || _stricmp(_Value, "horizontal")==0 ) + { + m_IconAlign = 1; + return 1; + } + else + { + SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + SetLastError(g_ErrNoValue); + return 0; + } + case MGR_ICON_MARGIN: + if( _Value && strlen(_Value)>0 ) + { + int x, y; + int n = sscanf(_Value, "%d%d", &x, &y); + if( n==2 && x>=0 && y>=0 ) + { + m_IconMarginX = x; + m_IconMarginY = y; + return 1; + } + else + { + SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + SetLastError(g_ErrNoValue); + return 0; + } + case MGR_FONT_RESIZABLE: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + m_FontResizable = true; + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + m_FontResizable = false; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case MGR_COLOR_SCHEME: + if( _Value && strlen(_Value)>0 ) + { + int s; + int n = sscanf(_Value, "%d", &s); + if( n==1 && s>=0 && s<=1 ) + { + if( s==0 ) + m_UseOldColorScheme = true; + else + m_UseOldColorScheme = false; + return 1; + } + else + { + SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case MGR_CONTAINED: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + m_Contained = true; + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + m_Contained = false; + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + vector::iterator barIt; + for( barIt=g_TwMgr->m_Bars.begin(); barIt!=g_TwMgr->m_Bars.end(); ++barIt ) + if( (*barIt)!=NULL ) + (*barIt)->m_Contained = m_Contained; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case MGR_BUTTON_ALIGN: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "left")==0 ) + m_ButtonAlign = BUTTON_ALIGN_LEFT; + else if( _stricmp(_Value, "center")==0 ) + m_ButtonAlign = BUTTON_ALIGN_CENTER; + else if( _stricmp(_Value, "right")==0 ) + m_ButtonAlign = BUTTON_ALIGN_RIGHT; + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + vector::iterator barIt; + for( barIt=g_TwMgr->m_Bars.begin(); barIt!=g_TwMgr->m_Bars.end(); ++barIt ) + if( (*barIt)!=NULL ) + (*barIt)->m_ButtonAlign = m_ButtonAlign; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + case MGR_OVERLAP: + if( _Value && strlen(_Value)>0 ) + { + if( _stricmp(_Value, "1")==0 || _stricmp(_Value, "true")==0 ) + { + m_OverlapContent = true; + return 1; + } + else if( _stricmp(_Value, "0")==0 || _stricmp(_Value, "false")==0 ) + { + m_OverlapContent = false; + return 1; + } + else + { + g_TwMgr->SetLastError(g_ErrBadValue); + return 0; + } + } + else + { + g_TwMgr->SetLastError(g_ErrNoValue); + return 0; + } + default: + g_TwMgr->SetLastError(g_ErrUnknownAttrib); + return 0; + } +} + +ERetType CTwMgr::GetAttrib(int _AttribID, std::vector& outDoubles, std::ostringstream& outString) const +{ + outDoubles.clear(); + outString.clear(); + + switch( _AttribID ) + { + case MGR_HELP: + outString << m_Help; + return RET_STRING; + case MGR_FONT_SIZE: + if( m_CurrentFont==g_DefaultSmallFont ) + outDoubles.push_back(1); + else if( m_CurrentFont==g_DefaultNormalFont ) + outDoubles.push_back(2); + else if( m_CurrentFont==g_DefaultLargeFont ) + outDoubles.push_back(3); + else + outDoubles.push_back(0); // should not happened + return RET_DOUBLE; + case MGR_ICON_POS: + if( m_IconPos==0 ) + outString << "bottomleft"; + else if( m_IconPos==1 ) + outString << "bottomright"; + else if( m_IconPos==2 ) + outString << "topleft"; + else if( m_IconPos==3 ) + outString << "topright"; + else + outString << "undefined"; // should not happened + return RET_STRING; + case MGR_ICON_ALIGN: + if( m_IconAlign==0 ) + outString << "vertical"; + else if( m_IconAlign==1 ) + outString << "horizontal"; + else + outString << "undefined"; // should not happened + return RET_STRING; + case MGR_ICON_MARGIN: + outDoubles.push_back(m_IconMarginX); + outDoubles.push_back(m_IconMarginY); + return RET_DOUBLE; + case MGR_FONT_RESIZABLE: + outDoubles.push_back(m_FontResizable); + return RET_DOUBLE; + case MGR_COLOR_SCHEME: + outDoubles.push_back(m_UseOldColorScheme ? 0 : 1); + return RET_DOUBLE; + case MGR_CONTAINED: + { + bool contained = m_Contained; + /* + if( contained ) + { + vector::iterator barIt; + for( barIt=g_TwMgr->m_Bars.begin(); barIt!=g_TwMgr->m_Bars.end(); ++barIt ) + if( (*barIt)!=NULL && !(*barIt)->m_Contained ) + { + contained = false; + break; + } + } + */ + outDoubles.push_back(contained); + return RET_DOUBLE; + } + case MGR_BUTTON_ALIGN: + if( m_ButtonAlign==BUTTON_ALIGN_LEFT ) + outString << "left"; + else if( m_ButtonAlign==BUTTON_ALIGN_CENTER ) + outString << "center"; + else + outString << "right"; + return RET_STRING; + case MGR_OVERLAP: + outDoubles.push_back(m_OverlapContent); + return RET_DOUBLE; + default: + g_TwMgr->SetLastError(g_ErrUnknownAttrib); + return RET_ERROR; + } +} + +// --------------------------------------------------------------------------- + +void CTwMgr::Minimize(TwBar *_Bar) +{ + assert(m_Graph!=NULL && _Bar!=NULL); + assert(m_Bars.size()==m_MinOccupied.size()); + if( _Bar->m_IsMinimized ) + return; + if( _Bar->m_Visible ) + { + size_t i = m_NbMinimizedBars; + m_NbMinimizedBars++; + for( i=0; im_MinNumber = (int)i; + } + else + _Bar->m_MinNumber = -1; + _Bar->m_IsMinimized = true; + _Bar->NotUpToDate(); +} + +// --------------------------------------------------------------------------- + +void CTwMgr::Maximize(TwBar *_Bar) +{ + assert(m_Graph!=NULL && _Bar!=NULL); + assert(m_Bars.size()==m_MinOccupied.size()); + if( !_Bar->m_IsMinimized ) + return; + if( _Bar->m_Visible ) + { + --m_NbMinimizedBars; + if( m_NbMinimizedBars<0 ) + m_NbMinimizedBars = 0; + if( _Bar->m_MinNumber>=0 && _Bar->m_MinNumber<(int)m_MinOccupied.size() ) + m_MinOccupied[_Bar->m_MinNumber] = false; + } + _Bar->m_IsMinimized = false; + _Bar->NotUpToDate(); + if( _Bar->m_IsHelpBar ) + m_HelpBarNotUpToDate = true; +} + +// --------------------------------------------------------------------------- + +void CTwMgr::Hide(TwBar *_Bar) +{ + assert(m_Graph!=NULL && _Bar!=NULL); + if( !_Bar->m_Visible ) + return; + if( _Bar->IsMinimized() ) + { + Maximize(_Bar); + _Bar->m_Visible = false; + Minimize(_Bar); + } + else + _Bar->m_Visible = false; + if( !_Bar->m_IsHelpBar ) + m_HelpBarNotUpToDate = true; +} + +// --------------------------------------------------------------------------- + +void CTwMgr::Unhide(TwBar *_Bar) +{ + assert(m_Graph!=NULL && _Bar!=NULL); + if( _Bar->m_Visible ) + return; + if( _Bar->IsMinimized() ) + { + Maximize(_Bar); + _Bar->m_Visible = true; + Minimize(_Bar); + } + else + _Bar->m_Visible = true; + _Bar->NotUpToDate(); + if( !_Bar->m_IsHelpBar ) + m_HelpBarNotUpToDate = true; +} + +// --------------------------------------------------------------------------- + +void CTwMgr::SetFont(const CTexFont *_Font, bool _ResizeBars) +{ + assert(m_Graph!=NULL); + assert(_Font!=NULL); + + m_CurrentFont = _Font; + + for( int i=0; i<(int)m_Bars.size(); ++i ) + if( m_Bars[i]!=NULL ) + { + int fh = m_Bars[i]->m_Font->m_CharHeight; + m_Bars[i]->m_Font = _Font; + if( _ResizeBars ) + { + if( m_Bars[i]->m_Movable ) + { + m_Bars[i]->m_PosX += (3*(fh-_Font->m_CharHeight))/2; + m_Bars[i]->m_PosY += (fh-_Font->m_CharHeight)/2; + } + if( m_Bars[i]->m_Resizable ) + { + m_Bars[i]->m_Width = (m_Bars[i]->m_Width*_Font->m_CharHeight)/fh; + m_Bars[i]->m_Height = (m_Bars[i]->m_Height*_Font->m_CharHeight)/fh; + m_Bars[i]->m_ValuesWidth = (m_Bars[i]->m_ValuesWidth*_Font->m_CharHeight)/fh; + } + } + m_Bars[i]->NotUpToDate(); + } + + if( g_TwMgr->m_HelpBar!=NULL ) + g_TwMgr->m_HelpBar->Update(); + g_TwMgr->m_InfoBuildText = true; + g_TwMgr->m_KeyPressedBuildText = true; + m_HelpBarNotUpToDate = true; +} + +// --------------------------------------------------------------------------- + +void ANT_CALL TwGlobalError(const char *_ErrorMessage) // to be called when g_TwMasterMgr is not created +{ + if( g_ErrorHandler==NULL ) + { + fprintf(stderr, "ERROR(AntTweakBar) >> %s\n", _ErrorMessage); + #ifdef ANT_WINDOWS + OutputDebugString("ERROR(AntTweakBar) >> "); + OutputDebugString(_ErrorMessage); + OutputDebugString("\n"); + #endif // ANT_WINDOWS + } + else + g_ErrorHandler(_ErrorMessage); + + if( g_BreakOnError ) + abort(); +} + +// --------------------------------------------------------------------------- + +void CTwMgr::SetLastError(const char *_ErrorMessage) // _ErrorMessage must be a static string +{ + if (this != g_TwMasterMgr) + { + // route to master + g_TwMasterMgr->SetLastError(_ErrorMessage); + return; + } + + m_LastError = _ErrorMessage; + + if( g_ErrorHandler==NULL ) + { + if( m_CurrentDbgFile!=NULL && strlen(m_CurrentDbgFile)>0 && m_CurrentDbgLine>0 ) + fprintf(stderr, "%s(%d): ", m_CurrentDbgFile, m_CurrentDbgLine); + fprintf(stderr, "ERROR(AntTweakBar) >> %s\n", m_LastError); + #ifdef ANT_WINDOWS + if( m_CurrentDbgFile!=NULL && strlen(m_CurrentDbgFile)>0 && m_CurrentDbgLine>0 ) + { + OutputDebugString(m_CurrentDbgFile); + char sl[32]; + sprintf(sl, "(%d): ", m_CurrentDbgLine); + OutputDebugString(sl); + } + OutputDebugString("ERROR(AntTweakBar) >> "); + OutputDebugString(m_LastError); + OutputDebugString("\n"); + #endif // ANT_WINDOWS + } + else + g_ErrorHandler(_ErrorMessage); + + if( g_BreakOnError ) + abort(); +} + +// --------------------------------------------------------------------------- + +const char *CTwMgr::GetLastError() +{ + if (this != g_TwMasterMgr) + { + // route to master + return g_TwMasterMgr->GetLastError(); + } + + const char *Err = m_LastError; + m_LastError = NULL; + return Err; +} + +// --------------------------------------------------------------------------- + +const char *CTwMgr::CheckLastError() const +{ + return m_LastError; +} + +// --------------------------------------------------------------------------- + +void CTwMgr::SetCurrentDbgParams(const char *dbgFile, int dbgLine) +{ + m_CurrentDbgFile = dbgFile; + m_CurrentDbgLine = dbgLine; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL __TwDbg(const char *dbgFile, int dbgLine) +{ + if( g_TwMgr!=NULL ) + g_TwMgr->SetCurrentDbgParams(dbgFile, dbgLine); + return 0; // always returns zero +} + +// --------------------------------------------------------------------------- + +void ANT_CALL TwHandleErrors(TwErrorHandler _ErrorHandler, int _BreakOnError) +{ + g_ErrorHandler = _ErrorHandler; + g_BreakOnError = (_BreakOnError) ? true : false; +} + +void ANT_CALL TwHandleErrors(TwErrorHandler _ErrorHandler) +{ + TwHandleErrors(_ErrorHandler, false); +} + +// --------------------------------------------------------------------------- + +const char *ANT_CALL TwGetLastError() +{ + if( g_TwMasterMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return g_ErrNotInit; + } + else + return g_TwMasterMgr->GetLastError(); +} + +// --------------------------------------------------------------------------- + +TwBar *ANT_CALL TwNewBar(const char *_Name) +{ + if( g_TwMgr==NULL || g_TwMgr->m_Graph==NULL ) + { + TwGlobalError(g_ErrNotInit); + return NULL; // not initialized + } + + TwFreeAsyncDrawing(); // For multi-thread savety + + if( _Name==NULL || strlen(_Name)<=0 ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return NULL; + } + if( g_TwMgr->FindBar(_Name)>=0 ) + { + g_TwMgr->SetLastError(g_ErrExist); + return NULL; + } + + if( strstr(_Name, "`")!=NULL ) + { + g_TwMgr->SetLastError(g_ErrNoBackQuote); + return NULL; + } + + if( g_TwMgr->m_PopupBar!=NULL ) // delete popup bar if it exists + { + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } + + TwBar *Bar = new CTwBar(_Name); + g_TwMgr->m_Bars.push_back(Bar); + g_TwMgr->m_Order.push_back((int)g_TwMgr->m_Bars.size()-1); + g_TwMgr->m_MinOccupied.push_back(false); + g_TwMgr->m_HelpBarNotUpToDate = true; + + return Bar; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwDeleteBar(TwBar *_Bar) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( _Bar==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + if( _Bar==g_TwMgr->m_HelpBar ) + { + g_TwMgr->SetLastError(g_ErrDelHelp); + return 0; + } + + TwFreeAsyncDrawing(); // For multi-thread savety + + vector::iterator BarIt; + int i = 0; + for( BarIt=g_TwMgr->m_Bars.begin(); BarIt!=g_TwMgr->m_Bars.end(); ++BarIt, ++i ) + if( (*BarIt)==_Bar ) + break; + if( BarIt==g_TwMgr->m_Bars.end() ) + { + g_TwMgr->SetLastError(g_ErrNotFound); + return 0; + } + + if( g_TwMgr->m_PopupBar!=NULL && _Bar!=g_TwMgr->m_PopupBar ) // delete popup bar first if it exists + { + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } + + // force bar to un-minimize + g_TwMgr->Maximize(_Bar); + // find an empty MinOccupied + vector::iterator itm; + int j = 0; + for( itm=g_TwMgr->m_MinOccupied.begin(); itm!=g_TwMgr->m_MinOccupied.end(); ++itm, ++j) + if( (*itm)==false ) + break; + assert( itm!=g_TwMgr->m_MinOccupied.end() ); + // shift MinNumbers and erase the empty MinOccupied + for( size_t k=0; km_Bars.size(); ++k ) + if( g_TwMgr->m_Bars[k]!=NULL && g_TwMgr->m_Bars[k]->m_MinNumber>j ) + g_TwMgr->m_Bars[k]->m_MinNumber -= 1; + g_TwMgr->m_MinOccupied.erase(itm); + // erase _Bar order + vector::iterator BarOrderIt = g_TwMgr->m_Order.end(); + for(vector::iterator it=g_TwMgr->m_Order.begin(); it!=g_TwMgr->m_Order.end(); ++it ) + if( (*it)==i ) + BarOrderIt = it; + else if( (*it)>i ) + (*it) -= 1; + assert( BarOrderIt!=g_TwMgr->m_Order.end() ); + g_TwMgr->m_Order.erase(BarOrderIt); + + // erase & delete _Bar + g_TwMgr->m_Bars.erase(BarIt); + delete _Bar; + + g_TwMgr->m_HelpBarNotUpToDate = true; + return 1; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwDeleteAllBars() +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + + TwFreeAsyncDrawing(); // For multi-thread savety + + int n = 0; + if( g_TwMgr->m_Terminating || g_TwMgr->m_HelpBar==NULL ) + { + for( size_t i=0; im_Bars.size(); ++i ) + if( g_TwMgr->m_Bars[i]!=NULL ) + { + ++n; + delete g_TwMgr->m_Bars[i]; + g_TwMgr->m_Bars[i] = NULL; + } + g_TwMgr->m_Bars.clear(); + g_TwMgr->m_Order.clear(); + g_TwMgr->m_MinOccupied.clear(); + g_TwMgr->m_HelpBarNotUpToDate = true; + } + else + { + vector bars = g_TwMgr->m_Bars; + for( size_t i = 0; i < bars.size(); ++i ) + if( bars[i]!=0 && bars[i]!=g_TwMgr->m_HelpBar) + { + ++n; + TwDeleteBar(bars[i]); + } + g_TwMgr->m_HelpBarNotUpToDate = true; + } + + if( n==0 ) + { + g_TwMgr->SetLastError(g_ErrNthToDo); + return 0; + } + else + return 1; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwSetTopBar(const TwBar *_Bar) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( _Bar==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + + TwFreeAsyncDrawing(); // For multi-thread savety + + if( _Bar!=g_TwMgr->m_PopupBar && g_TwMgr->m_BarAlwaysOnBottom.length()>0 ) + { + if( strcmp(_Bar->m_Name.c_str(), g_TwMgr->m_BarAlwaysOnBottom.c_str())==0 ) + return TwSetBottomBar(_Bar); + } + + int i = -1, iOrder; + for( iOrder=0; iOrder<(int)g_TwMgr->m_Bars.size(); ++iOrder ) + { + i = g_TwMgr->m_Order[iOrder]; + assert( i>=0 && i<(int)g_TwMgr->m_Bars.size() ); + if( g_TwMgr->m_Bars[i]==_Bar ) + break; + } + if( i<0 || iOrder>=(int)g_TwMgr->m_Bars.size() ) // bar not found + { + g_TwMgr->SetLastError(g_ErrNotFound); + return 0; + } + + for( int j=iOrder; j<(int)g_TwMgr->m_Bars.size()-1; ++j ) + g_TwMgr->m_Order[j] = g_TwMgr->m_Order[j+1]; + g_TwMgr->m_Order[(int)g_TwMgr->m_Bars.size()-1] = i; + + if( _Bar!=g_TwMgr->m_PopupBar && g_TwMgr->m_BarAlwaysOnTop.length()>0 ) + { + int topIdx = g_TwMgr->FindBar(g_TwMgr->m_BarAlwaysOnTop.c_str()); + TwBar *top = (topIdx>=0 && topIdx<(int)g_TwMgr->m_Bars.size()) ? g_TwMgr->m_Bars[topIdx] : NULL; + if( top!=NULL && top!=_Bar ) + TwSetTopBar(top); + } + + if( g_TwMgr->m_PopupBar!=NULL && _Bar!=g_TwMgr->m_PopupBar ) + TwSetTopBar(g_TwMgr->m_PopupBar); + + return 1; +} + +// --------------------------------------------------------------------------- + +TwBar * ANT_CALL TwGetTopBar() +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return NULL; // not initialized + } + + if( g_TwMgr->m_Bars.size()>0 && g_TwMgr->m_PopupBar==NULL ) + return g_TwMgr->m_Bars[g_TwMgr->m_Order[ g_TwMgr->m_Bars.size()-1 ]]; + else if( g_TwMgr->m_Bars.size()>1 && g_TwMgr->m_PopupBar!=NULL ) + return g_TwMgr->m_Bars[g_TwMgr->m_Order[ g_TwMgr->m_Bars.size()-2 ]]; + else + return NULL; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwSetBottomBar(const TwBar *_Bar) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( _Bar==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + + TwFreeAsyncDrawing(); // For multi-thread savety + + if( _Bar!=g_TwMgr->m_PopupBar && g_TwMgr->m_BarAlwaysOnTop.length()>0 ) + { + if( strcmp(_Bar->m_Name.c_str(), g_TwMgr->m_BarAlwaysOnTop.c_str())==0 ) + return TwSetTopBar(_Bar); + } + + int i = -1, iOrder; + for( iOrder=0; iOrder<(int)g_TwMgr->m_Bars.size(); ++iOrder ) + { + i = g_TwMgr->m_Order[iOrder]; + assert( i>=0 && i<(int)g_TwMgr->m_Bars.size() ); + if( g_TwMgr->m_Bars[i]==_Bar ) + break; + } + if( i<0 || iOrder>=(int)g_TwMgr->m_Bars.size() ) // bar not found + { + g_TwMgr->SetLastError(g_ErrNotFound); + return 0; + } + + if( iOrder>0 ) + for( int j=iOrder-1; j>=0; --j ) + g_TwMgr->m_Order[j+1] = g_TwMgr->m_Order[j]; + g_TwMgr->m_Order[0] = i; + + if( _Bar!=g_TwMgr->m_PopupBar && g_TwMgr->m_BarAlwaysOnBottom.length()>0 ) + { + int btmIdx = g_TwMgr->FindBar(g_TwMgr->m_BarAlwaysOnBottom.c_str()); + TwBar *btm = (btmIdx>=0 && btmIdx<(int)g_TwMgr->m_Bars.size()) ? g_TwMgr->m_Bars[btmIdx] : NULL; + if( btm!=NULL && btm!=_Bar ) + TwSetBottomBar(btm); + } + + return 1; +} + +// --------------------------------------------------------------------------- + +TwBar* ANT_CALL TwGetBottomBar() +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return NULL; // not initialized + } + + if( g_TwMgr->m_Bars.size()>0 ) + return g_TwMgr->m_Bars[g_TwMgr->m_Order[0]]; + else + return NULL; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwSetBarState(TwBar *_Bar, TwState _State) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( _Bar==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + + TwFreeAsyncDrawing(); // For multi-thread savety + + switch( _State ) + { + case TW_STATE_SHOWN: + g_TwMgr->Unhide(_Bar); + return 1; + case TW_STATE_ICONIFIED: + //g_TwMgr->Unhide(_Bar); + g_TwMgr->Minimize(_Bar); + return 1; + case TW_STATE_HIDDEN: + //g_TwMgr->Maximize(_Bar); + g_TwMgr->Hide(_Bar); + return 1; + case TW_STATE_UNICONIFIED: + //g_TwMgr->Unhide(_Bar); + g_TwMgr->Maximize(_Bar); + return 1; + default: + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } +} + +// --------------------------------------------------------------------------- + +/* +TwState ANT_CALL TwGetBarState(const TwBar *_Bar) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return TW_STATE_ERROR; // not initialized + } + if( _Bar==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return TW_STATE_ERROR; + } + + if( !_Bar->m_Visible ) + return TW_STATE_HIDDEN; + else if( _Bar->IsMinimized() ) + return TW_STATE_ICONIFIED; + else + return TW_STATE_SHOWN; +} +*/ + +// --------------------------------------------------------------------------- + +const char * ANT_CALL TwGetBarName(TwBar *_Bar) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return NULL; // not initialized + } + if( _Bar==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return NULL; + } + vector::iterator BarIt; + int i = 0; + for( BarIt=g_TwMgr->m_Bars.begin(); BarIt!=g_TwMgr->m_Bars.end(); ++BarIt, ++i ) + if( (*BarIt)==_Bar ) + break; + if( BarIt==g_TwMgr->m_Bars.end() ) + { + g_TwMgr->SetLastError(g_ErrNotFound); + return NULL; + } + + return _Bar->m_Name.c_str(); +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwGetBarCount() +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + + return (int)g_TwMgr->m_Bars.size(); +} + + +// --------------------------------------------------------------------------- + +TwBar * ANT_CALL TwGetBarByIndex(int index) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return NULL; // not initialized + } + + if( index>=0 && index<(int)g_TwMgr->m_Bars.size() ) + return g_TwMgr->m_Bars[index]; + else + { + g_TwMgr->SetLastError(g_ErrOutOfRange); + return NULL; + } +} + +// --------------------------------------------------------------------------- + +TwBar * ANT_CALL TwGetBarByName(const char *name) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return NULL; // not initialized + } + + int idx = g_TwMgr->FindBar(name); + if ( idx>=0 && idx<(int)g_TwMgr->m_Bars.size() ) + return g_TwMgr->m_Bars[idx]; + else + return NULL; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwRefreshBar(TwBar *bar) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( bar==NULL ) + { + vector::iterator BarIt; + for( BarIt=g_TwMgr->m_Bars.begin(); BarIt!=g_TwMgr->m_Bars.end(); ++BarIt ) + if( *BarIt!=NULL ) + (*BarIt)->NotUpToDate(); + } + else + { + vector::iterator BarIt; + int i = 0; + for( BarIt=g_TwMgr->m_Bars.begin(); BarIt!=g_TwMgr->m_Bars.end(); ++BarIt, ++i ) + if( (*BarIt)==bar ) + break; + if( BarIt==g_TwMgr->m_Bars.end() ) + { + g_TwMgr->SetLastError(g_ErrNotFound); + return 0; + } + + bar->NotUpToDate(); + } + return 1; +} + +// --------------------------------------------------------------------------- + +int BarVarHasAttrib(CTwBar *_Bar, CTwVar *_Var, const char *_Attrib, bool *_HasValue); +int BarVarSetAttrib(CTwBar *_Bar, CTwVar *_Var, CTwVarGroup *_VarParent, int _VarIndex, int _AttribID, const char *_Value); +ERetType BarVarGetAttrib(CTwBar *_Bar, CTwVar *_Var, CTwVarGroup *_VarParent, int _VarIndex, int _AttribID, std::vector& outDouble, std::ostringstream& outString); + + +int ANT_CALL TwGetParam(TwBar *bar, const char *varName, const char *paramName, TwParamValueType paramValueType, unsigned int outValueMaxCount, void *outValues) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( paramName==NULL || strlen(paramName)<=0 ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + if( outValueMaxCount<=0 || outValues==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + + if( bar==NULL ) + bar = TW_GLOBAL_BAR; + else + { + vector::iterator barIt; + int i = 0; + for( barIt=g_TwMgr->m_Bars.begin(); barIt!=g_TwMgr->m_Bars.end(); ++barIt, ++i ) + if( (*barIt)==bar ) + break; + if( barIt==g_TwMgr->m_Bars.end() ) + { + g_TwMgr->SetLastError(g_ErrNotFound); + return 0; + } + } + CTwVarGroup *varParent = NULL; + int varIndex = -1; + CTwVar *var = NULL; + if( varName!=NULL && strlen(varName)>0 ) + { + var = bar->Find(varName, &varParent, &varIndex); + if( var==NULL ) + { + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Unknown var '%s/%s'", + (bar==TW_GLOBAL_BAR) ? "GLOBAL" : bar->m_Name.c_str(), varName); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } + } + + bool hasValue = false; + int paramID = BarVarHasAttrib(bar, var, paramName, &hasValue); + if( paramID>0 ) + { + std::ostringstream valStr; + std::vector valDbl; + const char *PrevLastErrorPtr = g_TwMgr->CheckLastError(); + + ERetType retType = BarVarGetAttrib(bar, var, varParent, varIndex, paramID, valDbl, valStr); + unsigned int i, valDblCount = (unsigned int)valDbl.size(); + if( valDblCount > outValueMaxCount ) + valDblCount = outValueMaxCount; + if( retType==RET_DOUBLE && valDblCount==0 ) + { + g_TwMgr->SetLastError(g_ErrHasNoValue); + retType = RET_ERROR; + } + + if( retType==RET_DOUBLE ) + { + switch( paramValueType ) + { + case TW_PARAM_INT32: + for( i=0; i(outValues))[i] = (int)valDbl[i]; + return valDblCount; + case TW_PARAM_FLOAT: + for( i=0; i(outValues))[i] = (float)valDbl[i]; + return valDblCount; + case TW_PARAM_DOUBLE: + for( i=0; i(outValues))[i] = valDbl[i]; + return valDblCount; + case TW_PARAM_CSTRING: + valStr.clear(); + for( i=0; i<(unsigned int)valDbl.size(); i++ ) // not valDblCount here + valStr << ((i>0) ? " " : "") << valDbl[i]; + strncpy(static_cast(outValues), valStr.str().c_str(), outValueMaxCount); + i = (unsigned int)valStr.str().size(); + if( i>outValueMaxCount-1 ) + i = outValueMaxCount-1; + (static_cast(outValues))[i] = '\0'; + return 1; // always returns 1 for CSTRING + default: + g_TwMgr->SetLastError(g_ErrBadParam); // Unknown param value type + retType = RET_ERROR; + } + } + else if( retType==RET_STRING ) + { + if( paramValueType == TW_PARAM_CSTRING ) + { + strncpy(static_cast(outValues), valStr.str().c_str(), outValueMaxCount); + i = (unsigned int)valStr.str().size(); + if( i>outValueMaxCount-1 ) + i = outValueMaxCount-1; + (static_cast(outValues))[i] = '\0'; + return 1; // always returns 1 for CSTRING + } + else + { + g_TwMgr->SetLastError(g_ErrBadType); // string cannot be converted to int or double + retType = RET_ERROR; + } + } + + if( retType==RET_ERROR ) + { + bool errMsg = (g_TwMgr->CheckLastError()!=NULL && strlen(g_TwMgr->CheckLastError())>0 && PrevLastErrorPtr!=g_TwMgr->CheckLastError()); + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Unable to get param '%s%s%s %s' %s%s", + (bar==TW_GLOBAL_BAR) ? "GLOBAL" : bar->m_Name.c_str(), (var!=NULL) ? "/" : "", + (var!=NULL) ? varName : "", paramName, errMsg ? " : " : "", + errMsg ? g_TwMgr->CheckLastError() : ""); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + } + return retType; + } + else + { + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Unknown param '%s%s%s %s'", + (bar==TW_GLOBAL_BAR) ? "GLOBAL" : bar->m_Name.c_str(), + (var!=NULL) ? "/" : "", (var!=NULL) ? varName : "", paramName); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } +} + + +int ANT_CALL TwSetParam(TwBar *bar, const char *varName, const char *paramName, TwParamValueType paramValueType, unsigned int inValueCount, const void *inValues) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( paramName==NULL || strlen(paramName)<=0 ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + if( inValueCount>0 && inValues==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + + TwFreeAsyncDrawing(); // For multi-thread savety + + if( bar==NULL ) + bar = TW_GLOBAL_BAR; + else + { + vector::iterator barIt; + int i = 0; + for( barIt=g_TwMgr->m_Bars.begin(); barIt!=g_TwMgr->m_Bars.end(); ++barIt, ++i ) + if( (*barIt)==bar ) + break; + if( barIt==g_TwMgr->m_Bars.end() ) + { + g_TwMgr->SetLastError(g_ErrNotFound); + return 0; + } + } + CTwVarGroup *varParent = NULL; + int varIndex = -1; + CTwVar *var = NULL; + if( varName!=NULL && strlen(varName)>0 ) + { + var = bar->Find(varName, &varParent, &varIndex); + if( var==NULL ) + { + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Unknown var '%s/%s'", + (bar==TW_GLOBAL_BAR) ? "GLOBAL" : bar->m_Name.c_str(), varName); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } + } + + bool hasValue = false; + int paramID = BarVarHasAttrib(bar, var, paramName, &hasValue); + if( paramID>0 ) + { + int ret = 0; + const char *PrevLastErrorPtr = g_TwMgr->CheckLastError(); + if( hasValue ) + { + std::ostringstream valuesStr; + unsigned int i; + switch( paramValueType ) + { + case TW_PARAM_INT32: + for( i=0; i(inValues))[i] << ((i(inValues))[i] << ((i(inValues))[i] << ((i(inValues))[i]; + for( const char *ch = str; *ch!=0; ch++ ) + if( *ch=='`' ) + valuesStr << "`'`'`"; + else + valuesStr << *ch; + valuesStr << "` "; + } + */ + if( inValueCount!=1 ) + { + g_TwMgr->SetLastError(g_ErrCStrParam); // count for CString param must be 1 + return 0; + } + else + valuesStr << static_cast(inValues); + break; + default: + g_TwMgr->SetLastError(g_ErrBadParam); // Unknown param value type + return 0; + } + ret = BarVarSetAttrib(bar, var, varParent, varIndex, paramID, valuesStr.str().c_str()); + } + else + ret = BarVarSetAttrib(bar, var, varParent, varIndex, paramID, NULL); + if( ret==0 ) + { + bool errMsg = (g_TwMgr->CheckLastError()!=NULL && strlen(g_TwMgr->CheckLastError())>0 && PrevLastErrorPtr!=g_TwMgr->CheckLastError()); + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Unable to set param '%s%s%s %s' %s%s", + (bar==TW_GLOBAL_BAR) ? "GLOBAL" : bar->m_Name.c_str(), (var!=NULL) ? "/" : "", + (var!=NULL) ? varName : "", paramName, errMsg ? " : " : "", + errMsg ? g_TwMgr->CheckLastError() : ""); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + } + return ret; + } + else + { + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Unknown param '%s%s%s %s'", + (bar==TW_GLOBAL_BAR) ? "GLOBAL" : bar->m_Name.c_str(), + (var!=NULL) ? "/" : "", (var!=NULL) ? varName : "", paramName); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } +} + +// --------------------------------------------------------------------------- + +static int s_PassProxy = 0; +void *CTwMgr::CStruct::s_PassProxyAsClientData = &s_PassProxy; // special tag + +CTwMgr::CStructProxy::CStructProxy() +{ + memset(this, 0, sizeof(*this)); +} + +CTwMgr::CStructProxy::~CStructProxy() +{ + if( m_StructData!=NULL && m_DeleteStructData ) + { + //if( m_StructExtData==NULL && g_TwMgr!=NULL && m_Type>=TW_TYPE_STRUCT_BASE && m_Typem_Structs.size() ) + // g_TwMgr->UninitVarData(m_Type, m_StructData, g_TwMgr->m_Structs[m_Type-TW_TYPE_STRUCT_BASE].m_Size); + delete[] (char*)m_StructData; + } + if( m_StructExtData!=NULL ) + { + //if( g_TwMgr!=NULL && m_Type>=TW_TYPE_STRUCT_BASE && m_Typem_Structs.size() ) + // g_TwMgr->UninitVarData(m_Type, m_StructExtData, g_TwMgr->m_Structs[m_Type-TW_TYPE_STRUCT_BASE].m_Size); + delete[] (char*)m_StructExtData; + } + memset(this, 0, sizeof(*this)); +} + +/* +void CTwMgr::InitVarData(TwType _Type, void *_Data, size_t _Size) +{ + if( _Data!=NULL ) + { + if( _Type>=TW_TYPE_STRUCT_BASE && _Type=TW_TYPE_STRUCT_BASE && _Type~string(); + memset(_Data, 0, _Size); + } + else + memset(_Data, 0, _Size); + } +} +*/ + +void CTwMgr::UnrollCDStdString(std::vector& _Records, TwType _Type, void *_Data) +{ + if( _Data!=NULL ) + { + if( _Type>=TW_TYPE_STRUCT_BASE && _Type& _Records) +{ + for( size_t i=0; i<_Records.size(); ++i ) + memcpy(_Records[i].m_DataPtr, _Records[i].m_PrevValue, m_ClientStdStringStructSize); +} + +CTwMgr::CMemberProxy::CMemberProxy() +{ + memset(this, 0, sizeof(*this)); +} + +CTwMgr::CMemberProxy::~CMemberProxy() +{ + memset(this, 0, sizeof(*this)); +} + +void ANT_CALL CTwMgr::CMemberProxy::SetCB(const void *_Value, void *_ClientData) +{ + if( _ClientData && _Value ) + { + const CMemberProxy *mProxy = static_cast(_ClientData); + if( g_TwMgr && mProxy ) + { + const CStructProxy *sProxy = mProxy->m_StructProxy; + if( sProxy && sProxy->m_StructData && sProxy->m_Type>=TW_TYPE_STRUCT_BASE && sProxy->m_Typem_Structs.size() ) + { + CTwMgr::CStruct& s = g_TwMgr->m_Structs[sProxy->m_Type-TW_TYPE_STRUCT_BASE]; + if( mProxy->m_MemberIndex>=0 && mProxy->m_MemberIndex<(int)s.m_Members.size() ) + { + CTwMgr::CStructMember& m = s.m_Members[mProxy->m_MemberIndex]; + if( m.m_Size>0 && m.m_Type!=TW_TYPE_BUTTON ) + { + if( s.m_IsExt ) + { + memcpy((char *)sProxy->m_StructExtData + m.m_Offset, _Value, m.m_Size); + if( s.m_CopyVarFromExtCallback && sProxy->m_StructExtData ) + s.m_CopyVarFromExtCallback(sProxy->m_StructData, sProxy->m_StructExtData, mProxy->m_MemberIndex, (s.m_ExtClientData==s.s_PassProxyAsClientData) ? _ClientData : s.m_ExtClientData); + } + else + memcpy((char *)sProxy->m_StructData + m.m_Offset, _Value, m.m_Size); + if( sProxy->m_StructSetCallback ) + { + g_TwMgr->m_CDStdStringRecords.resize(0); + g_TwMgr->UnrollCDStdString(g_TwMgr->m_CDStdStringRecords, sProxy->m_Type, sProxy->m_StructData); + sProxy->m_StructSetCallback(sProxy->m_StructData, sProxy->m_StructClientData); + g_TwMgr->RestoreCDStdString(g_TwMgr->m_CDStdStringRecords); + } + } + } + } + } + } +} + +void ANT_CALL CTwMgr::CMemberProxy::GetCB(void *_Value, void *_ClientData) +{ + if( _ClientData && _Value ) + { + const CMemberProxy *mProxy = static_cast(_ClientData); + if( g_TwMgr && mProxy ) + { + const CStructProxy *sProxy = mProxy->m_StructProxy; + if( sProxy && sProxy->m_StructData && sProxy->m_Type>=TW_TYPE_STRUCT_BASE && sProxy->m_Typem_Structs.size() ) + { + CTwMgr::CStruct& s = g_TwMgr->m_Structs[sProxy->m_Type-TW_TYPE_STRUCT_BASE]; + if( mProxy->m_MemberIndex>=0 && mProxy->m_MemberIndex<(int)s.m_Members.size() ) + { + CTwMgr::CStructMember& m = s.m_Members[mProxy->m_MemberIndex]; + if( m.m_Size>0 && m.m_Type!=TW_TYPE_BUTTON ) + { + if( sProxy->m_StructGetCallback ) + sProxy->m_StructGetCallback(sProxy->m_StructData, sProxy->m_StructClientData); + if( s.m_IsExt ) + { + if( s.m_CopyVarToExtCallback && sProxy->m_StructExtData ) + s.m_CopyVarToExtCallback(sProxy->m_StructData, sProxy->m_StructExtData, mProxy->m_MemberIndex, (s.m_ExtClientData==s.s_PassProxyAsClientData) ? _ClientData : s.m_ExtClientData); + memcpy(_Value, (char *)sProxy->m_StructExtData + m.m_Offset, m.m_Size); + } + else + memcpy(_Value, (char *)sProxy->m_StructData + m.m_Offset, m.m_Size); + } + } + } + } + } +} + +// --------------------------------------------------------------------------- + +void ANT_CALL CTwMgr::CCDStdString::SetCB(const void *_Value, void *_ClientData) +{ + if( _Value==NULL || _ClientData==NULL || g_TwMgr==NULL ) + return; + CTwMgr::CCDStdString *CDStdString = (CTwMgr::CCDStdString *)_ClientData; + const char *SrcStr = *(const char **)_Value; + if( SrcStr==NULL ) + { + static char s_EmptyString[] = ""; + SrcStr = s_EmptyString; + } + if( CDStdString->m_ClientSetCallback==NULL ) + { + if( g_TwMgr->m_CopyStdStringToClient && CDStdString->m_ClientStdStringPtr!=NULL ) + { + CTwMgr::CClientStdString clientSrcStr; // convert VC++ Release/Debug std::string + clientSrcStr.FromLib(SrcStr); + g_TwMgr->m_CopyStdStringToClient(*(CDStdString->m_ClientStdStringPtr), clientSrcStr.ToClient()); + } + } + else + { + if( CDStdString->m_ClientSetCallback==CMemberProxy::SetCB ) + CDStdString->m_ClientSetCallback(&SrcStr, CDStdString->m_ClientData); + else + { + CTwMgr::CClientStdString clientSrcStr; // convert VC++ Release/Debug std::string + clientSrcStr.FromLib(SrcStr); + std::string& ValStr = clientSrcStr.ToClient(); + CDStdString->m_ClientSetCallback(&ValStr, CDStdString->m_ClientData); + } + } +} + +void ANT_CALL CTwMgr::CCDStdString::GetCB(void *_Value, void *_ClientData) +{ + if( _Value==NULL || _ClientData==NULL || g_TwMgr==NULL ) + return; + CTwMgr::CCDStdString *CDStdString = (CTwMgr::CCDStdString *)_ClientData; + char **DstStrPtr = (char **)_Value; + if( CDStdString->m_ClientGetCallback==NULL ) + { + if( CDStdString->m_ClientStdStringPtr!=NULL ) + { + //*DstStrPtr = const_cast(CDStdString->m_ClientStdStringPtr->c_str()); + static CTwMgr::CLibStdString s_LibStr; // static because it will be used as a returned value + s_LibStr.FromClient(*CDStdString->m_ClientStdStringPtr); + *DstStrPtr = const_cast(s_LibStr.ToLib().c_str()); + } + else + { + static char s_EmptyString[] = ""; + *DstStrPtr = s_EmptyString; + } + } + else + { + // m_ClientGetCallback uses TwCopyStdStringToLibrary to copy string + // and TwCopyStdStringToLibrary does the VC++ Debug/Release std::string conversion. + CDStdString->m_ClientGetCallback(&(CDStdString->m_LocalString[0]), CDStdString->m_ClientData); + //*DstStrPtr = const_cast(CDStdString->m_LocalString.c_str()); + char **StrPtr = (char **)&(CDStdString->m_LocalString[0]); + *DstStrPtr = *StrPtr; + } +} + +// --------------------------------------------------------------------------- + +static int s_SeparatorTag = 0; + +// --------------------------------------------------------------------------- + +static int AddVar(TwBar *_Bar, const char *_Name, ETwType _Type, void *_VarPtr, bool _ReadOnly, TwSetVarCallback _SetCallback, TwGetVarCallback _GetCallback, TwButtonCallback _ButtonCallback, void *_ClientData, const char *_Def) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + + char unnamedVarName[64]; + if( _Name==NULL || strlen(_Name)==0 ) // create a name automatically + { + static unsigned int s_UnnamedVarCount = 0; + _snprintf(unnamedVarName, sizeof(unnamedVarName), "TW_UNNAMED_%04X", s_UnnamedVarCount); + _Name = unnamedVarName; + ++s_UnnamedVarCount; + } + + if( _Bar==NULL || _Name==NULL || strlen(_Name)==0 || (_VarPtr==NULL && _GetCallback==NULL && _Type!=TW_TYPE_BUTTON) ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + if( _Bar->Find(_Name)!=NULL ) + { + g_TwMgr->SetLastError(g_ErrExist); + return 0; + } + + if( strstr(_Name, "`")!=NULL ) + { + g_TwMgr->SetLastError(g_ErrNoBackQuote); + return 0; + } + + if( _VarPtr==NULL && _Type!=TW_TYPE_BUTTON && _GetCallback!=NULL && _SetCallback==NULL ) + _ReadOnly = true; // force readonly in this case + + // Convert color types + if( _Type==TW_TYPE_COLOR32 ) + _Type = g_TwMgr->m_TypeColor32; + else if( _Type==TW_TYPE_COLOR3F ) + _Type = g_TwMgr->m_TypeColor3F; + else if( _Type==TW_TYPE_COLOR4F ) + _Type = g_TwMgr->m_TypeColor4F; + + // Convert rotation types + if( _Type==TW_TYPE_QUAT4F ) + _Type = g_TwMgr->m_TypeQuat4F; + else if( _Type==TW_TYPE_QUAT4D ) + _Type = g_TwMgr->m_TypeQuat4D; + else if( _Type==TW_TYPE_DIR3F ) + _Type = g_TwMgr->m_TypeDir3F; + else if( _Type==TW_TYPE_DIR3D ) + _Type = g_TwMgr->m_TypeDir3D; + + // VC++ uses a different definition of std::string in Debug and Release modes. + // sizeof(std::string) is encoded in TW_TYPE_STDSTRING to overcome this issue. + if( (_Type&0xffff0000)==(TW_TYPE_STDSTRING&0xffff0000) ) + { + size_t clientStdStringStructSize = (_Type&0xffff); + if( g_TwMgr->m_ClientStdStringStructSize==0 ) + g_TwMgr->m_ClientStdStringStructSize = clientStdStringStructSize; + int diff = abs((int)g_TwMgr->m_ClientStdStringStructSize - (int)sizeof(std::string)); + if( g_TwMgr->m_ClientStdStringStructSize!=clientStdStringStructSize || g_TwMgr->m_ClientStdStringStructSize==0 + || (diff!=0 && diff!=sizeof(void*))) + { + g_TwMgr->SetLastError(g_ErrStdString); + return 0; + } + _Type = TW_TYPE_STDSTRING; // force type to be our TW_TYPE_STDSTRING + } + + if( _Type==TW_TYPE_STDSTRING ) + { + g_TwMgr->m_CDStdStrings.push_back(CTwMgr::CCDStdString()); + CTwMgr::CCDStdString& CDStdString = g_TwMgr->m_CDStdStrings.back(); + CDStdString.m_ClientStdStringPtr = (std::string *)_VarPtr; + CDStdString.m_ClientSetCallback = _SetCallback; + CDStdString.m_ClientGetCallback = _GetCallback; + CDStdString.m_ClientData = _ClientData; + //CDStdString.m_This = g_TwMgr->m_CDStdStrings.end(); + //--CDStdString.m_This; + TwGetVarCallback GetCB = CTwMgr::CCDStdString::GetCB; + TwSetVarCallback SetCB = CTwMgr::CCDStdString::SetCB; + if( _VarPtr==NULL && _SetCallback==NULL ) + SetCB = NULL; + if( _VarPtr==NULL && _GetCallback==NULL ) + GetCB = NULL; + return AddVar(_Bar, _Name, TW_TYPE_CDSTDSTRING, NULL, _ReadOnly, SetCB, GetCB, NULL, &CDStdString, _Def); + } + else if( (_Type>TW_TYPE_UNDEF && _Type=TW_TYPE_ENUM_BASE && _Typem_Enums.size()) + || (_Type>TW_TYPE_CSSTRING_BASE && _Type<=TW_TYPE_CSSTRING_MAX) + || _Type==TW_TYPE_CDSTDSTRING + || IsCustomType(_Type) ) // (_Type>=TW_TYPE_CUSTOM_BASE && _Typem_Customs.size()) ) + { + CTwVarAtom *Var = new CTwVarAtom; + Var->m_Name = _Name; + Var->m_Ptr = _VarPtr; + Var->m_Type = _Type; + Var->m_ColorPtr = &(_Bar->m_ColLabelText); + if( _VarPtr!=NULL ) + { + assert( _GetCallback==NULL && _SetCallback==NULL && _ButtonCallback==NULL ); + + Var->m_ReadOnly = _ReadOnly; + Var->m_GetCallback = NULL; + Var->m_SetCallback = NULL; + Var->m_ClientData = NULL; + } + else + { + assert( _GetCallback!=NULL || _Type==TW_TYPE_BUTTON ); + + Var->m_GetCallback = _GetCallback; + Var->m_SetCallback = _SetCallback; + Var->m_ClientData = _ClientData; + if( _Type==TW_TYPE_BUTTON ) + { + Var->m_Val.m_Button.m_Callback = _ButtonCallback; + if( _ButtonCallback==NULL && _ClientData==&s_SeparatorTag ) + { + Var->m_Val.m_Button.m_Separator = 1; + Var->m_Label = " "; + } + else if( _ButtonCallback==NULL ) + Var->m_ColorPtr = &(_Bar->m_ColStaticText); + } + if( _Type!=TW_TYPE_BUTTON ) + Var->m_ReadOnly = (_SetCallback==NULL || _ReadOnly); + else + Var->m_ReadOnly = (_ButtonCallback==NULL); + } + Var->SetDefaults(); + + if( IsCustomType(_Type) ) // _Type>=TW_TYPE_CUSTOM_BASE && _Typem_Customs.size() ) + { + if( Var->m_GetCallback==CTwMgr::CMemberProxy::GetCB && Var->m_SetCallback==CTwMgr::CMemberProxy::SetCB ) + Var->m_Val.m_Custom.m_MemberProxy = static_cast(Var->m_ClientData); + else + Var->m_Val.m_Custom.m_MemberProxy = NULL; + } + + _Bar->m_VarRoot.m_Vars.push_back(Var); + _Bar->NotUpToDate(); + g_TwMgr->m_HelpBarNotUpToDate = true; + + if( _Def!=NULL && strlen(_Def)>0 ) + { + string d = '`' + _Bar->m_Name + "`/`" + _Name + "` " + _Def; + return TwDefine(d.c_str()); + } + else + return 1; + } + else if(_Type>=TW_TYPE_STRUCT_BASE && _Typem_Structs.size()) + { + CTwMgr::CStruct& s = g_TwMgr->m_Structs[_Type-TW_TYPE_STRUCT_BASE]; + CTwMgr::CStructProxy *sProxy = NULL; + void *vPtr; + if( !s.m_IsExt ) + { + if( _VarPtr!=NULL ) + vPtr = _VarPtr; + else + { + assert( _GetCallback!=NULL || _SetCallback!=NULL ); + assert( s.m_Size>0 ); + vPtr = new char[s.m_Size]; + memset(vPtr, 0, s.m_Size); + // create a new StructProxy + g_TwMgr->m_StructProxies.push_back(CTwMgr::CStructProxy()); + sProxy = &(g_TwMgr->m_StructProxies.back()); + sProxy->m_Type = _Type; + sProxy->m_StructData = vPtr; + sProxy->m_DeleteStructData = true; + sProxy->m_StructSetCallback = _SetCallback; + sProxy->m_StructGetCallback = _GetCallback; + sProxy->m_StructClientData = _ClientData; + sProxy->m_CustomDrawCallback = NULL; + sProxy->m_CustomMouseButtonCallback = NULL; + sProxy->m_CustomMouseMotionCallback = NULL; + sProxy->m_CustomMouseLeaveCallback = NULL; + sProxy->m_CustomCaptureFocus = false; + sProxy->m_CustomIndexFirst = -1; + sProxy->m_CustomIndexLast = -1; + //g_TwMgr->InitVarData(sProxy->m_Type, sProxy->m_StructData, s.m_Size); + } + } + else // s.m_IsExt + { + assert( s.m_Size>0 && s.m_ClientStructSize>0 ); + vPtr = new char[s.m_Size]; // will be m_StructExtData + memset(vPtr, 0, s.m_Size); + // create a new StructProxy + g_TwMgr->m_StructProxies.push_back(CTwMgr::CStructProxy()); + sProxy = &(g_TwMgr->m_StructProxies.back()); + sProxy->m_Type = _Type; + sProxy->m_StructExtData = vPtr; + sProxy->m_StructSetCallback = _SetCallback; + sProxy->m_StructGetCallback = _GetCallback; + sProxy->m_StructClientData = _ClientData; + sProxy->m_CustomDrawCallback = NULL; + sProxy->m_CustomMouseButtonCallback = NULL; + sProxy->m_CustomMouseMotionCallback = NULL; + sProxy->m_CustomMouseLeaveCallback = NULL; + sProxy->m_CustomCaptureFocus = false; + sProxy->m_CustomIndexFirst = -1; + sProxy->m_CustomIndexLast = -1; + //g_TwMgr->InitVarData(sProxy->m_Type, sProxy->m_StructExtData, s.m_Size); + if( _VarPtr!=NULL ) + { + sProxy->m_StructData = _VarPtr; + sProxy->m_DeleteStructData = false; + } + else + { + sProxy->m_StructData = new char[s.m_ClientStructSize]; + memset(sProxy->m_StructData, 0, s.m_ClientStructSize); + sProxy->m_DeleteStructData = true; + //g_TwMgr->InitVarData(ClientStructType, sProxy->m_StructData, s.m_ClientStructSize); //ClientStructType is unknown + } + _VarPtr = NULL; // force use of TwAddVarCB for members + + // init m_StructExtdata + if( s.m_ExtClientData==CTwMgr::CStruct::s_PassProxyAsClientData ) + s.m_StructExtInitCallback(sProxy->m_StructExtData, sProxy); + else + s.m_StructExtInitCallback(sProxy->m_StructExtData, s.m_ExtClientData); + } + + for( int i=0; i<(int)s.m_Members.size(); ++i ) + { + CTwMgr::CStructMember& m = s.m_Members[i]; + string name = string(_Name) + '.' + m.m_Name; + const char *access = ""; + if( _ReadOnly ) + access = "readonly "; + string def = "label=`" + m.m_Name + "` group=`" + _Name + "` " + access; // + m.m_DefString; // member def must be done after group def + if( _VarPtr!=NULL ) + { + if( TwAddVarRW(_Bar, name.c_str(), m.m_Type, (char*)vPtr+m.m_Offset, def.c_str())==0 ) + return 0; + } + else + { + assert( sProxy!=NULL ); + // create a new MemberProxy + g_TwMgr->m_MemberProxies.push_back(CTwMgr::CMemberProxy()); + CTwMgr::CMemberProxy& mProxy = g_TwMgr->m_MemberProxies.back(); + mProxy.m_StructProxy = sProxy; + mProxy.m_MemberIndex = i; + assert( !(s.m_IsExt && (m.m_Type==TW_TYPE_STDSTRING || m.m_Type==TW_TYPE_CDSTDSTRING)) ); // forbidden because this case is not handled by UnrollCDStdString + if( TwAddVarCB(_Bar, name.c_str(), m.m_Type, CTwMgr::CMemberProxy::SetCB, CTwMgr::CMemberProxy::GetCB, &mProxy, def.c_str())==0 ) + return 0; + mProxy.m_Var = _Bar->Find(name.c_str(), &mProxy.m_VarParent, NULL); + mProxy.m_Bar = _Bar; + } + + if( sProxy!=NULL && IsCustomType(m.m_Type) ) // m.m_Type>=TW_TYPE_CUSTOM_BASE && m.m_Typem_Customs.size() ) + { + if( sProxy->m_CustomIndexFirst<0 ) + sProxy->m_CustomIndexFirst = sProxy->m_CustomIndexLast = i; + else + sProxy->m_CustomIndexLast = i; + } + } + char structInfo[64]; + sprintf(structInfo, "typeid=%d valptr=%p close ", _Type, vPtr); + string grpDef = '`' + _Bar->m_Name + "`/`" + _Name + "` " + structInfo; + if( _Def!=NULL && strlen(_Def)>0 ) + grpDef += _Def; + int ret = TwDefine(grpDef.c_str()); + for( int i=0; i<(int)s.m_Members.size(); ++i ) // members must be defined even if grpDef has error + { + CTwMgr::CStructMember& m = s.m_Members[i]; + if( m.m_DefString.length()>0 ) + { + string memberDef = '`' + _Bar->m_Name + "`/`" + _Name + '.' + m.m_Name + "` " + m.m_DefString; + if( !TwDefine(memberDef.c_str()) ) // all members must be defined even if memberDef has error + ret = 0; + } + } + return ret; + } + else + { + if( _Type==TW_TYPE_CSSTRING_BASE ) + g_TwMgr->SetLastError(g_ErrBadSize); // static string of size null + else + g_TwMgr->SetLastError(g_ErrNotFound); + return 0; + } +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwAddVarRW(TwBar *_Bar, const char *_Name, ETwType _Type, void *_Var, const char *_Def) +{ + return AddVar(_Bar, _Name, _Type, _Var, false, NULL, NULL, NULL, NULL, _Def); +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwAddVarRO(TwBar *_Bar, const char *_Name, ETwType _Type, const void *_Var, const char *_Def) +{ + return AddVar(_Bar, _Name, _Type, const_cast(_Var), true, NULL, NULL, NULL, NULL, _Def); +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwAddVarCB(TwBar *_Bar, const char *_Name, ETwType _Type, TwSetVarCallback _SetCallback, TwGetVarCallback _GetCallback, void *_ClientData, const char *_Def) +{ + return AddVar(_Bar, _Name, _Type, NULL, false, _SetCallback, _GetCallback, NULL, _ClientData, _Def); +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwAddButton(TwBar *_Bar, const char *_Name, TwButtonCallback _Callback, void *_ClientData, const char *_Def) +{ + return AddVar(_Bar, _Name, TW_TYPE_BUTTON, NULL, false, NULL, NULL, _Callback, _ClientData, _Def); +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwAddSeparator(TwBar *_Bar, const char *_Name, const char *_Def) +{ + return AddVar(_Bar, _Name, TW_TYPE_BUTTON, NULL, true, NULL, NULL, NULL, &s_SeparatorTag, _Def); +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwRemoveVar(TwBar *_Bar, const char *_Name) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( _Bar==NULL || _Name==NULL || strlen(_Name)==0 ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + + if( g_TwMgr->m_PopupBar!=NULL && _Bar!=g_TwMgr->m_PopupBar ) // delete popup bar first if it exists + { + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } + + _Bar->StopEditInPlace(); // desactivate EditInPlace + + CTwVarGroup *Parent = NULL; + int Index = -1; + CTwVar *Var = _Bar->Find(_Name, &Parent, &Index); + if( Var!=NULL && Parent!=NULL && Index>=0 ) + { + if( Parent->m_StructValuePtr!=NULL ) + { + g_TwMgr->SetLastError(g_ErrDelStruct); + return 0; + } + + delete Var; + Parent->m_Vars.erase(Parent->m_Vars.begin()+Index); + if( Parent!=&(_Bar->m_VarRoot) && Parent->m_Vars.size()<=0 ) + TwRemoveVar(_Bar, Parent->m_Name.c_str()); + _Bar->NotUpToDate(); + if( _Bar!=g_TwMgr->m_HelpBar ) + g_TwMgr->m_HelpBarNotUpToDate = true; + return 1; + } + + g_TwMgr->SetLastError(g_ErrNotFound); + return 0; +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwRemoveAllVars(TwBar *_Bar) +{ + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( _Bar==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + + if( g_TwMgr->m_PopupBar!=NULL && _Bar!=g_TwMgr->m_PopupBar && _Bar!=g_TwMgr->m_HelpBar ) // delete popup bar first if it exists + { + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } + + _Bar->StopEditInPlace(); // desactivate EditInPlace + + for( vector::iterator it=_Bar->m_VarRoot.m_Vars.begin(); it!=_Bar->m_VarRoot.m_Vars.end(); ++it ) + if( *it != NULL ) + { + delete *it; + *it = NULL; + } + _Bar->m_VarRoot.m_Vars.resize(0); + _Bar->NotUpToDate(); + g_TwMgr->m_HelpBarNotUpToDate = true; + return 1; +} + +// --------------------------------------------------------------------------- + +int ParseToken(string& _Token, const char *_Def, int& Line, int& Column, bool _KeepQuotes, bool _EndCR, char _Sep1='\0', char _Sep2='\0') +{ + const char *Cur = _Def; + _Token = ""; + // skip spaces + while( *Cur==' ' || *Cur=='\t' || *Cur=='\r' || *Cur=='\n' ) + { + if( *Cur=='\n' && _EndCR ) + return (int)(Cur-_Def); // a CR has been found + ++Cur; + if( *Cur=='\n' ) + { + ++Line; + Column = 1; + } + else if( *Cur=='\t' ) + Column += g_TabLength; + else if( *Cur!='\r' ) + ++Column; + } + // read token + int QuoteLine=0, QuoteColumn=0; + const char *QuoteCur; + char Quote = 0; + bool AddChar; + bool LineJustIncremented = false; + while( (Quote==0 && (*Cur!='\0' && *Cur!=' ' && *Cur!='\t' && *Cur!='\r' && *Cur!='\n' && *Cur!=_Sep1 && *Cur!=_Sep2)) + || (Quote!=0 && (*Cur!='\0' /* && *Cur!='\r' && *Cur!='\n' */)) ) // allow multi-line strings + { + LineJustIncremented = false; + AddChar = true; + if( Quote==0 && (*Cur=='\'' || *Cur=='\"' || *Cur=='`') ) + { + Quote = *Cur; + QuoteLine = Line; + QuoteColumn = Column; + QuoteCur = Cur; + AddChar = _KeepQuotes; + } + else if ( Quote!=0 && *Cur==Quote ) + { + Quote = 0; + AddChar = _KeepQuotes; + } + + if( AddChar ) + _Token += *Cur; + ++Cur; + if( *Cur=='\t' ) + Column += g_TabLength; + else if( *Cur=='\n' ) + { + ++Line; + LineJustIncremented = true; + Column = 1; + } + else + ++Column; + } + + if( Quote!=0 ) + { + Line = QuoteLine; + Column = QuoteColumn; + return -(int)(Cur-_Def); // unclosed quote + } + else + { + if( *Cur=='\n' ) + { + if( !LineJustIncremented ) + ++Line; + Column = 1; + } + else if( *Cur=='\t' ) + Column += g_TabLength; + else if( *Cur!='\r' && *Cur!='\0' ) + ++Column; + return (int)(Cur-_Def); + } +} + +// --------------------------------------------------------------------------- + +int GetBarVarFromString(CTwBar **_Bar, CTwVar **_Var, CTwVarGroup **_VarParent, int *_VarIndex, const char *_Str) +{ + *_Bar = NULL; + *_Var = NULL; + *_VarParent = NULL; + *_VarIndex = -1; + vector Names; + string Token; + const char *Cur =_Str; + int l=1, c=1, p=1; + while( *Cur!='\0' && p>0 && Names.size()<=3 ) + { + p = ParseToken(Token, Cur, l, c, false, true, '/', '\\'); + if( p>0 && Token.size()>0 ) + { + Names.push_back(Token); + Cur += p + ((Cur[p]!='\0')?1:0); + } + } + if( p<=0 || (Names.size()!=1 && Names.size()!=2) ) + return 0; // parse error + int BarIdx = g_TwMgr->FindBar(Names[0].c_str()); + if( BarIdx<0 ) + { + if( Names.size()==1 && strcmp(Names[0].c_str(), "GLOBAL")==0 ) + { + *_Bar = TW_GLOBAL_BAR; + return +3; // 'GLOBAL' found + } + else + return -1; // bar not found + } + *_Bar = g_TwMgr->m_Bars[BarIdx]; + if( Names.size()==1 ) + return 1; // bar found, no var name parsed + *_Var = (*_Bar)->Find(Names[1].c_str(), _VarParent, _VarIndex); + if( *_Var==NULL ) + return -2; // var not found + return 2; // bar and var found +} + + +int BarVarHasAttrib(CTwBar *_Bar, CTwVar *_Var, const char *_Attrib, bool *_HasValue) +{ + assert(_Bar!=NULL && _HasValue!=NULL && _Attrib!=NULL && strlen(_Attrib)>0); + *_HasValue = false; + if( _Bar==TW_GLOBAL_BAR ) + { + assert( _Var==NULL ); + return g_TwMgr->HasAttrib(_Attrib, _HasValue); + } + else if( _Var==NULL ) + return _Bar->HasAttrib(_Attrib, _HasValue); + else + return _Var->HasAttrib(_Attrib, _HasValue); +} + + +int BarVarSetAttrib(CTwBar *_Bar, CTwVar *_Var, CTwVarGroup *_VarParent, int _VarIndex, int _AttribID, const char *_Value) +{ + assert(_Bar!=NULL && _AttribID>0); + + /* don't delete popupbar here: if any attrib is changed every frame by the app, popup will not work anymore. + if( g_TwMgr->m_PopupBar!=NULL && _Bar!=g_TwMgr->m_PopupBar && g_TwMgr->m_PopupBar->m_BarLinkedToPopupList==_Bar ) // delete popup bar first if it exists + { + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } + */ + + if( _Bar==TW_GLOBAL_BAR ) + { + assert( _Var==NULL ); + return g_TwMgr->SetAttrib(_AttribID, _Value); + } + else if( _Var==NULL ) + return _Bar->SetAttrib(_AttribID, _Value); + else + return _Var->SetAttrib(_AttribID, _Value, _Bar, _VarParent, _VarIndex); + // don't make _Bar not-up-to-date here, should be done in SetAttrib if needed to avoid too frequent refreshs +} + + +ERetType BarVarGetAttrib(CTwBar *_Bar, CTwVar *_Var, CTwVarGroup *_VarParent, int _VarIndex, int _AttribID, std::vector& outDoubles, std::ostringstream& outString) +{ + assert(_Bar!=NULL && _AttribID>0); + + if( _Bar==TW_GLOBAL_BAR ) + { + assert( _Var==NULL ); + return g_TwMgr->GetAttrib(_AttribID, outDoubles, outString); + } + else if( _Var==NULL ) + return _Bar->GetAttrib(_AttribID, outDoubles, outString); + else + return _Var->GetAttrib(_AttribID, _Bar, _VarParent, _VarIndex, outDoubles, outString); +} + +// --------------------------------------------------------------------------- + +static inline std::string ErrorPosition(bool _MultiLine, int _Line, int _Column) +{ + if( !_MultiLine ) + return ""; + else + { + char pos[32]; + //_snprintf(pos, sizeof(pos)-1, " line %d column %d", _Line, _Column); + _snprintf(pos, sizeof(pos)-1, " line %d", _Line); (void)_Column; + pos[sizeof(pos)-1] = '\0'; + return pos; + } +} + +// --------------------------------------------------------------------------- + +int ANT_CALL TwDefine(const char *_Def) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return 0; // not initialized + } + if( _Def==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return 0; + } + + bool MultiLine = false; + const char *Cur = _Def; + while( *Cur!='\0' ) + { + if( *Cur=='\n' ) + { + MultiLine = true; + break; + } + ++Cur; + } + + int Line = 1; + int Column = 1; + enum EState { PARSE_NAME, PARSE_ATTRIB }; + EState State = PARSE_NAME; + string Token; + string Value; + CTwBar *Bar = NULL; + CTwVar *Var = NULL; + CTwVarGroup *VarParent = NULL; + int VarIndex = -1; + int p; + + Cur = _Def; + while( *Cur!='\0' ) + { + const char *PrevCur = Cur; + p = ParseToken(Token, Cur, Line, Column, (State==PARSE_NAME), (State==PARSE_ATTRIB), (State==PARSE_ATTRIB)?'=':'\0'); + if( p<=0 || Token.size()<=0 ) + { + if( p>0 && Cur[p]=='\0' ) + { + Cur += p; + continue; + } + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Parsing error in def string%s [%-16s...]", ErrorPosition(MultiLine, Line, Column).c_str(), (p<0)?(Cur-p):PrevCur); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } + char CurSep = Cur[p]; + Cur += p + ((CurSep!='\0')?1:0); + + if( State==PARSE_NAME ) + { + int Err = GetBarVarFromString(&Bar, &Var, &VarParent, &VarIndex, Token.c_str()); + if( Err<=0 ) + { + if( Err==-1 ) + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Parsing error in def string: Bar not found%s [%-16s...]", ErrorPosition(MultiLine, Line, Column).c_str(), Token.c_str()); + else if( Err==-2 ) + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Parsing error in def string: Variable not found%s [%-16s...]", ErrorPosition(MultiLine, Line, Column).c_str(), Token.c_str()); + else + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Parsing error in def string%s [%-16s...]", ErrorPosition(MultiLine, Line, Column).c_str(), Token.c_str()); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } + State = PARSE_ATTRIB; + } + else // State==PARSE_ATTRIB + { + assert(State==PARSE_ATTRIB); + assert(Bar!=NULL); + + bool HasValue = false; + Value = ""; + int AttribID = BarVarHasAttrib(Bar, Var, Token.c_str(), &HasValue); + if( AttribID<=0 ) + { + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Parsing error in def string: Unknown attribute%s [%-16s...]", ErrorPosition(MultiLine, Line, Column).c_str(), Token.c_str()); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } + + // special case for backward compatibility + if( HasValue && ( _stricmp(Token.c_str(), "readonly")==0 || _stricmp(Token.c_str(), "hexa")==0 ) ) + { + if( CurSep==' ' || CurSep=='\t' ) + { + const char *ch = Cur; + while( *ch==' ' || *ch=='\t' ) // find next non-space character + ++ch; + if( *ch!='=' ) // if this is not '=' the param has no value + HasValue = false; + } + } + + if( HasValue ) + { + if( CurSep!='=' ) + { + string EqualStr; + p = ParseToken(EqualStr, Cur, Line, Column, true, true, '='); + CurSep = Cur[p]; + if( p<0 || EqualStr.size()>0 || CurSep!='=' ) + { + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Parsing error in def string: '=' not found while reading attribute value%s [%-16s...]", ErrorPosition(MultiLine, Line, Column).c_str(), Token.c_str()); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } + Cur += p + 1; + } + p = ParseToken(Value, Cur, Line, Column, false, true); + if( p<=0 ) + { + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Parsing error in def string: can't read attribute value%s [%-16s...]", ErrorPosition(MultiLine, Line, Column).c_str(), Token.c_str()); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } + CurSep = Cur[p]; + Cur += p + ((CurSep!='\0')?1:0); + } + const char *PrevLastErrorPtr = g_TwMgr->CheckLastError(); + if( BarVarSetAttrib(Bar, Var, VarParent, VarIndex, AttribID, HasValue?Value.c_str():NULL)==0 ) + { + if( g_TwMgr->CheckLastError()==NULL || strlen(g_TwMgr->CheckLastError())<=0 || g_TwMgr->CheckLastError()==PrevLastErrorPtr ) + _snprintf(g_ErrParse, sizeof(g_ErrParse), "Parsing error in def string: wrong attribute value%s [%-16s...]", ErrorPosition(MultiLine, Line, Column).c_str(), Token.c_str()); + else + _snprintf(g_ErrParse, sizeof(g_ErrParse), "%s%s [%-16s...]", g_TwMgr->CheckLastError(), ErrorPosition(MultiLine, Line, Column).c_str(), Token.c_str()); + g_ErrParse[sizeof(g_ErrParse)-1] = '\0'; + g_TwMgr->SetLastError(g_ErrParse); + return 0; + } + // sweep spaces to detect next attrib + while( *Cur==' ' || *Cur=='\t' || *Cur=='\r' ) + { + ++Cur; + if( *Cur=='\t' ) + Column += g_TabLength; + else if( *Cur!='\r' ) + ++Column; + } + if( *Cur=='\n' ) // new line detected + { + ++Line; + Column = 1; + State = PARSE_NAME; + } + } + } + + g_TwMgr->m_HelpBarNotUpToDate = true; + return 1; +} + +// --------------------------------------------------------------------------- + +TwType ANT_CALL TwDefineEnum(const char *_Name, const TwEnumVal *_EnumValues, unsigned int _NbValues) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return TW_TYPE_UNDEF; // not initialized + } + if( _EnumValues==NULL && _NbValues!=0 ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return TW_TYPE_UNDEF; + } + + if( g_TwMgr->m_PopupBar!=NULL ) // delete popup bar first if it exists + { + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } + + size_t enumIndex = g_TwMgr->m_Enums.size(); + if( _Name!=NULL && strlen(_Name)>0 ) + for( size_t j=0; jm_Enums.size(); ++j ) + if( strcmp(_Name, g_TwMgr->m_Enums[j].m_Name.c_str())==0 ) + { + enumIndex = j; + break; + } + if( enumIndex==g_TwMgr->m_Enums.size() ) + g_TwMgr->m_Enums.push_back(CTwMgr::CEnum()); + assert( enumIndex>=0 && enumIndexm_Enums.size() ); + CTwMgr::CEnum& e = g_TwMgr->m_Enums[enumIndex]; + if( _Name!=NULL && strlen(_Name)>0 ) + e.m_Name = _Name; + else + e.m_Name = ""; + e.m_Entries.clear(); + for(unsigned int i=0; i<_NbValues; ++i) + { + CTwMgr::CEnum::CEntries::value_type Entry(_EnumValues[i].Value, (_EnumValues[i].Label!=NULL)?_EnumValues[i].Label:""); + pair Result = e.m_Entries.insert(Entry); + if( !Result.second ) + (Result.first)->second = Entry.second; + } + + return TwType( TW_TYPE_ENUM_BASE + enumIndex ); +} + +// --------------------------------------------------------------------------- + +TwType TW_CALL TwDefineEnumFromString(const char *_Name, const char *_EnumString) +{ + if (_EnumString == NULL) + return TwDefineEnum(_Name, NULL, 0); + + // split enumString + stringstream EnumStream(_EnumString); + string Label; + vector Labels; + while( getline(EnumStream, Label, ',') ) { + // trim Label + size_t Start = Label.find_first_not_of(" \n\r\t"); + size_t End = Label.find_last_not_of(" \n\r\t"); + if( Start==string::npos || End==string::npos ) + Label = ""; + else + Label = Label.substr(Start, (End-Start)+1); + // store Label + Labels.push_back(Label); + } + // create TwEnumVal array + vector Vals(Labels.size()); + for( int i=0; i<(int)Labels.size(); i++ ) + { + Vals[i].Value = i; + Vals[i].Label = Labels[i].c_str(); + } + + return TwDefineEnum(_Name, Vals.empty() ? NULL : &(Vals[0]), (unsigned int)Vals.size()); +} + +// --------------------------------------------------------------------------- + +void ANT_CALL CTwMgr::CStruct::DefaultSummary(char *_SummaryString, size_t _SummaryMaxLength, const void *_Value, void *_ClientData) +{ + const CTwVarGroup *varGroup = static_cast(_Value); // special case + if( _SummaryString && _SummaryMaxLength>0 ) + _SummaryString[0] = '\0'; + size_t structIndex = (size_t)(_ClientData); + if( g_TwMgr && _SummaryString && _SummaryMaxLength>2 + && varGroup && static_cast(varGroup)->IsGroup() + && structIndex>=0 && structIndex<=g_TwMgr->m_Structs.size() ) + { + // return g_TwMgr->m_Structs[structIndex].m_Name.c_str(); + CTwMgr::CStruct& s = g_TwMgr->m_Structs[structIndex]; + _SummaryString[0] = '{'; + _SummaryString[1] = '\0'; + bool separator = false; + for( size_t i=0; im_Name + '.' + s.m_Members[i].m_Name; + const CTwVar *var = varGroup->Find(varName.c_str(), NULL, NULL); + if( var ) + { + if( var->IsGroup() ) + { + const CTwVarGroup *grp = static_cast(var); + if( grp->m_SummaryCallback!=NULL ) + { + size_t l = strlen(_SummaryString); + if( separator ) + { + _SummaryString[l++] = ','; + _SummaryString[l++] = '\0'; + } + if( grp->m_SummaryCallback==CTwMgr::CStruct::DefaultSummary ) + grp->m_SummaryCallback(_SummaryString+l, _SummaryMaxLength-l, grp, grp->m_SummaryClientData); + else + grp->m_SummaryCallback(_SummaryString+l, _SummaryMaxLength-l, grp->m_StructValuePtr, grp->m_SummaryClientData); + separator = true; + } + } + else + { + size_t l = strlen(_SummaryString); + if( separator ) + { + _SummaryString[l++] = ','; + _SummaryString[l++] = '\0'; + } + string valString; + const CTwVarAtom *atom = static_cast(var); + atom->ValueToString(&valString); + if( atom->m_Type==TW_TYPE_BOOLCPP || atom->m_Type==TW_TYPE_BOOL8 || atom->m_Type==TW_TYPE_BOOL16 || atom->m_Type==TW_TYPE_BOOL32 ) + { + if (valString == "0") + valString = "-"; + else if (valString == "1") + valString = "\x7f"; // check sign + } + strncat(_SummaryString, valString.c_str(), _SummaryMaxLength-l); + separator = true; + } + if( strlen(_SummaryString)>_SummaryMaxLength-2 ) + break; + } + } + size_t l = strlen(_SummaryString); + if( l>_SummaryMaxLength-2 ) + { + _SummaryString[_SummaryMaxLength-2] = '.'; + _SummaryString[_SummaryMaxLength-1] = '.'; + _SummaryString[_SummaryMaxLength+0] = '\0'; + } + else + { + _SummaryString[l+0] = '}'; + _SummaryString[l+1] = '\0'; + } + } +} + +// --------------------------------------------------------------------------- + +TwType ANT_CALL TwDefineStruct(const char *_StructName, const TwStructMember *_StructMembers, unsigned int _NbMembers, size_t _StructSize, TwSummaryCallback _SummaryCallback, void *_SummaryClientData) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return TW_TYPE_UNDEF; // not initialized + } + if( _StructMembers==NULL || _NbMembers==0 || _StructSize==0 ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return TW_TYPE_UNDEF; + } + + if( _StructName!=NULL && strlen(_StructName)>0 ) + for( size_t j=0; jm_Structs.size(); ++j ) + if( strcmp(_StructName, g_TwMgr->m_Structs[j].m_Name.c_str())==0 ) + { + g_TwMgr->SetLastError(g_ErrExist); + return TW_TYPE_UNDEF; + } + + size_t structIndex = g_TwMgr->m_Structs.size(); + CTwMgr::CStruct s; + s.m_Size = _StructSize; + if( _StructName!=NULL && strlen(_StructName)>0 ) + s.m_Name = _StructName; + else + s.m_Name = ""; + s.m_Members.resize(_NbMembers); + if( _SummaryCallback!=NULL ) + { + s.m_SummaryCallback = _SummaryCallback; + s.m_SummaryClientData = _SummaryClientData; + } + else + { + s.m_SummaryCallback = CTwMgr::CStruct::DefaultSummary; + s.m_SummaryClientData = (void *)(structIndex); + } + for( unsigned int i=0; i<_NbMembers; ++i ) + { + CTwMgr::CStructMember& m = s.m_Members[i]; + if( _StructMembers[i].Name!=NULL ) + m.m_Name = _StructMembers[i].Name; + else + { + char name[16]; + sprintf(name, "%u", i); + m.m_Name = name; + } + m.m_Type = _StructMembers[i].Type; + m.m_Size = 0; // to avoid endless recursivity in GetDataSize + m.m_Size = CTwVar::GetDataSize(m.m_Type); + if( _StructMembers[i].Offset<_StructSize ) + m.m_Offset = _StructMembers[i].Offset; + else + { + g_TwMgr->SetLastError(g_ErrOffset); + return TW_TYPE_UNDEF; + } + if( _StructMembers[i].DefString!=NULL && strlen(_StructMembers[i].DefString)>0 ) + m.m_DefString = _StructMembers[i].DefString; + else + m.m_DefString = ""; + } + + g_TwMgr->m_Structs.push_back(s); + assert( g_TwMgr->m_Structs.size()==structIndex+1 ); + return TwType( TW_TYPE_STRUCT_BASE + structIndex ); +} + +// --------------------------------------------------------------------------- + +TwType ANT_CALL TwDefineStructExt(const char *_StructName, const TwStructMember *_StructExtMembers, unsigned int _NbExtMembers, size_t _StructSize, size_t _StructExtSize, TwStructExtInitCallback _StructExtInitCallback, TwCopyVarFromExtCallback _CopyVarFromExtCallback, TwCopyVarToExtCallback _CopyVarToExtCallback, TwSummaryCallback _SummaryCallback, void *_ClientData, const char *_Help) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr==NULL ) + { + TwGlobalError(g_ErrNotInit); + return TW_TYPE_UNDEF; // not initialized + } + if( _StructSize==0 || _StructExtInitCallback==NULL || _CopyVarFromExtCallback==NULL || _CopyVarToExtCallback==NULL ) + { + g_TwMgr->SetLastError(g_ErrBadParam); + return TW_TYPE_UNDEF; + } + TwType type = TwDefineStruct(_StructName, _StructExtMembers, _NbExtMembers, _StructExtSize, _SummaryCallback, _ClientData); + if( type>=TW_TYPE_STRUCT_BASE && typem_Structs.size() ) + { + CTwMgr::CStruct& s = g_TwMgr->m_Structs[type-TW_TYPE_STRUCT_BASE]; + s.m_IsExt = true; + s.m_ClientStructSize = _StructSize; + s.m_StructExtInitCallback = _StructExtInitCallback; + s.m_CopyVarFromExtCallback = _CopyVarFromExtCallback; + s.m_CopyVarToExtCallback = _CopyVarToExtCallback; + s.m_ExtClientData = _ClientData; + if( _Help!=NULL ) + s.m_Help = _Help; + } + return type; +} + + +// --------------------------------------------------------------------------- + +bool TwGetKeyCode(int *_Code, int *_Modif, const char *_String) +{ + assert(_Code!=NULL && _Modif!=NULL); + bool Ok = true; + *_Modif = TW_KMOD_NONE; + *_Code = 0; + size_t Start = strlen(_String)-1; + if( Start<0 ) + return false; + while( Start>0 && _String[Start-1]!='+' ) + --Start; + while( _String[Start]==' ' || _String[Start]=='\t' ) + ++Start; + char *CodeStr = _strdup(_String+Start); + for( size_t i=strlen(CodeStr)-1; i>=0; ++i ) + if( CodeStr[i]==' ' || CodeStr[i]=='\t' ) + CodeStr[i] = '\0'; + else + break; + + /* + if( strstr(_String, "SHIFT")!=NULL || strstr(_String, "shift")!=NULL ) + *_Modif |= TW_KMOD_SHIFT; + if( strstr(_String, "CTRL")!=NULL || strstr(_String, "ctrl")!=NULL ) + *_Modif |= TW_KMOD_CTRL; + if( strstr(_String, "META")!=NULL || strstr(_String, "meta")!=NULL ) + *_Modif |= TW_KMOD_META; + + if( strstr(_String, "ALTGR")!=NULL || strstr(_String, "altgr")!=NULL ) + ((void)(0)); // *_Modif |= TW_KMOD_ALTGR; + else // ALT and ALTGR are exclusive + if( strstr(_String, "ALT")!=NULL || strstr(_String, "alt")!=NULL ) + *_Modif |= TW_KMOD_ALT; + */ + char *up = _strdup(_String); + // _strupr(up); + for( char *upch=up; *upch!='\0'; ++upch ) + *upch = (char)toupper(*upch); + if( strstr(up, "SHIFT")!=NULL ) + *_Modif |= TW_KMOD_SHIFT; + if( strstr(up, "CTRL")!=NULL ) + *_Modif |= TW_KMOD_CTRL; + if( strstr(up, "META")!=NULL ) + *_Modif |= TW_KMOD_META; + + if( strstr(up, "ALTGR")!=NULL ) + ((void)(0)); // *_Modif |= TW_KMOD_ALTGR; + else // ALT and ALTGR are exclusive + if( strstr(up, "ALT")!=NULL ) + *_Modif |= TW_KMOD_ALT; + free(up); + + if( strlen(CodeStr)==1 ) + *_Code = (unsigned char)(CodeStr[0]); + else if( _stricmp(CodeStr, "backspace")==0 || _stricmp(CodeStr, "bs")==0 ) + *_Code = TW_KEY_BACKSPACE; + else if( _stricmp(CodeStr, "tab")==0 ) + *_Code = TW_KEY_TAB; + else if( _stricmp(CodeStr, "clear")==0 || _stricmp(CodeStr, "clr")==0 ) + *_Code = TW_KEY_CLEAR; + else if( _stricmp(CodeStr, "return")==0 || _stricmp(CodeStr, "ret")==0 ) + *_Code = TW_KEY_RETURN; + else if( _stricmp(CodeStr, "pause")==0 ) + *_Code = TW_KEY_PAUSE; + else if( _stricmp(CodeStr, "escape")==0 || _stricmp(CodeStr, "esc")==0 ) + *_Code = TW_KEY_ESCAPE; + else if( _stricmp(CodeStr, "space")==0 ) + *_Code = TW_KEY_SPACE; + else if( _stricmp(CodeStr, "delete")==0 || _stricmp(CodeStr, "del")==0 ) + *_Code = TW_KEY_DELETE; + /* + else if( strlen(CodeStr)==4 && CodeStr[3]>='0' && CodeStr[3]<='9' && (strstr(CodeStr, "pad")==CodeStr || strstr(CodeStr, "PAD")==CodeStr) ) + *_Code = TW_KEY_PAD_0 + CodeStr[3]-'0'; + else if( _stricmp(CodeStr, "pad.")==0 ) + *_Code = TW_KEY_PAD_PERIOD; + else if( _stricmp(CodeStr, "pad/")==0 ) + *_Code = TW_KEY_PAD_DIVIDE; + else if( _stricmp(CodeStr, "pad*")==0 ) + *_Code = TW_KEY_PAD_MULTIPLY; + else if( _stricmp(CodeStr, "pad+")==0 ) + *_Code = TW_KEY_PAD_PLUS; + else if( _stricmp(CodeStr, "pad-")==0 ) + *_Code = TW_KEY_PAD_MINUS; + else if( _stricmp(CodeStr, "padenter")==0 ) + *_Code = TW_KEY_PAD_ENTER; + else if( _stricmp(CodeStr, "pad=")==0 ) + *_Code = TW_KEY_PAD_EQUALS; + */ + else if( _stricmp(CodeStr, "up")==0 ) + *_Code = TW_KEY_UP; + else if( _stricmp(CodeStr, "down")==0 ) + *_Code = TW_KEY_DOWN; + else if( _stricmp(CodeStr, "right")==0 ) + *_Code = TW_KEY_RIGHT; + else if( _stricmp(CodeStr, "left")==0 ) + *_Code = TW_KEY_LEFT; + else if( _stricmp(CodeStr, "insert")==0 || _stricmp(CodeStr, "ins")==0 ) + *_Code = TW_KEY_INSERT; + else if( _stricmp(CodeStr, "home")==0 ) + *_Code = TW_KEY_HOME; + else if( _stricmp(CodeStr, "end")==0 ) + *_Code = TW_KEY_END; + else if( _stricmp(CodeStr, "pgup")==0 ) + *_Code = TW_KEY_PAGE_UP; + else if( _stricmp(CodeStr, "pgdown")==0 ) + *_Code = TW_KEY_PAGE_DOWN; + else if( (strlen(CodeStr)==2 || strlen(CodeStr)==3) && (CodeStr[0]=='f' || CodeStr[0]=='F') ) + { + int n = 0; + if( sscanf(CodeStr+1, "%d", &n)==1 && n>0 && n<16 ) + *_Code = TW_KEY_F1 + n-1; + else + Ok = false; + } + + free(CodeStr); + return Ok; +} + +bool TwGetKeyString(std::string *_String, int _Code, int _Modif) +{ + assert(_String!=NULL); + bool Ok = true; + if( _Modif & TW_KMOD_SHIFT ) + *_String += "SHIFT+"; + if( _Modif & TW_KMOD_CTRL ) + *_String += "CTRL+"; + if ( _Modif & TW_KMOD_ALT ) + *_String += "ALT+"; + if ( _Modif & TW_KMOD_META ) + *_String += "META+"; + // if ( _Modif & TW_KMOD_ALTGR ) + // *_String += "ALTGR+"; + switch( _Code ) + { + case TW_KEY_BACKSPACE: + *_String += "BackSpace"; + break; + case TW_KEY_TAB: + *_String += "Tab"; + break; + case TW_KEY_CLEAR: + *_String += "Clear"; + break; + case TW_KEY_RETURN: + *_String += "Return"; + break; + case TW_KEY_PAUSE: + *_String += "Pause"; + break; + case TW_KEY_ESCAPE: + *_String += "Esc"; + break; + case TW_KEY_SPACE: + *_String += "Space"; + break; + case TW_KEY_DELETE: + *_String += "Delete"; + break; + /* + case TW_KEY_PAD_0: + *_String += "PAD0"; + break; + case TW_KEY_PAD_1: + *_String += "PAD1"; + break; + case TW_KEY_PAD_2: + *_String += "PAD2"; + break; + case TW_KEY_PAD_3: + *_String += "PAD3"; + break; + case TW_KEY_PAD_4: + *_String += "PAD4"; + break; + case TW_KEY_PAD_5: + *_String += "PAD5"; + break; + case TW_KEY_PAD_6: + *_String += "PAD6"; + break; + case TW_KEY_PAD_7: + *_String += "PAD7"; + break; + case TW_KEY_PAD_8: + *_String += "PAD8"; + break; + case TW_KEY_PAD_9: + *_String += "PAD9"; + break; + case TW_KEY_PAD_PERIOD: + *_String += "PAD."; + break; + case TW_KEY_PAD_DIVIDE: + *_String += "PAD/"; + break; + case TW_KEY_PAD_MULTIPLY: + *_String += "PAD*"; + break; + case TW_KEY_PAD_MINUS: + *_String += "PAD-"; + break; + case TW_KEY_PAD_PLUS: + *_String += "PAD+"; + break; + case TW_KEY_PAD_ENTER: + *_String += "PADEnter"; + break; + case TW_KEY_PAD_EQUALS: + *_String += "PAD="; + break; + */ + case TW_KEY_UP: + *_String += "Up"; + break; + case TW_KEY_DOWN: + *_String += "Down"; + break; + case TW_KEY_RIGHT: + *_String += "Right"; + break; + case TW_KEY_LEFT: + *_String += "Left"; + break; + case TW_KEY_INSERT: + *_String += "Insert"; + break; + case TW_KEY_HOME: + *_String += "Home"; + break; + case TW_KEY_END: + *_String += "End"; + break; + case TW_KEY_PAGE_UP: + *_String += "PgUp"; + break; + case TW_KEY_PAGE_DOWN: + *_String += "PgDown"; + break; + case TW_KEY_F1: + *_String += "F1"; + break; + case TW_KEY_F2: + *_String += "F2"; + break; + case TW_KEY_F3: + *_String += "F3"; + break; + case TW_KEY_F4: + *_String += "F4"; + break; + case TW_KEY_F5: + *_String += "F5"; + break; + case TW_KEY_F6: + *_String += "F6"; + break; + case TW_KEY_F7: + *_String += "F7"; + break; + case TW_KEY_F8: + *_String += "F8"; + break; + case TW_KEY_F9: + *_String += "F9"; + break; + case TW_KEY_F10: + *_String += "F10"; + break; + case TW_KEY_F11: + *_String += "F11"; + break; + case TW_KEY_F12: + *_String += "F12"; + break; + case TW_KEY_F13: + *_String += "F13"; + break; + case TW_KEY_F14: + *_String += "F14"; + break; + case TW_KEY_F15: + *_String += "F15"; + break; + default: + if( _Code>0 && _Code<256 ) + *_String += char(_Code); + else + { + *_String += "Unknown"; + Ok = false; + } + } + return Ok; +} + +// --------------------------------------------------------------------------- + +const int TW_MOUSE_NOMOTION = -1; +ETwMouseAction TW_MOUSE_MOTION = (ETwMouseAction)(-2); +ETwMouseAction TW_MOUSE_WHEEL = (ETwMouseAction)(-3); +ETwMouseButtonID TW_MOUSE_NA = (ETwMouseButtonID)(-1); + +static int TwMouseEvent(ETwMouseAction _EventType, TwMouseButtonID _Button, int _MouseX, int _MouseY, int _WheelPos) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr==NULL || g_TwMgr->m_Graph==NULL ) + { + // TwGlobalError(g_ErrNotInit); -> not an error here + return 0; // not initialized + } + if( g_TwMgr->m_WndHeight<=0 || g_TwMgr->m_WndWidth<=0 ) + { + //g_TwMgr->SetLastError(g_ErrBadWndSize); // not an error, windows not yet ready. + return 0; + } + + // For multi-thread safety + if( !TwFreeAsyncDrawing() ) + return 0; + + if( _MouseX==TW_MOUSE_NOMOTION ) + _MouseX = g_TwMgr->m_LastMouseX; + else + g_TwMgr->m_LastMouseX = _MouseX; + if( _MouseY==TW_MOUSE_NOMOTION ) + _MouseY = g_TwMgr->m_LastMouseY; + else + g_TwMgr->m_LastMouseY = _MouseY; + + // for autorepeat + if( (!g_TwMgr->m_IsRepeatingMousePressed || !g_TwMgr->m_CanRepeatMousePressed) && _EventType==TW_MOUSE_PRESSED ) + { + g_TwMgr->m_LastMousePressedTime = g_TwMgr->m_Timer.GetTime(); + g_TwMgr->m_LastMousePressedButtonID = _Button; + g_TwMgr->m_LastMousePressedPosition[0] = _MouseX; + g_TwMgr->m_LastMousePressedPosition[1] = _MouseY; + g_TwMgr->m_CanRepeatMousePressed = true; + g_TwMgr->m_IsRepeatingMousePressed = false; + } + else if( _EventType==TW_MOUSE_RELEASED || _EventType==TW_MOUSE_WHEEL ) + { + g_TwMgr->m_CanRepeatMousePressed = false; + g_TwMgr->m_IsRepeatingMousePressed = false; + } + + bool Handled = false; + bool wasPopup = (g_TwMgr->m_PopupBar!=NULL); + CTwBar *Bar = NULL; + int i; + + // search for a bar with mousedrag enabled + CTwBar *BarDragging = NULL; + for( i=((int)g_TwMgr->m_Bars.size())-1; i>=0; --i ) + { + Bar = g_TwMgr->m_Bars[g_TwMgr->m_Order[i]]; + if( Bar!=NULL && Bar->m_Visible && Bar->IsDragging() ) + { + BarDragging = Bar; + break; + } + } + + for( i=(int)g_TwMgr->m_Bars.size(); i>=0; --i ) + { + if( i==(int)g_TwMgr->m_Bars.size() ) // first try the bar with mousedrag enabled (this bar has the focus) + Bar = BarDragging; + else + { + Bar = g_TwMgr->m_Bars[g_TwMgr->m_Order[i]]; + if( Bar==BarDragging ) + continue; + } + if( Bar!=NULL && Bar->m_Visible ) + { + if( _EventType==TW_MOUSE_MOTION ) + Handled = Bar->MouseMotion(_MouseX, _MouseY); + else if( _EventType==TW_MOUSE_PRESSED || _EventType==TW_MOUSE_RELEASED ) + Handled = Bar->MouseButton(_Button, (_EventType==TW_MOUSE_PRESSED), _MouseX, _MouseY); + else if( _EventType==TW_MOUSE_WHEEL ) + { + if( abs(_WheelPos-g_TwMgr->m_LastMouseWheelPos)<4 ) // avoid crazy wheel positions + Handled = Bar->MouseWheel(_WheelPos, g_TwMgr->m_LastMouseWheelPos, _MouseX, _MouseY); + } + if( Handled ) + break; + } + } + + if( g_TwMgr==NULL ) // Mgr might have been destroyed by the client inside a callback call + return 1; + + /* + if( i>=0 && Bar!=NULL && Handled && (_EventType==TW_MOUSE_PRESSED || Bar->IsMinimized()) && i!=((int)g_TwMgr->m_Bars.size())-1 ) + { + int iOrder = g_TwMgr->m_Order[i]; + for( int j=i; j<(int)g_TwMgr->m_Bars.size()-1; ++j ) + g_TwMgr->m_Order[j] = g_TwMgr->m_Order[j+1]; + g_TwMgr->m_Order[(int)g_TwMgr->m_Bars.size()-1] = iOrder; + } + */ + if( _EventType==TW_MOUSE_PRESSED || (Bar!=NULL && Bar->IsMinimized() && Handled) ) + { + if( wasPopup && Bar!=g_TwMgr->m_PopupBar && g_TwMgr->m_PopupBar!=NULL ) // delete popup + { + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } + + if( i>=0 && Bar!=NULL && Handled && !wasPopup ) + TwSetTopBar(Bar); + } + + if( _EventType==TW_MOUSE_WHEEL ) + g_TwMgr->m_LastMouseWheelPos = _WheelPos; + + return Handled ? 1 : 0; +} + +int ANT_CALL TwMouseButton(ETwMouseAction _EventType, TwMouseButtonID _Button) +{ + return TwMouseEvent(_EventType, _Button, TW_MOUSE_NOMOTION, TW_MOUSE_NOMOTION, 0); +} + +int ANT_CALL TwMouseMotion(int _MouseX, int _MouseY) +{ + return TwMouseEvent(TW_MOUSE_MOTION, TW_MOUSE_NA, _MouseX, _MouseY, 0); +} + +int ANT_CALL TwMouseWheel(int _Pos) +{ + return TwMouseEvent(TW_MOUSE_WHEEL, TW_MOUSE_NA, TW_MOUSE_NOMOTION, TW_MOUSE_NOMOTION, _Pos); +} + +// --------------------------------------------------------------------------- + +static int TranslateKey(int _Key, int _Modifiers) +{ + // CTRL special cases + //if( (_Modifiers&TW_KMOD_CTRL) && !(_Modifiers&TW_KMOD_ALT || _Modifiers&TW_KMOD_META) && _Key>0 && _Key<32 ) + // _Key += 'a'-1; + if( (_Modifiers&TW_KMOD_CTRL) ) + { + if( _Key>='a' && _Key<='z' && ( ((_Modifiers&0x2000) && !(_Modifiers&TW_KMOD_SHIFT)) || (!(_Modifiers&0x2000) && (_Modifiers&TW_KMOD_SHIFT)) )) // 0x2000 is SDL's KMOD_CAPS + _Key += 'A'-'a'; + else if ( _Key>='A' && _Key<='Z' && ( ((_Modifiers&0x2000) && (_Modifiers&TW_KMOD_SHIFT)) || (!(_Modifiers&0x2000) && !(_Modifiers&TW_KMOD_SHIFT)) )) // 0x2000 is SDL's KMOD_CAPS + _Key += 'a'-'A'; + } + + // PAD translation (for SDL keysym) + if( _Key>=256 && _Key<=272 ) // 256=SDLK_KP0 ... 272=SDLK_KP_EQUALS + { + //bool Num = ((_Modifiers&TW_KMOD_SHIFT) && !(_Modifiers&0x1000)) || (!(_Modifiers&TW_KMOD_SHIFT) && (_Modifiers&0x1000)); // 0x1000 is SDL's KMOD_NUM + //_Modifiers &= ~TW_KMOD_SHIFT; // remove shift modifier + bool Num = (!(_Modifiers&TW_KMOD_SHIFT) && (_Modifiers&0x1000)); // 0x1000 is SDL's KMOD_NUM + if( _Key==266 ) // SDLK_KP_PERIOD + _Key = Num ? '.' : TW_KEY_DELETE; + else if( _Key==267 ) // SDLK_KP_DIVIDE + _Key = '/'; + else if( _Key==268 ) // SDLK_KP_MULTIPLY + _Key = '*'; + else if( _Key==269 ) // SDLK_KP_MINUS + _Key = '-'; + else if( _Key==270 ) // SDLK_KP_PLUS + _Key = '+'; + else if( _Key==271 ) // SDLK_KP_ENTER + _Key = TW_KEY_RETURN; + else if( _Key==272 ) // SDLK_KP_EQUALS + _Key = '='; + else if( Num ) // num SDLK_KP0..9 + _Key += '0' - 256; + else if( _Key==256 ) // non-num SDLK_KP01 + _Key = TW_KEY_INSERT; + else if( _Key==257 ) // non-num SDLK_KP1 + _Key = TW_KEY_END; + else if( _Key==258 ) // non-num SDLK_KP2 + _Key = TW_KEY_DOWN; + else if( _Key==259 ) // non-num SDLK_KP3 + _Key = TW_KEY_PAGE_DOWN; + else if( _Key==260 ) // non-num SDLK_KP4 + _Key = TW_KEY_LEFT; + else if( _Key==262 ) // non-num SDLK_KP6 + _Key = TW_KEY_RIGHT; + else if( _Key==263 ) // non-num SDLK_KP7 + _Key = TW_KEY_HOME; + else if( _Key==264 ) // non-num SDLK_KP8 + _Key = TW_KEY_UP; + else if( _Key==265 ) // non-num SDLK_KP9 + _Key = TW_KEY_PAGE_UP; + } + return _Key; +} + +// --------------------------------------------------------------------------- + +static int KeyPressed(int _Key, int _Modifiers, bool _TestOnly) +{ + CTwFPU fpu; // force fpu precision + + if( g_TwMgr==NULL || g_TwMgr->m_Graph==NULL ) + { + // TwGlobalError(g_ErrNotInit); -> not an error here + return 0; // not initialized + } + if( g_TwMgr->m_WndHeight<=0 || g_TwMgr->m_WndWidth<=0 ) + { + //g_TwMgr->SetLastError(g_ErrBadWndSize); // not an error, windows not yet ready. + return 0; + } + + // For multi-thread savety + if( !TwFreeAsyncDrawing() ) + return 0; + + /* + // Test for TwDeleteBar + if( _Key>='0' && _Key<='9' ) + { + int n = _Key-'0'; + if( (int)g_TwMgr->m_Bars.size()>n && g_TwMgr->m_Bars[n]!=NULL ) + { + printf("Delete %s\n", g_TwMgr->m_Bars[n]->m_Name.c_str()); + TwDeleteBar(g_TwMgr->m_Bars[n]); + } + else + printf("can't delete %d\n", n); + return 1; + } + */ + + //char s[256]; + //sprintf(s, "twkeypressed k=%d m=%x\n", _Key, _Modifiers); + //OutputDebugString(s); + + _Key = TranslateKey(_Key, _Modifiers); + if( _Key>' ' && _Key<256 ) // don't test SHIFT if _Key is a common key + _Modifiers &= ~TW_KMOD_SHIFT; + // complete partial modifiers comming from SDL + if( _Modifiers & TW_KMOD_SHIFT ) + _Modifiers |= TW_KMOD_SHIFT; + if( _Modifiers & TW_KMOD_CTRL ) + _Modifiers |= TW_KMOD_CTRL; + if( _Modifiers & TW_KMOD_ALT ) + _Modifiers |= TW_KMOD_ALT; + if( _Modifiers & TW_KMOD_META ) + _Modifiers |= TW_KMOD_META; + + bool Handled = false; + CTwBar *Bar = NULL; + CTwBar *PopupBar = g_TwMgr->m_PopupBar; + //int Order = 0; + int i; + if( _Key>0 && _Keym_LastMouseX; + int MouseY = g_TwMgr->m_LastMouseY; + for( i=((int)g_TwMgr->m_Bars.size())-1; i>=0 && !Handled; --i ) + { + Bar = g_TwMgr->m_Bars[g_TwMgr->m_Order[i]]; + if( Bar!=NULL && Bar->m_Visible && !Bar->IsMinimized() + && ( (MouseX>=Bar->m_PosX && MouseXm_PosX+Bar->m_Width && MouseY>=Bar->m_PosY && MouseYm_PosY+Bar->m_Height) + || Bar==PopupBar) ) + { + if (_TestOnly) + Handled = Bar->KeyTest(_Key, _Modifiers); + else + Handled = Bar->KeyPressed(_Key, _Modifiers); + } + } + + // If not handled, send it to non-iconified bars in the right order + for( i=((int)g_TwMgr->m_Bars.size())-1; i>=0 && !Handled; --i ) + { + Bar = g_TwMgr->m_Bars[g_TwMgr->m_Order[i]]; + /* + for( size_t j=0; jm_Bars.size(); ++j ) + if( g_TwMgr->m_Order[j]==i ) + { + Bar = g_TwMgr->m_Bars[j]; + break; + } + Order = i; + */ + + if( Bar!=NULL && Bar->m_Visible && !Bar->IsMinimized() ) + { + if( _TestOnly ) + Handled = Bar->KeyTest(_Key, _Modifiers); + else + Handled = Bar->KeyPressed(_Key, _Modifiers); + if( g_TwMgr==NULL ) // Mgr might have been destroyed by the client inside a callback call + return 1; + } + } + + // If not handled, send it to iconified bars in the right order + for( i=((int)g_TwMgr->m_Bars.size())-1; i>=0 && !Handled; --i ) + { + Bar = g_TwMgr->m_Bars[g_TwMgr->m_Order[i]]; + if( Bar!=NULL && Bar->m_Visible && Bar->IsMinimized() ) + { + if( _TestOnly ) + Handled = Bar->KeyTest(_Key, _Modifiers); + else + Handled = Bar->KeyPressed(_Key, _Modifiers); + } + } + + if( g_TwMgr->m_HelpBar!=NULL && g_TwMgr->m_Graph && !_TestOnly ) + { + string Str; + TwGetKeyString(&Str, _Key, _Modifiers); + char Msg[256]; + sprintf(Msg, "Key pressed: %s", Str.c_str()); + g_TwMgr->m_KeyPressedStr = Msg; + g_TwMgr->m_KeyPressedBuildText = true; + // OutputDebugString(Msg); + } + } + + if( Handled && Bar!=g_TwMgr->m_PopupBar && g_TwMgr->m_PopupBar!=NULL && g_TwMgr->m_PopupBar==PopupBar ) // delete popup + { + TwDeleteBar(g_TwMgr->m_PopupBar); + g_TwMgr->m_PopupBar = NULL; + } + + if( Handled && Bar!=NULL && Bar!=g_TwMgr->m_PopupBar && Bar!=PopupBar ) // popup bar may have been destroyed + TwSetTopBar(Bar); + + return Handled ? 1 : 0; +} + +int ANT_CALL TwKeyPressed(int _Key, int _Modifiers) +{ + return KeyPressed(_Key, _Modifiers, false); +} + +int ANT_CALL TwKeyTest(int _Key, int _Modifiers) +{ + return KeyPressed(_Key, _Modifiers, true); +} + +// --------------------------------------------------------------------------- + +struct StructCompare : public binary_function +{ + bool operator()(const TwType& _Left, const TwType& _Right) const + { + assert( g_TwMgr!=NULL ); + int i0 = _Left-TW_TYPE_STRUCT_BASE; + int i1 = _Right-TW_TYPE_STRUCT_BASE; + if( i0>=0 && i0<(int)g_TwMgr->m_Structs.size() && i1>=0 && i1<(int)g_TwMgr->m_Structs.size() ) + return g_TwMgr->m_Structs[i0].m_Name < g_TwMgr->m_Structs[i1].m_Name; + else + return false; + } +}; + +typedef set StructSet; + +static void InsertUsedStructs(StructSet& _Set, const CTwVarGroup *_Grp) +{ + assert( g_TwMgr!=NULL && _Grp!=NULL ); + + for( size_t i=0; i<_Grp->m_Vars.size(); ++i ) + if( _Grp->m_Vars[i]!=NULL && _Grp->m_Vars[i]->m_Visible && _Grp->m_Vars[i]->IsGroup() )// && _Grp->m_Vars[i]->m_Help.length()>0 ) + { + const CTwVarGroup *SubGrp = static_cast(_Grp->m_Vars[i]); + if( SubGrp->m_StructValuePtr!=NULL && SubGrp->m_StructType>=TW_TYPE_STRUCT_BASE && SubGrp->m_StructTypem_Structs.size() && g_TwMgr->m_Structs[SubGrp->m_StructType-TW_TYPE_STRUCT_BASE].m_Name.length()>0 ) + { + if( SubGrp->m_Help.length()>0 ) + _Set.insert(SubGrp->m_StructType); + else + { + int idx = SubGrp->m_StructType - TW_TYPE_STRUCT_BASE; + if( idx>=0 && idx<(int)g_TwMgr->m_Structs.size() && g_TwMgr->m_Structs[idx].m_Name.length()>0 ) + { + for( size_t j=0; jm_Structs[idx].m_Members.size(); ++j ) + if( g_TwMgr->m_Structs[idx].m_Members[j].m_Help.length()>0 ) + { + _Set.insert(SubGrp->m_StructType); + break; + } + } + } + } + InsertUsedStructs(_Set, SubGrp); + } +} + +static void SplitString(vector& _OutSplits, const char *_String, int _Width, const CTexFont *_Font) +{ + assert( _Font!=NULL && _String!=NULL ); + _OutSplits.resize(0); + int l = (int)strlen(_String); + if( l==0 ) + { + _String = " "; + l = 1; + } + + if( _String!=NULL && l>0 && _Width>0 ) + { + int w = 0; + int i = 0; + int First = 0; + int Last = 0; + bool PrevNotBlank = true; + unsigned char c; + bool Tab = false, CR = false; + string Split; + const string TabString(g_TabLength, ' '); + + while( im_CharWidth[(int)' ']; + Tab = true; + } + else if( c=='\n' ) + { + w += _Width+1; // force split + Last = i; + CR = true; + } + else + w += _Font->m_CharWidth[(int)c]; + if( w>_Width || i==l-1 ) + { + if( Last<=First || i==l-1 ) + Last = i; + if( Tab ) + { + Split.resize(0); + for(int k=0; km_HelpBar!=NULL); + assert( _String!=NULL ); + int n = 0; + const CTexFont *Font = g_TwMgr->m_HelpBar->m_Font; + assert(Font!=NULL); + string Decal; + for( int s=0; s<_Level; ++s ) + Decal += ' '; + int DecalWidth = (_Level+2)*Font->m_CharWidth[(int)' ']; + + if( _Width>DecalWidth ) + { + vector Split; + SplitString(Split, _String, _Width-DecalWidth, Font); + for( int i=0; i<(int)Split.size(); ++i ) + { + CTwVarAtom *Var = new CTwVarAtom; + Var->m_Name = Decal + Split[i]; + Var->m_Ptr = NULL; + if( _Type==TW_TYPE_HELP_HEADER ) + Var->m_ReadOnly = false; + else + Var->m_ReadOnly = true; + Var->m_NoSlider = true; + Var->m_DontClip = true; + Var->m_Type = _Type; + Var->m_LeftMargin = (signed short)((_Level+1)*Font->m_CharWidth[(int)' ']); + Var->m_TopMargin = (signed short)(-g_TwMgr->m_HelpBar->m_Sep); + //Var->m_TopMargin = 1; + Var->m_ColorPtr = &(g_TwMgr->m_HelpBar->m_ColHelpText); + Var->SetDefaults(); + _Grp->m_Vars.push_back(Var); + ++n; + } + } + return n; +} + +static int AppendHelp(CTwVarGroup *_Grp, const CTwVarGroup *_ToAppend, int _Level, int _Width) +{ + assert( _Grp!=NULL ); + assert( _ToAppend!=NULL ); + int n = 0; + string Decal; + for( int s=0; s<_Level; ++s ) + Decal += ' '; + + if( _ToAppend->m_Help.size()>0 ) + n += AppendHelpString(_Grp, _ToAppend->m_Help.c_str(), _Level, _Width, TW_TYPE_HELP_GRP); + + for( size_t i=0; i<_ToAppend->m_Vars.size(); ++i ) + if( _ToAppend->m_Vars[i]!=NULL && _ToAppend->m_Vars[i]->m_Visible ) + { + bool append = true; + if( !_ToAppend->m_Vars[i]->IsGroup() ) + { + const CTwVarAtom *a = static_cast(_ToAppend->m_Vars[i]); + if( a->m_Type==TW_TYPE_BUTTON && a->m_Val.m_Button.m_Callback==NULL ) + append = false; + else if( a->m_KeyIncr[0]==0 && a->m_KeyIncr[1]==0 && a->m_KeyDecr[0]==0 && a->m_KeyDecr[1]==0 && a->m_Help.length()<=0 ) + append = false; + } + else if( _ToAppend->m_Vars[i]->IsGroup() && static_cast(_ToAppend->m_Vars[i])->m_StructValuePtr!=NULL // that's a struct var + && _ToAppend->m_Vars[i]->m_Help.length()<=0 ) + append = false; + + if( append ) + { + CTwVarAtom *Var = new CTwVarAtom; + Var->m_Name = Decal; + if( _ToAppend->m_Vars[i]->m_Label.size()>0 ) + Var->m_Name += _ToAppend->m_Vars[i]->m_Label; + else + Var->m_Name += _ToAppend->m_Vars[i]->m_Name; + Var->m_Ptr = NULL; + if( _ToAppend->m_Vars[i]->IsGroup() && static_cast(_ToAppend->m_Vars[i])->m_StructValuePtr!=NULL ) + { // That's a struct var + Var->m_Type = TW_TYPE_HELP_STRUCT; + Var->m_Val.m_HelpStruct.m_StructType = static_cast(_ToAppend->m_Vars[i])->m_StructType; + Var->m_ReadOnly = true; + Var->m_NoSlider = true; + } + else if( !_ToAppend->m_Vars[i]->IsGroup() ) + { + Var->m_Type = TW_TYPE_SHORTCUT; + Var->m_Val.m_Shortcut.m_Incr[0] = static_cast(_ToAppend->m_Vars[i])->m_KeyIncr[0]; + Var->m_Val.m_Shortcut.m_Incr[1] = static_cast(_ToAppend->m_Vars[i])->m_KeyIncr[1]; + Var->m_Val.m_Shortcut.m_Decr[0] = static_cast(_ToAppend->m_Vars[i])->m_KeyDecr[0]; + Var->m_Val.m_Shortcut.m_Decr[1] = static_cast(_ToAppend->m_Vars[i])->m_KeyDecr[1]; + Var->m_ReadOnly = static_cast(_ToAppend->m_Vars[i])->m_ReadOnly; + Var->m_NoSlider = true; + } + else + { + Var->m_Type = TW_TYPE_HELP_GRP; + Var->m_DontClip = true; + Var->m_LeftMargin = (signed short)((_Level+2)*g_TwMgr->m_HelpBar->m_Font->m_CharWidth[(int)' ']); + //Var->m_TopMargin = (signed short)(g_TwMgr->m_HelpBar->m_Font->m_CharHeight/2-2+2*(_Level-1)); + Var->m_TopMargin = 2; + if( Var->m_TopMargin>g_TwMgr->m_HelpBar->m_Font->m_CharHeight-3 ) + Var->m_TopMargin = (signed short)(g_TwMgr->m_HelpBar->m_Font->m_CharHeight-3); + Var->m_ReadOnly = true; + } + Var->SetDefaults(); + _Grp->m_Vars.push_back(Var); + size_t VarIndex = _Grp->m_Vars.size()-1; + ++n; + if( _ToAppend->m_Vars[i]->IsGroup() && static_cast(_ToAppend->m_Vars[i])->m_StructValuePtr==NULL ) + { + int nAppended = AppendHelp(_Grp, static_cast(_ToAppend->m_Vars[i]), _Level+1, _Width); + if( _Grp->m_Vars.size()==VarIndex+1 ) + { + delete _Grp->m_Vars[VarIndex]; + _Grp->m_Vars.resize(VarIndex); + } + else + n += nAppended; + } + else if( _ToAppend->m_Vars[i]->m_Help.length()>0 ) + n += AppendHelpString(_Grp, _ToAppend->m_Vars[i]->m_Help.c_str(), _Level+1, _Width, TW_TYPE_HELP_ATOM); + } + } + return n; +} + + +static void CopyHierarchy(CTwVarGroup *dst, const CTwVarGroup *src) +{ + if( dst==NULL || src==NULL ) + return; + + dst->m_Name = src->m_Name; + dst->m_Open = src->m_Open; + dst->m_Visible = src->m_Visible; + dst->m_ColorPtr = src->m_ColorPtr; + dst->m_DontClip = src->m_DontClip; + dst->m_IsRoot = src->m_IsRoot; + dst->m_LeftMargin = src->m_LeftMargin; + dst->m_TopMargin = src->m_TopMargin; + + dst->m_Vars.resize(src->m_Vars.size()); + for(size_t i=0; im_Vars.size(); ++i) + if( src->m_Vars[i]!=NULL && src->m_Vars[i]->IsGroup() ) + { + CTwVarGroup *grp = new CTwVarGroup; + CopyHierarchy(grp, static_cast(src->m_Vars[i])); + dst->m_Vars[i] = grp; + } + else + dst->m_Vars[i] = NULL; +} + +// copy the 'open' flag from original hierarchy to current hierarchy +static void SynchroHierarchy(CTwVarGroup *cur, const CTwVarGroup *orig) +{ + if( cur==NULL || orig==NULL ) + return; + + if( strcmp(cur->m_Name.c_str(), orig->m_Name.c_str())==0 ) + cur->m_Open = orig->m_Open; + + size_t j = 0; + while( jm_Vars.size() && (orig->m_Vars[j]==NULL || !orig->m_Vars[j]->IsGroup()) ) + ++j; + + for(size_t i=0; im_Vars.size(); ++i) + if( cur->m_Vars[i]!=NULL && cur->m_Vars[i]->IsGroup() && jm_Vars.size() && orig->m_Vars[j]!=NULL && orig->m_Vars[j]->IsGroup() ) + { + CTwVarGroup *curGrp = static_cast(cur->m_Vars[i]); + const CTwVarGroup *origGrp = static_cast(orig->m_Vars[j]); + if( strcmp(curGrp->m_Name.c_str(), origGrp->m_Name.c_str())==0 ) + { + curGrp->m_Open = origGrp->m_Open; + + SynchroHierarchy(curGrp, origGrp); + + ++j; + while( jm_Vars.size() && (orig->m_Vars[j]==NULL || !orig->m_Vars[j]->IsGroup()) ) + ++j; + } + } +} + + +void CTwMgr::UpdateHelpBar() +{ + if( m_HelpBar==NULL || m_HelpBar->IsMinimized() ) + return; + if( !m_HelpBarUpdateNow && (float)m_Timer.GetTime()m_VarRoot); + + TwRemoveAllVars(m_HelpBar); + + if( m_HelpBar->m_UpToDate ) + m_HelpBar->Update(); + + if( m_Help.size()>0 ) + AppendHelpString(&(m_HelpBar->m_VarRoot), m_Help.c_str(), 0, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0, TW_TYPE_HELP_ATOM); + if( m_HelpBar->m_Help.size()>0 ) + AppendHelpString(&(m_HelpBar->m_VarRoot), m_HelpBar->m_Help.c_str(), 0, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0, TW_TYPE_HELP_ATOM); + AppendHelpString(&(m_HelpBar->m_VarRoot), "", 0, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0, TW_TYPE_HELP_HEADER); + + for( size_t ib=0; ibm_IsHelpBar) && m_Bars[ib]!=m_PopupBar && m_Bars[ib]->m_Visible ) + { + // Create a group + CTwVarGroup *Grp = new CTwVarGroup; + Grp->m_SummaryCallback = NULL; + Grp->m_SummaryClientData = NULL; + Grp->m_StructValuePtr = NULL; + if( m_Bars[ib]->m_Label.size()<=0 ) + Grp->m_Name = m_Bars[ib]->m_Name; + else + Grp->m_Name = m_Bars[ib]->m_Label; + Grp->m_Open = true; + Grp->m_ColorPtr = &(m_HelpBar->m_ColGrpText); + m_HelpBar->m_VarRoot.m_Vars.push_back(Grp); + if( m_Bars[ib]->m_Help.size()>0 ) + AppendHelpString(Grp, m_Bars[ib]->m_Help.c_str(), 0, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0, TW_TYPE_HELP_GRP); + + // Append variables (recursive) + AppendHelp(Grp, &(m_Bars[ib]->m_VarRoot), 1, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0); + + // Append structures + StructSet UsedStructs; + InsertUsedStructs(UsedStructs, &(m_Bars[ib]->m_VarRoot)); + CTwVarGroup *StructGrp = NULL; + int MemberCount = 0; + for( StructSet::iterator it=UsedStructs.begin(); it!=UsedStructs.end(); ++it ) + { + int idx = (*it) - TW_TYPE_STRUCT_BASE; + if( idx>=0 && idx<(int)g_TwMgr->m_Structs.size() && g_TwMgr->m_Structs[idx].m_Name.length()>0 ) + { + if( StructGrp==NULL ) + { + StructGrp = new CTwVarGroup; + StructGrp->m_StructType = TW_TYPE_HELP_STRUCT; // a special line background color will be used + StructGrp->m_Name = "Structures"; + StructGrp->m_Open = false; + StructGrp->m_ColorPtr = &(m_HelpBar->m_ColStructText); + //Grp->m_Vars.push_back(StructGrp); + MemberCount = 0; + } + CTwVarAtom *Var = new CTwVarAtom; + Var->m_Ptr = NULL; + Var->m_Type = TW_TYPE_HELP_GRP; + Var->m_DontClip = true; + Var->m_LeftMargin = (signed short)(3*g_TwMgr->m_HelpBar->m_Font->m_CharWidth[(int)' ']); + Var->m_TopMargin = 2; + Var->m_ReadOnly = true; + Var->m_NoSlider = true; + Var->m_Name = '{'+g_TwMgr->m_Structs[idx].m_Name+'}'; + StructGrp->m_Vars.push_back(Var); + size_t structIndex = StructGrp->m_Vars.size()-1; + if( g_TwMgr->m_Structs[idx].m_Help.size()>0 ) + AppendHelpString(StructGrp, g_TwMgr->m_Structs[idx].m_Help.c_str(), 2, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0-2*Var->m_LeftMargin, TW_TYPE_HELP_ATOM); + + // Append struct members + for( size_t im=0; imm_Structs[idx].m_Members.size(); ++im ) + { + if( g_TwMgr->m_Structs[idx].m_Members[im].m_Help.size()>0 ) + { + CTwVarAtom *Var = new CTwVarAtom; + Var->m_Ptr = NULL; + Var->m_Type = TW_TYPE_SHORTCUT; + Var->m_Val.m_Shortcut.m_Incr[0] = 0; + Var->m_Val.m_Shortcut.m_Incr[1] = 0; + Var->m_Val.m_Shortcut.m_Decr[0] = 0; + Var->m_Val.m_Shortcut.m_Decr[1] = 0; + Var->m_ReadOnly = false; + Var->m_NoSlider = true; + if( g_TwMgr->m_Structs[idx].m_Members[im].m_Label.length()>0 ) + Var->m_Name = " "+g_TwMgr->m_Structs[idx].m_Members[im].m_Label; + else + Var->m_Name = " "+g_TwMgr->m_Structs[idx].m_Members[im].m_Name; + StructGrp->m_Vars.push_back(Var); + //if( g_TwMgr->m_Structs[idx].m_Members[im].m_Help.size()>0 ) + AppendHelpString(StructGrp, g_TwMgr->m_Structs[idx].m_Members[im].m_Help.c_str(), 3, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0-4*Var->m_LeftMargin, TW_TYPE_HELP_ATOM); + } + } + + if( StructGrp->m_Vars.size()==structIndex+1 ) // remove struct from help + { + delete StructGrp->m_Vars[structIndex]; + StructGrp->m_Vars.resize(structIndex); + } + else + ++MemberCount; + } + } + if( StructGrp!=NULL ) + { + if( MemberCount==1 ) + StructGrp->m_Name = "Structure"; + if( StructGrp->m_Vars.size()>0 ) + Grp->m_Vars.push_back(StructGrp); + else + { + delete StructGrp; + StructGrp = NULL; + } + } + } + + // Append RotoSlider + CTwVarGroup *RotoGrp = new CTwVarGroup; + RotoGrp->m_SummaryCallback = NULL; + RotoGrp->m_SummaryClientData = NULL; + RotoGrp->m_StructValuePtr = NULL; + RotoGrp->m_Name = "RotoSlider"; + RotoGrp->m_Open = false; + RotoGrp->m_ColorPtr = &(m_HelpBar->m_ColGrpText); + m_HelpBar->m_VarRoot.m_Vars.push_back(RotoGrp); + AppendHelpString(RotoGrp, "The RotoSlider allows rapid editing of numerical values.", 0, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0, TW_TYPE_HELP_ATOM); + AppendHelpString(RotoGrp, "To modify a numerical value, click on its label or on its roto [.] button, then move the mouse outside of the grey circle while keeping the mouse button pressed, and turn around the circle to increase or decrease the numerical value.", 0, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0, TW_TYPE_HELP_ATOM); + AppendHelpString(RotoGrp, "The two grey lines depict the min and max bounds.", 0, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0, TW_TYPE_HELP_ATOM); + AppendHelpString(RotoGrp, "Moving the mouse far form the circle allows precise increase or decrease, while moving near the circle allows fast increase or decrease.", 0, m_HelpBar->m_VarX2-m_HelpBar->m_VarX0, TW_TYPE_HELP_ATOM); + + SynchroHierarchy(&m_HelpBar->m_VarRoot, &prevHierarchy); + + m_HelpBarNotUpToDate = false; +} + +// --------------------------------------------------------------------------- + +#if defined(ANT_WINDOWS) + +#include "res/TwXCursors.h" + +void CTwMgr::CreateCursors() +{ + if( m_CursorsCreated ) + return; + m_CursorArrow = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_ARROW)); + m_CursorMove = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_SIZEALL)); + m_CursorWE = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_SIZEWE)); + m_CursorNS = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_SIZENS)); + m_CursorTopRight = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_SIZENESW)); + m_CursorTopLeft = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_SIZENWSE)); + m_CursorBottomLeft = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_SIZENESW)); + m_CursorBottomRight = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_SIZENWSE)); + m_CursorHelp = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_HELP)); + m_CursorCross = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_CROSS)); + m_CursorUpArrow = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_UPARROW)); + m_CursorNo = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_NO)); + m_CursorIBeam = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_IBEAM)); + #ifdef IDC_HAND + m_CursorHand = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_HAND)); + #else + m_CursorHand = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_UPARROW)); + #endif + int cur; + HMODULE hdll = GetModuleHandle(ANT_TWEAK_BAR_DLL); + if( hdll==NULL ) + g_UseCurRsc = false; // force the use of built-in cursors (not using resources) + if( g_UseCurRsc ) + m_CursorCenter = ::LoadCursor(hdll, MAKEINTRESOURCE(IDC_CURSOR1+0)); + else + m_CursorCenter = PixmapCursor(0); + if( m_CursorCenter==NULL ) + m_CursorCenter = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_CROSS)); + if( g_UseCurRsc ) + m_CursorPoint = ::LoadCursor(hdll, MAKEINTRESOURCE(IDC_CURSOR1+1)); + else + m_CursorPoint = PixmapCursor(1); + if( m_CursorPoint==NULL ) + m_CursorPoint = ::LoadCursor(NULL ,MAKEINTRESOURCE(IDC_CROSS)); + + for( cur=0; cur>2) + y*8] |= (unsigned char)(g_CurPict[_CurIdx][x+y*32] << 2*(3-(x&3))+1); //turn whiteon + data[(x>>2) + y*8] |= (unsigned char)(g_CurMask[_CurIdx][x+y*32] << 2*(3-(x&3))); //turn the alpha all the way up + } + //printf("\n"); + } + NSImage *img = [[NSImage alloc] initWithSize: [imgr size]]; + [img addRepresentation: imgr]; + NSCursor *cur = [[NSCursor alloc] initWithImage: img hotSpot: NSMakePoint(g_CurHot[_CurIdx][0],g_CurHot[_CurIdx][1])]; + + [imgr autorelease]; + [img autorelease]; + if (cur) + return cur; + else + return [NSCursor arrowCursor]; +} + +void CTwMgr::CreateCursors() +{ + if (m_CursorsCreated) + return; + + m_CursorArrow = [[NSCursor arrowCursor] retain]; + m_CursorMove = [[NSCursor crosshairCursor] retain]; + m_CursorWE = [[NSCursor resizeLeftRightCursor] retain]; + m_CursorNS = [[NSCursor resizeUpDownCursor] retain]; + m_CursorTopRight = [[NSCursor arrowCursor] retain]; //osx not have one + m_CursorTopLeft = [[NSCursor arrowCursor] retain]; //osx not have one + m_CursorBottomRight = [[NSCursor arrowCursor] retain]; //osx not have one + m_CursorBottomLeft = [[NSCursor arrowCursor] retain]; //osx not have one + m_CursorHelp = [[NSCursor arrowCursor] retain]; //osx not have one + m_CursorHand = [[NSCursor pointingHandCursor] retain]; + m_CursorCross = [[NSCursor arrowCursor] retain]; + m_CursorUpArrow = [[NSCursor arrowCursor] retain]; + m_CursorNo = [[NSCursor arrowCursor] retain]; + m_CursorIBeam = [[NSCursor IBeamCursor] retain]; + for (int i=0;ierror_code, err->request_code); + // No exit! + return 0 ; +} + +static void IgnoreXErrors() +{ + if( g_TwMgr!=NULL && g_TwMgr->m_CurrentXDisplay==glXGetCurrentDisplay() ) + { + XFlush(g_TwMgr->m_CurrentXDisplay); + XSync(g_TwMgr->m_CurrentXDisplay, False); + } + s_PrevErrorHandler = XSetErrorHandler(InactiveErrorHandler); +} + +static void RestoreXErrors() +{ + if( g_TwMgr!=NULL && g_TwMgr->m_CurrentXDisplay==glXGetCurrentDisplay() ) + { + XFlush(g_TwMgr->m_CurrentXDisplay); + XSync(g_TwMgr->m_CurrentXDisplay, False); + } + XSetErrorHandler(s_PrevErrorHandler); +} + +CTwMgr::CCursor CTwMgr::PixmapCursor(int _CurIdx) +{ + if( !m_CurrentXDisplay || !m_CurrentXWindow ) + return XC_left_ptr; + + IgnoreXErrors(); + + XColor black, white, exact; + Colormap colmap = DefaultColormap(m_CurrentXDisplay, DefaultScreen(m_CurrentXDisplay)); + Status s1 = XAllocNamedColor(m_CurrentXDisplay, colmap, "black", &black, &exact); + Status s2 = XAllocNamedColor(m_CurrentXDisplay, colmap, "white", &white, &exact); + if( s1==0 || s2==0 ) + return XC_left_ptr; // cannot allocate colors! + int x, y; + unsigned int mask[32]; + unsigned int pict[32]; + for( y=0; y<32; ++y ) + { + mask[y] = pict[y] = 0; + for( x=0; x<32; ++x ) + { + mask[y] |= (((unsigned int)(g_CurMask[_CurIdx][x+y*32]))<m_CurrentXDisplay ) + { + Window wnd = glXGetCurrentDrawable(); + if( wnd!=g_TwMgr->m_CurrentXWindow ) + { + FreeCursors(); + g_TwMgr->m_CurrentXWindow = wnd; + CreateCursors(); + // now _Cursor is not a valid cursor ID. + } + else + { + IgnoreXErrors(); + XDefineCursor(m_CurrentXDisplay, m_CurrentXWindow, _Cursor); + RestoreXErrors(); + } + } + } +} + +#endif //defined(ANT_UNIX) + +// --------------------------------------------------------------------------- + +void ANT_CALL TwCopyCDStringToClientFunc(TwCopyCDStringToClient copyCDStringToClientFunc) +{ + g_InitCopyCDStringToClient = copyCDStringToClientFunc; + if( g_TwMgr!=NULL ) + g_TwMgr->m_CopyCDStringToClient = copyCDStringToClientFunc; +} + +void ANT_CALL TwCopyCDStringToLibrary(char **destinationLibraryStringPtr, const char *sourceClientString) +{ + if( g_TwMgr==NULL ) + { + if( destinationLibraryStringPtr!=NULL ) + *destinationLibraryStringPtr = const_cast(sourceClientString); + return; + } + + // static buffer to store sourceClientString copy associated to sourceClientString pointer + std::vector& Buf = g_TwMgr->m_CDStdStringCopyBuffers[(void *)sourceClientString]; + + size_t len = (sourceClientString!=NULL) ? strlen(sourceClientString) : 0; + if( Buf.size()m_CopyStdStringToClient = copyStdStringToClientFunc; +} + +void ANT_CALL TwCopyStdStringToLibrary(std::string& destLibraryString, const std::string& srcClientString) +{ + /* + // check if destLibraryString should be initialized + char *Mem = (char *)&destLibraryString; + bool Init = true; + for( int i=0; i& Buf = g_TwMgr->m_CDStdStringCopyBuffers[(void *)&srcClientString]; + + size_t len = strlen(SrcStr); + if( Buf.size()& _OutRects) const +{ + if( Empty() ) + return false; + if( _Rect.Empty() || _Rect.Y>=Y+H || _Rect.Y+_Rect.H<=Y || _Rect.X>=X+W || _Rect.X+_Rect.W<=X ) + { + _OutRects.push_back(*this); + return true; + } + + bool Ret = false; + int Y0 = Y; + int Y1 = Y+H-1; + if( _Rect.Y>Y ) + { + Y0 = _Rect.Y; + _OutRects.push_back(CRect(X, Y, W, Y0-Y+1)); + Ret = true; + } + if( _Rect.Y+_Rect.HX ) + { + X0 = _Rect.X; //-2; + _OutRects.push_back(CRect(X, Y0, X0-X+1, Y1-Y0+1)); + Ret = true; + } + if( _Rect.X+_Rect.W& _Rects, vector& _OutRects) const +{ + _OutRects.clear(); + size_t i, j, NbRects = _Rects.size(); + if( NbRects==0 ) + { + _OutRects.push_back(*this); + return true; + } + else + { + vector TmpRects; + Subtract(_Rects[0], _OutRects); + + for( i=1; i +#define ANT_CALL TW_CALL + +#include "TwColors.h" +#include "TwFonts.h" +#include "TwGraph.h" +#include "AntPerfTimer.h" + + +//#define BENCH // uncomment to activate benchmarks + +#ifdef BENCH +# define PERF(cmd) cmd +#else // BENCH +# define PERF(cmd) +#endif // BENCH + +const int NB_ROTO_CURSORS = 12; + + +// --------------------------------------------------------------------------- +// API unexposed by AntTweakBar.h +// --------------------------------------------------------------------------- + +// bar states -> use TwDefine instead +typedef enum ETwState +{ + TW_STATE_SHOWN = 1, + TW_STATE_ICONIFIED = 2, + TW_STATE_HIDDEN = 3, + TW_STATE_UNICONIFIED = 4, + TW_STATE_ERROR = 0 +} TwState; +/*ANT_TWEAK_BAR_API*/ int ANT_CALL TwSetBarState(TwBar *bar, TwState state); +/*ANT_TWEAK_BAR_API*/ //TwState ANT_CALL TwGetBarState(const TwBar *bar); +// var states -> use TwDefine instead: visible/iconified implemented only as string commands +//ANT_TWEAK_BAR_API int ANT_CALL TwSetVarState(TwBar *bar, const char *name, TwState state); +//ANT_TWEAK_BAR_API TwState ANT_CALL TwGetVarState(const TwBar *bar, const char *name); + +struct CTwVarGroup; +typedef void (ANT_CALL *TwStructExtInitCallback)(void *structExtValue, void *clientData); +typedef void (ANT_CALL *TwCopyVarFromExtCallback)(void *structValue, const void *structExtValue, unsigned int structExtMemberIndex, void *clientData); +typedef void (ANT_CALL *TwCopyVarToExtCallback)(const void *structValue, void *structExtValue, unsigned int structExtMemberIndex, void *clientData); +/*ANT_TWEAK_BAR_API*/ TwType ANT_CALL TwDefineStructExt(const char *name, const TwStructMember *structExtMembers, unsigned int nbExtMembers, size_t structSize, size_t structExtSize, TwStructExtInitCallback structExtInitCallback, TwCopyVarFromExtCallback copyVarFromExtCallback, TwCopyVarToExtCallback copyVarToExtCallback, TwSummaryCallback summaryCallback, void *clientData, const char *help); +typedef void (ANT_CALL *TwCustomDrawCallback)(int w, int h, void *structExtValue, void *clientData, TwBar *bar, CTwVarGroup *varGrp); +typedef bool (ANT_CALL *TwCustomMouseMotionCallback)(int mouseX, int mouseY, int w, int h, void *structExtValue, void *clientData, TwBar *bar, CTwVarGroup *varGrp); +typedef bool (ANT_CALL *TwCustomMouseButtonCallback)(TwMouseButtonID button, bool pressed, int mouseX, int mouseY, int w, int h, void *structExtValue, void *clientData, TwBar *bar, CTwVarGroup *varGrp); +typedef void (ANT_CALL *TwCustomMouseLeaveCallback)(void *structExtValue, void *clientData, TwBar *bar); + +enum ERetType +{ + RET_ERROR = 0, + RET_DOUBLE, + RET_STRING +}; + +enum EButtonAlign +{ + BUTTON_ALIGN_LEFT, + BUTTON_ALIGN_CENTER, + BUTTON_ALIGN_RIGHT +}; + +// --------------------------------------------------------------------------- +// AntTweakBar Manager +// --------------------------------------------------------------------------- + +struct CTwMgr +{ + ETwGraphAPI m_GraphAPI; + void * m_Device; + int m_WndID; + class ITwGraph * m_Graph; + int m_WndWidth; + int m_WndHeight; + const CTexFont * m_CurrentFont; + + std::vector m_Bars; + std::vector m_Order; + + std::vector m_MinOccupied; + void Minimize(TwBar *_Bar); + void Maximize(TwBar *_Bar); + void Hide(TwBar *_Bar); + void Unhide(TwBar *_Bar); + void SetFont(const CTexFont *_Font, bool _ResizeBars); + int m_LastMouseX; + int m_LastMouseY; + int m_LastMouseWheelPos; + int m_IconPos; // 0: bottom-left, 1:bottom-right, 2:top-left, 3:top-right + int m_IconAlign; // 0: vertical, 1: horizontal + int m_IconMarginX, m_IconMarginY; + bool m_FontResizable; + std::string m_BarAlwaysOnTop; + std::string m_BarAlwaysOnBottom; + bool m_UseOldColorScheme; + bool m_Contained; + EButtonAlign m_ButtonAlign; + bool m_OverlapContent; + bool m_Terminating; + + std::string m_Help; + TwBar * m_HelpBar; + float m_LastHelpUpdateTime; + void UpdateHelpBar(); + bool m_HelpBarNotUpToDate; + bool m_HelpBarUpdateNow; + void * m_KeyPressedTextObj; + bool m_KeyPressedBuildText; + std::string m_KeyPressedStr; + float m_KeyPressedTime; + void * m_InfoTextObj; + bool m_InfoBuildText; + int m_BarInitColorHue; + int FindBar(const char *_Name) const; + int HasAttrib(const char *_Attrib, bool *_HasValue) const; + int SetAttrib(int _AttribID, const char *_Value); + ERetType GetAttrib(int _AttribID, std::vector& outDouble, std::ostringstream& outString) const; + void SetLastError(const char *_StaticErrorMesssage); // _StaticErrorMesssage must be a static string + const char * GetLastError(); // returns a static string describing the error, and set LastError to NULL + const char * CheckLastError() const; // returns the LastError, but does not set it to NULL + void SetCurrentDbgParams(const char *file, int line); + TwBar * m_PopupBar; + //bool IsProcessing() const { return m_Processing); + //void SetProcessing(bool processing) { m_Processing = processing; } + + CTwMgr(ETwGraphAPI _GraphAPI, void *_Device, int _WndID); + ~CTwMgr(); + + struct CStructMember + { + std::string m_Name; + std::string m_Label; + TwType m_Type; + size_t m_Offset; + std::string m_DefString; + size_t m_Size; + std::string m_Help; + }; + struct CStruct + { + std::string m_Name; + std::vector m_Members; + size_t m_Size; + TwSummaryCallback m_SummaryCallback; + void * m_SummaryClientData; + std::string m_Help; + bool m_IsExt; + size_t m_ClientStructSize; + TwStructExtInitCallback m_StructExtInitCallback; + TwCopyVarFromExtCallback m_CopyVarFromExtCallback; + TwCopyVarToExtCallback m_CopyVarToExtCallback; + void * m_ExtClientData; + CStruct() : m_IsExt(false), m_StructExtInitCallback(NULL), m_CopyVarFromExtCallback(NULL), m_CopyVarToExtCallback(NULL), m_ExtClientData(NULL) {} + static void ANT_CALL DefaultSummary(char *_SummaryString, size_t _SummaryMaxLength, const void *_Value, void *_ClientData); + static void * s_PassProxyAsClientData; + }; + std::vector m_Structs; + + // followings are used for TwAddVarCB( ... StructType ... ) + struct CStructProxy + { + TwType m_Type; + void * m_StructData; + bool m_DeleteStructData; + void * m_StructExtData; + TwSetVarCallback m_StructSetCallback; + TwGetVarCallback m_StructGetCallback; + void * m_StructClientData; + TwCustomDrawCallback m_CustomDrawCallback; + TwCustomMouseMotionCallback m_CustomMouseMotionCallback; + TwCustomMouseButtonCallback m_CustomMouseButtonCallback; + TwCustomMouseLeaveCallback m_CustomMouseLeaveCallback; + bool m_CustomCaptureFocus; + int m_CustomIndexFirst; + int m_CustomIndexLast; + CStructProxy(); + ~CStructProxy(); + }; + struct CMemberProxy + { + CStructProxy * m_StructProxy; + int m_MemberIndex; + struct CTwVar * m_Var; + struct CTwVarGroup * m_VarParent; + CTwBar * m_Bar; + CMemberProxy(); + ~CMemberProxy(); + static void ANT_CALL SetCB(const void *_Value, void *_ClientData); + static void ANT_CALL GetCB(void *_Value, void *_ClientData); + }; + std::list m_StructProxies; // elements should not move + std::list m_MemberProxies; // elements should not move + //void InitVarData(TwType _Type, void *_Data, size_t _Size); + //void UninitVarData(TwType _Type, void *_Data, size_t _Size); + + struct CEnum + { + std::string m_Name; + typedef std::map CEntries; + CEntries m_Entries; + }; + std::vector m_Enums; + + TwType m_TypeColor32; + TwType m_TypeColor3F; + TwType m_TypeColor4F; + TwType m_TypeQuat4F; + TwType m_TypeQuat4D; + TwType m_TypeDir3F; + TwType m_TypeDir3D; + + std::vector m_CSStringBuffer; + struct CCDStdString + { + std::string * m_ClientStdStringPtr; + char m_LocalString[sizeof(std::string)+2*sizeof(void*)]; //+2*sizeof(void*) because of VC++ std::string extra info in Debug + TwSetVarCallback m_ClientSetCallback; + TwGetVarCallback m_ClientGetCallback; + void * m_ClientData; + static void ANT_CALL SetCB(const void *_Value, void *_ClientData); + static void ANT_CALL GetCB(void *_Value, void *_ClientData); + }; + std::list m_CDStdStrings; + struct CClientStdString // Convertion between VC++ Debug/Release std::string + { + CClientStdString(); + void FromLib(const char *libStr); + std::string& ToClient(); + private: + char m_Data[sizeof(std::string)+2*sizeof(void *)]; + std::string m_LibStr; + }; + struct CLibStdString // Convertion between VC++ Debug/Release std::string + { + CLibStdString(); + void FromClient(const std::string& clientStr); + std::string& ToLib(); + private: + char m_Data[sizeof(std::string)+2*sizeof(void *)]; + }; + struct CCDStdStringRecord + { + void * m_DataPtr; + char m_PrevValue[sizeof(std::string)+2*sizeof(void*)]; + CClientStdString m_ClientStdString; + }; + std::vector m_CDStdStringRecords; + void UnrollCDStdString(std::vector& _Records, TwType _Type, void *_Data); + void RestoreCDStdString(const std::vector& _Records); + std::map > m_CDStdStringCopyBuffers; + + struct CCustom // custom var type + { + virtual ~CCustom() = 0; + }; + std::vector m_Customs; + + PerfTimer m_Timer; + double m_LastMousePressedTime; + TwMouseButtonID m_LastMousePressedButtonID; + int m_LastMousePressedPosition[2]; + double m_RepeatMousePressedDelay; + double m_RepeatMousePressedPeriod; + bool m_CanRepeatMousePressed; + bool m_IsRepeatingMousePressed; + double m_LastDrawTime; + + #if defined(ANT_WINDOWS) + typedef HCURSOR CCursor; + CCursor PixmapCursor(int _CurIdx); + #elif defined(ANT_UNIX) + typedef Cursor CCursor; + CCursor PixmapCursor(int _CurIdx); + Display * m_CurrentXDisplay; + Window m_CurrentXWindow; + #elif defined(ANT_OSX) + typedef NSCursor * CCursor; + CCursor PixmapCursor(int _CurIdx); + #endif // defined(ANT_UNIX) + bool m_CursorsCreated; + void CreateCursors(); + void FreeCursors(); + void SetCursor(CCursor _Cursor); + CCursor m_CursorArrow; + CCursor m_CursorMove; + CCursor m_CursorWE; + CCursor m_CursorNS; + CCursor m_CursorTopLeft; + CCursor m_CursorTopRight; + CCursor m_CursorBottomLeft; + CCursor m_CursorBottomRight; + CCursor m_CursorHelp; + CCursor m_CursorHand; + CCursor m_CursorCross; + CCursor m_CursorUpArrow; + CCursor m_CursorNo; + CCursor m_CursorIBeam; + CCursor m_RotoCursors[NB_ROTO_CURSORS]; + CCursor m_CursorCenter; + CCursor m_CursorPoint; + + TwCopyCDStringToClient m_CopyCDStringToClient; + TwCopyStdStringToClient m_CopyStdStringToClient; + size_t m_ClientStdStringStructSize; + +protected: + int m_NbMinimizedBars; + const char * m_LastError; + const char * m_CurrentDbgFile; + int m_CurrentDbgLine; + //bool m_Processing; +}; + +extern CTwMgr *g_TwMgr; + + +// --------------------------------------------------------------------------- +// Extra functions and TwTypes +// --------------------------------------------------------------------------- + + +bool TwGetKeyCode(int *_Code, int *_Modif, const char *_String); +bool TwGetKeyString(std::string *_String, int _Code, int _Modif); + +const TwType TW_TYPE_SHORTCUT = TwType(0xfff1); +const TwType TW_TYPE_HELP_GRP = TwType(0xfff2); +const TwType TW_TYPE_HELP_ATOM = TwType(0xfff3); +const TwType TW_TYPE_HELP_HEADER = TwType(0xfff4); +const TwType TW_TYPE_HELP_STRUCT = TwType(0xfff5); +const TwType TW_TYPE_BUTTON = TwType(0xfff6); +const TwType TW_TYPE_CDSTDSTRING = TwType(0xfff7); +const TwType TW_TYPE_STRUCT_BASE = TwType(0x10000000); +const TwType TW_TYPE_ENUM_BASE = TwType(0x20000000); +const TwType TW_TYPE_CSSTRING_BASE = TW_TYPE_CSSTRING(0); // defined as 0x30000000 (see AntTweakBar.h) +const TwType TW_TYPE_CSSTRING_MAX = TW_TYPE_CSSTRING(0xfffffff); +#define TW_CSSTRING_SIZE(type) ((int)((type)&0xfffffff)) +const TwType TW_TYPE_CUSTOM_BASE = TwType(0x40000000); + +extern "C" int ANT_CALL TwSetLastError(const char *_StaticErrorMessage); + +const TwGraphAPI TW_OPENGL_CORE = (TwGraphAPI)5; // WIP (note: OpenGL Core Profil requires OpenGL 3.2 or later) + +// Clipping helper +struct CRect +{ + int X, Y, W, H; + CRect() : X(0), Y(0), W(0), H(0) {} + CRect(int _X, int _Y, int _W, int _H) : X(_X), Y(_Y), W(_W), H(_H) {} + bool operator==(const CRect& _Rect) { return (Empty() && _Rect.Empty()) || (X==_Rect.X && Y==_Rect.Y && W==_Rect.W && H==_Rect.H); } + bool Empty(int _Margin=0) const { return (W<=_Margin || H<=_Margin); } + bool Subtract(const CRect& _Rect, std::vector& _OutRects) const; + bool Subtract(const std::vector& _Rects, std::vector& _OutRects) const; +}; + + +// --------------------------------------------------------------------------- +// Global bar attribs +// --------------------------------------------------------------------------- + + +enum EMgrAttribs +{ + MGR_HELP = 1, + MGR_FONT_SIZE, + MGR_ICON_POS, + MGR_ICON_ALIGN, + MGR_ICON_MARGIN, + MGR_FONT_RESIZABLE, + MGR_COLOR_SCHEME, + MGR_CONTAINED, + MGR_BUTTON_ALIGN, + MGR_OVERLAP +}; + + +// --------------------------------------------------------------------------- +// Color struct ext +// --------------------------------------------------------------------------- + + +struct CColorExt +{ + int R, G, B; + int H, L, S; + int A; + bool m_HLS, m_HasAlpha, m_OGL; + bool m_CanHaveAlpha; + bool m_IsColorF; + unsigned int m_PrevConvertedColor; + CTwMgr::CStructProxy*m_StructProxy; + void RGB2HLS(); + void HLS2RGB(); + static void ANT_CALL InitColor32CB(void *_ExtValue, void *_ClientData); + static void ANT_CALL InitColor3FCB(void *_ExtValue, void *_ClientData); + static void ANT_CALL InitColor4FCB(void *_ExtValue, void *_ClientData); + static void ANT_CALL CopyVarFromExtCB(void *_VarValue, const void *_ExtValue, unsigned int _ExtMemberIndex, void *_ClientData); + static void ANT_CALL CopyVarToExtCB(const void *_VarValue, void *_ExtValue, unsigned int _ExtMemberIndex, void *_ClientData); + static void ANT_CALL SummaryCB(char *_SummaryString, size_t _SummaryMaxLength, const void *_ExtValue, void *_ClientData); + static void CreateTypes(); +}; + + +// --------------------------------------------------------------------------- +// Quaternion struct ext +// --------------------------------------------------------------------------- + + +struct CQuaternionExt +{ + double Qx, Qy, Qz, Qs; // Quat value + double Vx, Vy, Vz, Angle; // Not used + double Dx, Dy, Dz; // Dir value set when used as a direction + bool m_AAMode; // Axis & angle mode -> disabled + bool m_ShowVal; // Display values + bool m_IsFloat; // Quat/Dir uses floats + bool m_IsDir; // Mapped to a dir vector instead of a quat + double m_Dir[3]; // If not zero, display one direction vector + color32 m_DirColor; // Direction vector color + float m_Permute[3][3]; // Permute frame axis + CTwMgr::CStructProxy*m_StructProxy; + static void ANT_CALL InitQuat4FCB(void *_ExtValue, void *_ClientData); + static void ANT_CALL InitQuat4DCB(void *_ExtValue, void *_ClientData); + static void ANT_CALL InitDir3FCB(void *_ExtValue, void *_ClientData); + static void ANT_CALL InitDir3DCB(void *_ExtValue, void *_ClientData); + static void ANT_CALL CopyVarFromExtCB(void *_VarValue, const void *_ExtValue, unsigned int _ExtMemberIndex, void *_ClientData); + static void ANT_CALL CopyVarToExtCB(const void *_VarValue, void *_ExtValue, unsigned int _ExtMemberIndex, void *_ClientData); + static void ANT_CALL SummaryCB(char *_SummaryString, size_t _SummaryMaxLength, const void *_ExtValue, void *_ClientData); + static void ANT_CALL DrawCB(int _W, int _H, void *_ExtValue, void *_ClientData, TwBar *_Bar, CTwVarGroup *varGrp); + static bool ANT_CALL MouseMotionCB(int _MouseX, int _MouseY, int _W, int _H, void *_StructExtValue, void *_ClientData, TwBar *_Bar, CTwVarGroup *varGrp); + static bool ANT_CALL MouseButtonCB(TwMouseButtonID _Button, bool _Pressed, int _MouseX, int _MouseY, int _W, int _H, void *_StructExtValue, void *_ClientData, TwBar *_Bar, CTwVarGroup *varGrp); + static void ANT_CALL MouseLeaveCB(void *_StructExtValue, void *_ClientData, TwBar *_Bar); + static void CreateTypes(); + static TwType s_CustomType; + void ConvertToAxisAngle(); + void ConvertFromAxisAngle(); + void CopyToVar(); + static std::vector s_SphTri; + static std::vector s_SphCol; + static std::vector s_SphTriProj; + static std::vector s_SphColLight; + static std::vector s_ArrowTri[4]; + static std::vector s_ArrowTriProj[4]; + static std::vector s_ArrowNorm[4]; + static std::vector s_ArrowColLight[4]; + enum EArrowParts { ARROW_CONE, ARROW_CONE_CAP, ARROW_CYL, ARROW_CYL_CAP }; + static void CreateSphere(); + static void CreateArrow(); + static void ApplyQuat(float *outX, float *outY, float *outZ, float x, float y, float z, float qx, float qy, float qz, float qs); + static void QuatFromDir(double *outQx, double *outQy, double *outQz, double *outQs, double dx, double dy, double dz); + inline void Permute(float *outX, float *outY, float *outZ, float x, float y, float z); + inline void PermuteInv(float *outX, float *outY, float *outZ, float x, float y, float z); + inline void Permute(double *outX, double *outY, double *outZ, double x, double y, double z); + inline void PermuteInv(double *outX, double *outY, double *outZ, double x, double y, double z); + bool m_Highlighted; + bool m_Rotating; + double m_OrigQuat[4]; + float m_OrigX, m_OrigY; + double m_PrevX, m_PrevY; +}; + + +// --------------------------------------------------------------------------- +// CTwFPU objects set and restore the fpu precision if needed. +// (could be useful because DirectX changes it and AntTweakBar requires default double precision) +// --------------------------------------------------------------------------- + + +struct CTwFPU +{ + CTwFPU() + { + #ifdef ANT_WINDOWS + state0 = _controlfp(0, 0); + if( (state0&MCW_PC)==_PC_24 ) // we need at least _PC_53 + _controlfp(_PC_53, MCW_PC); + #else + state0 = 0; + #endif + } + ~CTwFPU() + { + #ifdef ANT_WINDOWS + if( (state0&MCW_PC)==_PC_24 ) + _controlfp(_PC_24, MCW_PC); + #else + state0 = 0; + #endif + } +private: + unsigned int state0; +}; + +// --------------------------------------------------------------------------- + + +#endif // !defined ANT_TW_MGR_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGLCore.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGLCore.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGLCore.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGLCore.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,744 @@ +// --------------------------------------------------------------------------- +// +// @file TwOpenGLCore.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Work In Progress +// +// --------------------------------------------------------------------------- + +#pragma warning GL3 +#define GL3_PROTOTYPES 1 //// +#include //// +#define ANT_OGL_HEADER_INCLUDED //// +#include "TwPrecomp.h" +#include "LoadOGLCore.h" +#include "TwOpenGLCore.h" +#include "TwMgr.h" + +using namespace std; + +extern const char *g_ErrCantLoadOGL; +extern const char *g_ErrCantUnloadOGL; + +// --------------------------------------------------------------------------- + +#ifdef _DEBUG + static void CheckGLCoreError(const char *file, int line, const char *func) + { + int err=0; + char msg[256]; + while( (err=_glGetError())!=0 ) + { + sprintf(msg, "%s(%d) : [%s] GL_CORE_ERROR=0x%x\n", file, line, func, err); + #ifdef ANT_WINDOWS + OutputDebugString(msg); + #endif + fprintf(stderr, msg); + } + } +# ifdef __FUNCTION__ +# define CHECK_GL_ERROR CheckGLCoreError(__FILE__, __LINE__, __FUNCTION__) +# else +# define CHECK_GL_ERROR CheckGLCoreError(__FILE__, __LINE__, "") +# endif +#else +# define CHECK_GL_ERROR ((void)(0)) +#endif + +// --------------------------------------------------------------------------- + +static GLuint BindFont(const CTexFont *_Font) +{ + GLuint TexID = 0; +/* + _glGenTextures(1, &TexID); + _glBindTexture(GL_TEXTURE_2D, TexID); + _glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); + _glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); + _glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + _glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); + _glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); + _glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + _glPixelTransferf(GL_ALPHA_SCALE, 1); + _glPixelTransferf(GL_ALPHA_BIAS, 0); + _glPixelTransferf(GL_RED_BIAS, 1); + _glPixelTransferf(GL_GREEN_BIAS, 1); + _glPixelTransferf(GL_BLUE_BIAS, 1); + _glTexImage2D(GL_TEXTURE_2D, 0, 4, _Font->m_TexWidth, _Font->m_TexHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, _Font->m_TexBytes); + _glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + _glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + _glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_NEAREST); + _glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_NEAREST); + _glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + _glBindTexture(GL_TEXTURE_2D, 0); + _glPixelTransferf(GL_ALPHA_BIAS, 0); + _glPixelTransferf(GL_RED_BIAS, 0); + _glPixelTransferf(GL_GREEN_BIAS, 0); + _glPixelTransferf(GL_BLUE_BIAS, 0); +*/ + return TexID; +} + +static void UnbindFont(GLuint _FontTexID) +{ +/* + if( _FontTexID>0 ) + _glDeleteTextures(1, &_FontTexID); +*/ +} + +// --------------------------------------------------------------------------- + +int CTwGraphOpenGLCore::Init() +{ + m_Drawing = false; + m_FontTexID = 0; + m_FontTex = NULL; + + if( LoadOpenGLCore()==0 ) + { + g_TwMgr->SetLastError(g_ErrCantLoadOGL); + return 0; + } + +/* + m_MaxClipPlanes = -1; + + // Get extensions + _glBindBufferARB = reinterpret_cast(_glGetProcAddress("glBindBufferARB")); + _glBindProgramARB = reinterpret_cast(_glGetProcAddress("glBindProgramARB")); + _glGetHandleARB = reinterpret_cast(_glGetProcAddress("glGetHandleARB")); + _glUseProgramObjectARB = reinterpret_cast(_glGetProcAddress("glUseProgramObjectARB")); + _glTexImage3D = reinterpret_cast(_glGetProcAddress("glTexImage3D")); + _glActiveTextureARB = reinterpret_cast(_glGetProcAddress("glActiveTextureARB")); + _glClientActiveTextureARB = reinterpret_cast(_glGetProcAddress("glClientActiveTextureARB")); + _glBlendEquation = reinterpret_cast(_glGetProcAddress("glBlendEquation")); + _glBlendEquationSeparate = reinterpret_cast(_glGetProcAddress("glBlendEquationSeparate")); + _glBlendFuncSeparate = reinterpret_cast(_glGetProcAddress("glBlendFuncSeparate")); + +#if !defined(ANT_OSX) + const char *ext = (const char *)_glGetString(GL_EXTENSIONS); + if( ext!=0 && strlen(ext)>0 ) + m_SupportTexRect = (strstr(ext, "GL_ARB_texture_rectangle")!=NULL); + else +#endif + m_SupportTexRect = false; +*/ + + // Create shaders + const GLchar *lineRectVS[] = { + "#version 150 core\n" + "in vec3 vertex;" + "void main() { gl_Position = vec4(vertex, 1); }" + }; + m_LineRectVS = _glCreateShader(GL_VERTEX_SHADER); + _glShaderSource(m_LineRectVS, 1, lineRectVS, NULL); + _glCompileShader(m_LineRectVS); + + const GLchar *lineRectFS[] = { + "#version 150 core\n" + "out vec4 color;" + "void main() { color = vec4(1, 0, 1, 1); }" + }; + m_LineRectFS = _glCreateShader(GL_FRAGMENT_SHADER); + _glShaderSource(m_LineRectFS, 1, lineRectFS, NULL); + _glCompileShader(m_LineRectFS); + + m_LineRectProgram = _glCreateProgram(); + _glAttachShader(m_LineRectProgram, m_LineRectVS); + _glAttachShader(m_LineRectProgram, m_LineRectFS); + _glLinkProgram(m_LineRectProgram); + + // Create line/rect vertex buffer + const GLfloat lineRectInitBuffer[] = { 0,0,0, 0,0,0, 0,0,0, 0,0,0 }; + _glGenVertexArrays(1, &m_LineRectVArray); + _glBindVertexArray(m_LineRectVArray); + _glGenBuffers(1, &m_LineRectBuffer); + _glBindBuffer(GL_ARRAY_BUFFER, m_LineRectBuffer); + _glBufferData(GL_ARRAY_BUFFER, sizeof(lineRectInitBuffer), lineRectInitBuffer, GL_DYNAMIC_DRAW); + + CHECK_GL_ERROR; + return 1; +} + +// --------------------------------------------------------------------------- + +int CTwGraphOpenGLCore::Shut() +{ + assert(m_Drawing==false); + + UnbindFont(m_FontTexID); + + int Res = 1; + if( UnloadOpenGLCore()==0 ) + { + g_TwMgr->SetLastError(g_ErrCantUnloadOGL); + Res = 0; + } + + return Res; +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::BeginDraw(int _WndWidth, int _WndHeight) +{ + assert(m_Drawing==false && _WndWidth>0 && _WndHeight>0); + m_Drawing = true; + m_WndWidth = _WndWidth; + m_WndHeight = _WndHeight; + m_OffsetX = 0; + m_OffsetY = 0; + + CHECK_GL_ERROR; + + //_glPushAttrib(GL_ALL_ATTRIB_BITS); + //_glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS); +/* + _glGetIntegerv(GL_ACTIVE_TEXTURE, &m_PrevActiveTexture); + GLint maxTexUnits = 1; + _glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &maxTexUnits); + if( maxTexUnits<1 ) + maxTexUnits = 1; + else if( maxTexUnits > 32 ) + maxTexUnits = 32; + for( GLint i=0; i0 && _WndHeight>0 ) + { + Vp[0] = 0; + Vp[1] = 0; + Vp[2] = _WndWidth-1; + Vp[3] = _WndHeight-1; + _glViewport(Vp[0], Vp[1], Vp[2], Vp[3]); + } + _glGetIntegerv(GL_VIEWPORT, m_ViewportInit); + + _glGetFloatv(GL_LINE_WIDTH, &m_PrevLineWidth); + _glLineWidth(1); + _glDisable(GL_LINE_SMOOTH); + _glDisable(GL_CULL_FACE); + _glDisable(GL_DEPTH_TEST); + _glEnable(GL_BLEND); + _glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + _glDisable(GL_SCISSOR_TEST); + m_PrevTexture = 0; + _glGetIntegerv(GL_TEXTURE_BINDING_2D, &m_PrevTexture); + +/* + _glDisableClientState(GL_VERTEX_ARRAY); + _glDisableClientState(GL_NORMAL_ARRAY); + _glDisableClientState(GL_TEXTURE_COORD_ARRAY); + _glDisableClientState(GL_INDEX_ARRAY); + _glDisableClientState(GL_COLOR_ARRAY); + _glDisableClientState(GL_EDGE_FLAG_ARRAY); + + if( _glBindBuffer!=NULL ) + { + m_PrevArrayBufferARB = m_PrevElementArrayBufferARB = 0; + _glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &m_PrevArrayBufferARB); + _glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &m_PrevElementArrayBufferARB); + _glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); + _glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0); + } + if( _glBindProgramARB!=NULL ) + { + m_PrevVertexProgramARB = _glIsEnabled(GL_VERTEX_PROGRAM_ARB); + m_PrevFragmentProgramARB = _glIsEnabled(GL_FRAGMENT_PROGRAM_ARB); + _glDisable(GL_VERTEX_PROGRAM_ARB); + _glDisable(GL_FRAGMENT_PROGRAM_ARB); + } + if( _glGetHandleARB!=NULL && _glUseProgramObjectARB!=NULL ) + { + m_PrevProgramObjectARB = _glGetHandleARB(GL_PROGRAM_OBJECT_ARB); + _glUseProgramObjectARB(0); + } +*/ +/* + _glDisable(GL_TEXTURE_1D); + _glDisable(GL_TEXTURE_2D); + m_PrevTexture3D = _glIsEnabled(GL_TEXTURE_3D); + _glDisable(GL_TEXTURE_3D); + m_PrevTexRect = _glIsEnabled(GL_TEXTURE_RECTANGLE); + _glDisable(GL_TEXTURE_RECTANGLE); + if( _glBlendEquationSeparate!=NULL ) + { + _glGetIntegerv(GL_BLEND_EQUATION_RGB, &m_PrevBlendEquationRGB); + _glGetIntegerv(GL_BLEND_EQUATION_ALPHA, &m_PrevBlendEquationAlpha); + _glBlendEquationSeparate(GL_FUNC_ADD, GL_FUNC_ADD); + } + if( _glBlendFuncSeparate!=NULL ) + { + _glGetIntegerv(GL_BLEND_SRC_RGB, &m_PrevBlendSrcRGB); + _glGetIntegerv(GL_BLEND_DST_RGB, &m_PrevBlendDstRGB); + _glGetIntegerv(GL_BLEND_SRC_ALPHA, &m_PrevBlendSrcAlpha); + _glGetIntegerv(GL_BLEND_DST_ALPHA, &m_PrevBlendDstAlpha); + _glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + if( _glBlendEquation!=NULL ) + { + _glGetIntegerv(GL_BLEND_EQUATION, &m_PrevBlendEquation); + _glBlendEquation(GL_FUNC_ADD); + } +*/ + CHECK_GL_ERROR; + +// _glUseProgram(m_LineRectProgram); +// GLint projLoc = _glGetUniformLocation(m_LineRectProgram, "proj"); +// _glUniformMatrix4fv(projLoc, 1, false, proj); + + CHECK_GL_ERROR; +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::EndDraw() +{ + assert(m_Drawing==true); + m_Drawing = false; +/* + _glBindTexture(GL_TEXTURE_2D, m_PrevTexture); + if( _glBindBufferARB!=NULL ) + { + _glBindBufferARB(GL_ARRAY_BUFFER_ARB, m_PrevArrayBufferARB); + _glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, m_PrevElementArrayBufferARB); + } + if( _glBindProgramARB!=NULL ) + { + if( m_PrevVertexProgramARB ) + _glEnable(GL_VERTEX_PROGRAM_ARB); + if( m_PrevFragmentProgramARB ) + _glEnable(GL_FRAGMENT_PROGRAM_ARB); + } + if( _glGetHandleARB!=NULL && _glUseProgramObjectARB!=NULL ) + _glUseProgramObjectARB(m_PrevProgramObjectARB); + if( _glTexImage3D!=NULL && m_PrevTexture3D ) + _glEnable(GL_TEXTURE_3D); + if( m_SupportTexRect && m_PrevTexRectARB ) + _glEnable(GL_TEXTURE_RECTANGLE_ARB); + if( _glBlendEquation!=NULL ) + _glBlendEquation(m_PrevBlendEquation); + if( _glBlendEquationSeparate!=NULL ) + _glBlendEquationSeparate(m_PrevBlendEquationRGB, m_PrevBlendEquationAlpha); + if( _glBlendFuncSeparate!=NULL ) + _glBlendFuncSeparate(m_PrevBlendSrcRGB, m_PrevBlendDstRGB, m_PrevBlendSrcAlpha, m_PrevBlendDstAlpha); + + _glPolygonMode(GL_FRONT, m_PrevPolygonMode[0]); + _glPolygonMode(GL_BACK, m_PrevPolygonMode[1]); + _glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, m_PrevTexEnv); + _glLineWidth(m_PrevLineWidth); + _glMatrixMode(GL_PROJECTION); + _glPopMatrix(); + _glMatrixMode(GL_MODELVIEW); + _glPopMatrix(); + _glMatrixMode(GL_TEXTURE); + _glPopMatrix(); + _glPopClientAttrib(); + _glPopAttrib(); + + if( _glActiveTextureARB ) + { + GLint maxTexUnits = 1; + _glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &maxTexUnits); + if( maxTexUnits<1 ) + maxTexUnits = 1; + else if( maxTexUnits > 32 ) + maxTexUnits = 32; + for( GLint i=0; i>16) & 0xff) | ((col<<16) & 0xff0000); +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased) +{ + assert(m_Drawing==true); + /* + //const GLfloat dx = +0.0f; + const GLfloat dx = +0.5f; + //GLfloat dy = -0.2f; + const GLfloat dy = -0.5f; + if( _AntiAliased ) + _glEnable(GL_LINE_SMOOTH); + else + _glDisable(GL_LINE_SMOOTH); + _glDisable(GL_TEXTURE_2D); + _glMatrixMode(GL_MODELVIEW); + _glLoadIdentity(); + _glBegin(GL_LINES); + _glColor4ub(GLubyte(_Color0>>16), GLubyte(_Color0>>8), GLubyte(_Color0), GLubyte(_Color0>>24)); + _glVertex2f((GLfloat)_X0+dx, (GLfloat)_Y0+dy); + _glColor4ub(GLubyte(_Color1>>16), GLubyte(_Color1>>8), GLubyte(_Color1), GLubyte(_Color1>>24)); + _glVertex2f((GLfloat)_X1+dx, (GLfloat)_Y1+dy); + //_glVertex2i(_X0, _Y0); + //_glVertex2i(_X1, _Y1); + _glEnd(); + _glDisable(GL_LINE_SMOOTH); + */ + + GLfloat x0 = ToNormScreenX(_X0 + m_OffsetX, m_WndWidth); + GLfloat y0 = ToNormScreenY(_Y0 + m_OffsetY, m_WndHeight); + GLfloat x1 = ToNormScreenX(_X1 + m_OffsetX, m_WndWidth); + GLfloat y1 = ToNormScreenY(_Y1 + m_OffsetY, m_WndHeight); + GLfloat vertices[] = { x0, y0, 0, x1, y1, 0 }; + _glBindBuffer(GL_ARRAY_BUFFER, m_LineRectBuffer); + _glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(vertices), vertices); + + _glUseProgram(m_LineRectProgram); + _glBindVertexArray(m_LineRectVArray); + GLint vlocation = _glGetAttribLocation(m_LineRectProgram, "vertex"); + _glVertexAttribPointer(vlocation, 3, GL_FLOAT, GL_TRUE, 0, NULL); + _glEnableVertexAttribArray(vlocation); + _glDrawArrays(GL_LINES, 0, 2); + + CHECK_GL_ERROR; +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11) +{ + assert(m_Drawing==true); + + /* + // border adjustment + if(_X0<_X1) + ++_X1; + else if(_X0>_X1) + ++_X0; + if(_Y0<_Y1) + --_Y0; + else if(_Y0>_Y1) + --_Y1; + const GLfloat dx = +0.0f; + const GLfloat dy = +0.0f; + + _glDisable(GL_TEXTURE_2D); + _glMatrixMode(GL_MODELVIEW); + _glLoadIdentity(); + //GLubyte r = GLubyte(_Color>>16); + //GLubyte g = GLubyte(_Color>>8); + //GLubyte b = GLubyte(_Color); + //GLubyte a = GLubyte(_Color>>24); + //_glColor4ub(GLubyte(_Color>>16), GLubyte(_Color>>8), GLubyte(_Color), GLubyte(_Color>>24)); + //_glColor4ub(r, g, b, a); + _glBegin(GL_QUADS); + _glColor4ub(GLubyte(_Color00>>16), GLubyte(_Color00>>8), GLubyte(_Color00), GLubyte(_Color00>>24)); + _glVertex2f((GLfloat)_X0+dx, (GLfloat)_Y0+dy); + _glColor4ub(GLubyte(_Color10>>16), GLubyte(_Color10>>8), GLubyte(_Color10), GLubyte(_Color10>>24)); + _glVertex2f((GLfloat)_X1+dx, (GLfloat)_Y0+dy); + _glColor4ub(GLubyte(_Color11>>16), GLubyte(_Color11>>8), GLubyte(_Color11), GLubyte(_Color11>>24)); + _glVertex2f((GLfloat)_X1+dx, (GLfloat)_Y1+dy); + _glColor4ub(GLubyte(_Color01>>16), GLubyte(_Color01>>8), GLubyte(_Color01), GLubyte(_Color01>>24)); + _glVertex2f((GLfloat)_X0+dx, (GLfloat)_Y1+dy); + _glEnd(); + */ +} + +// --------------------------------------------------------------------------- + +void *CTwGraphOpenGLCore::NewTextObj() +{ + return new CTextObj; +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::DeleteTextObj(void *_TextObj) +{ + assert(_TextObj!=NULL); + delete static_cast(_TextObj); +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + assert(_Font!=NULL); + + if( _Font != m_FontTex ) + { + UnbindFont(m_FontTexID); + m_FontTexID = BindFont(_Font); + m_FontTex = _Font; + } + CTextObj *TextObj = static_cast(_TextObj); + TextObj->m_TextVerts.resize(0); + TextObj->m_TextUVs.resize(0); + TextObj->m_BgVerts.resize(0); + TextObj->m_Colors.resize(0); + TextObj->m_BgColors.resize(0); + + int x, x1, y, y1, i, Len; + unsigned char ch; + const unsigned char *Text; + color32 LineColor = COLOR32_RED; + for( int Line=0; Line<_NbLines; ++Line ) + { + x = 0; + y = Line * (_Font->m_CharHeight+_Sep); + y1 = y+_Font->m_CharHeight; + Len = (int)_TextLines[Line].length(); + Text = (const unsigned char *)(_TextLines[Line].c_str()); + if( _LineColors!=NULL ) + LineColor = (_LineColors[Line]&0xff00ff00) | GLubyte(_LineColors[Line]>>16) | (GLubyte(_LineColors[Line])<<16); + + for( i=0; im_CharWidth[ch]; + + TextObj->m_TextVerts.push_back(Vec2(x , y )); + TextObj->m_TextVerts.push_back(Vec2(x1, y )); + TextObj->m_TextVerts.push_back(Vec2(x , y1)); + TextObj->m_TextVerts.push_back(Vec2(x1, y )); + TextObj->m_TextVerts.push_back(Vec2(x1, y1)); + TextObj->m_TextVerts.push_back(Vec2(x , y1)); + + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU0[ch], _Font->m_CharV0[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU1[ch], _Font->m_CharV0[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU0[ch], _Font->m_CharV1[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU1[ch], _Font->m_CharV0[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU1[ch], _Font->m_CharV1[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU0[ch], _Font->m_CharV1[ch])); + + if( _LineColors!=NULL ) + { + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + } + + x = x1; + } + if( _BgWidth>0 ) + { + TextObj->m_BgVerts.push_back(Vec2(-1 , y )); + TextObj->m_BgVerts.push_back(Vec2(_BgWidth+1, y )); + TextObj->m_BgVerts.push_back(Vec2(-1 , y1)); + TextObj->m_BgVerts.push_back(Vec2(_BgWidth+1, y )); + TextObj->m_BgVerts.push_back(Vec2(_BgWidth+1, y1)); + TextObj->m_BgVerts.push_back(Vec2(-1 , y1)); + + if( _LineBgColors!=NULL ) + { + color32 LineBgColor = (_LineBgColors[Line]&0xff00ff00) | GLubyte(_LineBgColors[Line]>>16) | (GLubyte(_LineBgColors[Line])<<16); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + } + } + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + CTextObj *TextObj = static_cast(_TextObj); + + if( TextObj->m_TextVerts.size()<4 && TextObj->m_BgVerts.size()<4 ) + return; // nothing to draw +/* + _glMatrixMode(GL_MODELVIEW); + _glLoadIdentity(); + _glTranslatef((GLfloat)_X, (GLfloat)_Y, 0); + _glEnableClientState(GL_VERTEX_ARRAY); + if( (_BgColor!=0 || TextObj->m_BgColors.size()==TextObj->m_BgVerts.size()) && TextObj->m_BgVerts.size()>=4 ) + { + _glDisable(GL_TEXTURE_2D); + _glVertexPointer(2, GL_FLOAT, 0, &(TextObj->m_BgVerts[0])); + if( TextObj->m_BgColors.size()==TextObj->m_BgVerts.size() && _BgColor==0 ) + { + _glEnableClientState(GL_COLOR_ARRAY); + _glColorPointer(4, GL_UNSIGNED_BYTE, 0, &(TextObj->m_BgColors[0])); + } + else + { + _glDisableClientState(GL_COLOR_ARRAY); + _glColor4ub(GLubyte(_BgColor>>16), GLubyte(_BgColor>>8), GLubyte(_BgColor), GLubyte(_BgColor>>24)); + } + _glDrawArrays(GL_TRIANGLES, 0, (int)TextObj->m_BgVerts.size()); + } + _glEnable(GL_TEXTURE_2D); + _glBindTexture(GL_TEXTURE_2D, m_FontTexID); + _glEnableClientState(GL_TEXTURE_COORD_ARRAY); + if( TextObj->m_TextVerts.size()>=4 ) + { + _glVertexPointer(2, GL_FLOAT, 0, &(TextObj->m_TextVerts[0])); + _glTexCoordPointer(2, GL_FLOAT, 0, &(TextObj->m_TextUVs[0])); + if( TextObj->m_Colors.size()==TextObj->m_TextVerts.size() && _Color==0 ) + { + _glEnableClientState(GL_COLOR_ARRAY); + _glColorPointer(4, GL_UNSIGNED_BYTE, 0, &(TextObj->m_Colors[0])); + } + else + { + _glDisableClientState(GL_COLOR_ARRAY); + _glColor4ub(GLubyte(_Color>>16), GLubyte(_Color>>8), GLubyte(_Color), GLubyte(_Color>>24)); + } + + _glDrawArrays(GL_TRIANGLES, 0, (int)TextObj->m_TextVerts.size()); + } + + _glDisableClientState(GL_VERTEX_ARRAY); + _glDisableClientState(GL_TEXTURE_COORD_ARRAY); + _glDisableClientState(GL_COLOR_ARRAY); +*/ +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY) +{ +/* + if( _Width>0 && _Height>0 ) + { + GLint vp[4]; + vp[0] = _X0; + vp[1] = _Y0; + vp[2] = _Width-1; + vp[3] = _Height-1; + _glViewport(vp[0], m_WndHeight-vp[1]-vp[3], vp[2], vp[3]); + + GLint matrixMode = 0; + _glGetIntegerv(GL_MATRIX_MODE, &matrixMode); + _glMatrixMode(GL_PROJECTION); + _glLoadIdentity(); + _glOrtho(_OffsetX, _OffsetX+vp[2], vp[3]-_OffsetY, -_OffsetY, -1, 1); + _glMatrixMode(matrixMode); + } +*/ +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::RestoreViewport() +{ +/* + _glViewport(m_ViewportInit[0], m_ViewportInit[1], m_ViewportInit[2], m_ViewportInit[3]); + + GLint matrixMode = 0; + _glGetIntegerv(GL_MATRIX_MODE, &matrixMode); + _glMatrixMode(GL_PROJECTION); + _glLoadMatrixf(m_ProjMatrixInit); + _glMatrixMode(matrixMode); +*/ +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGLCore::DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode) +{ + assert(m_Drawing==true); + + const GLfloat dx = +0.0f; + const GLfloat dy = +0.0f; +/* + GLint prevCullFaceMode, prevFrontFace; + _glGetIntegerv(GL_CULL_FACE_MODE, &prevCullFaceMode); + _glGetIntegerv(GL_FRONT_FACE, &prevFrontFace); + GLboolean prevCullEnable = _glIsEnabled(GL_CULL_FACE); + _glCullFace(GL_BACK); + _glEnable(GL_CULL_FACE); + if( _CullMode==CULL_CW ) + _glFrontFace(GL_CCW); + else if( _CullMode==CULL_CCW ) + _glFrontFace(GL_CW); + else + _glDisable(GL_CULL_FACE); + + _glDisable(GL_TEXTURE_2D); + _glMatrixMode(GL_MODELVIEW); + _glLoadIdentity(); + _glBegin(GL_TRIANGLES); + for(int i=0; i<3*_NumTriangles; ++i) + { + color32 col = _Colors[i]; + _glColor4ub(GLubyte(col>>16), GLubyte(col>>8), GLubyte(col), GLubyte(col>>24)); + _glVertex2f((GLfloat)_Vertices[2*i+0]+dx, (GLfloat)_Vertices[2*i+1]+dy); + } + _glEnd(); + + _glCullFace(prevCullFaceMode); + _glFrontFace(prevFrontFace); + if( prevCullEnable ) + _glEnable(GL_CULL_FACE); + else + _glDisable(GL_CULL_FACE); +*/ +} + +// --------------------------------------------------------------------------- diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGLCore.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGLCore.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGLCore.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGLCore.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,96 @@ +// --------------------------------------------------------------------------- +// +// @file TwOpenGLCore.h +// @brief OpenGL Core graph functions +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// notes: Private header, +// Work In Progress, Disabled. +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_OPENGL_CORE_INCLUDED +#define ANT_TW_OPENGL_CORE_INCLUDED + +#include "TwGraph.h" + +// --------------------------------------------------------------------------- + +class CTwGraphOpenGLCore : public ITwGraph +{ +public: + virtual int Init(); + virtual int Shut(); + virtual void BeginDraw(int _WndWidth, int _WndHeight); + virtual void EndDraw(); + virtual bool IsDrawing(); + virtual void Restore(); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased=false); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color, bool _AntiAliased=false) { DrawLine(_X0, _Y0, _X1, _Y1, _Color, _Color, _AntiAliased); } + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11); + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color) { DrawRect(_X0, _Y0, _X1, _Y1, _Color, _Color, _Color, _Color); } + virtual void DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode); + + virtual void * NewTextObj(); + virtual void DeleteTextObj(void *_TextObj); + virtual void BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth); + virtual void DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor); + + virtual void ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY); + virtual void RestoreViewport(); + +protected: + bool m_Drawing; + GLuint m_FontTexID; + const CTexFont * m_FontTex; + + GLfloat m_PrevLineWidth; + GLint m_PrevTexture; + GLint m_PrevArrayBuffer; + GLint m_PrevElementArrayBuffer; + GLboolean m_PrevVertexProgram; + GLboolean m_PrevFragmentProgram; + GLuint m_PrevProgramObject; + GLboolean m_PrevTexture3D; + GLboolean m_PrevActiveTexture1D[32]; + GLboolean m_PrevActiveTexture2D[32]; + GLboolean m_PrevActiveTexture3D[32]; + GLint m_PrevActiveTexture; + GLboolean m_PrevTexRect; + GLint m_PrevBlendEquation; + GLint m_PrevBlendEquationRGB; + GLint m_PrevBlendEquationAlpha; + GLint m_PrevBlendSrcRGB; + GLint m_PrevBlendDstRGB; + GLint m_PrevBlendSrcAlpha; + GLint m_PrevBlendDstAlpha; + GLint m_ViewportInit[4]; + GLuint m_LineRectVS; + GLuint m_LineRectFS; + GLuint m_LineRectProgram; + GLuint m_LineRectVArray; + GLuint m_LineRectBuffer; + + int m_WndWidth; + int m_WndHeight; + int m_OffsetX; + int m_OffsetY; + + struct Vec2 { GLfloat x, y; Vec2(){} Vec2(GLfloat _X, GLfloat _Y):x(_X),y(_Y){} Vec2(int _X, int _Y):x(GLfloat(_X)),y(GLfloat(_Y)){} }; + struct CTextObj + { + std::vector m_TextVerts; + std::vector m_TextUVs; + std::vector m_BgVerts; + std::vectorm_Colors; + std::vectorm_BgColors; + }; +}; + +// --------------------------------------------------------------------------- + + +#endif // !defined ANT_TW_OPENGL_CORE_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGL.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGL.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGL.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGL.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,851 @@ +// --------------------------------------------------------------------------- +// +// @file TwOpenGL.cpp +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// --------------------------------------------------------------------------- + + +#include "TwPrecomp.h" +#include "LoadOGL.h" +#include "TwOpenGL.h" +#include "TwMgr.h" + +using namespace std; + +const char *g_ErrCantLoadOGL = "Cannot load OpenGL library dynamically"; +const char *g_ErrCantUnloadOGL = "Cannot unload OpenGL library"; + +GLuint g_SmallFontTexID = 0; +GLuint g_NormalFontTexID = 0; +GLuint g_LargeFontTexID = 0; + +// --------------------------------------------------------------------------- +// Extensions + +typedef void (APIENTRY * PFNGLBindBufferARB)(GLenum target, GLuint buffer); +typedef void (APIENTRY * PFNGLBindProgramARB)(GLenum target, GLuint program); +typedef GLuint (APIENTRY * PFNGLGetHandleARB)(GLenum pname); +typedef void (APIENTRY * PFNGLUseProgramObjectARB)(GLuint programObj); +typedef void (APIENTRY * PFNGLTexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRY * PFNGLActiveTextureARB)(GLenum texture); +typedef void (APIENTRY * PFNGLClientActiveTextureARB)(GLenum texture); +typedef void (APIENTRY * PFNGLBlendEquation)(GLenum mode); +typedef void (APIENTRY * PFNGLBlendEquationSeparate)(GLenum srcMode, GLenum dstMode); +typedef void (APIENTRY * PFNGLBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +PFNGLBindBufferARB _glBindBufferARB = NULL; +PFNGLBindProgramARB _glBindProgramARB = NULL; +PFNGLGetHandleARB _glGetHandleARB = NULL; +PFNGLUseProgramObjectARB _glUseProgramObjectARB = NULL; +PFNGLTexImage3D _glTexImage3D = NULL; +PFNGLActiveTextureARB _glActiveTextureARB = NULL; +PFNGLClientActiveTextureARB _glClientActiveTextureARB = NULL; +PFNGLBlendEquation _glBlendEquation = NULL; +PFNGLBlendEquationSeparate _glBlendEquationSeparate = NULL; +PFNGLBlendFuncSeparate _glBlendFuncSeparate = NULL; +#ifndef GL_ARRAY_BUFFER_ARB +# define GL_ARRAY_BUFFER_ARB 0x8892 +#endif +#ifndef GL_ELEMENT_ARRAY_BUFFER_ARB +# define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#endif +#ifndef GL_ARRAY_BUFFER_BINDING_ARB +# define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#endif +#ifndef GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB +# define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#endif +#ifndef GL_VERTEX_PROGRAM_ARB +# define GL_VERTEX_PROGRAM_ARB 0x8620 +#endif +#ifndef GL_FRAGMENT_PROGRAM_ARB +# define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#endif +#ifndef GL_PROGRAM_OBJECT_ARB +# define GL_PROGRAM_OBJECT_ARB 0x8B40 +#endif +#ifndef GL_TEXTURE_3D +# define GL_TEXTURE_3D 0x806F +#endif +#ifndef GL_TEXTURE0_ARB +# define GL_TEXTURE0_ARB 0x84C0 +#endif +#ifndef GL_ACTIVE_TEXTURE_ARB +# define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#endif +#ifndef GL_CLIENT_ACTIVE_TEXTURE_ARB +# define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#endif +#ifndef GL_MAX_TEXTURE_UNITS_ARB +# define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +#endif +#ifndef GL_MAX_TEXTURE_COORDS +# define GL_MAX_TEXTURE_COORDS 0x8871 +#endif +#ifndef GL_TEXTURE_RECTANGLE_ARB +# define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#endif +#ifndef GL_FUNC_ADD +# define GL_FUNC_ADD 0x8006 +#endif +#ifndef GL_BLEND_EQUATION +# define GL_BLEND_EQUATION 0x8009 +#endif +#ifndef GL_BLEND_EQUATION_RGB +# define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION +#endif +#ifndef GL_BLEND_EQUATION_ALPHA +# define GL_BLEND_EQUATION_ALPHA 0x883D +#endif +#ifndef GL_BLEND_SRC_RGB +# define GL_BLEND_SRC_RGB 0x80C9 +#endif +#ifndef GL_BLEND_DST_RGB +# define GL_BLEND_DST_RGB 0x80C8 +#endif +#ifndef GL_BLEND_SRC_ALPHA +# define GL_BLEND_SRC_ALPHA 0x80CB +#endif +#ifndef GL_BLEND_DST_ALPHA +# define GL_BLEND_DST_ALPHA 0x80CA +#endif + +// --------------------------------------------------------------------------- + +#ifdef _DEBUG + static void CheckGLError(const char *file, int line, const char *func) + { + int err=0; + char msg[256]; + while( (err=_glGetError())!=0 ) + { + sprintf(msg, "%s(%d) : [%s] GL_ERROR=0x%x\n", file, line, func, err); + #ifdef ANT_WINDOWS + OutputDebugString(msg); + #endif + fprintf(stderr, msg); + } + } +# ifdef __FUNCTION__ +# define CHECK_GL_ERROR CheckGLError(__FILE__, __LINE__, __FUNCTION__) +# else +# define CHECK_GL_ERROR CheckGLError(__FILE__, __LINE__, "") +# endif +#else +# define CHECK_GL_ERROR ((void)(0)) +#endif + +// --------------------------------------------------------------------------- + +static GLuint BindFont(const CTexFont *_Font) +{ + GLuint TexID = 0; + _glGenTextures(1, &TexID); + _glBindTexture(GL_TEXTURE_2D, TexID); + _glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); + _glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE); + _glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + _glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); + _glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); + _glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + _glPixelTransferf(GL_ALPHA_SCALE, 1); + _glPixelTransferf(GL_ALPHA_BIAS, 0); + _glPixelTransferf(GL_RED_BIAS, 1); + _glPixelTransferf(GL_GREEN_BIAS, 1); + _glPixelTransferf(GL_BLUE_BIAS, 1); + _glTexImage2D(GL_TEXTURE_2D, 0, 4, _Font->m_TexWidth, _Font->m_TexHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, _Font->m_TexBytes); + _glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + _glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + _glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_NEAREST); + _glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_NEAREST); + _glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + _glBindTexture(GL_TEXTURE_2D, 0); + _glPixelTransferf(GL_ALPHA_BIAS, 0); + _glPixelTransferf(GL_RED_BIAS, 0); + _glPixelTransferf(GL_GREEN_BIAS, 0); + _glPixelTransferf(GL_BLUE_BIAS, 0); + + return TexID; +} + +static void UnbindFont(GLuint _FontTexID) +{ + if( _FontTexID>0 ) + _glDeleteTextures(1, &_FontTexID); +} + +// --------------------------------------------------------------------------- + +int CTwGraphOpenGL::Init() +{ + m_Drawing = false; + m_FontTexID = 0; + m_FontTex = NULL; + m_MaxClipPlanes = -1; + + if( LoadOpenGL()==0 ) + { + g_TwMgr->SetLastError(g_ErrCantLoadOGL); + return 0; + } + + // Get extensions + _glBindBufferARB = reinterpret_cast(_glGetProcAddress("glBindBufferARB")); + _glBindProgramARB = reinterpret_cast(_glGetProcAddress("glBindProgramARB")); + _glGetHandleARB = reinterpret_cast(_glGetProcAddress("glGetHandleARB")); + _glUseProgramObjectARB = reinterpret_cast(_glGetProcAddress("glUseProgramObjectARB")); + _glTexImage3D = reinterpret_cast(_glGetProcAddress("glTexImage3D")); + _glActiveTextureARB = reinterpret_cast(_glGetProcAddress("glActiveTextureARB")); + _glClientActiveTextureARB = reinterpret_cast(_glGetProcAddress("glClientActiveTextureARB")); + _glBlendEquation = reinterpret_cast(_glGetProcAddress("glBlendEquation")); + _glBlendEquationSeparate = reinterpret_cast(_glGetProcAddress("glBlendEquationSeparate")); + _glBlendFuncSeparate = reinterpret_cast(_glGetProcAddress("glBlendFuncSeparate")); + + m_SupportTexRect = false; // updated in BeginDraw + + return 1; +} + +// --------------------------------------------------------------------------- + +int CTwGraphOpenGL::Shut() +{ + assert(m_Drawing==false); + + UnbindFont(m_FontTexID); + + int Res = 1; + if( UnloadOpenGL()==0 ) + { + g_TwMgr->SetLastError(g_ErrCantUnloadOGL); + Res = 0; + } + + return Res; +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGL::BeginDraw(int _WndWidth, int _WndHeight) +{ + assert(m_Drawing==false && _WndWidth>0 && _WndHeight>0); + m_Drawing = true; + m_WndWidth = _WndWidth; + m_WndHeight = _WndHeight; + + CHECK_GL_ERROR; + +//#if !defined(ANT_OSX) + static bool s_SupportTexRectChecked = false; + if (!s_SupportTexRectChecked) + { + const char *ext = (const char *)_glGetString(GL_EXTENSIONS); + if( ext!=0 && strlen(ext)>0 ) + m_SupportTexRect = (strstr(ext, "GL_ARB_texture_rectangle")!=NULL); + s_SupportTexRectChecked = true; + } +//#endif + + _glPushAttrib(GL_ALL_ATTRIB_BITS); + _glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS); + + if( _glActiveTextureARB ) + { + _glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &m_PrevActiveTextureARB); + _glGetIntegerv(GL_CLIENT_ACTIVE_TEXTURE_ARB, &m_PrevClientActiveTextureARB); + GLint maxTexUnits = 1; + _glGetIntegerv(GL_MAX_TEXTURE_COORDS, &maxTexUnits); // was GL_MAX_TEXTURE_UNITS_ARB + if( maxTexUnits<1 ) + maxTexUnits = 1; + else if( maxTexUnits > MAX_TEXTURES ) + maxTexUnits = MAX_TEXTURES; + GLint i; + for( i=0; i0 && _WndHeight>0 ) + { + Vp[0] = 0; + Vp[1] = 0; + Vp[2] = _WndWidth; + Vp[3] = _WndHeight; + _glViewport(Vp[0], Vp[1], Vp[2], Vp[3]); + } + _glLoadIdentity(); + //_glOrtho(Vp[0], Vp[0]+Vp[2]-1, Vp[1]+Vp[3]-1, Vp[1], -1, 1); // Doesn't work + _glOrtho(Vp[0], Vp[0]+Vp[2], Vp[1]+Vp[3], Vp[1], -1, 1); + */ + if( _WndWidth>0 && _WndHeight>0 ) + { + Vp[0] = 0; + Vp[1] = 0; + Vp[2] = _WndWidth-1; + Vp[3] = _WndHeight-1; + _glViewport(Vp[0], Vp[1], Vp[2], Vp[3]); + } + _glLoadIdentity(); + _glOrtho(Vp[0], Vp[0]+Vp[2], Vp[1]+Vp[3], Vp[1], -1, 1); + _glGetIntegerv(GL_VIEWPORT, m_ViewportInit); + _glGetFloatv(GL_PROJECTION_MATRIX, m_ProjMatrixInit); + + _glGetFloatv(GL_LINE_WIDTH, &m_PrevLineWidth); + _glDisable(GL_POLYGON_STIPPLE); + _glLineWidth(1); + _glDisable(GL_LINE_SMOOTH); + _glDisable(GL_LINE_STIPPLE); + _glDisable(GL_CULL_FACE); + _glDisable(GL_DEPTH_TEST); + _glDisable(GL_LIGHTING); + _glEnable(GL_BLEND); + _glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + _glGetTexEnviv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, &m_PrevTexEnv); + _glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + _glGetIntegerv(GL_POLYGON_MODE, m_PrevPolygonMode); + _glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + _glDisable(GL_ALPHA_TEST); + //_glEnable(GL_ALPHA_TEST); + //_glAlphaFunc(GL_GREATER, 0); + _glDisable(GL_FOG); + _glDisable(GL_LOGIC_OP); + _glDisable(GL_SCISSOR_TEST); + if( m_MaxClipPlanes<0 ) + { + _glGetIntegerv(GL_MAX_CLIP_PLANES, &m_MaxClipPlanes); + if( m_MaxClipPlanes<0 || m_MaxClipPlanes>255 ) + m_MaxClipPlanes = 6; + } + for( GLint i=0; i MAX_TEXTURES ) + maxTexUnits = MAX_TEXTURES; + GLint i; + for( i=0; i_X1) + ++_X0; + if(_Y0<_Y1) + ++_Y1; + else if(_Y0>_Y1) + ++_Y0; + */ + //const GLfloat dx = +0.0f; + const GLfloat dx = +0.5f; + //GLfloat dy = -0.2f; + const GLfloat dy = -0.5f; + if( _AntiAliased ) + _glEnable(GL_LINE_SMOOTH); + else + _glDisable(GL_LINE_SMOOTH); + _glDisable(GL_TEXTURE_2D); + _glMatrixMode(GL_MODELVIEW); + _glLoadIdentity(); + _glBegin(GL_LINES); + _glColor4ub(GLubyte(_Color0>>16), GLubyte(_Color0>>8), GLubyte(_Color0), GLubyte(_Color0>>24)); + _glVertex2f((GLfloat)_X0+dx, (GLfloat)_Y0+dy); + _glColor4ub(GLubyte(_Color1>>16), GLubyte(_Color1>>8), GLubyte(_Color1), GLubyte(_Color1>>24)); + _glVertex2f((GLfloat)_X1+dx, (GLfloat)_Y1+dy); + //_glVertex2i(_X0, _Y0); + //_glVertex2i(_X1, _Y1); + _glEnd(); + _glDisable(GL_LINE_SMOOTH); +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGL::DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11) +{ + assert(m_Drawing==true); + + /* + // border adjustment + if(_X0<_X1) + ++_X1; + else if(_X0>_X1) + ++_X0; + if(_Y0<_Y1) + ++_Y1; + else if(_Y0>_Y1) + ++_Y0; + */ + // border adjustment + if(_X0<_X1) + ++_X1; + else if(_X0>_X1) + ++_X0; + if(_Y0<_Y1) + --_Y0; + else if(_Y0>_Y1) + --_Y1; + const GLfloat dx = +0.0f; + const GLfloat dy = +0.0f; + + _glDisable(GL_TEXTURE_2D); + _glMatrixMode(GL_MODELVIEW); + _glLoadIdentity(); + //GLubyte r = GLubyte(_Color>>16); + //GLubyte g = GLubyte(_Color>>8); + //GLubyte b = GLubyte(_Color); + //GLubyte a = GLubyte(_Color>>24); + //_glColor4ub(GLubyte(_Color>>16), GLubyte(_Color>>8), GLubyte(_Color), GLubyte(_Color>>24)); + //_glColor4ub(r, g, b, a); + _glBegin(GL_QUADS); + _glColor4ub(GLubyte(_Color00>>16), GLubyte(_Color00>>8), GLubyte(_Color00), GLubyte(_Color00>>24)); + _glVertex2f((GLfloat)_X0+dx, (GLfloat)_Y0+dy); + _glColor4ub(GLubyte(_Color10>>16), GLubyte(_Color10>>8), GLubyte(_Color10), GLubyte(_Color10>>24)); + _glVertex2f((GLfloat)_X1+dx, (GLfloat)_Y0+dy); + _glColor4ub(GLubyte(_Color11>>16), GLubyte(_Color11>>8), GLubyte(_Color11), GLubyte(_Color11>>24)); + _glVertex2f((GLfloat)_X1+dx, (GLfloat)_Y1+dy); + _glColor4ub(GLubyte(_Color01>>16), GLubyte(_Color01>>8), GLubyte(_Color01), GLubyte(_Color01>>24)); + _glVertex2f((GLfloat)_X0+dx, (GLfloat)_Y1+dy); + _glEnd(); +} + +// --------------------------------------------------------------------------- + +void *CTwGraphOpenGL::NewTextObj() +{ + return new CTextObj; +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGL::DeleteTextObj(void *_TextObj) +{ + assert(_TextObj!=NULL); + delete static_cast(_TextObj); +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGL::BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + assert(_Font!=NULL); + + if( _Font != m_FontTex ) + { + UnbindFont(m_FontTexID); + m_FontTexID = BindFont(_Font); + m_FontTex = _Font; + } + CTextObj *TextObj = static_cast(_TextObj); + TextObj->m_TextVerts.resize(0); + TextObj->m_TextUVs.resize(0); + TextObj->m_BgVerts.resize(0); + TextObj->m_Colors.resize(0); + TextObj->m_BgColors.resize(0); + + int x, x1, y, y1, i, Len; + unsigned char ch; + const unsigned char *Text; + color32 LineColor = COLOR32_RED; + for( int Line=0; Line<_NbLines; ++Line ) + { + x = 0; + y = Line * (_Font->m_CharHeight+_Sep); + y1 = y+_Font->m_CharHeight; + Len = (int)_TextLines[Line].length(); + Text = (const unsigned char *)(_TextLines[Line].c_str()); + if( _LineColors!=NULL ) + LineColor = (_LineColors[Line]&0xff00ff00) | GLubyte(_LineColors[Line]>>16) | (GLubyte(_LineColors[Line])<<16); + + for( i=0; im_CharWidth[ch]; + + TextObj->m_TextVerts.push_back(Vec2(x , y )); + TextObj->m_TextVerts.push_back(Vec2(x1, y )); + TextObj->m_TextVerts.push_back(Vec2(x , y1)); + TextObj->m_TextVerts.push_back(Vec2(x1, y )); + TextObj->m_TextVerts.push_back(Vec2(x1, y1)); + TextObj->m_TextVerts.push_back(Vec2(x , y1)); + + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU0[ch], _Font->m_CharV0[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU1[ch], _Font->m_CharV0[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU0[ch], _Font->m_CharV1[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU1[ch], _Font->m_CharV0[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU1[ch], _Font->m_CharV1[ch])); + TextObj->m_TextUVs.push_back(Vec2(_Font->m_CharU0[ch], _Font->m_CharV1[ch])); + + if( _LineColors!=NULL ) + { + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + TextObj->m_Colors.push_back(LineColor); + } + + x = x1; + } + if( _BgWidth>0 ) + { + TextObj->m_BgVerts.push_back(Vec2(-1 , y )); + TextObj->m_BgVerts.push_back(Vec2(_BgWidth+1, y )); + TextObj->m_BgVerts.push_back(Vec2(-1 , y1)); + TextObj->m_BgVerts.push_back(Vec2(_BgWidth+1, y )); + TextObj->m_BgVerts.push_back(Vec2(_BgWidth+1, y1)); + TextObj->m_BgVerts.push_back(Vec2(-1 , y1)); + + if( _LineBgColors!=NULL ) + { + color32 LineBgColor = (_LineBgColors[Line]&0xff00ff00) | GLubyte(_LineBgColors[Line]>>16) | (GLubyte(_LineBgColors[Line])<<16); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + TextObj->m_BgColors.push_back(LineBgColor); + } + } + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGL::DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor) +{ + assert(m_Drawing==true); + assert(_TextObj!=NULL); + CTextObj *TextObj = static_cast(_TextObj); + + if( TextObj->m_TextVerts.size()<4 && TextObj->m_BgVerts.size()<4 ) + return; // nothing to draw + + _glMatrixMode(GL_MODELVIEW); + _glLoadIdentity(); + _glTranslatef((GLfloat)_X, (GLfloat)_Y, 0); + _glEnableClientState(GL_VERTEX_ARRAY); + if( (_BgColor!=0 || TextObj->m_BgColors.size()==TextObj->m_BgVerts.size()) && TextObj->m_BgVerts.size()>=4 ) + { + _glDisable(GL_TEXTURE_2D); + _glVertexPointer(2, GL_FLOAT, 0, &(TextObj->m_BgVerts[0])); + if( TextObj->m_BgColors.size()==TextObj->m_BgVerts.size() && _BgColor==0 ) + { + _glEnableClientState(GL_COLOR_ARRAY); + _glColorPointer(4, GL_UNSIGNED_BYTE, 0, &(TextObj->m_BgColors[0])); + } + else + { + _glDisableClientState(GL_COLOR_ARRAY); + _glColor4ub(GLubyte(_BgColor>>16), GLubyte(_BgColor>>8), GLubyte(_BgColor), GLubyte(_BgColor>>24)); + } + _glDrawArrays(GL_TRIANGLES, 0, (int)TextObj->m_BgVerts.size()); + } + _glEnable(GL_TEXTURE_2D); + _glBindTexture(GL_TEXTURE_2D, m_FontTexID); + _glEnableClientState(GL_TEXTURE_COORD_ARRAY); + if( TextObj->m_TextVerts.size()>=4 ) + { + _glVertexPointer(2, GL_FLOAT, 0, &(TextObj->m_TextVerts[0])); + _glTexCoordPointer(2, GL_FLOAT, 0, &(TextObj->m_TextUVs[0])); + if( TextObj->m_Colors.size()==TextObj->m_TextVerts.size() && _Color==0 ) + { + _glEnableClientState(GL_COLOR_ARRAY); + _glColorPointer(4, GL_UNSIGNED_BYTE, 0, &(TextObj->m_Colors[0])); + } + else + { + _glDisableClientState(GL_COLOR_ARRAY); + _glColor4ub(GLubyte(_Color>>16), GLubyte(_Color>>8), GLubyte(_Color), GLubyte(_Color>>24)); + } + + _glDrawArrays(GL_TRIANGLES, 0, (int)TextObj->m_TextVerts.size()); + } + + _glDisableClientState(GL_VERTEX_ARRAY); + _glDisableClientState(GL_TEXTURE_COORD_ARRAY); + _glDisableClientState(GL_COLOR_ARRAY); +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGL::ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY) +{ + if( _Width>0 && _Height>0 ) + { + GLint vp[4]; + vp[0] = _X0; + vp[1] = _Y0; + vp[2] = _Width-1; + vp[3] = _Height-1; + _glViewport(vp[0], m_WndHeight-vp[1]-vp[3], vp[2], vp[3]); + + GLint matrixMode = 0; + _glGetIntegerv(GL_MATRIX_MODE, &matrixMode); + _glMatrixMode(GL_PROJECTION); + _glLoadIdentity(); + _glOrtho(_OffsetX, _OffsetX+vp[2], vp[3]-_OffsetY, -_OffsetY, -1, 1); + _glMatrixMode(matrixMode); + } +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGL::RestoreViewport() +{ + _glViewport(m_ViewportInit[0], m_ViewportInit[1], m_ViewportInit[2], m_ViewportInit[3]); + + GLint matrixMode = 0; + _glGetIntegerv(GL_MATRIX_MODE, &matrixMode); + _glMatrixMode(GL_PROJECTION); + _glLoadMatrixf(m_ProjMatrixInit); + _glMatrixMode(matrixMode); +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGL::SetScissor(int _X0, int _Y0, int _Width, int _Height) +{ + if( _Width>0 && _Height>0 ) + { + _glScissor(_X0-1, m_WndHeight-_Y0-_Height, _Width-1, _Height); + _glEnable(GL_SCISSOR_TEST); + } + else + _glDisable(GL_SCISSOR_TEST); +} + +// --------------------------------------------------------------------------- + +void CTwGraphOpenGL::DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode) +{ + assert(m_Drawing==true); + + const GLfloat dx = +0.0f; + const GLfloat dy = +0.0f; + + GLint prevCullFaceMode, prevFrontFace; + _glGetIntegerv(GL_CULL_FACE_MODE, &prevCullFaceMode); + _glGetIntegerv(GL_FRONT_FACE, &prevFrontFace); + GLboolean prevCullEnable = _glIsEnabled(GL_CULL_FACE); + _glCullFace(GL_BACK); + _glEnable(GL_CULL_FACE); + if( _CullMode==CULL_CW ) + _glFrontFace(GL_CCW); + else if( _CullMode==CULL_CCW ) + _glFrontFace(GL_CW); + else + _glDisable(GL_CULL_FACE); + + _glDisable(GL_TEXTURE_2D); + _glMatrixMode(GL_MODELVIEW); + _glLoadIdentity(); + _glBegin(GL_TRIANGLES); + for(int i=0; i<3*_NumTriangles; ++i) + { + color32 col = _Colors[i]; + _glColor4ub(GLubyte(col>>16), GLubyte(col>>8), GLubyte(col), GLubyte(col>>24)); + _glVertex2f((GLfloat)_Vertices[2*i+0]+dx, (GLfloat)_Vertices[2*i+1]+dy); + } + _glEnd(); + + _glCullFace(prevCullFaceMode); + _glFrontFace(prevFrontFace); + if( prevCullEnable ) + _glEnable(GL_CULL_FACE); + else + _glDisable(GL_CULL_FACE); +} + +// --------------------------------------------------------------------------- diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGL.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGL.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGL.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwOpenGL.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,96 @@ +// --------------------------------------------------------------------------- +// +// @file TwOpenGL.h +// @brief OpenGL graph functions +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// notes: Private header +// TAB=4 +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_OPENGL_INCLUDED +#define ANT_TW_OPENGL_INCLUDED + +#include "TwGraph.h" + +// --------------------------------------------------------------------------- + +class CTwGraphOpenGL : public ITwGraph +{ +public: + virtual int Init(); + virtual int Shut(); + virtual void BeginDraw(int _WndWidth, int _WndHeight); + virtual void EndDraw(); + virtual bool IsDrawing(); + virtual void Restore(); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color0, color32 _Color1, bool _AntiAliased=false); + virtual void DrawLine(int _X0, int _Y0, int _X1, int _Y1, color32 _Color, bool _AntiAliased=false) { DrawLine(_X0, _Y0, _X1, _Y1, _Color, _Color, _AntiAliased); } + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color00, color32 _Color10, color32 _Color01, color32 _Color11); + virtual void DrawRect(int _X0, int _Y0, int _X1, int _Y1, color32 _Color) { DrawRect(_X0, _Y0, _X1, _Y1, _Color, _Color, _Color, _Color); } + virtual void DrawTriangles(int _NumTriangles, int *_Vertices, color32 *_Colors, Cull _CullMode); + + virtual void * NewTextObj(); + virtual void DeleteTextObj(void *_TextObj); + virtual void BuildText(void *_TextObj, const std::string *_TextLines, color32 *_LineColors, color32 *_LineBgColors, int _NbLines, const CTexFont *_Font, int _Sep, int _BgWidth); + virtual void DrawText(void *_TextObj, int _X, int _Y, color32 _Color, color32 _BgColor); + + virtual void ChangeViewport(int _X0, int _Y0, int _Width, int _Height, int _OffsetX, int _OffsetY); + virtual void RestoreViewport(); + virtual void SetScissor(int _X0, int _Y0, int _Width, int _Height); + +protected: + bool m_Drawing; + GLuint m_FontTexID; + const CTexFont * m_FontTex; + GLfloat m_PrevLineWidth; + GLint m_PrevTexEnv; + GLint m_PrevPolygonMode[2]; + GLint m_MaxClipPlanes; + GLint m_PrevTexture; + GLint m_PrevArrayBufferARB; + GLint m_PrevElementArrayBufferARB; + GLboolean m_PrevVertexProgramARB; + GLboolean m_PrevFragmentProgramARB; + GLuint m_PrevProgramObjectARB; + GLboolean m_PrevTexture3D; + enum EMaxTextures { MAX_TEXTURES = 128 }; + GLboolean m_PrevActiveTexture1D[MAX_TEXTURES]; + GLboolean m_PrevActiveTexture2D[MAX_TEXTURES]; + GLboolean m_PrevActiveTexture3D[MAX_TEXTURES]; + GLboolean m_PrevClientTexCoordArray[MAX_TEXTURES]; + GLint m_PrevActiveTextureARB; + GLint m_PrevClientActiveTextureARB; + bool m_SupportTexRect; + GLboolean m_PrevTexRectARB; + GLint m_PrevBlendEquation; + GLint m_PrevBlendEquationRGB; + GLint m_PrevBlendEquationAlpha; + GLint m_PrevBlendSrcRGB; + GLint m_PrevBlendDstRGB; + GLint m_PrevBlendSrcAlpha; + GLint m_PrevBlendDstAlpha; + GLint m_ViewportInit[4]; + GLfloat m_ProjMatrixInit[16]; + int m_WndWidth; + int m_WndHeight; + + struct Vec2 { GLfloat x, y; Vec2(){} Vec2(GLfloat _X, GLfloat _Y):x(_X),y(_Y){} Vec2(int _X, int _Y):x(GLfloat(_X)),y(GLfloat(_Y)){} }; + struct CTextObj + { + std::vector m_TextVerts; + std::vector m_TextUVs; + std::vector m_BgVerts; + std::vectorm_Colors; + std::vectorm_BgColors; + }; +}; + +// --------------------------------------------------------------------------- + + +#endif // !defined ANT_TW_OPENGL_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwPrecomp.cpp ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwPrecomp.cpp --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwPrecomp.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwPrecomp.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1 @@ +#include "TwPrecomp.h" diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwPrecomp.h ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwPrecomp.h --- ode-0.11.1/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwPrecomp.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwPrecomp.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,91 @@ +// --------------------------------------------------------------------------- +// +// @file TwPrecomp.h +// @brief Precompiled header +// @author Philippe Decaudin - http://www.antisphere.com +// @license This file is part of the AntTweakBar library. +// For conditions of distribution and use, see License.txt +// +// note: Private header +// +// --------------------------------------------------------------------------- + + +#if !defined ANT_TW_PRECOMP_INCLUDED +#define ANT_TW_PRECOMP_INCLUDED + + +#if defined _MSC_VER +# pragma warning(disable: 4514) // unreferenced inline function has been removed +# pragma warning(disable: 4710) // function not inlined +# pragma warning(disable: 4786) // template name truncated +# pragma warning(disable: 4530) // exceptions not handled +# define _CRT_SECURE_NO_DEPRECATE // visual 8 secure crt warning +#endif + +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) && _MSC_VER<=1200 +# pragma warning(push, 3) +#endif +#include +#include +#include +#include +#include +#include +#if defined(_MSC_VER) && _MSC_VER<=1200 +# pragma warning(pop) +#endif + +#if defined(_UNIX) || defined(__unix__) +# define ANT_UNIX +# include +# define GLX_GLXEXT_LEGACY +# include +# include +# include +# include +# undef _WIN32 +# undef WIN32 +# undef _WIN64 +# undef WIN64 +# undef _WINDOWS +# undef ANT_WINDOWS +# undef ANT_OSX +#elif defined(_MACOSX) +# define ANT_OSX +# include +# include +# include +# include +# undef _WIN32 +# undef WIN32 +# undef _WIN64 +# undef WIN64 +# undef _WINDOWS +# undef ANT_WINDOWS +# undef ANT_UNIX +#elif defined(_WINDOWS) || defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64) +# define ANT_WINDOWS +# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +# include +# include +#endif + +#if !defined(ANT_OGL_HEADER_INCLUDED) +# if defined(ANT_OSX) +# include +# else +# include // must be included after windows.h +# endif +# define ANT_OGL_HEADER_INCLUDED +#endif + +#endif // !defined ANT_TW_PRECOMP_INCLUDED diff -Nru ode-0.11.1/contrib/InteractiveCollisions/deps/Makefile.am ode-0.14/contrib/InteractiveCollisions/deps/Makefile.am --- ode-0.11.1/contrib/InteractiveCollisions/deps/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/deps/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,2 @@ +SUBDIRS = AntTweakBar + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/INSTALL ode-0.14/contrib/InteractiveCollisions/INSTALL --- ode-0.11.1/contrib/InteractiveCollisions/INSTALL 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/INSTALL 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,365 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008, 2009 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/Makefile.am ode-0.14/contrib/InteractiveCollisions/Makefile.am --- ode-0.11.1/contrib/InteractiveCollisions/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,5 @@ +SUBDIRS = deps src + +EXTRA_DIST = bootstrap + + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/NEWS ode-0.14/contrib/InteractiveCollisions/NEWS --- ode-0.11.1/contrib/InteractiveCollisions/NEWS 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/NEWS 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1 @@ +2011-11-13 Basic functionality implemented (Sphere, Box, Capsule) diff -Nru ode-0.11.1/contrib/InteractiveCollisions/README ode-0.14/contrib/InteractiveCollisions/README --- ode-0.11.1/contrib/InteractiveCollisions/README 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/README 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,8 @@ +This is a simple tool to test pairs of ODE geoms. + +It uses AntTweakBar for the GUI. + +Dependencies are currently GLFW, but other backends (SDL, GLUT, etc) +can be easily implemented, that part of the code is only used to open +a windows and get mouse and keyboard events. + diff -Nru ode-0.11.1/contrib/InteractiveCollisions/src/camera.cpp ode-0.14/contrib/InteractiveCollisions/src/camera.cpp --- ode-0.11.1/contrib/InteractiveCollisions/src/camera.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/src/camera.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,222 @@ +#include +#include +#include +#include + +#include +#include + +#include "camera.hpp" + + +using std::clog; +using std::endl; + +Camera::Camera() : + fov(50), + aspect(1), + znear(.01), + zfar(50), + width(0), + height(0), + window_x(0), + window_y(0) +{ + reset(); +} + + +void +Camera::transform_proj() const +{ + glLoadIdentity(); + gluPerspective(fov, aspect, znear, zfar); +} + +void +Camera::transform_model() const +{ + glLoadIdentity(); + gluLookAt(x, y, z, tx, ty, tz, up[0], up[1], up[2]); +} + + + +void +Camera::reset() +{ + x = 0; + y = 0; + z = 0; + tx = 0; + ty = 0; + tz = 0; + up[0] = 0; + up[1] = 1; + up[2] = 0; + right[0] = 1; + right[1] = 0; + right[2] = 0; +} + + + +void +Camera::reshape(int w, int h) +{ + aspect = float(w)/h; + width = w; + height = h; +} + + +float +Camera::normx(int x) const +{ + return (2.0*(x-window_x)) / width - 1.0; +} + +float +Camera::normy(int y) const +{ + return -((2.0*(y-window_y)) / height - 1.0); +} + + +void +Camera::press(int x, int y) +{ + old_x = normx(x); + old_y = normy(y); +} + + + +float +Camera::to_sphere_z(float r, float x, float y) +{ + float delta = x*x + y*y; + if (delta > r*r) + return 0; + else + return std::sqrt(r*r - delta); +} + + +void showm(dMatrix3 m) +{ + for (int i=0; i<3; ++i) { + for (int j=0; j<3; ++j) + clog << " " << std::setw(12) << m[i*4 + j]; + clog << endl; + } + clog << endl; +} + +void showv(dVector3 v) +{ + for (int i=0; i<3; ++i) + clog << " " << std::setw(12) << v[i]; + clog << endl << endl; +} + + + +void +Camera::arcball(int mx, int my) +{ + const float radius = 2; + + float new_x, new_y; + new_x = normx(mx); + new_y = normy(my); + + float old_z, new_z; + old_z = to_sphere_z(radius, old_x, old_y); + new_z = to_sphere_z(radius, new_x, new_y); + + dVector3 m = { old_x, old_y, old_z }; + dVector3 n = { new_x, new_y, new_z }; + + //std::clog << "old: " << old_x << " , " << old_y << std::endl; + //std::clog << "new: " << new_x << " , " << new_y << std::endl; + old_x = new_x; + old_y = new_y; + + + dNormalize3(m); + dNormalize3(n); + + // axis of rotation r is along m cross n + dVector3 r; + dCROSS(r, =, m, n); + float s = dLENGTH(r); + s = std::min(1.f, std::max(-1.f, s)); + float angle = std::asin(s); + + // build the local matrix + dVector3 f = {x-tx, y-ty, z-tz}; + dNormalize3(f); + //showv(f); + dCROSS(right, =, up, f); + dNormalize3(right); + dCROSS(up, =, f, right); + dNormalize3(up); + dMatrix3 localR = { + right[0], right[1], right[2], 0, + up[0], up[1], up[2], 0, + f[0], f[1], f[2] + }; + //showm(localR); + + // bring the axis to global coordinates + dVector3 global_r; + dMultiply1_331(global_r, localR, r); + dMatrix3 R; + dRFromAxisAndAngle(R, global_r[0], global_r[1], global_r[2], -2*angle); + + // we re-position the camera, maintaining the distance + dVector3 p = { x, y, z }; + dVector3 t = { tx, ty, tz }; + dVector3 d; + dSubtractVectors3(d, p, t); // d = p - t + dVector3 nd; + dMultiply0_331(nd, R, d); + x = nd[0] + tx; + y = nd[1] + ty; + z = nd[2] + tz; + + dVector3 nup; + dMultiply0_331(nup, R, up); + dCopyVector3(up, nup); + dNormalize3(up); + + dVector3 nright; + dMultiply0_331(nright, R, right); + dCopyVector3(right, nright); + dNormalize3(right); +} + + +double +Camera::dist() const +{ + double dx = tx - x; + double dy = ty - y; + double dz = tz - z; + return std::sqrt(dx*dx + dy*dy + dz*dz); +} + +void +Camera::zoom(float d) +{ + double dx = x - tx; + double dy = y - ty; + double dz = z - tz; + dx *= d; + dy *= d; + dz *= d; + x = tx + dx; + y = ty + dy; + z = tz + dz; +} diff -Nru ode-0.11.1/contrib/InteractiveCollisions/src/camera.hpp ode-0.14/contrib/InteractiveCollisions/src/camera.hpp --- ode-0.11.1/contrib/InteractiveCollisions/src/camera.hpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/src/camera.hpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,47 @@ +#ifndef CAMERA_H +#define CAMERA_H + +#include + +/* + Simple implementatino of a camera that orbits the origin + */ + + +struct Camera { + + float fov, aspect, + znear, zfar; + + float x, y, z; // eye pos + float tx, ty, tz; // target + dVector3 up; + dVector3 right; + + int width, height, window_x, window_y; + + + Camera(); + void transform_proj() const; + void transform_model() const; + + void reshape(int w, int h); + + void press(int x, int y); + void arcball(int x, int y); + + double dist() const; + + void zoom(float d); // >1 to zoom out, <1 to zoom in + +private: + float old_x, old_y; + + void reset(); + float normx(int x) const; + float normy(int y) const; + + float to_sphere_z(float r, float x, float y); +}; + +#endif diff -Nru ode-0.11.1/contrib/InteractiveCollisions/src/main.cpp ode-0.14/contrib/InteractiveCollisions/src/main.cpp --- ode-0.11.1/contrib/InteractiveCollisions/src/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/InteractiveCollisions/src/main.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,979 @@ +#include +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + + +#include + +#include + +#if USE_GLFW +#include +#endif + +#include +#include + + +#include "camera.hpp" + + +using std::cout; +using std::cerr; +using std::clog; +using std::endl; + + + +TwBar *left_bar = 0; +TwBar *right_bar = 0; + + +float left_x=-1, left_y=0, left_z=0; +float left_quat[4] = {0, 0, 0, 1}; // x y z w + +float right_x=1, right_y=0, right_z=0; +float right_quat[4] = {0, 0, 0, 1}; // x y z w + +int left_geom_type = 0; +int right_geom_type = 0; + +// left +float left_sphere_radius = 1; +float left_box_width = 1; +float left_box_height = 1; +float left_box_depth = 1; +float left_capsule_radius = 1; +float left_capsule_length = 1; + +float right_sphere_radius = 1; +float right_box_width = 1; +float right_box_height = 1; +float right_box_depth = 1; +float right_capsule_radius = 1; +float right_capsule_length = 1; + + +struct Color { + float r, g, b, a; + Color() : + r(0), g(0), b(0), a(0) + {} + + Color(float x, float y, float z, float w=1.0) : + r(x), g(y), b(z), a(w) + {} +}; + +Color left_fill, + left_wire, + right_fill, + right_wire, + contact_p, + contact_d, + contact_n; + + +dGeomID left_geom=0, right_geom=0; + +Camera cam; + +enum GeomType { Sphere, Box, Capsule }; + + + +void draw(); + + +void left_update_position(); +void right_update_position(); + + +#if USE_GLFW +void GLFWCALL mouse_moved(int x, int y); +void GLFWCALL mouse_button(int button, int action); +void GLFWCALL mouse_wheel(int pos); + +void GLFWCALL resize(int width, int height) +{ + // Set OpenGL viewport and camera + glViewport(0, 0, width, height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(40, (double)width/height, 1, 10); + gluLookAt(-1,0,3, 0,0,0, 0,1,0); + + + cam.reshape(width, height); + + // Send the new window size to AntTweakBar + TwWindowSize(width, height); +} + +void init_gl() +{ + if (!glfwInit()) { + cerr << "Failed to initialize GLFW" << endl; + exit(EXIT_FAILURE); + } + std::atexit(glfwTerminate); + + if (!glfwOpenWindow(1024, 768, + 0,0,0,0, + 16, // depth + 0, // stencil + GLFW_WINDOW)) { + exit(EXIT_FAILURE); + } + + glfwEnable(GLFW_MOUSE_CURSOR); + glfwEnable(GLFW_KEY_REPEAT); + glfwSetWindowTitle("ODE collision test environment"); + + // Initialize AntTweakBar + TwInit(TW_OPENGL, NULL); + + // Set GLFW event callbacks + // - Redirect window size changes to the callback function WindowSizeCB + glfwSetWindowSizeCallback(resize); + + glfwSetMouseButtonCallback(mouse_button); + + glfwSetMousePosCallback(mouse_moved); + + glfwSetMouseWheelCallback((GLFWmousewheelfun)mouse_wheel); + // - Directly redirect GLFW key events to AntTweakBar + glfwSetKeyCallback((GLFWkeyfun)TwEventKeyGLFW); + // - Directly redirect GLFW char events to AntTweakBar + glfwSetCharCallback((GLFWcharfun)TwEventCharGLFW); + + + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +} + +void loop() +{ + bool running = true; + + while (running) { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + draw(); + + TwDraw(); + + glfwSwapBuffers(); + + running = glfwGetWindowParam(GLFW_OPENED) && !glfwGetKey(GLFW_KEY_ESC); + } +} + +static bool left_dragging = false; +static bool right_dragging = false; +static bool left_dragging_geom = false; +static bool right_dragging_geom = false; + +static int prev_x = 0; +static int prev_y = 0; + +void GLFWCALL mouse_moved(int x, int y) +{ + int dx = x - prev_x; + int dy = y - prev_y; + + // don't let Tw eat the events if we are doing something + if (!right_dragging && !left_dragging && !left_dragging_geom && !right_dragging_geom) + TwEventMousePosGLFW(x, y); + else { + if (right_dragging) { + cam.arcball(x, y); + } + if (left_dragging) { + float s = 0.001*cam.dist(); + cam.tx += s*(-dx * cam.right[0] + dy*cam.up[0]); + cam.ty += s*(-dx * cam.right[1] + dy*cam.up[1]); + cam.tz += s*(-dx * cam.right[2] + dy*cam.up[2]); + } + if (left_dragging_geom) { + float s = 0.001*cam.dist(); + left_x += s*(dx * cam.right[0] - dy*cam.up[0]); + left_y += s*(dx * cam.right[1] - dy*cam.up[1]); + left_z += s*(dx * cam.right[2] - dy*cam.up[2]); + left_update_position(); + } + if (right_dragging_geom) { + float s = 0.001*cam.dist(); + right_x += s*(dx * cam.right[0] - dy*cam.up[0]); + right_y += s*(dx * cam.right[1] - dy*cam.up[1]); + right_z += s*(dx * cam.right[2] - dy*cam.up[2]); + right_update_position(); + } + } + prev_x = x; + prev_y = y; +} + +void GLFWCALL mouse_button(int button, int action) +{ + int x, y; + glfwGetMousePos(&x, &y); + + int handled = TwEventMouseButtonGLFW(button, action); + if (!handled) { + if (button == GLFW_MOUSE_BUTTON_RIGHT && action == GLFW_PRESS) { + cam.press(x, y); + right_dragging = true; + } + if (button == GLFW_MOUSE_BUTTON_RIGHT && action == GLFW_RELEASE) { + right_dragging = false; + } + + if (button == GLFW_MOUSE_BUTTON_LEFT && action == GLFW_PRESS) { + + GLdouble model[16]; + GLdouble proj[16]; + GLint viewport[4]; + glGetDoublev(GL_MODELVIEW_MATRIX, model); + glGetDoublev(GL_PROJECTION_MATRIX, proj); + glGetIntegerv(GL_VIEWPORT, viewport); + GLdouble ox, oy, oz; + + if (gluUnProject(x, viewport[3] - y, 0, model, proj, viewport, &ox, &oy, &oz) == GLU_TRUE) { + double dx, dy, dz; + dx = ox - cam.x; + dy = oy - cam.y; + dz = oz - cam.z; + + dGeomID ray = dCreateRay(0, 100); + dGeomRaySet(ray, cam.x, cam.y, cam.z, dx, dy, dz); + dContactGeom left_contact, right_contact; + int leftn, rightn; + leftn = dCollide(ray, left_geom, 1, &left_contact, sizeof left_contact); + rightn = dCollide(ray, right_geom, 1, &right_contact, sizeof right_contact); + if (leftn && !rightn) + left_dragging_geom = true; + if (rightn && !leftn) + right_dragging_geom = true; + if (leftn && rightn) { + if (left_contact.depth < right_contact.depth) + left_dragging_geom = true; + else + right_dragging_geom = true; + } + + dGeomDestroy(ray); + + } + if (!left_dragging_geom && !right_dragging_geom) + left_dragging = true; + } + if (button == GLFW_MOUSE_BUTTON_LEFT && action == GLFW_RELEASE) { + left_dragging = false; + left_dragging_geom = false; + right_dragging_geom = false; + } + } +} + +static int prev_wheel = 0; +void GLFWCALL mouse_wheel(int pos) +{ + if (!TwEventMouseWheelGLFW(pos)) { + int delta = pos - prev_wheel; + + // set the camera zoom + if (delta > 0) + cam.zoom(1.1); + if (delta < 0) + cam.zoom(1/1.1); + } + prev_wheel = pos; +} + + + +#else +void init_gl() +{} + +void loop() +{} +#endif + + + + +// generic getters +void TW_CALL get_float(void *value, void *data) +{ + float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *v = *d; +} + +void TW_CALL get_int(void *value, void *data) +{ + int *v = reinterpret_cast(value); + int *d = reinterpret_cast(data); + *v = *d; +} + + +void enable_sphere(TwBar *bar) +{ + TwSetParam(bar, "SphereRadius", "visible", TW_PARAM_CSTRING, 1, "true"); +} + +void disable_sphere(TwBar *bar) +{ + TwSetParam(bar, "SphereRadius", "visible", TW_PARAM_CSTRING, 1, "false"); +} + +void enable_box(TwBar *bar) +{ + TwSetParam(bar, "BoxWidth", "visible", TW_PARAM_CSTRING, 1, "true"); + TwSetParam(bar, "BoxHeight", "visible", TW_PARAM_CSTRING, 1, "true"); + TwSetParam(bar, "BoxDepth", "visible", TW_PARAM_CSTRING, 1, "true"); +} + +void disable_box(TwBar *bar) +{ + TwSetParam(bar, "BoxWidth", "visible", TW_PARAM_CSTRING, 1, "false"); + TwSetParam(bar, "BoxHeight", "visible", TW_PARAM_CSTRING, 1, "false"); + TwSetParam(bar, "BoxDepth", "visible", TW_PARAM_CSTRING, 1, "false"); +} + +void enable_capsule(TwBar *bar) +{ + TwSetParam(bar, "CapsuleRadius", "visible", TW_PARAM_CSTRING, 1, "true"); + TwSetParam(bar, "CapsuleLength", "visible", TW_PARAM_CSTRING, 1, "true"); +} + +void disable_capsule(TwBar *bar) +{ + TwSetParam(bar, "CapsuleRadius", "visible", TW_PARAM_CSTRING, 1, "false"); + TwSetParam(bar, "CapsuleLength", "visible", TW_PARAM_CSTRING, 1, "false"); +} + + +void left_update_position() +{ + if (left_geom) + dGeomSetPosition(left_geom, left_x, left_y, left_z); +} + +void right_update_position() +{ + if (right_geom) + dGeomSetPosition(right_geom, right_x, right_y, right_z); +} + +void left_update_quat() +{ + if (left_geom) { + dQuaternion q = {left_quat[3], left_quat[0], left_quat[1], left_quat[2]}; + dGeomSetQuaternion(left_geom, q); + } +} + +void right_update_quat() +{ + if (right_geom) { + dQuaternion q = {right_quat[3], right_quat[0], right_quat[1], right_quat[2]}; + dGeomSetQuaternion(right_geom, q); + } +} + +void choose_left_geom(int type); +void choose_right_geom(int type); + + +void TW_CALL left_set_geom_type(const void *value, void *data) +{ + const int *v = reinterpret_cast(value); + int *d = reinterpret_cast(data); + *d = *v; + + choose_left_geom(*d); +} + +void TW_CALL right_set_geom_type(const void *value, void *data) +{ + const int *v = reinterpret_cast(value); + int *d = reinterpret_cast(data); + *d = *v; + + choose_right_geom(*d); +} + + +void TW_CALL left_set_val(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + left_update_position(); +} + +void TW_CALL right_set_val(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + right_update_position(); +} + +void TW_CALL left_set_quat(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d++ = *v++; + *d++ = *v++; + *d++ = *v++; + *d++ = *v++; + + left_update_quat(); +} + +void TW_CALL right_set_quat(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d++ = *v++; + *d++ = *v++; + *d++ = *v++; + *d++ = *v++; + + right_update_quat(); +} + +void TW_CALL get_quat(void *value, void *data) +{ + float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *v++ = *d++; + *v++ = *d++; + *v++ = *d++; + *v++ = *d++; +} + + + + + +void TW_CALL left_sphere_set_radius(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + dGeomSphereSetRadius(left_geom, left_sphere_radius); +} + +void TW_CALL right_sphere_set_radius(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + dGeomSphereSetRadius(right_geom, right_sphere_radius); +} + + + +void TW_CALL left_box_set_size(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + dGeomBoxSetLengths(left_geom, left_box_width, left_box_height, left_box_depth); +} + +void TW_CALL right_box_set_size(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + dGeomBoxSetLengths(right_geom, right_box_width, right_box_height, right_box_depth); +} + + +void TW_CALL left_capsule_set_radius(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + dGeomCapsuleSetParams(left_geom, left_capsule_radius, left_capsule_length); +} + +void TW_CALL left_capsule_set_length(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + dGeomCapsuleSetParams(left_geom, left_capsule_radius, left_capsule_length); +} + +void TW_CALL right_capsule_set_radius(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + dGeomCapsuleSetParams(right_geom, right_capsule_radius, right_capsule_length); +} + +void TW_CALL right_capsule_set_length(const void *value, void *data) +{ + const float *v = reinterpret_cast(value); + float *d = reinterpret_cast(data); + *d = *v; + + dGeomCapsuleSetParams(right_geom, right_capsule_radius, right_capsule_length); +} + + + + +void choose_left_geom(int g) +{ + if (left_geom) { + dGeomDestroy(left_geom); + left_geom = 0; + } + + // TODO: update ODE geom + if (g == Sphere) { + enable_sphere(left_bar); + left_geom = dCreateSphere(0, left_sphere_radius); + } else + disable_sphere(left_bar); + + if (g == Box) { + enable_box(left_bar); + left_geom = dCreateBox(0, left_box_width, left_box_height, left_box_depth); + } else + disable_box(left_bar); + + if (g == Capsule) { + enable_capsule(left_bar); + left_geom = dCreateCapsule(0, left_capsule_radius, left_capsule_length); + } else + disable_capsule(left_bar); + + + left_update_position(); + left_update_quat(); +} + +void choose_right_geom(int g) +{ + if (right_geom) { + dGeomDestroy(right_geom); + right_geom = 0; + } + + // TODO: update ODE geom + if (g == Sphere) { + enable_sphere(right_bar); + right_geom = dCreateSphere(0, right_sphere_radius); + } else + disable_sphere(right_bar); + + if (g == Box) { + enable_box(right_bar); + right_geom = dCreateBox(0, right_box_width, right_box_height, right_box_depth); + } else + disable_box(right_bar); + + if (g == Capsule) { + enable_capsule(right_bar); + right_geom = dCreateCapsule(0, right_capsule_radius, right_capsule_length); + } else + disable_capsule(right_bar); + + + right_update_position(); + right_update_quat(); +} + + + +void TW_CALL reset_camera(void*) +{ + cam.x = 0; + cam.y = 0; + cam.z = 8; + cam.tx = 0; + cam.ty = 0; + cam.tz = 0; + + cam.up[0] = 0; + cam.up[1] = 1; + cam.up[2] = 0; + + cam.right[0] = 1; + cam.right[1] = 0; + cam.right[2] = 0; +} + +void TW_CALL reset_geoms(void*) +{ + choose_left_geom(Sphere); + choose_right_geom(Sphere); + left_x = -1; + left_y = 0; + left_z = 0; + right_x = 1; + right_y = 0; + right_z = 0; + left_quat[0] = 1; + left_quat[1] = 0; + left_quat[2] = 0; + left_quat[3] = 0; + right_quat[0] = 1; + right_quat[1] = 0; + right_quat[2] = 0; + right_quat[3] = 0; + + left_update_position(); + left_update_quat(); + right_update_position(); + right_update_quat(); +} + + + + + +void init_ui() +{ + TwBar *bar = TwNewBar("Controls"); + + TwAddButton(bar, "ResetCamera", reset_camera, 0, "label='Reset camera'"); + TwAddButton(bar, "ResetGeoms", reset_geoms, 0, "label='Reset geoms'"); + + TwType gtype = TwDefineEnumFromString("GeomType", "Sphere,Box,Capsule"); + + left_bar = TwNewBar("Left"); + + TwAddVarCB(left_bar, "Geom", gtype, left_set_geom_type, get_int, &left_geom_type, NULL); + + TwSetParam(left_bar, NULL, "position", TW_PARAM_CSTRING, 1, "50 50"); + + TwAddVarCB(left_bar, "X", TW_TYPE_FLOAT, left_set_val, get_float, &left_x, "min=-100 max=100 step=0.01"); + TwAddVarCB(left_bar, "Y", TW_TYPE_FLOAT, left_set_val, get_float, &left_y, "min=-100 max=100 step=0.01"); + TwAddVarCB(left_bar, "Z", TW_TYPE_FLOAT, left_set_val, get_float, &left_z, "min=-100 max=100 step=0.01"); + TwAddVarCB(left_bar, "Quat", TW_TYPE_QUAT4F, left_set_quat, get_quat, left_quat, "showval=true opened=true"); + + TwAddVarCB(left_bar, "SphereRadius", TW_TYPE_FLOAT, left_sphere_set_radius, get_float, &left_sphere_radius, " min=0.001 max=100 step=0.01 visible=false"); + + TwAddVarCB(left_bar, "BoxWidth", TW_TYPE_FLOAT, left_box_set_size, get_float, &left_box_width, " min=0.001 max=100 step=0.01 visible=false"); + TwAddVarCB(left_bar, "BoxHeight", TW_TYPE_FLOAT, left_box_set_size, get_float, &left_box_height, " min=0.001 max=100 step=0.01 visible=false"); + TwAddVarCB(left_bar, "BoxDepth", TW_TYPE_FLOAT, left_box_set_size, get_float, &left_box_depth, " min=0.001 max=100 step=0.01 visible=false"); + + TwAddVarCB(left_bar, "CapsuleRadius", TW_TYPE_FLOAT, left_capsule_set_radius, get_float, &left_capsule_radius, " min=0.001 max=100 step=0.01 visible=false"); + TwAddVarCB(left_bar, "CapsuleLength", TW_TYPE_FLOAT, left_capsule_set_length, get_float, &left_capsule_length, " min=0.001 max=100 step=0.01 visible=false"); + +#if 1 + right_bar = TwNewBar("Right"); + + TwAddVarCB(right_bar, "Geom", gtype, right_set_geom_type, get_int, &right_geom_type, NULL); + + TwSetParam(right_bar, NULL, "position", TW_PARAM_CSTRING, 1, "650 50"); + + TwAddVarCB(right_bar, "X", TW_TYPE_FLOAT, right_set_val, get_float, &right_x, "min=-100 max=100 step=0.01"); + TwAddVarCB(right_bar, "Y", TW_TYPE_FLOAT, right_set_val, get_float, &right_y, "min=-100 max=100 step=0.01"); + TwAddVarCB(right_bar, "Z", TW_TYPE_FLOAT, right_set_val, get_float, &right_z, "min=-100 max=100 step=0.01"); + TwAddVarCB(right_bar, "Quat", TW_TYPE_QUAT4F, right_set_quat, get_quat, right_quat, "showval=true opened=true"); + + + TwAddVarCB(right_bar, "SphereRadius", TW_TYPE_FLOAT, right_sphere_set_radius, get_float, &right_sphere_radius, " min=0.001 max=100 step=0.01 visible=false"); + + TwAddVarCB(right_bar, "BoxWidth", TW_TYPE_FLOAT, right_box_set_size, get_float, &right_box_width, " min=0.001 max=100 step=0.01 visible=false"); + TwAddVarCB(right_bar, "BoxHeight", TW_TYPE_FLOAT, right_box_set_size, get_float, &right_box_height, " min=0.001 max=100 step=0.01 visible=false"); + TwAddVarCB(right_bar, "BoxDepth", TW_TYPE_FLOAT, right_box_set_size, get_float, &right_box_depth, " min=0.001 max=100 step=0.01 visible=false"); + + TwAddVarCB(right_bar, "CapsuleRadius", TW_TYPE_FLOAT, right_capsule_set_radius, get_float, &right_capsule_radius, " min=0.001 max=100 step=0.01 visible=false"); + TwAddVarCB(right_bar, "CapsuleLength", TW_TYPE_FLOAT, right_capsule_set_length, get_float, &right_capsule_length, " min=0.001 max=100 step=0.01 visible=false"); +#endif +} + + +void draw_sphere(float radius, Color fill, Color wire) +{ + const int stacks = std::max(16, int(radius * 16)); + const int slices = std::max(32, int(radius * 32)); + + GLUquadric* q = gluNewQuadric(); + + gluQuadricDrawStyle(q, GLU_FILL); + + glColor4f(fill.r, fill.g, fill.b, fill.a); + gluSphere(q, radius, slices, stacks); + + gluQuadricDrawStyle(q, GLU_LINE); + + glColor4f(wire.r, wire.g, wire.b, wire.a); + gluSphere(q, radius, slices, stacks); + + gluDeleteQuadric(q); +} + + +void draw_box_face(float w, float h, float d, + Color fill, Color wire) +{ + const int partsw = std::max(2, int(w*4)); + const int partsh = std::max(2, int(h*4)); + + glLineWidth(1); + + glBegin(GL_QUADS); + glColor4f(fill.r, fill.g, fill.b, fill.a); + glVertex3f(-w/2, -h/2, d/2); + glVertex3f( w/2, -h/2, d/2); + glVertex3f( w/2, h/2, d/2); + glVertex3f(-w/2, h/2, d/2); + glEnd(); + + glBegin(GL_LINES); + glColor4f(wire.r, wire.g, wire.b, wire.a); + for (int i=0; i<=partsw; ++i) { // vertical lines + glVertex3f(-w/2 + i*w/partsw, -h/2, d/2); + glVertex3f(-w/2 + i*w/partsw, h/2, d/2); + } + for (int i=0; i<=partsh; ++i) { // horizontal lines + glVertex3f(-w/2, -h/2+i*h/partsh, d/2); + glVertex3f( w/2, -h/2+i*h/partsh, d/2); + } + glEnd(); +} + +void draw_box(float w, float h, float d, Color fill, Color wire) +{ + draw_box_face(w, h, d, fill, wire); + + glPushMatrix(); + glRotatef(90, 0, 1, 0); + draw_box_face(d, h, w, fill, wire); + glPopMatrix(); + + glPushMatrix(); + glRotatef(180, 0, 1, 0); + draw_box_face(w, h, d, fill, wire); + glPopMatrix(); + + glPushMatrix(); + glRotatef(270, 0, 1, 0); + draw_box_face(d, h, w, fill, wire); + glPopMatrix(); + + glPushMatrix(); + glRotatef(90, 1, 0, 0); + draw_box_face(w, d, h, fill, wire); + glPopMatrix(); + + glPushMatrix(); + glRotatef(270, 1, 0, 0); + draw_box_face(w, d, h, fill, wire); + glPopMatrix(); +} + + +void draw_cylinder(float radius, float length, Color fill, Color wire) +{ + GLUquadric *q = gluNewQuadric(); + + const int stacks = std::max(2, int(length*4)); + const int slices = std::max(32, int(radius * 32)); + + glPushMatrix(); + glTranslatef(0, 0, -length/2); + + gluQuadricDrawStyle(q, GLU_FILL); + glColor4f(fill.r, fill.g, fill.b, fill.a); + gluCylinder(q, radius, radius, length, slices, stacks); + + gluQuadricDrawStyle(q, GLU_LINE); + glColor4f(wire.r, wire.g, wire.b, wire.a); + gluCylinder(q, radius, radius, length, slices, stacks); + + glPopMatrix(); + + gluDeleteQuadric(q); +} + + + + +void draw_capsule(float radius, float length, Color fill, Color wire) +{ + draw_cylinder(radius, length, fill, wire); + + glEnable(GL_CLIP_PLANE0); + + glPushMatrix(); + glTranslatef(0, 0, length/2); + + GLdouble plane[4] = {0, 0, 1, 0}; + glClipPlane(GL_CLIP_PLANE0, plane); + draw_sphere(radius, fill, wire); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(0, 0, -length/2); + plane[2] = -1; + glClipPlane(GL_CLIP_PLANE0, plane); + draw_sphere(radius, fill, wire); + glPopMatrix(); + + glDisable(GL_CLIP_PLANE0); +} + + + + +void draw_geom(dGeomID geom, Color fill, Color wire) +{ + if (!geom) + return; + + glPushMatrix(); + const dReal *p = dGeomGetPosition(geom); + const dReal *r = dGeomGetRotation(geom); + GLfloat m[16] = { + r[0], r[4], r[8], 0, + r[1], r[5], r[9], 0, + r[2], r[6], r[10], 0, + p[0], p[1], p[2], 1 + }; + glMultMatrixf(m); + + glLineWidth(1); + + int c = dGeomGetClass(geom); + switch (c) { + case dSphereClass: + { + float r = dGeomSphereGetRadius(geom); + draw_sphere(r, fill, wire); + break; + } + case dBoxClass: + { + dVector3 lengths; + dGeomBoxGetLengths(geom, lengths); + draw_box(lengths[0], lengths[1], lengths[2], fill, wire); + break; + } + case dCapsuleClass: + { + dReal radius, length; + dGeomCapsuleGetParams(geom, &radius, &length); + draw_capsule(radius, length, fill, wire); + break; + } + } + + glPopMatrix(); +} + + +void draw_contact(const dContactGeom& c, Color p, Color d, Color n) +{ + glPointSize(5); + glBegin(GL_POINTS); + glColor4f(p.r, p.g, p.b, p.a); + glVertex3f(c.pos[0], c.pos[1], c.pos[2]); + glEnd(); + + const float scale = c.depth; + + glLineWidth(3); + glBegin(GL_LINES); + glColor4f(d.r, d.g, d.b, d.a); + glVertex3f(c.pos[0], c.pos[1], c.pos[2]); + glVertex3f(c.pos[0]+c.normal[0]*scale, c.pos[1]+c.normal[1]*scale, c.pos[2]+c.normal[2]*scale); + glEnd(); + + const float cscale = cam.dist() * 0.125; + + glLineWidth(1); + glBegin(GL_LINES); + glColor4f(n.r, n.g, n.b, n.a); + glVertex3f(c.pos[0], c.pos[1], c.pos[2]); + glVertex3f(c.pos[0]+c.normal[0]*cscale, c.pos[1]+c.normal[1]*cscale, c.pos[2]+c.normal[2]*cscale); + glEnd(); +} + + +void draw_contacts() +{ + if (!left_geom || !right_geom) + return; + + const int max_contacts = 32; + dContactGeom dg[max_contacts]; + + int n = dCollide(left_geom, right_geom, max_contacts, &dg[0], sizeof(dContactGeom)); + for (int i=0; i +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include "internal.h" + + +//*************************************************************************** +// error handling for unix (works just fine with SIOUX) + +static void printMessage (char *msg1, char *msg2, va_list ap) +{ + fflush (stderr); + fflush (stdout); + fprintf (stderr,"\n%s: ",msg1); + vfprintf (stderr,msg2,ap); + fprintf (stderr,"\n"); + fflush (stderr); +} + +extern "C" void dsError (char *msg, ...) +{ + va_list ap; + va_start (ap,msg); + printMessage ("Error",msg,ap); + va_end (ap); + exit (1); +} + + +extern "C" void dsDebug (char *msg, ...) +{ + va_list ap; + va_start (ap,msg); + printMessage ("INTERNAL ERROR",msg,ap); + va_end (ap); + // *((char *)0) = 0; ... commit SEGVicide ? + abort(); +} + +extern "C" void dsPrint (char *msg, ...) +{ + va_list ap; + va_start (ap,msg); + vprintf (msg,ap); + va_end (ap); +} + +//*************************************************************************** +// openGL window + +// window and openGL +static int width=0,height=0; // window size +static int last_key_pressed=0; // last key pressed in the window +static int pause=0; // 1 if in `pause' mode +static int singlestep=0; // 1 if single step key pressed +static int writeframes=0; // 1 if frame files to be written +static dsFunctions *gfn; +static int frame = 1; + +float getTime (void) +{ + UnsignedWide ms; + + Microseconds(&ms); + return ms.lo / 1000000.0; +} + + +static void captureFrame (int num) +{ +// TODO +} + +static void reshape(int w, int h) +{ + width = w; + height = h; +} + +static void draw(void) +{ + dsDrawFrame (width,height,gfn,pause && !singlestep); + singlestep = 0; + glutSwapBuffers(); + + if (pause==0 && writeframes) { + captureFrame (frame); + frame++; + } +} + +static void idle(void) +{ + static float lasttime=0; + float t; + + // Try to maintain a reasonable rate (good enough for testing anyway) + t = getTime(); + if (lasttime < t) { + lasttime = t+0.005; + draw(); + } +} + +static void key(unsigned char key, int x, int y) +{ + if (!glutGetModifiers()) { + + if (key >= ' ' && key <= 126 && gfn->command) gfn->command (key); + + // GLUT_ACTIVE_CTRL doesn't seem to be working, so we use Alt + } else if (glutGetModifiers()&GLUT_ACTIVE_ALT) { + + switch (key) { + case 't': case 'T': + dsSetTextures (dsGetTextures() ^ 1); + break; + case 's': case 'S': + dsSetShadows (dsGetShadows() ^ 1); + break; + case 'p': case 'P': + pause ^= 1; + singlestep = 0; + break; + case 'o': case 'O': + if (pause) singlestep = 1; + break; + case 'v': case 'V': { + float xyz[3],hpr[3]; + dsGetViewpoint (xyz,hpr); + printf ("Viewpoint = (%.4f,%.4f,%.4f,%.4f,%.4f,%.4f)\n", + xyz[0],xyz[1],xyz[2],hpr[0],hpr[1],hpr[2]); + break; + } + // No case 'X' - Quit works through the Mac system menu, or cmd-q + case 'w': case 'W': + writeframes ^= 1; + if (writeframes) printf ("Write frames not done yet!\n");// TODO + break; + } + } + + last_key_pressed = key; +} + +static int mx=0,my=0; // mouse position +static int mode = 0; // mouse button bits + +static void MouseDown(int button, int state, int x, int y) +{ + if(button == GLUT_LEFT_BUTTON) + { + if(state == GLUT_DOWN) + mode |= 1; + else if(state == GLUT_UP) + mode &= (~1); + } + else if (button == GLUT_MIDDLE_BUTTON) + { + if(state == GLUT_DOWN) + mode |= 3; + else if(state == GLUT_UP) + mode &= (~3); + } + else if (button == GLUT_RIGHT_BUTTON) + { + if(state == GLUT_DOWN) + mode |= 2; + else if(state == GLUT_UP) + mode &= (~2); + } + + mx = x; + my = y; +} + +static void MouseMove(int x, int y) +{ + dsMotion (mode, x - mx, y - my); + mx = x; + my = y; +} + +static void createMainWindow (int _width, int _height) +{ + // So GLUT doesn't complain + int argc = 0; + char **argv = NULL; + + // initialize variables + width = _width; + height = _height; + last_key_pressed = 0; + + if (width < 1 || height < 1) dsDebug (0,"bad window width or height"); + + glutInit(&argc, argv); + glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); + glutInitWindowSize(_width, _height); + glutInitWindowPosition(100, 100); + glutCreateWindow("ODE Simulation"); + + glutKeyboardFunc(key); + glutMotionFunc(MouseMove); + glutMouseFunc(MouseDown); + glutReshapeFunc(reshape); + glutDisplayFunc(idle); + glutIdleFunc(idle); +} + +void dsPlatformSimLoop (int window_width, int window_height, dsFunctions *fn, + int initial_pause) +{ + SIOUXSettings.initializeTB = false; + SIOUXSettings.standalone = false; + SIOUXSettings.setupmenus = false; + SIOUXSettings.autocloseonquit = true; + SIOUXSettings.asktosaveonclose = false; + + gfn = fn; + pause = initial_pause; + + printf ( + "\n" + "Simulation test environment v%d.%02d\n" + " Option-P : pause / unpause (or say `-pause' on command line).\n" + " Option-O : single step when paused.\n" + " Option-T : toggle textures (or say `-notex' on command line).\n" + " Option-S : toggle shadows (or say `-noshadow' on command line).\n" + " Option-V : print current viewpoint coordinates (x,y,z,h,p,r).\n" + " Option-W : write frames to ppm files: frame/frameNNN.ppm\n" + "\n" + "Change the camera position by clicking + dragging in the window.\n" + " Left button - pan and tilt.\n" + " Right button - forward and sideways.\n" + " Left + Right button (or middle button) - sideways and up.\n" + "\n",DS_VERSION >> 8,DS_VERSION & 0xff); + + createMainWindow (window_width, window_height); + dsStartGraphics (window_width,window_height,fn); + + if (fn->start) fn->start(); + + glutMainLoop(); + + if (fn->stop) fn->stop(); + dsStopGraphics(); +} + +extern "C" void dsStop(){ }// GLUT/MSL hooks into the system to exit diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/DSPrefix.h ode-0.14/contrib/Mac_CFMCarbon/mac_source/DSPrefix.h --- ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/DSPrefix.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/mac_source/DSPrefix.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ +#ifndef prefix_h +#define prefix_h + +#include "CommonPrefix.h" + +#endif // prefix_h \ No newline at end of file diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ExamplesPrefix.h ode-0.14/contrib/Mac_CFMCarbon/mac_source/ExamplesPrefix.h --- ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ExamplesPrefix.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/mac_source/ExamplesPrefix.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,13 @@ +#ifndef prefix_h +#define prefix_h + +#include "CommonPrefix.h" + +// Hack to automatically call SIOUX's CLI interface for the test apps +#include +#include +int fmain (int argc, char **argv); +int main (int argc, char **argv) { argc = ccommand(&argv); return fmain(argc, argv); } +#define main(argc, argv) fmain(argc, argv) + +#endif // prefix_h \ No newline at end of file diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/include/GL/gl.h ode-0.14/contrib/Mac_CFMCarbon/mac_source/include/GL/gl.h --- ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/include/GL/gl.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/mac_source/include/GL/gl.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,2 @@ +// A little hackaround (Apple use / in the FILENAME, which doesn't work when following DOS paths) +#include \ No newline at end of file diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/include/GL/glu.h ode-0.14/contrib/Mac_CFMCarbon/mac_source/include/GL/glu.h --- ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/include/GL/glu.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/mac_source/include/GL/glu.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,2 @@ +// A little hackaround (Apple use / in the FILENAME, which doesn't work when following DOS paths) +#include \ No newline at end of file diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/include/ode/config.h ode-0.14/contrib/Mac_CFMCarbon/mac_source/include/ode/config.h --- ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/include/ode/config.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/mac_source/include/ode/config.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,52 @@ +/* This file has been manually hacked together for the Mac CFM Carbon build - Frank. */ + +#ifndef _ODE_CONFIG_H_ +#define _ODE_CONFIG_H_ + +/* standard system headers */ +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* #define PENTIUM 1 -- not a pentium */ + +/* integer types (we assume int >= 32 bits) */ +typedef char int8; +typedef unsigned char uint8; +typedef int int32; +typedef unsigned int uint32; + +/* an integer type that we can safely cast a pointer to and from without loss of bits. */ +typedef unsigned int intP; + +#ifdef PRECISION_DOUBLE + + /*select the base floating point type*/ + #define dDOUBLE 1 + + /* the floating point infinity */ + #define dInfinity DBL_MAX + +#else + + /* select the base floating point type */ + #define dSINGLE 1 + + /* the floating point infinity */ + #define dInfinity FLT_MAX + +#endif + +#ifdef __cplusplus +} +#endif +#endif \ No newline at end of file diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ode/test/test_stability1.cpp ode-0.14/contrib/Mac_CFMCarbon/mac_source/ode/test/test_stability1.cpp --- ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ode/test/test_stability1.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/mac_source/ode/test/test_stability1.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,289 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +#include +#include + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif + +// select correct drawing functions + +#ifdef dDOUBLE +#define dsDrawBox dsDrawBoxD +#define dsDrawSphere dsDrawSphereD +#define dsDrawCylinder dsDrawCylinderD +#define dsDrawCappedCylinder dsDrawCappedCylinderD +#endif + + +// some constants + +#define DENSITY (5.0) // density of all objects + +// dynamics and collision objects + +struct MyObject { + dBodyID body; // the body + dGeomID geom; // geometry representing this body +}; + +static dWorldID world; +static dSpaceID space; +static MyObject fallingObject; +static dGeomID box1, box2; +static dJointGroupID contactgroup; + + +// this is called by dSpaceCollide when two objects in space are +// potentially colliding. + +static void nearCallback (void *data, dGeomID o1, dGeomID o2) +{ + int i; + // if (o1->body && o2->body) return; + + // exit without doing anything if the two bodies are connected by a joint + dBodyID b1 = dGeomGetBody(o1); + dBodyID b2 = dGeomGetBody(o2); + if (b1 && b2 && dAreConnected (b1,b2)) return; + + dContact contact[4]; // up to 3 contacts per box + for (i=0; i<4; i++) { + contact[i].surface.mode = dContactBounce; //dContactMu2; + contact[i].surface.mu = dInfinity; + contact[i].surface.mu2 = 0; + contact[i].surface.bounce = 0.5; + contact[i].surface.bounce_vel = 0.1; + } + if (int numc = dCollide (o1,o2,4,&contact[0].geom,sizeof(dContact))) { + // dMatrix3 RI; + // dRSetIdentity (RI); + // const dReal ss[3] = {0.02,0.02,0.02}; + for (i=0; i= 'A' && c <= 'Z') return c - ('a'-'A'); + else return c; +} + + +// called when a key pressed + +static void command (int cmd) +{ + int i,k; + dReal sides[3]; + dMass m; + + cmd = locase (cmd); + if (cmd == 'b' || cmd == 's' || cmd == 'c') { + // Destroy the currently falling object and replace it by an instance of the requested type + if (fallingObject.body) { + dBodyDestroy (fallingObject.body); + dGeomDestroy (fallingObject.geom); + memset (&fallingObject, 0, sizeof(fallingObject)); + } + + fallingObject.body = dBodyCreate (world); + for (k=0; k<3; k++) sides[k] = dRandReal()*0.5+0.1; + + // Start out centered above the V-gap + dBodySetPosition (fallingObject.body, 0,0,5); + +#if 0 + dMatrix3 R; + dRFromAxisAndAngle (R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, + dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); + dBodySetRotation (fallingObject.body,R); + dBodySetData (fallingObject.body,(void*) i); +#endif + + if (cmd == 'b') { + dMassSetBox (&m,DENSITY,sides[0],sides[1],sides[2]); + fallingObject.geom = dCreateBox (space,sides[0],sides[1],sides[2]); + } + else if (cmd == 'c') { + sides[0] *= 0.5; + dMassSetCappedCylinder (&m,DENSITY,3,sides[0],sides[1]); + fallingObject.geom = dCreateCCylinder (space,sides[0],sides[1]); + } + else if (cmd == 's') { + sides[0] *= 0.5; + dMassSetSphere (&m,DENSITY,sides[0]); + fallingObject.geom = dCreateSphere (space,sides[0]); + } + + dGeomSetBody (fallingObject.geom,fallingObject.body); + + dBodySetMass (fallingObject.body,&m); + } +} + + +// draw a geom + +void drawGeom (dGeomID g, const dReal *pos, const dReal *R) +{ + if (!g) return; + if (!pos) pos = dGeomGetPosition (g); + if (!R) R = dGeomGetRotation (g); + + int type = dGeomGetClass (g); + if (type == dBoxClass) { + dVector3 sides; + dGeomBoxGetLengths (g,sides); + dsDrawBox (pos,R,sides); + } + else if (type == dSphereClass) { + dsDrawSphere (pos,R,dGeomSphereGetRadius (g)); + } + else if (type == dCCylinderClass) { + dReal radius,length; + dGeomCCylinderGetParams (g,&radius,&length); + dsDrawCappedCylinder (pos,R,length,radius); + } + /* + else if (type == dGeomTransformClass) { + dGeomID g2 = dGeomTransformGetGeom (g); + const dReal *pos2 = dGeomGetPosition (g2); + const dReal *R2 = dGeomGetRotation (g2); + dVector3 actual_pos; + dMatrix3 actual_R; + dMULTIPLY0_331 (actual_pos,R,pos2); + actual_pos[0] += pos[0]; + actual_pos[1] += pos[1]; + actual_pos[2] += pos[2]; + dMULTIPLY0_333 (actual_R,R,R2); + drawGeom (g2,actual_pos,actual_R); + } + */ +} + + +// simulation loop + +static void simLoop (int pause) +{ + dsSetColor (0,0,2); + dSpaceCollide (space,0,&nearCallback); + if (!pause) dWorldStep (world,0.0005); + + // remove all contact joints + dJointGroupEmpty (contactgroup); + + dsSetColor (1,1,0); + dsSetTexture (DS_WOOD); + + // draw the falling object + dsSetColor (1,0,0); + drawGeom (fallingObject.geom,0,0); + + // draw the constraining boxes + dsSetColor(0.8, 1, 0.8); + drawGeom (box1,0,0); + drawGeom (box2,0,0); +} + + +int main (int argc, char **argv) +{ + // setup pointers to drawstuff callback functions + dsFunctions fn; + fn.version = DS_VERSION; + fn.start = &start; + fn.step = &simLoop; + fn.command = &command; + fn.stop = 0; + fn.path_to_textures = "../../drawstuff/textures"; + if(argc==2) + { + fn.path_to_textures = argv[1]; + } + + // create world + + world = dWorldCreate(); + space = dHashSpaceCreate(); + contactgroup = dJointGroupCreate (0); + dWorldSetGravity (world,0,0,-0.5); + dWorldSetCFM (world,1e-5); + dCreatePlane (space,0,0,1,0); + memset (&fallingObject,0,sizeof(fallingObject)); + + // Create two flat boxes, just slightly off vertical and a bit apart for stuff to fall in between. + // Don't create bodies for these boxes -- they'll be immovable instead. + { + dReal sides[3]; + dMatrix3 R; + + sides[0] = 4; + sides[1] = 0.2; + sides[2] = 3; + + box1 = dCreateBox (space,sides[0],sides[1],sides[2]); + dGeomSetPosition (box1, 0, sides[1], sides[2]/2); + dRFromAxisAndAngle (R, 1, 0, 0, -0.1); + dGeomSetRotation (box1, R); + + box2 = dCreateBox (space,sides[0],sides[1],sides[2]); + dGeomSetPosition (box2, 0, -sides[1], sides[2]/2); + dRFromAxisAndAngle (R, 1, 0, 0, 0.1); + dGeomSetRotation (box2, R); + } + + // Pretend to drop a box to start + command('b'); + + // run simulation + dsSimulationLoop (argc,argv,640,480,&fn); + + dJointGroupDestroy (contactgroup); + dSpaceDestroy (space); + dWorldDestroy (world); + + return 0; +} diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ode/test/test_stacktest.c ode-0.14/contrib/Mac_CFMCarbon/mac_source/ode/test/test_stacktest.c --- ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ode/test/test_stacktest.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/mac_source/ode/test/test_stacktest.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,197 @@ +#include +#include +#include "ode.h" + +#define NUMBODIES 80 + +#define USE_SPHERE 0 +#define USE_HELIX 1 +#define USE_TORQUE 1 +#define USE_WEIRD_MATRIX_OPS 0 + +#define CONTACTS 1 + +dWorldID aWorld; +dSpaceID aSpace; +float cycle = 0, fade; +dJointGroupID aContactGroup; +dBodyID bodies[NUMBODIES]; +dGeomID geoms[NUMBODIES]; +GLfloat colors[NUMBODIES][4]; +unsigned int contactsThisFrame; + +void kglTransformByODEGeom(dGeomID geom) { + const dReal *p = dGeomGetPosition(geom); + const dReal *R = dGeomGetRotation(geom); + GLdouble glm[16]; + + glm[0] = R[0]; glm[1] = R[4]; glm[2] = R[8]; glm[3] = 0; + glm[4] = R[1]; glm[5] = R[5]; glm[6] = R[9]; glm[7] = 0; + glm[8] = R[2]; glm[9] = R[6]; glm[10] = R[10];glm[11] = 0; + glm[12] = p[0]; glm[13] = p[1]; glm[14] = p[2]; glm[15] = 1; + + glMultMatrixd(glm); +} + +static void odeNearCallback(void *data, dGeomID g1, dGeomID g2) { + dBodyID b1 = dGeomGetBody(g1), + b2 = dGeomGetBody(g2); + dContact contact[CONTACTS]; + int contactsUsed, i; + + if (b1 && b2 && dAreConnected(b1, b2)) return; + + contactsUsed = dCollide(g1, g2, CONTACTS, &contact[0].geom, + sizeof(dContact)); + if (contactsUsed > CONTACTS) contactsUsed = CONTACTS; + + for (i = 0; i < contactsUsed; i++) { + contact[i].surface.mode = 0; + contact[i].surface.mu = 20.0; + + dJointAttach(dJointCreateContact(aWorld, aContactGroup, + &(contact[i])), b1, b2); + contactsThisFrame++; + } +} + +void myGlutResize(int w, int h) { + glViewport(0, 0, w, h); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(45.0, (GLfloat)w / h, 1.0, 120.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0, -6, -20); +} + +void myGlutIdle(void) { + const float step = 1.0/120; + int i; + + cycle = fmod(cycle + step / 4, 1); + fade = fabs(cycle * 2 - 1); + + contactsThisFrame = 0; + dSpaceCollide(aSpace, NULL, &odeNearCallback); + //printf("%u\n", contactsThisFrame); + dWorldStep(aWorld, step); + dJointGroupEmpty(aContactGroup); + + for (i = 0; i < NUMBODIES; i++) { + const dReal *cvel = dBodyGetLinearVel(bodies[i]); + dBodyAddForce(bodies[i], + -cvel[0] * 0.5, + -cvel[1] * 0.5, + -cvel[2] * 0.5 + ); + } + + glutPostRedisplay(); +} + +void myGlutDisplay(void) { + int i; + + glClearColor(fade * 0.15, 0, 0, 1); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + if (USE_WEIRD_MATRIX_OPS) glPushMatrix(); + for (i = 0; i < NUMBODIES; i++) { + if (!USE_WEIRD_MATRIX_OPS) glPushMatrix(); + kglTransformByODEGeom(geoms[i]); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, colors[i]); + glColor3f(fade * 1.5, 0, 0); +#if USE_SPHERE + glRotatef(90, 1, 0, 0); + glutSolidSphere(0.5, 9, 6); + glDisable(GL_LIGHTING); + glutWireSphere(0.5, 9, 6); +#else + glutSolidCube(1); + glDisable(GL_LIGHTING); + glutWireCube(1); +#endif + glEnable(GL_LIGHTING); + if (!USE_WEIRD_MATRIX_OPS) glPopMatrix(); + } + if (USE_WEIRD_MATRIX_OPS) glPopMatrix(); + + glutSwapBuffers(); +} + +int main(int argc, char **argv) { + printf("Initializing GLUT\n"); + + glutInit(&argc, argv); + glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); + glutInitWindowSize(400, 300); + glutInitWindowPosition(100, 100); + glutCreateWindow("ODE Crash Test"); + + glutDisplayFunc(myGlutDisplay); + glutReshapeFunc(myGlutResize); + glutIdleFunc(myGlutIdle); + + glPolygonOffset(1, 1); + glDepthFunc(GL_LEQUAL); + glEnable(GL_POLYGON_OFFSET_FILL); + glEnable(GL_DEPTH_TEST); + glEnable(GL_CULL_FACE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + myGlutResize(400, 300); + + printf("Creating ODE world\n"); + aWorld = dWorldCreate(); + aSpace = dHashSpaceCreate(); + aContactGroup = dJointGroupCreate(0); + dCreatePlane(aSpace, 0, 1, 0, 0); + dWorldSetGravity(aWorld, 0, -9.81, 0); + dWorldSetERP(aWorld, 0.4); + dWorldSetCFM(aWorld, 1e-10); + + printf("Creating objects\n"); + { + int i; + dMass mass; + + dMassSetBox(&mass, 1.0, 1, 1, 1); + + for (i = 0; i < NUMBODIES; i++) { + float fraction = (float)i / NUMBODIES; + + bodies[i] = dBodyCreate(aWorld); + dBodySetMass(bodies[i], &mass); +#if USE_SPHERE + geoms[i] = dCreateSphere(aSpace, 0.5); +#else + geoms[i] = dCreateBox(aSpace, 1, 1, 1); +#endif + dGeomSetBody(geoms[i], bodies[i]); + + if (USE_HELIX) { + float r = (i % 3 - 1) * (1.5+4*(1 - fraction)), + theta = (float)i / 4; + dBodySetPosition(bodies[i], + sin(theta) * r, + (float)i + 1, + cos(theta) * r + ); + } else { + dBodySetPosition(bodies[i], 0, (float)i * 2 + 1, 0); + } + if (USE_TORQUE) dBodyAddTorque(bodies[i], fraction*10, fraction*20, fraction*30); + + colors[i][0] = fraction; + colors[i][1] = 1 - fraction; + colors[i][2] = 1 - fabs(fraction * 2 - 1); + colors[i][3] = 1; + } + } + + printf("Starting simulation\n"); + glutMainLoop(); + + return 0; +} \ No newline at end of file diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ODETestPrefix.h ode-0.14/contrib/Mac_CFMCarbon/mac_source/ODETestPrefix.h --- ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ODETestPrefix.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/mac_source/ODETestPrefix.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,13 @@ +#ifndef prefix_h +#define prefix_h + +#include "CommonPrefix.h" + +// Hack to automatically call SIOUX's CLI interface for the test apps +#include +#include +int fmain (); +int main (int argc, char **argv) { argc = ccommand(&argv); return fmain(); } +#define main() fmain() + +#endif // prefix_h \ No newline at end of file diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ReleasePrefix.h ode-0.14/contrib/Mac_CFMCarbon/mac_source/ReleasePrefix.h --- ode-0.11.1/contrib/Mac_CFMCarbon/mac_source/ReleasePrefix.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/mac_source/ReleasePrefix.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ +#ifndef prefix_h +#define prefix_h + +#include "CommonPrefix.h" + +#endif // prefix_h \ No newline at end of file diff -Nru ode-0.11.1/contrib/Mac_CFMCarbon/README.txt ode-0.14/contrib/Mac_CFMCarbon/README.txt --- ode-0.11.1/contrib/Mac_CFMCarbon/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Mac_CFMCarbon/README.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,95 @@ +----------------------------- +ODE - Mac CFM Carbon Port +(contact Frank Condello with questions regarding this port) + +Although ODE contains a MacOSX makefile, and some individuals have implemented ODE in +Cocoa, I opted to use (and prefer) CodeWarrior. This also opens up ODE to MacOS8 & 9 +users, without scarfing functionality in MacOSX (same binaries run on both platforms). + +The 'ode_CW7.mcp' project contains release and debug targets to create static ODE and +DrawStuff libraries. + +'examples_CW7.mcp' contains targets for the entire ODE test suite, plus a couple other +test programs which were posted to the ODE mailing list. + + +----------------------------- +Compiling Notes: + +You'll need to extract the CodeWarrior projects from the 'CW7_projects.sit.bin' archive +(They're nearly a meg uncompressed so this was done to be bandwith friendly on the CVS). + +Projects require CodeWarrior 7 or above (recreating them with earlier versions shouldn't +be too difficult). The projects use relative paths and are meant to be compiled from +'contrib/Mac_CFMCarbon/'. Don't move them! + +All the libraries build into the 'lib/' directory, all test applications build into +'contrib/Mac_CFMCarbon/mac_testbin/' (and must be run from that directory since the +texture path is hard-coded). + +You'll need to compile the release ODE library, and the DrawStuff library before +compiling the examples. + +The ODE 'configurator' has not been ported, but a Mac-friendly 'config.h' header has been +manually hacked together (all PPC Macs should be fine with this header). Single or double +precision can be defined in the 'CommonPrefix.h' header found in +'contrib/Mac_CFMCarbon/mac_source/'. + +'contrib/Mac_CFMCarbon/mac_source/' also contains any mac specific additions to the main source. +The directory structure here matches the main source tree, and I would recommend that this +format is maintained when making additions, since the access paths are touchy (more below...) + +Some issues were encountered with duplicate header names. CodeWarrior tends to be +unforgiving about this sort of thing but fudging with the access paths eventually +cleared up the problem. If ODE fails to compile, make sure the and +"objects.h" or and are actually pointing to the correct header. + +You'll need Apple's OpenGL SDK (with GLUT) in your compiler path to build DrawStuff. I've +added redirection headers in 'contrib/Mac_CFMCarbon/mac_source/include/GL/' to properly +link with the Apple headers (since the projects are set to follow DOS paths). + +The examples link against a crapload of static libraries, but my initial builds using +ODE, MSL, GLUT, and DrawStuff shared/merged DLL's proved unstable (mostly problems with +SIOUX spawning multiple sessions, and crashes in Classic). Static libs just worked better +in the end, but the test apps are a little bloated as a result, and need to be re-linked +whenever a change to a library is made. + +IMPORTANT: You must use the same 'CommonPrefix.h' settings for libraries, and test apps +(i.e. double or single precision). + + +----------------------------- +Running the test apps: + +The test apps will show the SIOUX CLI prompt when run. Just hit OK to ignore it, or add any +DrawStuff arguments. You'll want to log output to a file for 'test_ode'. + +There are two extra test programs in the 'mac_source' directory. Both were posted to the ODE +mailing list by OSX users. 'test_stability1' visualizes some internal issues with ODE, and +'test_stacktest' is a standalone GLUT program (doesn't use DrawStuff) that can be useful +to stress test the library, and give you an idea of just how much stack memory you're +going to need for large systems. + +ISSUES: + +The carbon DrawStuff lib uses GLUT to make life easy, but GLUT isn't exactly bug-free +or stable on the Mac... Try moving the mouse around if a simulation is running slowly +on OS9 (it's not ODE's fault, but rather a poor carbon GLUT implementation - seems GLUT stalls +when it's not getting system events - I haven't seen this problem on OSX). + +The 3D view may not update if typing in the SIOUX console window. + +You cannot pass startup args to GLUT due to the way the DrawStuff library initializes. + +'Write Frames' doesn't actually do anything at the moment. + +The 'test_joints' app seems broken (though I don't know what the intended effect should be) + + +----------------------------- +TODO: + +- Re-add shared library targets (if stability issues are resolved). +- Implement 'Write Frames' in DrawStuff. +- Write a Carbon compatible configurator +- Create CodeWarrior 8 projects (once I scrounge up enough dough for the update). \ No newline at end of file diff -Nru ode-0.11.1/contrib/OdeModelProcessor/LICENSE-BSD.TXT ode-0.14/contrib/OdeModelProcessor/LICENSE-BSD.TXT --- ode-0.11.1/contrib/OdeModelProcessor/LICENSE-BSD.TXT 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/OdeModelProcessor/LICENSE-BSD.TXT 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,37 @@ + +This is the BSD-style license for The ODE Model Processor +---------------------------------------------------------- + +The ODE Model Processor +Copyright (c) 2007, Department Of Information Science, +University of Otago, Dunedin, New Zealand. +All rights reserved. + +Author: Richard Barrington + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +Neither the names of the copyright owner nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -Nru ode-0.11.1/contrib/OdeModelProcessor/LICENSE.TXT ode-0.14/contrib/OdeModelProcessor/LICENSE.TXT --- ode-0.11.1/contrib/OdeModelProcessor/LICENSE.TXT 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/OdeModelProcessor/LICENSE.TXT 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff -Nru ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/OdeModelProcessor.cs ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/OdeModelProcessor.cs --- ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/OdeModelProcessor.cs 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/OdeModelProcessor.cs 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,354 @@ +/* + * The ODE Model Processor + * ----------------------- + * + * Copyright 2007, Department of Information Science, + * University of Otago, Dunedin, New Zealand. + * + * Author: Richard Barrington + * + * This is a Content Processor and Tag library written for use with + * Microsoft Visual C# 2005 Express Edition and Microsoft XNA Game + * Studio Express 1.0. + * + * It can be used to read .x model vertex and index data before + * insertion into the content pipeline. This is used to build ODE + * Triangle Meshes which are then used for collision detection that + * is more accurate than the default XNA bounding boxes or spheres. + * + * Usage is simple: + * Build the library and reference the DLL in your project. + * Add the DLL to the Content Pipeline + * Set the content processor for you .x models to OdeModelProcessor. + * + * Create triangle meshes as follows: + * 1) Create a space, but only one for all of models. + * 2) Create a triangle data. + * 3) Load the model. + * 4) Retreive the tag from the model. + * 6) Build the triangle mesh by calling d.GeomTriMeshDataBuildSimple. + * + * Eg: + * IntPtr space = d.SimpleSpaceCreate(IntPtr.Zero); + * IntPtr triangleData = d.GeomTriMeshDataCreate(); + * Model obj = content.Load("Content\\mycube"); + * OdeTag tag = (OdeTag)obj.Tag; + * IntPtr vertexArray = tag.getVertices(); + * IntPtr indexArray = tag.getIndices(); + * d.GeomTriMeshDataBuildSimple + * ( + * triangleData, + * vertexArray, tag.getVertexStride(), tag.getVertexCount(), + * indexArray, tag.getIndexCount(), tag.getIndexStride() + * ); + * IntPtr triangleMesh = d.CreateTriMesh(space, triangleData, null, null, null); + * + * You can load multiple models and test for collisions with something + * like this in the update method: + * + * d.GeomSetPosition(odeTri1, obj1Position.X, obj1Position.Y, obj1Position.Z); + * d.GeomSetPosition(odeTri2, obj2Position.X, obj2Position.Y, obj2Position.Z); + * int numberOfContacts = d.Collide(odeTri1, odeTri2, ODE_CONTACTS, + * contactGeom, d.ContactGeom.SizeOf); + * + * Where odeTri1 and odeTri2 are triangle meshes you've created, obj1Position + * and obj2Position are the positions of your rendered models in the scene, + * ODE_CONTACTS is a constant defining the maximum number of contacts + * to test for, contactGeom is a d.ContactGeom[] of length ODE_CONTACTS. + * + * If numberOfContacts is greater than 0, you have a collision. + * + * Other ODE functions such as d.SpaceCollide() also work; see ODE.NET BoxTest.cs. + * + * This library is free software; you can redistribute it and/or + * modify it under the same terms as the ODE and ODE.Net libraries. + * Specifically, the terms are one of EITHER: + * + * (1) The GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at + * your option) any later version. The text of the GNU Lesser + * General Public License is included with this library in the + * file LICENSE.TXT. + * + * (2) The BSD-style license that is included with this library in + * the file LICENSE-BSD.TXT. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files + * LICENSE.TXT and LICENSE-BSD.TXT for more details. + * + */ + +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Design; +using Microsoft.Xna.Framework.Content.Pipeline; +using Microsoft.Xna.Framework.Content.Pipeline.Graphics; +using Microsoft.Xna.Framework.Content.Pipeline.Processors; +using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler; +using Ode.NET; +using System.Runtime.InteropServices; + +namespace OdeModelProcessor +{ + /* + * Container for vertex and index data in a format + * that ODE.Net can use + */ + public class OdeTag + { + + private float[] vertexData; + private int[] indexData; + private const int indexStride = (sizeof(int)); + private const int vertexStride = (3 * sizeof(float)); + + /* Constructors */ + public OdeTag() + { + vertexData = new float[0]; + indexData = new int[0]; + } + + public OdeTag(float[] vertexData, int[] indexData) + { + this.vertexData = vertexData; + this.indexData = indexData; + } + + /* Data setter */ + public void setData(float[] vertexData, int[] indexData) + { + this.vertexData = vertexData; + this.indexData = indexData; + } + + /* Data appenders */ + public void appendVertexData(float[] vertexData) + { + int newVertexDataLength = vertexData.Length; + float[] tempVertexArray = new float[newVertexDataLength + this.vertexData.Length]; + this.vertexData.CopyTo(tempVertexArray, 0); + vertexData.CopyTo(tempVertexArray, this.vertexData.Length); + this.vertexData = tempVertexArray; + } + + public void appendIndexData(int[] indexData) + { + int newIndexDataLength = indexData.Length; + int[] tempIndexArray = new int[newIndexDataLength + this.indexData.Length]; + this.indexData.CopyTo(tempIndexArray, 0); + indexData.CopyTo(tempIndexArray, this.indexData.Length); + this.indexData = tempIndexArray; + } + + /* Data getters */ + public float[] getVertexData() + { + return this.vertexData; + } + + public int[] getIndexData() + { + return this.indexData; + } + + /* Native data getters */ + public IntPtr getVertices() + { + int count = getVertexData().Length; + int memsize = count * Marshal.SizeOf(getVertexData()[0].GetType()); + IntPtr pointer = Marshal.AllocCoTaskMem(memsize); + Marshal.Copy(getVertexData(), 0, pointer, count); + return pointer; + } + + public IntPtr getIndices() + { + int count = getIndexData().Length; + int memsize = count * Marshal.SizeOf(getIndexData()[0].GetType()); + IntPtr pointer = Marshal.AllocCoTaskMem(memsize); + Marshal.Copy(getIndexData(), 0, pointer, count); + return pointer; + } + + /* Count getters */ + public int getVertexCount() + { + return vertexData.Length/3; + } + + public int getIndexCount() + { + return indexData.Length; + } + + /* Stride getters */ + public int getVertexStride() + { + return vertexStride; + } + + public int getIndexStride() + { + return indexStride; + } + + /* + * Convienience method to build the mesh and return it. The triangleData + * is passed in to allow the calling application to delete it afterwards. + * + * Be sure to destroy the returned TriangleMesh in the client application. + * + * Can't destroy the index and vertex arrays here though, so best to handle + * this manually - only use this method if nothing else makes sense. + */ + public IntPtr getTriangleMesh(IntPtr space, IntPtr triangleData) + { + d.GeomTriMeshDataBuildSimple( + triangleData, + getVertices(), getVertexStride(), getVertexCount(), + getIndices(), getIndexCount(), getIndexStride() + ); + return d.CreateTriMesh(space, triangleData, null, null, null); + } + + } + + /* + * Subclass of the XNA .x model processor, which creates and appends a tag + * containing vertex and index data for ODE.Net to use. + */ + [ContentProcessor] + public class OdeModelProcessor : ModelProcessor + { + private OdeTag tag; + private int indexOffset = 0; + + public override ModelContent Process(NodeContent input, ContentProcessorContext context) + { + tag = new OdeTag(); + GenerateVerticesRecursive( input ); + ModelContent model = base.Process(input, context); + model.Tag = tag; + indexOffset = 0; + return model; + } + + public void GenerateVerticesRecursive(NodeContent input) + { + + MeshContent mesh = input as MeshContent; + + if (mesh != null) + { + GeometryContentCollection gc = mesh.Geometry; + foreach (GeometryContent g in gc) + { + VertexContent vc = g.Vertices; + IndirectPositionCollection ipc = vc.Positions; + IndexCollection ic = g.Indices; + + float[] vertexData = new float[ipc.Count * 3]; + for (int i = 0; i < ipc.Count; i++) + { + + Vector3 v0 = ipc[i]; + vertexData[(i * 3) + 0] = v0.X; + vertexData[(i * 3) + 1] = v0.Y; + vertexData[(i * 3) + 2] = v0.Z; + + } + + int[] indexData = new int[ic.Count]; + for (int j = 0; j < ic.Count; j ++) + { + + indexData[j] = ic[j] + indexOffset; + + } + + tag.appendVertexData(vertexData); + tag.appendIndexData(indexData); + indexOffset += ipc.Count; + } + + } + + foreach (NodeContent child in input.Children) + { + GenerateVerticesRecursive(child); + } + + } + + } + + /* Writer for the OdeTag class */ + [ContentTypeWriter] + public class OdeTagWriter : ContentTypeWriter + { + + protected override void Write(ContentWriter output, OdeTag value) + { + float[] vertexData = value.getVertexData(); + int[] indexData = value.getIndexData(); + output.Write(vertexData.Length); + output.Write(indexData.Length); + for (int j = 0; j < vertexData.Length; j++) + { + output.Write(vertexData[j]); + } + for (int i = 0; i < indexData.Length; i++) + { + output.Write(indexData[i]); + } + } + + public override string GetRuntimeType(TargetPlatform targetPlatform) + { + return typeof(OdeTag).AssemblyQualifiedName; + } + + public override string GetRuntimeReader(TargetPlatform targetPlatform) + { + return "OdeModelProcessor.OdeTagReader, OdeModelProcessor, Version=1.0.0.0, Culture=neutral"; + } + + } + + /* Reader for the OdeTag class */ + public class OdeTagReader : ContentTypeReader + { + protected override OdeTag Read(ContentReader input, OdeTag existingInstance) + { + float[] vertexData = new float[input.ReadInt32()]; + int[] indexData = new int[input.ReadInt32()]; + for (int j = 0; j < vertexData.Length; j++) + { + vertexData[j] = input.ReadSingle(); + } + for (int i = 0; i < indexData.Length; i++) + { + indexData[i] = input.ReadInt32(); + } + + OdeTag tag = null; + if (existingInstance == null) + { + tag = new OdeTag(vertexData, indexData); + } + else + { + tag = existingInstance; + tag.setData(vertexData, indexData); + } + return tag; + } + } +} diff -Nru ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/OdeModelProcessor.csproj ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/OdeModelProcessor.csproj --- ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/OdeModelProcessor.csproj 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/OdeModelProcessor.csproj 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,69 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {246F3075-FEE3-45F9-8CB6-47DADBFFD1F2} + Library + Properties + OdeModelProcessor + OdeModelProcessor + + + true + full + false + bin\Debug\ + DEBUG + prompt + 4 + false + false + + + pdbonly + true + bin\Release\ + + + prompt + 4 + false + false + + + + + + False + ..\..\ODE\Ode.NET-0.8\bin\Release\Ode.NET.dll + + + + + + + + + + True + True + Settings.settings + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + \ No newline at end of file diff -Nru ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/Properties/AssemblyInfo.cs ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/Properties/AssemblyInfo.cs --- ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/Properties/AssemblyInfo.cs 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/Properties/AssemblyInfo.cs 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OdeModelProcessor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OdeModelProcessor")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("29c5609a-cd5f-480b-b4ef-5c11de022268")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff -Nru ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.Designer.cs ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.Designer.cs --- ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.Designer.cs 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.Designer.cs 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.832 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OdeModelProcessor.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff -Nru ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.settings ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.settings --- ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.settings 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.settings 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ + + + + + + diff -Nru ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor.sln ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor.sln --- ode-0.11.1/contrib/OdeModelProcessor/OdeModelProcessor.sln 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/OdeModelProcessor/OdeModelProcessor.sln 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C# Express 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OdeModelProcessor", "OdeModelProcessor\OdeModelProcessor.csproj", "{246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff -Nru ode-0.11.1/contrib/OdeModelProcessor/README.TXT ode-0.14/contrib/OdeModelProcessor/README.TXT --- ode-0.11.1/contrib/OdeModelProcessor/README.TXT 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/OdeModelProcessor/README.TXT 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,78 @@ +The ODE Model Processor +----------------------- + +Copyright 2007, Department of Information Science, +University of Otago, Dunedin, New Zealand. + +Author: Richard Barrington + +This is a Content Processor and Tag library written for use with +Microsoft Visual C# 2005 Express Edition and Microsoft XNA Game +Studio Express 1.0. + +It can be used to read .x model vertex and index data before +insertion into the content pipeline. This is used to build ODE +Triangle Meshes which are then used for collision detection that +is more accurate than the default XNA bounding boxes or spheres. + +Usage is fairly simple: +Build the library and reference the DLL in your project. +Add the DLL to the Content Pipeline +Set the content processor for you .x models to OdeModelProcessor. + +Create triangle meshes as follows: +1) Create a space, but only one for all of models. +2) Create a triangle data. +3) Load the model. +4) Retreive the tag from the model. +6) Build the triangle mesh by calling d.GeomTriMeshDataBuildSimple. + +Eg: +IntPtr space = d.SimpleSpaceCreate(IntPtr.Zero); +IntPtr triangleData = d.GeomTriMeshDataCreate(); +Model obj = content.Load("Content\\mycube"); +OdeTag tag = (OdeTag)obj.Tag; +IntPtr vertexArray = tag.getVertices(); +IntPtr indexArray = tag.getIndices(); +d.GeomTriMeshDataBuildSimple +( + triangleData, + vertexArray, tag.getVertexStride(), tag.getVertexCount(), + indexArray, tag.getIndexCount(), tag.getIndexStride() +); +IntPtr triangleMesh = d.CreateTriMesh(space, triangleData, null, null, null); + +You can load multiple models and test for collisions with something +like this in the update method: + +d.GeomSetPosition(odeTri1, obj1Position.X, obj1Position.Y, obj1Position.Z); +d.GeomSetPosition(odeTri2, obj2Position.X, obj2Position.Y, obj2Position.Z); +int numberOfContacts = d.Collide(odeTri1, odeTri2, ODE_CONTACTS, + contactGeom, d.ContactGeom.SizeOf); + +Where odeTri1 and odeTri2 are triangle meshes you've created, obj1Position +and obj2Position are the positions of your rendered models in the scene, +ODE_CONTACTS is a constant defining the maximum number of contacts +to test for, contactGeom is a d.ContactGeom[] of length ODE_CONTACTS. + +If numberOfContacts is greater than 0, you have a collision. + +Other ODE functions such as d.SpaceCollide() also work; see ODE.NET BoxTest.cs. + +This library is free software; you can redistribute it and/or +modify it under the same terms as the ODE and ODE.Net libraries. +Specifically, the terms are one of EITHER: + + (1) The GNU Lesser General Public License as published by the Free + Software Foundation; either version 2.1 of the License, or (at + your option) any later version. The text of the GNU Lesser + General Public License is included with this library in the + file LICENSE.TXT. + + (2) The BSD-style license that is included with this library in + the file LICENSE-BSD.TXT. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files +LICENSE.TXT and LICENSE-BSD.TXT for more details. diff -Nru ode-0.11.1/contrib/Ode.NET/Drawstuff/AssemblyInfo.cs ode-0.14/contrib/Ode.NET/Drawstuff/AssemblyInfo.cs --- ode-0.11.1/contrib/Ode.NET/Drawstuff/AssemblyInfo.cs 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/Drawstuff/AssemblyInfo.cs 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,18 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Drawstuff.NET")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Ode.NET")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: ComVisible(false)] +[assembly: Guid("b2a39dd4-dd67-4e8a-af70-d3b412da8850")] +[assembly: AssemblyVersion("0.7.0.0")] +[assembly: AssemblyFileVersion("0.7.0.0")] +[assembly: CLSCompliantAttribute(true)] diff -Nru ode-0.11.1/contrib/Ode.NET/Drawstuff/Drawstuff.cs ode-0.14/contrib/Ode.NET/Drawstuff/Drawstuff.cs --- ode-0.11.1/contrib/Ode.NET/Drawstuff/Drawstuff.cs 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/Drawstuff/Drawstuff.cs 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,58 @@ +using System; +using System.Runtime.InteropServices; +using Ode.NET; + +namespace Drawstuff.NET +{ +#if dDOUBLE + using dReal = System.Double; +#else + using dReal = System.Single; +#endif + + public static class ds + { + public const int VERSION = 2; + + public enum Texture + { + None, + Wood + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void CallbackFunction(int arg); + + [StructLayout(LayoutKind.Sequential)] + public struct Functions + { + public int version; + public CallbackFunction start; + public CallbackFunction step; + public CallbackFunction command; + public CallbackFunction stop; + public string path_to_textures; + } + + [DllImport("drawstuff", EntryPoint="dsDrawBox")] + public static extern void DrawBox(ref d.Vector3 pos, ref d.Matrix3 R, ref d.Vector3 sides); + + [DllImport("drawstuff", EntryPoint = "dsDrawCapsule")] + public static extern void DrawCapsule(ref d.Vector3 pos, ref d.Matrix3 R, dReal length, dReal radius); + + [DllImport("drawstuff", EntryPoint = "dsDrawConvex")] + public static extern void DrawConvex(ref d.Vector3 pos, ref d.Matrix3 R, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); + + [DllImport("drawstuff", EntryPoint="dsSetColor")] + public static extern void SetColor(float red, float green, float blue); + + [DllImport("drawstuff", EntryPoint="dsSetTexture")] + public static extern void SetTexture(Texture texture); + + [DllImport("drawstuff", EntryPoint="dsSetViewpoint")] + public static extern void SetViewpoint(ref d.Vector3 xyz, ref d.Vector3 hpr); + + [DllImport("drawstuff", EntryPoint="dsSimulationLoop")] + public static extern void SimulationLoop(int argc, string[] argv, int window_width, int window_height, ref Functions fn); + } +} diff -Nru ode-0.11.1/contrib/Ode.NET/Drawstuff/premake.lua ode-0.14/contrib/Ode.NET/Drawstuff/premake.lua --- ode-0.11.1/contrib/Ode.NET/Drawstuff/premake.lua 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/Drawstuff/premake.lua 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,19 @@ +package.name = "Drawstuff.NET" +package.kind = "dll" +package.language = "c#" + +if (options["with-doubles"]) then + package.defines = { "dDOUBLE" } +else + package.defines = { "dSINGLE " } +end + +package.links = { + "System", + "Ode.NET" +} + +package.files = { + "AssemblyInfo.cs", + "Drawstuff.cs" +} diff -Nru ode-0.11.1/contrib/Ode.NET/Ode/AssemblyInfo.cs ode-0.14/contrib/Ode.NET/Ode/AssemblyInfo.cs --- ode-0.11.1/contrib/Ode.NET/Ode/AssemblyInfo.cs 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/Ode/AssemblyInfo.cs 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,18 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Ode.NET")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Ode.NET")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: ComVisible(false)] +[assembly: Guid("1347a35e-c32b-4ff6-8064-7d10b2cc113b")] +[assembly: AssemblyVersion("0.10.1.0")] +[assembly: AssemblyFileVersion("0.10.1.0")] +[assembly: CLSCompliantAttribute(true)] diff -Nru ode-0.11.1/contrib/Ode.NET/Ode/Ode.cs ode-0.14/contrib/Ode.NET/Ode/Ode.cs --- ode-0.11.1/contrib/Ode.NET/Ode/Ode.cs 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/Ode/Ode.cs 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1870 @@ +using System; +using System.Runtime.InteropServices; +using System.Security; + +namespace Ode.NET +{ +#if dDOUBLE + using dReal = System.Double; +#else + using dReal = System.Single; +#endif + + public static class d + { + public static dReal Infinity = dReal.MaxValue; + + #region Flags and Enumerations + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [Flags] + public enum AllocateODEDataFlags : uint + { + BasicData = 0, + CollisionData = 0x00000001, + All = ~0u + } + + [CLSCompliant(false)] + [Flags] + public enum IniteODEFlags : uint + { + dInitFlagManualThreadCleanup = 0x00000001 + } +#endif + + [Flags] + public enum ContactFlags : int + { + Mu2 = 0x001, + FDir1 = 0x002, + Bounce = 0x004, + SoftERP = 0x008, + SoftCFM = 0x010, + Motion1 = 0x020, + Motion2 = 0x040, + MotionN = 0x080, + Slip1 = 0x100, + Slip2 = 0x200, + Approx0 = 0x0000, + Approx1_1 = 0x1000, + Approx1_2 = 0x2000, + Approx1 = 0x3000 + } + + public enum GeomClassID : int + { + SphereClass, + BoxClass, + CapsuleClass, + CylinderClass, + PlaneClass, + RayClass, + ConvexClass, + GeomTransformClass, + TriMeshClass, + HeightfieldClass, + FirstSpaceClass, + SimpleSpaceClass = FirstSpaceClass, + HashSpaceClass, + QuadTreeSpaceClass, + LastSpaceClass = QuadTreeSpaceClass, + FirstUserClass, + LastUserClass = FirstUserClass + MaxUserClasses - 1, + NumClasses, + MaxUserClasses = 4 + } + + public enum JointType : int + { + None, + Ball, + Hinge, + Slider, + Contact, + Universal, + Hinge2, + Fixed, + Null, + AMotor, + LMotor, + Plane2D + } + + public enum JointParam : int + { + LoStop, + HiStop, + Vel, + FMax, + FudgeFactor, + Bounce, + CFM, + StopERP, + StopCFM, + SuspensionERP, + SuspensionCFM, + LoStop2 = 256, + HiStop2, + Vel2, + FMax2, + FudgeFactor2, + Bounce2, + CFM2, + StopERP2, + StopCFM2, + SuspensionERP2, + SuspensionCFM2, + LoStop3 = 512, + HiStop3, + Vel3, + FMax3, + FudgeFactor3, + Bounce3, + CFM3, + StopERP3, + StopCFM3, + SuspensionERP3, + SuspensionCFM3 + } + + public enum dSweepAndPruneAxis : int + { + XYZ = ((0)|(1<<2)|(2<<4)), + XZY = ((0)|(2<<2)|(1<<4)), + YXZ = ((1)|(0<<2)|(2<<4)), + YZX = ((1)|(2<<2)|(0<<4)), + ZXY = ((2)|(0<<2)|(1<<4)), + ZYX = ((2)|(1<<2)|(0<<4)) + } + + #endregion + + #region Callbacks + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void GetAABBFn(IntPtr geom, out AABB aabb); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate ColliderFn GetColliderFnFn(int num); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void GeomDtorFn(IntPtr o); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v); + + #endregion + + #region Structs + + [StructLayout(LayoutKind.Sequential)] + public struct AABB + { + public dReal MinX, MaxX; + public dReal MinY, MaxY; + public dReal MinZ, MaxZ; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct Contact + { + public SurfaceParameters surface; + public ContactGeom geom; + public Vector3 fdir1; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct ContactGeom + { + public static readonly int SizeOf = Marshal.SizeOf(typeof(ContactGeom)); + + public Vector3 pos; + public Vector3 normal; + public dReal depth; + public IntPtr g1; + public IntPtr g2; + public int side1; + public int side2; + } + + [StructLayout(LayoutKind.Sequential)] + public struct GeomClass + { + public int bytes; + public GetColliderFnFn collider; + public GetAABBFn aabb; + public AABBTestFn aabb_test; + public GeomDtorFn dtor; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct JointFeedback + { + public Vector3 f1; + public Vector3 t1; + public Vector3 f2; + public Vector3 t2; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct Mass + { + public dReal mass; + public Vector4 c; + public Matrix3 I; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct Matrix3 + { + public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22) + { + M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f; + M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f; + M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f; + } + public dReal M00, M10, M20; + private dReal _m30; + public dReal M01, M11, M21; + private dReal _m31; + public dReal M02, M12, M22; + private dReal _m32; + } + + [StructLayout(LayoutKind.Sequential)] + public struct Matrix4 + { + public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30, + dReal m01, dReal m11, dReal m21, dReal m31, + dReal m02, dReal m12, dReal m22, dReal m32, + dReal m03, dReal m13, dReal m23, dReal m33) + { + M00 = m00; M10 = m10; M20 = m20; M30 = m30; + M01 = m01; M11 = m11; M21 = m21; M31 = m31; + M02 = m02; M12 = m12; M22 = m22; M32 = m32; + M03 = m03; M13 = m13; M23 = m23; M33 = m33; + } + public dReal M00, M10, M20, M30; + public dReal M01, M11, M21, M31; + public dReal M02, M12, M22, M32; + public dReal M03, M13, M23, M33; + } + + [StructLayout(LayoutKind.Sequential)] + public struct Quaternion + { + public dReal W, X, Y, Z; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct SurfaceParameters + { + public ContactFlags mode; + public dReal mu; + public dReal mu2; + public dReal bounce; + public dReal bounce_vel; + public dReal soft_erp; + public dReal soft_cfm; + public dReal motion1; + public dReal motion2; + public dReal motionN; + public dReal slip1; + public dReal slip2; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct Vector3 + { + public Vector3(dReal x, dReal y, dReal z) + { + X = x; Y = y; Z = z; _w = 0.0f; + } + public dReal X, Y, Z; + private dReal _w; + } + + + [StructLayout(LayoutKind.Sequential)] + public struct Vector4 + { + public Vector4(dReal x, dReal y, dReal z, dReal w) + { + X = x; Y = y; Z = z; W = w; + } + public dReal X, Y, Z, W; + } + + #endregion + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity] + public static extern int AllocateODEDataForThread(uint ODEInitFlags); +#endif + + [DllImport("ode", EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity] + public static extern bool AreConnected(IntPtr b1, IntPtr b2); + + [DllImport("ode", EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity] + public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type); + + [DllImport("ode", EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity] + public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz); + + [DllImport("ode", EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity] + public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); + + [DllImport("ode", EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity] + public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); + + [DllImport("ode", EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity] + public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz); + + [DllImport("ode", EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity] + public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); + + [DllImport("ode", EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity] + public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); + + [DllImport("ode", EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity] + public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz); + + [DllImport("ode", EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity] + public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz); + + [DllImport("ode", EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] + public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos); + + [DllImport("ode", EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] + public static extern void BodyCopyPosition(IntPtr body, out dReal X); + + [DllImport("ode", EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat); + + [DllImport("ode", EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void BodyCopyQuaternion(IntPtr body, out dReal X); + + [DllImport("ode", EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] + public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R); + + [DllImport("ode", EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] + public static extern void BodyCopyRotation(IntPtr body, out dReal M00); + + [DllImport("ode", EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr BodyCreate(IntPtr world); + + [DllImport("ode", EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity] + public static extern void BodyDestroy(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity] + public static extern void BodyDisable(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity] + public static extern void BodyEnable(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] + public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] + public static extern bool BodyGetAutoDisableFlag(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] + public static extern void BodyGetAutoDisableDefaults(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] + public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] + public static extern int BodyGetAutoDisableSteps(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] + public static extern dReal BodyGetAutoDisableTime(IntPtr body); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body); + public static Vector3 BodyGetAngularVel(IntPtr body) + { + unsafe { return *(BodyGetAngularVelUnsafe(body)); } + } +#endif + + [DllImport("ode", EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr BodyGetData(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] + public static extern int BodyGetFiniteRotationMode(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] + public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body); + public static Vector3 BodyGetForce(IntPtr body) + { + unsafe { return *(BodyGetForceUnsafe(body)); } + } +#endif + + [DllImport("ode", EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity] + public static extern bool BodyGetGravityMode(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity] + public static extern int BodyGetGyroscopicMode(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr BodyGetJoint(IntPtr body, int index); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body); + public static Vector3 BodyGetLinearVel(IntPtr body) + { + unsafe { return *(BodyGetLinearVelUnsafe(body)); } + } +#endif + + [DllImport("ode", EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity] + public static extern void BodyGetMass(IntPtr body, out Mass mass); + + [DllImport("ode", EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity] + public static extern int BodyGetNumJoints(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity] + public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body); + public static Vector3 BodyGetPosition(IntPtr body) + { + unsafe { return *(BodyGetPositionUnsafe(body)); } + } +#endif + + [DllImport("ode", EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity] + public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body); + public static Quaternion BodyGetQuaternion(IntPtr body) + { + unsafe { return *(BodyGetQuaternionUnsafe(body)); } + } +#endif + + [DllImport("ode", EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity] + public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); + + [DllImport("ode", EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity] + public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body); + public static Matrix3 BodyGetRotation(IntPtr body) + { + unsafe { return *(BodyGetRotationUnsafe(body)); } + } +#endif + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body); + public static Vector3 BodyGetTorque(IntPtr body) + { + unsafe { return *(BodyGetTorqueUnsafe(body)); } + } +#endif + + [DllImport("ode", EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr BodyGetWorld(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity] + public static extern bool BodyIsEnabled(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold); + + [DllImport("ode", EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetAutoDisableDefaults(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable); + + [DllImport("ode", EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold); + + [DllImport("ode", EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetAutoDisableSteps(IntPtr body, int steps); + + [DllImport("ode", EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetAutoDisableTime(IntPtr body, dReal time); + + [DllImport("ode", EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetData(IntPtr body, IntPtr data); + + [DllImport("ode", EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetFiniteRotationMode(IntPtr body, int mode); + + [DllImport("ode", EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetLinearDamping(IntPtr body, dReal scale); + + [DllImport("ode", EntryPoint = "dBodySetAngularDamping"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetAngularDamping(IntPtr body, dReal scale); + + [DllImport("ode", EntryPoint = "dBodyGetLinearDamping"), SuppressUnmanagedCodeSecurity] + public static extern dReal BodyGetLinearDamping(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetAngularDamping"), SuppressUnmanagedCodeSecurity] + public static extern dReal BodyGetAngularDamping(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodySetAngularDamping"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetDamping(IntPtr body, dReal linear_scale, dReal angular_scale); + + [DllImport("ode", EntryPoint = "dBodySetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetAngularDampingThreshold(IntPtr body, dReal threshold); + + [DllImport("ode", EntryPoint = "dBodySetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetLinearDampingThreshold(IntPtr body, dReal threshold); + + [DllImport("ode", EntryPoint = "dBodyGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] + public static extern dReal BodyGetLinearDampingThreshold(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] + public static extern dReal BodyGetAngularDampingThreshold(IntPtr body); + + [DllImport("ode", EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetGravityMode(IntPtr body, bool mode); + + /// + /// Sets the Gyroscopic term status on the body specified. + /// + /// Pointer to body + /// NonZero enabled, Zero disabled + [DllImport("ode", EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity] + public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled); + + [DllImport("ode", EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetMass(IntPtr body, ref Mass mass); + + [DllImport("ode", EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q); + + [DllImport("ode", EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetQuaternion(IntPtr body, ref dReal w); + + [DllImport("ode", EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetRotation(IntPtr body, ref Matrix3 R); + + [DllImport("ode", EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetRotation(IntPtr body, ref dReal M00); + + [DllImport("ode", EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity] + public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity] + public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); + + [DllImport("ode", EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity] + public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); + + [DllImport("ode", EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity] + public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1, + ref Vector3 side1, ref Vector3 p2, + ref Matrix3 R2, ref Vector3 side2, + ref Vector3 normal, out dReal depth, out int return_code, + int maxc, out ContactGeom contact, int skip); + + [DllImport("ode", EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity] + public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1, + ref Vector3 side1, ref Vector3 _p2, + ref Matrix3 R2, ref Vector3 side2); + + [DllImport("ode", EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity] + public static extern void CleanupODEAllDataForThread(); + + [DllImport("ode", EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity] + public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2, + ref Vector3 b1, ref Vector3 b2, + ref Vector3 cp1, ref Vector3 cp2); + + [DllImport("ode", EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity] + public static extern void CloseODE(); + + [DllImport("ode", EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] + public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip); + + [DllImport("ode", EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2); + + [DllImport("ode", EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz); + + [DllImport("ode", EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length); + + [DllImport("ode", EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); + + [DllImport("ode", EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length); + + [DllImport("ode", EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable); + + [DllImport("ode", EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateGeom(int classnum); + + [DllImport("ode", EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity] + public static extern int CreateGeomClass(ref GeomClass classptr); + + [DllImport("ode", EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateGeomTransform(IntPtr space); + + [DllImport("ode", EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d); + + [DllImport("ode", EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateRay(IntPtr space, dReal length); + + [DllImport("ode", EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateSphere(IntPtr space, dReal radius); + + [DllImport("ode", EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr CreateTriMesh(IntPtr space, IntPtr data, + TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback); + + [DllImport("ode", EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity] + public static extern dReal Dot(ref dReal X0, ref dReal X1, int n); + + [DllImport("ode", EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity] + public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q); + + [DllImport("ode", EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity] + public static extern int FactorCholesky(ref dReal A00, int n); + + [DllImport("ode", EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity] + public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip); + + [DllImport("ode", EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] + public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len); + + [DllImport("ode", EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] + public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x); + + [DllImport("ode", EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity] + public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity] + public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length); + + [DllImport("ode", EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity] + public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length); + + [DllImport("ode", EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity] + public static extern void GeomClearOffset(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos); + + [DllImport("ode", EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X); + + [DllImport("ode", EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q); + + [DllImport("ode", EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X); + + [DllImport("ode", EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R); + + [DllImport("ode", EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00); + + [DllImport("ode", EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos); + + [DllImport("ode", EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCopyPosition(IntPtr geom, out dReal X); + + [DllImport("ode", EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R); + + [DllImport("ode", EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCopyRotation(IntPtr geom, out dReal M00); + + [DllImport("ode", EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length); + + [DllImport("ode", EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length); + + [DllImport("ode", EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity] + public static extern void GeomDestroy(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity] + public static extern void GeomDisable(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity] + public static extern void GeomEnable(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] + public static extern void GeomGetAABB(IntPtr geom, out AABB aabb); + + [DllImport("ode", EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] + public static extern void GeomGetAABB(IntPtr geom, out dReal minX); + + [DllImport("ode", EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomGetBody(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity] + public static extern int GeomGetCategoryBits(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomGetClassData(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity] + public static extern int GeomGetCollideBits(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity] + public static extern GeomClassID GeomGetClass(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomGetData(IntPtr geom); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom); + public static Vector3 GeomGetOffsetPosition(IntPtr geom) + { + unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); } + } +#endif + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom); + public static Matrix3 GeomGetOffsetRotation(IntPtr geom) + { + unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); } + } +#endif + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom); + public static Vector3 GeomGetPosition(IntPtr geom) + { + unsafe { return *(GeomGetPositionUnsafe(geom)); } + } +#endif + + [DllImport("ode", EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q); + + [DllImport("ode", EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom); + public static Matrix3 GeomGetRotation(IntPtr geom) + { + unsafe { return *(GeomGetRotationUnsafe(geom)); } + } +#endif + + [DllImport("ode", EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomGetSpace(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData, + dReal width, dReal depth, int widthSamples, int depthSamples, + dReal scale, dReal offset, dReal thickness, int bWrap); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomHeightfieldDataCreate(); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataDestroy(IntPtr d); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g); + + [DllImport("ode", EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity] + public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d); + + [DllImport("ode", EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity] + public static extern bool GeomIsEnabled(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity] + public static extern bool GeomIsOffset(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity] + public static extern bool GeomIsSpace(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] + public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result); + + [DllImport("ode", EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] + public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A); + + [DllImport("ode", EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity] + public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity] + public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d); + + [DllImport("ode", EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] + public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir); + + [DllImport("ode", EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] + public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX); + + [DllImport("ode", EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity] + public static extern int GeomRayGetClosestHit(IntPtr ray); + + [DllImport("ode", EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity] + public static extern dReal GeomRayGetLength(IntPtr ray); + + [DllImport("ode", EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity] + public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull); + + [DllImport("ode", EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity] + public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz); + + [DllImport("ode", EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity] + public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit); + + [DllImport("ode", EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity] + public static extern void GeomRaySetLength(IntPtr ray, dReal length); + + [DllImport("ode", EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity] + public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull); + + [DllImport("ode", EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetBody(IntPtr geom, IntPtr body); + + [DllImport("ode", EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetCategoryBits(IntPtr geom, int bits); + + [DllImport("ode", EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetCollideBits(IntPtr geom, int bits); + + [DllImport("ode", EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); + + [DllImport("ode", EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetData(IntPtr geom, IntPtr data); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R); + + [DllImport("ode", EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00); + + [DllImport("ode", EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat); + + [DllImport("ode", EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w); + + [DllImport("ode", EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R); + + [DllImport("ode", EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSetRotation(IntPtr geom, ref dReal M00); + + [DllImport("ode", EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity] + public static extern dReal GeomSphereGetRadius(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity] + public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity] + public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius); + + [DllImport("ode", EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity] + public static extern int GeomTransformGetCleanup(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomTransformGetGeom(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity] + public static extern int GeomTransformGetInfo(IntPtr geom); + + [DllImport("ode", EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTransformSetCleanup(IntPtr geom, int mode); + + [DllImport("ode", EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj); + + [DllImport("ode", EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTransformSetInfo(IntPtr geom, int info); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildDouble(IntPtr d, + double[] vertices, int vertexStride, int vertexCount, + int[] indices, int indexCount, int triStride); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildDouble(IntPtr d, + IntPtr vertices, int vertexStride, int vertexCount, + IntPtr indices, int indexCount, int triStride); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildDouble1(IntPtr d, + double[] vertices, int vertexStride, int vertexCount, + int[] indices, int indexCount, int triStride, + double[] normals); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildDouble(IntPtr d, + IntPtr vertices, int vertexStride, int vertexCount, + IntPtr indices, int indexCount, int triStride, + IntPtr normals); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildSingle(IntPtr d, + dReal[] vertices, int vertexStride, int vertexCount, + int[] indices, int indexCount, int triStride); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildSingle(IntPtr d, + IntPtr vertices, int vertexStride, int vertexCount, + IntPtr indices, int indexCount, int triStride); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, + dReal[] vertices, int vertexStride, int vertexCount, + int[] indices, int indexCount, int triStride, + dReal[] normals); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, + IntPtr vertices, int vertexStride, int vertexCount, + IntPtr indices, int indexCount, int triStride, + IntPtr normals); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildSimple(IntPtr d, + float[] vertices, int vertexStride, int vertexCount, + int[] indices, int indexCount, int triStride); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildSimple(IntPtr d, + IntPtr vertices, int vertexStride, int vertexCount, + IntPtr indices, int indexCount, int triStride); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, + float[] vertices, int vertexStride, int vertexCount, + int[] indices, int indexCount, int triStride, + float[] normals); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, + IntPtr vertices, int vertexStride, int vertexCount, + IntPtr indices, int indexCount, int triStride, + IntPtr normals); + + [DllImport("ode", EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshClearTCCache(IntPtr g); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomTriMeshDataCreate(); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataDestroy(IntPtr d); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataPreprocess(IntPtr d); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data); + + [DllImport("ode", EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshDataUpdate(IntPtr d); + + [DllImport("ode", EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable); + + [DllImport("ode", EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity] + public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g); + + [DllImport("ode", EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity] + public static extern TriCallback GeomTriMeshGetCallback(IntPtr g); + + [DllImport("ode", EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomTriMeshGetData(IntPtr g); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity] + public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom); + public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom) + { + unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); } + } +#endif + + [DllImport("ode", EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity] + public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec); + + [DllImport("ode", EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity] + public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g); + + [DllImport("ode", EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity] + public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2); + + [DllImport("ode", EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity] + public extern static int GeomTriMeshGetTriangleCount(IntPtr g); + + [DllImport("ode", EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g); + + [DllImport("ode", EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity] + public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass); + + [DllImport("ode", EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback); + + [DllImport("ode", EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback); + + [DllImport("ode", EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data); + + [DllImport("ode", EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans); + + [DllImport("ode", EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00); + + [DllImport("ode", EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity] + public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback); + + [DllImport("ode", EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr HashSpaceCreate(IntPtr space); + + [DllImport("ode", EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity] + public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel); + + [DllImport("ode", EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity] + public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel); + + [DllImport("ode", EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity] + public static extern void InfiniteAABB(IntPtr geom, out AABB aabb); + + [DllImport("ode", EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity] + public static extern void InitODE(); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity] + public static extern int InitODE2(uint ODEInitFlags); +#endif + [DllImport("ode", EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity] + public static extern int IsPositiveDefinite(ref dReal A, int n); + + [DllImport("ode", EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity] + public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n); + + [DllImport("ode", EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity] + public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3); + + [DllImport("ode", EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity] + public static extern void JointAddHingeTorque(IntPtr joint, dReal torque); + + [DllImport("ode", EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity] + public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2); + + [DllImport("ode", EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity] + public static extern void JointAddPRTorque(IntPtr joint, dReal torque); + + [DllImport("ode", EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity] + public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2); + + [DllImport("ode", EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity] + public static extern void JointAddSliderForce(IntPtr joint, dReal force); + + [DllImport("ode", EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity] + public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2); + + [DllImport("ode", EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact); + + [DllImport("ode", EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group); + + [DllImport("ode", EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity] + public static extern void JointDestroy(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetAMotorAngle(IntPtr j, int anum); + + [DllImport("ode", EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum); + + [DllImport("ode", EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity] + public static extern int JointGetAMotorAxisRel(IntPtr j, int anum); + + [DllImport("ode", EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity] + public static extern int JointGetAMotorMode(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] + public static extern int JointGetAMotorNumAxes(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetAMotorParam(IntPtr j, int parameter); + + [DllImport("ode", EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointGetBody(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointGetData(IntPtr j); + +#if !dNO_UNSAFE_CODE + [CLSCompliant(false)] + [DllImport("ode", EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity] + public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j); + public static JointFeedback JointGetFeedback(IntPtr j) + { + unsafe { return *(JointGetFeedbackUnsafe(j)); } + } +#endif + + [DllImport("ode", EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetHingeAngle(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetHingeAngleRate(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetHingeParam(IntPtr j, int parameter); + + [DllImport("ode", EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetHinge2Angle1(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetHinge2Angle1Rate(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetHinge2Angle2Rate(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetHinge2Param(IntPtr j, int parameter); + + [DllImport("ode", EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] + public static extern int JointGetLMotorNumAxes(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetLMotorParam(IntPtr j, int parameter); + + [DllImport("ode", EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetPRParam(IntPtr j, int parameter); + + [DllImport("ode", EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetPRPosition(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetPRPositionRate(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetSliderParam(IntPtr j, int parameter); + + [DllImport("ode", EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetSliderPosition(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetSliderPositionRate(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity] + public static extern JointType JointGetType(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetUniversalAngle1(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetUniversalAngle1Rate(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetUniversalAngle2(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetUniversalAngle2Rate(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2); + + [DllImport("ode", EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity] + public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result); + + [DllImport("ode", EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity] + public static extern dReal JointGetUniversalParam(IntPtr j, int parameter); + + [DllImport("ode", EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr JointGroupCreate(int max_size); + + [DllImport("ode", EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity] + public static extern void JointGroupDestroy(IntPtr group); + + [DllImport("ode", EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity] + public static extern void JointGroupEmpty(IntPtr group); + + [DllImport("ode", EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle); + + [DllImport("ode", EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetAMotorMode(IntPtr j, int mode); + + [DllImport("ode", EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetAMotorNumAxes(IntPtr group, int num); + + [DllImport("ode", EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetData(IntPtr j, IntPtr data); + + [DllImport("ode", EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback); + + [DllImport("ode", EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetFixed(IntPtr j); + + [DllImport("ode", EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); + + [DllImport("ode", EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetLMotorNumAxes(IntPtr j, int num); + + [DllImport("ode", EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); + + [DllImport("ode", EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity] + public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value); + + [DllImport("ode", EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity] + public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip); + + [DllImport("ode", EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity] + public static extern void MassAdd(ref Mass a, ref Mass b); + + [DllImport("ode", EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity] + public static extern void MassAdjust(ref Mass m, dReal newmass); + + [DllImport("ode", EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity] + public static extern bool MassCheck(ref Mass m); + + [DllImport("ode", EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] + public static extern void MassRotate(out Mass mass, ref Matrix3 R); + + [DllImport("ode", EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] + public static extern void MassRotate(out Mass mass, ref dReal M00); + + [DllImport("ode", EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz); + + [DllImport("ode", EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz); + + [DllImport("ode", EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length); + + [DllImport("ode", EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); + + [DllImport("ode", EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length); + + [DllImport("ode", EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); + + [DllImport("ode", EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetParameters(out Mass mass, dReal themass, + dReal cgx, dReal cgy, dReal cgz, + dReal i11, dReal i22, dReal i33, + dReal i12, dReal i13, dReal i23); + + [DllImport("ode", EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius); + + [DllImport("ode", EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity] + public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius); + + [DllImport("ode", EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g); + + [DllImport("ode", EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity] + public static extern void MassSetZero(out Mass mass); + + [DllImport("ode", EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity] + public static extern void MassTranslate(out Mass mass, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity] + public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); + + [DllImport("ode", EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity] + public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); + + [DllImport("ode", EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity] + public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); + + [DllImport("ode", EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] + public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle); + + [DllImport("ode", EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity] + public static extern void QfromR(out Quaternion q, ref Matrix3 R); + + [DllImport("ode", EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity] + public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); + + [DllImport("ode", EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity] + public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); + + [DllImport("ode", EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity] + public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); + + [DllImport("ode", EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity] + public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); + + [DllImport("ode", EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity] + public static extern void QSetIdentity(out Quaternion q); + + [DllImport("ode", EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth); + + [DllImport("ode", EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth); + + [DllImport("ode", EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity] + public static extern dReal RandReal(); + + [DllImport("ode", EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity] + public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz); + + [DllImport("ode", EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] + public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle); + + [DllImport("ode", EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity] + public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi); + + [DllImport("ode", EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity] + public static extern void RfromQ(out Matrix3 R, ref Quaternion q); + + [DllImport("ode", EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity] + public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az); + + [DllImport("ode", EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity] + public static extern void RSetIdentity(out Matrix3 R); + + [DllImport("ode", EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity] + public static extern void SetValue(out dReal a, int n); + + [DllImport("ode", EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity] + public static extern void SetZero(out dReal a, int n); + + [DllImport("ode", EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr SimpleSpaceCreate(IntPtr space); + + [DllImport("ode", EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity] + public static extern void SolveCholesky(ref dReal L, out dReal b, int n); + + [DllImport("ode", EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity] + public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip); + + [DllImport("ode", EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity] + public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip); + + [DllImport("ode", EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity] + public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip); + + [DllImport("ode", EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity] + public static extern void SpaceAdd(IntPtr space, IntPtr geom); + + [DllImport("ode", EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity] + public static extern void SpaceClean(IntPtr space); + + [DllImport("ode", EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity] + public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback); + + [DllImport("ode", EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity] + public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback); + + [DllImport("ode", EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity] + public static extern void SpaceDestroy(IntPtr space); + + [DllImport("ode", EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity] + public static extern bool SpaceGetCleanup(IntPtr space); + + [DllImport("ode", EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity] + public static extern int SpaceGetNumGeoms(IntPtr space); + + [DllImport("ode", EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr SpaceGetGeom(IntPtr space, int i); + + [DllImport("ode", EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity] + public static extern int SpaceGetSublevel(IntPtr space); + + [DllImport("ode", EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity] + public static extern bool SpaceQuery(IntPtr space, IntPtr geom); + + [DllImport("ode", EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity] + public static extern void SpaceRemove(IntPtr space, IntPtr geom); + + [DllImport("ode", EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity] + public static extern void SpaceSetCleanup(IntPtr space, bool mode); + + [DllImport("ode", EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity] + public static extern void SpaceSetSublevel(IntPtr space, int sublevel); + + [DllImport("ode", EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder); + + [DllImport("ode", EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity] + public static extern void VectorScale(out dReal a, ref dReal d, int n); + + [DllImport("ode", EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity] + public static extern IntPtr WorldCreate(); + + [DllImport("ode", EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity] + public static extern void WorldDestroy(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] + public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] + public static extern bool WorldGetAutoDisableFlag(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] + public static extern int WorldGetAutoDisableSteps(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetAutoDisableTime(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] + public static extern int WorldGetAutoEnableDepthSF1(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetCFM(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetERP(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] + public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity); + + [DllImport("ode", EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] + public static extern void WorldGetGravity(IntPtr world, out dReal X); + + [DllImport("ode", EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetContactSurfaceLayer(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetAngularDamping(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetAngularDampingThreshold(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetLinearDamping"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetLinearDamping(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetLinearDampingThreshold(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] + public static extern int WorldGetQuickStepNumIterations(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetQuickStepW(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] + public static extern dReal WorldGetMaxAngularSpeed(IntPtr world); + + [DllImport("ode", EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] + public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force); + + [DllImport("ode", EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] + public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX); + + [DllImport("ode", EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity] + public static extern void WorldQuickStep(IntPtr world, dReal stepsize); + + [DllImport("ode", EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetAngularDamping(IntPtr world, dReal scale); + + [DllImport("ode", EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold); + + [DllImport("ode", EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold); + + [DllImport("ode", EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count); + + [DllImport("ode", EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable); + + [DllImport("ode", EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold); + + [DllImport("ode", EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps); + + [DllImport("ode", EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time); + + [DllImport("ode", EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth); + + [DllImport("ode", EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetCFM(IntPtr world, dReal cfm); + + [DllImport("ode", EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel); + + [DllImport("ode", EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth); + + [DllImport("ode", EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale); + + [DllImport("ode", EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetERP(IntPtr world, dReal erp); + + [DllImport("ode", EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z); + + [DllImport("ode", EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetLinearDamping(IntPtr world, dReal scale); + + [DllImport("ode", EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold); + + [DllImport("ode", EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num); + + [DllImport("ode", EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation); + + [DllImport("ode", EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] + public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed); + + [DllImport("ode", EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity] + public static extern void WorldStep(IntPtr world, dReal stepsize); + + [DllImport("ode", EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity] + public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations); + + + } +} diff -Nru ode-0.11.1/contrib/Ode.NET/Ode/premake.lua ode-0.14/contrib/Ode.NET/Ode/premake.lua --- ode-0.11.1/contrib/Ode.NET/Ode/premake.lua 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/Ode/premake.lua 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,31 @@ +package.name = "Ode.NET" +package.kind = "dll" +package.language = "c#" + +-- Build options + + package.defines = { } + + if (options["with-doubles"]) then + table.insert(package.defines, "dDOUBLE") + else + table.insert(package.defines, "dSINGLE") + end + + if (options["no-unsafe"]) then + table.insert(package.defines, "dNO_UNSAFE_CODE") + else + package.buildflags = { "unsafe" } + end + + +-- Files & Libraries + + package.files = { + "AssemblyInfo.cs", + "Ode.cs" + } + + package.links = { + "System" + } diff -Nru ode-0.11.1/contrib/Ode.NET/premake.lua ode-0.14/contrib/Ode.NET/premake.lua --- ode-0.11.1/contrib/Ode.NET/premake.lua 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/premake.lua 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,29 @@ +project.name = "Ode.NET" + +-- Target checking + + if (target and target ~= "vs2005" and target ~= "gnu") then + error("Ode.NET requires a .NET 2.0 compiler") + end + + +-- Project options + + addoption("with-doubles", "Use double instead of float as base numeric type") + addoption("with-tests", "Builds the test applications and DrawStuff library") + addoption("no-unsafe", "Exclude functions using unsafe code (dBodyGetPosition, etc.)") + + +-- Build settings + + project.config["Debug"].bindir = "bin/Debug" + project.config["Release"].bindir = "bin/Release" + + +-- Packages + + if (options["with-tests"]) then + dopackage("Tests") + dopackage("Drawstuff") + end + dopackage("Ode") diff -Nru ode-0.11.1/contrib/Ode.NET/README.TXT ode-0.14/contrib/Ode.NET/README.TXT --- ode-0.11.1/contrib/Ode.NET/README.TXT 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/README.TXT 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,68 @@ +Ode.NET - .NET bindings for ODE +Jason Perkins (starkos@industriousone.com) + + +--------------------------------------------------------------------- + INSTALLATION +--------------------------------------------------------------------- + + This binding uses a C# 2.0 feature (the UnmanagedFunctionPointer + attribute). You will need to use Visual Studio 2005 (C# Express is + fine) or Mono's gmcs compiler. + + Start by getting or building ODE as a shared library (DLL). + + The simplest way to build the bindings is probably to create a + new library assembly in your tool of choice and drop in the files + Ode/Ode.cs and Ode/AssemblyInfo.cs (optional). Define the symbol + `dDOUBLE` if you used double-precision math in your ode.dll. + Build, done. + + For testing purposes, I have also created bindings for the + Drawstuff library and a C# version of the BoxStack demo. You can + throw all of these files into a console executable and run it to + see the demo. + + If you happen to have Premake installed (http://premake.sf.net/), + you can generate build scripts for the library with: + + premake --target (toolset) # for single precision + premake --with-doubles --target (toolset) # for double precision + + To build the test application too, use: + + premake --with-tests --target (toolset) + + To build with Mono, you must add the --dotnet parameter to enable + support .NET 2.0: + + premake --dotnet mono2 --target gnu + + +--------------------------------------------------------------------- + USAGE +--------------------------------------------------------------------- + + I have tried to keep things as close to the original C API as I can, + rather than forcing a class structure on everyone. Everything is + contained within the `Ode.NET` namespace inside a static class + named `d`. All ODE IDs are replaced with IntPtrs. A quick example: + + using Ode.NET; + + IntPtr world = d.WorldCreate(); + IntPtr body = d.BodyCreate(world); + + Take a look at Tests/BoxStack.cs for a more complete example. + + +--------------------------------------------------------------------- + KNOWN ISSUES +--------------------------------------------------------------------- + + While I managed to map most of the API, there may still be some bits + missing. If you find something, please submit a bug report or patch + the Tracker on SourceForge. + + Collision response (contact joints) do not work when built under + Mono as double-precision. I have not tried to track down why. diff -Nru ode-0.11.1/contrib/Ode.NET/Tests/BoxStack.cs ode-0.14/contrib/Ode.NET/Tests/BoxStack.cs --- ode-0.11.1/contrib/Ode.NET/Tests/BoxStack.cs 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/Tests/BoxStack.cs 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,261 @@ +using System; +using System.Collections.Generic; +using Drawstuff.NET; + +namespace Ode.NET +{ +#if dDOUBLE + using dReal = System.Double; +#else + using dReal = System.Single; +#endif + + public class TestBoxStack + { + #region Description of convex shape + + static dReal[] planes = + { + 1.0f, 0.0f, 0.0f, 0.25f, + 0.0f, 1.0f, 0.0f, 0.25f, + 0.0f, 0.0f, 1.0f, 0.25f, + 0.0f, 0.0f, -1.0f, 0.25f, + 0.0f, -1.0f, 0.0f, 0.25f, + -1.0f, 0.0f , 0.0f, 0.25f + }; + + static dReal[] points = + { + 0.25f, 0.25f, 0.25f, + -0.25f, 0.25f, 0.25f, + 0.25f, -0.25f, 0.25f, + -0.25f, -0.25f, 0.25f, + 0.25f, 0.25f, -0.25f, + -0.25f,0.25f,-0.25f, + 0.25f,-0.25f,-0.25f, + -0.25f,-0.25f,-0.25f, + }; + + static int[] polygons = + { + 4, 0, 2, 6, 4, + 4, 1, 0, 4, 5, + 4, 0, 1, 3, 2, + 4, 3, 1, 5, 7, + 4, 2, 3, 7, 6, + 4, 5, 4, 6, 7, + }; + + #endregion + + const int NUM = 100; + const float DENSITY = 5.0f; + const int MAX_CONTACTS = 8; + + static IntPtr world; + static IntPtr space; + static IntPtr contactgroup; + + static Queue obj = new Queue(); + + static d.Vector3 xyz = new d.Vector3(2.1640f, -1.3079f, 1.7600f); + static d.Vector3 hpr = new d.Vector3(125.5000f, -17.0000f, 0.0000f); + + static d.NearCallback nearCallback = near; + static d.ContactGeom[] contacts = new d.ContactGeom[MAX_CONTACTS]; + static d.Contact contact; + + + // Called when window is opened - sets up viewpoint and prints usage + static void start(int unused) + { + ds.SetViewpoint(ref xyz, ref hpr); + Console.WriteLine("To drop another object, press:"); + Console.WriteLine(" b for box."); + Console.WriteLine(" s for sphere."); + Console.WriteLine(" c for capsule."); + Console.WriteLine(" y for cylinder."); + Console.WriteLine(" v for a convex object."); + Console.WriteLine(" x for a composite object."); + Console.WriteLine("To select an object, press space."); + Console.WriteLine("To disable the selected object, press d."); + Console.WriteLine("To enable the selected object, press e."); + Console.WriteLine("To toggle showing the geom AABBs, press a."); + Console.WriteLine("To toggle showing the contact points, press t."); + Console.WriteLine("To toggle dropping from random position/orientation, press r."); + Console.WriteLine("To save the current state to 'state.dif', press 1."); + } + + + // Near callback - creates contact joints + static void near(IntPtr space, IntPtr g1, IntPtr g2) + { + IntPtr b1 = d.GeomGetBody(g1); + IntPtr b2 = d.GeomGetBody(g2); + if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact)) + return; + + int count = d.Collide(g1, g2, MAX_CONTACTS, contacts, d.ContactGeom.SizeOf); + for (int i = 0; i < count; ++i) + { + contact.geom = contacts[i]; + IntPtr joint = d.JointCreateContact(world, contactgroup, ref contact); + d.JointAttach(joint, b1, b2); + } + } + + + // Adds a new object to the scene - attaches a body to the geom and + // sets the initial position and orientation + static void addObject(IntPtr geom, d.Mass mass) + { + // Create a body for this object + IntPtr body = d.BodyCreate(world); + d.GeomSetBody(geom, body); + d.BodySetMass(body, ref mass); + obj.Enqueue(geom); + + // Set the position of the new object + d.Matrix3 R; + d.BodySetPosition(body, d.RandReal() * 2 - 1, d.RandReal() * 2 - 1, d.RandReal() + 2); + d.RFromAxisAndAngle(out R, d.RandReal() * 2 - 1, d.RandReal() * 2 - 1, d.RandReal() * 2 - 1, d.RandReal() * 10 - 5); + d.BodySetRotation(body, ref R); + + // Cap the total number of objects + if (obj.Count > NUM) + { + geom = obj.Dequeue(); + body = d.GeomGetBody(geom); + d.BodyDestroy(body); + d.GeomDestroy(geom); + } + } + + + // Keyboard callback + static void command(int cmd) + { + IntPtr geom; + d.Mass mass; + d.Vector3 sides = new d.Vector3(d.RandReal() * 0.5f + 0.1f, d.RandReal() * 0.5f + 0.1f, d.RandReal() * 0.5f + 0.1f); + + Char ch = Char.ToLower((Char)cmd); + switch ((Char)ch) + { + case 'b': + d.MassSetBox(out mass, DENSITY, sides.X, sides.Y, sides.Z); + geom = d.CreateBox(space, sides.X, sides.Y, sides.Z); + addObject(geom, mass); + break; + + case 'c': + sides.X *= 0.5f; + d.MassSetCapsule(out mass, DENSITY, 3, sides.X, sides.Y); + geom = d.CreateCapsule(space, sides.X, sides.Y); + addObject(geom, mass); + break; + + case 'v': + d.MassSetBox(out mass, DENSITY, 0.25f, 0.25f, 0.25f); + geom = d.CreateConvex(space, planes, planes.Length / 4, points, points.Length / 3, polygons); + addObject(geom, mass); + break; + } + } + + + // Draw an object in the scene + static void drawGeom(IntPtr geom) + { + IntPtr body = d.GeomGetBody(geom); + + d.Vector3 pos; + d.BodyCopyPosition(body, out pos); + + d.Matrix3 R; + d.BodyCopyRotation(body, out R); + + d.GeomClassID type = d.GeomGetClass(geom); + switch (type) + { + case d.GeomClassID.BoxClass: + d.Vector3 sides; + d.GeomBoxGetLengths(geom, out sides); + ds.DrawBox(ref pos, ref R, ref sides); + break; + case d.GeomClassID.CapsuleClass: + dReal radius, length; + d.GeomCapsuleGetParams(geom, out radius, out length); + ds.DrawCapsule(ref pos, ref R, length, radius); + break; + case d.GeomClassID.ConvexClass: + ds.DrawConvex(ref pos, ref R, planes, planes.Length / 4, points, points.Length / 3, polygons); + break; + } + } + + + // Called once per frame; updates the scene + static void step(int pause) + { + d.SpaceCollide(space, IntPtr.Zero, nearCallback); + if (pause == 0) + d.WorldQuickStep(world, 0.02f); + d.JointGroupEmpty(contactgroup); + + ds.SetColor(1.0f, 1.0f, 0.0f); + ds.SetTexture(ds.Texture.Wood); + + foreach (IntPtr geom in obj) + { + drawGeom(geom); + } + } + + + static void Main(string[] args) + { + dInitODE(); + // Setup pointers to drawstuff callback functions + ds.Functions fn; + fn.version = ds.VERSION; + fn.start = new ds.CallbackFunction(start); + fn.step = new ds.CallbackFunction(step); + fn.command = new ds.CallbackFunction(command); + fn.stop = null; + fn.path_to_textures = "../../../../drawstuff/textures"; + if (args.Length > 0) + { + fn.path_to_textures = args[0]; + } + + // Set up contact response parameters + contact.surface.mode = d.ContactFlags.Bounce | d.ContactFlags.SoftCFM; + contact.surface.mu = d.Infinity; + contact.surface.mu2 = 0.0f; + contact.surface.bounce = 0.1f; + contact.surface.bounce_vel = 0.1f; + contact.surface.soft_cfm = 0.01f; + + // Initialize the scene + world = d.WorldCreate(); + space = d.HashSpaceCreate(IntPtr.Zero); + contactgroup = d.JointGroupCreate(0); + d.WorldSetGravity(world, 0.0f, 0.0f, -0.5f); + d.WorldSetCFM(world, 1e-5f); + d.WorldSetAutoDisableFlag(world, true); + d.WorldSetContactMaxCorrectingVel(world, 0.1f); + d.WorldSetContactSurfaceLayer(world, 0.001f); + d.CreatePlane(space, 0, 0, 1, 0); + + // Run the scene + ds.SimulationLoop(args.Length, args, 352, 288, ref fn); + + // Clean up + d.JointGroupDestroy(contactgroup); + d.SpaceDestroy(space); + d.WorldDestroy(world); + d.CloseODE(); + } + } +} diff -Nru ode-0.11.1/contrib/Ode.NET/Tests/premake.lua ode-0.14/contrib/Ode.NET/Tests/premake.lua --- ode-0.11.1/contrib/Ode.NET/Tests/premake.lua 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/Ode.NET/Tests/premake.lua 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,27 @@ +-- This function creates the test packages +function maketest(name) + + package = newpackage() + package.name = name + package.kind = "exe" + package.language = "c#" + + if (options["with-doubles"]) then + package.defines = { "dDOUBLE" } + else + package.defines = { "dSINGLE " } + end + + package.links = { + "System", + "Ode.NET", + "Drawstuff.NET" + } + + package.files = { + name .. ".cs" + } + +end + +maketest("BoxStack") diff -Nru ode-0.11.1/contrib/README ode-0.14/contrib/README --- ode-0.11.1/contrib/README 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/README 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,19 @@ +This directory contains ODE-related things that have been generously +contributed by ODE's users. Why is this stuff here and not integrated +into the main ODE source tree? There may be several reasons: + + * The author(s) and ODE maintainers(s) may not have had time to do + the job. + + * It may not be finished. + + * It may contribute functionality that is useful but not considered + to be part of ODE's core. + +No guarantees are made about the code in this directory - it may not +be documented, it may not have been tested, and it may not even +compile for you. + +Each package has its own subdirectory, with a README file in that +directory explaining what the package is. + diff -Nru ode-0.11.1/contrib/TerrainAndCone/collision_std_internal.h ode-0.14/contrib/TerrainAndCone/collision_std_internal.h --- ode-0.11.1/contrib/TerrainAndCone/collision_std_internal.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/TerrainAndCone/collision_std_internal.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,100 @@ +//Benoit CHAPEROT 2003-2004 www.jstarlab.com +#ifndef _ODE_COLLISION_STD_INTERNAL_H_ +#define _ODE_COLLISION_STD_INTERNAL_H_ + +#include +#include "collision_kernel.h" + +struct dxSphere : public dxGeom { + dReal radius; // sphere radius + dxSphere (dSpaceID space, dReal _radius); + void computeAABB(); +}; + + +struct dxBox : public dxGeom { + dVector3 side; // side lengths (x,y,z) + dxBox (dSpaceID space, dReal lx, dReal ly, dReal lz); + void computeAABB(); +}; + + +struct dxCCylinder : public dxGeom { + dReal radius,lz; // radius, length along z axis + dxCCylinder (dSpaceID space, dReal _radius, dReal _length); + void computeAABB(); +}; + + +struct dxPlane : public dxGeom { + dReal p[4]; + dxPlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d); + void computeAABB(); +}; + +struct dxCylinder : public dxGeom { + dReal radius,lz; // radius, length along z axis + dxCylinder (dSpaceID space, dReal _radius, dReal _length); + void computeAABB(); +}; + +struct dxCone : public dxGeom { + dReal radius,lz; + dxCone(dSpaceID space, dReal _radius,dReal _length); + ~dxCone(); + void computeAABB(); +}; + +struct dxRay : public dxGeom { + dReal length; + dxRay (dSpaceID space, dReal _length); + void computeAABB(); +}; + +struct dxTerrainY : public dxGeom { + dReal m_vLength; + dReal *m_pHeights; + dReal m_vMinHeight; + dReal m_vMaxHeight; + dReal m_vNodeLength; + int m_nNumNodesPerSide; + int m_nNumNodesPerSideShift; + int m_nNumNodesPerSideMask; + int m_bFinite; + dxTerrainY(dSpaceID space, dReal *pHeights,dReal vLength,int nNumNodesPerSide, int bFinite, int bPlaceable); + ~dxTerrainY(); + void computeAABB(); + dReal GetHeight(dReal x,dReal z); + dReal GetHeight(int x,int z); + int dCollideTerrainUnit(int x,int z,dxGeom *o2,int numMaxContacts,int flags,dContactGeom *contact, int skip); + bool IsOnTerrain(int nx,int nz,int w,dReal *pos); +}; + +struct dxTerrainZ : public dxGeom { + dReal m_vLength; + dReal *m_pHeights; + dReal m_vMinHeight; + dReal m_vMaxHeight; + dReal m_vNodeLength; + int m_nNumNodesPerSide; + int m_nNumNodesPerSideShift; + int m_nNumNodesPerSideMask; + int m_bFinite; + dxTerrainZ(dSpaceID space, dReal *pHeights,dReal vLength,int nNumNodesPerSide, int bFinite, int bPlaceable); + ~dxTerrainZ(); + void computeAABB(); + dReal GetHeight(dReal x,dReal y); + dReal GetHeight(int x,int y); + int dCollideTerrainUnit(int x,int y,dxGeom *o2,int numMaxContacts,int flags,dContactGeom *contact, int skip); + bool IsOnTerrain(int nx,int ny,int w,dReal *pos); +}; + +#ifndef MIN +#define MIN(a,b) ((ab)?a:b) +#endif + +#endif //_ODE_COLLISION_STD_INTERNAL_H_ \ No newline at end of file diff -Nru ode-0.11.1/contrib/TerrainAndCone/dCone.cpp ode-0.14/contrib/TerrainAndCone/dCone.cpp --- ode-0.11.1/contrib/TerrainAndCone/dCone.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/TerrainAndCone/dCone.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,504 @@ +//Benoit CHAPEROT 2003-2004 www.jstarlab.com +//some code inspired by Magic Software +#include +#include +#include +#include +#include +#include "collision_kernel.h" +#include "collision_std.h" +#include "collision_std_internal.h" +#include "collision_util.h" +#include +#include "windows.h" +#include "ode\ode.h" + +#define CONTACT(p,skip) ((dContactGeom*) (((char*)p) + (skip))) +const dReal fEPSILON = 1e-9f; + +dxCone::dxCone (dSpaceID space, dReal _radius,dReal _length) : +dxGeom (space,1) +{ + dAASSERT(_radius > 0.f); + dAASSERT(_length > 0.f); + type = dConeClass; + radius = _radius; + lz = _length; +} + +dxCone::~dxCone() +{ +} + +void dxCone::computeAABB() +{ + const dMatrix3& R = final_posr->R; + const dVector3& pos = final_posr->pos; + + dReal xrange = dFabs(R[2] * lz) + radius; + dReal yrange = dFabs(R[6] * lz) + radius; + dReal zrange = dFabs(R[10] * lz) + radius; + aabb[0] = pos[0] - xrange; + aabb[1] = pos[0] + xrange; + aabb[2] = pos[1] - yrange; + aabb[3] = pos[1] + yrange; + aabb[4] = pos[2] - zrange; + aabb[5] = pos[2] + zrange; +} + +dGeomID dCreateCone(dSpaceID space, dReal _radius,dReal _length) +{ + return new dxCone(space,_radius,_length); +} + +void dGeomConeSetParams (dGeomID g, dReal _radius, dReal _length) +{ + dUASSERT (g && g->type == dConeClass,"argument not a cone"); + dAASSERT (_radius > 0.f); + dAASSERT (_length > 0.f); + g->recomputePosr(); + dxCone *c = (dxCone*) g; + c->radius = _radius; + c->lz = _length; + dGeomMoved (g); +} + + +void dGeomConeGetParams (dGeomID g, dReal *_radius, dReal *_length) +{ + dUASSERT (g && g->type == dConeClass,"argument not a cone"); + g->recomputePosr(); + dxCone *c = (dxCone*) g; + *_radius = c->radius; + *_length = c->lz; +} + +//positive inside +dReal dGeomConePointDepth(dGeomID g, dReal x, dReal y, dReal z) +{ + dUASSERT (g && g->type == dConeClass,"argument not a cone"); + + g->recomputePosr(); + dxCone *cone = (dxCone*) g; + + dVector3 tmp,q; + tmp[0] = x - cone->final_posr->pos[0]; + tmp[1] = y - cone->final_posr->pos[1]; + tmp[2] = z - cone->final_posr->pos[2]; + dMULTIPLY1_331 (q,cone->final_posr->R,tmp); + + dReal r = cone->radius; + dReal h = cone->lz; + + dReal d0 = (r - r*q[2]/h) - dSqrt(q[0]*q[0]+q[1]*q[1]); + dReal d1 = q[2]; + dReal d2 = h-q[2]; + + if (d0 < d1) { + if (d0 < d2) return d0; else return d2; + } + else { + if (d1 < d2) return d1; else return d2; + } +} + +//plane plane +bool FindIntersectionPlanePlane(const dReal Plane0[4], const dReal Plane1[4], + dVector3 LinePos,dVector3 LineDir) +{ + // If Cross(N0,N1) is zero, then either planes are parallel and separated + // or the same plane. In both cases, 'false' is returned. Otherwise, + // the intersection line is + // + // L(t) = t*Cross(N0,N1) + c0*N0 + c1*N1 + // + // for some coefficients c0 and c1 and for t any real number (the line + // parameter). Taking dot products with the normals, + // + // d0 = Dot(N0,L) = c0*Dot(N0,N0) + c1*Dot(N0,N1) + // d1 = Dot(N1,L) = c0*Dot(N0,N1) + c1*Dot(N1,N1) + // + // which are two equations in two unknowns. The solution is + // + // c0 = (Dot(N1,N1)*d0 - Dot(N0,N1)*d1)/det + // c1 = (Dot(N0,N0)*d1 - Dot(N0,N1)*d0)/det + // + // where det = Dot(N0,N0)*Dot(N1,N1)-Dot(N0,N1)^2. +/* + Real fN00 = rkPlane0.Normal().SquaredLength(); + Real fN01 = rkPlane0.Normal().Dot(rkPlane1.Normal()); + Real fN11 = rkPlane1.Normal().SquaredLength(); + Real fDet = fN00*fN11 - fN01*fN01; + + if ( Math::FAbs(fDet) < gs_fEpsilon ) + return false; + + Real fInvDet = 1.0f/fDet; + Real fC0 = (fN11*rkPlane0.Constant() - fN01*rkPlane1.Constant())*fInvDet; + Real fC1 = (fN00*rkPlane1.Constant() - fN01*rkPlane0.Constant())*fInvDet; + + rkLine.Direction() = rkPlane0.Normal().Cross(rkPlane1.Normal()); + rkLine.Origin() = fC0*rkPlane0.Normal() + fC1*rkPlane1.Normal(); + return true; +*/ + dReal fN00 = dLENGTHSQUARED(Plane0); + dReal fN01 = dDOT(Plane0,Plane1); + dReal fN11 = dLENGTHSQUARED(Plane1); + dReal fDet = fN00*fN11 - fN01*fN01; + + if ( fabs(fDet) < fEPSILON) + return false; + + dReal fInvDet = 1.0f/fDet; + dReal fC0 = (fN11*Plane0[3] - fN01*Plane1[3])*fInvDet; + dReal fC1 = (fN00*Plane1[3] - fN01*Plane0[3])*fInvDet; + + dCROSS(LineDir,=,Plane0,Plane1); + dNormalize3(LineDir); + + dVector3 Temp0,Temp1; + dOPC(Temp0,*,Plane0,fC0); + dOPC(Temp1,*,Plane1,fC1); + dOP(LinePos,+,Temp0,Temp1); + + return true; +} + +//plane ray +bool FindIntersectionPlaneRay(const dReal Plane[4], + const dVector3 &LinePos,const dVector3 &LineDir, + dReal &u,dVector3 &Pos) +{ +/* + u = (A*X1 + B*Y1 + C*Z1 + D) / (A*(X1-X2) + B*(Y1-Y2)+C*(Z1-Z2)) +*/ + dReal fDet = -dDot(Plane,LineDir,3); + + if ( fabs(fDet) < fEPSILON) + return false; + + u = (dDot(Plane,LinePos,3) - Plane[3]) / fDet; + dOPC(Pos,*,LineDir,u); + dOPE(Pos,+=,LinePos); + + return true; +} + +int SolveQuadraticPolynomial(dReal a,dReal b,dReal c,dReal &x0,dReal &x1) +{ + dReal d = b*b - 4*a*c; + int NumRoots = 0; + dReal dr; + + if (d < 0.f) + return NumRoots; + + if (d == 0.f) + { + NumRoots = 1; + dr = 0.f; + } + else + { + NumRoots = 2; + dr = sqrtf(d); + } + + x0 = (-b -dr) / (2.f * a); + x1 = (-b +dr) / (2.f * a); + + return NumRoots; +} +/* +const int VALID_INTERSECTION = 1<<0; +const int POS_TEST_FAILEDT0 = 1<<0; +const int POS_TEST_FAILEDT1 = 1<<1; +*/ +int ProcessConeRayIntersectionPoint( dReal r,dReal h, + const dVector3 &q,const dVector3 &v,dReal t, + dVector3 &p, + dVector3 &n, + int &f) +{ + dOPC(p,*,v,t); + dOPE(p,+=,q); + n[0] = 2*p[0]; + n[1] = 2*p[1]; + n[2] = -2*p[2]*r*r/(h*h); + + f = 0; + if (p[2] > h) return 0; + if (p[2] < 0) return 0; + if (t > 1) return 0; + if (t < 0) return 0; + + return 1; +} + +//cone ray +//line in cone space (position,direction) +//distance from line position (direction normalized)(if any) +//return the number of intersection +int FindIntersectionConeRay(dReal r,dReal h, + const dVector3 &q,const dVector3 &v,dContactGeom *pContact) +{ + dVector3 qp,vp; + dOPE(qp,=,q); + dOPE(vp,=,v); + qp[2] = h-q[2]; + vp[2] = -v[2]; + dReal ts = (r/h); + ts *= ts; + dReal a = vp[0]*vp[0] + vp[1]*vp[1] - ts*vp[2]*vp[2]; + dReal b = 2.f*qp[0]*vp[0] + 2.f*qp[1]*vp[1] - 2.f*ts*qp[2]*vp[2]; + dReal c = qp[0]*qp[0] + qp[1]*qp[1] - ts*qp[2]*qp[2]; + +/* + dReal a = v[0]*v[0] + v[1]*v[1] - (v[2]*v[2]*r*r) / (h*h); + dReal b = 2.f*q[0]*v[0] + 2.f*q[1]*v[1] + 2.f*r*r*v[2]/h - 2*r*r*q[0]*v[0]/(h*h); + dReal c = q[0]*q[0] + q[1]*q[1] + 2*r*r*q[2]/h - r*r*q[2]/(h*h) - r*r; +*/ + int nNumRoots=SolveQuadraticPolynomial(a,b,c,pContact[0].depth,pContact[1].depth); + int flag = 0; + + dContactGeom ValidContact[2]; + + int nNumValidContacts = 0; + for (int i=0;i=0) && (d<=1)) + { + dOPC(vp,*,v,d); + dOP(qp,+,q,vp); + + if (qp[0]*qp[0]+qp[1]*qp[1] < r*r) + { + dOPE(ValidContact[nNumValidContacts].pos,=,qp); + ValidContact[nNumValidContacts].normal[0] = 0.f; + ValidContact[nNumValidContacts].normal[1] = 0.f; + ValidContact[nNumValidContacts].normal[2] = -1.f; + ValidContact[nNumValidContacts].depth = d; + nNumValidContacts++; + } + } + } + + if (nNumValidContacts == 2) + { + if (ValidContact[0].depth > ValidContact[1].depth) + { + pContact[0] = ValidContact[1]; + pContact[1] = ValidContact[0]; + } + else + { + pContact[0] = ValidContact[0]; + pContact[1] = ValidContact[1]; + } + } + else if (nNumValidContacts == 1) + { + pContact[0] = ValidContact[0]; + } + + return nNumValidContacts; +} + +int dCollideConePlane (dxGeom *o1, dxGeom *o2, int flags, + dContactGeom *contact, int skip) +{ + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (o1->type == dConeClass); + dIASSERT (o2->type == dPlaneClass); + dxCone *cone = (dxCone*) o1; + dxPlane *plane = (dxPlane*) o2; + + contact->g1 = o1; + contact->g2 = o2; + + dVector3 p0,p1,pp0,pp1; + dOPE(p0,=,cone->final_posr->pos); + p1[0] = cone->final_posr->R[0*4+2] * cone->lz + p0[0]; + p1[1] = cone->final_posr->R[1*4+2] * cone->lz + p0[1]; + p1[2] = cone->final_posr->R[2*4+2] * cone->lz + p0[2]; + + dReal u; + FindIntersectionPlaneRay(plane->p,p0,plane->p,u,pp0); + FindIntersectionPlaneRay(plane->p,p1,plane->p,u,pp1); + + if (dDISTANCE(pp0,pp1) < fEPSILON) + { + p1[0] = cone->final_posr->R[0*4+0] * cone->lz + p0[0]; + p1[1] = cone->final_posr->R[1*4+0] * cone->lz + p0[1]; + p1[2] = cone->final_posr->R[2*4+0] * cone->lz + p0[2]; + FindIntersectionPlaneRay(plane->p,p1,plane->p,u,pp1); + dIASSERT(dDISTANCE(pp0,pp1) >= fEPSILON); + } + dVector3 h,r0,r1; + h[0] = cone->final_posr->R[0*4+2]; + h[1] = cone->final_posr->R[1*4+2]; + h[2] = cone->final_posr->R[2*4+2]; + + dOP(r0,-,pp0,pp1); + dCROSS(r1,=,h,r0); + dCROSS(r0,=,r1,h); + dNormalize3(r0); + dOPEC(h,*=,cone->lz); + dOPEC(r0,*=,cone->radius); + + dVector3 p[3]; + dOP(p[0],+,cone->final_posr->pos,h); + dOP(p[1],+,cone->final_posr->pos,r0); + dOP(p[2],-,cone->final_posr->pos,r0); + + int numMaxContacts = flags & 0xffff; + if (numMaxContacts == 0) + numMaxContacts = 1; + + int n=0; + for (int i=0;i<3;i++) + { + dReal d = dGeomPlanePointDepth(o2, p[i][0], p[i][1], p[i][2]); + + if (d>0.f) + { + CONTACT(contact,n*skip)->g1 = o1; + CONTACT(contact,n*skip)->g2 = o2; + dOPE(CONTACT(contact,n*skip)->normal,=,plane->p); + dOPE(CONTACT(contact,n*skip)->pos,=,p[i]); + CONTACT(contact,n*skip)->depth = d; + n++; + + if (n == numMaxContacts) + return n; + } + } + + return n; +} + +int dCollideRayCone (dxGeom *o1, dxGeom *o2, int flags, + dContactGeom *contact, int skip) +{ + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (o1->type == dRayClass); + dIASSERT (o2->type == dConeClass); + dxRay *ray = (dxRay*) o1; + dxCone *cone = (dxCone*) o2; + + contact->g1 = o1; + contact->g2 = o2; + + dVector3 tmp,q,v; + tmp[0] = ray->final_posr->pos[0] - cone->final_posr->pos[0]; + tmp[1] = ray->final_posr->pos[1] - cone->final_posr->pos[1]; + tmp[2] = ray->final_posr->pos[2] - cone->final_posr->pos[2]; + dMULTIPLY1_331 (q,cone->final_posr->R,tmp); + tmp[0] = ray->final_posr->R[0*4+2] * ray->length; + tmp[1] = ray->final_posr->R[1*4+2] * ray->length; + tmp[2] = ray->final_posr->R[2*4+2] * ray->length; + dMULTIPLY1_331 (v,cone->final_posr->R,tmp); + + dReal r = cone->radius; + dReal h = cone->lz; + + dContactGeom Contact[2]; + + if (FindIntersectionConeRay(r,h,q,v,Contact)) + { + dMULTIPLY0_331(contact->normal,cone->final_posr->R,Contact[0].normal); + dMULTIPLY0_331(contact->pos,cone->final_posr->R,Contact[0].pos); + dOPE(contact->pos,+=,cone->final_posr->pos); + contact->depth = Contact[0].depth * dLENGTH(v); +/* + dMatrix3 RI; + dRSetIdentity (RI); + dVector3 ss; + ss[0] = 0.01f; + ss[1] = 0.01f; + ss[2] = 0.01f; + + dsSetColorAlpha (1,0,0,0.8f); + dsDrawBox(contact->pos,RI,ss); +*/ + return 1; + } + + return 0; +} + +int dCollideConeSphere(dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip) +{ + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (o1->type == dConeClass); + dIASSERT (o2->type == dSphereClass); + dxCone *cone = (dxCone*) o1; + + dxSphere ASphere(0,cone->radius); + dGeomSetRotation(&ASphere,cone->final_posr->R); + dGeomSetPosition(&ASphere,cone->final_posr->pos[0],cone->final_posr->pos[1],cone->final_posr->pos[2]); + + return dCollideSphereSphere(&ASphere, o2, flags, contact, skip); +} + +int dCollideConeBox(dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip) +{ + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (o1->type == dConeClass); + dIASSERT (o2->type == dBoxClass); + dxCone *cone = (dxCone*) o1; + + dxSphere ASphere(0,cone->radius); + dGeomSetRotation(&ASphere,cone->final_posr->R); + dGeomSetPosition(&ASphere,cone->final_posr->pos[0],cone->final_posr->pos[1],cone->final_posr->pos[2]); + + return dCollideSphereBox(&ASphere, o2, flags, contact, skip); +} + +int dCollideCCylinderCone(dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip) +{ + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (o1->type == dCCylinderClass); + dIASSERT (o2->type == dConeClass); + dxCone *cone = (dxCone*) o2; + + dxSphere ASphere(0,cone->radius); + dGeomSetRotation(&ASphere,cone->final_posr->R); + dGeomSetPosition(&ASphere,cone->final_posr->pos[0],cone->final_posr->pos[1],cone->final_posr->pos[2]); + + return dCollideCCylinderSphere(o1, &ASphere, flags, contact, skip); +} + +extern int dCollideSTL(dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip); + +int dCollideTriMeshCone(dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip) +{ + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (o1->type == dTriMeshClass); + dIASSERT (o2->type == dConeClass); + dxCone *cone = (dxCone*) o2; + + dxSphere ASphere(0,cone->radius); + dGeomSetRotation(&ASphere,cone->final_posr->R); + dGeomSetPosition(&ASphere,cone->final_posr->pos[0],cone->final_posr->pos[1],cone->final_posr->pos[2]); + + return dCollideSTL(o1, &ASphere, flags, contact, skip); +} + + + + + diff -Nru ode-0.11.1/contrib/TerrainAndCone/dTerrainY.cpp ode-0.14/contrib/TerrainAndCone/dTerrainY.cpp --- ode-0.11.1/contrib/TerrainAndCone/dTerrainY.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/TerrainAndCone/dTerrainY.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,662 @@ +//Benoit CHAPEROT 2003-2004 www.jstarlab.com +//some code inspired by Magic Software +#include +#include +#include +#include +#include +#include "collision_kernel.h" +#include "collision_std.h" +#include "collision_std_internal.h" +#include "collision_util.h" +//#include +#include "windows.h" +#include "ode\ode.h" + +#define CONTACT(p,skip) ((dContactGeom*) (((char*)p) + (skip))) +#define MAXCONTACT 10 +#define TERRAINTOL 0.0f + +static bool IsAPowerOfTwo(int f) +{ + dAASSERT(f!=0); + while ((f&1) != 1) + f >>= 1; + + return (f == 1); +} + +static int GetPowerOfTwo(int f) +{ + dAASSERT(f!=0); + int n = 0; + while ((f&1) != 1) + { + n++; + f >>= 1; + } + + return n; +} + +dxTerrainY::dxTerrainY (dSpaceID space, dReal *pHeights,dReal vLength,int nNumNodesPerSide, int bFinite, int bPlaceable) : +dxGeom (space,bPlaceable) +{ + dIASSERT(IsAPowerOfTwo(nNumNodesPerSide)); + dIASSERT(pHeights); + dIASSERT(vLength > 0.f); + dIASSERT(nNumNodesPerSide > 0); + type = dTerrainYClass; + m_vLength = vLength; + m_pHeights = new dReal[nNumNodesPerSide * nNumNodesPerSide]; + dIASSERT(m_pHeights); + m_nNumNodesPerSide = nNumNodesPerSide; + m_vNodeLength = m_vLength / m_nNumNodesPerSide; + m_nNumNodesPerSideShift = GetPowerOfTwo(m_nNumNodesPerSide); + m_nNumNodesPerSideMask = m_nNumNodesPerSide - 1; + m_vMinHeight = dInfinity; + m_vMaxHeight = -dInfinity; + m_bFinite = bFinite; + + for (int i=0;i m_vMaxHeight) m_vMaxHeight = m_pHeights[i]; + } +} + +dxTerrainY::~dxTerrainY() +{ + dIASSERT(m_pHeights); + delete [] m_pHeights; +} + +void dxTerrainY::computeAABB() +{ + if (m_bFinite) + { + if (gflags & GEOM_PLACEABLE) + { + dReal dx[6],dy[6],dz[6]; + dx[0] = 0; + dx[1] = final_posr->R[0] * m_vLength; + dx[2] = final_posr->R[1] * m_vMinHeight; + dx[3] = final_posr->R[1] * m_vMaxHeight; + dx[4] = 0; + dx[5] = final_posr->R[2] * m_vLength; + + dy[0] = 0; + dy[1] = final_posr->R[4] * m_vLength; + dy[2] = final_posr->R[5] * m_vMinHeight; + dy[3] = final_posr->R[5] * m_vMaxHeight; + dy[4] = 0; + dy[5] = final_posr->R[6] * m_vLength; + + dz[0] = 0; + dz[1] = final_posr->R[8] * m_vLength; + dz[2] = final_posr->R[9] * m_vMinHeight; + dz[3] = final_posr->R[9] * m_vMaxHeight; + dz[4] = 0; + dz[5] = final_posr->R[10] * m_vLength; + + aabb[0] = final_posr->pos[0] + MIN(dx[0],dx[1]) + MIN(dx[2],dx[3]) + MIN(dx[4],dx[5]); + aabb[1] = final_posr->pos[0] + MAX(dx[0],dx[1]) + MAX(dx[2],dx[3]) + MAX(dx[4],dx[5]); + aabb[2] = final_posr->pos[1] + MIN(dy[0],dy[1]) + MIN(dy[2],dy[3]) + MIN(dy[4],dy[5]); + aabb[3] = final_posr->pos[1] + MAX(dy[0],dy[1]) + MAX(dy[2],dy[3]) + MAX(dy[4],dy[5]); + aabb[4] = final_posr->pos[2] + MIN(dz[0],dz[1]) + MIN(dz[2],dz[3]) + MIN(dz[4],dz[5]); + aabb[5] = final_posr->pos[2] + MAX(dz[0],dz[1]) + MAX(dz[2],dz[3]) + MAX(dz[4],dz[5]); + } + else + { + aabb[0] = 0; + aabb[1] = m_vLength; + aabb[2] = m_vMinHeight; + aabb[3] = m_vMaxHeight; + aabb[4] = 0; + aabb[5] = m_vLength; + } + } + else + { + if (gflags & GEOM_PLACEABLE) + { + aabb[0] = -dInfinity; + aabb[1] = dInfinity; + aabb[2] = -dInfinity; + aabb[3] = dInfinity; + aabb[4] = -dInfinity; + aabb[5] = dInfinity; + } + else + { + aabb[0] = -dInfinity; + aabb[1] = dInfinity; + aabb[2] = m_vMinHeight; + aabb[3] = m_vMaxHeight; + aabb[4] = -dInfinity; + aabb[5] = dInfinity; + } + } +} + +dReal dxTerrainY::GetHeight(int x,int z) +{ + return m_pHeights[ (((unsigned int)(z) & m_nNumNodesPerSideMask) << m_nNumNodesPerSideShift) + + ((unsigned int)(x) & m_nNumNodesPerSideMask)]; +} + +dReal dxTerrainY::GetHeight(dReal x,dReal z) +{ + int nX = int(floor(x / m_vNodeLength)); + int nZ = int(floor(z / m_vNodeLength)); + dReal dx = (x - (dReal(nX) * m_vNodeLength)) / m_vNodeLength; + dReal dz = (z - (dReal(nZ) * m_vNodeLength)) / m_vNodeLength; + dIASSERT((dx >= 0.f) && (dx <= 1.f)); + dIASSERT((dz >= 0.f) && (dz <= 1.f)); + + dReal y,y0; + + if (dx + dz < 1.f) + { + y0 = GetHeight(nX,nZ); + y = y0 + + (GetHeight(nX+1,nZ) - y0) * dx + + (GetHeight(nX,nZ+1) - y0) * dz; + } + else + { + y0 = GetHeight(nX+1,nZ+1); + y = y0 + + (GetHeight(nX+1,nZ) - y0) * (1.f - dz) + + (GetHeight(nX,nZ+1) - y0) * (1.f - dx); + } + + return y; +} + +bool dxTerrainY::IsOnTerrain(int nx,int nz,int w,dReal *pos) +{ + dVector3 Min,Max; + Min[0] = nx * m_vNodeLength; + Min[2] = nz * m_vNodeLength; + Max[0] = (nx+1) * m_vNodeLength; + Max[2] = (nz+1) * m_vNodeLength; + dReal Tol = m_vNodeLength * TERRAINTOL; + + if ((pos[0]Max[0]+Tol)) + return false; + + if ((pos[2]Max[2]+Tol)) + return false; + + dReal dx = (pos[0] - (dReal(nx) * m_vNodeLength)) / m_vNodeLength; + dReal dz = (pos[2] - (dReal(nz) * m_vNodeLength)) / m_vNodeLength; + + if ((w == 0) && (dx + dz > 1.f+TERRAINTOL)) + return false; + + if ((w == 1) && (dx + dz < 1.f-TERRAINTOL)) + return false; + + return true; +} + +dGeomID dCreateTerrainY(dSpaceID space, dReal *pHeights,dReal vLength,int nNumNodesPerSide, int bFinite, int bPlaceable) +{ + return new dxTerrainY(space, pHeights,vLength,nNumNodesPerSide,bFinite,bPlaceable); +} + +dReal dGeomTerrainYPointDepth (dGeomID g, dReal x, dReal y, dReal z) +{ + dUASSERT (g && g->type == dTerrainYClass,"argument not a terrain"); + g->recomputePosr(); + dxTerrainY *t = (dxTerrainY*) g; + return t->GetHeight(x,z) - y; +} + +typedef dReal dGetDepthFn(dGeomID g, dReal x, dReal y, dReal z); +#define RECOMPUTE_RAYNORMAL +//#define DO_RAYDEPTH + +#define DMESS(A) \ + dMessage(0,"Contact Plane (%d %d %d) %.5e %.5e (%.5e %.5e %.5e)(%.5e %.5e %.5e)).", \ + x,z,A, \ + pContact->depth, \ + dGeomSphereGetRadius(o2), \ + pContact->pos[0], \ + pContact->pos[1], \ + pContact->pos[2], \ + pContact->normal[0], \ + pContact->normal[1], \ + pContact->normal[2]); +/* +(y is up) + +A-B-E.x +|/| +C-D +| +F +. +z +*/ +int dxTerrainY::dCollideTerrainUnit( + int x,int z,dxGeom *o2,int numMaxContacts, + int flags,dContactGeom *contact, int skip) +{ + dColliderFn *CollideRayN; + dColliderFn *CollideNPlane; + dGetDepthFn *GetDepth; + int numContacts = 0; + int numPlaneContacts = 0; + int i; + + if (numContacts == numMaxContacts) + return numContacts; + + dContactGeom PlaneContact[MAXCONTACT]; + flags = (flags & 0xffff0000) | MAXCONTACT; + + switch (o2->type) + { + case dSphereClass: + CollideRayN = dCollideRaySphere; + CollideNPlane = dCollideSpherePlane; + GetDepth = dGeomSpherePointDepth; + break; + case dBoxClass: + CollideRayN = dCollideRayBox; + CollideNPlane = dCollideBoxPlane; + GetDepth = dGeomBoxPointDepth; + break; + case dCCylinderClass: + CollideRayN = dCollideRayCCylinder; + CollideNPlane = dCollideCCylinderPlane; + GetDepth = dGeomCCylinderPointDepth; + break; + case dRayClass: + CollideRayN = NULL; + CollideNPlane = dCollideRayPlane; + GetDepth = NULL; + break; + case dConeClass: + CollideRayN = dCollideRayCone; + CollideNPlane = dCollideConePlane; + GetDepth = dGeomConePointDepth; + break; + default: + dIASSERT(0); + } + + dReal Plane[4],lBD,lCD,lBC; + dVector3 A,B,C,D,BD,CD,BC,AB,AC; + A[0] = x * m_vNodeLength; + A[2] = z* m_vNodeLength; + A[1] = GetHeight(x,z); + B[0] = (x+1) * m_vNodeLength; + B[2] = z * m_vNodeLength; + B[1] = GetHeight(x+1,z); + C[0] = x * m_vNodeLength; + C[2] = (z+1) * m_vNodeLength; + C[1] = GetHeight(x,z+1); + D[0] = (x+1) * m_vNodeLength; + D[2] = (z+1) * m_vNodeLength; + D[1] = GetHeight(x+1,z+1); + + dOP(BC,-,C,B); + lBC = dLENGTH(BC); + dOPEC(BC,/=,lBC); + + dOP(BD,-,D,B); + lBD = dLENGTH(BD); + dOPEC(BD,/=,lBD); + + dOP(CD,-,D,C); + lCD = dLENGTH(CD); + dOPEC(CD,/=,lCD); + + dOP(AB,-,B,A); + dNormalize3(AB); + + dOP(AC,-,C,A); + dNormalize3(AC); + + if (CollideRayN) + { +#ifdef RECOMPUTE_RAYNORMAL + dVector3 E,F; + dVector3 CE,FB,AD; + dVector3 Normal[3]; + E[0] = (x+2) * m_vNodeLength; + E[2] = z * m_vNodeLength; + E[1] = GetHeight(x+2,z); + F[0] = x * m_vNodeLength; + F[2] = (z+2) * m_vNodeLength; + F[1] = GetHeight(x,z+2); + dOP(AD,-,D,A); + dNormalize3(AD); + dOP(CE,-,E,C); + dNormalize3(CE); + dOP(FB,-,B,F); + dNormalize3(FB); + + //BC + dCROSS(Normal[0],=,BC,AD); + dNormalize3(Normal[0]); + + //BD + dCROSS(Normal[1],=,BD,CE); + dNormalize3(Normal[1]); + + //CD + dCROSS(Normal[2],=,CD,FB); + dNormalize3(Normal[2]); +#endif + int nA[3],nB[3]; + dContactGeom ContactA[3],ContactB[3]; + dxRay rayBC(0,lBC); + dGeomRaySet(&rayBC, B[0], B[1], B[2], BC[0], BC[1], BC[2]); + nA[0] = CollideRayN(&rayBC,o2,flags,&ContactA[0],sizeof(dContactGeom)); + dGeomRaySet(&rayBC, C[0], C[1], C[2], -BC[0], -BC[1], -BC[2]); + nB[0] = CollideRayN(&rayBC,o2,flags,&ContactB[0],sizeof(dContactGeom)); + + dxRay rayBD(0,lBD); + dGeomRaySet(&rayBD, B[0], B[1], B[2], BD[0], BD[1], BD[2]); + nA[1] = CollideRayN(&rayBD,o2,flags,&ContactA[1],sizeof(dContactGeom)); + dGeomRaySet(&rayBD, D[0], D[1], D[2], -BD[0], -BD[1], -BD[2]); + nB[1] = CollideRayN(&rayBD,o2,flags,&ContactB[1],sizeof(dContactGeom)); + + dxRay rayCD(0,lCD); + dGeomRaySet(&rayCD, C[0], C[1], C[2], CD[0], CD[1], CD[2]); + nA[2] = CollideRayN(&rayCD,o2,flags,&ContactA[2],sizeof(dContactGeom)); + dGeomRaySet(&rayCD, D[0], D[1], D[2], -CD[0], -CD[1], -CD[2]); + nB[2] = CollideRayN(&rayCD,o2,flags,&ContactB[2],sizeof(dContactGeom)); + + for (i=0;i<3;i++) + { + if (nA[i] & nB[i]) + { + dContactGeom *pContact = CONTACT(contact,numContacts*skip); + pContact->pos[0] = (ContactA[i].pos[0] + ContactB[i].pos[0])/2; + pContact->pos[1] = (ContactA[i].pos[1] + ContactB[i].pos[1])/2; + pContact->pos[2] = (ContactA[i].pos[2] + ContactB[i].pos[2])/2; +#ifdef RECOMPUTE_RAYNORMAL + pContact->normal[0] = -Normal[i][0]; + pContact->normal[1] = -Normal[i][1]; + pContact->normal[2] = -Normal[i][2]; +#else + pContact->normal[0] = (ContactA[i].normal[0] + ContactB[i].normal[0])/2; //0.f; + pContact->normal[1] = (ContactA[i].normal[1] + ContactB[i].normal[1])/2; //0.f; + pContact->normal[2] = (ContactA[i].normal[2] + ContactB[i].normal[2])/2; //-1.f; + dNormalize3(pContact->normal); +#endif +#ifdef DO_RAYDEPTH + dxRay rayV(0,1000.f); + dGeomRaySet(&rayV, pContact->pos[0], + pContact->pos[1], + pContact->pos[2], + -pContact->normal[0], + -pContact->normal[1], + -pContact->normal[2]); + + dContactGeom ContactV; + if (CollideRayN(&rayV,o2,flags,&ContactV,sizeof(dContactGeom))) + { + pContact->depth = ContactV.depth; + numContacts++; + } +#else + + if (GetDepth == NULL) + { + dxRay rayV(0,1000.f); + dGeomRaySet(&rayV, pContact->pos[0], + pContact->pos[1], + pContact->pos[2], + -pContact->normal[0], + -pContact->normal[1], + -pContact->normal[2]); + + dContactGeom ContactV; + + if (CollideRayN(&rayV,o2,flags,&ContactV,sizeof(dContactGeom))) + { + pContact->depth = ContactV.depth; + numContacts++; + } + } + else + { + pContact->depth = GetDepth(o2, + pContact->pos[0], + pContact->pos[1], + pContact->pos[2]); + numContacts++; + } + +#endif + if (numContacts == numMaxContacts) + return numContacts; + + } + } + } + + dCROSS(Plane,=,AC,AB); + dNormalize3(Plane); + Plane[3] = Plane[0] * A[0] + Plane[1] * A[1] + Plane[2] * A[2]; + dxPlane planeABC(0,Plane[0],Plane[1],Plane[2],Plane[3]); + numPlaneContacts = CollideNPlane(o2,&planeABC,flags,PlaneContact,sizeof(dContactGeom)); + + for (i=0;ipos[0] = PlaneContact[i].pos[0]; + pContact->pos[1] = PlaneContact[i].pos[1]; + pContact->pos[2] = PlaneContact[i].pos[2]; + pContact->normal[0] = -PlaneContact[i].normal[0]; + pContact->normal[1] = -PlaneContact[i].normal[1]; + pContact->normal[2] = -PlaneContact[i].normal[2]; + pContact->depth = PlaneContact[i].depth; + + //DMESS(0); + numContacts++; + + if (numContacts == numMaxContacts) + return numContacts; + } + } + + dCROSS(Plane,=,BD,CD); + dNormalize3(Plane); + Plane[3] = Plane[0] * D[0] + Plane[1] * D[1] + Plane[2] * D[2]; + dxPlane planeDCB(0,Plane[0],Plane[1],Plane[2],Plane[3]); + numPlaneContacts = CollideNPlane(o2,&planeDCB,flags,PlaneContact,sizeof(dContactGeom)); + + for (i=0;ipos[0] = PlaneContact[i].pos[0]; + pContact->pos[1] = PlaneContact[i].pos[1]; + pContact->pos[2] = PlaneContact[i].pos[2]; + pContact->normal[0] = -PlaneContact[i].normal[0]; + pContact->normal[1] = -PlaneContact[i].normal[1]; + pContact->normal[2] = -PlaneContact[i].normal[2]; + pContact->depth = PlaneContact[i].depth; + //DMESS(1); + numContacts++; + + if (numContacts == numMaxContacts) + return numContacts; + } + } + + return numContacts; +} + +int dCollideTerrainY(dxGeom *o1, dxGeom *o2, int flags,dContactGeom *contact, int skip) +{ + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (o1->type == dTerrainYClass); + int i,j; + + if ((flags & 0xffff) == 0) + flags = (flags & 0xffff0000) | 1; + + int numMaxTerrainContacts = (flags & 0xffff); + dxTerrainY *terrain = (dxTerrainY*) o1; + + dReal aabbbak[6]; + int gflagsbak; + + dVector3 pos0; + int numTerrainContacts = 0; + + dxPosR *bak; + dxPosR X1; + + if (terrain->gflags & GEOM_PLACEABLE) + { + dOP(pos0,-,o2->final_posr->pos,terrain->final_posr->pos); + dMULTIPLY1_331(X1.pos,terrain->final_posr->R,pos0); + dMULTIPLY1_333(X1.R,terrain->final_posr->R,o2->final_posr->R); + bak = o2->final_posr; + o2->final_posr = &X1; + memcpy(aabbbak,o2->aabb,sizeof(dReal)*6); + gflagsbak = o2->gflags; + o2->computeAABB(); + } + + int nMinX = int(floor(o2->aabb[0] / terrain->m_vNodeLength)); + int nMaxX = int(floor(o2->aabb[1] / terrain->m_vNodeLength)) + 1; + int nMinZ = int(floor(o2->aabb[4] / terrain->m_vNodeLength)); + int nMaxZ = int(floor(o2->aabb[5] / terrain->m_vNodeLength)) + 1; + + if (terrain->m_bFinite) + { + nMinX = MAX(nMinX,0); + nMaxX = MIN(nMaxX,terrain->m_nNumNodesPerSide); + nMinZ = MAX(nMinZ,0); + nMaxZ = MIN(nMaxZ,terrain->m_nNumNodesPerSide); + + if ((nMinX >= nMaxX) || (nMinZ >= nMaxZ)) + goto dCollideTerrainYExit; + } + + dVector3 AabbTop; + AabbTop[0] = (o2->aabb[0]+o2->aabb[1]) / 2; + AabbTop[2] = (o2->aabb[4]+o2->aabb[5]) / 2; + AabbTop[1] = o2->aabb[3]; + if (o2->type != dRayClass) + { + dReal AabbTopDepth = terrain->GetHeight(AabbTop[0],AabbTop[2]) - AabbTop[1]; + if (AabbTopDepth > 0.f) + { + contact->depth = AabbTopDepth; + dReal MaxDepth = (o2->aabb[3]-o2->aabb[2]) / 2; + if (contact->depth > MaxDepth) + contact->depth = MaxDepth; + contact->g1 = o1; + contact->g2 = o2; + dOPE(contact->pos,=,AabbTop); + contact->normal[0] = 0.f; + contact->normal[1] = -1.f; + contact->normal[2] = 0.f; + + numTerrainContacts = 1; + goto dCollideTerrainYExit; + } + } + + for (i=nMinX;idCollideTerrainUnit( + i,j,o2,numMaxTerrainContacts - numTerrainContacts, + flags,CONTACT(contact,numTerrainContacts*skip),skip ); + } + } + + dIASSERT(numTerrainContacts <= numMaxTerrainContacts); + + for (i=0; ig1 = o1; + CONTACT(contact,i*skip)->g2 = o2; + } + +dCollideTerrainYExit: + + if (terrain->gflags & GEOM_PLACEABLE) + { + o2->final_posr = bak; + memcpy(o2->aabb,aabbbak,sizeof(dReal)*6); + o2->gflags = gflagsbak; + + for (i=0; ipos); + dMULTIPLY0_331(CONTACT(contact,i*skip)->pos,terrain->final_posr->R,pos0); + dOP(CONTACT(contact,i*skip)->pos,+,CONTACT(contact,i*skip)->pos,terrain->final_posr->pos); + + dOPE(pos0,=,CONTACT(contact,i*skip)->normal); + dMULTIPLY0_331(CONTACT(contact,i*skip)->normal,terrain->final_posr->R,pos0); + } + } + + return numTerrainContacts; +} +/* +void dsDrawTerrainY(int x,int z,float vLength,float vNodeLength,int nNumNodesPerSide,float *pHeights,const float *pR,const float *ppos) +{ + float A[3],B[3],C[3],D[3]; + float R[12]; + float pos[3]; + if (pR) + memcpy(R,pR,sizeof(R)); + else + { + memset(R,0,sizeof(R)); + R[0] = 1.f; + R[5] = 1.f; + R[10] = 1.f; + } + + if (ppos) + memcpy(pos,ppos,sizeof(pos)); + else + memset(pos,0,sizeof(pos)); + + float vx,vz; + vx = vLength * x; + vz = vLength * z; + + int i; + for (i=0;i +#include +#include +#include +#include +#include "collision_kernel.h" +#include "collision_std.h" +#include "collision_std_internal.h" +#include "collision_util.h" +//#include +#include "windows.h" +#include "ode\ode.h" + +#define CONTACT(p,skip) ((dContactGeom*) (((char*)p) + (skip))) +#define MAXCONTACT 10 +#define TERRAINTOL 0.0f + +static bool IsAPowerOfTwo(int f) +{ + dAASSERT(f!=0); + while ((f&1) != 1) + f >>= 1; + + return (f == 1); +} + +static int GetPowerOfTwo(int f) +{ + dAASSERT(f!=0); + int n = 0; + while ((f&1) != 1) + { + n++; + f >>= 1; + } + + return n; +} + +dxTerrainZ::dxTerrainZ (dSpaceID space, dReal *pHeights,dReal vLength,int nNumNodesPerSide, int bFinite, int bPlaceable) : +dxGeom (space,bPlaceable) +{ + dIASSERT(IsAPowerOfTwo(nNumNodesPerSide)); + dIASSERT(pHeights); + dIASSERT(vLength > 0.f); + dIASSERT(nNumNodesPerSide > 0); + type = dTerrainZClass; + m_vLength = vLength; + m_pHeights = new dReal[nNumNodesPerSide * nNumNodesPerSide]; + dIASSERT(m_pHeights); + m_nNumNodesPerSide = nNumNodesPerSide; + m_vNodeLength = m_vLength / m_nNumNodesPerSide; + m_nNumNodesPerSideShift = GetPowerOfTwo(m_nNumNodesPerSide); + m_nNumNodesPerSideMask = m_nNumNodesPerSide - 1; + m_vMinHeight = dInfinity; + m_vMaxHeight = -dInfinity; + m_bFinite = bFinite; + + for (int i=0;i m_vMaxHeight) m_vMaxHeight = m_pHeights[i]; + } +} + +dxTerrainZ::~dxTerrainZ() +{ + dIASSERT(m_pHeights); + delete [] m_pHeights; +} + +void dxTerrainZ::computeAABB() +{ + if (m_bFinite) + { + if (gflags & GEOM_PLACEABLE) + { + dReal dx[6],dy[6],dz[6]; + dx[0] = 0; + dx[1] = final_posr->R[0] * m_vLength; + dx[2] = 0; + dx[3] = final_posr->R[1] * m_vLength; + dx[4] = final_posr->R[2] * m_vMinHeight; + dx[5] = final_posr->R[2] * m_vMaxHeight; + + dy[0] = 0; + dy[1] = final_posr->R[4] * m_vLength; + dy[2] = 0; + dy[3] = final_posr->R[5] * m_vLength; + dy[4] = final_posr->R[6] * m_vMinHeight; + dy[5] = final_posr->R[6] * m_vMaxHeight; + + dz[0] = 0; + dz[1] = final_posr->R[8] * m_vLength; + dz[2] = 0; + dz[3] = final_posr->R[9] * m_vLength; + dz[4] = final_posr->R[10] * m_vMinHeight; + dz[5] = final_posr->R[10] * m_vMaxHeight; + + aabb[0] = final_posr->pos[0] + MIN(dx[0],dx[1]) + MIN(dx[2],dx[3]) + MIN(dx[4],dx[5]); + aabb[1] = final_posr->pos[0] + MAX(dx[0],dx[1]) + MAX(dx[2],dx[3]) + MAX(dx[4],dx[5]); + aabb[2] = final_posr->pos[1] + MIN(dy[0],dy[1]) + MIN(dy[2],dy[3]) + MIN(dy[4],dy[5]); + aabb[3] = final_posr->pos[1] + MAX(dy[0],dy[1]) + MAX(dy[2],dy[3]) + MAX(dy[4],dy[5]); + aabb[4] = final_posr->pos[2] + MIN(dz[0],dz[1]) + MIN(dz[2],dz[3]) + MIN(dz[4],dz[5]); + aabb[5] = final_posr->pos[2] + MAX(dz[0],dz[1]) + MAX(dz[2],dz[3]) + MAX(dz[4],dz[5]); + } + else + { + aabb[0] = 0; + aabb[1] = m_vLength; + aabb[2] = 0; + aabb[3] = m_vLength; + aabb[4] = m_vMinHeight; + aabb[5] = m_vMaxHeight; + } + } + else + { + if (gflags & GEOM_PLACEABLE) + { + aabb[0] = -dInfinity; + aabb[1] = dInfinity; + aabb[2] = -dInfinity; + aabb[3] = dInfinity; + aabb[4] = -dInfinity; + aabb[5] = dInfinity; + } + else + { + aabb[0] = -dInfinity; + aabb[1] = dInfinity; + aabb[2] = -dInfinity; + aabb[3] = dInfinity; + aabb[4] = m_vMinHeight; + aabb[5] = m_vMaxHeight; + } + } +} + +dReal dxTerrainZ::GetHeight(int x,int y) +{ + return m_pHeights[ (((unsigned int)(y) & m_nNumNodesPerSideMask) << m_nNumNodesPerSideShift) + + ((unsigned int)(x) & m_nNumNodesPerSideMask)]; +} + +dReal dxTerrainZ::GetHeight(dReal x,dReal y) +{ + int nX = int(floor(x / m_vNodeLength)); + int nY = int(floor(y / m_vNodeLength)); + dReal dx = (x - (dReal(nX) * m_vNodeLength)) / m_vNodeLength; + dReal dy = (y - (dReal(nY) * m_vNodeLength)) / m_vNodeLength; + dIASSERT((dx >= 0.f) && (dx <= 1.f)); + dIASSERT((dy >= 0.f) && (dy <= 1.f)); + + dReal z,z0; + + if (dx + dy < 1.f) + { + z0 = GetHeight(nX,nY); + z = z0 + + (GetHeight(nX+1,nY) - z0) * dx + + (GetHeight(nX,nY+1) - z0) * dy; + } + else + { + z0 = GetHeight(nX+1,nY+1); + z = z0 + + (GetHeight(nX+1,nY) - z0) * (1.f - dy) + + (GetHeight(nX,nY+1) - z0) * (1.f - dx); + } + + return z; +} + +bool dxTerrainZ::IsOnTerrain(int nx,int ny,int w,dReal *pos) +{ + dVector3 Min,Max; + Min[0] = nx * m_vNodeLength; + Min[1] = ny * m_vNodeLength; + Max[0] = (nx+1) * m_vNodeLength; + Max[1] = (ny+1) * m_vNodeLength; + dReal Tol = m_vNodeLength * TERRAINTOL; + + if ((pos[0]Max[0]+Tol)) + return false; + + if ((pos[1]Max[1]+Tol)) + return false; + + dReal dx = (pos[0] - (dReal(nx) * m_vNodeLength)) / m_vNodeLength; + dReal dy = (pos[1] - (dReal(ny) * m_vNodeLength)) / m_vNodeLength; + + if ((w == 0) && (dx + dy > 1.f+TERRAINTOL)) + return false; + + if ((w == 1) && (dx + dy < 1.f-TERRAINTOL)) + return false; + + return true; +} + +dGeomID dCreateTerrainZ(dSpaceID space, dReal *pHeights,dReal vLength,int nNumNodesPerSide, int bFinite, int bPlaceable) +{ + return new dxTerrainZ(space, pHeights,vLength,nNumNodesPerSide, bFinite, bPlaceable); +} + +dReal dGeomTerrainZPointDepth (dGeomID g, dReal x, dReal y, dReal z) +{ + dUASSERT (g && g->type == dTerrainZClass,"argument not a terrain"); + g->recomputePosr(); + dxTerrainZ *t = (dxTerrainZ*) g; + return t->GetHeight(x,y) - z; +} + +typedef dReal dGetDepthFn(dGeomID g, dReal x, dReal y, dReal z); +#define RECOMPUTE_RAYNORMAL +//#define DO_RAYDEPTH + +#define DMESS(A) \ + dMessage(0,"Contact Plane (%d %d %d) %.5e %.5e (%.5e %.5e %.5e)(%.5e %.5e %.5e)).", \ + x,y,A, \ + pContact->depth, \ + dGeomSphereGetRadius(o2), \ + pContact->pos[0], \ + pContact->pos[1], \ + pContact->pos[2], \ + pContact->normal[0], \ + pContact->normal[1], \ + pContact->normal[2]); +/* +(z is up) + +y +. +F +| +C-D +|\| +A-B-E.x +*/ +int dxTerrainZ::dCollideTerrainUnit( + int x,int y,dxGeom *o2,int numMaxContacts, + int flags,dContactGeom *contact, int skip) +{ + dColliderFn *CollideRayN; + dColliderFn *CollideNPlane; + dGetDepthFn *GetDepth; + int numContacts = 0; + int numPlaneContacts = 0; + int i; + + if (numContacts == numMaxContacts) + return numContacts; + + dContactGeom PlaneContact[MAXCONTACT]; + flags = (flags & 0xffff0000) | MAXCONTACT; + + switch (o2->type) + { + case dSphereClass: + CollideRayN = dCollideRaySphere; + CollideNPlane = dCollideSpherePlane; + GetDepth = dGeomSpherePointDepth; + break; + case dBoxClass: + CollideRayN = dCollideRayBox; + CollideNPlane = dCollideBoxPlane; + GetDepth = dGeomBoxPointDepth; + break; + case dCCylinderClass: + CollideRayN = dCollideRayCCylinder; + CollideNPlane = dCollideCCylinderPlane; + GetDepth = dGeomCCylinderPointDepth; + break; + case dRayClass: + CollideRayN = NULL; + CollideNPlane = dCollideRayPlane; + GetDepth = NULL; + break; + case dConeClass: + CollideRayN = dCollideRayCone; + CollideNPlane = dCollideConePlane; + GetDepth = dGeomConePointDepth; + break; + default: + dIASSERT(0); + } + + dReal Plane[4],lBD,lCD,lBC; + dVector3 A,B,C,D,BD,CD,BC,AB,AC; + A[0] = x * m_vNodeLength; + A[1] = y * m_vNodeLength; + A[2] = GetHeight(x,y); + B[0] = (x+1) * m_vNodeLength; + B[1] = y * m_vNodeLength; + B[2] = GetHeight(x+1,y); + C[0] = x * m_vNodeLength; + C[1] = (y+1) * m_vNodeLength; + C[2] = GetHeight(x,y+1); + D[0] = (x+1) * m_vNodeLength; + D[1] = (y+1) * m_vNodeLength; + D[2] = GetHeight(x+1,y+1); + + dOP(BC,-,C,B); + lBC = dLENGTH(BC); + dOPEC(BC,/=,lBC); + + dOP(BD,-,D,B); + lBD = dLENGTH(BD); + dOPEC(BD,/=,lBD); + + dOP(CD,-,D,C); + lCD = dLENGTH(CD); + dOPEC(CD,/=,lCD); + + dOP(AB,-,B,A); + dNormalize3(AB); + + dOP(AC,-,C,A); + dNormalize3(AC); + + if (CollideRayN) + { +#ifdef RECOMPUTE_RAYNORMAL + dVector3 E,F; + dVector3 CE,FB,AD; + dVector3 Normal[3]; + E[0] = (x+2) * m_vNodeLength; + E[1] = y * m_vNodeLength; + E[2] = GetHeight(x+2,y); + F[0] = x * m_vNodeLength; + F[1] = (y+2) * m_vNodeLength; + F[2] = GetHeight(x,y+2); + dOP(AD,-,D,A); + dNormalize3(AD); + dOP(CE,-,E,C); + dNormalize3(CE); + dOP(FB,-,B,F); + dNormalize3(FB); + + //BC + dCROSS(Normal[0],=,AD,BC); + dNormalize3(Normal[0]); + + //BD + dCROSS(Normal[1],=,CE,BD); + dNormalize3(Normal[1]); + + //CD + dCROSS(Normal[2],=,FB,CD); + dNormalize3(Normal[2]); +#endif + int nA[3],nB[3]; + dContactGeom ContactA[3],ContactB[3]; + dxRay rayBC(0,lBC); + dGeomRaySet(&rayBC, B[0], B[1], B[2], BC[0], BC[1], BC[2]); + nA[0] = CollideRayN(&rayBC,o2,flags,&ContactA[0],sizeof(dContactGeom)); + dGeomRaySet(&rayBC, C[0], C[1], C[2], -BC[0], -BC[1], -BC[2]); + nB[0] = CollideRayN(&rayBC,o2,flags,&ContactB[0],sizeof(dContactGeom)); + + dxRay rayBD(0,lBD); + dGeomRaySet(&rayBD, B[0], B[1], B[2], BD[0], BD[1], BD[2]); + nA[1] = CollideRayN(&rayBD,o2,flags,&ContactA[1],sizeof(dContactGeom)); + dGeomRaySet(&rayBD, D[0], D[1], D[2], -BD[0], -BD[1], -BD[2]); + nB[1] = CollideRayN(&rayBD,o2,flags,&ContactB[1],sizeof(dContactGeom)); + + dxRay rayCD(0,lCD); + dGeomRaySet(&rayCD, C[0], C[1], C[2], CD[0], CD[1], CD[2]); + nA[2] = CollideRayN(&rayCD,o2,flags,&ContactA[2],sizeof(dContactGeom)); + dGeomRaySet(&rayCD, D[0], D[1], D[2], -CD[0], -CD[1], -CD[2]); + nB[2] = CollideRayN(&rayCD,o2,flags,&ContactB[2],sizeof(dContactGeom)); + + for (i=0;i<3;i++) + { + if (nA[i] & nB[i]) + { + dContactGeom *pContact = CONTACT(contact,numContacts*skip); + pContact->pos[0] = (ContactA[i].pos[0] + ContactB[i].pos[0])/2; + pContact->pos[1] = (ContactA[i].pos[1] + ContactB[i].pos[1])/2; + pContact->pos[2] = (ContactA[i].pos[2] + ContactB[i].pos[2])/2; +#ifdef RECOMPUTE_RAYNORMAL + pContact->normal[0] = -Normal[i][0]; + pContact->normal[1] = -Normal[i][1]; + pContact->normal[2] = -Normal[i][2]; +#else + pContact->normal[0] = (ContactA[i].normal[0] + ContactB[i].normal[0])/2; //0.f; + pContact->normal[1] = (ContactA[i].normal[1] + ContactB[i].normal[1])/2; //0.f; + pContact->normal[2] = (ContactA[i].normal[2] + ContactB[i].normal[2])/2; //-1.f; + dNormalize3(pContact->normal); +#endif +#ifdef DO_RAYDEPTH + dxRay rayV(0,1000.f); + dGeomRaySet(&rayV, pContact->pos[0], + pContact->pos[1], + pContact->pos[2], + -pContact->normal[0], + -pContact->normal[1], + -pContact->normal[2]); + + dContactGeom ContactV; + if (CollideRayN(&rayV,o2,flags,&ContactV,sizeof(dContactGeom))) + { + pContact->depth = ContactV.depth; + numContacts++; + } +#else + if (GetDepth == NULL) + { + dxRay rayV(0,1000.f); + dGeomRaySet(&rayV, pContact->pos[0], + pContact->pos[1], + pContact->pos[2], + -pContact->normal[0], + -pContact->normal[1], + -pContact->normal[2]); + + dContactGeom ContactV; + if (CollideRayN(&rayV,o2,flags,&ContactV,sizeof(dContactGeom))) + { + pContact->depth = ContactV.depth; + numContacts++; + } + } + else + { + pContact->depth = GetDepth(o2, + pContact->pos[0], + pContact->pos[1], + pContact->pos[2]); + numContacts++; + } +#endif + if (numContacts == numMaxContacts) + return numContacts; + + } + } + } + + dCROSS(Plane,=,AB,AC); + dNormalize3(Plane); + Plane[3] = Plane[0] * A[0] + Plane[1] * A[1] + Plane[2] * A[2]; + dxPlane planeABC(0,Plane[0],Plane[1],Plane[2],Plane[3]); + numPlaneContacts = CollideNPlane(o2,&planeABC,flags,PlaneContact,sizeof(dContactGeom)); + + for (i=0;ipos[0] = PlaneContact[i].pos[0]; + pContact->pos[1] = PlaneContact[i].pos[1]; + pContact->pos[2] = PlaneContact[i].pos[2]; + pContact->normal[0] = -PlaneContact[i].normal[0]; + pContact->normal[1] = -PlaneContact[i].normal[1]; + pContact->normal[2] = -PlaneContact[i].normal[2]; + pContact->depth = PlaneContact[i].depth; + + //DMESS(0); + numContacts++; + + if (numContacts == numMaxContacts) + return numContacts; + } + } + + dCROSS(Plane,=,CD,BD); + dNormalize3(Plane); + Plane[3] = Plane[0] * D[0] + Plane[1] * D[1] + Plane[2] * D[2]; + dxPlane planeDCB(0,Plane[0],Plane[1],Plane[2],Plane[3]); + numPlaneContacts = CollideNPlane(o2,&planeDCB,flags,PlaneContact,sizeof(dContactGeom)); + + for (i=0;ipos[0] = PlaneContact[i].pos[0]; + pContact->pos[1] = PlaneContact[i].pos[1]; + pContact->pos[2] = PlaneContact[i].pos[2]; + pContact->normal[0] = -PlaneContact[i].normal[0]; + pContact->normal[1] = -PlaneContact[i].normal[1]; + pContact->normal[2] = -PlaneContact[i].normal[2]; + pContact->depth = PlaneContact[i].depth; + //DMESS(1); + numContacts++; + + if (numContacts == numMaxContacts) + return numContacts; + } + } + + return numContacts; +} + +int dCollideTerrainZ(dxGeom *o1, dxGeom *o2, int flags,dContactGeom *contact, int skip) +{ + dIASSERT (skip >= (int)sizeof(dContactGeom)); + dIASSERT (o1->type == dTerrainZClass); + int i,j; + + if ((flags & 0xffff) == 0) + flags = (flags & 0xffff0000) | 1; + + int numMaxTerrainContacts = (flags & 0xffff); + dxTerrainZ *terrain = (dxTerrainZ*) o1; + + dReal aabbbak[6]; + int gflagsbak; + + dVector3 pos0; + int numTerrainContacts = 0; + + dxPosR *bak; + dxPosR X1; + + if (terrain->gflags & GEOM_PLACEABLE) + { + dOP(pos0,-,o2->final_posr->pos,terrain->final_posr->pos); + dMULTIPLY1_331(X1.pos,terrain->final_posr->R,pos0); + dMULTIPLY1_333(X1.R,terrain->final_posr->R,o2->final_posr->R); + bak = o2->final_posr; + o2->final_posr = &X1; + memcpy(aabbbak,o2->aabb,sizeof(dReal)*6); + gflagsbak = o2->gflags; + o2->computeAABB(); + } + + int nMinX = int(floor(o2->aabb[0] / terrain->m_vNodeLength)); + int nMaxX = int(floor(o2->aabb[1] / terrain->m_vNodeLength)) + 1; + int nMinY = int(floor(o2->aabb[2] / terrain->m_vNodeLength)); + int nMaxY = int(floor(o2->aabb[3] / terrain->m_vNodeLength)) + 1; + + if (terrain->m_bFinite) + { + nMinX = MAX(nMinX,0); + nMaxX = MIN(nMaxX,terrain->m_nNumNodesPerSide); + nMinY = MAX(nMinY,0); + nMaxY = MIN(nMaxY,terrain->m_nNumNodesPerSide); + + if ((nMinX >= nMaxX) || (nMinY >= nMaxY)) + goto dCollideTerrainZExit; + } + + dVector3 AabbTop; + AabbTop[0] = (o2->aabb[0]+o2->aabb[1]) / 2; + AabbTop[1] = (o2->aabb[2]+o2->aabb[3]) / 2; + AabbTop[2] = o2->aabb[5]; + if (o2->type != dRayClass) + { + dReal AabbTopDepth = terrain->GetHeight(AabbTop[0],AabbTop[1]) - AabbTop[2]; + if (AabbTopDepth > 0.f) + { + contact->depth = AabbTopDepth; + dReal MaxDepth = (o2->aabb[5]-o2->aabb[4]) / 2; + if (contact->depth > MaxDepth) + contact->depth = MaxDepth; + contact->g1 = o1; + contact->g2 = o2; + dOPE(contact->pos,=,AabbTop); + contact->normal[0] = 0.f; + contact->normal[1] = 0.f; + contact->normal[2] = -1.f; + + numTerrainContacts = 1; + goto dCollideTerrainZExit; + } + } + + for (i=nMinX;idCollideTerrainUnit( + i,j,o2,numMaxTerrainContacts - numTerrainContacts, + flags,CONTACT(contact,numTerrainContacts*skip),skip ); + } + } + + dIASSERT(numTerrainContacts <= numMaxTerrainContacts); + + for (i=0; ig1 = o1; + CONTACT(contact,i*skip)->g2 = o2; + } + +dCollideTerrainZExit: + + if (terrain->gflags & GEOM_PLACEABLE) + { + o2->final_posr = bak; + memcpy(o2->aabb,aabbbak,sizeof(dReal)*6); + o2->gflags = gflagsbak; + + for (i=0; ipos); + dMULTIPLY0_331(CONTACT(contact,i*skip)->pos,terrain->final_posr->R,pos0); + dOP(CONTACT(contact,i*skip)->pos,+,CONTACT(contact,i*skip)->pos,terrain->final_posr->pos); + + dOPE(pos0,=,CONTACT(contact,i*skip)->normal); + dMULTIPLY0_331(CONTACT(contact,i*skip)->normal,terrain->final_posr->R,pos0); + } + } + + return numTerrainContacts; +} +/* +void dsDrawTerrainZ(int x,int z,float vLength,float vNodeLength,int nNumNodesPerSide,float *pHeights,const float *pR,const float *ppos) +{ + float A[3],B[3],C[3],D[3]; + float R[12]; + float pos[3]; + if (pR) + memcpy(R,pR,sizeof(R)); + else + { + memset(R,0,sizeof(R)); + R[0] = 1.f; + R[5] = 1.f; + R[10] = 1.f; + } + + if (ppos) + memcpy(pos,ppos,sizeof(pos)); + else + memset(pos,0,sizeof(pos)); + + float vx,vz; + vx = vLength * x; + vz = vLength * z; + + int i; + for (i=0;i edit each .cpp file and comment out #include "windows.h" & #include "ode\ode.h" + + +*** add to drawstuff\src\drawstuff.cpp: + +static void drawCone(float l, float r) +{ + int i; + float tmp,ny,nz,a,ca,sa; + const int n = 24; // number of sides to the cone (divisible by 4) + + a = float(M_PI*2.0)/float(n); + sa = (float) sin(a); + ca = (float) cos(a); + + // draw top + glShadeModel (GL_FLAT); + ny=1; nz=0; // normal vector = (0,ny,nz) + glBegin (GL_TRIANGLE_FAN); + glNormal3d (0,0,1); + glVertex3d (0,0,l); + for (i=0; i<=n; i++) { + if (i==1 || i==n/2+1) + setColor (color[0]*0.75f,color[1]*0.75f,color[2]*0.75f,color[3]); + glNormal3d (ny*r,nz*r,0); + glVertex3d (ny*r,nz*r,0); + if (i==1 || i==n/2+1) + setColor (color[0],color[1],color[2],color[3]); + + // rotate ny,nz + tmp = ca*ny - sa*nz; + nz = sa*ny + ca*nz; + ny = tmp; + } + glEnd(); + + // draw bottom + ny=1; nz=0; // normal vector = (0,ny,nz) + glBegin (GL_TRIANGLE_FAN); + glNormal3d (0,0,-1); + glVertex3d (0,0,0); + for (i=0; i<=n; i++) { + if (i==1 || i==n/2+1) + setColor (color[0]*0.75f,color[1]*0.75f,color[2]*0.75f,color[3]); + glNormal3d (0,0,-1); + glVertex3d (ny*r,nz*r,0); + if (i==1 || i==n/2+1) + setColor (color[0],color[1],color[2],color[3]); + + // rotate ny,nz + tmp = ca*ny + sa*nz; + nz = -sa*ny + ca*nz; + ny = tmp; + } + glEnd(); +} + +void dsDrawCone (const float pos[3], const float R[12], float length, float radius) +{ + if (current_state != 2) dsError ("drawing function called outside simulation loop"); + setupDrawingMode(); + glShadeModel (GL_SMOOTH); + setTransform (pos,R); + drawCone (length,radius); + glPopMatrix(); + + if (use_shadows) { + setShadowDrawingMode(); + setShadowTransform(); + setTransform (pos,R); + drawCone (length,radius); + glPopMatrix(); + glPopMatrix(); + glDepthRange (0,1); + } +} + +void dsDrawConeD (const double pos[3], const double R[12], float length, float radius) +{ + int i; + float pos2[3],R2[12]; + for (i=0; i<3; i++) pos2[i]=(float)pos[i]; + for (i=0; i<12; i++) R2[i]=(float)R[i]; + dsDrawCone(pos2,R2,length,radius); +} + +static float GetHeight(int x,int y,int nNumNodesPerSide,float *pHeights) +{ + int nNumNodesPerSideMask = nNumNodesPerSide - 1; + return pHeights[ (((unsigned int)(y) & nNumNodesPerSideMask) * nNumNodesPerSide) + + ((unsigned int)(x) & nNumNodesPerSideMask)]; +} + +void dsDrawTerrainY(int x,int z,float vLength,float vNodeLength,int nNumNodesPerSide,float *pHeights,const float *pR,const float *ppos) +{ + float A[3],B[3],C[3],D[3]; + float R[12]; + float pos[3]; + if (pR) + memcpy(R,pR,sizeof(R)); + else + { + memset(R,0,sizeof(R)); + R[0] = 1.f; + R[5] = 1.f; + R[10] = 1.f; + } + + if (ppos) + memcpy(pos,ppos,sizeof(pos)); + else + memset(pos,0,sizeof(pos)); + + float vx,vz; + vx = vLength * x; + vz = vLength * z; + + int i; + for (i=0;i add dCone.cpp, dTerrainY.cpp and dTerrainZ.cpp to the the libode_a_SOURCES variable in the ode/src/Makefile.am file. + +*** now you can now test using file test_boxstackb.cpp (to add in folder ode\test). + diff -Nru ode-0.11.1/contrib/TerrainAndCone/test_boxstackb.cpp ode-0.14/contrib/TerrainAndCone/test_boxstackb.cpp --- ode-0.11.1/contrib/TerrainAndCone/test_boxstackb.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/contrib/TerrainAndCone/test_boxstackb.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,1375 @@ +/************************************************************************* + + +* * + + +* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + + +* All rights reserved. Email: russ@q12.org Web: www.q12.org * + + +* * + + +* This library is free software; you can redistribute it and/or * + + +* modify it under the terms of EITHER: * + + +* (1) The GNU Lesser General Public License as published by the Free * + + +* Software Foundation; either version 2.1 of the License, or (at * + + +* your option) any later version. The text of the GNU Lesser * + + +* General Public License is included with this library in the * + + +* file LICENSE.TXT. * + + +* (2) The BSD-style license that is included with this library in * + + +* the file LICENSE-BSD.TXT. * + + +* * + + +* This library is distributed in the hope that it will be useful, * + + +* but WITHOUT ANY WARRANTY; without even the implied warranty of * + + +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + + +* LICENSE.TXT and LICENSE-BSD.TXT for more details. * + + +* * + + +*************************************************************************/ + + + + + +#include + + +#include + + + + + +#ifdef _MSC_VER + + +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints + + +#endif + + + + + +// select correct drawing functions + + + + + +#ifdef dDOUBLE + + +#define dsDrawBox dsDrawBoxD + + +#define dsDrawSphere dsDrawSphereD + + +#define dsDrawCylinder dsDrawCylinderD + + +#define dsDrawCappedCylinder dsDrawCappedCylinderD + + +#endif + + + + + + + + +// some constants + + + + + +const dReal vTerrainLength = 4.f; + + +const dReal vTerrainHeight = 0.5f; + + +const int TERRAINNODES = 4; + + +dReal pTerrainHeights[TERRAINNODES*TERRAINNODES]; + + + + + +dGeomID terrainZ = NULL; + + +dGeomID terrainY = NULL; + + + + + +#define NUM 20 // max number of objects + + +#define DENSITY (5.0) // density of all objects + + +#define GPB 3 // maximum number of geometries per body + + +#define MAX_CONTACTS 4 // maximum number of contact points per body + + + + + + + + +// dynamics and collision objects + + + + + +struct MyObject { + + + dBodyID body; // the body + + + dGeomID geom[GPB]; // geometries representing this body + + +}; + + + + + +static int num=0; // number of objects in simulation + + +static int nextobj=0; // next object to recycle if num==NUM + + +static dWorldID world; + + +static dSpaceID space; + + +static MyObject obj[NUM]; + + +static dJointGroupID contactgroup; + + +static int selected = -1; // selected object + + +static int show_aabb = 0; // show geom AABBs? + + +static int show_contacts = 0; // show contact points? + + +static int random_pos = 1; // drop objects from random position? + + + + + + + + +// this is called by dSpaceCollide when two objects in space are + + +// potentially colliding. + + + + + +static void nearCallback (void *data, dGeomID o1, dGeomID o2) + + +{ + + + int i; + + + // if (o1->body && o2->body) return; + + + + + + // exit without doing anything if the two bodies are connected by a joint + + + dBodyID b1 = dGeomGetBody(o1); + + + dBodyID b2 = dGeomGetBody(o2); + + + if (b1 && b2 && dAreConnectedExcluding (b1,b2,dJointTypeContact)) return; + + + + + + dContact contact[MAX_CONTACTS]; // up to MAX_CONTACTS contacts per box-box + + + for (i=0; i= 'A' && c <= 'Z') return c - ('a'-'A'); + + + else return c; + + +} + + + + + + + + +// called when a key pressed + + + + + +static void command (int cmd) + + +{ + + + int i,j,k; + + + dReal sides[3]; + + + dMass m; + + + + + + cmd = locase (cmd); + + + if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x' + + + /* || cmd == 'l' */) { + + + if (num < NUM) { + + + i = num; + + + num++; + + + } + + + else { + + + i = nextobj; + + + nextobj++; + + + if (nextobj >= num) nextobj = 0; + + + + + + // destroy the body and geoms for slot i + + + dBodyDestroy (obj[i].body); + + + for (k=0; k < GPB; k++) { + + + if (obj[i].geom[k]) dGeomDestroy (obj[i].geom[k]); + + + } + + + memset (&obj[i],0,sizeof(obj[i])); + + + } + + + + + + obj[i].body = dBodyCreate (world); + + + for (k=0; k<3; k++) sides[k] = dRandReal()*0.5+0.1; + + + + + + dMatrix3 R; + + + if (random_pos) { + + + dBodySetPosition (obj[i].body, + + + dRandReal()*2-1,dRandReal()*2+1,dRandReal()+3); + + + dRFromAxisAndAngle (R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, + + + dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); + + + } + + + else { + + + dReal maxheight = 0; + + + for (k=0; k maxheight) maxheight = pos[2]; + + + } + + + dBodySetPosition (obj[i].body, 0,maxheight+1,maxheight+3); + + + dRFromAxisAndAngle (R,0,0,1,dRandReal()*10.0-5.0); + + + } + + + dBodySetRotation (obj[i].body,R); + + + dBodySetData (obj[i].body,(void*) i); + + + + + + if (cmd == 'b') { + + + dMassSetBox (&m,DENSITY,sides[0],sides[1],sides[2]); + + + obj[i].geom[0] = dCreateBox (space,sides[0],sides[1],sides[2]); + + + } + + + else if (cmd == 'c') { + + + sides[0] *= 0.5; + + + dMassSetCappedCylinder (&m,DENSITY,3,sides[0],sides[1]); + + + obj[i].geom[0] = dCreateCCylinder (space,sides[0],sides[1]); + + + } + + + /* + + + // cylinder option not yet implemented + + + else if (cmd == 'l') { + + + sides[1] *= 0.5; + + + dMassSetCappedCylinder (&m,DENSITY,3,sides[0],sides[1]); + + + obj[i].geom[0] = dCreateCylinder (space,sides[0],sides[1]); + + + } + + + */ + + + else if (cmd == 's') { + + + sides[0] *= 0.5; + + + dMassSetSphere (&m,DENSITY,sides[0]); + + + obj[i].geom[0] = dCreateSphere (space,sides[0]); + + + } + + + else if (cmd == 'x') { + + + dGeomID g2[GPB]; // encapsulated geometries + + + dReal dpos[GPB][3]; // delta-positions for encapsulated geometries + + + + + + // start accumulating masses for the encapsulated geometries + + + dMass m2; + + + dMassSetZero (&m); + + + + + + // set random delta positions + + + for (j=0; j= num) selected = 0; + + + if (selected < 0) selected = 0; + + + } + + + else if (cmd == 'd' && selected >= 0 && selected < num) { + + + dBodyDisable (obj[selected].body); + + + } + + + else if (cmd == 'e' && selected >= 0 && selected < num) { + + + dBodyEnable (obj[selected].body); + + + } + + + else if (cmd == 'a') { + + + show_aabb ^= 1; + + + } + + + else if (cmd == 't') { + + + show_contacts ^= 1; + + + } + + + else if (cmd == 'r') { + + + random_pos ^= 1; + + + } + + +} + + + + + + + + +// draw a geom + + + + + +void drawGeom (dGeomID g, const dReal *pos, const dReal *R, int show_aabb) + + +{ + + + int i; + + + + + + if (!g) return; + + + if (!pos) pos = dGeomGetPosition (g); + + + if (!R) R = dGeomGetRotation (g); + + + + + + int type = dGeomGetClass (g); + + + if (type == dBoxClass) { + + + dVector3 sides; + + + dGeomBoxGetLengths (g,sides); + + + dsDrawBox (pos,R,sides); + + + } + + + else if (type == dSphereClass) { + + + dsDrawSphere (pos,R,dGeomSphereGetRadius (g)); + + + } + + + else if (type == dCCylinderClass) { + + + dReal radius,length; + + + dGeomCCylinderGetParams (g,&radius,&length); + + + dsDrawCappedCylinder (pos,R,length,radius); + + + } + + + /* + + + // cylinder option not yet implemented + + + else if (type == dCylinderClass) { + + + dReal radius,length; + + + dGeomCylinderGetParams (g,&radius,&length); + + + dsDrawCylinder (pos,R,length,radius); + + + } + + + */ + + + else if (type == dGeomTransformClass) { + + + dGeomID g2 = dGeomTransformGetGeom (g); + + + const dReal *pos2 = dGeomGetPosition (g2); + + + const dReal *R2 = dGeomGetRotation (g2); + + + dVector3 actual_pos; + + + dMatrix3 actual_R; + + + dMULTIPLY0_331 (actual_pos,R,pos2); + + + actual_pos[0] += pos[0]; + + + actual_pos[1] += pos[1]; + + + actual_pos[2] += pos[2]; + + + dMULTIPLY0_333 (actual_R,R,R2); + + + drawGeom (g2,actual_pos,actual_R,0); + + + } + + + + + + if (show_aabb) { + + + // draw the bounding box for this geom + + + dReal aabb[6]; + + + dGeomGetAABB (g,aabb); + + + dVector3 bbpos; + + + for (i=0; i<3; i++) bbpos[i] = 0.5*(aabb[i*2] + aabb[i*2+1]); + + + dVector3 bbsides; + + + for (i=0; i<3; i++) bbsides[i] = aabb[i*2+1] - aabb[i*2]; + + + dMatrix3 RI; + + + dRSetIdentity (RI); + + + dsSetColorAlpha (1,0,0,0.5); + + + dsDrawBox (bbpos,RI,bbsides); + + + } + + +} + + + + + + + + +// simulation loop + + + + + +static void simLoop (int pause) + + +{ + + + dsSetColor (0,0,2); + + + dSpaceCollide (space,0,&nearCallback); + + + if (!pause) dWorldStep (world,0.05); + + + + + + dAASSERT(terrainY); + + + dAASSERT(terrainZ); + + + dsSetColor (0,1,0); + + + dsDrawTerrainY(0,0,vTerrainLength,vTerrainLength/TERRAINNODES,TERRAINNODES,pTerrainHeights,dGeomGetRotation(terrainY),dGeomGetPosition(terrainY)); + + + dsDrawTerrainZ(0,0,vTerrainLength,vTerrainLength/TERRAINNODES,TERRAINNODES,pTerrainHeights,dGeomGetRotation(terrainZ),dGeomGetPosition(terrainZ)); + + + + + + if (show_aabb) + + + { + + + dReal aabb[6]; + + + dGeomGetAABB (terrainY,aabb); + + + dVector3 bbpos; + + + int i; + + + for (i=0; i<3; i++) bbpos[i] = 0.5*(aabb[i*2] + aabb[i*2+1]); + + + dVector3 bbsides; + + + for (i=0; i<3; i++) bbsides[i] = aabb[i*2+1] - aabb[i*2]; + + + dMatrix3 RI; + + + dRSetIdentity (RI); + + + dsSetColorAlpha (1,0,0,0.5); + + + dsDrawBox (bbpos,RI,bbsides); + + + + + + dGeomGetAABB (terrainZ,aabb); + + + for (i=0; i<3; i++) bbpos[i] = 0.5*(aabb[i*2] + aabb[i*2+1]); + + + for (i=0; i<3; i++) bbsides[i] = aabb[i*2+1] - aabb[i*2]; + + + dsDrawBox (bbpos,RI,bbsides); + + + } + + + + + + dsSetColor (1,1,0); + + + + + + // remove all contact joints + + + dJointGroupEmpty (contactgroup); + + + + + + dsSetColor (1,1,0); + + + dsSetTexture (DS_WOOD); + + + for (int i=0; i Mon, 30 Dec 2013 08:05:39 +0000 + -- Leopold Palomo-Avellaneda Thu, 21 Jul 2016 09:44:33 +0200 -ode (2:0.11.1-4build1) precise; urgency=low +ode (2:0.14-2) unstable; urgency=medium - * No-change rebuild against current pkgbinarymangler to fix broken - md5sums. (see LP #875466) + * Uploaded version to unstable. + * Transition initiated to libode6. + + -- Leopold Palomo-Avellaneda Thu, 19 May 2016 09:09:53 +0200 + +ode (2:0.14-1) experimental; urgency=medium + + * New upstream version. Upstream recover the two number version X.Y + * Transition initiated to libode6 (upstream jump two numbers) + * Droped applied patch from upstream + * Upstream bump soname. Packages adapted + * Dropped old filename + * Bump Standards-Version to 3.9.8 (no changes) + * Updated Vcs-Browser and Vcs-Git fields + + -- Leopold Palomo-Avellaneda Wed, 27 Apr 2016 08:31:56 +0200 + +ode (2:0.13.1+git20150309-2) unstable; urgency=medium + + * Uploaded version to unstable. + * Transition initiated to libode4. + + -- Leopold Palomo-Avellaneda Tue, 10 Nov 2015 14:54:59 +0100 + +ode (2:0.13.1+git20150309-1) experimental; urgency=low + + [ Jonathan Dowland ] + * Team upload. + * Update Vcs-Browser field in control file. Closes: #705591. + + [ Evgeni Golov ] + * Correct Vcs-* URLs to point to anonscm.debian.org + + [ Anton Balashov ] + * Fix the watch file (Closes: #705523) + + [ Jackson Doak ] + * New upstream release. 0.12 + * debian/control: + - Bump debhelper to 9 + - Build-depend on dh-autoreconf + * debian/compat: Set as 9 + * debian/rules: + - Switch to dh + - Remove manpage lines + - Enable Hardening + - Use dh_autoreconf + * Create PACKAGE.manpage files + * Create debian/source/format + + [ Leopold Palomo-Avellaneda ] + * Continue Jackson Doak work ... + * New upstream release: 0.13.1 with a patch (Closes: #670746) + Version used git cloned 20150309. + * New upstream release + git version + * Added missing dependencies + * Bump standards to 3.9.6. No changes + * Added myself as Uploaders + * Deleted unused files + * Adapted files to new Soname + * Rename packages to a new version of Sonames + * Refactored rules. Conditional options depends on the platform + * Updated Vcs-Browser and Vcs-Git + * Drop sp version. Now all platforms have double precision excep + armel, mips and mipseland that have single precision. Thanks + Simon McVittie. + * Install files more simple and better changelog. Thanks to Gianfranco + Costamagna + * New watch file for Bitbucket + * Added patch to solve autoreconf issue. Thanks to James Cowgill and + Gianfranco Costamagna. Now it's working with dh-autoreconf + * Dropped unused vars and clean tabs + * Setting version to experimental + * Dropped override rule + + -- Leopold Palomo-Avellaneda Fri, 03 Oct 2014 14:47:43 +0200 + +ode (2:0.11.1-4.1) unstable; urgency=medium + + [ Aurelien Jarno ] + * Non-maintainer upload. + * Build-depends on dh-autoreconf. - -- Martin Pitt Wed, 29 Feb 2012 08:50:31 +0100 + [ Breno Leitao ] + * Run dh_autoreconf to update autoconf/libtool files (Closes: #752463). + + -- Aurelien Jarno Wed, 17 Sep 2014 22:37:14 +0200 ode (2:0.11.1-4) unstable; urgency=low diff -Nru ode-0.11.1/debian/clean ode-0.14/debian/clean --- ode-0.11.1/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/debian/clean 2016-04-28 20:18:36.000000000 +0000 @@ -0,0 +1 @@ +debian/ode-config.1 diff -Nru ode-0.11.1/debian/compat ode-0.14/debian/compat --- ode-0.11.1/debian/compat 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/compat 2016-04-28 20:18:36.000000000 +0000 @@ -1 +1 @@ -5 +9 diff -Nru ode-0.11.1/debian/control ode-0.14/debian/control --- ode-0.11.1/debian/control 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/control 2016-04-28 20:18:36.000000000 +0000 @@ -1,22 +1,22 @@ Source: ode Section: devel Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Games Team -Uploaders: Barry deFreese -Build-Depends: debhelper (>> 5.0.0), dh-autoreconf, docbook-to-man, - libglu1-mesa-dev | libglu-dev, libgl1-mesa-dev | libgl-dev -Standards-Version: 3.8.2 -Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/ode/ -Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/ode/?op=log +Maintainer: Debian Games Team +Uploaders: Barry deFreese , + Leopold Palomo-Avellaneda +Build-Depends: debhelper (>= 9), docbook-to-man, dh-autoreconf, + libglu1-mesa-dev | libglu-dev, libgl1-mesa-dev | libgl-dev, + libccd-dev +Standards-Version: 3.9.8 +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-games/ode.git +Vcs-Git: https://anonscm.debian.org/git/pkg-games/ode.git Homepage: http://www.ode.org/ -Package: libode1 +Package: libode6 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: libode0c2 -Replaces: libode0c2 +Pre-Depends: ${misc:Pre-Depends} Description: Open Dynamics Engine - runtime library ODE is a free, industrial quality library for simulating articulated rigid body dynamics - for example ground vehicles, legged creatures, and moving @@ -24,15 +24,18 @@ independent, with advanced joints, contact with friction, and built-in collision detection. . - This package provides the shared libraries built with double precision. + This package provides the shared libraries built with double precision, + default in 64 bits platforms. In 32 bits platforms default is single + precision. + Package: libode-dev Section: libdevel Architecture: any -Depends: libode1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: ode-dev, libode0-dev, libode-sp-dev -Replaces: ode-dev, libode0-dev -Provides: libode0-dev +Depends: libode6 (= ${binary:Version}), ${misc:Depends} +Conflicts: libode0-dev, libode-sp-dev, libode4-dev +Replaces: libode0-dev +Provides: libode6-dev Description: Open Dynamics Engine - development files ODE is a free, industrial quality library for simulating articulated rigid body dynamics - for example ground vehicles, legged creatures, and moving @@ -41,37 +44,6 @@ collision detection. . This package provides the header files and static libraries built with - double precision. - -Package: libode1sp -Section: libs -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: libode0c2 -Replaces: libode0c2 -Description: Open Dynamics Engine - runtime library with single precision - ODE is a free, industrial quality library for simulating articulated rigid - body dynamics - for example ground vehicles, legged creatures, and moving - objects in VR environments. It is fast, flexible, robust and platform - independent, with advanced joints, contact with friction, and built-in - collision detection. - . - This package provides the shared libraries built with single precision. - -Package: libode-sp-dev -Section: libdevel -Architecture: any -Depends: libode1sp (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: ode-dev, libode0-dev, libode-dev -Replaces: ode-dev, libode0-dev -Provides: libode0-dev -Description: Open Dynamics Engine - development files with single precision - ODE is a free, industrial quality library for simulating articulated rigid - body dynamics - for example ground vehicles, legged creatures, and moving - objects in VR environments. It is fast, flexible, robust and platform - independent, with advanced joints, contact with friction, and built-in - collision detection. - . - This package provides the header files and static libraries built with - single precision. + double precision, default in 64 bits platforms. In 32 bits platforms + default is single precision. diff -Nru ode-0.11.1/debian/copyright ode-0.14/debian/copyright --- ode-0.11.1/debian/copyright 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/copyright 2016-04-28 20:18:36.000000000 +0000 @@ -1,163 +1,190 @@ -This package was debianized by Guus Sliepen on -Sun, 9 Feb 2003 12:23:52 +0100. - -The actual maintainer is the Debian Games Team: -http://wiki.debian.org/Games/Development - -It was downloaded from http://www.ode.org/ - -Upstream Author: Russel Smith - -Copyright: - -Either LGPL 2.1 (see /usr/share/common-licenses/LGPL-2.1) or the following -license, at your choice: - -This is the BSD-style license for the Open Dynamics Engine ----------------------------------------------------------- - -Open Dynamics Engine -Copyright (c) 2001-2008, Russell L. Smith. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the names of ODE's copyright owner nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The GIMPACT directory: -Copyright (c) 2006 , Francisco León. - -It's covered by: - -GIMPACT/GIMPACT-LICENSE-BSD.TXT - -GIMPACT/GIMPACT-LICENSE-LGPL.TXT (/usr/share/common-licenses/LGPL) - -GIMPACT/GIMPACT-LICENSE-BSD.TXT: -Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, this list - of conditions and the following disclaimer in the documentation and/or other materials - provided with the distribution. - - * Neither the name of the GIMPACT nor the names of its contributors may be used - to endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. - - - - -the OPCODE directory is covered by this license: -You’re free to use them in any commercial or non-commercial program. -Copyright 2001-2003 Pierre Terdiman - -Another clause found in http://www.codercorner.com/OpcodeUserManual.pdf makes the license -DFSG free: -Q: Am I allowed to use OPCODE in a commercial program ? -A: Yes. The library is free. No GPL or LGPL, you can do whatever you want with the code. I -would appreciate it if you write somewhere in your product that you're using OPCODE, but -that's not mandatory. I would also appreciate a notification by mail, just to know how people -are using the lib. - -The 'ou' directory: -ODER's Utilities Library. Copyright (C) 2008 Oleh Derevenko. - -This directory is covered by either: - -The LGPLv3+ (/usr/share/common-licenses/LGPL) - -ou/LICENSE-BSD.TXT - -ou/LICENSE-ZLIB.TXT - -ou/LICENSE-BSD.TXT: -This is the BSD-style license for the ODER's Utilities Library --------------------------------------------------------------- - -ODER's Utilities Library -Copyright (c) 2008, Oleh Derevenko. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the names of ODER's Utilities' copyright owner nor the names of -its contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ou/LICENSE-ZLIB.TXT: -The zlib/libpng License for the ODER's Utilities Library - -Copyright (c) 2008 Oleh Derevenko - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ode +Source: https://bitbucket.org/odedevs/ode + +Files: * +Copyright: 1996-1998 Vienna University of Technology + 2001 Pierre Terdiman + 2001-2003 Russell L. Smith. + 2008 Oleh Derevenko, E-mail: oder@eleks.com +License: BSD-3-Clause or LGPL-2.1+ + +Files: GIMPACT/* +Copyright: 2006 Francisco Leon Najera. C.C. 80087371. email: projectileman@yahoo.com + 2006 Francisco Leon. C.C. 80087371. email: projectileman@yahoo.com +License: BSD-3-Clause or LGPL-2.1+ + +Files: libccd/* +Copyright: 2007, 2008, 2009 Daniel Fiser + 2010, 2011 Daniel Fiser + 2012 Daniel Fiser + 2013 Daniel Fiser +License: BSD-3-Clause + +Files: libccd/src/testsuites/cu/check-regressions + libccd/src/testsuites/cu/cu.c + libccd/src/testsuites/cu/cu.h +Copyright: 2007-2009 Daniel Fiser +License: LGPL-3.0+ + This file is part of CU. + . + CU is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of + the License, or (at your option) any later version. + . + CU is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU Lesser General Public License + Version 3 can be found in `/usr/share/common-licenses/LGPL-3'. + +Files: ou/* +Copyright: 2008 Oleh Derevenko +License: Zlib or GPL-3 or BSD-3-Clause + +Files: bindings/python/* +Copyright: 2004 PyODE developers + Timothy Stranex + Matthias Baas + Brett Hartshorn + Bernie Roehl + Alex Dumitrache +License: BSD-3-Clause + +Files: contrib/BreakableJoints/* +Copyright: 2004 Roel van Dijk +License: BSD-3-Clause + +Files: contrib/dCylinder/* +Copyright: 2002 Konstantin Slipchenko +License: BSD-3-Clause + +Files: contrib/dRay/* +Copyright: 2002 Erwin de Vries +License: BSD-3-Clause + +Files: contrib/GeomTransformGroup/* +Copyright: 2002 Tim Schmidt +License: BSD-3-Clause + +Files: contrib/InteractiveCollisions/* +Copyright: 2011 Daniel K. O. +License: GPL-3 + + +Files: contrib/InteractiveCollisions/deps/AntTweakBar/* +Copyright: 2005-2011 Philippe Decaudin +License: Zlib + +Files: contrib/Mac_CFMCarbon/* +Copyright: 2001 Russell L. Smith. + Frank Condello +License: LGPL-2.1+ + +Files: contrib/OdeModelProcessor/* +Copyright: 2007 Department Of Information Science, University of Otago, Dunedin, New Zealand. + Richard Barrington +License: BSD-3-Clause + +Files: contrib/Ode.NET/* +Copyright: 2006 Jason Perkins +License: BSD-3-Clause + +Files: contrib/TerrainAndCone/* +Copyright: 2001-2002 Russell L. Smith + 2001-2002 Russell L. Smith +License: BSD-3-Clause + +License: LGPL-2.1+ + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + . + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public + License along with this library (see the file LICENSE.TXT); if not, + write to the Free Software Foundation, Inc., 59 Temple Place, + Suite 330, Boston, MA 02111-1307 USA. + . + The FSF address in the above text is the old one. + . + On Debian systems, the complete text of the GNU Lesser General Public License + Version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. + +License: BSD-3-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + . + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + Neither the names of the copyright owner nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: Zlib + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + . + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + . + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + . + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + . + 3. This notice may not be removed or altered from any source + distribution. + +License: GPL-3 + On Debian systems, the full text of the GNU General Public License + version 2 can be found in the file `/usr/share/common-licenses/GPL-2', + and the full text of the GNU General Public License version 3 can be + found in the file `/usr/share/common-licenses/GPL-3'. + +Files: debian/* +Copyright: 2003 Guus Sliepen + 2006-2009 Gonéri Le Bouder + 2007 Peter De Wachter + 2007 Barry deFreese + 2008 Eddy Petrișor + 2010 Evgeni Golov + 2013 Anton Balashov + 2013 Jackson Doak + 2013 Jon Dowland + 2014-2015 Leopold Palomo-Avellaneda +License: BSD-3-Clause diff -Nru ode-0.11.1/debian/docs ode-0.14/debian/docs --- ode-0.11.1/debian/docs 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/docs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -README.txt diff -Nru ode-0.11.1/debian/files.mrproper ode-0.14/debian/files.mrproper --- ode-0.11.1/debian/files.mrproper 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/debian/files.mrproper 2016-07-21 07:36:16.000000000 +0000 @@ -0,0 +1,54 @@ +GIMPACT/Makefile.in +GIMPACT/include/GIMPACT/Makefile.in +GIMPACT/include/Makefile.in +GIMPACT/src/Makefile.in +Makefile.in +OPCODE/Ice/Makefile.in +OPCODE/Makefile.in +aclocal.m4 +build2/ +compile +config.guess +config.sub +configure +depcomp +drawstuff/Makefile.in +drawstuff/dstest/Makefile.in +drawstuff/src/Makefile.in +include/Makefile.in +include/drawstuff/Makefile.in +include/ode/Makefile.in +install-sh +libccd/Makefile.in +libccd/aclocal.m4 +libccd/configure +libccd/src/Makefile.in +libccd/src/config.h.in +libccd/src/testsuites/Makefile.in +libccd/src/testsuites/cu/Makefile.in +ltmain.sh +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 +missing +ode/Makefile.in +ode/demo/Makefile.in +ode/doc/Makefile.in +ode/src/Makefile.in +ode/src/config.h.in +ode/src/joints/Makefile.in +ou/Makefile.in +ou/aclocal.m4 +ou/configure +ou/include/ou/Makefile.in +ou/src/ou/Makefile.in +ou/test/Makefile.in +test-driver +tests/Makefile.in +tests/UnitTest++/Makefile.in +tests/UnitTest++/src/Makefile.in +tests/UnitTest++/src/Posix/Makefile.in +tests/UnitTest++/src/Win32/Makefile.in +tests/joints/Makefile.in diff -Nru ode-0.11.1/debian/libode1.dirs ode-0.14/debian/libode1.dirs --- ode-0.11.1/debian/libode1.dirs 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode1.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib diff -Nru ode-0.11.1/debian/libode1.install ode-0.14/debian/libode1.install --- ode-0.11.1/debian/libode1.install 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode1.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/lib*.so.* diff -Nru ode-0.11.1/debian/libode1.links ode-0.14/debian/libode1.links --- ode-0.11.1/debian/libode1.links 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode1.links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/libode.so.1.1.1 usr/lib/libode.so.1 diff -Nru ode-0.11.1/debian/libode1sp.dirs ode-0.14/debian/libode1sp.dirs --- ode-0.11.1/debian/libode1sp.dirs 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode1sp.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib diff -Nru ode-0.11.1/debian/libode1sp.install ode-0.14/debian/libode1sp.install --- ode-0.11.1/debian/libode1sp.install 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode1sp.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/lib*.so.* diff -Nru ode-0.11.1/debian/libode1sp.links ode-0.14/debian/libode1sp.links --- ode-0.11.1/debian/libode1sp.links 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode1sp.links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/libode.so.1.1.1sp usr/lib/libode.so.1sp diff -Nru ode-0.11.1/debian/libode6.install ode-0.14/debian/libode6.install --- ode-0.11.1/debian/libode6.install 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/debian/libode6.install 2016-04-28 20:18:36.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/lib*.so.* diff -Nru ode-0.11.1/debian/libode-dev.dirs ode-0.14/debian/libode-dev.dirs --- ode-0.11.1/debian/libode-dev.dirs 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode-dev.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/lib -usr/include/ode diff -Nru ode-0.11.1/debian/libode-dev.install ode-0.14/debian/libode-dev.install --- ode-0.11.1/debian/libode-dev.install 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode-dev.install 2016-04-28 20:18:36.000000000 +0000 @@ -1,4 +1,6 @@ usr/include/* -usr/lib/lib*.a +usr/lib/*/lib*.so +usr/lib/*/pkgconfig/* +usr/lib/*/lib*.a usr/bin/ode-config -usr/lib/pkgconfig/ode.pc + diff -Nru ode-0.11.1/debian/libode-dev.links ode-0.14/debian/libode-dev.links --- ode-0.11.1/debian/libode-dev.links 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode-dev.links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/libode.so.1.1.1 usr/lib/libode.so diff -Nru ode-0.11.1/debian/libode-dev.manpages ode-0.14/debian/libode-dev.manpages --- ode-0.11.1/debian/libode-dev.manpages 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/debian/libode-dev.manpages 2016-04-28 20:18:36.000000000 +0000 @@ -0,0 +1 @@ +debian/ode-config.1 \ No newline at end of file diff -Nru ode-0.11.1/debian/libode-sp-dev.dirs ode-0.14/debian/libode-sp-dev.dirs --- ode-0.11.1/debian/libode-sp-dev.dirs 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode-sp-dev.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/lib -usr/include/ode diff -Nru ode-0.11.1/debian/libode-sp-dev.install ode-0.14/debian/libode-sp-dev.install --- ode-0.11.1/debian/libode-sp-dev.install 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode-sp-dev.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -usr/include/* -usr/lib/lib*.a -usr/bin/ode-config -usr/lib/pkgconfig/ode.pc diff -Nru ode-0.11.1/debian/libode-sp-dev.links ode-0.14/debian/libode-sp-dev.links --- ode-0.11.1/debian/libode-sp-dev.links 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/libode-sp-dev.links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/libode.so.1.1.1sp usr/lib/libode.so diff -Nru ode-0.11.1/debian/rules ode-0.14/debian/rules --- ode-0.11.1/debian/rules 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/rules 2016-07-21 07:37:59.000000000 +0000 @@ -1,102 +1,39 @@ #!/usr/bin/make -f -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CXXFLAGS += -O0 -g3 - CFLAGS += -O0 -g3 - export CXXFLAGS CFLAGS -endif +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all -configure: configure-stamp -configure-stamp: - dh_testdir - dh_autoreconf - mkdir -p debian/build/dp debian/build/sp - # SP: single precision build - cd debian/build/sp && ../../../configure --enable-shared --prefix=/usr LIBS="-lX11" - # Adjust the SONAME of the single precision flavor - sed -i 's,^soname_spec=.*,soname_spec=libode.so.1sp,' debian/build/sp/libtool - cd debian/build/dp && ../../../configure --enable-shared --prefix=/usr --enable-double-precision LIBS="-lX11" - - touch configure-stamp - - -build: build-stamp -build-stamp: configure-stamp - dh_testdir - - cd debian/build/sp && $(MAKE) - cd debian/build/dp && $(MAKE) - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp \ - configure-stamp - rm -rf \ - debian/build \ - debian/tmp-sp \ - debian/tmp-dp - - # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) distclean - dh_autoreconf_clean - dh_clean configure-stamp build-stamp debian/ode-config.1 - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp - cd debian/build/sp && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp-sp - rm debian/tmp-sp/usr/lib/libode.so.1 - mv debian/tmp-sp/usr/lib/libode.so.1.1.1 \ - debian/tmp-sp/usr/lib/libode.so.1.1.1sp - cd debian/build/dp && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp-dp - - docbook-to-man debian/ode-config.man.sgml > \ - debian/ode-config.1 - -# Build architecture-independent files here. -binary-indep: -# no arch indep -# dh_testdir -i -# dh_testroot -i -# dh_installdocs -i -# dh_install -i -# dh_installchangelogs -i CHANGELOG.txt -# dh_compress -i -# dh_fixperms -i -# dh_installdeb -i -# dh_gencontrol -i -# dh_md5sums -i -# dh_builddeb -i - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir -a - dh_testroot -a - dh_installdocs -a - dh_installman -plibode-dev debian/ode-config.1 - dh_installman -plibode-sp-dev debian/ode-config.1 - dh_install --sourcedir=debian/tmp-sp -plibode-sp-dev - dh_install --sourcedir=debian/tmp-sp -plibode1sp - dh_install --sourcedir=debian/tmp-dp -plibode-dev - dh_install --sourcedir=debian/tmp-dp -plibode1 - dh_installchangelogs -a CHANGELOG.txt - dh_link -a - dh_strip -a - dh_compress -a - dh_fixperms -a - dh_makeshlibs -a - dh_shlibdeps -a - dh_installdeb -a - dh_gencontrol -a - dh_md5sums -a - dh_builddeb -a +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) + +# enabling single precision only for armel, mips and mipsel +ifeq ($(DEB_HOST_ARCH),armel) + CONFIG_OPTS = --enable-single-precision +else ifeq ($(DEB_HOST_ARCH),mips) + CONFIG_OPTS = --enable-single-precision +else ifeq ($(DEB_HOST_ARCH),mipsel) + CONFIG_OPTS = --enable-single-precision +else + CONFIG_OPTS = --enable-double-precision +endif -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure +CONFIG_OPTS += --mandir=/usr/share/man \ + --with-libccd=system \ + --enable-libccd \ + --enable-shared \ + --enable-static + +%: + dh $@ --parallel --with autoreconf + +override_dh_auto_configure: + dh_auto_configure -- $(CONFIG_OPTS) + +override_dh_auto_build: + dh_auto_build + docbook-to-man debian/ode-config.man.sgml > debian/ode-config.1 + +mr_proper: + dh_auto_clean + cat debian/files.mrproper | xargs -n1 rm -rf diff -Nru ode-0.11.1/debian/source/format ode-0.14/debian/source/format --- ode-0.11.1/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/debian/source/format 2016-04-28 20:18:36.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) \ No newline at end of file diff -Nru ode-0.11.1/debian/watch ode-0.14/debian/watch --- ode-0.11.1/debian/watch 2016-07-21 07:48:17.000000000 +0000 +++ ode-0.14/debian/watch 2016-04-28 20:18:36.000000000 +0000 @@ -1,4 +1,4 @@ version=3 opts="dversionmangle=s/\.dfsg(.?\d+)?$//" \ -http://sf.net/opende/ode-src-([\d.]+)\.zip +https://bitbucket.org/odedevs/ode/downloads .*/(\d\S*)\.tar\.gz diff -Nru ode-0.11.1/depcomp ode-0.14/depcomp --- ode-0.11.1/depcomp 2009-05-24 22:15:46.000000000 +0000 +++ ode-0.14/depcomp 1970-01-01 00:00:00.000000000 +0000 @@ -1,589 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2007-03-29.01 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff -Nru ode-0.11.1/drawstuff/dstest/Makefile.am ode-0.14/drawstuff/dstest/Makefile.am --- ode-0.11.1/drawstuff/dstest/Makefile.am 2008-06-03 23:08:30.000000000 +0000 +++ ode-0.14/drawstuff/dstest/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -7,11 +7,8 @@ if WIN32 resources.o: $(top_srcdir)/drawstuff/src/resources.rc $(top_srcdir)/drawstuff/src/resource.h - @WINDRES@ $(top_srcdir)/drawstuff/src/resources.rc -o resources.o + $(WINDRES) $(top_srcdir)/drawstuff/src/resources.rc -o resources.o dstest_LDADD += resources.o endif -if X11 -dstest_LDADD+=$(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -endif diff -Nru ode-0.11.1/drawstuff/dstest/Makefile.in ode-0.14/drawstuff/dstest/Makefile.in --- ode-0.11.1/drawstuff/dstest/Makefile.in 2009-05-24 22:15:38.000000000 +0000 +++ ode-0.14/drawstuff/dstest/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,467 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = dstest$(EXEEXT) -@WIN32_TRUE@am__append_1 = resources.o -@X11_TRUE@am__append_2 = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -subdir = drawstuff/dstest -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/config.h -CONFIG_CLEAN_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_dstest_OBJECTS = dstest.$(OBJEXT) -dstest_OBJECTS = $(am_dstest_OBJECTS) -am__DEPENDENCIES_1 = -@X11_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \ -@X11_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -dstest_DEPENDENCIES = $(top_builddir)/drawstuff/src/libdrawstuff.la \ - $(am__append_1) $(am__DEPENDENCIES_2) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/ode/src -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dstest_SOURCES) -DIST_SOURCES = $(dstest_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I$(top_srcdir)/drawstuff/src -I$(top_srcdir)/include -dstest_SOURCES = dstest.cpp -dstest_LDADD = $(top_builddir)/drawstuff/src/libdrawstuff.la @GL_LIBS@ \ - $(am__append_1) $(am__append_2) -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign drawstuff/dstest/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign drawstuff/dstest/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 -dstest$(EXEEXT): $(dstest_OBJECTS) $(dstest_DEPENDENCIES) - @rm -f dstest$(EXEEXT) - $(CXXLINK) $(dstest_OBJECTS) $(dstest_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dstest.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 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 - - -@WIN32_TRUE@resources.o: $(top_srcdir)/drawstuff/src/resources.rc $(top_srcdir)/drawstuff/src/resource.h -@WIN32_TRUE@ @WINDRES@ $(top_srcdir)/drawstuff/src/resources.rc -o resources.o -# 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 -Nru ode-0.11.1/drawstuff/Makefile.in ode-0.14/drawstuff/Makefile.in --- ode-0.11.1/drawstuff/Makefile.in 2009-05-24 22:15:38.000000000 +0000 +++ ode-0.14/drawstuff/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,506 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = drawstuff -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/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 = src dstest -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -@ENABLE_DRAWSTUFF_TRUE@SUBDIRS = src dstest -@ENABLE_DRAWSTUFF_TRUE@EXTRA_DIST = textures -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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign drawstuff/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign drawstuff/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; nonempty = 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 -Nru ode-0.11.1/drawstuff/src/drawstuff.cpp ode-0.14/drawstuff/src/drawstuff.cpp --- ode-0.11.1/drawstuff/src/drawstuff.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/drawstuff/src/drawstuff.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -43,6 +43,7 @@ #include #include "config.h" + #ifdef HAVE_APPLE_OPENGL_FRAMEWORK #include #include @@ -108,6 +109,17 @@ } } +static void crossProduct3(float res[3], const float a[3], const float b[3]) +{ + float res_0 = a[1]*b[2] - a[2]*b[1]; + float res_1 = a[2]*b[0] - a[0]*b[2]; + float res_2 = a[0]*b[1] - a[1]*b[0]; + // Only assign after all the calculations are over to avoid incurring memory aliasing + res[0] = res_0; + res[1] = res_1; + res[2] = res_2; +} + //*************************************************************************** // PPM image object @@ -382,10 +394,9 @@ glMultMatrixf (matrix); } -static void drawConvex (float *_planes,unsigned int _planecount, - float *_points, - unsigned int _pointcount, - unsigned int *_polygons) +static void drawConvex (const float *_planes, unsigned int _planecount, + const float *_points, unsigned int /*_pointcount*/, + const unsigned int *_polygons) { unsigned int polyindex=0; for(unsigned int i=0;i<_planecount;++i) @@ -407,10 +418,9 @@ } } -static void drawConvexD (double *_planes,unsigned int _planecount, - double *_points, - unsigned int _pointcount, - unsigned int *_polygons) +static void drawConvexD (const double *_planes, unsigned int _planecount, + const double *_points, unsigned int /*_pointcount*/, + const unsigned int *_polygons) { unsigned int polyindex=0; for(unsigned int i=0;i<_planecount;++i) @@ -615,7 +625,7 @@ v[0] = v2[0] - v0[0]; v[1] = v2[1] - v0[1]; v[2] = v2[2] - v0[2]; - dCROSS (normal,=,u,v); + crossProduct3(normal,u,v); normalizeVector3 (normal); glBegin(solid ? GL_TRIANGLES : GL_LINE_STRIP); @@ -635,7 +645,7 @@ v[0] = float( v2[0] - v0[0] ); v[1] = float( v2[1] - v0[1] ); v[2] = float( v2[2] - v0[2] ); - dCROSS (normal,=,u,v); + crossProduct3(normal,u,v); normalizeVector3 (normal); glBegin(solid ? GL_TRIANGLES : GL_LINE_STRIP); @@ -884,7 +894,7 @@ #if !defined(macintosh) || defined(ODE_PLATFORM_OSX) -void dsStartGraphics (int width, int height, dsFunctions *fn) +void dsStartGraphics (int /*width*/, int /*height*/, dsFunctions *fn) { const char *prefix = DEFAULT_PATH_TO_TEXTURES; @@ -1367,10 +1377,9 @@ } extern "C" void dsDrawConvex (const float pos[3], const float R[12], - float *_planes,unsigned int _planecount, - float *_points, - unsigned int _pointcount, - unsigned int *_polygons) + const float *_planes,unsigned int _planecount, + const float *_points, unsigned int _pointcount, + const unsigned int *_polygons) { if (current_state != 2) dsError ("drawing function called outside simulation loop"); setupDrawingMode(); @@ -1483,10 +1492,8 @@ } -void dsDrawLine (const float pos1[3], const float pos2[3]) +static void drawLine(const float pos1[3], const float pos2[3]) { - setupDrawingMode(); - glColor3f (color[0],color[1],color[2]); glDisable (GL_LIGHTING); glLineWidth (2); glShadeModel (GL_FLAT); @@ -1497,8 +1504,26 @@ } -void dsDrawBoxD (const double pos[3], const double R[12], - const double sides[3]) +extern "C" void dsDrawLine (const float pos1[3], const float pos2[3]) +{ + setupDrawingMode(); + glColor4f(color[0], color[1], color[2], color[3]); + drawLine(pos1, pos2); + + if (use_shadows) { + setShadowDrawingMode(); + setShadowTransform(); + + drawLine(pos1, pos2); + + glPopMatrix(); + glDepthRange (0,1); + } +} + + +extern "C" void dsDrawBoxD (const double pos[3], const double R[12], + const double sides[3]) { int i; float pos2[3],R2[12],fsides[3]; @@ -1509,10 +1534,9 @@ } extern "C" void dsDrawConvexD (const double pos[3], const double R[12], - double *_planes,unsigned int _planecount, - double *_points, - unsigned int _pointcount, - unsigned int *_polygons) + const double *_planes, unsigned int _planecount, + const double *_points, unsigned int _pointcount, + const unsigned int *_polygons) { if (current_state != 2) dsError ("drawing function called outside simulation loop"); setupDrawingMode(); diff -Nru ode-0.11.1/drawstuff/src/Makefile.am ode-0.14/drawstuff/src/Makefile.am --- ode-0.11.1/drawstuff/src/Makefile.am 2008-06-03 23:08:30.000000000 +0000 +++ ode-0.14/drawstuff/src/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -4,8 +4,10 @@ noinst_LTLIBRARIES = libdrawstuff.la libdrawstuff_la_SOURCES = drawstuff.cpp internal.h AM_CPPFLAGS = -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/ode/src \ -DDEFAULT_PATH_TO_TEXTURES='"$(top_srcdir)/drawstuff/textures/"' \ - $(X_CFLAGS) + $(X11_CFLAGS) if WIN32 libdrawstuff_la_SOURCES+= windows.cpp resource.h resources.rc @@ -15,7 +17,7 @@ if X11 libdrawstuff_la_SOURCES+= x11.cpp -libdrawstuff_la_LIBADD = $(X_LIBS) +libdrawstuff_la_LIBADD = $(X11_LIBS) endif if OSX diff -Nru ode-0.11.1/drawstuff/src/Makefile.in ode-0.14/drawstuff/src/Makefile.in --- ode-0.11.1/drawstuff/src/Makefile.in 2009-05-24 22:15:38.000000000 +0000 +++ ode-0.14/drawstuff/src/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,492 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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@ - -# Drawstuff is meant as an aid for testing and not as a full -# rendering library. - -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@ -@WIN32_TRUE@am__append_1 = windows.cpp resource.h resources.rc -@X11_TRUE@am__append_2 = x11.cpp -@OSX_TRUE@am__append_3 = osx.cpp -subdir = drawstuff/src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/config.h -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -@X11_TRUE@libdrawstuff_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__libdrawstuff_la_SOURCES_DIST = drawstuff.cpp internal.h \ - windows.cpp resource.h resources.rc x11.cpp osx.cpp -@WIN32_TRUE@am__objects_1 = windows.lo -@X11_TRUE@am__objects_2 = x11.lo -@OSX_TRUE@am__objects_3 = osx.lo -am_libdrawstuff_la_OBJECTS = drawstuff.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) -libdrawstuff_la_OBJECTS = $(am_libdrawstuff_la_OBJECTS) -libdrawstuff_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libdrawstuff_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/ode/src -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -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 = $(libdrawstuff_la_SOURCES) -DIST_SOURCES = $(am__libdrawstuff_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libdrawstuff.la -libdrawstuff_la_SOURCES = drawstuff.cpp internal.h $(am__append_1) \ - $(am__append_2) $(am__append_3) -AM_CPPFLAGS = -I$(top_srcdir)/include \ - -DDEFAULT_PATH_TO_TEXTURES='"$(top_srcdir)/drawstuff/textures/"' \ - $(X_CFLAGS) - -@WIN32_TRUE@libdrawstuff_la_LIBADD = -lwinmm -lgdi32 -@X11_TRUE@libdrawstuff_la_LIBADD = $(X_LIBS) -@WIN32_TRUE@libdrawstuff_la_LDFLAGS = -no-undefined -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign drawstuff/src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign drawstuff/src/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-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libdrawstuff.la: $(libdrawstuff_la_OBJECTS) $(libdrawstuff_la_DEPENDENCIES) - $(libdrawstuff_la_LINK) $(libdrawstuff_la_OBJECTS) $(libdrawstuff_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drawstuff.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11.Plo@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -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-noinstLTLIBRARIES \ - 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-noinstLTLIBRARIES 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 -Nru ode-0.11.1/drawstuff/src/osx.cpp ode-0.14/drawstuff/src/osx.cpp --- ode-0.11.1/drawstuff/src/osx.cpp 2008-03-10 06:25:12.000000000 +0000 +++ ode-0.14/drawstuff/src/osx.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -40,52 +40,26 @@ #include #include "internal.h" -#include -#include +#include +#include // Global variables -static bool running = true; // 1 if simulation running static bool paused = false; // 1 if in `pause' mode static bool singlestep = false; // 1 if single step key pressed static bool writeframes = false; // 1 if frame files to be written static int windowWidth = -1; static int windowHeight = -1; -static UInt32 modifierMask = 0; static int mouseButtonMode = 0; static bool mouseWithOption = false; // Set if dragging the mouse with alt pressed static bool mouseWithControl = false; // Set if dragging the mouse with ctrl pressed static dsFunctions* functions = NULL; -static WindowRef windowReference; -static AGLContext aglContext; - -static EventHandlerUPP mouseUPP = NULL; -static EventHandlerUPP keyboardUPP = NULL; -static EventHandlerUPP windowUPP = NULL; - -// Describes the window-events we are interested in -EventTypeSpec OSX_WINDOW_EVENT_TYPES[] = { - { kEventClassWindow, kEventWindowBoundsChanged }, - { kEventClassWindow, kEventWindowClose }, - { kEventClassWindow, kEventWindowDrawContent } -}; - -// Describes the mouse-events we are interested in -EventTypeSpec OSX_MOUSE_EVENT_TYPES[] = { - { kEventClassMouse, kEventMouseDown }, - { kEventClassMouse, kEventMouseUp }, - { kEventClassMouse, kEventMouseMoved }, - { kEventClassMouse, kEventMouseDragged } -}; - -// Describes the key-events we are interested in -EventTypeSpec OSX_KEY_EVENT_TYPES[] = { - { kEventClassKeyboard, kEventRawKeyDown }, -// { kEventClassKeyboard, kEventRawKeyUp }, - { kEventClassKeyboard, kEventRawKeyModifiersChanged } -}; +static int windowReference; +static int frame = 1; +static int prev_x = 0; +static int prev_y = 0; //*************************************************************************** // error handling for unix @@ -105,6 +79,7 @@ va_list ap; va_start (ap,msg); printMessage ("Error",msg,ap); + va_end (ap); exit (1); } @@ -114,6 +89,7 @@ va_list ap; va_start (ap,msg); printMessage ("INTERNAL ERROR",msg,ap); + va_end (ap); // *((char *)0) = 0; ... commit SEGVicide ? abort(); } @@ -123,6 +99,7 @@ va_list ap; va_start (ap,msg); vprintf (msg,ap); + va_end (ap); } static void captureFrame( int num ){ @@ -143,9 +120,8 @@ fclose (f); } -extern "C" void dsStop(){ - - running = false; +extern "C" void dsStop() +{ } extern "C" double dsElapsedTime() @@ -168,309 +144,163 @@ #endif } -OSStatus osxKeyEventHandler( EventHandlerCallRef handlerCallRef, EventRef event, void *userData ){ - - UInt32 keyCode; - UInt32 state = 0; - void* KCHR = NULL; - char charCode = 0; - char uppercase = 0; - - switch( GetEventKind( event ) ){ - case kEventRawKeyDown: - if( GetEventParameter( event, kEventParamKeyCode, typeUInt32, NULL, sizeof( UInt32 ), NULL, &keyCode ) != noErr ){ - break; - } - KCHR = (void *)GetScriptVariable( smCurrentScript, smKCHRCache ); - charCode = (char)KeyTranslate( KCHR, keyCode, &state ); - uppercase = charCode; - UppercaseText( &uppercase, 1, smSystemScript ); - //printf( "Character %d [%c] [%c] modifiers [%d]\n", charCode, charCode, uppercase, modifierMask ); - - if( modifierMask == 0 ){ - if( charCode >= ' ' && charCode <= 126 && functions -> command ){ - functions -> command( charCode ); - } - } - else if( ( modifierMask & controlKey ) ){ - // ctrl+key was pressed - switch(uppercase ){ - case 'T': - dsSetTextures( !dsGetTextures() ); - break; - case 'S': - dsSetShadows( !dsGetShadows() ); - break; - case 'X': - running = false; - break; - case 'P': - paused = !paused; - singlestep = false; - break; - case 'O': - if( paused ){ - singlestep = true; - } - break; - case 'V': { - float xyz[3],hpr[3]; - dsGetViewpoint( xyz,hpr ); - printf( "Viewpoint = (%.4f,%.4f,%.4f,%.4f,%.4f,%.4f)\n", xyz[0], xyz[1], xyz[2], hpr[0], hpr[1], hpr[2] ); - break; - } - case 'W': - writeframes = !writeframes; - if( writeframes ){ - printf( "Now writing frames to PPM files\n" ); - } - break; - } - - } - return noErr; - case kEventRawKeyModifiersChanged: - if( GetEventParameter( event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof( UInt32 ), NULL, &modifierMask ) == noErr ){ - if( ( mouseWithOption && !( modifierMask & optionKey ) ) || ( mouseWithControl && !( modifierMask & controlKey ) ) ){ - // The mouse was being dragged using either the command-key or the option-key modifier to emulate - // the right button or both left + right. - // Now the modifier-key has been released so the mouseButtonMode must be changed accordingly - // The following releases the right-button. - mouseButtonMode &= (~4); - mouseWithOption = false; - mouseWithControl = false; - } - return noErr; - } - break; - } - return eventNotHandledErr; +int osxGetModifierMask() +{ + return glutGetModifiers() & ~GLUT_ACTIVE_SHIFT; } -OSStatus osxMouseEventHandler( EventHandlerCallRef handlerCallRef, EventRef event, void *userData ){ - - bool buttonDown = false; - HIPoint mouseLocation; +void osxKeyEventHandler( unsigned char key, int x, int y ) +{ + unsigned char uppercase; + if (key >= 'a' && key <= 'z') + uppercase = key - ('a' - 'A'); + else + uppercase = key; + + int modifierMask = osxGetModifierMask(); + if (modifierMask == 0) + { + if( key >= ' ' && key <= 126 && functions -> command ) + functions -> command( key ); + } + else if (modifierMask & GLUT_ACTIVE_CTRL) + { + // ctrl+key was pressed + uppercase += 'A' - 1; + switch(uppercase ){ + case 'T': + dsSetTextures( !dsGetTextures() ); + break; + case 'S': + dsSetShadows( !dsGetShadows() ); + break; + case 'X': + exit(0); + break; + case 'P': + paused = !paused; + singlestep = false; + break; + case 'O': + if( paused ){ + singlestep = true; + } + break; + case 'V': { + float xyz[3],hpr[3]; + dsGetViewpoint( xyz,hpr ); + printf( "Viewpoint = (%.4f,%.4f,%.4f,%.4f,%.4f,%.4f)\n", xyz[0], xyz[1], xyz[2], hpr[0], hpr[1], hpr[2] ); + break; + } + case 'W': + writeframes = !writeframes; + if( writeframes ){ + printf( "Now writing frames to PPM files\n" ); + } + break; + } + } +} - switch( GetEventKind( event ) ){ - - case kEventMouseDown: +void osxMouseEventHandler(int button, int state, int x, int y) +{ + prev_x = x; + prev_y = y; + bool buttonDown = false; + switch( state ){ + case GLUT_DOWN: buttonDown = true; - case kEventMouseUp: - if( GetEventParameter( event, kEventParamWindowMouseLocation, typeHIPoint, NULL, sizeof( HIPoint ), NULL, &mouseLocation ) != noErr ){ - break; - } - EventMouseButton button; - if( GetEventParameter( event, kEventParamMouseButton, typeMouseButton, NULL, sizeof( EventMouseButton ), NULL, &button ) == noErr ){ - - if( button == kEventMouseButtonPrimary ){ - if( modifierMask & controlKey ){ - // Ctrl+button == right - button = kEventMouseButtonSecondary; - mouseWithControl = true; - } - else if( modifierMask & optionKey ){ - // Alt+button == left+right - mouseButtonMode = 5; - mouseWithOption = true; - return noErr; - } - } - if( buttonDown ){ - if( button == kEventMouseButtonPrimary ) mouseButtonMode |= 1; // Left - if( button == kEventMouseButtonTertiary ) mouseButtonMode |= 2; // Middle - if( button == kEventMouseButtonSecondary ) mouseButtonMode |= 4; // Right - } - else{ - if( button == kEventMouseButtonPrimary ) mouseButtonMode &= (~1); // Left - if( button == kEventMouseButtonTertiary ) mouseButtonMode &= (~2); // Middle - if( button == kEventMouseButtonSecondary ) mouseButtonMode &= (~4);// Right - } - return noErr; - } - break; - case kEventMouseMoved: - // NO-OP - return noErr; - case kEventMouseDragged: - // Carbon provides mouse-position deltas, so we don't have to store the old state ourselves - if( GetEventParameter( event, kEventParamMouseDelta, typeHIPoint, NULL, sizeof( HIPoint ), NULL, &mouseLocation ) == noErr ){ - //printf( "Mode %d\n", mouseButtonMode ); - dsMotion( mouseButtonMode, (int)mouseLocation.x, (int)mouseLocation.y ); - return noErr; - } - break; - case kEventMouseWheelMoved: - // NO-OP - break; - } - return eventNotHandledErr; + case GLUT_UP: + if( button == GLUT_LEFT_BUTTON ){ + int modifierMask = osxGetModifierMask(); + if( modifierMask & GLUT_ACTIVE_CTRL ){ + // Ctrl+button == right + button = GLUT_RIGHT_BUTTON; + mouseWithControl = true; + } + else if( modifierMask & GLUT_ACTIVE_ALT ){ + // Alt+button == left+right + mouseButtonMode = 5; + mouseWithOption = true; + return; + } + } + if( buttonDown ){ + if( button == GLUT_LEFT_BUTTON ) mouseButtonMode |= 1; // Left + if( button == GLUT_MIDDLE_BUTTON ) mouseButtonMode |= 2; // Middle + if( button == GLUT_RIGHT_BUTTON ) mouseButtonMode |= 4; // Right + } + else{ + if( button == GLUT_LEFT_BUTTON ) mouseButtonMode &= (~1); // Left + if( button == GLUT_MIDDLE_BUTTON ) mouseButtonMode &= (~2); // Middle + if( button == GLUT_RIGHT_BUTTON ) mouseButtonMode &= (~4); // Right + } + return; + } } -static void osxCloseMainWindow(){ - - if( windowUPP != NULL ){ - DisposeEventHandlerUPP( windowUPP ); - windowUPP = NULL; - } - - if( aglContext != NULL ){ - aglSetCurrentContext( NULL ); - aglSetDrawable( aglContext, NULL ); - aglDestroyContext( aglContext ); - aglContext = NULL; - } - - if( windowReference != NULL ){ - ReleaseWindow( windowReference ); - windowReference = NULL; - } +void osxMotionEventHandler(int x, int y) +{ + dsMotion( mouseButtonMode, x - prev_x, y - prev_y ); + prev_x = x; + prev_y = y; } -OSStatus osxWindowEventHandler( EventHandlerCallRef handlerCallRef, EventRef event, void *userData ){ - - //printf( "WindowEvent\n" ); - switch( GetEventKind(event) ){ - case kEventWindowBoundsChanged: - WindowRef window; - GetEventParameter( event, kEventParamDirectObject, typeWindowRef, NULL, sizeof(WindowRef), NULL, &window ); - Rect rect; - GetWindowPortBounds( window, &rect ); - windowWidth = rect.right; - windowHeight = rect.bottom; - aglUpdateContext( aglContext ); - break; - case kEventWindowClose: - osxCloseMainWindow(); - exit( 0 ); - return noErr; - case kEventWindowDrawContent: - // NO-OP - break; - } - - return eventNotHandledErr; +void osxWindowReshapeEventHandler(int width, int height) +{ + windowWidth = width; + windowHeight = height; } -static void osxCreateMainWindow( int width, int height ){ - - int redbits = 4; - int greenbits = 4; - int bluebits = 4; - int alphabits = 4; - int depthbits = 16; - - OSStatus error; - - // create pixel format attribute list - - GLint pixelFormatAttributes[256]; - int numAttrs = 0; - - pixelFormatAttributes[numAttrs++] = AGL_RGBA; - pixelFormatAttributes[numAttrs++] = AGL_DOUBLEBUFFER; - - pixelFormatAttributes[numAttrs++] = AGL_RED_SIZE; - pixelFormatAttributes[numAttrs++] = redbits; - pixelFormatAttributes[numAttrs++] = AGL_GREEN_SIZE; - pixelFormatAttributes[numAttrs++] = greenbits; - pixelFormatAttributes[numAttrs++] = AGL_BLUE_SIZE; - pixelFormatAttributes[numAttrs++] = bluebits; - pixelFormatAttributes[numAttrs++] = AGL_ALPHA_SIZE; - pixelFormatAttributes[numAttrs++] = alphabits; - pixelFormatAttributes[numAttrs++] = AGL_DEPTH_SIZE; - pixelFormatAttributes[numAttrs++] = depthbits; +static void osxCreateMainWindow( int width, int height ) +{ + int argc = 1; + char* argv[2]; + argv[0] = (char*)""; + argv[1] = NULL; + glutInit(&argc, argv); + glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH); + glutInitWindowSize(width, height); - pixelFormatAttributes[numAttrs++] = AGL_NONE; - - // create pixel format. - - AGLDevice mainMonitor = GetMainDevice(); - AGLPixelFormat pixelFormat = aglChoosePixelFormat( &mainMonitor, 1, pixelFormatAttributes ); - if( pixelFormat == NULL ){ - return; - } - - aglContext = aglCreateContext( pixelFormat, NULL ); - - aglDestroyPixelFormat( pixelFormat ); - - if( aglContext == NULL ){ - osxCloseMainWindow(); - return; - } - - Rect windowContentBounds; - windowContentBounds.left = 0; - windowContentBounds.top = 0; - windowContentBounds.right = width; - windowContentBounds.bottom = height; - - int windowAttributes = kWindowCloseBoxAttribute - | kWindowFullZoomAttribute - | kWindowCollapseBoxAttribute - | kWindowResizableAttribute - | kWindowStandardHandlerAttribute - | kWindowLiveResizeAttribute; - - error = CreateNewWindow( kDocumentWindowClass, windowAttributes, &windowContentBounds, &windowReference ); - if( ( error != noErr ) || ( windowReference == NULL ) ){ - osxCloseMainWindow(); - return; - } - - windowUPP = NewEventHandlerUPP( osxWindowEventHandler ); - - error = InstallWindowEventHandler( windowReference, windowUPP,GetEventTypeCount( OSX_WINDOW_EVENT_TYPES ), OSX_WINDOW_EVENT_TYPES, NULL, NULL ); - if( error != noErr ){ - osxCloseMainWindow(); - return; - } - - // The process-type must be changed for a ForegroundApplication - // Unless it is a foreground-process, the application will not show in the dock or expose and the window - // will not behave properly. - ProcessSerialNumber currentProcess; - GetCurrentProcess( ¤tProcess ); - TransformProcessType( ¤tProcess, kProcessTransformToForegroundApplication ); - SetFrontProcess( ¤tProcess ); - - SetWindowTitleWithCFString( windowReference, CFSTR( "ODE - Drawstuff" ) ); - RepositionWindow( windowReference, NULL, kWindowCenterOnMainScreen ); - - ShowWindow( windowReference ); - - if( !aglSetDrawable( aglContext, GetWindowPort( windowReference ) ) ){ - osxCloseMainWindow(); - return; - } - - if( !aglSetCurrentContext( aglContext ) ){ - osxCloseMainWindow(); - } - + windowReference = glutCreateWindow("ODE - Drawstuff"); windowWidth = width; windowHeight = height; } -int osxInstallEventHandlers(){ - - OSStatus error; - - mouseUPP = NewEventHandlerUPP( osxMouseEventHandler ); - - error = InstallEventHandler( GetApplicationEventTarget(), mouseUPP, GetEventTypeCount( OSX_MOUSE_EVENT_TYPES ), OSX_MOUSE_EVENT_TYPES, NULL, NULL ); - if( error != noErr ){ - return GL_FALSE; +void osxRedisplayEventHandler() +{ + dsDrawFrame( windowWidth, windowHeight, functions, paused && !singlestep ); + singlestep = false; + glutSwapBuffers(); + + // capture frames if necessary + if( !paused && writeframes ){ + captureFrame( frame ); + frame++; } +} - keyboardUPP = NewEventHandlerUPP( osxKeyEventHandler ); - - error = InstallEventHandler( GetApplicationEventTarget(), keyboardUPP, GetEventTypeCount( OSX_KEY_EVENT_TYPES ), OSX_KEY_EVENT_TYPES, NULL, NULL ); - if( error != noErr ){ - return GL_FALSE; - } - +void osxTimerEventHandler(int); + +void osxInstallTimerHandler() +{ + glutTimerFunc(1000/60, osxTimerEventHandler, 0); +} + +void osxTimerEventHandler(int) +{ + glutPostRedisplay(); + osxInstallTimerHandler(); +} + +int osxInstallEventHandlers() +{ + glutKeyboardFunc(osxKeyEventHandler); + glutMouseFunc(osxMouseEventHandler); + glutMotionFunc(osxMotionEventHandler); + glutDisplayFunc(osxRedisplayEventHandler); + glutReshapeFunc(osxWindowReshapeEventHandler); + osxInstallTimerHandler(); return GL_TRUE; } @@ -512,32 +342,5 @@ if( fn -> start ) fn->start(); - int frame = 1; - running = true; - while( running ){ - // read in and process all pending events for the main window - EventRef event; - EventTargetRef eventDispatcher = GetEventDispatcherTarget(); - while( ReceiveNextEvent( 0, NULL, 0.0, TRUE, &event ) == noErr ){ - SendEventToEventTarget( event, eventDispatcher ); - ReleaseEvent( event ); - } - - dsDrawFrame( windowWidth, windowHeight, fn, paused && !singlestep ); - singlestep = false; - - glFlush(); - aglSwapBuffers( aglContext ); - - // capture frames if necessary - if( !paused && writeframes ){ - captureFrame( frame ); - frame++; - } - } - - if( fn->stop ) fn->stop(); - dsStopGraphics(); - - osxCloseMainWindow(); + glutMainLoop(); } diff -Nru ode-0.11.1/drawstuff/src/windows.cpp ode-0.14/drawstuff/src/windows.cpp --- ode-0.11.1/drawstuff/src/windows.cpp 2009-05-24 16:44:32.000000000 +0000 +++ ode-0.14/drawstuff/src/windows.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -23,10 +23,11 @@ #if defined(WIN32) || defined(__CYGWIN__)// this prevents warnings when dependencies built #include #endif +#include #include -#include "config.h" #include +#include "config.h" #include "resource.h" #include "internal.h" @@ -54,6 +55,7 @@ va_list ap; va_start (ap,msg); errorBox ("Warning",msg,ap); + va_end (ap); } @@ -62,6 +64,7 @@ va_list ap; va_start (ap,msg); errorBox ("Error",msg,ap); + va_end (ap); exit (1); } @@ -71,6 +74,7 @@ va_list ap; va_start (ap,msg); errorBox ("INTERNAL ERROR",msg,ap); + va_end (ap); // *((char *)0) = 0; ... commit SEGVicide ? abort(); exit (1); // should never get here, but just in case... @@ -82,6 +86,7 @@ va_list ap; va_start (ap,msg); vprintf (msg,ap); + va_end (ap); } //*************************************************************************** @@ -116,7 +121,7 @@ } -static DWORD WINAPI renderingThread (LPVOID lpParam) +static unsigned CALLBACK renderingThread (LPVOID lpParam) { // create openGL context and make it current HGLRC glc = wglCreateContext (renderer_dc); @@ -425,14 +430,14 @@ renderer_height = window_height; renderer_fn = fn; - DWORD threadId, thirdParam = 0; + unsigned threadId; HANDLE hThread; - hThread = CreateThread( + hThread = (HANDLE)_beginthreadex( NULL, // no security attributes 0, // use default stack size - renderingThread, // thread function - &thirdParam, // argument to thread function + &renderingThread, // thread function + NULL, // argument to thread function 0, // use default creation flags &threadId); // returns the thread identifier diff -Nru ode-0.11.1/drawstuff/src/x11.cpp ode-0.14/drawstuff/src/x11.cpp --- ode-0.11.1/drawstuff/src/x11.cpp 2008-09-08 20:19:34.000000000 +0000 +++ ode-0.14/drawstuff/src/x11.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -35,6 +35,9 @@ #ifdef HAVE_SYS_TIME_H #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif #include #include @@ -59,6 +62,7 @@ va_list ap; va_start (ap,msg); printMessage ("Error",msg,ap); + va_end (ap); exit (1); } @@ -68,6 +72,7 @@ va_list ap; va_start (ap,msg); printMessage ("INTERNAL ERROR",msg,ap); + va_end (ap); // *((char *)0) = 0; ... commit SEGVicide ? abort(); } @@ -78,6 +83,7 @@ va_list ap; va_start (ap,msg); vprintf (msg,ap); + va_end (ap); } //*************************************************************************** @@ -97,7 +103,7 @@ static GLXContext glx_context=0; // openGL rendering context static int last_key_pressed=0; // last key pressed in the window static int run=1; // 1 if simulation running -static int pause=0; // 1 if in `pause' mode +static int pausemode=0; // 1 if in `pause' mode static int singlestep=0; // 1 if single step key pressed static int writeframes=0; // 1 if frame files to be written @@ -235,11 +241,11 @@ run = 0; break; case 'p': case 'P': - pause ^= 1; + pausemode ^= 1; singlestep = 0; break; case 'o': case 'O': - if (pause) singlestep = 1; + if (pausemode) singlestep = 1; break; case 'v': case 'V': { float xyz[3],hpr[3]; @@ -325,11 +331,33 @@ XDestroyImage (image); } +void processDrawFrame(int *frame, dsFunctions *fn) +{ + dsDrawFrame (width,height,fn,pausemode && !singlestep); + singlestep = 0; + + glFlush(); + glXSwapBuffers (display,win); + XSync (display,0); + + // capture frames if necessary + if (pausemode==0 && writeframes) { + captureFrame (*frame); + (*frame)++; + } +} + +void microsleep(int usecs) +{ +#ifdef HAVE_UNISTD_H + usleep(usecs); +#endif +} void dsPlatformSimLoop (int window_width, int window_height, dsFunctions *fn, int initial_pause) { - pause = initial_pause; + pausemode = initial_pause; createMainWindow (window_width, window_height); glXMakeCurrent (display,win,glx_context); @@ -362,6 +390,12 @@ if (fn->start) fn->start(); +#if HAVE_GETTIMEOFDAY + timeval tv; + gettimeofday(&tv, 0); + double prev = tv.tv_sec + (double) tv.tv_usec / 1000000.0 ; +#endif + int frame = 1; run = 1; while (run) { @@ -371,19 +405,20 @@ XNextEvent (display,&event); handleEvent (event,fn); } - - dsDrawFrame (width,height,fn,pause && !singlestep); - singlestep = 0; - - glFlush(); - glXSwapBuffers (display,win); - XSync (display,0); - - // capture frames if necessary - if (pause==0 && writeframes) { - captureFrame (frame); - frame++; + +#if HAVE_GETTIMEOFDAY + gettimeofday(&tv, 0); + double curr = tv.tv_sec + (double) tv.tv_usec / 1000000.0 ; + if (curr-prev >= 1.0/60.0) + { + prev = curr; + processDrawFrame(&frame, fn); } + else + microsleep(1000); +#else + processDrawFrame(&frame, fn); +#endif }; if (fn->stop) fn->stop(); diff -Nru ode-0.11.1/GIMPACT/include/GIMPACT/gim_math.h ode-0.14/GIMPACT/include/GIMPACT/gim_math.h --- ode-0.11.1/GIMPACT/include/GIMPACT/gim_math.h 2008-10-29 11:28:56.000000000 +0000 +++ ode-0.14/GIMPACT/include/GIMPACT/gim_math.h 2015-12-18 14:09:27.000000000 +0000 @@ -59,6 +59,9 @@ #define GINT32 int32_t #define GUINT32 uint32_t +#ifdef GPTR +#undef GPTR +#endif #define GPTR void* /*! Constants for integers*/ diff -Nru ode-0.11.1/GIMPACT/include/GIMPACT/gim_memory.h ode-0.14/GIMPACT/include/GIMPACT/gim_memory.h --- ode-0.11.1/GIMPACT/include/GIMPACT/gim_memory.h 2008-10-16 17:59:43.000000000 +0000 +++ ode-0.14/GIMPACT/include/GIMPACT/gim_memory.h 2015-12-18 14:09:27.000000000 +0000 @@ -408,7 +408,7 @@ G_BUFFER_MANAGER_SYSTEM, G_BUFFER_MANAGER_SHARED, - G_BUFFER_MANAGER__MAX, + G_BUFFER_MANAGER__MAX }; //! @} diff -Nru ode-0.11.1/GIMPACT/include/GIMPACT/Makefile.in ode-0.14/GIMPACT/include/GIMPACT/Makefile.in --- ode-0.11.1/GIMPACT/include/GIMPACT/Makefile.in 2009-05-24 22:15:37.000000000 +0000 +++ ode-0.14/GIMPACT/include/GIMPACT/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,400 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = GIMPACT/include/GIMPACT -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_HEADERS = \ - gim_boxpruning.h gim_contact.h gim_geometry.h \ - gim_math.h gim_memory.h gimpact.h \ - gim_radixsort.h gim_tri_capsule_collision.h gim_tri_collision.h \ - gim_trimesh.h gim_tri_sphere_collision.h - -all: all-am - -.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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GIMPACT/include/GIMPACT/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign GIMPACT/include/GIMPACT/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 - -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; nonempty = 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 $(HEADERS) -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 mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am 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 -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: 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 ctags 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 maintainer-clean \ - maintainer-clean-generic mostlyclean 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 -Nru ode-0.11.1/GIMPACT/include/Makefile.in ode-0.14/GIMPACT/include/Makefile.in --- ode-0.11.1/GIMPACT/include/Makefile.in 2009-05-24 22:15:37.000000000 +0000 +++ ode-0.14/GIMPACT/include/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,505 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = GIMPACT/include -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/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@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = GIMPACT -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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GIMPACT/include/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign GIMPACT/include/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; nonempty = 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 -Nru ode-0.11.1/GIMPACT/Makefile.in ode-0.14/GIMPACT/Makefile.in --- ode-0.11.1/GIMPACT/Makefile.in 2009-05-24 22:15:37.000000000 +0000 +++ ode-0.14/GIMPACT/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,506 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = GIMPACT -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/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@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = GIMPACT-LICENSE-BSD.TXT GIMPACT-LICENSE-LGPL.TXT -SUBDIRS = include src -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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GIMPACT/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign GIMPACT/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; nonempty = 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 -Nru ode-0.11.1/GIMPACT/src/gim_boxpruning.cpp ode-0.14/GIMPACT/src/gim_boxpruning.cpp --- ode-0.11.1/GIMPACT/src/gim_boxpruning.cpp 2008-10-16 17:59:43.000000000 +0000 +++ ode-0.14/GIMPACT/src/gim_boxpruning.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -515,4 +515,5 @@ GIM_DYNARRAY_PUSH_ITEM(GUINT32,(*collided),i); } } + (void)tparam; } diff -Nru ode-0.11.1/GIMPACT/src/gim_memory.cpp ode-0.14/GIMPACT/src/gim_memory.cpp --- ode-0.11.1/GIMPACT/src/gim_memory.cpp 2008-10-16 17:59:43.000000000 +0000 +++ ode-0.14/GIMPACT/src/gim_memory.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -254,10 +254,12 @@ return (GPTR)pdata; } +#if 0 static GPTR _shared_buffer_realloc_function(GPTR buffer_handle,GUINT32 oldsize,int old_usage,GUINT32 newsize,int new_usage) { return 0; } +#endif static void _shared_buffer_free_function(GPTR buffer_handle,GUINT32 size) { diff -Nru ode-0.11.1/GIMPACT/src/Makefile.am ode-0.14/GIMPACT/src/Makefile.am --- ode-0.11.1/GIMPACT/src/Makefile.am 2008-06-03 23:08:30.000000000 +0000 +++ ode-0.14/GIMPACT/src/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -1,6 +1,8 @@ noinst_LTLIBRARIES = libGIMPACT.la AM_CPPFLAGS = -fno-strict-aliasing \ -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/ode/src \ -I$(top_srcdir)/GIMPACT/include libGIMPACT_la_SOURCES = gim_boxpruning.cpp \ diff -Nru ode-0.11.1/GIMPACT/src/Makefile.in ode-0.14/GIMPACT/src/Makefile.in --- ode-0.11.1/GIMPACT/src/Makefile.in 2009-05-24 22:15:38.000000000 +0000 +++ ode-0.14/GIMPACT/src/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,485 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = GIMPACT/src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/config.h -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libGIMPACT_la_LIBADD = -am_libGIMPACT_la_OBJECTS = gim_boxpruning.lo gim_contact.lo \ - gim_math.lo gim_memory.lo gim_tri_tri_overlap.lo \ - gim_trimesh.lo gim_trimesh_capsule_collision.lo \ - gim_trimesh_ray_collision.lo gim_trimesh_sphere_collision.lo \ - gim_trimesh_trimesh_collision.lo gimpact.lo -libGIMPACT_la_OBJECTS = $(am_libGIMPACT_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/ode/src -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libGIMPACT_la_SOURCES) -DIST_SOURCES = $(libGIMPACT_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libGIMPACT.la -AM_CPPFLAGS = -fno-strict-aliasing \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/GIMPACT/include - -libGIMPACT_la_SOURCES = gim_boxpruning.cpp \ - gim_contact.cpp \ - gim_math.cpp \ - gim_memory.cpp \ - gim_tri_tri_overlap.cpp \ - gim_trimesh.cpp \ - gim_trimesh_capsule_collision.cpp \ - gim_trimesh_ray_collision.cpp \ - gim_trimesh_sphere_collision.cpp \ - gim_trimesh_trimesh_collision.cpp \ - gimpact.cpp - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GIMPACT/src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign GIMPACT/src/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-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libGIMPACT.la: $(libGIMPACT_la_OBJECTS) $(libGIMPACT_la_DEPENDENCIES) - $(CXXLINK) $(libGIMPACT_la_OBJECTS) $(libGIMPACT_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_boxpruning.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_contact.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_math.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_memory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_tri_tri_overlap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_trimesh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_trimesh_capsule_collision.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_trimesh_ray_collision.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_trimesh_sphere_collision.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_trimesh_trimesh_collision.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpact.Plo@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -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-noinstLTLIBRARIES \ - 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-noinstLTLIBRARIES 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 -Nru ode-0.11.1/.hg_archival.txt ode-0.14/.hg_archival.txt --- ode-0.11.1/.hg_archival.txt 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/.hg_archival.txt 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,4 @@ +repo: 5ec20c9e20a4a77b0aa9c21aa4c7a1e1f60978f8 +node: a77b1d06e3a62b0116e7d3c4be4c6beaac8726ea +branch: default +tag: 0.14 diff -Nru ode-0.11.1/.hgignore ode-0.14/.hgignore --- ode-0.11.1/.hgignore 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/.hgignore 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,49 @@ +syntax: glob +*~ +*.dll +*.la +*.lo +*.o +.deps +.libs +aclocal.m4 +autom4te.cache +compile +config.guess +config.h +config.h.in +config.log +config.status +config.sub +configure +depcomp +install-sh +libtool +ltmain.sh +Makefile.in +Makefile +missing +ode.pc +ode-config +stamp-h1 +test-driver + +# these need to be matched in specific directories +./m4/libtool.m4 +./m4/lt*.m4 +drawstuff/dstest/dstest +include/ode/precision.h +include/ode/version.h +libccd/src/ccd/precision.h +ou/test/outest +tests/tests +tests/tests.log +tests/tests.trs +tests/test-suite.log +ode/doc/Doxyfile + +syntax: regexp +# ignore all demo binaries, but not the sources +ode/demo/demo_.+\.exe$ +ode/demo/demo_[^\.]+$ +ode/doc/html/.* diff -Nru ode-0.11.1/.hgtags ode-0.14/.hgtags --- ode-0.11.1/.hgtags 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/.hgtags 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,14 @@ +02323d9c578ea6e8402a4cc94ba83f7b01fdf9da 0.11.1 +04753789554b7371c98fbc5b7a57d6c9fee3c77e 0.11 +0c6e0b202f5fae5edd153ca07db7bda309120ca4 0.13 +11593854d3a22631d4b844ab7623e7e7f356463f 0.10 +343c198c9c354109607b851a4ed24a4acb1e82f2 0.5.0 +4c5b2efcfe76121081ce91fc3ab2467a1d647ae4 0.0.25 +4d088b69715a2322e16b3c151d6ba5488741689f 0.12 +5d74d867a1160d5e2710ad6ca741a37302e75444 0.8 +89e0edc22deac01374d422bf24b0621957ff8d4d 0.0.35 +c528f26e7eb8e95aa14d68e0c76f2acf0bca2ddf 0.0.1 +f89ea1ff3fc1b669d5f7b8d8475580b00f28ba9c 0.10.1 +f6383a55d1a34cf18200dcc38b19536387cee7f5 0.13.1 +4cf81eb385f506785054e0773d94f89eff7484f9 0.13.2 +7b0c5226eb9c3090e1b8a63aa202f2d8588fea6b 0.14 diff -Nru ode-0.11.1/include/drawstuff/drawstuff.h ode-0.14/include/drawstuff/drawstuff.h --- ode-0.11.1/include/drawstuff/drawstuff.h 2008-03-21 14:16:47.000000000 +0000 +++ ode-0.14/include/drawstuff/drawstuff.h 2015-12-18 14:09:27.000000000 +0000 @@ -69,7 +69,7 @@ DS_WOOD, DS_CHECKERED, DS_GROUND, - DS_SKY, + DS_SKY }; /* draw modes */ @@ -253,11 +253,11 @@ * @ingroup drawstuff */ DS_API void dsDrawConvex(const float pos[3], const float R[12], - float *_planes, + const float *_planes, unsigned int _planecount, - float *_points, + const float *_points, unsigned int _pointcount, - unsigned int *_polygons); + const unsigned int *_polygons); /* these drawing functions are identical to the ones above, except they take * double arrays for `pos' and `R'. @@ -274,11 +274,11 @@ float length, float radius); DS_API void dsDrawLineD (const double pos1[3], const double pos2[3]); DS_API void dsDrawConvexD(const double pos[3], const double R[12], - double *_planes, + const double *_planes, unsigned int _planecount, - double *_points, + const double *_points, unsigned int _pointcount, - unsigned int *_polygons); + const unsigned int *_polygons); /** * @brief Set the quality with which curved objects are rendered. @@ -297,7 +297,7 @@ */ DS_API void dsSetDrawMode(int mode); -// Backwards compatible API +/* Backwards compatible API */ #define dsDrawCappedCylinder dsDrawCapsule #define dsDrawCappedCylinderD dsDrawCapsuleD #define dsSetCappedCylinderQuality dsSetCapsuleQuality diff -Nru ode-0.11.1/include/drawstuff/Makefile.am ode-0.14/include/drawstuff/Makefile.am --- ode-0.11.1/include/drawstuff/Makefile.am 2007-12-07 23:09:37.000000000 +0000 +++ ode-0.14/include/drawstuff/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -1,3 +1,2 @@ - noinst_HEADERS = drawstuff.h version.h diff -Nru ode-0.11.1/include/drawstuff/Makefile.in ode-0.14/include/drawstuff/Makefile.in --- ode-0.11.1/include/drawstuff/Makefile.in 2009-05-24 22:15:38.000000000 +0000 +++ ode-0.14/include/drawstuff/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,395 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = include/drawstuff -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_HEADERS = drawstuff.h version.h -all: all-am - -.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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/drawstuff/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign include/drawstuff/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 - -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; nonempty = 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 $(HEADERS) -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 mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am 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 -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: 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 ctags 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 maintainer-clean \ - maintainer-clean-generic mostlyclean 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 -Nru ode-0.11.1/include/Makefile.in ode-0.14/include/Makefile.in --- ode-0.11.1/include/Makefile.in 2009-05-24 22:15:38.000000000 +0000 +++ ode-0.14/include/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,505 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = include -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/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@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = ode drawstuff -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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign include/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; nonempty = 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 -Nru ode-0.11.1/include/ode/collision.h ode-0.14/include/ode/collision.h --- ode-0.11.1/include/ode/collision.h 2009-01-28 02:53:09.000000000 +0000 +++ ode-0.14/include/ode/collision.h 2015-12-18 14:09:27.000000000 +0000 @@ -26,9 +26,6 @@ #include #include #include -// Include odeinit.h for backward compatibility as some of initialization APIs -// were initally declared in current header. -#include #ifdef __cplusplus extern "C" { @@ -407,6 +404,123 @@ */ ODE_API int dGeomIsEnabled (dGeomID geom); + +enum +{ + dGeomCommonControlClass = 0, + dGeomColliderControlClass = 1 +}; + +enum +{ + dGeomCommonAnyControlCode = 0, + + dGeomColliderSetMergeSphereContactsControlCode = 1, + dGeomColliderGetMergeSphereContactsControlCode = 2 +}; + +enum +{ + dGeomColliderMergeContactsValue__Default = 0, /* Used with Set... to restore default value*/ + dGeomColliderMergeContactsValue_None = 1, + dGeomColliderMergeContactsValue_Normals = 2, + dGeomColliderMergeContactsValue_Full = 3 +}; + +/** + * @brief Execute low level control operation for geometry. + * + * The variable the dataSize points to must be initialized before the call. + * If the size does not match the one expected for the control class/code function + * changes it to the size expected and returns failure. This implies the function + * can be called with NULL data and zero size to test if control class/code is supported + * and obtain required data size for it. + * + * dGeomCommonAnyControlCode applies to any control class and returns success if + * at least one control code is available for the given class with given geom. + * + * Currently there are the folliwing control classes supported: + * @li dGeomColliderControlClass + * + * For dGeomColliderControlClass there are the following codes available: + * @li dGeomColliderSetMergeSphereContactsControlCode (arg of type int, dGeomColliderMergeContactsValue_*) + * @li dGeomColliderGetMergeSphereContactsControlCode (arg of type int, dGeomColliderMergeContactsValue_*) + * + * @param geom the geom to control + * @param controlClass the control class + * @param controlCode the control code for the class + * @param dataValue the control argument pointer + * @param dataSize the control argument size provided or expected + * @returns Boolean execution status + * @ingroup collide + */ +ODE_API int dGeomLowLevelControl (dGeomID geom, int controlClass, int controlCode, void *dataValue, int *dataSize); + + +/** + * @brief Get world position of a relative point on geom. + * + * Calling this function on a non-placeable geom results in the same point being + * returned. + * + * @ingroup collide + * @param result will contain the result. + */ +ODE_API void dGeomGetRelPointPos +( + dGeomID geom, dReal px, dReal py, dReal pz, + dVector3 result +); + +/** + * @brief takes a point in global coordinates and returns + * the point's position in geom-relative coordinates. + * + * Calling this function on a non-placeable geom results in the same point being + * returned. + * + * @remarks + * This is the inverse of dGeomGetRelPointPos() + * @ingroup collide + * @param result will contain the result. + */ +ODE_API void dGeomGetPosRelPoint +( + dGeomID geom, dReal px, dReal py, dReal pz, + dVector3 result +); + +/** + * @brief Convert from geom-local to world coordinates. + * + * Calling this function on a non-placeable geom results in the same vector being + * returned. + * + * @ingroup collide + * @param result will contain the result. + */ +ODE_API void dGeomVectorToWorld +( + dGeomID geom, dReal px, dReal py, dReal pz, + dVector3 result +); + +/** + * @brief Convert from world to geom-local coordinates. + * + * Calling this function on a non-placeable geom results in the same vector being + * returned. + * + * @ingroup collide + * @param result will contain the result. + */ +ODE_API void dGeomVectorFromWorld +( + dGeomID geom, dReal px, dReal py, dReal pz, + dVector3 result +); + + /* ************************************************************************ */ /* geom offset from body */ @@ -775,7 +889,7 @@ dFirstSpaceClass, dSimpleSpaceClass = dFirstSpaceClass, dHashSpaceClass, - dSweepAndPruneSpaceClass, // SAP + dSweepAndPruneSpaceClass, /* SAP */ dQuadTreeSpaceClass, dLastSpaceClass = dQuadTreeSpaceClass, @@ -847,19 +961,21 @@ ODE_API dReal dGeomSpherePointDepth (dGeomID sphere, dReal x, dReal y, dReal z); -//--> Convex Functions +/*--> Convex Functions*/ ODE_API dGeomID dCreateConvex (dSpaceID space, - dReal *_planes, + const dReal *_planes, unsigned int _planecount, - dReal *_points, - unsigned int _pointcount,unsigned int *_polygons); + const dReal *_points, + unsigned int _pointcount, + const unsigned int *_polygons); ODE_API void dGeomSetConvex (dGeomID g, - dReal *_planes, + const dReal *_planes, unsigned int _count, - dReal *_points, - unsigned int _pointcount,unsigned int *_polygons); -//<-- Convex Functions + const dReal *_points, + unsigned int _pointcount, + const unsigned int *_polygons); +/*<-- Convex Functions*/ /** * @defgroup collide_box Box Class @@ -936,7 +1052,7 @@ ODE_API void dGeomCapsuleGetParams (dGeomID ccylinder, dReal *radius, dReal *length); ODE_API dReal dGeomCapsulePointDepth (dGeomID ccylinder, dReal x, dReal y, dReal z); -// For now we want to have a backwards compatible C-API, note: C++ API is not. +/* For now we want to have a backwards compatible C-API, note: C++ API is not.*/ #define dCreateCCylinder dCreateCapsule #define dGeomCCylinderSetParams dGeomCapsuleSetParams #define dGeomCCylinderGetParams dGeomCapsuleGetParams @@ -959,27 +1075,31 @@ * These flags are currently only noticed by the trimesh collider, because * they can make a major differences there. */ -ODE_API void dGeomRaySetParams (dGeomID g, int FirstContact, int BackfaceCull); -ODE_API void dGeomRayGetParams (dGeomID g, int *FirstContact, int *BackfaceCull); +ODE_API_DEPRECATED ODE_API void dGeomRaySetParams (dGeomID g, int FirstContact, int BackfaceCull); +ODE_API_DEPRECATED ODE_API void dGeomRayGetParams (dGeomID g, int *FirstContact, int *BackfaceCull); +ODE_API void dGeomRaySetFirstContact (dGeomID g, int firstContact); +ODE_API int dGeomRayGetFirstContact (dGeomID g); +ODE_API void dGeomRaySetBackfaceCull (dGeomID g, int backfaceCull); +ODE_API int dGeomRayGetBackfaceCull (dGeomID g); ODE_API void dGeomRaySetClosestHit (dGeomID g, int closestHit); ODE_API int dGeomRayGetClosestHit (dGeomID g); #include "collision_trimesh.h" -ODE_API dGeomID dCreateGeomTransform (dSpaceID space); -ODE_API void dGeomTransformSetGeom (dGeomID g, dGeomID obj); -ODE_API dGeomID dGeomTransformGetGeom (dGeomID g); -ODE_API void dGeomTransformSetCleanup (dGeomID g, int mode); -ODE_API int dGeomTransformGetCleanup (dGeomID g); -ODE_API void dGeomTransformSetInfo (dGeomID g, int mode); -ODE_API int dGeomTransformGetInfo (dGeomID g); +ODE_API_DEPRECATED ODE_API dGeomID dCreateGeomTransform (dSpaceID space); +ODE_API_DEPRECATED ODE_API void dGeomTransformSetGeom (dGeomID g, dGeomID obj); +ODE_API_DEPRECATED ODE_API dGeomID dGeomTransformGetGeom (dGeomID g); +ODE_API_DEPRECATED ODE_API void dGeomTransformSetCleanup (dGeomID g, int mode); +ODE_API_DEPRECATED ODE_API int dGeomTransformGetCleanup (dGeomID g); +ODE_API_DEPRECATED ODE_API void dGeomTransformSetInfo (dGeomID g, int mode); +ODE_API_DEPRECATED ODE_API int dGeomTransformGetInfo (dGeomID g); /* ************************************************************************ */ /* heightfield functions */ -// Data storage for heightfield data. +/* Data storage for heightfield data.*/ struct dxHeightfieldData; typedef struct dxHeightfieldData* dHeightfieldDataID; @@ -1354,7 +1474,7 @@ const dVector3 side1, const dVector3 _p2, const dMatrix3 R2, const dVector3 side2); -// The meaning of flags parameter is the same as in dCollide() +/* The meaning of flags parameter is the same as in dCollide()*/ ODE_API int dBoxBox (const dVector3 p1, const dMatrix3 R1, const dVector3 side1, const dVector3 p2, const dMatrix3 R2, const dVector3 side2, diff -Nru ode-0.11.1/include/ode/collision_space.h ode-0.14/include/ode/collision_space.h --- ode-0.11.1/include/ode/collision_space.h 2009-03-14 18:48:14.000000000 +0000 +++ ode-0.14/include/ode/collision_space.h 2015-12-18 14:09:27.000000000 +0000 @@ -54,8 +54,8 @@ ODE_API dSpaceID dQuadTreeSpaceCreate (dSpaceID space, const dVector3 Center, const dVector3 Extents, int Depth); -// SAP -// Order XZY or ZXY usually works best, if your Y is up. +/* SAP */ +/* Order XZY or ZXY usually works best, if your Y is up. */ #define dSAP_AXES_XYZ ((0)|(1<<2)|(2<<4)) #define dSAP_AXES_XZY ((0)|(2<<2)|(1<<4)) #define dSAP_AXES_YXZ ((1)|(0<<2)|(2<<4)) diff -Nru ode-0.11.1/include/ode/collision_trimesh.h ode-0.14/include/ode/collision_trimesh.h --- ode-0.11.1/include/ode/collision_trimesh.h 2008-12-06 15:50:57.000000000 +0000 +++ ode-0.14/include/ode/collision_trimesh.h 2015-12-18 14:09:27.000000000 +0000 @@ -156,7 +156,7 @@ ODE_API dTriMeshDataID dGeomTriMeshGetData(dGeomID g); -// enable/disable/check temporal coherence +/* enable/disable/check temporal coherence*/ ODE_API void dGeomTriMeshEnableTC(dGeomID g, int geomClass, int enable); ODE_API int dGeomTriMeshIsTCEnabled(dGeomID g, int geomClass); diff -Nru ode-0.11.1/include/ode/common.h ode-0.14/include/ode/common.h --- ode-0.11.1/include/ode/common.h 2009-04-24 01:43:52.000000000 +0000 +++ ode-0.14/include/ode/common.h 2015-12-18 14:09:27.000000000 +0000 @@ -22,9 +22,10 @@ #ifndef _ODE_COMMON_H_ #define _ODE_COMMON_H_ + #include #include -#include + #ifdef __cplusplus extern "C" { @@ -42,81 +43,47 @@ #ifndef M_PI #define M_PI REAL(3.1415926535897932384626433832795029) #endif +#ifndef M_PI_2 +#define M_PI_2 REAL(1.5707963267948966192313216916398) +#endif #ifndef M_SQRT1_2 #define M_SQRT1_2 REAL(0.7071067811865475244008443621048490) #endif -/* debugging: - * IASSERT is an internal assertion, i.e. a consistency check. if it fails - * we want to know where. - * UASSERT is a user assertion, i.e. if it fails a nice error message - * should be printed for the user. - * AASSERT is an arguments assertion, i.e. if it fails "bad argument(s)" - * is printed. - * DEBUGMSG just prints out a message - */ - -#ifndef dNODEBUG -# if defined(__STDC__) && __STDC_VERSION__ >= 199901L -# define __FUNCTION__ __func__ -# endif -# ifdef __GNUC__ -# define dIASSERT(a) if (!(a)) dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s() [%s]",__FUNCTION__,__FILE__); -# define dUASSERT(a,msg) if (!(a)) dDebug (d_ERR_UASSERT, \ - msg " in %s()", __FUNCTION__); -# define dDEBUGMSG(msg) dMessage (d_ERR_UASSERT, \ - msg " in %s() File %s Line %d", __FUNCTION__, __FILE__,__LINE__); -# else // not __GNUC__ -# define dIASSERT(a) if (!(a)) dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s:%d",__FILE__,__LINE__); -# define dUASSERT(a,msg) if (!(a)) dDebug (d_ERR_UASSERT, \ - msg " (%s:%d)", __FILE__,__LINE__); -# define dDEBUGMSG(msg) dMessage (d_ERR_UASSERT, \ - msg " (%s:%d)", __FILE__,__LINE__); -# endif -#else -# define dIASSERT(a) ; -# define dUASSERT(a,msg) ; -# define dDEBUGMSG(msg) ; -#endif -#define dAASSERT(a) dUASSERT(a,"Bad argument(s)") - -// Macro used to suppress unused variable warning -#define dVARIABLEUSED(a) ((void)a) - /* floating point data type, vector, matrix and quaternion types */ #if defined(dSINGLE) typedef float dReal; #ifdef dDOUBLE #error You can only #define dSINGLE or dDOUBLE, not both. -#endif // dDOUBLE +#endif /* dDOUBLE */ #elif defined(dDOUBLE) typedef double dReal; #else #error You must #define dSINGLE or dDOUBLE #endif -// Detect if we've got both trimesh engines enabled. +/* Detect if we've got both trimesh engines enabled. */ #if dTRIMESH_ENABLED #if dTRIMESH_OPCODE && dTRIMESH_GIMPACT #error You can only #define dTRIMESH_OPCODE or dTRIMESH_GIMPACT, not both. #endif -#endif // dTRIMESH_ENABLED +#endif /* dTRIMESH_ENABLED */ -// Define a type for indices, either 16 or 32 bit, based on build option -// TODO: Currently GIMPACT only supports 32 bit indices. +/* + * Define a type for indices, either 16 or 32 bit, based on build option + * TODO: Currently GIMPACT only supports 32 bit indices. + */ #if dTRIMESH_16BIT_INDICES #if dTRIMESH_GIMPACT -typedef uint32 dTriIndex; -#else // dTRIMESH_GIMPACT -typedef uint16 dTriIndex; -#endif // dTRIMESH_GIMPACT -#else // dTRIMESH_16BIT_INDICES -typedef uint32 dTriIndex; -#endif // dTRIMESH_16BIT_INDICES +typedef duint32 dTriIndex; +#else /* dTRIMESH_GIMPACT */ +typedef duint16 dTriIndex; +#endif /* dTRIMESH_GIMPACT */ +#else /* dTRIMESH_16BIT_INDICES */ +typedef duint32 dTriIndex; +#endif /* dTRIMESH_16BIT_INDICES */ /* round an integer up to a multiple of 4, except that 0 and 1 are unmodified * (used to compute matrix leading dimensions) @@ -136,7 +103,7 @@ #if defined(dSINGLE) -#define REAL(x) (x ## f) /* form a constant */ +#define REAL(x) (x##f) /* form a constant */ #define dRecip(x) ((1.0f/(x))) /* reciprocal */ #define dSqrt(x) (sqrtf(x)) /* square root */ #define dRecipSqrt(x) ((1.0f/sqrtf(x))) /* reciprocal square root */ @@ -144,8 +111,12 @@ #define dCos(x) (cosf(x)) /* cosine */ #define dFabs(x) (fabsf(x)) /* absolute value */ #define dAtan2(y,x) (atan2f(y,x)) /* arc tangent with 2 args */ +#define dAcos(x) (acosf(x)) #define dFMod(a,b) (fmodf(a,b)) /* modulo */ #define dFloor(x) floorf(x) /* floor */ +#define dCeil(x) ceilf(x) /* ceil */ +#define dCopySign(a,b) _ode_copysignf(a, b) /* copy value sign */ +#define dNextAfter(x, y) _ode_nextafterf(x, y) /* next value after */ #ifdef HAVE___ISNANF #define dIsNan(x) (__isnanf(x)) @@ -166,8 +137,6 @@ #define dIsNan(x) (_isnan(x)) #endif -#define dCopySign(a,b) ((dReal)copysignf(a,b)) - #elif defined(dDOUBLE) #define REAL(x) (x) @@ -178,8 +147,12 @@ #define dCos(x) cos(x) #define dFabs(x) fabs(x) #define dAtan2(y,x) atan2((y),(x)) +#define dAcos(x) acos(x) #define dFMod(a,b) (fmod((a),(b))) #define dFloor(x) floor(x) +#define dCeil(x) ceil(x) +#define dCopySign(a,b) _ode_copysign(a, b) +#define dNextAfter(x, y) _ode_nextafter(x, y) #ifdef HAVE___ISNAN #define dIsNan(x) (__isnan(x)) @@ -191,12 +164,11 @@ #define dIsNan(x) (_isnan(x)) #endif -#define dCopySign(a,b) (copysign((a),(b))) - #else #error You must #define dSINGLE or dDOUBLE #endif + /* internal object types (all prefixed with `dx') */ struct dxWorld; /* dynamics world */ @@ -206,6 +178,7 @@ struct dxJoint; struct dxJointNode; struct dxJointGroup; +struct dxWorldProcessThreadingManager; typedef struct dxWorld *dWorldID; typedef struct dxSpace *dSpaceID; @@ -213,7 +186,7 @@ typedef struct dxGeom *dGeomID; typedef struct dxJoint *dJointID; typedef struct dxJointGroup *dJointGroupID; - +typedef struct dxWorldProcessThreadingManager *dWorldStepThreadingManagerID; /* error numbers */ @@ -242,7 +215,10 @@ dJointTypePlane2D, dJointTypePR, dJointTypePU, - dJointTypePiston + dJointTypePiston, + dJointTypeDBall, + dJointTypeDHinge, + dJointTypeTransmission, } dJointType; @@ -284,6 +260,8 @@ dParamLoStop = start, \ dParamHiStop, \ dParamVel, \ + dParamLoVel, \ + dParamHiVel, \ dParamFMax, \ dParamFudgeFactor, \ dParamBounce, \ @@ -295,20 +273,22 @@ dParamSuspensionCFM, \ dParamERP, \ - ////////////////////////////////////////////////////////////////////////////// - /// \enum D_ALL_PARAM_NAMES_X - /// - /// \var dParamGroup This is the starting value of the different group - /// (i.e. dParamGroup1, dParamGroup2, dParamGroup3) - /// It also helps in the use of parameter - /// (dParamGroup2 | dParamFMax) == dParamFMax2 - ////////////////////////////////////////////////////////////////////////////// + /* + * \enum D_ALL_PARAM_NAMES_X + * + * \var dParamGroup This is the starting value of the different group + * (i.e. dParamGroup1, dParamGroup2, dParamGroup3) + * It also helps in the use of parameter + * (dParamGroup2 | dParamFMax) == dParamFMax2 + */ #define D_ALL_PARAM_NAMES_X(start,x) \ dParamGroup ## x = start, \ /* parameters for limits and motors */ \ dParamLoStop ## x = start, \ dParamHiStop ## x, \ dParamVel ## x, \ + dParamLoVel ## x, \ + dParamHiVel ## x, \ dParamFMax ## x, \ dParamFudgeFactor ## x, \ dParamBounce ## x, \ @@ -322,7 +302,7 @@ enum { D_ALL_PARAM_NAMES(0) - dParamsInGroup, ///< Number of parameter in a group + dParamsInGroup, /* < Number of parameter in a group */ D_ALL_PARAM_NAMES_X(0x000,1) D_ALL_PARAM_NAMES_X(0x100,2) D_ALL_PARAM_NAMES_X(0x200,3) @@ -341,6 +321,14 @@ dAMotorEuler = 1 }; +/* transmission joint mode numbers */ + +enum { + dTransmissionParallelAxes = 0, + dTransmissionIntersectingAxes = 1, + dTransmissionChainDrive = 2 +}; + /* joint force feedback information */ @@ -375,11 +363,12 @@ * ODE_EXT_trimesh * ODE_EXT_opcode * ODE_EXT_gimpact - * ODE_EXT_malloc_not_alloca - * ODE_EXT_gyroscopic * ODE_OPC_16bit_indices * ODE_OPC_new_collider -*/ + * ODE_EXT_mt_collisions + * ODE_EXT_threading + * ODE_THR_builtin_impl + */ ODE_API const char* dGetConfiguration (void); /** diff -Nru ode-0.11.1/include/ode/contact.h ode-0.14/include/ode/contact.h --- ode-0.11.1/include/ode/contact.h 2008-05-09 10:05:44.000000000 +0000 +++ ode-0.14/include/ode/contact.h 2015-12-18 14:09:27.000000000 +0000 @@ -31,33 +31,39 @@ enum { - dContactMu2 = 0x001, - dContactFDir1 = 0x002, - dContactBounce = 0x004, - dContactSoftERP = 0x008, - dContactSoftCFM = 0x010, - dContactMotion1 = 0x020, - dContactMotion2 = 0x040, - dContactMotionN = 0x080, - dContactSlip1 = 0x100, - dContactSlip2 = 0x200, - - dContactApprox0 = 0x0000, - dContactApprox1_1 = 0x1000, - dContactApprox1_2 = 0x2000, - dContactApprox1 = 0x3000 + dContactMu2 = 0x001, /**< Use axis dependent friction */ + dContactAxisDep = 0x001, /**< Same as above */ + dContactFDir1 = 0x002, /**< Use FDir for the first friction value */ + dContactBounce = 0x004, /**< Restore collision energy anti-parallel to the normal */ + dContactSoftERP = 0x008, /**< Don't use global erp for penetration reduction */ + dContactSoftCFM = 0x010, /**< Don't use global cfm for penetration constraint */ + dContactMotion1 = 0x020, /**< Use a non-zero target velocity for the constraint */ + dContactMotion2 = 0x040, + dContactMotionN = 0x080, + dContactSlip1 = 0x100, /**< Force-dependent slip. */ + dContactSlip2 = 0x200, + dContactRolling = 0x400, /**< Rolling/Angular friction */ + + dContactApprox0 = 0x0000, + dContactApprox1_1 = 0x1000, + dContactApprox1_2 = 0x2000, + dContactApprox1_N = 0x4000, /**< For rolling friction */ + dContactApprox1 = 0x7000 }; typedef struct dSurfaceParameters { /* must always be defined */ - int mode; + int mode; dReal mu; /* only defined if the corresponding flag is set in mode */ dReal mu2; - dReal bounce; - dReal bounce_vel; + dReal rho; /**< Rolling friction */ + dReal rho2; + dReal rhoN; /**< Spinning friction */ + dReal bounce; /**< Coefficient of restitution */ + dReal bounce_vel; /**< Bouncing threshold */ dReal soft_erp; dReal soft_cfm; dReal motion1,motion2,motionN; @@ -80,11 +86,11 @@ * @ingroup collide */ typedef struct dContactGeom { - dVector3 pos; ///< contact position - dVector3 normal; ///< normal vector - dReal depth; ///< penetration depth - dGeomID g1,g2; ///< the colliding geoms - int side1,side2; ///< (to be documented) + dVector3 pos; /*< contact position*/ + dVector3 normal; /*< normal vector*/ + dReal depth; /*< penetration depth*/ + dGeomID g1,g2; /*< the colliding geoms*/ + int side1,side2; /*< (to be documented)*/ } dContactGeom; diff -Nru ode-0.11.1/include/ode/export-dif.h ode-0.14/include/ode/export-dif.h --- ode-0.11.1/include/ode/export-dif.h 2006-03-24 19:36:06.000000000 +0000 +++ ode-0.14/include/ode/export-dif.h 2015-12-18 14:09:27.000000000 +0000 @@ -26,7 +26,15 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + ODE_API void dWorldExportDIF (dWorldID w, FILE *file, const char *world_name); +#ifdef __cplusplus +} +#endif + #endif diff -Nru ode-0.11.1/include/ode/Makefile.am ode-0.14/include/ode/Makefile.am --- ode-0.11.1/include/ode/Makefile.am 2008-05-07 19:23:10.000000000 +0000 +++ ode-0.14/include/ode/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -1,24 +1,33 @@ libode_la_includedir = $(includedir)/ode -libode_la_include_HEADERS = collision_trimesh.h \ - mass.h \ - odecpp.h \ - common.h \ - matrix.h \ - odecpp_collision.h \ - compatibility.h \ - memory.h \ - contact.h \ - misc.h \ - odemath.h \ - odeinit.h \ - collision.h \ - error.h \ - objects.h \ - rotation.h \ - collision_space.h \ - export-dif.h \ - ode.h \ - timer.h \ - odeconfig.h +libode_la_include_HEADERS = \ + collision.h \ + collision_space.h \ + collision_trimesh.h \ + common.h \ + compatibility.h \ + contact.h \ + error.h \ + export-dif.h \ + mass.h \ + matrix.h \ + memory.h \ + misc.h \ + objects.h \ + ode.h \ + odeconfig.h \ + odecpp.h \ + odecpp_collision.h \ + odeinit.h \ + odemath.h \ + odemath_legacy.h \ + rotation.h \ + threading.h \ + threading_impl.h \ + timer.h + + +EXTRA_DIST = README precision.h.in version.h.in + +dist_libode_la_include_HEADERS = precision.h version.h + -EXTRA_DIST = README diff -Nru ode-0.11.1/include/ode/Makefile.in ode-0.14/include/ode/Makefile.in --- ode-0.11.1/include/ode/Makefile.in 2009-05-24 22:15:38.000000000 +0000 +++ ode-0.14/include/ode/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,446 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = include/ode -DIST_COMMON = README $(libode_la_include_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libode_la_includedir)" -libode_la_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libode_la_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -libode_la_includedir = $(includedir)/ode -libode_la_include_HEADERS = collision_trimesh.h \ - mass.h \ - odecpp.h \ - common.h \ - matrix.h \ - odecpp_collision.h \ - compatibility.h \ - memory.h \ - contact.h \ - misc.h \ - odemath.h \ - odeinit.h \ - collision.h \ - error.h \ - objects.h \ - rotation.h \ - collision_space.h \ - export-dif.h \ - ode.h \ - timer.h \ - odeconfig.h - -EXTRA_DIST = README -all: all-am - -.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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/ode/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign include/ode/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 -install-libode_la_includeHEADERS: $(libode_la_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libode_la_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libode_la_includedir)" - @list='$(libode_la_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libode_la_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libode_la_includedir)/$$f'"; \ - $(libode_la_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libode_la_includedir)/$$f"; \ - done - -uninstall-libode_la_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libode_la_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libode_la_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libode_la_includedir)/$$f"; \ - 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; nonempty = 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 $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libode_la_includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libode_la_includeHEADERS - -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 -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libode_la_includeHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags 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-libode_la_includeHEADERS 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-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libode_la_includeHEADERS - -# 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 -Nru ode-0.11.1/include/ode/mass.h ode-0.14/include/ode/mass.h --- ode-0.11.1/include/ode/mass.h 2008-12-21 08:20:21.000000000 +0000 +++ ode-0.14/include/ode/mass.h 2015-12-18 14:09:27.000000000 +0000 @@ -80,7 +80,7 @@ ODE_API void dMassAdd (dMass *a, const dMass *b); -// Backwards compatible API +/* Backwards compatible API */ ODE_API ODE_API_DEPRECATED void dMassSetCappedCylinder(dMass *a, dReal b, int c, dReal d, dReal e); ODE_API ODE_API_DEPRECATED void dMassSetCappedCylinderTotal(dMass *a, dReal b, int c, dReal d, dReal e); diff -Nru ode-0.11.1/include/ode/matrix.h ode-0.14/include/ode/matrix.h --- ode-0.11.1/include/ode/matrix.h 2006-03-24 19:36:06.000000000 +0000 +++ ode-0.14/include/ode/matrix.h 2015-12-18 14:09:27.000000000 +0000 @@ -186,9 +186,9 @@ */ ODE_API void dRemoveRowCol (dReal *A, int n, int nskip, int r); - #ifdef __cplusplus } #endif + #endif diff -Nru ode-0.11.1/include/ode/misc.h ode-0.14/include/ode/misc.h --- ode-0.11.1/include/ode/misc.h 2008-01-03 00:08:45.000000000 +0000 +++ ode-0.14/include/ode/misc.h 2015-12-18 14:09:27.000000000 +0000 @@ -54,12 +54,7 @@ ODE_API dReal dRandReal(void); /* print out a matrix */ -#ifdef __cplusplus -ODE_API void dPrintMatrix (const dReal *A, int n, int m, char *fmt = "%10.4f ", - FILE *f=stdout); -#else -ODE_API void dPrintMatrix (const dReal *A, int n, int m, char *fmt, FILE *f); -#endif +ODE_API void dPrintMatrix (const dReal *A, int n, int m, const char *fmt, FILE *f); /* make a random vector with entries between +/- range. A has n elements. */ ODE_API void dMakeRandomVector (dReal *A, int n, dReal range); @@ -82,4 +77,10 @@ } #endif + +#ifdef __cplusplus +static inline void dPrintMatrix (const dReal *A, int n, int m, const char *fmt="%10.4f ") { dPrintMatrix(A, n, m, fmt, stdout); } +#endif + + #endif diff -Nru ode-0.11.1/include/ode/objects.h ode-0.14/include/ode/objects.h --- ode-0.11.1/include/ode/objects.h 2009-01-23 18:29:56.000000000 +0000 +++ ode-0.14/include/ode/objects.h 2015-12-18 14:09:27.000000000 +0000 @@ -1,5 +1,3 @@ - - /************************************************************************* * * * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * @@ -28,6 +26,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -45,7 +44,6 @@ * Most applications will only need one world. */ - /** * @brief Create a new, empty world and return its ID number. * @return an identifier @@ -67,6 +65,24 @@ /** + * @brief Set the user-data pointer + * @param world the world to set the data on + * @param data + * @ingroup world + */ +ODE_API void dWorldSetData (dWorldID world, void* data); + + +/** + * @brief Get the user-data pointer + * @param world the world to set the data on + * @param data + * @ingroup world + */ +ODE_API void* dWorldGetData (dWorldID world); + + +/** * @brief Set the world's global gravity vector. * * The units are m/s^2, so Earth's gravity vector would be (0,0,-9.81), @@ -118,58 +134,273 @@ ODE_API dReal dWorldGetCFM (dWorldID); +#define dWORLDSTEP_THREADCOUNT_UNLIMITED 0U + /** - * @brief Step the world. + * @brief Set maximum threads to be used for island stepping * - * This uses a "big matrix" method that takes time on the order of m^3 - * and memory on the order of m^2, where m is the total number of constraint - * rows. For large systems this will use a lot of memory and can be very slow, - * but this is currently the most accurate method. + * The actual number of threads that is going to be used will be the minimum + * of this limit and number of threads in the threading pool. By default + * there is no limit (@c dWORLDSTEP_THREADCOUNT_UNLIMITED). + * + * @warning + * WARNING! Running island stepping in multiple threads requires allocating + * individual stepping memory buffer for each of those threads. The size of buffers + * allocated is the size needed to handle the largest island in the world. + * + * Note: Setting a limit for island stepping does not affect threading at lower + * levels in stepper functions. The sub-calls scheduled from them can be executed + * in as many threads as there are available in the pool. + * + * @param w The world affected + * @param count Thread count limit value for island stepping * @ingroup world - * @param stepsize The number of seconds that the simulation has to advance. + * @see dWorldGetStepIslandsProcessingMaxThreadCount + */ +ODE_API void dWorldSetStepIslandsProcessingMaxThreadCount(dWorldID w, unsigned count); +/** + * @brief Get maximum threads that are allowed to be used for island stepping. + * + * Please read commentaries to @c dWorldSetStepIslandsProcessingMaxThreadCount for + * important information regarding the value returned. + * + * @param w The world queried + * @returns Current thread count limit value for island stepping + * @ingroup world + * @see dWorldSetStepIslandsProcessingMaxThreadCount + */ +ODE_API unsigned dWorldGetStepIslandsProcessingMaxThreadCount(dWorldID w); + +/** + * @brief Set the world to use shared working memory along with another world. + * + * The worlds allocate working memory internally for simulation stepping. This + * memory is cached among the calls to @c dWordStep and @c dWorldQuickStep. + * Similarly, several worlds can be set up to share this memory caches thus + * reducing overall memory usage by cost of making worlds inappropriate for + * simultaneous simulation in multiple threads. + * + * If null value is passed for @a from_world parameter the world is detached from + * sharing and returns to defaults for working memory, reservation policy and + * memory manager as if just created. This can also be used to enable use of shared + * memory for a world that has already had working memory allocated privately. + * Normally using shared memory after a world has its private working memory allocated + * is prohibited. + * + * Allocation policy used can only increase world's internal reserved memory size + * and never decreases it. @c dWorldCleanupWorkingMemory can be used to release + * working memory for a world in case if number of objects/joint decreases + * significantly in it. + * + * With sharing working memory worlds also automatically share memory reservation + * policy and memory manager. Thus, these parameters need to be customized for + * initial world to be used as sharing source only. + * + * If worlds share working memory they must also use compatible threading implementations + * (i.e. it is illegal for one world to perform stepping with self-threaded implementation + * when the other world is assigned a multi-threaded implementation). + * For more information read section about threading approaches in ODE. + * + * Failure result status means a memory allocation failure. + * + * @param w The world to use the shared memory with. + * @param from_world Null or the world the shared memory is to be used from. + * @returns 1 for success and 0 for failure. + * + * @ingroup world + * @see dWorldCleanupWorkingMemory + * @see dWorldSetStepMemoryReservationPolicy + * @see dWorldSetStepMemoryManager + */ +ODE_API int dWorldUseSharedWorkingMemory(dWorldID w, dWorldID from_world/*=NULL*/); + +/** + * @brief Release internal working memory allocated for world + * + * The worlds allocate working memory internally for simulation stepping. This + * function can be used to free world's internal memory cache in case if number of + * objects/joints in the world decreases significantly. By default, internal + * allocation policy is used to only increase cache size as necessary and never + * decrease it. + * + * If a world shares its working memory with other worlds the cache deletion + * affects all the linked worlds. However the shared status itself remains intact. + * + * The function call does affect neither memory reservation policy nor memory manager. + * + * @param w The world to release working memory for. + * + * @ingroup world + * @see dWorldUseSharedWorkingMemory + * @see dWorldSetStepMemoryReservationPolicy + * @see dWorldSetStepMemoryManager */ -ODE_API void dWorldStep (dWorldID, dReal stepsize); +ODE_API void dWorldCleanupWorkingMemory(dWorldID w); + +#define dWORLDSTEP_RESERVEFACTOR_DEFAULT 1.2f +#define dWORLDSTEP_RESERVESIZE_DEFAULT 65536U /** - * @brief Converts an impulse to a force. + * @struct dWorldStepReserveInfo + * @brief Memory reservation policy descriptor structure for world stepping functions. + * + * @c struct_size should be assigned the size of the structure. + * + * @c reserve_factor is a quotient that is multiplied by required memory size + * to allocate extra reserve whenever reallocation is needed. + * + * @c reserve_minimum is a minimum size that is checked against whenever reallocation + * is needed to allocate expected working memory minimum at once without extra + * reallocations as number of bodies/joints grows. + * * @ingroup world - * @remarks - * If you want to apply a linear or angular impulse to a rigid body, - * instead of a force or a torque, then you can use this function to convert - * the desired impulse into a force/torque vector before calling the - * BodyAdd... function. - * The current algorithm simply scales the impulse by 1/stepsize, - * where stepsize is the step size for the next step that will be taken. - * This function is given a dWorldID because, in the future, the force - * computation may depend on integrator parameters that are set as - * properties of the world. + * @see dWorldSetStepMemoryReservationPolicy */ -ODE_API void dWorldImpulseToForce -( - dWorldID, dReal stepsize, - dReal ix, dReal iy, dReal iz, dVector3 force -); +typedef struct +{ + unsigned struct_size; + float reserve_factor; /* Use float as precision does not matter here*/ + unsigned reserve_minimum; + +} dWorldStepReserveInfo; + +/** + * @brief Set memory reservation policy for world to be used with simulation stepping functions + * + * The function allows to customize reservation policy to be used for internal + * memory which is allocated to aid simulation for a world. By default, values + * of @c dWORLDSTEP_RESERVEFACTOR_DEFAULT and @c dWORLDSTEP_RESERVESIZE_DEFAULT + * are used. + * + * Passing @a policyinfo argument as NULL results in reservation policy being + * reset to defaults as if the world has been just created. The content of + * @a policyinfo structure is copied internally and does not need to remain valid + * after the call returns. + * + * If the world uses working memory sharing, changing memory reservation policy + * affects all the worlds linked together. + * + * Failure result status means a memory allocation failure. + * + * @param w The world to change memory reservation policy for. + * @param policyinfo Null or a pointer to policy descriptor structure. + * @returns 1 for success and 0 for failure. + * + * @ingroup world + * @see dWorldUseSharedWorkingMemory + */ +ODE_API int dWorldSetStepMemoryReservationPolicy(dWorldID w, const dWorldStepReserveInfo *policyinfo/*=NULL*/); +/** +* @struct dWorldStepMemoryFunctionsInfo +* @brief World stepping memory manager descriptor structure +* +* This structure is intended to define the functions of memory manager to be used +* with world stepping functions. +* +* @c struct_size should be assigned the size of the structure +* +* @c alloc_block is a function to allocate memory block of given size. +* +* @c shrink_block is a function to shrink existing memory block to a smaller size. +* It must preserve the contents of block head while shrinking. The new block size +* is guaranteed to be always less than the existing one. +* +* @c free_block is a function to delete existing memory block. +* +* @ingroup init +* @see dWorldSetStepMemoryManager +*/ +typedef struct +{ + unsigned struct_size; + void *(*alloc_block)(size_t block_size); + void *(*shrink_block)(void *block_pointer, size_t block_current_size, size_t block_smaller_size); + void (*free_block)(void *block_pointer, size_t block_current_size); + +} dWorldStepMemoryFunctionsInfo; + +/** +* @brief Set memory manager for world to be used with simulation stepping functions +* +* The function allows to customize memory manager to be used for internal +* memory allocation during simulation for a world. By default, @c dAlloc/@c dRealloc/@c dFree +* based memory manager is used. +* +* Passing @a memfuncs argument as NULL results in memory manager being +* reset to default one as if the world has been just created. The content of +* @a memfuncs structure is copied internally and does not need to remain valid +* after the call returns. +* +* If the world uses working memory sharing, changing memory manager +* affects all the worlds linked together. +* +* Failure result status means a memory allocation failure. +* +* @param w The world to change memory reservation policy for. +* @param memfuncs Null or a pointer to memory manager descriptor structure. +* @returns 1 for success and 0 for failure. +* +* @ingroup world +* @see dWorldUseSharedWorkingMemory +*/ +ODE_API int dWorldSetStepMemoryManager(dWorldID w, const dWorldStepMemoryFunctionsInfo *memfuncs); + +/** + * @brief Assign threading implementation to be used for [quick]stepping the world. + * + * @warning It is not recommended to assign the same threading implementation to + * different worlds if they are going to be called in parallel. In particular this + * makes resources preallocation for threaded calls to lose its sense. + * Built-in threading implementation is likely to crash if misused this way. + * + * @param w The world to change threading implementation for. + * @param functions_info Pointer to threading functions structure + * @param threading_impl ID of threading implementation object + * + * @ingroup world + */ +ODE_API void dWorldSetStepThreadingImplementation(dWorldID w, const dThreadingFunctionsInfo *functions_info, dThreadingImplementationID threading_impl); /** * @brief Step the world. + * + * This uses a "big matrix" method that takes time on the order of m^3 + * and memory on the order of m^2, where m is the total number of constraint + * rows. For large systems this will use a lot of memory and can be very slow, + * but this is currently the most accurate method. + * + * Failure result status means that the memory allocation has failed for operation. + * In such a case all the objects remain in unchanged state and simulation can be + * retried as soon as more memory is available. + * + * @param w The world to be stepped + * @param stepsize The number of seconds that the simulation has to advance. + * @returns 1 for success and 0 for failure + * * @ingroup world - * @remarks + */ +ODE_API int dWorldStep (dWorldID w, dReal stepsize); + +/** + * @brief Quick-step the world. + * * This uses an iterative method that takes time on the order of m*N * and memory on the order of m, where m is the total number of constraint * rows N is the number of iterations. * For large systems this is a lot faster than dWorldStep(), * but it is less accurate. - * @remarks + * * QuickStep is great for stacks of objects especially when the * auto-disable feature is used as well. * However, it has poor accuracy for near-singular systems. * Near-singular systems can occur when using high-friction contacts, motors, * or certain articulated structures. For example, a robot with multiple legs * sitting on the ground may be near-singular. - * @remarks + * * There are ways to help overcome QuickStep's inaccuracy problems: + * * \li Increase CFM. * \li Reduce the number of contacts in your system (e.g. use the minimum * number of contacts for the feet of a robot or creature). @@ -182,8 +413,39 @@ * * Increasing the number of QuickStep iterations may help a little bit, but * it is not going to help much if your system is really near singular. + * + * Failure result status means that the memory allocation has failed for operation. + * In such a case all the objects remain in unchanged state and simulation can be + * retried as soon as more memory is available. + * + * @param w The world to be stepped + * @param stepsize The number of seconds that the simulation has to advance. + * @returns 1 for success and 0 for failure + * + * @ingroup world */ -ODE_API void dWorldQuickStep (dWorldID w, dReal stepsize); +ODE_API int dWorldQuickStep (dWorldID w, dReal stepsize); + + +/** +* @brief Converts an impulse to a force. +* @ingroup world +* @remarks +* If you want to apply a linear or angular impulse to a rigid body, +* instead of a force or a torque, then you can use this function to convert +* the desired impulse into a force/torque vector before calling the +* BodyAdd... function. +* The current algorithm simply scales the impulse by 1/stepsize, +* where stepsize is the step size for the next step that will be taken. +* This function is given a dWorldID because, in the future, the force +* computation may depend on integrator parameters that are set as +* properties of the world. +*/ +ODE_API void dWorldImpulseToForce +( + dWorldID, dReal stepsize, + dReal ix, dReal iy, dReal iz, dVector3 force + ); /** @@ -259,16 +521,6 @@ */ ODE_API dReal dWorldGetContactSurfaceLayer (dWorldID); -/* StepFast1 functions */ - -/** - * @brief Step the world using the StepFast1 algorithm. - * @param stepsize the nr of seconds to advance the simulation. - * @param maxiterations The number of iterations to perform. - * @ingroup world - */ -ODE_API void dWorldStepFast1(dWorldID, dReal stepsize, int maxiterations); - /** * @defgroup disable Automatic Enabling and Disabling @@ -303,72 +555,32 @@ */ /** - * @brief Set the AutoEnableDepth parameter used by the StepFast1 algorithm. - * @ingroup disable - */ -ODE_API void dWorldSetAutoEnableDepthSF1(dWorldID, int autoEnableDepth); - -/** - * @brief Get the AutoEnableDepth parameter used by the StepFast1 algorithm. - * @ingroup disable - */ -ODE_API int dWorldGetAutoEnableDepthSF1(dWorldID); - -/** - * @brief Get auto disable linear threshold for newly created bodies. - * @ingroup disable - * @return the threshold - */ -ODE_API dReal dWorldGetAutoDisableLinearThreshold (dWorldID); - -/** - * @brief Set auto disable linear threshold for newly created bodies. - * @param linear_threshold default is 0.01 - * @ingroup disable - */ -ODE_API void dWorldSetAutoDisableLinearThreshold (dWorldID, dReal linear_threshold); - -/** - * @brief Get auto disable angular threshold for newly created bodies. - * @ingroup disable - * @return the threshold - */ -ODE_API dReal dWorldGetAutoDisableAngularThreshold (dWorldID); - -/** - * @brief Set auto disable angular threshold for newly created bodies. - * @param linear_threshold default is 0.01 - * @ingroup disable - */ -ODE_API void dWorldSetAutoDisableAngularThreshold (dWorldID, dReal angular_threshold); - -/** * @brief Get auto disable linear average threshold for newly created bodies. * @ingroup disable * @return the threshold */ -ODE_API dReal dWorldGetAutoDisableLinearAverageThreshold (dWorldID); +ODE_API dReal dWorldGetAutoDisableLinearThreshold (dWorldID); /** * @brief Set auto disable linear average threshold for newly created bodies. * @param linear_average_threshold default is 0.01 * @ingroup disable */ -ODE_API void dWorldSetAutoDisableLinearAverageThreshold (dWorldID, dReal linear_average_threshold); +ODE_API void dWorldSetAutoDisableLinearThreshold (dWorldID, dReal linear_average_threshold); /** * @brief Get auto disable angular average threshold for newly created bodies. * @ingroup disable * @return the threshold */ -ODE_API dReal dWorldGetAutoDisableAngularAverageThreshold (dWorldID); +ODE_API dReal dWorldGetAutoDisableAngularThreshold (dWorldID); /** * @brief Set auto disable angular average threshold for newly created bodies. * @param linear_average_threshold default is 0.01 * @ingroup disable */ -ODE_API void dWorldSetAutoDisableAngularAverageThreshold (dWorldID, dReal angular_average_threshold); +ODE_API void dWorldSetAutoDisableAngularThreshold (dWorldID, dReal angular_average_threshold); /** * @brief Get auto disable sample count for newly created bodies. @@ -1420,22 +1632,22 @@ */ ODE_API dJointID dJointCreatePR (dWorldID, dJointGroupID); - /** - * @brief Create a new joint of the PU (Prismatic and Universal) type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given joint group. - */ - ODE_API dJointID dJointCreatePU (dWorldID, dJointGroupID); +/** + * @brief Create a new joint of the PU (Prismatic and Universal) type. + * @ingroup joints + * @param dJointGroupID set to 0 to allocate the joint normally. + * If it is nonzero the joint is allocated in the given joint group. + */ +ODE_API dJointID dJointCreatePU (dWorldID, dJointGroupID); - /** - * @brief Create a new joint of the Piston type. - * @ingroup joints - * @param dJointGroupID set to 0 to allocate the joint normally. - * If it is nonzero the joint is allocated in the given - * joint group. - */ - ODE_API dJointID dJointCreatePiston (dWorldID, dJointGroupID); +/** + * @brief Create a new joint of the Piston type. + * @ingroup joints + * @param dJointGroupID set to 0 to allocate the joint normally. + * If it is nonzero the joint is allocated in the given + * joint group. + */ +ODE_API dJointID dJointCreatePiston (dWorldID, dJointGroupID); /** * @brief Create a new joint of the fixed type. @@ -1472,6 +1684,31 @@ ODE_API dJointID dJointCreatePlane2D (dWorldID, dJointGroupID); /** + * @brief Create a new joint of the double ball type. + * @ingroup joints + * @param dJointGroupID set to 0 to allocate the joint normally. + * If it is nonzero the joint is allocated in the given joint group. + */ +ODE_API dJointID dJointCreateDBall (dWorldID, dJointGroupID); + +/** + * @brief Create a new joint of the double hinge type. + * @ingroup joints + * @param dJointGroupID set to 0 to allocate the joint normally. + * If it is nonzero the joint is allocated in the given joint group. + */ +ODE_API dJointID dJointCreateDHinge (dWorldID, dJointGroupID); + +/** + * @brief Create a new joint of the Transmission type. + * @ingroup joints + * @param dJointGroupID set to 0 to allocate the joint normally. + * If it is nonzero the joint is allocated in the given joint group. + */ +ODE_API dJointID dJointCreateTransmission (dWorldID, dJointGroupID); + + +/** * @brief Destroy a joint. * @ingroup joints * @@ -1900,177 +2137,177 @@ ODE_API void dJointAddPRTorque (dJointID j, dReal torque); - /** - * @brief set anchor - * @ingroup joints - */ - ODE_API void dJointSetPUAnchor (dJointID, dReal x, dReal y, dReal z); +/** +* @brief set anchor +* @ingroup joints +*/ +ODE_API void dJointSetPUAnchor (dJointID, dReal x, dReal y, dReal z); - /** - * @brief set anchor - * @ingroup joints - */ - ODE_API_DEPRECATED ODE_API void dJointSetPUAnchorDelta (dJointID, dReal x, dReal y, dReal z, - dReal dx, dReal dy, dReal dz); +/** + * @brief set anchor + * @ingroup joints + */ +ODE_API_DEPRECATED ODE_API void dJointSetPUAnchorDelta (dJointID, dReal x, dReal y, dReal z, + dReal dx, dReal dy, dReal dz); - /** - * @brief Set the PU anchor as if the 2 bodies were already at [dx, dy, dz] appart. - * @ingroup joints - * - * This function initialize the anchor and the relative position of each body - * as if the position between body1 and body2 was already the projection of [dx, dy, dz] - * along the Piston axis. (i.e as if the body1 was at its current position - [dx,dy,dy] when the - * axis is set). - * Ex: - *
-   * dReal offset = 3;
-   * dVector3 axis;
-   * dJointGetPUAxis(jId, axis);
-   * dJointSetPUAnchor(jId, 0, 0, 0);
-   * // If you request the position you will have: dJointGetPUPosition(jId) == 0
-   * dJointSetPUAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offset, axis[Z]*offset);
-   * // If you request the position you will have: dJointGetPUPosition(jId) == offset
-   * 
- * @param j The PU joint for which the anchor point will be set - * @param x The X position of the anchor point in world frame - * @param y The Y position of the anchor point in world frame - * @param z The Z position of the anchor point in world frame - * @param dx A delta to be substracted to the X position as if the anchor was set - * when body1 was at current_position[X] - dx - * @param dx A delta to be substracted to the Y position as if the anchor was set - * when body1 was at current_position[Y] - dy - * @param dx A delta to be substracted to the Z position as if the anchor was set - * when body1 was at current_position[Z] - dz - */ - ODE_API void dJointSetPUAnchorOffset (dJointID, dReal x, dReal y, dReal z, - dReal dx, dReal dy, dReal dz); +/** + * @brief Set the PU anchor as if the 2 bodies were already at [dx, dy, dz] appart. + * @ingroup joints + * + * This function initialize the anchor and the relative position of each body + * as if the position between body1 and body2 was already the projection of [dx, dy, dz] + * along the Piston axis. (i.e as if the body1 was at its current position - [dx,dy,dy] when the + * axis is set). + * Ex: + *
+ * dReal offset = 3;
+ * dVector3 axis;
+ * dJointGetPUAxis(jId, axis);
+ * dJointSetPUAnchor(jId, 0, 0, 0);
+ * // If you request the position you will have: dJointGetPUPosition(jId) == 0
+ * dJointSetPUAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offset, axis[Z]*offset);
+ * // If you request the position you will have: dJointGetPUPosition(jId) == offset
+ * 
+ * @param j The PU joint for which the anchor point will be set + * @param x The X position of the anchor point in world frame + * @param y The Y position of the anchor point in world frame + * @param z The Z position of the anchor point in world frame + * @param dx A delta to be substracted to the X position as if the anchor was set + * when body1 was at current_position[X] - dx + * @param dx A delta to be substracted to the Y position as if the anchor was set + * when body1 was at current_position[Y] - dy + * @param dx A delta to be substracted to the Z position as if the anchor was set + * when body1 was at current_position[Z] - dz + */ +ODE_API void dJointSetPUAnchorOffset (dJointID, dReal x, dReal y, dReal z, + dReal dx, dReal dy, dReal dz); - /** - * @brief set the axis for the first axis or the universal articulation - * @ingroup joints - */ - ODE_API void dJointSetPUAxis1 (dJointID, dReal x, dReal y, dReal z); +/** + * @brief set the axis for the first axis or the universal articulation + * @ingroup joints + */ +ODE_API void dJointSetPUAxis1 (dJointID, dReal x, dReal y, dReal z); - /** - * @brief set the axis for the second axis or the universal articulation - * @ingroup joints - */ - ODE_API void dJointSetPUAxis2 (dJointID, dReal x, dReal y, dReal z); +/** + * @brief set the axis for the second axis or the universal articulation + * @ingroup joints + */ +ODE_API void dJointSetPUAxis2 (dJointID, dReal x, dReal y, dReal z); - /** - * @brief set the axis for the prismatic articulation - * @ingroup joints - */ - ODE_API void dJointSetPUAxis3 (dJointID, dReal x, dReal y, dReal z); +/** + * @brief set the axis for the prismatic articulation + * @ingroup joints + */ +ODE_API void dJointSetPUAxis3 (dJointID, dReal x, dReal y, dReal z); - /** - * @brief set the axis for the prismatic articulation - * @ingroup joints - * @note This function was added for convenience it is the same as - * dJointSetPUAxis3 - */ - ODE_API void dJointSetPUAxisP (dJointID id, dReal x, dReal y, dReal z); +/** + * @brief set the axis for the prismatic articulation + * @ingroup joints + * @note This function was added for convenience it is the same as + * dJointSetPUAxis3 + */ +ODE_API void dJointSetPUAxisP (dJointID id, dReal x, dReal y, dReal z); - /** - * @brief set joint parameter - * @ingroup joints - * - * @note parameterX where X equal 2 refer to parameter for second axis of the - * universal articulation - * @note parameterX where X equal 3 refer to parameter for prismatic - * articulation - */ - ODE_API void dJointSetPUParam (dJointID, int parameter, dReal value); +/** + * @brief set joint parameter + * @ingroup joints + * + * @note parameterX where X equal 2 refer to parameter for second axis of the + * universal articulation + * @note parameterX where X equal 3 refer to parameter for prismatic + * articulation + */ +ODE_API void dJointSetPUParam (dJointID, int parameter, dReal value); - /** - * @brief Applies the torque about the rotoide axis of the PU joint - * - * That is, it applies a torque with specified magnitude in the direction - * of the rotoide axis, to body 1, and with the same magnitude but in opposite - * direction to body 2. This function is just a wrapper for dBodyAddTorque()} - * @ingroup joints - */ - ODE_API void dJointAddPUTorque (dJointID j, dReal torque); +/** + * @brief Applies the torque about the rotoide axis of the PU joint + * + * That is, it applies a torque with specified magnitude in the direction + * of the rotoide axis, to body 1, and with the same magnitude but in opposite + * direction to body 2. This function is just a wrapper for dBodyAddTorque()} + * @ingroup joints + */ +ODE_API void dJointAddPUTorque (dJointID j, dReal torque); - /** - * @brief set the joint anchor - * @ingroup joints - */ - ODE_API void dJointSetPistonAnchor (dJointID, dReal x, dReal y, dReal z); +/** + * @brief set the joint anchor + * @ingroup joints + */ +ODE_API void dJointSetPistonAnchor (dJointID, dReal x, dReal y, dReal z); + +/** + * @brief Set the Piston anchor as if the 2 bodies were already at [dx,dy, dz] appart. + * @ingroup joints + * + * This function initialize the anchor and the relative position of each body + * as if the position between body1 and body2 was already the projection of [dx, dy, dz] + * along the Piston axis. (i.e as if the body1 was at its current position - [dx,dy,dy] when the + * axis is set). + * Ex: + *
+ * dReal offset = 3;
+ * dVector3 axis;
+ * dJointGetPistonAxis(jId, axis);
+ * dJointSetPistonAnchor(jId, 0, 0, 0);
+ * // If you request the position you will have: dJointGetPistonPosition(jId) == 0
+ * dJointSetPistonAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offset, axis[Z]*offset);
+ * // If you request the position you will have: dJointGetPistonPosition(jId) == offset
+ * 
+ * @param j The Piston joint for which the anchor point will be set + * @param x The X position of the anchor point in world frame + * @param y The Y position of the anchor point in world frame + * @param z The Z position of the anchor point in world frame + * @param dx A delta to be substracted to the X position as if the anchor was set + * when body1 was at current_position[X] - dx + * @param dx A delta to be substracted to the Y position as if the anchor was set + * when body1 was at current_position[Y] - dy + * @param dx A delta to be substracted to the Z position as if the anchor was set + * when body1 was at current_position[Z] - dz + */ +ODE_API void dJointSetPistonAnchorOffset(dJointID j, dReal x, dReal y, dReal z, + dReal dx, dReal dy, dReal dz); /** - * @brief Set the Piston anchor as if the 2 bodies were already at [dx,dy, dz] appart. - * @ingroup joints - * - * This function initialize the anchor and the relative position of each body - * as if the position between body1 and body2 was already the projection of [dx, dy, dz] - * along the Piston axis. (i.e as if the body1 was at its current position - [dx,dy,dy] when the - * axis is set). - * Ex: - *
-   * dReal offset = 3;
-   * dVector3 axis;
-   * dJointGetPistonAxis(jId, axis);
-   * dJointSetPistonAnchor(jId, 0, 0, 0);
-   * // If you request the position you will have: dJointGetPistonPosition(jId) == 0
-   * dJointSetPistonAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offset, axis[Z]*offset);
-   * // If you request the position you will have: dJointGetPistonPosition(jId) == offset
-   * 
- * @param j The Piston joint for which the anchor point will be set - * @param x The X position of the anchor point in world frame - * @param y The Y position of the anchor point in world frame - * @param z The Z position of the anchor point in world frame - * @param dx A delta to be substracted to the X position as if the anchor was set - * when body1 was at current_position[X] - dx - * @param dx A delta to be substracted to the Y position as if the anchor was set - * when body1 was at current_position[Y] - dy - * @param dx A delta to be substracted to the Z position as if the anchor was set - * when body1 was at current_position[Z] - dz - */ - ODE_API void dJointSetPistonAnchorOffset(dJointID j, dReal x, dReal y, dReal z, - dReal dx, dReal dy, dReal dz); + * @brief set the joint axis + * @ingroup joints + */ +ODE_API void dJointSetPistonAxis (dJointID, dReal x, dReal y, dReal z); - /** - * @brief set the joint axis - * @ingroup joints - */ - ODE_API void dJointSetPistonAxis (dJointID, dReal x, dReal y, dReal z); - - /** - * This function set prismatic axis of the joint and also set the position - * of the joint. - * - * @ingroup joints - * @param j The joint affected by this function - * @param x The x component of the axis - * @param y The y component of the axis - * @param z The z component of the axis - * @param dx The Initial position of the prismatic join in the x direction - * @param dy The Initial position of the prismatic join in the y direction - * @param dz The Initial position of the prismatic join in the z direction - */ - ODE_API_DEPRECATED ODE_API void dJointSetPistonAxisDelta (dJointID j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); +/** + * This function set prismatic axis of the joint and also set the position + * of the joint. + * + * @ingroup joints + * @param j The joint affected by this function + * @param x The x component of the axis + * @param y The y component of the axis + * @param z The z component of the axis + * @param dx The Initial position of the prismatic join in the x direction + * @param dy The Initial position of the prismatic join in the y direction + * @param dz The Initial position of the prismatic join in the z direction + */ +ODE_API_DEPRECATED ODE_API void dJointSetPistonAxisDelta (dJointID j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); - /** - * @brief set joint parameter - * @ingroup joints - */ - ODE_API void dJointSetPistonParam (dJointID, int parameter, dReal value); +/** + * @brief set joint parameter + * @ingroup joints + */ +ODE_API void dJointSetPistonParam (dJointID, int parameter, dReal value); - /** - * @brief Applies the given force in the slider's direction. - * - * That is, it applies a force with specified magnitude, in the direction of - * prismatic's axis, to body1, and with the same magnitude but opposite - * direction to body2. This function is just a wrapper for dBodyAddForce(). - * @ingroup joints - */ - ODE_API void dJointAddPistonForce (dJointID joint, dReal force); +/** + * @brief Applies the given force in the slider's direction. + * + * That is, it applies a force with specified magnitude, in the direction of + * prismatic's axis, to body1, and with the same magnitude but opposite + * direction to body2. This function is just a wrapper for dBodyAddForce(). + * @ingroup joints + */ +ODE_API void dJointAddPistonForce (dJointID joint, dReal force); /** @@ -2328,6 +2565,12 @@ ODE_API dReal dJointGetHinge2Angle1 (dJointID); /** + * @brief Get angle + * @ingroup joints + */ +ODE_API dReal dJointGetHinge2Angle2 (dJointID); + +/** * @brief Get time derivative of angle * @ingroup joints */ @@ -2450,12 +2693,12 @@ /** - * @brief Get the PR angular position (i.e. the twist between the 2 bodies) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - * @ingroup joints - */ + * @brief Get the PR angular position (i.e. the twist between the 2 bodies) + * + * When the axis is set, the current position of the attached bodies is + * examined and that position will be the zero position. + * @ingroup joints + */ ODE_API dReal dJointGetPRAngle (dJointID); /** @@ -2486,185 +2729,185 @@ - /** - * @brief Get the joint anchor point, in world coordinates. - * @return the point on body 1. If the joint is perfectly satisfied, - * this will be the same as the point on body 2. - * @ingroup joints - */ - ODE_API void dJointGetPUAnchor (dJointID, dVector3 result); +/** + * @brief Get the joint anchor point, in world coordinates. + * @return the point on body 1. If the joint is perfectly satisfied, + * this will be the same as the point on body 2. + * @ingroup joints + */ +ODE_API void dJointGetPUAnchor (dJointID, dVector3 result); - /** - * @brief Get the PU linear position (i.e. the prismatic's extension) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - * - * The position is the "oriented" length between the - * position = (Prismatic axis) dot_product [(body1 + offset) - (body2 + anchor2)] - * - * @ingroup joints - */ - ODE_API dReal dJointGetPUPosition (dJointID); +/** + * @brief Get the PU linear position (i.e. the prismatic's extension) + * + * When the axis is set, the current position of the attached bodies is + * examined and that position will be the zero position. + * + * The position is the "oriented" length between the + * position = (Prismatic axis) dot_product [(body1 + offset) - (body2 + anchor2)] + * + * @ingroup joints + */ +ODE_API dReal dJointGetPUPosition (dJointID); - /** - * @brief Get the PR linear position's time derivative - * - * @ingroup joints - */ - ODE_API dReal dJointGetPUPositionRate (dJointID); +/** + * @brief Get the PR linear position's time derivative + * + * @ingroup joints + */ +ODE_API dReal dJointGetPUPositionRate (dJointID); - /** - * @brief Get the first axis of the universal component of the joint - * @ingroup joints - */ - ODE_API void dJointGetPUAxis1 (dJointID, dVector3 result); +/** + * @brief Get the first axis of the universal component of the joint + * @ingroup joints + */ +ODE_API void dJointGetPUAxis1 (dJointID, dVector3 result); - /** - * @brief Get the second axis of the Universal component of the joint - * @ingroup joints - */ - ODE_API void dJointGetPUAxis2 (dJointID, dVector3 result); +/** + * @brief Get the second axis of the Universal component of the joint + * @ingroup joints + */ +ODE_API void dJointGetPUAxis2 (dJointID, dVector3 result); - /** - * @brief Get the prismatic axis - * @ingroup joints - */ - ODE_API void dJointGetPUAxis3 (dJointID, dVector3 result); +/** + * @brief Get the prismatic axis + * @ingroup joints + */ +ODE_API void dJointGetPUAxis3 (dJointID, dVector3 result); - /** - * @brief Get the prismatic axis - * @ingroup joints - * - * @note This function was added for convenience it is the same as - * dJointGetPUAxis3 - */ - ODE_API void dJointGetPUAxisP (dJointID id, dVector3 result); +/** + * @brief Get the prismatic axis + * @ingroup joints + * + * @note This function was added for convenience it is the same as + * dJointGetPUAxis3 + */ +ODE_API void dJointGetPUAxisP (dJointID id, dVector3 result); - /** - * @brief Get both angles at the same time. - * @ingroup joints - * - * @param joint The Prismatic universal joint for which we want to calculate the angles - * @param angle1 The angle between the body1 and the axis 1 - * @param angle2 The angle between the body2 and the axis 2 - * - * @note This function combine dJointGetPUAngle1 and dJointGetPUAngle2 together - * and try to avoid redundant calculation - */ - ODE_API void dJointGetPUAngles (dJointID, dReal *angle1, dReal *angle2); +/** + * @brief Get both angles at the same time. + * @ingroup joints + * + * @param joint The Prismatic universal joint for which we want to calculate the angles + * @param angle1 The angle between the body1 and the axis 1 + * @param angle2 The angle between the body2 and the axis 2 + * + * @note This function combine dJointGetPUAngle1 and dJointGetPUAngle2 together + * and try to avoid redundant calculation + */ +ODE_API void dJointGetPUAngles (dJointID, dReal *angle1, dReal *angle2); - /** - * @brief Get angle - * @ingroup joints - */ - ODE_API dReal dJointGetPUAngle1 (dJointID); +/** + * @brief Get angle + * @ingroup joints + */ +ODE_API dReal dJointGetPUAngle1 (dJointID); - /** - * @brief * @brief Get time derivative of angle1 - * - * @ingroup joints - */ - ODE_API dReal dJointGetPUAngle1Rate (dJointID); +/** + * @brief * @brief Get time derivative of angle1 + * + * @ingroup joints + */ +ODE_API dReal dJointGetPUAngle1Rate (dJointID); - /** - * @brief Get angle - * @ingroup joints - */ - ODE_API dReal dJointGetPUAngle2 (dJointID); +/** + * @brief Get angle + * @ingroup joints + */ +ODE_API dReal dJointGetPUAngle2 (dJointID); - /** - * @brief * @brief Get time derivative of angle2 - * - * @ingroup joints - */ - ODE_API dReal dJointGetPUAngle2Rate (dJointID); +/** + * @brief * @brief Get time derivative of angle2 + * + * @ingroup joints + */ +ODE_API dReal dJointGetPUAngle2Rate (dJointID); /** * @brief get joint parameter * @ingroup joints */ - ODE_API dReal dJointGetPUParam (dJointID, int parameter); +ODE_API dReal dJointGetPUParam (dJointID, int parameter); /** - * @brief Get the Piston linear position (i.e. the piston's extension) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - * @ingroup joints - */ - ODE_API dReal dJointGetPistonPosition (dJointID); + * @brief Get the Piston linear position (i.e. the piston's extension) + * + * When the axis is set, the current position of the attached bodies is + * examined and that position will be the zero position. + * @ingroup joints + */ +ODE_API dReal dJointGetPistonPosition (dJointID); - /** - * @brief Get the piston linear position's time derivative. - * @ingroup joints - */ - ODE_API dReal dJointGetPistonPositionRate (dJointID); +/** + * @brief Get the piston linear position's time derivative. + * @ingroup joints + */ +ODE_API dReal dJointGetPistonPositionRate (dJointID); /** - * @brief Get the Piston angular position (i.e. the twist between the 2 bodies) - * - * When the axis is set, the current position of the attached bodies is - * examined and that position will be the zero position. - * @ingroup joints - */ - ODE_API dReal dJointGetPistonAngle (dJointID); + * @brief Get the Piston angular position (i.e. the twist between the 2 bodies) + * + * When the axis is set, the current position of the attached bodies is + * examined and that position will be the zero position. + * @ingroup joints + */ +ODE_API dReal dJointGetPistonAngle (dJointID); - /** - * @brief Get the piston angular position's time derivative. - * @ingroup joints - */ - ODE_API dReal dJointGetPistonAngleRate (dJointID); +/** + * @brief Get the piston angular position's time derivative. + * @ingroup joints + */ +ODE_API dReal dJointGetPistonAngleRate (dJointID); - /** - * @brief Get the joint anchor - * - * This returns the point on body 1. If the joint is perfectly satisfied, - * this will be the same as the point on body 2 in direction perpendicular - * to the prismatic axis. - * - * @ingroup joints - */ - ODE_API void dJointGetPistonAnchor (dJointID, dVector3 result); +/** + * @brief Get the joint anchor + * + * This returns the point on body 1. If the joint is perfectly satisfied, + * this will be the same as the point on body 2 in direction perpendicular + * to the prismatic axis. + * + * @ingroup joints + */ +ODE_API void dJointGetPistonAnchor (dJointID, dVector3 result); - /** - * @brief Get the joint anchor w.r.t. body 2 - * - * This returns the point on body 2. You can think of a Piston - * joint as trying to keep the result of dJointGetPistonAnchor() and - * dJointGetPistonAnchor2() the same in the direction perpendicular to the - * pirsmatic axis. If the joint is perfectly satisfied, - * this function will return the same value as dJointGetPistonAnchor() to - * within roundoff errors. dJointGetPistonAnchor2() can be used, along with - * dJointGetPistonAnchor(), to see how far the joint has come apart. - * - * @ingroup joints - */ - ODE_API void dJointGetPistonAnchor2 (dJointID, dVector3 result); +/** + * @brief Get the joint anchor w.r.t. body 2 + * + * This returns the point on body 2. You can think of a Piston + * joint as trying to keep the result of dJointGetPistonAnchor() and + * dJointGetPistonAnchor2() the same in the direction perpendicular to the + * pirsmatic axis. If the joint is perfectly satisfied, + * this function will return the same value as dJointGetPistonAnchor() to + * within roundoff errors. dJointGetPistonAnchor2() can be used, along with + * dJointGetPistonAnchor(), to see how far the joint has come apart. + * + * @ingroup joints + */ +ODE_API void dJointGetPistonAnchor2 (dJointID, dVector3 result); - /** - * @brief Get the prismatic axis (This is also the rotoide axis. - * @ingroup joints - */ - ODE_API void dJointGetPistonAxis (dJointID, dVector3 result); +/** + * @brief Get the prismatic axis (This is also the rotoide axis. + * @ingroup joints + */ +ODE_API void dJointGetPistonAxis (dJointID, dVector3 result); - /** - * @brief get joint parameter - * @ingroup joints - */ - ODE_API dReal dJointGetPistonParam (dJointID, int parameter); +/** + * @brief get joint parameter + * @ingroup joints + */ +ODE_API dReal dJointGetPistonParam (dJointID, int parameter); - /** +/** * @brief Get the number of angular axes that will be controlled by the * AMotor. * @param num can range from 0 (which effectively deactivates the @@ -2770,6 +3013,327 @@ /** + * @brief get the contact point of the first wheel of the Transmission joint. + * @ingroup joints + */ +ODE_API void dJointGetTransmissionContactPoint1(dJointID, dVector3 result); + +/** + * @brief get contact point of the second wheel of the Transmission joint. + * @ingroup joints + */ +ODE_API void dJointGetTransmissionContactPoint2(dJointID, dVector3 result); + +/** + * @brief set the first axis for the Transmission joint + * @remarks This is the axis around which the first body is allowed to + * revolve and is attached to it. It is given in global coordinates + * and can only be set explicitly in intersecting-axes mode. For the + * parallel-axes and chain modes which share one common axis of + * revolution for both gears dJointSetTransmissionAxis should be used. + * @ingroup joints + */ +ODE_API void dJointSetTransmissionAxis1(dJointID, dReal x, dReal y, dReal z); + +/** + * @brief get first axis for the Transmission joint + * @remarks In parallel-axes and chain mode the common axis with + * respect to the first body is returned. If the joint constraint is + * satisfied it should be the same as the axis return with + * dJointGetTransmissionAxis2 or dJointGetTransmissionAxis. + * @ingroup joints + */ +ODE_API void dJointGetTransmissionAxis1(dJointID, dVector3 result); + +/** + * @brief set second axis for the Transmission joint + * @remarks This is the axis around which the second body is allowed + * to revolve and is attached to it. It is given in global + * coordinates and can only be set explicitly in intersecting-axes + * mode. For the parallel-axes and chain modes which share one common + * axis of revolution for both gears dJointSetTransmissionAxis should + * be used. + * @ingroup joints + */ +ODE_API void dJointSetTransmissionAxis2(dJointID, dReal x, dReal y, dReal z); + +/** + * @brief get second axis for the Transmission joint + * @remarks In parallel-axes and chain mode the common axis with + * respect to the second body is returned. If the joint constraint is + * satisfied it should be the same as the axis return with + * dJointGetTransmissionAxis1 or dJointGetTransmissionAxis. + * @ingroup joints + */ +ODE_API void dJointGetTransmissionAxis2(dJointID, dVector3 result); + +/** + * @brief set the first anchor for the Transmission joint + * @remarks This is the point of attachment of the wheel on the + * first body. It is given in global coordinates. + * @ingroup joints + */ +ODE_API void dJointSetTransmissionAnchor1(dJointID, dReal x, dReal y, dReal z); + +/** + * @brief get the first anchor of the Transmission joint + * @ingroup joints + */ +ODE_API void dJointGetTransmissionAnchor1(dJointID, dVector3 result); + +/** + * @brief set the second anchor for the Transmission joint + * @remarks This is the point of attachment of the wheel on the + * second body. It is given in global coordinates. + * @ingroup joints + */ +ODE_API void dJointSetTransmissionAnchor2(dJointID, dReal x, dReal y, dReal z); + +/** + * @brief get the second anchor for the Transmission joint + * @ingroup joints + */ +ODE_API void dJointGetTransmissionAnchor2(dJointID, dVector3 result); + +/** + * @brief set a Transmission joint parameter + * @ingroup joints + */ +ODE_API void dJointSetTransmissionParam(dJointID, int parameter, dReal value); + +/** + * @brief get a Transmission joint parameter + * @ingroup joints + */ +ODE_API dReal dJointGetTransmissionParam(dJointID, int parameter); + +/** + * @brief set the Transmission joint mode + * @remarks The mode can be one of dTransmissionParallelAxes, + * dTransmissionIntersectingAxes and dTransmissionChainDrive simulating a + * set of parallel-axes gears, intersecting-axes beveled gears or + * chain and sprockets respectively. + * @ingroup joints + */ +ODE_API void dJointSetTransmissionMode( dJointID j, int mode ); + +/** + * @brief get the Transmission joint mode + * @ingroup joints + */ +ODE_API int dJointGetTransmissionMode( dJointID j ); + +/** + * @brief set the Transmission ratio + * @remarks This is the ratio of the angular speed of the first gear + * to that of the second gear. It can only be set explicitly in + * parallel-axes mode. In intersecting-axes mode the ratio is defined + * implicitly by the initial configuration of the wheels and in chain + * mode it is defined implicitly be the wheel radii. + * @ingroup joints + */ +ODE_API void dJointSetTransmissionRatio( dJointID j, dReal ratio ); + +/** + * @brief get the Transmission joint ratio + * @ingroup joints + */ +ODE_API dReal dJointGetTransmissionRatio( dJointID j ); + +/** + * @brief set the common axis for both wheels of the Transmission joint + * @remarks This sets the common axis of revolution for both wheels + * and should only be used in parallel-axes or chain mode. For + * intersecting-axes mode where each wheel axis needs to be specified + * individually dJointSetTransmissionAxis1 and + * dJointSetTransmissionAxis2 should be used. The axis is given in + * global coordinates + * @ingroup joints + */ +ODE_API void dJointSetTransmissionAxis( dJointID j, dReal x, dReal y, dReal z ); + +/** + * @brief get the common axis for both wheels of the Transmission joint + * @ingroup joints + */ +ODE_API void dJointGetTransmissionAxis( dJointID j, dVector3 result ); + +/** + * @brief get the phase, that is the traversed angle for the first + * wheel of the Transmission joint + * @ingroup joints + */ +ODE_API dReal dJointGetTransmissionAngle1( dJointID j ); + +/** + * @brief get the phase, that is the traversed angle for the second + * wheel of the Transmission joint + * @ingroup joints + */ +ODE_API dReal dJointGetTransmissionAngle2( dJointID j ); + +/** + * @brief get the radius of the first wheel of the Transmission joint + * @ingroup joints + */ +ODE_API dReal dJointGetTransmissionRadius1( dJointID j ); + +/** + * @brief get the radius of the second wheel of the Transmission joint + * @ingroup joints + */ +ODE_API dReal dJointGetTransmissionRadius2( dJointID j ); + +/** + * @brief set the radius of the first wheel of the Transmission joint + * @remarks The wheel radii can only be set explicitly in chain mode. + * In the other modes they're defined implicitly by the initial + * configuration and ratio of the wheels. + * @ingroup joints + */ +ODE_API void dJointSetTransmissionRadius1( dJointID j, dReal radius ); + +/** + * @brief set the radius of the second wheel of the Transmission joint + * @remarks The wheel radii can only be set explicitly in chain mode. + * In the other modes they're defined implicitly by the initial + * configuration and ratio of the wheels. + * @ingroup joints + */ +ODE_API void dJointSetTransmissionRadius2( dJointID j, dReal radius ); + +/** + * @brief get the backlash of the Transmission joint + * @ingroup joints + */ +ODE_API dReal dJointGetTransmissionBacklash( dJointID j ); + +/** + * @brief set the backlash of the Transmission joint + * @remarks Backlash is the clearance in the mesh of the wheels of the + * transmission and is defined as the maximum distance that the + * geometric contact point can travel without any actual contact or + * transfer of power between the wheels. This can be converted in + * degrees of revolution for each wheel by dividing by the wheel's + * radius. To further illustrate this consider the situation where a + * wheel of radius r_1 is driving another wheel of radius r_2 and + * there is an amount of backlash equal to b in their mesh. If the + * driving wheel were to instantaneously stop there would be no + * contact and hence the driven wheel would continue to turn for + * another b / r_2 radians until all the backlash in the mesh was take + * up and contact restored with the relationship of driving and driven + * wheel reversed. The backlash is therefore given in untis of + * length. + * @ingroup joints + */ +ODE_API void dJointSetTransmissionBacklash( dJointID j, dReal backlash ); + +/** + * @brief set anchor1 for double ball joint + * @ingroup joints + */ +ODE_API void dJointSetDBallAnchor1(dJointID, dReal x, dReal y, dReal z); + +/** + * @brief set anchor2 for double ball joint + * @ingroup joints + */ +ODE_API void dJointSetDBallAnchor2(dJointID, dReal x, dReal y, dReal z); + +/** + * @brief get anchor1 from double ball joint + * @ingroup joints + */ +ODE_API void dJointGetDBallAnchor1(dJointID, dVector3 result); + +/** + * @brief get anchor2 from double ball joint + * @ingroup joints + */ +ODE_API void dJointGetDBallAnchor2(dJointID, dVector3 result); + +/** + * @brief get the target distance from double ball joint + * @ingroup joints + */ +ODE_API dReal dJointGetDBallDistance(dJointID); + +/** + * @brief set the target distance for the double ball joint + * @ingroup joints + */ +ODE_API void dJointSetDBallDistance(dJointID, dReal dist); + +/** + * @brief set double ball joint parameter + * @ingroup joints + */ +ODE_API void dJointSetDBallParam(dJointID, int parameter, dReal value); + +/** + * @brief get double ball joint parameter + * @ingroup joints + */ +ODE_API dReal dJointGetDBallParam(dJointID, int parameter); + +/** + * @brief set axis for double hinge joint + * @ingroup joints + */ +ODE_API void dJointSetDHingeAxis(dJointID, dReal x, dReal y, dReal z); + +/** + * @brief get axis for double hinge joint + * @ingroup joints + */ +ODE_API void dJointGetDHingeAxis(dJointID, dVector3 result); + +/** + * @brief set anchor1 for double hinge joint + * @ingroup joints + */ +ODE_API void dJointSetDHingeAnchor1(dJointID, dReal x, dReal y, dReal z); + +/** + * @brief set anchor2 for double hinge joint + * @ingroup joints + */ +ODE_API void dJointSetDHingeAnchor2(dJointID, dReal x, dReal y, dReal z); + +/** + * @brief get anchor1 from double hinge joint + * @ingroup joints + */ +ODE_API void dJointGetDHingeAnchor1(dJointID, dVector3 result); + +/** + * @brief get anchor2 from double hinge joint + * @ingroup joints + */ +ODE_API void dJointGetDHingeAnchor2(dJointID, dVector3 result); + +/** + * @brief get the set distance from double hinge joint + * @ingroup joints + */ +ODE_API dReal dJointGetDHingeDistance(dJointID); + +/** + * @brief set double hinge joint parameter + * @ingroup joints + */ +ODE_API void dJointSetDHingeParam(dJointID, int parameter, dReal value); + +/** + * @brief get double hinge joint parameter + * @ingroup joints + */ +ODE_API dReal dJointGetDHingeParam(dJointID, int parameter); + + + + +/** * @ingroup joints */ ODE_API dJointID dConnectingJoint (dBodyID, dBodyID); diff -Nru ode-0.11.1/include/ode/odeconfig.h ode-0.14/include/ode/odeconfig.h --- ode-0.11.1/include/ode/odeconfig.h 2008-10-16 22:33:17.000000000 +0000 +++ ode-0.14/include/ode/odeconfig.h 2015-12-18 14:09:27.000000000 +0000 @@ -1,13 +1,31 @@ -#ifndef ODECONFIG_H -#define ODECONFIG_H +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ -#ifndef dDOUBLE -#ifndef dSINGLE -#define dSINGLE -#endif -#endif +#ifndef _ODE_ODECONFIG_H_ +#define _ODE_ODECONFIG_H_ /* Pull in the standard headers */ +#include +#include #include #include #include @@ -15,12 +33,16 @@ #include #include -#if defined(ODE_DLL) || defined(ODE_LIB) || !defined(_MSC_VER) + +#include + + +#if defined(ODE_DLL) || defined(ODE_LIB) #define __ODE__ #endif /* Define a DLL export symbol for those platforms that need it */ -#if defined(_MSC_VER) +#if defined(_MSC_VER) || (defined(__GNUC__) && defined(_WIN32)) #if defined(ODE_DLL) #define ODE_API __declspec(dllexport) #elif !defined(ODE_LIB) @@ -40,35 +62,55 @@ # define ODE_API_DEPRECATED #endif +#define ODE_PURE_INLINE static __inline +#define ODE_INLINE __inline + +#if defined(__cplusplus) + #define ODE_EXTERN_C extern "C" +#else + #define ODE_EXTERN_C +#endif + /* Well-defined common data types...need to define for 64 bit systems */ #if defined(_M_IA64) || defined(__ia64__) || defined(_M_AMD64) || defined(__x86_64__) #define X86_64_SYSTEM 1 - typedef int int32; - typedef unsigned int uint32; - typedef short int16; - typedef unsigned short uint16; - typedef char int8; - typedef unsigned char uint8; -#else - typedef int int32; - typedef unsigned int uint32; - typedef short int16; - typedef unsigned short uint16; - typedef char int8; - typedef unsigned char uint8; +#if defined(_MSC_VER) + typedef __int64 dint64; + typedef unsigned __int64 duint64; +#else + typedef long long dint64; + typedef unsigned long long duint64; #endif - -/* Visual C does not define these functions */ + typedef int dint32; + typedef unsigned int duint32; + typedef short dint16; + typedef unsigned short duint16; + typedef signed char dint8; + typedef unsigned char duint8; +#else #if defined(_MSC_VER) - #define copysignf _copysign - #define copysign _copysign + typedef __int64 dint64; + typedef unsigned __int64 duint64; +#else + typedef long long dint64; + typedef unsigned long long duint64; +#endif + typedef int dint32; + typedef unsigned int duint32; + typedef short dint16; + typedef unsigned short duint16; + typedef signed char dint8; + typedef unsigned char duint8; #endif - /* Define the dInfinity macro */ #ifdef INFINITY - #define dInfinity INFINITY + #ifdef dSINGLE + #define dInfinity ((float)INFINITY) + #else + #define dInfinity ((double)INFINITY) + #endif #elif defined(HUGE_VAL) #ifdef dSINGLE #ifdef HUGE_VALF @@ -88,4 +130,34 @@ #endif +/* Define the dNaN macro */ +#ifdef NAN + #define dNaN NAN +#else + #ifdef dSINGLE + #define dNaN ((float)(dInfinity - dInfinity)) + #else + #define dNaN (dInfinity - dInfinity) + #endif +#endif + + + /* Visual C does not define these functions */ +#if defined(_MSC_VER) + #define _ode_copysignf(x, y) ((float)_copysign(x, y)) + #define _ode_copysign(x, y) _copysign(x, y) + #define _ode_nextafterf(x, y) _nextafterf(x, y) + #define _ode_nextafter(x, y) _nextafter(x, y) + #if !defined(_WIN64) && defined(dSINGLE) + #define _ODE__NEXTAFTERF_REQUIRED + ODE_EXTERN_C float _nextafterf(float x, float y); + #endif +#else + #define _ode_copysignf(x, y) copysignf(x, y) + #define _ode_copysign(x, y) copysign(x, y) + #define _ode_nextafterf(x, y) nextafterf(x, y) + #define _ode_nextafter(x, y) nextafter(x, y) +#endif + + #endif diff -Nru ode-0.11.1/include/ode/odecpp_collision.h ode-0.14/include/ode/odecpp_collision.h --- ode-0.11.1/include/ode/odecpp_collision.h 2008-12-17 08:20:07.000000000 +0000 +++ ode-0.14/include/ode/odecpp_collision.h 2015-12-18 14:09:27.000000000 +0000 @@ -1,23 +1,23 @@ /************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * *************************************************************************/ /* C++ interface for new collision API */ @@ -80,7 +80,7 @@ { dGeomSetRotation (_id,R); } const dReal * getRotation() const { return dGeomGetRotation (_id); } - + void setQuaternion (const dQuaternion quat) { dGeomSetQuaternion (_id,quat); } void getQuaternion (dQuaternion quat) const @@ -108,6 +108,26 @@ int isEnabled() { return dGeomIsEnabled (_id); } + void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) const + { dGeomGetRelPointPos (_id, px, py, pz, result); } + void getRelPointPos (const dVector3 p, dVector3 result) const + { getRelPointPos (p[0], p[1], p[2], result); } + + void getPosRelPoint (dReal px, dReal py, dReal pz, dVector3 result) const + { dGeomGetPosRelPoint (_id, px, py, pz, result); } + void getPosRelPoint (const dVector3 p, dVector3 result) const + { getPosRelPoint (p[0], p[1], p[2], result); } + + void vectorToWorld (dReal px, dReal py, dReal pz, dVector3 result) const + { dGeomVectorToWorld (_id, px, py, pz, result); } + void vectorToWorld (const dVector3 p, dVector3 result) const + { vectorToWorld (p[0], p[1], p[2], result); } + + void vectorFromWorld (dReal px, dReal py, dReal pz, dVector3 result) const + { dGeomVectorFromWorld (_id, px, py, pz, result); } + void vectorFromWorld (const dVector3 p, dVector3 result) const + { vectorFromWorld (p[0], p[1], p[2], result); } + void collide2 (dGeomID g, void *data, dNearCallback *callback) { dSpaceCollide2 (_id,g,data,callback); } }; @@ -359,18 +379,50 @@ void get (dVector3 start, dVector3 dir) { dGeomRayGet (_id, start, dir); } +#ifdef WIN32 +#pragma warning( push ) +#pragma warning( disable : 4996 ) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + ODE_API_DEPRECATED void setParams (int firstContact, int backfaceCull) { dGeomRaySetParams (_id, firstContact, backfaceCull); } + + ODE_API_DEPRECATED void getParams (int *firstContact, int *backfaceCull) { dGeomRayGetParams (_id, firstContact, backfaceCull); } +#ifdef WIN32 +#pragma warning( pop ) +#else +#pragma GCC diagnostic pop +#endif + void setBackfaceCull (int backfaceCull) + { dGeomRaySetBackfaceCull (_id, backfaceCull); } + int getBackfaceCull() + { return dGeomRayGetBackfaceCull (_id); } + + void setFirstContact (int firstContact) + { dGeomRaySetFirstContact (_id, firstContact); } + int getFirstContact() + { return dGeomRayGetFirstContact (_id); } + void setClosestHit (int closestHit) { dGeomRaySetClosestHit (_id, closestHit); } int getClosestHit() { return dGeomRayGetClosestHit (_id); } }; +#ifdef WIN32 +#pragma warning( push ) +#pragma warning( disable : 4996 ) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif -class dGeomTransform : public dGeom { +class ODE_API_DEPRECATED dGeomTransform : public dGeom { // intentionally undefined, don't use these dGeomTransform (dGeomTransform &); void operator= (dGeomTransform &); @@ -403,6 +455,12 @@ { return dGeomTransformGetInfo (_id); } }; +#ifdef WIN32 +#pragma warning( pop ) +#else +#pragma GCC diagnostic pop +#endif + //} #endif diff -Nru ode-0.11.1/include/ode/odecpp.h ode-0.14/include/ode/odecpp.h --- ode-0.11.1/include/ode/odecpp.h 2008-12-21 00:36:18.000000000 +0000 +++ ode-0.14/include/ode/odecpp.h 2015-12-18 14:09:27.000000000 +0000 @@ -1,23 +1,23 @@ /************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * *************************************************************************/ /* C++ interface for non-collision stuff */ @@ -32,448 +32,533 @@ //namespace ode { -class dWorld { - dWorldID _id; +class dWorldSimpleIDContainer { +protected: + dWorldID _id; + + dWorldSimpleIDContainer(): _id(0) {} + ~dWorldSimpleIDContainer() { destroy(); } + + void destroy() { + if (_id) { + dWorldDestroy(_id); + _id = 0; + } + } +}; + +class dWorldDynamicIDContainer: public dWorldSimpleIDContainer { +protected: + virtual ~dWorldDynamicIDContainer() {} +}; + +template +class dWorldTemplate: public dWorldTemplateBase { // intentionally undefined, don't use these - dWorld (const dWorld &); - void operator= (const dWorld &); + dWorldTemplate (const dWorldTemplate &); + void operator= (const dWorldTemplate &); + +protected: + dWorldID get_id() const { return dWorldTemplateBase::_id; } + void set_id(dWorldID value) { dWorldTemplateBase::_id = value; } public: - dWorld() - { _id = dWorldCreate(); } - ~dWorld() - { dWorldDestroy (_id); } + dWorldTemplate() + { set_id(dWorldCreate()); } dWorldID id() const - { return _id; } + { return get_id(); } operator dWorldID() const - { return _id; } + { return get_id(); } void setGravity (dReal x, dReal y, dReal z) - { dWorldSetGravity (_id,x,y,z); } + { dWorldSetGravity (get_id(), x, y, z); } void setGravity (const dVector3 g) { setGravity (g[0], g[1], g[2]); } void getGravity (dVector3 g) const - { dWorldGetGravity (_id,g); } + { dWorldGetGravity (get_id(), g); } void setERP (dReal erp) - { dWorldSetERP(_id, erp); } + { dWorldSetERP(get_id(), erp); } dReal getERP() const - { return dWorldGetERP(_id); } + { return dWorldGetERP(get_id()); } void setCFM (dReal cfm) - { dWorldSetCFM(_id, cfm); } + { dWorldSetCFM(get_id(), cfm); } dReal getCFM() const - { return dWorldGetCFM(_id); } + { return dWorldGetCFM(get_id()); } void step (dReal stepsize) - { dWorldStep (_id,stepsize); } - - void stepFast1 (dReal stepsize, int maxiterations) - { dWorldStepFast1 (_id,stepsize,maxiterations); } - void setAutoEnableDepthSF1(int depth) - { dWorldSetAutoEnableDepthSF1 (_id, depth); } - int getAutoEnableDepthSF1() const - { return dWorldGetAutoEnableDepthSF1 (_id); } + { dWorldStep (get_id(), stepsize); } void quickStep(dReal stepsize) - { dWorldQuickStep (_id, stepsize); } + { dWorldQuickStep (get_id(), stepsize); } void setQuickStepNumIterations(int num) - { dWorldSetQuickStepNumIterations (_id, num); } + { dWorldSetQuickStepNumIterations (get_id(), num); } int getQuickStepNumIterations() const - { return dWorldGetQuickStepNumIterations (_id); } + { return dWorldGetQuickStepNumIterations (get_id()); } void setQuickStepW(dReal over_relaxation) - { dWorldSetQuickStepW (_id, over_relaxation); } + { dWorldSetQuickStepW (get_id(), over_relaxation); } dReal getQuickStepW() const - { return dWorldGetQuickStepW (_id); } + { return dWorldGetQuickStepW (get_id()); } void setAutoDisableLinearThreshold (dReal threshold) - { dWorldSetAutoDisableLinearThreshold (_id,threshold); } + { dWorldSetAutoDisableLinearThreshold (get_id(), threshold); } dReal getAutoDisableLinearThreshold() const - { return dWorldGetAutoDisableLinearThreshold (_id); } + { return dWorldGetAutoDisableLinearThreshold (get_id()); } void setAutoDisableAngularThreshold (dReal threshold) - { dWorldSetAutoDisableAngularThreshold (_id,threshold); } + { dWorldSetAutoDisableAngularThreshold (get_id(), threshold); } dReal getAutoDisableAngularThreshold() const - { return dWorldGetAutoDisableAngularThreshold (_id); } + { return dWorldGetAutoDisableAngularThreshold (get_id()); } void setAutoDisableSteps (int steps) - { dWorldSetAutoDisableSteps (_id,steps); } + { dWorldSetAutoDisableSteps (get_id(), steps); } int getAutoDisableSteps() const - { return dWorldGetAutoDisableSteps (_id); } + { return dWorldGetAutoDisableSteps (get_id()); } void setAutoDisableTime (dReal time) - { dWorldSetAutoDisableTime (_id,time); } + { dWorldSetAutoDisableTime (get_id(), time); } dReal getAutoDisableTime() const - { return dWorldGetAutoDisableTime (_id); } + { return dWorldGetAutoDisableTime (get_id()); } void setAutoDisableFlag (int do_auto_disable) - { dWorldSetAutoDisableFlag (_id,do_auto_disable); } + { dWorldSetAutoDisableFlag (get_id(), do_auto_disable); } int getAutoDisableFlag() const - { return dWorldGetAutoDisableFlag (_id); } + { return dWorldGetAutoDisableFlag (get_id()); } dReal getLinearDampingThreshold() const - { return dWorldGetLinearDampingThreshold(_id); } + { return dWorldGetLinearDampingThreshold(get_id()); } void setLinearDampingThreshold(dReal threshold) - { dWorldSetLinearDampingThreshold(_id, threshold); } + { dWorldSetLinearDampingThreshold(get_id(), threshold); } dReal getAngularDampingThreshold() const - { return dWorldGetAngularDampingThreshold(_id); } + { return dWorldGetAngularDampingThreshold(get_id()); } void setAngularDampingThreshold(dReal threshold) - { dWorldSetAngularDampingThreshold(_id, threshold); } + { dWorldSetAngularDampingThreshold(get_id(), threshold); } dReal getLinearDamping() const - { return dWorldGetLinearDamping(_id); } + { return dWorldGetLinearDamping(get_id()); } void setLinearDamping(dReal scale) - { dWorldSetLinearDamping(_id, scale); } + { dWorldSetLinearDamping(get_id(), scale); } dReal getAngularDamping() const - { return dWorldGetAngularDamping(_id); } + { return dWorldGetAngularDamping(get_id()); } void setAngularDamping(dReal scale) - { dWorldSetAngularDamping(_id, scale); } + { dWorldSetAngularDamping(get_id(), scale); } void setDamping(dReal linear_scale, dReal angular_scale) - { dWorldSetDamping(_id, linear_scale, angular_scale); } + { dWorldSetDamping(get_id(), linear_scale, angular_scale); } dReal getMaxAngularSpeed() const - { return dWorldGetMaxAngularSpeed(_id); } + { return dWorldGetMaxAngularSpeed(get_id()); } void setMaxAngularSpeed(dReal max_speed) - { dWorldSetMaxAngularSpeed(_id, max_speed); } + { dWorldSetMaxAngularSpeed(get_id(), max_speed); } void setContactSurfaceLayer(dReal depth) - { dWorldSetContactSurfaceLayer (_id, depth); } + { dWorldSetContactSurfaceLayer (get_id(), depth); } dReal getContactSurfaceLayer() const - { return dWorldGetContactSurfaceLayer (_id); } + { return dWorldGetContactSurfaceLayer (get_id()); } - void impulseToForce (dReal stepsize, dReal ix, dReal iy, dReal iz, + void impulseToForce (dReal stepsize, dReal ix, dReal iy, dReal iz, dVector3 force) - { dWorldImpulseToForce (_id,stepsize,ix,iy,iz,force); } + { dWorldImpulseToForce (get_id(), stepsize, ix, iy, iz, force); } }; -class dBody { - dBodyID _id; +class dBodySimpleIDContainer { +protected: + dBodyID _id; + + dBodySimpleIDContainer(): _id(0) {} + ~dBodySimpleIDContainer() { destroy(); } + + void destroy() { + if (_id) { + dBodyDestroy(_id); + _id = 0; + } + } +}; + +class dBodyDynamicIDContainer: public dBodySimpleIDContainer { +protected: + virtual ~dBodyDynamicIDContainer() {} +}; + +template +class dBodyTemplate: public dBodyTemplateBase { // intentionally undefined, don't use these - dBody (const dBody &); - void operator= (const dBody &); + dBodyTemplate (const dBodyTemplate &); + void operator= (const dBodyTemplate &); + +protected: + dBodyID get_id() const { return dBodyTemplateBase::_id; } + void set_id(dBodyID value) { dBodyTemplateBase::_id = value; } + + void destroy() { dBodyTemplateBase::destroy(); } public: - dBody() - { _id = 0; } - dBody (dWorldID world) - { _id = dBodyCreate (world); } - dBody (dWorld& world) - { _id = dBodyCreate (world.id()); } - ~dBody() - { if (_id) dBodyDestroy (_id); } + dBodyTemplate() + { } + dBodyTemplate (dWorldID world) + { set_id(dBodyCreate(world)); } + dBodyTemplate (dWorldTemplate& world) + { set_id(dBodyCreate(world.id())); } void create (dWorldID world) { - if (_id) dBodyDestroy (_id); - _id = dBodyCreate (world); + destroy(); + set_id(dBodyCreate(world)); } - void create (dWorld& world) { + void create (dWorldTemplate& world) { create(world.id()); } dBodyID id() const - { return _id; } + { return get_id(); } operator dBodyID() const - { return _id; } + { return get_id(); } void setData (void *data) - { dBodySetData (_id,data); } + { dBodySetData (get_id(), data); } void *getData() const - { return dBodyGetData (_id); } + { return dBodyGetData (get_id()); } void setPosition (dReal x, dReal y, dReal z) - { dBodySetPosition (_id,x,y,z); } + { dBodySetPosition (get_id(), x, y, z); } void setPosition (const dVector3 p) { setPosition(p[0], p[1], p[2]); } void setRotation (const dMatrix3 R) - { dBodySetRotation (_id,R); } + { dBodySetRotation (get_id(), R); } void setQuaternion (const dQuaternion q) - { dBodySetQuaternion (_id,q); } + { dBodySetQuaternion (get_id(), q); } void setLinearVel (dReal x, dReal y, dReal z) - { dBodySetLinearVel (_id,x,y,z); } + { dBodySetLinearVel (get_id(), x, y, z); } void setLinearVel (const dVector3 v) { setLinearVel(v[0], v[1], v[2]); } void setAngularVel (dReal x, dReal y, dReal z) - { dBodySetAngularVel (_id,x,y,z); } + { dBodySetAngularVel (get_id(), x, y, z); } void setAngularVel (const dVector3 v) { setAngularVel (v[0], v[1], v[2]); } const dReal * getPosition() const - { return dBodyGetPosition (_id); } + { return dBodyGetPosition (get_id()); } const dReal * getRotation() const - { return dBodyGetRotation (_id); } + { return dBodyGetRotation (get_id()); } const dReal * getQuaternion() const - { return dBodyGetQuaternion (_id); } + { return dBodyGetQuaternion (get_id()); } const dReal * getLinearVel() const - { return dBodyGetLinearVel (_id); } + { return dBodyGetLinearVel (get_id()); } const dReal * getAngularVel() const - { return dBodyGetAngularVel (_id); } + { return dBodyGetAngularVel (get_id()); } void setMass (const dMass *mass) - { dBodySetMass (_id,mass); } + { dBodySetMass (get_id(), mass); } void setMass (const dMass &mass) { setMass (&mass); } dMass getMass () const - { dMass mass; dBodyGetMass (_id,&mass); return mass; } + { dMass mass; dBodyGetMass (get_id(), &mass); return mass; } void addForce (dReal fx, dReal fy, dReal fz) - { dBodyAddForce (_id, fx, fy, fz); } + { dBodyAddForce (get_id(), fx, fy, fz); } void addForce (const dVector3 f) { addForce (f[0], f[1], f[2]); } void addTorque (dReal fx, dReal fy, dReal fz) - { dBodyAddTorque (_id, fx, fy, fz); } + { dBodyAddTorque (get_id(), fx, fy, fz); } void addTorque (const dVector3 t) { addTorque(t[0], t[1], t[2]); } void addRelForce (dReal fx, dReal fy, dReal fz) - { dBodyAddRelForce (_id, fx, fy, fz); } + { dBodyAddRelForce (get_id(), fx, fy, fz); } void addRelForce (const dVector3 f) { addRelForce (f[0], f[1], f[2]); } void addRelTorque (dReal fx, dReal fy, dReal fz) - { dBodyAddRelTorque (_id, fx, fy, fz); } + { dBodyAddRelTorque (get_id(), fx, fy, fz); } void addRelTorque (const dVector3 t) { addRelTorque (t[0], t[1], t[2]); } - void addForceAtPos (dReal fx, dReal fy, dReal fz, + void addForceAtPos (dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) - { dBodyAddForceAtPos (_id, fx, fy, fz, px, py, pz); } + { dBodyAddForceAtPos (get_id(), fx, fy, fz, px, py, pz); } void addForceAtPos (const dVector3 f, const dVector3 p) { addForceAtPos (f[0], f[1], f[2], p[0], p[1], p[2]); } - void addForceAtRelPos (dReal fx, dReal fy, dReal fz, + void addForceAtRelPos (dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) - { dBodyAddForceAtRelPos (_id, fx, fy, fz, px, py, pz); } + { dBodyAddForceAtRelPos (get_id(), fx, fy, fz, px, py, pz); } void addForceAtRelPos (const dVector3 f, const dVector3 p) { addForceAtRelPos (f[0], f[1], f[2], p[0], p[1], p[2]); } - void addRelForceAtPos (dReal fx, dReal fy, dReal fz, + void addRelForceAtPos (dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) - { dBodyAddRelForceAtPos (_id, fx, fy, fz, px, py, pz); } + { dBodyAddRelForceAtPos (get_id(), fx, fy, fz, px, py, pz); } void addRelForceAtPos (const dVector3 f, const dVector3 p) { addRelForceAtPos (f[0], f[1], f[2], p[0], p[1], p[2]); } - void addRelForceAtRelPos (dReal fx, dReal fy, dReal fz, + void addRelForceAtRelPos (dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz) - { dBodyAddRelForceAtRelPos (_id, fx, fy, fz, px, py, pz); } + { dBodyAddRelForceAtRelPos (get_id(), fx, fy, fz, px, py, pz); } void addRelForceAtRelPos (const dVector3 f, const dVector3 p) { addRelForceAtRelPos (f[0], f[1], f[2], p[0], p[1], p[2]); } const dReal * getForce() const - { return dBodyGetForce(_id); } + { return dBodyGetForce(get_id()); } const dReal * getTorque() const - { return dBodyGetTorque(_id); } + { return dBodyGetTorque(get_id()); } void setForce (dReal x, dReal y, dReal z) - { dBodySetForce (_id,x,y,z); } + { dBodySetForce (get_id(), x, y, z); } void setForce (const dVector3 f) { setForce (f[0], f[1], f[2]); } void setTorque (dReal x, dReal y, dReal z) - { dBodySetTorque (_id,x,y,z); } + { dBodySetTorque (get_id(), x, y, z); } void setTorque (const dVector3 t) { setTorque (t[0], t[1], t[2]); } void setDynamic() - { dBodySetDynamic (_id); } + { dBodySetDynamic (get_id()); } void setKinematic() - { dBodySetKinematic (_id); } + { dBodySetKinematic (get_id()); } bool isKinematic() const - { return dBodyIsKinematic (_id) != 0; } + { return dBodyIsKinematic (get_id()) != 0; } void enable() - { dBodyEnable (_id); } + { dBodyEnable (get_id()); } void disable() - { dBodyDisable (_id); } + { dBodyDisable (get_id()); } bool isEnabled() const - { return dBodyIsEnabled (_id) != 0; } + { return dBodyIsEnabled (get_id()) != 0; } void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetRelPointPos (_id, px, py, pz, result); } + { dBodyGetRelPointPos (get_id(), px, py, pz, result); } void getRelPointPos (const dVector3 p, dVector3 result) const { getRelPointPos (p[0], p[1], p[2], result); } void getRelPointVel (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetRelPointVel (_id, px, py, pz, result); } + { dBodyGetRelPointVel (get_id(), px, py, pz, result); } void getRelPointVel (const dVector3 p, dVector3 result) const { getRelPointVel (p[0], p[1], p[2], result); } void getPointVel (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetPointVel (_id, px, py, pz, result); } + { dBodyGetPointVel (get_id(), px, py, pz, result); } void getPointVel (const dVector3 p, dVector3 result) const { getPointVel (p[0], p[1], p[2], result); } void getPosRelPoint (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetPosRelPoint (_id, px, py, pz, result); } + { dBodyGetPosRelPoint (get_id(), px, py, pz, result); } void getPosRelPoint (const dVector3 p, dVector3 result) const { getPosRelPoint (p[0], p[1], p[2], result); } void vectorToWorld (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyVectorToWorld (_id, px, py, pz, result); } + { dBodyVectorToWorld (get_id(), px, py, pz, result); } void vectorToWorld (const dVector3 p, dVector3 result) const { vectorToWorld (p[0], p[1], p[2], result); } void vectorFromWorld (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyVectorFromWorld (_id,px,py,pz,result); } + { dBodyVectorFromWorld (get_id(), px, py, pz, result); } void vectorFromWorld (const dVector3 p, dVector3 result) const { vectorFromWorld (p[0], p[1], p[2], result); } void setFiniteRotationMode (bool mode) - { dBodySetFiniteRotationMode (_id, mode); } + { dBodySetFiniteRotationMode (get_id(), mode); } void setFiniteRotationAxis (dReal x, dReal y, dReal z) - { dBodySetFiniteRotationAxis (_id, x, y, z); } + { dBodySetFiniteRotationAxis (get_id(), x, y, z); } void setFiniteRotationAxis (const dVector3 a) { setFiniteRotationAxis (a[0], a[1], a[2]); } bool getFiniteRotationMode() const - { return dBodyGetFiniteRotationMode (_id) != 0; } + { return dBodyGetFiniteRotationMode (get_id()) != 0; } void getFiniteRotationAxis (dVector3 result) const - { dBodyGetFiniteRotationAxis (_id, result); } + { dBodyGetFiniteRotationAxis (get_id(), result); } int getNumJoints() const - { return dBodyGetNumJoints (_id); } + { return dBodyGetNumJoints (get_id()); } dJointID getJoint (int index) const - { return dBodyGetJoint (_id, index); } + { return dBodyGetJoint (get_id(), index); } void setGravityMode (bool mode) - { dBodySetGravityMode (_id,mode); } + { dBodySetGravityMode (get_id(), mode); } bool getGravityMode() const - { return dBodyGetGravityMode (_id) != 0; } + { return dBodyGetGravityMode (get_id()) != 0; } bool isConnectedTo (dBodyID body) const - { return dAreConnected (_id, body) != 0; } + { return dAreConnected (get_id(), body) != 0; } void setAutoDisableLinearThreshold (dReal threshold) - { dBodySetAutoDisableLinearThreshold (_id,threshold); } + { dBodySetAutoDisableLinearThreshold (get_id(), threshold); } dReal getAutoDisableLinearThreshold() const - { return dBodyGetAutoDisableLinearThreshold (_id); } + { return dBodyGetAutoDisableLinearThreshold (get_id()); } void setAutoDisableAngularThreshold (dReal threshold) - { dBodySetAutoDisableAngularThreshold (_id,threshold); } + { dBodySetAutoDisableAngularThreshold (get_id(), threshold); } dReal getAutoDisableAngularThreshold() const - { return dBodyGetAutoDisableAngularThreshold (_id); } + { return dBodyGetAutoDisableAngularThreshold (get_id()); } void setAutoDisableSteps (int steps) - { dBodySetAutoDisableSteps (_id,steps); } + { dBodySetAutoDisableSteps (get_id(), steps); } int getAutoDisableSteps() const - { return dBodyGetAutoDisableSteps (_id); } + { return dBodyGetAutoDisableSteps (get_id()); } void setAutoDisableTime (dReal time) - { dBodySetAutoDisableTime (_id,time); } + { dBodySetAutoDisableTime (get_id(), time); } dReal getAutoDisableTime() const - { return dBodyGetAutoDisableTime (_id); } + { return dBodyGetAutoDisableTime (get_id()); } void setAutoDisableFlag (bool do_auto_disable) - { dBodySetAutoDisableFlag (_id,do_auto_disable); } + { dBodySetAutoDisableFlag (get_id(), do_auto_disable); } bool getAutoDisableFlag() const - { return dBodyGetAutoDisableFlag (_id) != 0; } + { return dBodyGetAutoDisableFlag (get_id()) != 0; } dReal getLinearDamping() const - { return dBodyGetLinearDamping(_id); } + { return dBodyGetLinearDamping(get_id()); } void setLinearDamping(dReal scale) - { dBodySetLinearDamping(_id, scale); } + { dBodySetLinearDamping(get_id(), scale); } dReal getAngularDamping() const - { return dBodyGetAngularDamping(_id); } + { return dBodyGetAngularDamping(get_id()); } void setAngularDamping(dReal scale) - { dBodySetAngularDamping(_id, scale); } + { dBodySetAngularDamping(get_id(), scale); } void setDamping(dReal linear_scale, dReal angular_scale) - { dBodySetDamping(_id, linear_scale, angular_scale); } + { dBodySetDamping(get_id(), linear_scale, angular_scale); } dReal getLinearDampingThreshold() const - { return dBodyGetLinearDampingThreshold(_id); } + { return dBodyGetLinearDampingThreshold(get_id()); } void setLinearDampingThreshold(dReal threshold) const - { dBodySetLinearDampingThreshold(_id, threshold); } + { dBodySetLinearDampingThreshold(get_id(), threshold); } dReal getAngularDampingThreshold() const - { return dBodyGetAngularDampingThreshold(_id); } + { return dBodyGetAngularDampingThreshold(get_id()); } void setAngularDampingThreshold(dReal threshold) - { dBodySetAngularDampingThreshold(_id, threshold); } + { dBodySetAngularDampingThreshold(get_id(), threshold); } void setDampingDefaults() - { dBodySetDampingDefaults(_id); } + { dBodySetDampingDefaults(get_id()); } dReal getMaxAngularSpeed() const - { return dBodyGetMaxAngularSpeed(_id); } + { return dBodyGetMaxAngularSpeed(get_id()); } void setMaxAngularSpeed(dReal max_speed) - { dBodySetMaxAngularSpeed(_id, max_speed); } + { dBodySetMaxAngularSpeed(get_id(), max_speed); } bool getGyroscopicMode() const - { return dBodyGetGyroscopicMode(_id) != 0; } + { return dBodyGetGyroscopicMode(get_id()) != 0; } void setGyroscopicMode(bool mode) - { dBodySetGyroscopicMode(_id, mode); } + { dBodySetGyroscopicMode(get_id(), mode); } }; -class dJointGroup { - dJointGroupID _id; +class dJointGroupSimpleIDContainer { +protected: + dJointGroupID _id; + + dJointGroupSimpleIDContainer(): _id(0) {} + ~dJointGroupSimpleIDContainer() { destroy(); } + void destroy() { + if (_id) { + dJointGroupDestroy(_id); + _id = 0; + } + } +}; + +class dJointGroupDynamicIDContainer: public dJointGroupSimpleIDContainer { +protected: + virtual ~dJointGroupDynamicIDContainer() {} +}; + +template +class dJointGroupTemplate: public dJointGroupTemplateBase { // intentionally undefined, don't use these - dJointGroup (const dJointGroup &); - void operator= (const dJointGroup &); + dJointGroupTemplate (const dJointGroupTemplate &); + void operator= (const dJointGroupTemplate &); + +protected: + dJointGroupID get_id() const { return dJointGroupTemplateBase::_id; } + void set_id(dJointGroupID value) { dJointGroupTemplateBase::_id = value; } + + void destroy() { dJointGroupTemplateBase::destroy(); } public: - dJointGroup () - { _id = dJointGroupCreate (0); } - ~dJointGroup() - { dJointGroupDestroy (_id); } + dJointGroupTemplate () + { set_id(dJointGroupCreate(0)); } + void create () { - if (_id) dJointGroupDestroy (_id); - _id = dJointGroupCreate (0); + destroy(); + set_id(dJointGroupCreate(0)); } dJointGroupID id() const - { return _id; } + { return get_id(); } operator dJointGroupID() const - { return _id; } + { return get_id(); } void empty() - { dJointGroupEmpty (_id); } + { dJointGroupEmpty (get_id()); } void clear() { empty(); } }; -class dJoint { +class dJointSimpleIDContainer { +protected: + dJointID _id; + + dJointSimpleIDContainer(): _id(0) {} + ~dJointSimpleIDContainer() { destroy(); } + + void destroy() { + if (_id) { + dJointDestroy (_id); + _id = 0; + } + } +}; + +class dJointDynamicIDContainer: public dJointSimpleIDContainer { +protected: + virtual ~dJointDynamicIDContainer() {} +}; + +template +class dJointTemplate: public dJointTemplateBase { private: // intentionally undefined, don't use these - dJoint (const dJoint &) ; - void operator= (const dJoint &); + dJointTemplate (const dJointTemplate &) ; + void operator= (const dJointTemplate &); protected: - dJointID _id; + dJointID get_id() const { return dJointTemplateBase::_id; } + void set_id(dJointID value) { dJointTemplateBase::_id = value; } - dJoint() // don't let user construct pure dJoint objects - { _id = 0; } + void destroy() { dJointTemplateBase::destroy(); } -public: - virtual ~dJoint() // :( Destructor must be virtual to suppress compiler warning "class XXX has virtual functions but non-virtual destructor" - { if (_id) dJointDestroy (_id); } +protected: + dJointTemplate() // don't let user construct pure dJointTemplate objects + { } +public: dJointID id() const - { return _id; } + { return get_id(); } operator dJointID() const - { return _id; } + { return get_id(); } int getNumBodies() const - { return dJointGetNumBodies(_id); } + { return dJointGetNumBodies(get_id()); } void attach (dBodyID body1, dBodyID body2) - { dJointAttach (_id, body1, body2); } - void attach (dBody& body1, dBody& body2) + { dJointAttach (get_id(), body1, body2); } + void attach (dBodyTemplate& body1, dBodyTemplate& body2) { attach(body1.id(), body2.id()); } void enable() - { dJointEnable (_id); } + { dJointEnable (get_id()); } void disable() - { dJointDisable (_id); } + { dJointDisable (get_id()); } bool isEnabled() const - { return dJointIsEnabled (_id) != 0; } + { return dJointIsEnabled (get_id()) != 0; } void setData (void *data) - { dJointSetData (_id, data); } + { dJointSetData (get_id(), data); } void *getData() const - { return dJointGetData (_id); } + { return dJointGetData (get_id()); } dJointType getType() const - { return dJointGetType (_id); } + { return dJointGetType (get_id()); } dBodyID getBody (int index) const - { return dJointGetBody (_id, index); } + { return dJointGetBody (get_id(), index); } void setFeedback(dJointFeedback *fb) - { dJointSetFeedback(_id, fb); } + { dJointSetFeedback(get_id(), fb); } dJointFeedback *getFeedback() const - { return dJointGetFeedback(_id); } + { return dJointGetFeedback(get_id()); } // If not implemented it will do nothing as describe in the doc virtual void setParam (int, dReal) {}; @@ -481,382 +566,453 @@ }; -class dBallJoint : public dJoint { +template +class dBallJointTemplate : public dJointTemplate { private: // intentionally undefined, don't use these - dBallJoint (const dBallJoint &); - void operator= (const dBallJoint &); + dBallJointTemplate (const dBallJointTemplate &); + void operator= (const dBallJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dBallJoint() { } - dBallJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateBall (world, group); } - dBallJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreateBall (world.id(), group); } + dBallJointTemplate() { } + dBallJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreateBall(world, group)); } + dBallJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreateBall(world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateBall (world, group); + destroy(); + set_id(dJointCreateBall(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setAnchor (dReal x, dReal y, dReal z) - { dJointSetBallAnchor (_id, x, y, z); } + { dJointSetBallAnchor (get_id(), x, y, z); } void setAnchor (const dVector3 a) { setAnchor (a[0], a[1], a[2]); } void getAnchor (dVector3 result) const - { dJointGetBallAnchor (_id, result); } + { dJointGetBallAnchor (get_id(), result); } void getAnchor2 (dVector3 result) const - { dJointGetBallAnchor2 (_id, result); } + { dJointGetBallAnchor2 (get_id(), result); } virtual void setParam (int parameter, dReal value) - { dJointSetBallParam (_id, parameter, value); } + { dJointSetBallParam (get_id(), parameter, value); } virtual dReal getParam (int parameter) const - { return dJointGetBallParam (_id, parameter); } + { return dJointGetBallParam (get_id(), parameter); } // TODO: expose params through methods } ; -class dHingeJoint : public dJoint { +template +class dHingeJointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dHingeJoint (const dHingeJoint &); - void operator = (const dHingeJoint &); + dHingeJointTemplate (const dHingeJointTemplate &); + void operator = (const dHingeJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dHingeJoint() { } - dHingeJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateHinge (world, group); } - dHingeJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreateHinge (world.id(), group); } + dHingeJointTemplate() { } + dHingeJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreateHinge(world, group)); } + dHingeJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreateHinge(world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateHinge (world, group); + destroy(); + set_id(dJointCreateHinge (world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setAnchor (dReal x, dReal y, dReal z) - { dJointSetHingeAnchor (_id, x, y, z); } + { dJointSetHingeAnchor (get_id(), x, y, z); } void setAnchor (const dVector3 a) { setAnchor (a[0], a[1], a[2]); } void getAnchor (dVector3 result) const - { dJointGetHingeAnchor (_id, result); } + { dJointGetHingeAnchor (get_id(), result); } void getAnchor2 (dVector3 result) const - { dJointGetHingeAnchor2 (_id, result); } + { dJointGetHingeAnchor2 (get_id(), result); } void setAxis (dReal x, dReal y, dReal z) - { dJointSetHingeAxis (_id, x, y, z); } + { dJointSetHingeAxis (get_id(), x, y, z); } void setAxis (const dVector3 a) { setAxis(a[0], a[1], a[2]); } void getAxis (dVector3 result) const - { dJointGetHingeAxis (_id, result); } + { dJointGetHingeAxis (get_id(), result); } dReal getAngle() const - { return dJointGetHingeAngle (_id); } + { return dJointGetHingeAngle (get_id()); } dReal getAngleRate() const - { return dJointGetHingeAngleRate (_id); } + { return dJointGetHingeAngleRate (get_id()); } virtual void setParam (int parameter, dReal value) - { dJointSetHingeParam (_id, parameter, value); } + { dJointSetHingeParam (get_id(), parameter, value); } virtual dReal getParam (int parameter) const - { return dJointGetHingeParam (_id, parameter); } + { return dJointGetHingeParam (get_id(), parameter); } // TODO: expose params through methods void addTorque (dReal torque) - { dJointAddHingeTorque(_id, torque); } + { dJointAddHingeTorque(get_id(), torque); } }; -class dSliderJoint : public dJoint { +template +class dSliderJointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dSliderJoint (const dSliderJoint &); - void operator = (const dSliderJoint &); + dSliderJointTemplate (const dSliderJointTemplate &); + void operator = (const dSliderJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dSliderJoint() { } - dSliderJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateSlider (world, group); } - dSliderJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreateSlider (world.id(), group); } + dSliderJointTemplate() { } + dSliderJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreateSlider(world, group)); } + dSliderJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreateSlider(world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateSlider (world, group); + destroy(); + set_id(dJointCreateSlider(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setAxis (dReal x, dReal y, dReal z) - { dJointSetSliderAxis (_id, x, y, z); } + { dJointSetSliderAxis (get_id(), x, y, z); } void setAxis (const dVector3 a) { setAxis (a[0], a[1], a[2]); } void getAxis (dVector3 result) const - { dJointGetSliderAxis (_id, result); } + { dJointGetSliderAxis (get_id(), result); } dReal getPosition() const - { return dJointGetSliderPosition (_id); } + { return dJointGetSliderPosition (get_id()); } dReal getPositionRate() const - { return dJointGetSliderPositionRate (_id); } + { return dJointGetSliderPositionRate (get_id()); } virtual void setParam (int parameter, dReal value) - { dJointSetSliderParam (_id, parameter, value); } + { dJointSetSliderParam (get_id(), parameter, value); } virtual dReal getParam (int parameter) const - { return dJointGetSliderParam (_id, parameter); } + { return dJointGetSliderParam (get_id(), parameter); } // TODO: expose params through methods void addForce (dReal force) - { dJointAddSliderForce(_id, force); } + { dJointAddSliderForce(get_id(), force); } }; -class dUniversalJoint : public dJoint { +template +class dUniversalJointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dUniversalJoint (const dUniversalJoint &); - void operator = (const dUniversalJoint &); + dUniversalJointTemplate (const dUniversalJointTemplate &); + void operator = (const dUniversalJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dUniversalJoint() { } - dUniversalJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateUniversal (world, group); } - dUniversalJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreateUniversal (world.id(), group); } + dUniversalJointTemplate() { } + dUniversalJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreateUniversal(world, group)); } + dUniversalJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreateUniversal(world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateUniversal (world, group); + destroy(); + set_id(dJointCreateUniversal(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setAnchor (dReal x, dReal y, dReal z) - { dJointSetUniversalAnchor (_id, x, y, z); } + { dJointSetUniversalAnchor (get_id(), x, y, z); } void setAnchor (const dVector3 a) { setAnchor(a[0], a[1], a[2]); } void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetUniversalAxis1 (_id, x, y, z); } + { dJointSetUniversalAxis1 (get_id(), x, y, z); } void setAxis1 (const dVector3 a) { setAxis1 (a[0], a[1], a[2]); } void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetUniversalAxis2 (_id, x, y, z); } + { dJointSetUniversalAxis2 (get_id(), x, y, z); } void setAxis2 (const dVector3 a) { setAxis2 (a[0], a[1], a[2]); } void getAnchor (dVector3 result) const - { dJointGetUniversalAnchor (_id, result); } + { dJointGetUniversalAnchor (get_id(), result); } void getAnchor2 (dVector3 result) const - { dJointGetUniversalAnchor2 (_id, result); } + { dJointGetUniversalAnchor2 (get_id(), result); } void getAxis1 (dVector3 result) const - { dJointGetUniversalAxis1 (_id, result); } + { dJointGetUniversalAxis1 (get_id(), result); } void getAxis2 (dVector3 result) const - { dJointGetUniversalAxis2 (_id, result); } + { dJointGetUniversalAxis2 (get_id(), result); } virtual void setParam (int parameter, dReal value) - { dJointSetUniversalParam (_id, parameter, value); } + { dJointSetUniversalParam (get_id(), parameter, value); } virtual dReal getParam (int parameter) const - { return dJointGetUniversalParam (_id, parameter); } + { return dJointGetUniversalParam (get_id(), parameter); } // TODO: expose params through methods void getAngles(dReal *angle1, dReal *angle2) const - { dJointGetUniversalAngles (_id, angle1, angle2); } + { dJointGetUniversalAngles (get_id(), angle1, angle2); } dReal getAngle1() const - { return dJointGetUniversalAngle1 (_id); } + { return dJointGetUniversalAngle1 (get_id()); } dReal getAngle1Rate() const - { return dJointGetUniversalAngle1Rate (_id); } + { return dJointGetUniversalAngle1Rate (get_id()); } dReal getAngle2() const - { return dJointGetUniversalAngle2 (_id); } + { return dJointGetUniversalAngle2 (get_id()); } dReal getAngle2Rate() const - { return dJointGetUniversalAngle2Rate (_id); } + { return dJointGetUniversalAngle2Rate (get_id()); } void addTorques (dReal torque1, dReal torque2) - { dJointAddUniversalTorques(_id, torque1, torque2); } + { dJointAddUniversalTorques(get_id(), torque1, torque2); } }; -class dHinge2Joint : public dJoint { +template +class dHinge2JointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dHinge2Joint (const dHinge2Joint &); - void operator = (const dHinge2Joint &); + dHinge2JointTemplate (const dHinge2JointTemplate &); + void operator = (const dHinge2JointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dHinge2Joint() { } - dHinge2Joint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateHinge2 (world, group); } - dHinge2Joint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreateHinge2 (world.id(), group); } + dHinge2JointTemplate() { } + dHinge2JointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreateHinge2(world, group)); } + dHinge2JointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreateHinge2(world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateHinge2 (world, group); + destroy(); + set_id(dJointCreateHinge2(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setAnchor (dReal x, dReal y, dReal z) - { dJointSetHinge2Anchor (_id, x, y, z); } + { dJointSetHinge2Anchor (get_id(), x, y, z); } void setAnchor (const dVector3 a) { setAnchor(a[0], a[1], a[2]); } void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetHinge2Axis1 (_id, x, y, z); } + { dJointSetHinge2Axis1 (get_id(), x, y, z); } void setAxis1 (const dVector3 a) { setAxis1 (a[0], a[1], a[2]); } void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetHinge2Axis2 (_id, x, y, z); } + { dJointSetHinge2Axis2 (get_id(), x, y, z); } void setAxis2 (const dVector3 a) { setAxis2 (a[0], a[1], a[2]); } void getAnchor (dVector3 result) const - { dJointGetHinge2Anchor (_id, result); } + { dJointGetHinge2Anchor (get_id(), result); } void getAnchor2 (dVector3 result) const - { dJointGetHinge2Anchor2 (_id, result); } + { dJointGetHinge2Anchor2 (get_id(), result); } void getAxis1 (dVector3 result) const - { dJointGetHinge2Axis1 (_id, result); } + { dJointGetHinge2Axis1 (get_id(), result); } void getAxis2 (dVector3 result) const - { dJointGetHinge2Axis2 (_id, result); } + { dJointGetHinge2Axis2 (get_id(), result); } dReal getAngle1() const - { return dJointGetHinge2Angle1 (_id); } + { return dJointGetHinge2Angle1 (get_id()); } dReal getAngle1Rate() const - { return dJointGetHinge2Angle1Rate (_id); } + { return dJointGetHinge2Angle1Rate (get_id()); } dReal getAngle2Rate() const - { return dJointGetHinge2Angle2Rate (_id); } + { return dJointGetHinge2Angle2Rate (get_id()); } virtual void setParam (int parameter, dReal value) - { dJointSetHinge2Param (_id, parameter, value); } + { dJointSetHinge2Param (get_id(), parameter, value); } virtual dReal getParam (int parameter) const - { return dJointGetHinge2Param (_id, parameter); } + { return dJointGetHinge2Param (get_id(), parameter); } // TODO: expose params through methods void addTorques(dReal torque1, dReal torque2) - { dJointAddHinge2Torques(_id, torque1, torque2); } + { dJointAddHinge2Torques(get_id(), torque1, torque2); } }; -class dPRJoint : public dJoint { - dPRJoint (const dPRJoint &); - void operator = (const dPRJoint &); +template +class dPRJointTemplate : public dJointTemplate { +private: + // intentionally undefined, don't use these + dPRJointTemplate (const dPRJointTemplate &); + void operator = (const dPRJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dPRJoint() { } - dPRJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreatePR (world, group); } - dPRJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreatePR (world.id(), group); } + dPRJointTemplate() { } + dPRJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreatePR(world, group)); } + dPRJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreatePR(world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreatePR (world, group); + destroy(); + set_id(dJointCreatePR(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setAnchor (dReal x, dReal y, dReal z) - { dJointSetPRAnchor (_id, x, y, z); } + { dJointSetPRAnchor (get_id(), x, y, z); } void setAnchor (const dVector3 a) { setAnchor (a[0], a[1], a[2]); } void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetPRAxis1 (_id, x, y, z); } + { dJointSetPRAxis1 (get_id(), x, y, z); } void setAxis1 (const dVector3 a) { setAxis1(a[0], a[1], a[2]); } void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetPRAxis2 (_id, x, y, z); } + { dJointSetPRAxis2 (get_id(), x, y, z); } void setAxis2 (const dVector3 a) { setAxis2(a[0], a[1], a[2]); } void getAnchor (dVector3 result) const - { dJointGetPRAnchor (_id, result); } + { dJointGetPRAnchor (get_id(), result); } void getAxis1 (dVector3 result) const - { dJointGetPRAxis1 (_id, result); } + { dJointGetPRAxis1 (get_id(), result); } void getAxis2 (dVector3 result) const - { dJointGetPRAxis2 (_id, result); } + { dJointGetPRAxis2 (get_id(), result); } dReal getPosition() const - { return dJointGetPRPosition (_id); } + { return dJointGetPRPosition (get_id()); } dReal getPositionRate() const - { return dJointGetPRPositionRate (_id); } + { return dJointGetPRPositionRate (get_id()); } dReal getAngle() const - { return dJointGetPRAngle (_id); } + { return dJointGetPRAngle (get_id()); } dReal getAngleRate() const - { return dJointGetPRAngleRate (_id); } + { return dJointGetPRAngleRate (get_id()); } virtual void setParam (int parameter, dReal value) - { dJointSetPRParam (_id, parameter, value); } + { dJointSetPRParam (get_id(), parameter, value); } virtual dReal getParam (int parameter) const - { return dJointGetPRParam (_id, parameter); } + { return dJointGetPRParam (get_id(), parameter); } }; -class dPUJoint : public dJoint +template +class dPUJointTemplate : public dJointTemplate { - dPUJoint (const dPUJoint &); - void operator = (const dPUJoint &); +private: + // intentionally undefined, don't use these + dPUJointTemplate (const dPUJointTemplate &); + void operator = (const dPUJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dPUJoint() { } - dPUJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreatePU (world, group); } - dPUJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreatePU (world.id(), group); } + dPUJointTemplate() { } + dPUJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreatePU(world, group)); } + dPUJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreatePU(world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreatePU (world, group); + destroy(); + set_id(dJointCreatePU(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setAnchor (dReal x, dReal y, dReal z) - { dJointSetPUAnchor (_id, x, y, z); } + { dJointSetPUAnchor (get_id(), x, y, z); } void setAnchor (const dVector3 a) { setAnchor (a[0], a[1], a[2]); } void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetPUAxis1 (_id, x, y, z); } + { dJointSetPUAxis1 (get_id(), x, y, z); } void setAxis1 (const dVector3 a) { setAxis1(a[0], a[1], a[2]); } void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetPUAxis2 (_id, x, y, z); } + { dJointSetPUAxis2 (get_id(), x, y, z); } void setAxis3 (dReal x, dReal y, dReal z) - { dJointSetPUAxis3 (_id, x, y, z); } + { dJointSetPUAxis3 (get_id(), x, y, z); } void setAxis3 (const dVector3 a) { setAxis3(a[0], a[1], a[2]); } void setAxisP (dReal x, dReal y, dReal z) - { dJointSetPUAxis3 (_id, x, y, z); } + { dJointSetPUAxis3 (get_id(), x, y, z); } void setAxisP (const dVector3 a) { setAxisP(a[0], a[1], a[2]); } virtual void getAnchor (dVector3 result) const - { dJointGetPUAnchor (_id, result); } + { dJointGetPUAnchor (get_id(), result); } void getAxis1 (dVector3 result) const - { dJointGetPUAxis1 (_id, result); } + { dJointGetPUAxis1 (get_id(), result); } void getAxis2 (dVector3 result) const - { dJointGetPUAxis2 (_id, result); } + { dJointGetPUAxis2 (get_id(), result); } void getAxis3 (dVector3 result) const - { dJointGetPUAxis3 (_id, result); } + { dJointGetPUAxis3 (get_id(), result); } void getAxisP (dVector3 result) const - { dJointGetPUAxis3 (_id, result); } + { dJointGetPUAxis3 (get_id(), result); } dReal getAngle1() const - { return dJointGetPUAngle1 (_id); } + { return dJointGetPUAngle1 (get_id()); } dReal getAngle1Rate() const - { return dJointGetPUAngle1Rate (_id); } + { return dJointGetPUAngle1Rate (get_id()); } dReal getAngle2() const - { return dJointGetPUAngle2 (_id); } + { return dJointGetPUAngle2 (get_id()); } dReal getAngle2Rate() const - { return dJointGetPUAngle2Rate (_id); } + { return dJointGetPUAngle2Rate (get_id()); } dReal getPosition() const - { return dJointGetPUPosition (_id); } + { return dJointGetPUPosition (get_id()); } dReal getPositionRate() const - { return dJointGetPUPositionRate (_id); } + { return dJointGetPUPositionRate (get_id()); } virtual void setParam (int parameter, dReal value) - { dJointSetPUParam (_id, parameter, value); } + { dJointSetPUParam (get_id(), parameter, value); } virtual dReal getParam (int parameter) const - { return dJointGetPUParam (_id, parameter); } + { return dJointGetPUParam (get_id(), parameter); } // TODO: expose params through methods }; @@ -864,231 +1020,330 @@ -class dPistonJoint : public dJoint +template +class dPistonJointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dPistonJoint (const dPistonJoint &); - void operator = (const dPistonJoint &); + dPistonJointTemplate (const dPistonJointTemplate &); + void operator = (const dPistonJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dPistonJoint() { } - dPistonJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreatePiston (world, group); } - dPistonJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreatePiston (world, group); } + dPistonJointTemplate() { } + dPistonJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreatePiston(world, group)); } + dPistonJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreatePiston(world, group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreatePiston (world, group); + destroy(); + set_id(dJointCreatePiston(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setAnchor (dReal x, dReal y, dReal z) - { dJointSetPistonAnchor (_id, x, y, z); } + { dJointSetPistonAnchor (get_id(), x, y, z); } void setAnchor (const dVector3 a) { setAnchor (a[0], a[1], a[2]); } void getAnchor (dVector3 result) const - { dJointGetPistonAnchor (_id, result); } + { dJointGetPistonAnchor (get_id(), result); } void getAnchor2 (dVector3 result) const - { dJointGetPistonAnchor2 (_id, result); } + { dJointGetPistonAnchor2 (get_id(), result); } void setAxis (dReal x, dReal y, dReal z) - { dJointSetPistonAxis (_id, x, y, z); } + { dJointSetPistonAxis (get_id(), x, y, z); } void setAxis (const dVector3 a) { setAxis(a[0], a[1], a[2]); } void getAxis (dVector3 result) const - { dJointGetPistonAxis (_id, result); } + { dJointGetPistonAxis (get_id(), result); } dReal getPosition() const - { return dJointGetPistonPosition (_id); } + { return dJointGetPistonPosition (get_id()); } dReal getPositionRate() const - { return dJointGetPistonPositionRate (_id); } + { return dJointGetPistonPositionRate (get_id()); } virtual void setParam (int parameter, dReal value) - { dJointSetPistonParam (_id, parameter, value); } + { dJointSetPistonParam (get_id(), parameter, value); } virtual dReal getParam (int parameter) const - { return dJointGetPistonParam (_id, parameter); } + { return dJointGetPistonParam (get_id(), parameter); } // TODO: expose params through methods void addForce (dReal force) - { dJointAddPistonForce (_id, force); } + { dJointAddPistonForce (get_id(), force); } }; -class dFixedJoint : public dJoint +template +class dFixedJointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dFixedJoint (const dFixedJoint &); - void operator = (const dFixedJoint &); + dFixedJointTemplate (const dFixedJointTemplate &); + void operator = (const dFixedJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dFixedJoint() { } - dFixedJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateFixed (world, group); } - dFixedJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreateFixed (world, group); } + dFixedJointTemplate() { } + dFixedJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreateFixed(world, group)); } + dFixedJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreateFixed(world, group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateFixed (world, group); + destroy(); + set_id(dJointCreateFixed(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void set() - { dJointSetFixed (_id); } + { dJointSetFixed (get_id()); } virtual void setParam (int parameter, dReal value) - { dJointSetFixedParam (_id, parameter, value); } + { dJointSetFixedParam (get_id(), parameter, value); } virtual dReal getParam (int parameter) const - { return dJointGetFixedParam (_id, parameter); } + { return dJointGetFixedParam (get_id(), parameter); } // TODO: expose params through methods }; -class dContactJoint : public dJoint { +template +class dContactJointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dContactJoint (const dContactJoint &); - void operator = (const dContactJoint &); + dContactJointTemplate (const dContactJointTemplate &); + void operator = (const dContactJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dContactJoint() { } - dContactJoint (dWorldID world, dJointGroupID group, dContact *contact) - { _id = dJointCreateContact (world, group, contact); } - dContactJoint (dWorld& world, dJointGroupID group, dContact *contact) - { _id = dJointCreateContact (world.id(), group, contact); } + dContactJointTemplate() { } + dContactJointTemplate (dWorldID world, dJointGroupID group, dContact *contact) + { set_id(dJointCreateContact(world, group, contact)); } + dContactJointTemplate (dWorldTemplate& world, dJointGroupID group, dContact *contact) + { set_id(dJointCreateContact(world.id(), group, contact)); } void create (dWorldID world, dJointGroupID group, dContact *contact) { - if (_id) dJointDestroy (_id); - _id = dJointCreateContact (world, group, contact); + destroy(); + set_id(dJointCreateContact(world, group, contact)); } - void create (dWorld& world, dJointGroupID group, dContact *contact) + void create (dWorldTemplate& world, dJointGroupID group, dContact *contact) { create(world.id(), group, contact); } }; -class dNullJoint : public dJoint { +template +class dNullJointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dNullJoint (const dNullJoint &); - void operator = (const dNullJoint &); + dNullJointTemplate (const dNullJointTemplate &); + void operator = (const dNullJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dNullJoint() { } - dNullJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateNull (world, group); } - dNullJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreateNull (world.id(), group); } + dNullJointTemplate() { } + dNullJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreateNull(world, group)); } + dNullJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreateNull (world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateNull (world, group); + destroy(); + set_id(dJointCreateNull(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } }; -class dAMotorJoint : public dJoint { +template +class dAMotorJointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dAMotorJoint (const dAMotorJoint &); - void operator = (const dAMotorJoint &); + dAMotorJointTemplate (const dAMotorJointTemplate &); + void operator = (const dAMotorJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dAMotorJoint() { } - dAMotorJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateAMotor (world, group); } - dAMotorJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreateAMotor (world.id(), group); } + dAMotorJointTemplate() { } + dAMotorJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreateAMotor(world, group)); } + dAMotorJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreateAMotor(world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateAMotor (world, group); + destroy(); + set_id(dJointCreateAMotor(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setMode (int mode) - { dJointSetAMotorMode (_id, mode); } + { dJointSetAMotorMode (get_id(), mode); } int getMode() const - { return dJointGetAMotorMode (_id); } + { return dJointGetAMotorMode (get_id()); } void setNumAxes (int num) - { dJointSetAMotorNumAxes (_id, num); } + { dJointSetAMotorNumAxes (get_id(), num); } int getNumAxes() const - { return dJointGetAMotorNumAxes (_id); } + { return dJointGetAMotorNumAxes (get_id()); } void setAxis (int anum, int rel, dReal x, dReal y, dReal z) - { dJointSetAMotorAxis (_id, anum, rel, x, y, z); } + { dJointSetAMotorAxis (get_id(), anum, rel, x, y, z); } void setAxis (int anum, int rel, const dVector3 a) { setAxis(anum, rel, a[0], a[1], a[2]); } void getAxis (int anum, dVector3 result) const - { dJointGetAMotorAxis (_id, anum, result); } + { dJointGetAMotorAxis (get_id(), anum, result); } int getAxisRel (int anum) const - { return dJointGetAMotorAxisRel (_id, anum); } + { return dJointGetAMotorAxisRel (get_id(), anum); } void setAngle (int anum, dReal angle) - { dJointSetAMotorAngle (_id, anum, angle); } + { dJointSetAMotorAngle (get_id(), anum, angle); } dReal getAngle (int anum) const - { return dJointGetAMotorAngle (_id, anum); } + { return dJointGetAMotorAngle (get_id(), anum); } dReal getAngleRate (int anum) - { return dJointGetAMotorAngleRate (_id,anum); } + { return dJointGetAMotorAngleRate (get_id(), anum); } void setParam (int parameter, dReal value) - { dJointSetAMotorParam (_id, parameter, value); } + { dJointSetAMotorParam (get_id(), parameter, value); } dReal getParam (int parameter) const - { return dJointGetAMotorParam (_id, parameter); } + { return dJointGetAMotorParam (get_id(), parameter); } // TODO: expose params through methods void addTorques(dReal torque1, dReal torque2, dReal torque3) - { dJointAddAMotorTorques(_id, torque1, torque2, torque3); } + { dJointAddAMotorTorques(get_id(), torque1, torque2, torque3); } }; -class dLMotorJoint : public dJoint { +template +class dLMotorJointTemplate : public dJointTemplate { +private: // intentionally undefined, don't use these - dLMotorJoint (const dLMotorJoint &); - void operator = (const dLMotorJoint &); + dLMotorJointTemplate (const dLMotorJointTemplate &); + void operator = (const dLMotorJointTemplate &); + +protected: + typedef dJointTemplate dBaseTemplate; + + dJointID get_id() const { return dBaseTemplate::get_id(); } + void set_id(dJointID value) { dBaseTemplate::set_id(value); } + + void destroy() { dBaseTemplate::destroy(); } public: - dLMotorJoint() { } - dLMotorJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateLMotor (world, group); } - dLMotorJoint (dWorld& world, dJointGroupID group=0) - { _id = dJointCreateLMotor (world.id(), group); } + dLMotorJointTemplate() { } + dLMotorJointTemplate (dWorldID world, dJointGroupID group=0) + { set_id(dJointCreateLMotor(world, group)); } + dLMotorJointTemplate (dWorldTemplate& world, dJointGroupID group=0) + { set_id(dJointCreateLMotor(world.id(), group)); } void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateLMotor (world, group); + destroy(); + set_id(dJointCreateLMotor(world, group)); } - void create (dWorld& world, dJointGroupID group=0) + void create (dWorldTemplate& world, dJointGroupID group=0) { create(world.id(), group); } void setNumAxes (int num) - { dJointSetLMotorNumAxes (_id, num); } + { dJointSetLMotorNumAxes (get_id(), num); } int getNumAxes() const - { return dJointGetLMotorNumAxes (_id); } + { return dJointGetLMotorNumAxes (get_id()); } void setAxis (int anum, int rel, dReal x, dReal y, dReal z) - { dJointSetLMotorAxis (_id, anum, rel, x, y, z); } + { dJointSetLMotorAxis (get_id(), anum, rel, x, y, z); } void setAxis (int anum, int rel, const dVector3 a) { setAxis(anum, rel, a[0], a[1], a[2]); } void getAxis (int anum, dVector3 result) const - { dJointGetLMotorAxis (_id, anum, result); } + { dJointGetLMotorAxis (get_id(), anum, result); } void setParam (int parameter, dReal value) - { dJointSetLMotorParam (_id, parameter, value); } + { dJointSetLMotorParam (get_id(), parameter, value); } dReal getParam (int parameter) const - { return dJointGetLMotorParam (_id, parameter); } + { return dJointGetLMotorParam (get_id(), parameter); } // TODO: expose params through methods }; //} +#if !defined(dODECPP_WORLD_TEMPLATE_BASE) + +#if defined(dODECPP_BODY_TEMPLATE_BASE) || defined(dODECPP_JOINTGROUP_TEMPLATE_BASE) || defined(dODECPP_JOINT_TEMPLATE_BASE) +#error All the odecpp template bases must be defined or not defined together +#endif + +#define dODECPP_WORLD_TEMPLATE_BASE dWorldDynamicIDContainer +#define dODECPP_BODY_TEMPLATE_BASE dBodyDynamicIDContainer +#define dODECPP_JOINTGROUP_TEMPLATE_BASE dJointGroupDynamicIDContainer +#define dODECPP_JOINT_TEMPLATE_BASE dJointDynamicIDContainer + +#else // #if defined(dODECPP_WORLD_TEMPLATE_BASE) + +#if !defined(dODECPP_BODY_TEMPLATE_BASE) || !defined(dODECPP_JOINTGROUP_TEMPLATE_BASE) || !defined(dODECPP_JOINT_TEMPLATE_BASE) +#error All the odecpp template bases must be defined or not defined together +#endif + +#endif // #if defined(dODECPP_WORLD_TEMPLATE_BASE) + + +typedef dWorldTemplate dWorld; +typedef dBodyTemplate dBody; +typedef dJointGroupTemplate dJointGroup; +typedef dJointTemplate dJoint; +typedef dBallJointTemplate dBallJoint; +typedef dHingeJointTemplate dHingeJoint; +typedef dSliderJointTemplate dSliderJoint; +typedef dUniversalJointTemplate dUniversalJoint; +typedef dHinge2JointTemplate dHinge2Joint; +typedef dPRJointTemplate dPRJoint; +typedef dPUJointTemplate dPUJoint; +typedef dPistonJointTemplate dPistonJoint; +typedef dFixedJointTemplate dFixedJoint; +typedef dContactJointTemplate dContactJoint; +typedef dNullJointTemplate dNullJoint; +typedef dAMotorJointTemplate dAMotorJoint; +typedef dLMotorJointTemplate dLMotorJoint; + + #endif #endif diff -Nru ode-0.11.1/include/ode/ode.h ode-0.14/include/ode/ode.h --- ode-0.11.1/include/ode/ode.h 2008-04-28 09:58:39.000000000 +0000 +++ ode-0.14/include/ode/ode.h 2015-12-18 14:09:27.000000000 +0000 @@ -39,10 +39,16 @@ #include #include #include -#include #include #include -#include +#include +#include #include +#include + +#ifdef __cplusplus +# include +# include +#endif #endif diff -Nru ode-0.11.1/include/ode/odeinit.h ode-0.14/include/ode/odeinit.h --- ode-0.11.1/include/ode/odeinit.h 2009-03-14 18:48:14.000000000 +0000 +++ ode-0.14/include/ode/odeinit.h 2015-12-18 14:09:27.000000000 +0000 @@ -1,24 +1,24 @@ /************************************************************************* -* * -* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * -* All rights reserved. Email: russ@q12.org Web: www.q12.org * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of EITHER: * -* (1) The GNU Lesser General Public License as published by the Free * -* Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. The text of the GNU Lesser * -* General Public License is included with this library in the * -* file LICENSE.TXT. * -* (2) The BSD-style license that is included with this library in * -* the file LICENSE-BSD.TXT. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * -* LICENSE.TXT and LICENSE-BSD.TXT for more details. * -* * -*************************************************************************/ + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ /* Library initialization/finalization functions. */ @@ -74,7 +74,7 @@ * @ingroup init */ enum dInitODEFlags { - dInitFlagManualThreadCleanup = 0x00000001, //@< Thread local data is to be cleared explicitly on @c dCleanupODEAllDataForThread function call + dInitFlagManualThreadCleanup = 0x00000001 /*@< Thread local data is to be cleared explicitly on @c dCleanupODEAllDataForThread function call*/ }; /** @@ -144,11 +144,11 @@ * @ingroup init */ enum dAllocateODEDataFlags { - dAllocateFlagBasicData = 0, //@< Allocate basic data required for library to operate + dAllocateFlagBasicData = 0, /*@< Allocate basic data required for library to operate*/ - dAllocateFlagCollisionData = 0x00000001, //@< Allocate data for collision detection + dAllocateFlagCollisionData = 0x00000001, /*@< Allocate data for collision detection*/ - dAllocateMaskAll = ~0U, //@< Allocate all the possible data that is currently defined or will be defined in the future. + dAllocateMaskAll = ~0 /*@< Allocate all the possible data that is currently defined or will be defined in the future.*/ }; /** @@ -228,11 +228,9 @@ - - #ifdef __cplusplus -}; // extern "C" +} /* extern "C" */ #endif -#endif // _ODE_ODEINIT_H_ +#endif /* _ODE_ODEINIT_H_ */ diff -Nru ode-0.11.1/include/ode/odemath.h ode-0.14/include/ode/odemath.h --- ode-0.11.1/include/ode/odemath.h 2009-02-02 15:06:45.000000000 +0000 +++ ode-0.14/include/ode/odemath.h 2015-12-18 14:09:27.000000000 +0000 @@ -25,12 +25,6 @@ #include -#ifdef __GNUC__ -#define PURE_INLINE extern inline -#else -#define PURE_INLINE inline -#endif - /* * macro to access elements i,j in an NxM matrix A, independent of the * matrix storage convention. @@ -47,122 +41,183 @@ -/* - * General purpose vector operations with other vectors or constants. - */ +/* Some vector math */ +ODE_PURE_INLINE void dAddVectors3(dReal *res, const dReal *a, const dReal *b) +{ + const dReal res_0 = a[0] + b[0]; + const dReal res_1 = a[1] + b[1]; + const dReal res_2 = a[2] + b[2]; + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} -#define dOP(a,op,b,c) do { \ - (a)[0] = ((b)[0]) op ((c)[0]); \ - (a)[1] = ((b)[1]) op ((c)[1]); \ - (a)[2] = ((b)[2]) op ((c)[2]); \ - } while (0) -#define dOPC(a,op,b,c) do { \ - (a)[0] = ((b)[0]) op (c); \ - (a)[1] = ((b)[1]) op (c); \ - (a)[2] = ((b)[2]) op (c); \ - } while (0) -#define dOPE(a,op,b) do {\ - (a)[0] op ((b)[0]); \ - (a)[1] op ((b)[1]); \ - (a)[2] op ((b)[2]); \ - } while (0) -#define dOPEC(a,op,c) do { \ - (a)[0] op (c); \ - (a)[1] op (c); \ - (a)[2] op (c); \ - } while (0) - -/// Define an equation with operatos -/// For example this function can be used to replace -///
-/// for (int i=0; i<3; ++i)
-///   a[i] += b[i] + c[i];
-/// 
-#define dOPE2(a,op1,b,op2,c) do { \ - (a)[0] op1 ((b)[0]) op2 ((c)[0]); \ - (a)[1] op1 ((b)[1]) op2 ((c)[1]); \ - (a)[2] op1 ((b)[2]) op2 ((c)[2]); \ - } while (0) +ODE_PURE_INLINE void dSubtractVectors3(dReal *res, const dReal *a, const dReal *b) +{ + const dReal res_0 = a[0] - b[0]; + const dReal res_1 = a[1] - b[1]; + const dReal res_2 = a[2] - b[2]; + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} -/* - * Length, and squared length helpers. dLENGTH returns the length of a dVector3. - * dLENGTHSQUARED return the squared length of a dVector3. - */ +ODE_PURE_INLINE void dAddScaledVectors3(dReal *res, const dReal *a, const dReal *b, dReal a_scale, dReal b_scale) +{ + const dReal res_0 = a_scale * a[0] + b_scale * b[0]; + const dReal res_1 = a_scale * a[1] + b_scale * b[1]; + const dReal res_2 = a_scale * a[2] + b_scale * b[2]; + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} -#define dLENGTHSQUARED(a) (((a)[0])*((a)[0]) + ((a)[1])*((a)[1]) + ((a)[2])*((a)[2])) +ODE_PURE_INLINE void dScaleVector3(dReal *res, dReal nScale) +{ + res[0] *= nScale ; + res[1] *= nScale ; + res[2] *= nScale ; +} -#ifdef __cplusplus +ODE_PURE_INLINE void dNegateVector3(dReal *res) +{ + res[0] = -res[0]; + res[1] = -res[1]; + res[2] = -res[2]; +} -PURE_INLINE dReal dLENGTH (const dReal *a) { return dSqrt(dLENGTHSQUARED(a)); } +ODE_PURE_INLINE void dCopyVector3(dReal *res, const dReal *a) +{ + const dReal res_0 = a[0]; + const dReal res_1 = a[1]; + const dReal res_2 = a[2]; + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} -#else +ODE_PURE_INLINE void dCopyScaledVector3(dReal *res, const dReal *a, dReal nScale) +{ + const dReal res_0 = a[0] * nScale; + const dReal res_1 = a[1] * nScale; + const dReal res_2 = a[2] * nScale; + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} -#define dLENGTH(a) ( dSqrt( ((a)[0])*((a)[0]) + ((a)[1])*((a)[1]) + ((a)[2])*((a)[2]) ) ) +ODE_PURE_INLINE void dCopyNegatedVector3(dReal *res, const dReal *a) +{ + const dReal res_0 = -a[0]; + const dReal res_1 = -a[1]; + const dReal res_2 = -a[2]; + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} -#endif /* __cplusplus */ +ODE_PURE_INLINE void dCopyVector4(dReal *res, const dReal *a) +{ + const dReal res_0 = a[0]; + const dReal res_1 = a[1]; + const dReal res_2 = a[2]; + const dReal res_3 = a[3]; + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; res[3] = res_3; +} +ODE_PURE_INLINE void dCopyMatrix4x4(dReal *res, const dReal *a) +{ + dCopyVector4(res + 0, a + 0); + dCopyVector4(res + 4, a + 4); + dCopyVector4(res + 8, a + 8); +} +ODE_PURE_INLINE void dCopyMatrix4x3(dReal *res, const dReal *a) +{ + dCopyVector3(res + 0, a + 0); + dCopyVector3(res + 4, a + 4); + dCopyVector3(res + 8, a + 8); +} +ODE_PURE_INLINE void dGetMatrixColumn3(dReal *res, const dReal *a, unsigned n) +{ + const dReal res_0 = a[n + 0]; + const dReal res_1 = a[n + 4]; + const dReal res_2 = a[n + 8]; + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} +ODE_PURE_INLINE dReal dCalcVectorLength3(const dReal *a) +{ + return dSqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2]); +} -/* - * 3-way dot product. dDOTpq means that elements of `a' and `b' are spaced - * p and q indexes apart respectively. dDOT() means dDOT11. - * in C++ we could use function templates to get all the versions of these - * functions - but on some compilers this will result in sub-optimal code. - */ +ODE_PURE_INLINE dReal dCalcVectorLengthSquare3(const dReal *a) +{ + return (a[0] * a[0] + a[1] * a[1] + a[2] * a[2]); +} -#define dDOTpq(a,b,p,q) ((a)[0]*(b)[0] + (a)[p]*(b)[q] + (a)[2*(p)]*(b)[2*(q)]) +ODE_PURE_INLINE dReal dCalcPointDepth3(const dReal *test_p, const dReal *plane_p, const dReal *plane_n) +{ + return (plane_p[0] - test_p[0]) * plane_n[0] + (plane_p[1] - test_p[1]) * plane_n[1] + (plane_p[2] - test_p[2]) * plane_n[2]; +} -#ifdef __cplusplus -PURE_INLINE dReal dDOT (const dReal *a, const dReal *b) { return dDOTpq(a,b,1,1); } -PURE_INLINE dReal dDOT13 (const dReal *a, const dReal *b) { return dDOTpq(a,b,1,3); } -PURE_INLINE dReal dDOT31 (const dReal *a, const dReal *b) { return dDOTpq(a,b,3,1); } -PURE_INLINE dReal dDOT33 (const dReal *a, const dReal *b) { return dDOTpq(a,b,3,3); } -PURE_INLINE dReal dDOT14 (const dReal *a, const dReal *b) { return dDOTpq(a,b,1,4); } -PURE_INLINE dReal dDOT41 (const dReal *a, const dReal *b) { return dDOTpq(a,b,4,1); } -PURE_INLINE dReal dDOT44 (const dReal *a, const dReal *b) { return dDOTpq(a,b,4,4); } - -#else - -#define dDOT(a,b) dDOTpq(a,b,1,1) -#define dDOT13(a,b) dDOTpq(a,b,1,3) -#define dDOT31(a,b) dDOTpq(a,b,3,1) -#define dDOT33(a,b) dDOTpq(a,b,3,3) -#define dDOT14(a,b) dDOTpq(a,b,1,4) -#define dDOT41(a,b) dDOTpq(a,b,4,1) -#define dDOT44(a,b) dDOTpq(a,b,4,4) +/* +* 3-way dot product. _dCalcVectorDot3 means that elements of `a' and `b' are spaced +* step_a and step_b indexes apart respectively. dCalcVectorDot3() means dDot311. +*/ + +ODE_PURE_INLINE dReal _dCalcVectorDot3(const dReal *a, const dReal *b, unsigned step_a, unsigned step_b) +{ + return a[0] * b[0] + a[step_a] * b[step_b] + a[2 * step_a] * b[2 * step_b]; +} + -#endif /* __cplusplus */ +ODE_PURE_INLINE dReal dCalcVectorDot3 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,1,1); } +ODE_PURE_INLINE dReal dCalcVectorDot3_13 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,1,3); } +ODE_PURE_INLINE dReal dCalcVectorDot3_31 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,3,1); } +ODE_PURE_INLINE dReal dCalcVectorDot3_33 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,3,3); } +ODE_PURE_INLINE dReal dCalcVectorDot3_14 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,1,4); } +ODE_PURE_INLINE dReal dCalcVectorDot3_41 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,4,1); } +ODE_PURE_INLINE dReal dCalcVectorDot3_44 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,4,4); } /* - * cross product, set a = b x c. dCROSSpqr means that elements of `a', `b' - * and `c' are spaced p, q and r indexes apart respectively. - * dCROSS() means dCROSS111. `op' is normally `=', but you can set it to - * +=, -= etc to get other effects. + * cross product, set res = a x b. _dCalcVectorCross3 means that elements of `res', `a' + * and `b' are spaced step_res, step_a and step_b indexes apart respectively. + * dCalcVectorCross3() means dCross3111. */ -#define dCROSS(a,op,b,c) \ -do { \ - (a)[0] op ((b)[1]*(c)[2] - (b)[2]*(c)[1]); \ - (a)[1] op ((b)[2]*(c)[0] - (b)[0]*(c)[2]); \ - (a)[2] op ((b)[0]*(c)[1] - (b)[1]*(c)[0]); \ -} while(0) -#define dCROSSpqr(a,op,b,c,p,q,r) \ -do { \ - (a)[ 0] op ((b)[ q]*(c)[2*r] - (b)[2*q]*(c)[ r]); \ - (a)[ p] op ((b)[2*q]*(c)[ 0] - (b)[ 0]*(c)[2*r]); \ - (a)[2*p] op ((b)[ 0]*(c)[ r] - (b)[ q]*(c)[ 0]); \ -} while(0) -#define dCROSS114(a,op,b,c) dCROSSpqr(a,op,b,c,1,1,4) -#define dCROSS141(a,op,b,c) dCROSSpqr(a,op,b,c,1,4,1) -#define dCROSS144(a,op,b,c) dCROSSpqr(a,op,b,c,1,4,4) -#define dCROSS411(a,op,b,c) dCROSSpqr(a,op,b,c,4,1,1) -#define dCROSS414(a,op,b,c) dCROSSpqr(a,op,b,c,4,1,4) -#define dCROSS441(a,op,b,c) dCROSSpqr(a,op,b,c,4,4,1) -#define dCROSS444(a,op,b,c) dCROSSpqr(a,op,b,c,4,4,4) +ODE_PURE_INLINE void _dCalcVectorCross3(dReal *res, const dReal *a, const dReal *b, unsigned step_res, unsigned step_a, unsigned step_b) +{ + const dReal res_0 = a[ step_a]*b[2*step_b] - a[2*step_a]*b[ step_b]; + const dReal res_1 = a[2*step_a]*b[ 0] - a[ 0]*b[2*step_b]; + const dReal res_2 = a[ 0]*b[ step_b] - a[ step_a]*b[ 0]; + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[ 0] = res_0; + res[ step_res] = res_1; + res[2*step_res] = res_2; +} + +ODE_PURE_INLINE void dCalcVectorCross3 (dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 1, 1); } +ODE_PURE_INLINE void dCalcVectorCross3_114(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 1, 4); } +ODE_PURE_INLINE void dCalcVectorCross3_141(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 4, 1); } +ODE_PURE_INLINE void dCalcVectorCross3_144(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 4, 4); } +ODE_PURE_INLINE void dCalcVectorCross3_411(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 1, 1); } +ODE_PURE_INLINE void dCalcVectorCross3_414(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 1, 4); } +ODE_PURE_INLINE void dCalcVectorCross3_441(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 4, 1); } +ODE_PURE_INLINE void dCalcVectorCross3_444(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 4, 4); } + +ODE_PURE_INLINE void dAddVectorCross3(dReal *res, const dReal *a, const dReal *b) +{ + dReal tmp[3]; + dCalcVectorCross3(tmp, a, b); + dAddVectors3(res, res, tmp); +} + +ODE_PURE_INLINE void dSubtractVectorCross3(dReal *res, const dReal *a, const dReal *b) +{ + dReal tmp[3]; + dCalcVectorCross3(tmp, a, b); + dSubtractVectors3(res, res, tmp); +} /* @@ -173,177 +228,254 @@ * if (plus,minus) is (-,+) then a negative version will be written. */ -#define dCROSSMAT(A,a,skip,plus,minus) \ -do { \ - (A)[1] = minus (a)[2]; \ - (A)[2] = plus (a)[1]; \ - (A)[(skip)+0] = plus (a)[2]; \ - (A)[(skip)+2] = minus (a)[0]; \ - (A)[2*(skip)+0] = minus (a)[1]; \ - (A)[2*(skip)+1] = plus (a)[0]; \ -} while(0) +ODE_PURE_INLINE void dSetCrossMatrixPlus(dReal *res, const dReal *a, unsigned skip) +{ + const dReal a_0 = a[0], a_1 = a[1], a_2 = a[2]; + res[1] = -a_2; + res[2] = +a_1; + res[skip+0] = +a_2; + res[skip+2] = -a_0; + res[2*skip+0] = -a_1; + res[2*skip+1] = +a_0; +} + +ODE_PURE_INLINE void dSetCrossMatrixMinus(dReal *res, const dReal *a, unsigned skip) +{ + const dReal a_0 = a[0], a_1 = a[1], a_2 = a[2]; + res[1] = +a_2; + res[2] = -a_1; + res[skip+0] = -a_2; + res[skip+2] = +a_0; + res[2*skip+0] = +a_1; + res[2*skip+1] = -a_0; +} /* * compute the distance between two 3D-vectors */ -#ifdef __cplusplus -PURE_INLINE dReal dDISTANCE (const dVector3 a, const dVector3 b) - { return dSqrt( (a[0]-b[0])*(a[0]-b[0]) + (a[1]-b[1])*(a[1]-b[1]) + (a[2]-b[2])*(a[2]-b[2]) ); } -#else -#define dDISTANCE(a,b) \ - (dSqrt( ((a)[0]-(b)[0])*((a)[0]-(b)[0]) + ((a)[1]-(b)[1])*((a)[1]-(b)[1]) + ((a)[2]-(b)[2])*((a)[2]-(b)[2]) )) -#endif - +ODE_PURE_INLINE dReal dCalcPointsDistance3(const dReal *a, const dReal *b) +{ + dReal res; + dReal tmp[3]; + dSubtractVectors3(tmp, a, b); + res = dCalcVectorLength3(tmp); + return res; +} /* - * special case matrix multipication, with operator selection + * special case matrix multiplication, with operator selection */ -#define dMULTIPLYOP0_331(A,op,B,C) \ -do { \ - (A)[0] op dDOT((B),(C)); \ - (A)[1] op dDOT((B+4),(C)); \ - (A)[2] op dDOT((B+8),(C)); \ -} while(0) -#define dMULTIPLYOP1_331(A,op,B,C) \ -do { \ - (A)[0] op dDOT41((B),(C)); \ - (A)[1] op dDOT41((B+1),(C)); \ - (A)[2] op dDOT41((B+2),(C)); \ -} while(0) -#define dMULTIPLYOP0_133(A,op,B,C) \ -do { \ - (A)[0] op dDOT14((B),(C)); \ - (A)[1] op dDOT14((B),(C+1)); \ - (A)[2] op dDOT14((B),(C+2)); \ -} while(0) -#define dMULTIPLYOP0_333(A,op,B,C) \ -do { \ - (A)[0] op dDOT14((B),(C)); \ - (A)[1] op dDOT14((B),(C+1)); \ - (A)[2] op dDOT14((B),(C+2)); \ - (A)[4] op dDOT14((B+4),(C)); \ - (A)[5] op dDOT14((B+4),(C+1)); \ - (A)[6] op dDOT14((B+4),(C+2)); \ - (A)[8] op dDOT14((B+8),(C)); \ - (A)[9] op dDOT14((B+8),(C+1)); \ - (A)[10] op dDOT14((B+8),(C+2)); \ -} while(0) -#define dMULTIPLYOP1_333(A,op,B,C) \ -do { \ - (A)[0] op dDOT44((B),(C)); \ - (A)[1] op dDOT44((B),(C+1)); \ - (A)[2] op dDOT44((B),(C+2)); \ - (A)[4] op dDOT44((B+1),(C)); \ - (A)[5] op dDOT44((B+1),(C+1)); \ - (A)[6] op dDOT44((B+1),(C+2)); \ - (A)[8] op dDOT44((B+2),(C)); \ - (A)[9] op dDOT44((B+2),(C+1)); \ - (A)[10] op dDOT44((B+2),(C+2)); \ -} while(0) -#define dMULTIPLYOP2_333(A,op,B,C) \ -do { \ - (A)[0] op dDOT((B),(C)); \ - (A)[1] op dDOT((B),(C+4)); \ - (A)[2] op dDOT((B),(C+8)); \ - (A)[4] op dDOT((B+4),(C)); \ - (A)[5] op dDOT((B+4),(C+4)); \ - (A)[6] op dDOT((B+4),(C+8)); \ - (A)[8] op dDOT((B+8),(C)); \ - (A)[9] op dDOT((B+8),(C+4)); \ - (A)[10] op dDOT((B+8),(C+8)); \ -} while(0) +ODE_PURE_INLINE void dMultiplyHelper0_331(dReal *res, const dReal *a, const dReal *b) +{ + const dReal res_0 = dCalcVectorDot3(a, b); + const dReal res_1 = dCalcVectorDot3(a + 4, b); + const dReal res_2 = dCalcVectorDot3(a + 8, b); + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} -#ifdef __cplusplus +ODE_PURE_INLINE void dMultiplyHelper1_331(dReal *res, const dReal *a, const dReal *b) +{ + const dReal res_0 = dCalcVectorDot3_41(a, b); + const dReal res_1 = dCalcVectorDot3_41(a + 1, b); + const dReal res_2 = dCalcVectorDot3_41(a + 2, b); + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} -#define DECL template PURE_INLINE void +ODE_PURE_INLINE void dMultiplyHelper0_133(dReal *res, const dReal *a, const dReal *b) +{ + dMultiplyHelper1_331(res, b, a); +} + +ODE_PURE_INLINE void dMultiplyHelper1_133(dReal *res, const dReal *a, const dReal *b) +{ + const dReal res_0 = dCalcVectorDot3_44(a, b); + const dReal res_1 = dCalcVectorDot3_44(a + 1, b); + const dReal res_2 = dCalcVectorDot3_44(a + 2, b); + /* Only assign after all the calculations are over to avoid incurring memory aliasing*/ + res[0] = res_0; res[1] = res_1; res[2] = res_2; +} /* Note: NEVER call any of these functions/macros with the same variable for A and C, it is not equivalent to A*=B. */ -DECL dMULTIPLY0_331(TA *A, const TB *B, const TC *C) { dMULTIPLYOP0_331(A,=,B,C); } -DECL dMULTIPLY1_331(TA *A, const TB *B, const TC *C) { dMULTIPLYOP1_331(A,=,B,C); } -DECL dMULTIPLY0_133(TA *A, const TB *B, const TC *C) { dMULTIPLYOP0_133(A,=,B,C); } -DECL dMULTIPLY0_333(TA *A, const TB *B, const TC *C) { dMULTIPLYOP0_333(A,=,B,C); } -DECL dMULTIPLY1_333(TA *A, const TB *B, const TC *C) { dMULTIPLYOP1_333(A,=,B,C); } -DECL dMULTIPLY2_333(TA *A, const TB *B, const TC *C) { dMULTIPLYOP2_333(A,=,B,C); } - -DECL dMULTIPLYADD0_331(TA *A, const TB *B, const TC *C) { dMULTIPLYOP0_331(A,+=,B,C); } -DECL dMULTIPLYADD1_331(TA *A, const TB *B, const TC *C) { dMULTIPLYOP1_331(A,+=,B,C); } -DECL dMULTIPLYADD0_133(TA *A, const TB *B, const TC *C) { dMULTIPLYOP0_133(A,+=,B,C); } -DECL dMULTIPLYADD0_333(TA *A, const TB *B, const TC *C) { dMULTIPLYOP0_333(A,+=,B,C); } -DECL dMULTIPLYADD1_333(TA *A, const TB *B, const TC *C) { dMULTIPLYOP1_333(A,+=,B,C); } -DECL dMULTIPLYADD2_333(TA *A, const TB *B, const TC *C) { dMULTIPLYOP2_333(A,+=,B,C); } - -#undef DECL - -#else - -#define dMULTIPLY0_331(A,B,C) dMULTIPLYOP0_331(A,=,B,C) -#define dMULTIPLY1_331(A,B,C) dMULTIPLYOP1_331(A,=,B,C) -#define dMULTIPLY0_133(A,B,C) dMULTIPLYOP0_133(A,=,B,C) -#define dMULTIPLY0_333(A,B,C) dMULTIPLYOP0_333(A,=,B,C) -#define dMULTIPLY1_333(A,B,C) dMULTIPLYOP1_333(A,=,B,C) -#define dMULTIPLY2_333(A,B,C) dMULTIPLYOP2_333(A,=,B,C) - -#define dMULTIPLYADD0_331(A,B,C) dMULTIPLYOP0_331(A,+=,B,C) -#define dMULTIPLYADD1_331(A,B,C) dMULTIPLYOP1_331(A,+=,B,C) -#define dMULTIPLYADD0_133(A,B,C) dMULTIPLYOP0_133(A,+=,B,C) -#define dMULTIPLYADD0_333(A,B,C) dMULTIPLYOP0_333(A,+=,B,C) -#define dMULTIPLYADD1_333(A,B,C) dMULTIPLYOP1_333(A,+=,B,C) -#define dMULTIPLYADD2_333(A,B,C) dMULTIPLYOP2_333(A,+=,B,C) +ODE_PURE_INLINE void dMultiply0_331(dReal *res, const dReal *a, const dReal *b) +{ + dMultiplyHelper0_331(res, a, b); +} -#endif +ODE_PURE_INLINE void dMultiply1_331(dReal *res, const dReal *a, const dReal *b) +{ + dMultiplyHelper1_331(res, a, b); +} +ODE_PURE_INLINE void dMultiply0_133(dReal *res, const dReal *a, const dReal *b) +{ + dMultiplyHelper0_133(res, a, b); +} -#ifdef __cplusplus -extern "C" { -#endif +ODE_PURE_INLINE void dMultiply0_333(dReal *res, const dReal *a, const dReal *b) +{ + dMultiplyHelper0_133(res + 0, a + 0, b); + dMultiplyHelper0_133(res + 4, a + 4, b); + dMultiplyHelper0_133(res + 8, a + 8, b); +} -/* - * normalize 3x1 and 4x1 vectors (i.e. scale them to unit length) - */ +ODE_PURE_INLINE void dMultiply1_333(dReal *res, const dReal *a, const dReal *b) +{ + dMultiplyHelper1_133(res + 0, b, a + 0); + dMultiplyHelper1_133(res + 4, b, a + 1); + dMultiplyHelper1_133(res + 8, b, a + 2); +} -#if defined(__ODE__) +ODE_PURE_INLINE void dMultiply2_333(dReal *res, const dReal *a, const dReal *b) +{ + dMultiplyHelper0_331(res + 0, b, a + 0); + dMultiplyHelper0_331(res + 4, b, a + 4); + dMultiplyHelper0_331(res + 8, b, a + 8); +} -int _dSafeNormalize3 (dVector3 a); -int _dSafeNormalize4 (dVector4 a); - -static __inline void _dNormalize3(dVector3 a) +ODE_PURE_INLINE void dMultiplyAdd0_331(dReal *res, const dReal *a, const dReal *b) { - int bNormalizationResult = _dSafeNormalize3(a); - dIASSERT(bNormalizationResult); - dVARIABLEUSED(bNormalizationResult); + dReal tmp[3]; + dMultiplyHelper0_331(tmp, a, b); + dAddVectors3(res, res, tmp); } -static __inline void _dNormalize4(dVector4 a) +ODE_PURE_INLINE void dMultiplyAdd1_331(dReal *res, const dReal *a, const dReal *b) { - int bNormalizationResult = _dSafeNormalize4(a); - dIASSERT(bNormalizationResult); - dVARIABLEUSED(bNormalizationResult); + dReal tmp[3]; + dMultiplyHelper1_331(tmp, a, b); + dAddVectors3(res, res, tmp); } -#endif // defined(__ODE__) +ODE_PURE_INLINE void dMultiplyAdd0_133(dReal *res, const dReal *a, const dReal *b) +{ + dReal tmp[3]; + dMultiplyHelper0_133(tmp, a, b); + dAddVectors3(res, res, tmp); +} -// For DLL export -ODE_API int dSafeNormalize3 (dVector3 a); -ODE_API int dSafeNormalize4 (dVector4 a); -ODE_API void dNormalize3 (dVector3 a); // Potentially asserts on zero vec -ODE_API void dNormalize4 (dVector4 a); // Potentially asserts on zero vec +ODE_PURE_INLINE void dMultiplyAdd0_333(dReal *res, const dReal *a, const dReal *b) +{ + dReal tmp[3]; + dMultiplyHelper0_133(tmp, a + 0, b); + dAddVectors3(res+ 0, res + 0, tmp); + dMultiplyHelper0_133(tmp, a + 4, b); + dAddVectors3(res + 4, res + 4, tmp); + dMultiplyHelper0_133(tmp, a + 8, b); + dAddVectors3(res + 8, res + 8, tmp); +} + +ODE_PURE_INLINE void dMultiplyAdd1_333(dReal *res, const dReal *a, const dReal *b) +{ + dReal tmp[3]; + dMultiplyHelper1_133(tmp, b, a + 0); + dAddVectors3(res + 0, res + 0, tmp); + dMultiplyHelper1_133(tmp, b, a + 1); + dAddVectors3(res + 4, res + 4, tmp); + dMultiplyHelper1_133(tmp, b, a + 2); + dAddVectors3(res + 8, res + 8, tmp); +} + +ODE_PURE_INLINE void dMultiplyAdd2_333(dReal *res, const dReal *a, const dReal *b) +{ + dReal tmp[3]; + dMultiplyHelper0_331(tmp, b, a + 0); + dAddVectors3(res + 0, res + 0, tmp); + dMultiplyHelper0_331(tmp, b, a + 4); + dAddVectors3(res + 4, res + 4, tmp); + dMultiplyHelper0_331(tmp, b, a + 8); + dAddVectors3(res + 8, res + 8, tmp); +} + +ODE_PURE_INLINE dReal dCalcMatrix3Det( const dReal* mat ) +{ + dReal det; + + det = mat[0] * ( mat[5]*mat[10] - mat[9]*mat[6] ) + - mat[1] * ( mat[4]*mat[10] - mat[8]*mat[6] ) + + mat[2] * ( mat[4]*mat[9] - mat[8]*mat[5] ); + + return( det ); +} + +/** + Closed form matrix inversion, copied from + collision_util.h for use in the stepper. + + Returns the determinant. + returns 0 and does nothing + if the matrix is singular. +*/ +ODE_PURE_INLINE dReal dInvertMatrix3(dReal *dst, const dReal *ma) +{ + dReal det; + dReal detRecip; -#if defined(__ODE__) + det = dCalcMatrix3Det( ma ); + -// For internal use -#define dSafeNormalize3(a) _dSafeNormalize3(a) -#define dSafeNormalize4(a) _dSafeNormalize4(a) -#define dNormalize3(a) _dNormalize3(a) -#define dNormalize4(a) _dNormalize4(a) + /* Setting an arbitrary non-zero threshold + for the determinant doesn't do anyone + any favors. The condition number is the + important thing. If all the eigen-values + of the matrix are small, so is the + determinant, but it can still be well + conditioned. + A single extremely large eigen-value could + push the determinant over threshold, but + produce a very unstable result if the other + eigen-values are small. So we just say that + the determinant must be non-zero and trust the + caller to provide well-conditioned matrices. + */ + if ( det == 0 ) + { + return 0; + } + + detRecip = dRecip(det); + + dst[0] = ( ma[5]*ma[10] - ma[6]*ma[9] ) * detRecip; + dst[1] = ( ma[9]*ma[2] - ma[1]*ma[10] ) * detRecip; + dst[2] = ( ma[1]*ma[6] - ma[5]*ma[2] ) * detRecip; + + dst[4] = ( ma[6]*ma[8] - ma[4]*ma[10] ) * detRecip; + dst[5] = ( ma[0]*ma[10] - ma[8]*ma[2] ) * detRecip; + dst[6] = ( ma[4]*ma[2] - ma[0]*ma[6] ) * detRecip; + + dst[8] = ( ma[4]*ma[9] - ma[8]*ma[5] ) * detRecip; + dst[9] = ( ma[8]*ma[1] - ma[0]*ma[9] ) * detRecip; + dst[10] = ( ma[0]*ma[5] - ma[1]*ma[4] ) * detRecip; -#endif // defined(__ODE__) + return det; +} + + +/* Include legacy macros here */ +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * normalize 3x1 and 4x1 vectors (i.e. scale them to unit length) + */ + +/* For DLL export*/ +ODE_API int dSafeNormalize3 (dVector3 a); +ODE_API int dSafeNormalize4 (dVector4 a); +ODE_API void dNormalize3 (dVector3 a); /* Potentially asserts on zero vec*/ +ODE_API void dNormalize4 (dVector4 a); /* Potentially asserts on zero vec*/ /* * given a unit length "normal" vector n, generate vectors p and q vectors @@ -363,4 +495,5 @@ } #endif + #endif diff -Nru ode-0.11.1/include/ode/odemath_legacy.h ode-0.14/include/ode/odemath_legacy.h --- ode-0.11.1/include/ode/odemath_legacy.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/include/ode/odemath_legacy.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,162 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +#ifndef _ODE_ODEMATH_LEGACY_H_ +#define _ODE_ODEMATH_LEGACY_H_ + + +/* + * These macros are not used any more inside of ODE + * They are kept for backward compatibility with external code that + * might still be using them. + */ + +/* + * General purpose vector operations with other vectors or constants. + */ + +#define dOP(a,op,b,c) do { \ + (a)[0] = ((b)[0]) op ((c)[0]); \ + (a)[1] = ((b)[1]) op ((c)[1]); \ + (a)[2] = ((b)[2]) op ((c)[2]); \ +} while (0) +#define dOPC(a,op,b,c) do { \ + (a)[0] = ((b)[0]) op (c); \ + (a)[1] = ((b)[1]) op (c); \ + (a)[2] = ((b)[2]) op (c); \ +} while (0) +#define dOPE(a,op,b) do {\ + (a)[0] op ((b)[0]); \ + (a)[1] op ((b)[1]); \ + (a)[2] op ((b)[2]); \ +} while (0) +#define dOPEC(a,op,c) do { \ + (a)[0] op (c); \ + (a)[1] op (c); \ + (a)[2] op (c); \ +} while (0) + +/* Define an equation with operators + * For example this function can be used to replace + *
+ * for (int i=0; i<3; ++i)
+ *   a[i] += b[i] + c[i];
+ * 
+ */ +#define dOPE2(a,op1,b,op2,c) do { \ + (a)[0] op1 ((b)[0]) op2 ((c)[0]); \ + (a)[1] op1 ((b)[1]) op2 ((c)[1]); \ + (a)[2] op1 ((b)[2]) op2 ((c)[2]); \ +} while (0) + + +#define dLENGTHSQUARED(a) dCalcVectorLengthSquare3(a) +#define dLENGTH(a) dCalcVectorLength3(a) +#define dDISTANCE(a, b) dCalcPointsDistance3(a, b) + + +#define dDOT(a, b) dCalcVectorDot3(a, b) +#define dDOT13(a, b) dCalcVectorDot3_13(a, b) +#define dDOT31(a, b) dCalcVectorDot3_31(a, b) +#define dDOT33(a, b) dCalcVectorDot3_33(a, b) +#define dDOT14(a, b) dCalcVectorDot3_14(a, b) +#define dDOT41(a, b) dCalcVectorDot3_41(a, b) +#define dDOT44(a, b) dCalcVectorDot3_44(a, b) + + +/* + * cross product, set a = b x c. dCROSSpqr means that elements of `a', `b' + * and `c' are spaced p, q and r indexes apart respectively. + * dCROSS() means dCROSS111. `op' is normally `=', but you can set it to + * +=, -= etc to get other effects. + */ + +#define dCROSS(a,op,b,c) \ + do { \ + (a)[0] op ((b)[1]*(c)[2] - (b)[2]*(c)[1]); \ + (a)[1] op ((b)[2]*(c)[0] - (b)[0]*(c)[2]); \ + (a)[2] op ((b)[0]*(c)[1] - (b)[1]*(c)[0]); \ + } while(0) +#define dCROSSpqr(a,op,b,c,p,q,r) \ + do { \ + (a)[ 0] op ((b)[ q]*(c)[2*r] - (b)[2*q]*(c)[ r]); \ + (a)[ p] op ((b)[2*q]*(c)[ 0] - (b)[ 0]*(c)[2*r]); \ + (a)[2*p] op ((b)[ 0]*(c)[ r] - (b)[ q]*(c)[ 0]); \ + } while(0) +#define dCROSS114(a,op,b,c) dCROSSpqr(a,op,b,c,1,1,4) +#define dCROSS141(a,op,b,c) dCROSSpqr(a,op,b,c,1,4,1) +#define dCROSS144(a,op,b,c) dCROSSpqr(a,op,b,c,1,4,4) +#define dCROSS411(a,op,b,c) dCROSSpqr(a,op,b,c,4,1,1) +#define dCROSS414(a,op,b,c) dCROSSpqr(a,op,b,c,4,1,4) +#define dCROSS441(a,op,b,c) dCROSSpqr(a,op,b,c,4,4,1) +#define dCROSS444(a,op,b,c) dCROSSpqr(a,op,b,c,4,4,4) + + +/* +* set a 3x3 submatrix of A to a matrix such that submatrix(A)*b = a x b. +* A is stored by rows, and has `skip' elements per row. the matrix is +* assumed to be already zero, so this does not write zero elements! +* if (plus,minus) is (+,-) then a positive version will be written. +* if (plus,minus) is (-,+) then a negative version will be written. +*/ + +#define dCROSSMAT(A,a,skip,plus,minus) \ + do { \ + (A)[1] = minus (a)[2]; \ + (A)[2] = plus (a)[1]; \ + (A)[(skip)+0] = plus (a)[2]; \ + (A)[(skip)+2] = minus (a)[0]; \ + (A)[2*(skip)+0] = minus (a)[1]; \ + (A)[2*(skip)+1] = plus (a)[0]; \ + } while(0) + + + + +/* +Note: NEVER call any of these functions/macros with the same variable for A and C, +it is not equivalent to A*=B. +*/ + +#define dMULTIPLY0_331(A, B, C) dMultiply0_331(A, B, C) +#define dMULTIPLY1_331(A, B, C) dMultiply1_331(A, B, C) +#define dMULTIPLY0_133(A, B, C) dMultiply0_133(A, B, C) +#define dMULTIPLY0_333(A, B, C) dMultiply0_333(A, B, C) +#define dMULTIPLY1_333(A, B, C) dMultiply1_333(A, B, C) +#define dMULTIPLY2_333(A, B, C) dMultiply2_333(A, B, C) + +#define dMULTIPLYADD0_331(A, B, C) dMultiplyAdd0_331(A, B, C) +#define dMULTIPLYADD1_331(A, B, C) dMultiplyAdd1_331(A, B, C) +#define dMULTIPLYADD0_133(A, B, C) dMultiplyAdd0_133(A, B, C) +#define dMULTIPLYADD0_333(A, B, C) dMultiplyAdd0_333(A, B, C) +#define dMULTIPLYADD1_333(A, B, C) dMultiplyAdd1_333(A, B, C) +#define dMULTIPLYADD2_333(A, B, C) dMultiplyAdd2_333(A, B, C) + + +/* + * These macros are not used any more inside of ODE + * They are kept for backward compatibility with external code that + * might still be using them. + */ + + +#endif /* #ifndef _ODE_ODEMATH_LEGACY_H_ */ diff -Nru ode-0.11.1/include/ode/precision.h.in ode-0.14/include/ode/precision.h.in --- ode-0.11.1/include/ode/precision.h.in 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/include/ode/precision.h.in 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,16 @@ +#ifndef _ODE_PRECISION_H_ +#define _ODE_PRECISION_H_ + +/* Define dSINGLE for single precision, dDOUBLE for double precision, + * but never both! + */ + +#if defined(dIDESINGLE) +#define dSINGLE +#elif defined(dIDEDOUBLE) +#define dDOUBLE +#else +#define @ODE_PRECISION@ +#endif + +#endif diff -Nru ode-0.11.1/include/ode/threading.h ode-0.14/include/ode/threading.h --- ode-0.11.1/include/ode/threading.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/include/ode/threading.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,407 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * Threading support header file. * + * Copyright (C) 2011-2012 Oleh Derevenko. All rights reserved. * + * e-mail: odar@eleks.com (change all "a" to "e") * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +/* + * ODE threading support interfaces + */ + + +#ifndef _ODE_THREADING_H_ +#define _ODE_THREADING_H_ + +#include +// Include since time_t is used and it is not available by default in some OSes +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +struct dxThreadingImplementation; +typedef struct dxThreadingImplementation *dThreadingImplementationID; + +typedef unsigned dmutexindex_t; +struct dxMutexGroup; +typedef struct dxMutexGroup *dMutexGroupID; + +/** + * @brief Allocates a group of muteces. + * + * The Mutex allocated do not need to support recursive locking. + * + * The Mutex names are provided to aid in debugging and thread state tracking. + * + * @param impl Threading implementation ID + * @param Mutex_count Number of Mutex to create + * @Mutex_names_ptr Pointer to optional Mutex names array to be associated with individual Mutex + * @returns MutexGroup ID or NULL if error occurred. + * + * @ingroup threading + * @see dMutexGroupFreeFunction + * @see dMutexGroupMutexLockFunction + * @see dMutexGroupMutexUnlockFunction + */ +typedef dMutexGroupID dMutexGroupAllocFunction (dThreadingImplementationID impl, dmutexindex_t Mutex_count, const char *const *Mutex_names_ptr/*=NULL*/); + +/** + * @brief Deletes a group of muteces. + * + * @param impl Threading implementation ID + * @param mutex_group Mutex group to deallocate + * + * @ingroup threading + * @see dMutexGroupAllocFunction + * @see dMutexGroupMutexLockFunction + * @see dMutexGroupMutexUnlockFunction + */ +typedef void dMutexGroupFreeFunction (dThreadingImplementationID impl, dMutexGroupID mutex_group); + +/** + * @brief Locks a mutex in a group of muteces. + * + * The function is to block execution until requested mutex can be locked. + * + * Note: Mutex provided may not support recursive locking. Calling this function + * while mutex is already locked by current thread will result in unpredictable behavior. + * + * @param impl Threading implementation ID + * @param mutex_group Mutex group to use for locking + * @param mutex_index The index of mutex to be locked (0..Mutex_count - 1) + * + * @ingroup threading + * @see dMutexGroupAllocFunction + * @see dMutexGroupFreeFunction + * @see dMutexGroupMutexUnlockFunction + */ +typedef void dMutexGroupMutexLockFunction (dThreadingImplementationID impl, dMutexGroupID mutex_group, dmutexindex_t mutex_index); + +/** + * @brief Attempts to lock a mutex in a group of muteces. + * + * The function is to lock the requested mutex if it is unoccupied or + * immediately return failure if mutex is already locked by other thread. + * + * Note: Mutex provided may not support recursive locking. Calling this function + * while mutex is already locked by current thread will result in unpredictable behavior. + * + * @param impl Threading implementation ID + * @param mutex_group Mutex group to use for locking + * @param mutex_index The index of mutex to be locked (0..Mutex_count - 1) + * @returns 1 for success (mutex is locked) and 0 for failure (mutex is not locked) + * + * @ingroup threading + * @see dMutexGroupAllocFunction + * @see dMutexGroupFreeFunction + * @see dMutexGroupMutexLockFunction + * @see dMutexGroupMutexUnlockFunction + */ +/* typedef int dMutexGroupMutexTryLockFunction (dThreadingImplementationID impl, dMutexGroupID mutex_group, dmutexindex_t mutex_index);*/ + +/** + * @brief Unlocks a mutex in a group of muteces. + * + * The function is to unlock the given mutex provided it had been locked before. + * + * @param impl Threading implementation ID + * @param mutex_group Mutex group to use for unlocking + * @param mutex_index The index of mutex to be unlocked (0..Mutex_count - 1) + * + * @ingroup threading + * @see dMutexGroupAllocFunction + * @see dMutexGroupFreeFunction + * @see dMutexGroupMutexLockFunction + */ +typedef void dMutexGroupMutexUnlockFunction (dThreadingImplementationID impl, dMutexGroupID mutex_group, dmutexindex_t mutex_index); + + +struct dxCallReleasee; +typedef struct dxCallReleasee *dCallReleaseeID; + +struct dxCallWait; +typedef struct dxCallWait *dCallWaitID; + +typedef size_t ddependencycount_t; +typedef ptrdiff_t ddependencychange_t; +typedef size_t dcallindex_t; +typedef int dThreadedCallFunction(void *call_context, dcallindex_t instance_index, + dCallReleaseeID this_releasee); + +typedef struct dxThreadedWaitTime +{ + time_t wait_sec; + unsigned long wait_nsec; + +} dThreadedWaitTime; + + +/** + * @brief Allocates a Wait ID that can be used to wait for a call. + * + * @param impl Threading implementation ID + * @returns Wait ID or NULL if error occurred + * + * @ingroup threading + * @see dThreadedCallWaitResetFunction + * @see dThreadedCallWaitFreeFunction + * @see dThreadedCallPostFunction + * @see dThreadedCallWaitFunction + */ +typedef dCallWaitID dThreadedCallWaitAllocFunction(dThreadingImplementationID impl); + +/** + * @brief Resets a Wait ID so that it could be used to wait for another call. + * + * @param impl Threading implementation ID + * @param call_wait Wait ID to reset + * + * @ingroup threading + * @see dThreadedCallWaitAllocFunction + * @see dThreadedCallWaitFreeFunction + * @see dThreadedCallPostFunction + * @see dThreadedCallWaitFunction + */ +typedef void dThreadedCallWaitResetFunction(dThreadingImplementationID impl, dCallWaitID call_wait); + +/** + * @brief Frees a Wait ID. + * + * @param impl Threading implementation ID + * @param call_wait Wait ID to delete + * + * @ingroup threading + * @see dThreadedCallWaitAllocFunction + * @see dThreadedCallPostFunction + * @see dThreadedCallWaitFunction + */ +typedef void dThreadedCallWaitFreeFunction(dThreadingImplementationID impl, dCallWaitID call_wait); + + +/** + * @brief Post a function to be called in another thread. + * + * A call is scheduled to be executed asynchronously. + * + * A @a out_summary_fault variable can be provided for call to accumulate any + * possible faults from its execution and execution of any possible sub-calls. + * This variable gets result that @a call_func returns. Also, if dependent calls + * are executed after the call already exits, the variable is also going to be + * updated with results of all those calls before control is released to master. + * + * @a out_post_releasee parameter receives a value of @c dCallReleaseeID that can + * later be used for @a dependent_releasee while scheduling sub-calls to make + * current call depend on them. The value is only returned if @a dependencies_count + * is not zero (i.e. if any dependencies are expected at all). The call is not going + * to start until all its dependencies complete. + * + * In case if number of dependencies is unknown in advance 1 can be passed on call + * scheduling. Then @c dThreadedCallDependenciesCountAlterFunction can be used to + * add one more extra dependencies before scheduling each subcall. And then, after + * all sub-calls had been scheduled, @c dThreadedCallDependenciesCountAlterFunction + * can be used again to subtract initial extra dependency from total number. + * Adding one dependency in advance is necessary to obtain releasee ID and to make + * sure the call will not start and will not terminate before all sub-calls are scheduled. + * + * Extra dependencies can also be added from the call itself after it has already + * been started (with parameter received in @c dThreadedCallFunction). + * In that case those dependencies will start immediately or after call returns + * but the call's master will not be released/notified until all additional + * dependencies complete. This can be used to schedule sub-calls from a call and + * then pass own job to another sub-call dependent on those initial sub-calls. + * + * By using @ call_wait it is possible to assign a Wait ID that can later + * be passed into @c dThreadedCallWaitFunction to wait for call completion. + * + * If @a call_name is available (and it should!) the string must remain valid until + * after call completion. In most cases this should be a static string literal. + * + * Since the function is an analogue of normal method call it is not supposed to fail. + * Any complications with resource allocation on call scheduling should be + * anticipated, avoided and worked around by implementation. + * + * @param impl Threading implementation ID + * @param out_summary_fault Optional pointer to variable to be set to 1 if function + * call (or any sub-call) fails internally, or 0 if all calls return success + * @param out_post_releasee Optional pointer to variable to receive releasee ID + * associated with the call + * @param dependencies_count Number of dependencies that are going to reference + * this call as dependent releasee + * @param dependent_releasee Optional releasee ID to reference with this call + * @param call_wait Optional Wait ID that can later be used to wait for the call + * @param call_func Pointer to function to be called + * @param call_context Context parameter to be passed into the call + * @param instance_index Index parameter to be passed into the call + * @param call_name Optional name to be associated with the call (for debugging and state tracking) + * + * @ingroup threading + * @see dThreadedCallWaitFunction + * @see dThreadedCallDependenciesCountAlterFunction + * @see dThreadingImplResourcesForCallsPreallocateFunction + */ +typedef void dThreadedCallPostFunction(dThreadingImplementationID impl, int *out_summary_fault/*=NULL*/, + dCallReleaseeID *out_post_releasee/*=NULL*/, ddependencycount_t dependencies_count, dCallReleaseeID dependent_releasee/*=NULL*/, + dCallWaitID call_wait/*=NULL*/, + dThreadedCallFunction *call_func, void *call_context, dcallindex_t instance_index, + const char *call_name/*=NULL*/); + +/** + * @brief Add or remove extra dependencies from call that has been scheduled + * or is in process of execution. + * + * Extra dependencies can be added to a call if exact number of sub-calls is + * not known in advance at the moment the call is scheduled. Also, some dependencies + * can be removed if sub-calls were planned but then dropped. + * + * In case if total dependency count of a call reaches zero by result of invoking + * this function, the call is free to start executing immediately. + * + * After the call execution had been started, any additional dependencies can only + * be added from the call function itself! + * + * @param impl Threading implementation ID + * @param target_releasee ID of releasee to apply dependencies count change to + * @param dependencies_count_change Number of dependencies to add or remove + * + * @ingroup threading + * @see dThreadedCallPostFunction + */ +typedef void dThreadedCallDependenciesCountAlterFunction(dThreadingImplementationID impl, dCallReleaseeID target_releasee, + ddependencychange_t dependencies_count_change); + +/** + * @brief Wait for a posted call to complete. + * + * Function blocks until a call identified by @a call_wait completes or + * timeout elapses. + * + * IT IS ILLEGAL TO INVOKE THIS FUNCTION FROM WITHIN A THREADED CALL! + * This is because doing so will block a physical thread and will require + * increasing worker thread count to avoid starvation. Use call dependencies + * if it is necessary make sure sub-calls have been completed instead! + * + * If @a timeout_time_ptr is NULL, the function waits without time limit. If @a timeout_time_ptr + * points to zero value, the function only checks status and does not block. + * + * If @a wait_name is available (and it should!) the string must remain valid for + * the duration of wait. In most cases this should be a static string literal. + * + * Function is not expected to return failures caused by system call faults as + * those are hardly ever possible to be handled in this case anyway. In event of + * system call fault the function is supposed to terminate application. + * + * @param impl Threading implementation ID + * @param out_wait_status Optional pointer to variable to receive 1 if waiting succeeded + * or 0 in case of timeout + * @param call_wait Wait ID that had been passed to scheduling a call that needs to be waited for + * @param timeout_time_ptr Optional pointer to time specification the wait must not + * last longer than (pass NULL for infinite timeout) + * @param wait_name Optional name to be associated with the wait (for debugging and state tracking) + * + * @ingroup threading + * @see dThreadedCallPostFunction + */ +typedef void dThreadedCallWaitFunction(dThreadingImplementationID impl, int *out_wait_status/*=NULL*/, + dCallWaitID call_wait, const dThreadedWaitTime *timeout_time_ptr/*=NULL*/, + const char *wait_name/*=NULL*/); + +/** + * @brief Retrieve number of active threads that serve the implementation. + * + * @param impl Threading implementation ID + * @returns Number of active threads + * + * @ingroup threading + */ +typedef unsigned dThreadingImplThreadCountRetrieveFunction(dThreadingImplementationID impl); + +/** + * @brief Preallocate resources to handle posted calls. + * + * The function is intended to make sure enough resources is preallocated for the + * implementation to be able to handle posted calls. Then @c max_simultaneous_calls_estimate + * is an estimate of how many posted calls can potentially be active or scheduled + * at the same time. The value is usually derived from the way the calls are posted + * in library code and dependencies between them. + * + * @warning While working on an implementation be prepared that the estimate provided + * yet rarely but theoretically can be exceeded due to unpredictability of thread execution. + * + * This function is normally going to be invoked by library each time it is entered + * from outside to do the job but before any threaded calls are going to be posted. + * + * @param impl Threading implementation ID + * @param max_simultaneous_calls_estimate An estimated number of calls that can be posted simultaneously + * @returns 1 or 0 to indicate success or failure + * + * @ingroup threading + * @see dThreadedCallPostFunction + */ +typedef int dThreadingImplResourcesForCallsPreallocateFunction(dThreadingImplementationID impl, + ddependencycount_t max_simultaneous_calls_estimate); + + +/** + * @brief An interface structure with function pointers to be provided by threading implementation. + */ +typedef struct dxThreadingFunctionsInfo +{ + unsigned struct_size; + + dMutexGroupAllocFunction *alloc_mutex_group; + dMutexGroupFreeFunction *free_mutex_group; + dMutexGroupMutexLockFunction *lock_group_mutex; + dMutexGroupMutexUnlockFunction *unlock_group_mutex; + + dThreadedCallWaitAllocFunction *alloc_call_wait; + dThreadedCallWaitResetFunction *reset_call_wait; + dThreadedCallWaitFreeFunction *free_call_wait; + + dThreadedCallPostFunction *post_call; + dThreadedCallDependenciesCountAlterFunction *alter_call_dependencies_count; + dThreadedCallWaitFunction *wait_call; + + dThreadingImplThreadCountRetrieveFunction *retrieve_thread_count; + dThreadingImplResourcesForCallsPreallocateFunction *preallocate_resources_for_calls; + + /* + * Beware of Jon Watte's anger if you dare to uncomment this! + * May cryptic text below be you a warning! + * Стародавні легенди розказують, що кожного сміливця, хто наважиться порушити табу + * і відкрити заборонений код, спіткає страшне прокляття і він відразу почне робити + * одні лиш помилки. + * + * dMutexGroupMutexTryLockFunction *trylock_group_mutex; + */ + +} dThreadingFunctionsInfo; + + +#ifdef __cplusplus +} +#endif + +#endif /* #ifndef _ODE_THREADING_H_ */ diff -Nru ode-0.11.1/include/ode/threading_impl.h ode-0.14/include/ode/threading_impl.h --- ode-0.11.1/include/ode/threading_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/include/ode/threading_impl.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,264 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * Builtin ODE threading implementation header. * + * Copyright (C) 2011-2012 Oleh Derevenko. All rights reserved. * + * e-mail: odar@eleks.com (change all "a" to "e") * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +/* + * A threading implementation built into ODE for those who does not care to + * or can't implement an own one. + */ + +#ifndef _ODE_THREADING_IMPL_H_ +#define _ODE_THREADING_IMPL_H_ + + +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +struct dxThreadingThreadPool; +typedef struct dxThreadingThreadPool *dThreadingThreadPoolID; + + +/** + * @brief Allocates built-in multi-threaded threading implementation object. + * + * A multi-threaded implementation is a type of implementation that has to be + * served with a thread pool. The thread pool can be either the built-in ODE object + * or set of external threads that dedicate themselves to this purpose and stay + * in ODE until implementation releases them. + * + * @returns ID of object allocated or NULL on failure + * + * @ingroup threading + * @see dThreadingThreadPoolServeMultiThreadedImplementation + * @see dExternalThreadingServeMultiThreadedImplementation + * @see dThreadingFreeImplementation + */ +ODE_API dThreadingImplementationID dThreadingAllocateMultiThreadedImplementation(); + +/** + * @brief Retrieves the functions record of a built-in threading implementation. + * + * The implementation can be the one allocated by ODE (from @c dThreadingAllocateMultiThreadedImplementation). + * Do not use this function with self-made custom implementations - + * they should be bundled with their own set of functions. + * + * @param impl Threading implementation ID + * @returns Pointer to associated functions structure + * + * @ingroup threading + * @see dThreadingAllocateMultiThreadedImplementation + */ +ODE_API const dThreadingFunctionsInfo *dThreadingImplementationGetFunctions(dThreadingImplementationID impl); + +/** + * @brief Requests a built-in implementation to release threads serving it. + * + * The function unblocks threads employed in implementation serving and lets them + * return to from where they originate. It's the responsibility of external code + * to make sure all the calls to ODE that might be dependent on given threading + * implementation object had already returned before this call is made. If threading + * implementation is still processing some posted calls while this function is + * invoked the behavior is implementation dependent. + * + * This call is to be used to request the threads to be released before waiting + * for them in host pool or before waiting for them to exit. Implementation object + * must not be destroyed before it is known that all the serving threads have already + * returned from it. If implementation needs to be reused after this function is called + * and all the threads have exited from it a call to @c dThreadingImplementationCleanupForRestart + * must be made to restore internal state of the object. + * + * If this function is called for self-threaded built-in threading implementation + * the call has no effect. + * + * @param impl Threading implementation ID + * + * @ingroup threading + * @see dThreadingAllocateMultiThreadedImplementation + * @see dThreadingImplementationCleanupForRestart + */ +ODE_API void dThreadingImplementationShutdownProcessing(dThreadingImplementationID impl); + +/** + * @brief Restores built-in implementation's state to let it be reused after shutdown. + * + * If a multi-threaded built-in implementation needs to be reused after a call + * to @c dThreadingImplementationShutdownProcessing this call is to be made to + * restore object's internal state. After that the implementation can be served again. + * + * If this function is called for self-threaded built-in threading implementation + * the call has no effect. + * + * @param impl Threading implementation ID + * + * @ingroup threading + * @see dThreadingAllocateMultiThreadedImplementation + * @see dThreadingImplementationShutdownProcessing + */ +ODE_API void dThreadingImplementationCleanupForRestart(dThreadingImplementationID impl); + +/** + * @brief Deletes an instance of built-in threading implementation. + * + * @warning A care must be taken to make sure the implementation is unassigned + * from all the objects it was assigned to and that there are no more threads + * serving it before attempting to call this function. + * + * @param impl Threading implementation ID + * + * @ingroup threading + * @see dThreadingAllocateMultiThreadedImplementation + */ +ODE_API void dThreadingFreeImplementation(dThreadingImplementationID impl); + + +typedef void (dThreadReadyToServeCallback)(void *callback_context); + +/** + * @brief An entry point for external threads that would like to serve a built-in + * threading implementation object. + * + * A thread that calls this function remains blocked in ODE and serves implementation + * object @p impl until being released with @c dThreadingImplementationShutdownProcessing call. + * This function can be used to provide external threads instead of ODE's built-in + * thread pools. + * + * The optional callback @readiness_callback is called after the thread has reached + * and has registered within the implementation. The implementation should not + * be used until all dedicated threads register within it as otherwise it will not + * have accurate view of the execution resources available. + * + * @param impl Threading implementation ID + * @param readiness_callback Optional readiness callback to be called after thread enters the implementation + * @param callback_context A value to be passed as parameter to readiness callback + * + * @ingroup threading + * @see dThreadingAllocateMultiThreadedImplementation + * @see dThreadingImplementationShutdownProcessing + */ +ODE_API void dExternalThreadingServeMultiThreadedImplementation(dThreadingImplementationID impl, + dThreadReadyToServeCallback *readiness_callback/*=NULL*/, void *callback_context/*=NULL*/); + + +/** + * @brief Creates an instance of built-in thread pool object that can be used to serve + * multi-threaded threading implementations. + * + * The threads allocated inherit priority of caller thread. Their affinity is not + * explicitly adjusted and gets the value the system assigns by default. Threads + * have their stack memory fully committed immediately on start. On POSIX platforms + * threads are started with all the possible signals blocked. Threads execute + * calls to @c dAllocateODEDataForThread with @p ode_data_allocate_flags + * on initialization. + * + * On POSIX platforms this function must be called with signals masked + * or other measures must be taken to prevent reception of signals by calling thread + * for the duration of the call. + * + * @param thread_count Number of threads to start in pool + * @param stack_size Size of stack to be used for every thread or 0 for system default value + * @param ode_data_allocate_flags Flags to be passed to @c dAllocateODEDataForThread on behalf of each thread + * @returns ID of object allocated or NULL on failure + * + * @ingroup threading + * @see dThreadingAllocateMultiThreadedImplementation + * @see dThreadingImplementationShutdownProcessing + * @see dThreadingFreeThreadPool + */ +ODE_API dThreadingThreadPoolID dThreadingAllocateThreadPool(unsigned thread_count, + size_t stack_size, unsigned int ode_data_allocate_flags, void *reserved/*=NULL*/); + +/** + * @brief Commands an instance of built-in thread pool to serve a built-in multi-threaded + * threading implementation. + * + * A pool can only serve one threading implementation at a time. + * Call @c dThreadingImplementationShutdownProcessing to release pool threads + * from implementation serving and make them idle. Pool threads must be released + * from any implementations before pool is attempted to be deleted. + * + * This function waits for threads to register within implementation before returning. + * So, after the function call exits the implementation can be used immediately. + * + * @param pool Thread pool ID to serve the implementation + * @param impl Implementation ID of implementation to be served + * + * @ingroup threading + * @see dThreadingAllocateThreadPool + * @see dThreadingAllocateMultiThreadedImplementation + * @see dThreadingImplementationShutdownProcessing + */ +ODE_API void dThreadingThreadPoolServeMultiThreadedImplementation(dThreadingThreadPoolID pool, dThreadingImplementationID impl); + +/** + * @brief Waits until all pool threads are released from threading implementation + * they might be serving. + * + * The function can be used after a call to @c dThreadingImplementationShutdownProcessing + * to make sure all the threads have already been released by threading implementation + * and it can be deleted or it can be cleaned up for restart and served by another pool + * or this pool's threads can be used to serve another threading implementation. + * + * Note that is it not necessary to call this function before pool destruction + * since @c dThreadingFreeThreadPool performs similar wait operation implicitly on its own. + * + * It is OK to call this function even if pool was not serving any threading implementation + * in which case the call exits immediately with minimal delay. + * + * @param pool Thread pool ID to wait for + * + * @ingroup threading + * @see dThreadingAllocateThreadPool + * @see dThreadingImplementationShutdownProcessing + * @see dThreadingFreeThreadPool + */ +ODE_API void dThreadingThreadPoolWaitIdleState(dThreadingThreadPoolID pool); + +/** + * @brief Deletes a built-in thread pool instance. + * + * The pool threads must be released from any implementations they might be serving + * before this function is called. Otherwise the call is going to block + * and wait until pool's threads return. + * + * @param pool Thread pool ID to delete + * + * @ingroup threading + * @see dThreadingAllocateThreadPool + * @see dThreadingImplementationShutdownProcessing + */ +ODE_API void dThreadingFreeThreadPool(dThreadingThreadPoolID pool); + + +#ifdef __cplusplus +} +#endif + +#endif /* #ifndef _ODE_THREADING_IMPL_H_ */ diff -Nru ode-0.11.1/include/ode/version.h.in ode-0.14/include/ode/version.h.in --- ode-0.11.1/include/ode/version.h.in 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/include/ode/version.h.in 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ +#ifndef _ODE_VERSION_H_ +#define _ODE_VERSION_H_ + +#define dODE_VERSION "@ODE_VERSION@" + +#endif diff -Nru ode-0.11.1/install-sh ode-0.14/install-sh --- ode-0.11.1/install-sh 2009-05-24 22:15:46.000000000 +0000 +++ ode-0.14/install-sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,519 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2006-12-25.00 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff -Nru ode-0.11.1/INSTALL.txt ode-0.14/INSTALL.txt --- ode-0.11.1/INSTALL.txt 2008-03-19 10:52:25.000000000 +0000 +++ ode-0.14/INSTALL.txt 2015-12-18 14:09:27.000000000 +0000 @@ -1,122 +1,131 @@ -As of version 0.6, ODE has two new build systems, one for Visual Studio -and another for just about everything else. +ODE has two new build systems, one for *nix systems and another for +just about everything else. 1. Building with Visual Studio -2. Building with Autotools (Linux, OS X, etc.) +2. Building with Autotools (Linux, OS X, MSYS, etc.) 3. Building with Code::Blocks 4. Building with Something Else + + 1. BUILDING WITH VISUAL STUDIO (2002 and up) +============================================ If you downloaded this source code from Subversion you must first use - the Premake build system to generate project files. See build/readme.txt - for more details. If you downloaded this source code package from - SourceForge this has already been done for you. - - The directory ode/build contains project files for all supported - versions of Visual Studio. Note that Visual Studio 6 is not supported - and users are advised to upgrade to Visual C++ 2005 Express (it's free!) + the Premake build system to generate project files. - Open the appropriate solution for your version, pick the build - configuration you want, and build! - - The build configuration choices are: + Open a command prompt and enter into the build directory. Then run the + premake4.exe program with the appropriate options to generate the + project files. For example, to generate a project for VS2008: + + > premake4.exe --with-tests --with-demos vs2008 + + To see a complete list of options use: - Debug or Release - Single or Double precision - Static Library (Lib) or Shared Library (DLL) - + > premake4.exe --help + + Note that Visual Studio 6 is not supported and users are advised to upgrade + to at least Visual Studio 2005 Express (it's free!) + + + -2. BUILDING WITH AUTOTOOLS (Linux, OS X, etc.) +2. BUILDING WITH AUTOTOOLS (Linux, OS X, MSYS, etc.) +==================================================== + +2.1 FROM SUBVERSION REPOSITORY +------------------------------ If you downloaded the source code from Subversion you must bootstrap the process by running the command: - $ sh autogen.sh - + $ ./bootstrap + + For this command to work you need a set of tools typically available + on BSD and Linux distributions with development packages installed. OS X + users may need to manually install libtool, autoconf, automake, + pkg-config, and maybe some more. + If you downloaded a source code package from SourceForge this has already been done for you. You may see some "underquoted definition" warnings depending on your platform, these are (for now) harmless warnings regarding scripts from other m4 installed packages. - Run the configure script to autodetect your build environment. +2.2 FROM A RELEASED TARBALL +--------------------------- + + First extract the archive (e.g. tar xvfz ) and enter + the created directory (ode-x.y). + + Run the configure script to autodetect your build environment: $ ./configure By default this will build ODE as a static library with single-precision - math, trimesh support, and debug symbols enabled. You can modify these - defaults by passing additional parameters to configure. For a full list - of available options, type + math, trimesh support with OPCODE, and debug symbols enabled. You can + modify these defaults by passing additional parameters to + configure. For a full list of available options, type: $ ./configure --help Some of the more popular options are - --enable-double-precision enable double-precision math - --with-trimesh=none disables the trimesh support - --with-trimesh=opcode use OPCODE for trimesh code - --with-trimesh=gimpact use GIMPACT for trimesh code + --enable-double-precision enable double-precision math + --with-trimesh=none disables the trimesh support + --with-trimesh=opcode use OPCODE for trimesh code + --with-trimesh=gimpact use GIMPACT for trimesh code - --enabled-shared builds a shared library + --enabled-shared builds a shared library To pass specific flags for an optimized build, you must do so - in the CPPFLAGS CFLAGS and CXXFLAGS enviroment variables, - you can set these with the export command before running configure - or by defining them on the same call to configure, so for example - if you are building for an athlon xp processor and you want the - compiler to use SSE instructions you can run configure as follows: - - $ CFLAGS="-msse -march=atlon-xp" CXXFLAGS="-msse -march=atlon-xp" ./configure - - Note that you must set both CFLAGS and CXXFLAGS as ODE contains a mixture of C and C++ files. - For preprocessor flags such as -L and -I to define library and header paths - respectively use CPPFLAGS. - + in the CFLAGS and CXXFLAGS enviroment variables, or as arguments + to ./configure. For example if you are building for an athlon xp processor + and you want the compiler to use SSE instructions you can run configure as + follows: + + $ ./configure CFLAGS="-msse -march=atlon-xp" CXXFLAGS="-msse -march=atlon-xp" + + Note that you must set both CFLAGS and CXXFLAGS as ODE contains a mixture of + C and C++ files. + Once configure has run successfully, build and install ODE: - + $ make $ make install - - The latter command will also create an `ode-config` script which you can - use to pass cflags and ldflags to your projects. run `ode-config` from a - command prompt to find out how it works. - - In addition the option `--with-arch=` allows the user to pass the -march - flag to GCC, in order to tune the library for a particular architecture. - The arguments for --with-arch are listed on this page for -mtune: - - http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/i386-and-x86-64-Options.html#i386%20and%20x86-64%20Options - - Note that the link points to posible values for Intel processors, but - other processors are also supported, check the page for your particular - processor to see what parameters can be passed to -march in your case. - -3. Building with Code::Blocks + The latter command will also create a pkg-config script that provides + compilation and linking flags for programs. The old stand-alone + "ode-config" script is also installed for compatibility. + + + + +3. BUILDING WITH Code::Blocks +============================= Because Code::Blocks supports so many different platforms, we do not provide workspaces. Instead, use Premake to create a workspace tailored for your platform and project. Like so: - $ cd ode/build - $ premake --with-tests --target cb-gcc + $ cd build + $ premake4 --with-tests --with-demos codeblocks To see a complete list of options: - $ cd ode/build - $ premake --help - - -4. Building with Something Else + $ cd build + $ premake4 --help + + + + +4. BUILDING WITH SOMETHING ELSE +=============================== ODE uses the Premake tool to provide support for several different toolsets. Premake adds support for new toolsets on a regular basis, so yours might be supported. Check the Premake website at http://premake.sourceforge.net/, and then follow the directions for Code::Blocks above, substituting your - toolset target in place of `cb-gcc`. - - - + toolset target in place of `codeblocks`. diff -Nru ode-0.11.1/libccd/bootstrap ode-0.14/libccd/bootstrap --- ode-0.11.1/libccd/bootstrap 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/bootstrap 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# on Mac libtoolize is called glibtoolize +LIBTOOLIZE=libtoolize +if [ `uname -s` = Darwin ]; then + LIBTOOLIZE=glibtoolize +fi +$LIBTOOLIZE -c --automake +aclocal +autoheader +autoconf +automake -a --foreign -c diff -Nru ode-0.11.1/libccd/BSD-LICENSE ode-0.14/libccd/BSD-LICENSE --- ode-0.11.1/libccd/BSD-LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/BSD-LICENSE 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,44 @@ +libccd +------- + +Copyright (c)2010 Daniel Fiser , +Intelligent and Mobile Robotics Group, Department of Cybernetics, +Faculty of Electrical Engineering, Czech Technical University in Prague. +All rights reserved. + + +This work was supported by SYMBRION and REPLICATOR projects. +The SYMBRION project is funded by European Commission within the work +"Future and Emergent Technologies Proactive" under grant agreement no. +216342. +The REPLICATOR project is funded within the work programme "Cognitive +Systems, Interaction, Robotics" under grant agreement no. 216240. +http://www.symbrion.eu/ +http://www.replicators.eu/ + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + - Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff -Nru ode-0.11.1/libccd/configure.ac ode-0.14/libccd/configure.ac --- ode-0.11.1/libccd/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/configure.ac 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,50 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +#AC_PREREQ([2.65]) +AC_INIT([libccd], [1.0], [danfis@danfis.cz]) +AC_CONFIG_SRCDIR([src/ccd.c]) +AC_CONFIG_HEADERS([src/config.h]) +AM_INIT_AUTOMAKE(foreign) + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_INSTALL +AC_DISABLE_SHARED +LT_INIT + +# Checks for libraries. +AC_CHECK_LIB([m], [main]) +# FIXME: Replace `main' with a function in `-lrt': +AC_CHECK_LIB([rt], [main]) + +# Checks for header files. +AC_CHECK_HEADERS([float.h stdlib.h string.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_FORK +AC_CHECK_FUNCS([clock_gettime]) + +use_double=no +AC_ARG_ENABLE(double-precision, + AS_HELP_STRING([--enable-double-precision], + [enable double precision computations instead of single precision]), + [use_double=$enableval]) +if test x$use_double = xno +then + CCD_PRECISION=CCD_SINGLE +else + CCD_PRECISION=CCD_DOUBLE +fi +AC_SUBST(CCD_PRECISION) + +AC_CONFIG_FILES([Makefile + src/Makefile + src/ccd/precision.h + src/testsuites/Makefile + src/testsuites/cu/Makefile]) +AC_OUTPUT diff -Nru ode-0.11.1/libccd/Makefile.am ode-0.14/libccd/Makefile.am --- ode-0.11.1/libccd/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ +SUBDIRS = src + +EXTRA_DIST = \ + bootstrap \ + BSD-LICENSE \ + README diff -Nru ode-0.11.1/libccd/README ode-0.14/libccd/README --- ode-0.11.1/libccd/README 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/README 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,72 @@ +libccd is library for a collision detection between two convex shapes. +libccd implements variation on Gilbert–Johnson–Keerthi algorithm plus Expand +Polytope Algorithm (EPA) and also implements algorithm Minkowski Portal +Refinement (MPR, a.k.a. XenoCollide) as described in Game Programming Gems 7. + +For more info see home of libccd: http://libccd.danfis.cz. + + +Dependencies +------------- +This library is currently based only on standard libraries. +The only exception are testsuites that are built on top of CU +(cu.danfis.cz) library licensed under LGPL, however only testing depends on +it and libccd library itself can be distributed without it. + + +License +-------- +libccd is licensed under OSI-approved 3-clause BSD License, text of license +is distributed along with source code in BSD-LICENSE file. +Each file should include license notice, the rest should be considered as +licensed under 3-clause BSD License. + + +Compile And Install +-------------------- +Simply type 'make' and 'make install' in src/ directory. + +Library libccd is by default compiled in double precision of floating point +numbers - you can controll this by options USE_SINGLE/USE_DOUBLE, i.e.: + $ make USE_SINGLE=yes +will compile library in single precision. + +Installation directory can be changed by options PREFIX, INCLUDEDIR and +LIBDIR. + +For more info type 'make help'. + + +Compile And Install Using Autotools +------------------------------------ +libccd also contains support for autotools: +1) Generate configure script etc.: $ ./bootstrap +2) Create new build/ directory: $ mkdir build && cd build +3) Run configure script: $ ../configure +4) Run make and make install: $ make && make install + +configure script can change the way libccd is compiled and installed, most +significant option is --enable-double-precision which enables double +precision (single is default in this case). + + +Usage +------ +See ccd.h for public API. +In your application include , setup ccd_t structure and run some +of functions (all functions are reentrant). Then link with libccd.a. + + +Directories +------------ +src/ + - contains source files of libccd. +src/testsuites + - testsuites - libccd must be compiled before compiling this. +src/testsuites/cu + - CU unit testing framework +src/testsuites/regressions + - files ready for regression tests + +doc/ + - some documentation. diff -Nru ode-0.11.1/libccd/src/alloc.c ode-0.14/libccd/src/alloc.c --- ode-0.11.1/libccd/src/alloc.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/alloc.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,38 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#include +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + + +void *ccdRealloc(void *ptr, size_t size) +{ + void *ret = realloc(ptr, size); + if (ret == NULL && size != 0){ + fprintf(stderr, "Fatal error: Allocation of memory failed!\n"); + fflush(stderr); + exit(-1); + } + + return ret; +} + + diff -Nru ode-0.11.1/libccd/src/ccd/alloc.h ode-0.14/libccd/src/ccd/alloc.h --- ode-0.11.1/libccd/src/ccd/alloc.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/alloc.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,52 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_ALLOC_H__ +#define __CCD_ALLOC_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** + * Functions and macros required for memory allocation. + */ + +/* Memory allocation: */ +#define __CCD_ALLOC_MEMORY(type, ptr_old, size) \ + (type *)ccdRealloc((void *)ptr_old, (size)) + +/** Allocate memory for one element of type. */ +#define CCD_ALLOC(type) \ + __CCD_ALLOC_MEMORY(type, NULL, sizeof(type)) + +/** Allocate memory for array of elements of type type. */ +#define CCD_ALLOC_ARR(type, num_elements) \ + __CCD_ALLOC_MEMORY(type, NULL, sizeof(type) * (num_elements)) + +#define CCD_REALLOC_ARR(ptr, type, num_elements) \ + __CCD_ALLOC_MEMORY(type, ptr, sizeof(type) * (num_elements)) + +void *ccdRealloc(void *ptr, size_t size); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* __CCD_ALLOC_H__ */ diff -Nru ode-0.11.1/libccd/src/ccd/ccd.h ode-0.14/libccd/src/ccd/ccd.h --- ode-0.11.1/libccd/src/ccd/ccd.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/ccd.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,148 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010,2011 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_H__ +#define __CCD_H__ + +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** + * Type of *support* function that takes pointer to 3D object and direction + * and returns (via vec argument) furthest point from object in specified + * direction. + */ +typedef void (*ccd_support_fn)(const void *obj, const ccd_vec3_t *dir, + ccd_vec3_t *vec); + +/** + * Returns (via dir argument) first direction vector that will be used in + * initialization of algorithm. + */ +typedef void (*ccd_first_dir_fn)(const void *obj1, const void *obj2, + ccd_vec3_t *dir); + + +/** + * Returns (via center argument) geometric center (some point near center) + * of given object. + */ +typedef void (*ccd_center_fn)(const void *obj1, ccd_vec3_t *center); + +/** + * Main structure of CCD algorithm. + */ +struct _ccd_t { + ccd_first_dir_fn first_dir; /*!< Returns initial direction where first + !< support point will be searched*/ + ccd_support_fn support1; /*!< Function that returns support point of + !< first object*/ + ccd_support_fn support2; /*!< Function that returns support point of + !< second object*/ + + ccd_center_fn center1; /*!< Function that returns geometric center of + !< first object*/ + ccd_center_fn center2; /*!< Function that returns geometric center of + !< second object*/ + + unsigned long max_iterations; /*!< Maximal number of iterations*/ + ccd_real_t epa_tolerance; + ccd_real_t mpr_tolerance; /*!< Boundary tolerance for MPR algorithm*/ +}; +typedef struct _ccd_t ccd_t; + +/** + * Default first direction. + */ +void ccdFirstDirDefault(const void *o1, const void *o2, ccd_vec3_t *dir); + +#define CCD_INIT(ccd) \ + do { \ + (ccd)->first_dir = ccdFirstDirDefault; \ + (ccd)->support1 = NULL; \ + (ccd)->support2 = NULL; \ + (ccd)->center1 = NULL; \ + (ccd)->center2 = NULL; \ + \ + (ccd)->max_iterations = (unsigned long)-1; \ + (ccd)->epa_tolerance = CCD_REAL(0.0001); \ + (ccd)->mpr_tolerance = CCD_REAL(0.0001); \ + } while(0) + + +/** + * Returns true if two given objects interest. + */ +int ccdGJKIntersect(const void *obj1, const void *obj2, const ccd_t *ccd); + +/** + * This function computes separation vector of two objects. Separation + * vector is minimal translation of obj2 to get obj1 and obj2 speparated + * (without intersection). + * Returns 0 if obj1 and obj2 intersect and sep is filled with translation + * vector. If obj1 and obj2 don't intersect -1 is returned. + */ +int ccdGJKSeparate(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_vec3_t *sep); + +/** + * Computes penetration of obj2 into obj1. + * Depth of penetration, direction and position is returned. It means that + * if obj2 is translated by distance depth in direction dir objects will + * have touching contact, pos should be position in global coordinates + * where force should take a place. + * + * CCD+EPA algorithm is used. + * + * Returns 0 if obj1 and obj2 intersect and depth, dir and pos are filled + * if given non-NULL pointers. + * If obj1 and obj2 don't intersect -1 is returned. + */ +int ccdGJKPenetration(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_real_t *depth, ccd_vec3_t *dir, ccd_vec3_t *pos); + + +/** + * Returns true if two given objects intersect - MPR algorithm is used. + */ +int ccdMPRIntersect(const void *obj1, const void *obj2, const ccd_t *ccd); + +/** + * Computes penetration of obj2 into obj1. + * Depth of penetration, direction and position is returned, i.e. if obj2 + * is translated by computed depth in resulting direction obj1 and obj2 + * would have touching contact. Position is point in global coordinates + * where force should be take a place. + * + * Minkowski Portal Refinement algorithm is used (MPR, a.k.a. XenoCollide, + * see Game Programming Gem 7). + * + * Returns 0 if obj1 and obj2 intersect, otherwise -1 is returned. + */ +int ccdMPRPenetration(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_real_t *depth, ccd_vec3_t *dir, ccd_vec3_t *pos); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* __CCD_H__ */ diff -Nru ode-0.11.1/libccd/src/ccd/compiler.h ode-0.14/libccd/src/ccd/compiler.h --- ode-0.11.1/libccd/src/ccd/compiler.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/compiler.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,61 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_COMPILER_H__ +#define __CCD_COMPILER_H__ + +#include + +#define ccd_offsetof(TYPE, MEMBER) offsetof(TYPE, MEMBER) + +#define ccd_container_of(ptr, type, member) \ + (type *)( (char *)ptr - ccd_offsetof(type, member)) + + +/** + * Marks inline function. + */ +#ifdef __GNUC__ +/*# define _ccd_inline static inline __attribute__((always_inline))*/ +# define _ccd_inline static inline +#else /* __GNUC__ */ +# define _ccd_inline static __inline +#endif /* __GNUC__ */ + + +/** + * __prefetch(x) - prefetches the cacheline at "x" for read + * __prefetchw(x) - prefetches the cacheline at "x" for write + */ +#ifdef __GNUC__ +# define _ccd_prefetch(x) __builtin_prefetch(x) +# define _ccd_prefetchw(x) __builtin_prefetch(x,1) +#else /* __GNUC__ */ +# define _ccd_prefetch(x) ((void)0) +# define _ccd_prefetchw(x) ((void)0) +#endif /* __GNUC__ */ + + +#ifdef __ICC +/* disable unused parameter warning */ +# pragma warning(disable:869) +/* disable annoying "operands are evaluated in unspecified order" warning */ +# pragma warning(disable:981) +#endif /* __ICC */ + +#endif /* __CCD_COMPILER_H__ */ + diff -Nru ode-0.11.1/libccd/src/ccd/dbg.h ode-0.14/libccd/src/ccd/dbg.h --- ode-0.11.1/libccd/src/ccd/dbg.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/dbg.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,65 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_DBG_H__ +#define __CCD_DBG_H__ + +/** + * Some macros which can be used for printing debug info to stderr if macro + * NDEBUG not defined. + * + * DBG_PROLOGUE can be specified as string and this string will be + * prepended to output text + */ +#ifndef NDEBUG + +#include + +#ifndef DBG_PROLOGUE +# define DBG_PROLOGUE +#endif + +# define DBG(format, ...) do { \ + fprintf(stderr, DBG_PROLOGUE "%s :: " format "\n", __func__, ## __VA_ARGS__); \ + fflush(stderr); \ + } while (0) + +# define DBG2(str) do { \ + fprintf(stderr, DBG_PROLOGUE "%s :: " str "\n", __func__); \ + fflush(stderr); \ + } while (0) + +# define DBG_VEC3(vec, prefix) do {\ + fprintf(stderr, DBG_PROLOGUE "%s :: %s[%lf %lf %lf]\n", \ + __func__, prefix, ccdVec3X(vec), ccdVec3Y(vec), ccdVec3Z(vec)); \ + fflush(stderr); \ + } while (0) +/* +# define DBG_VEC3(vec, prefix) do {\ + fprintf(stderr, DBG_PROLOGUE "%s :: %s[%.20lf %.20lf %.20lf]\n", \ + __func__, prefix, ccdVec3X(vec), ccdVec3Y(vec), ccdVec3Z(vec)); \ + fflush(stderr); \ + } while (0) +*/ + +#else +# define DBG(format, ...) +# define DBG2(str) +# define DBG_VEC3(v, prefix) +#endif + +#endif /* __CCD_DBG_H__ */ diff -Nru ode-0.11.1/libccd/src/ccd/list.h ode-0.14/libccd/src/ccd/list.h --- ode-0.11.1/libccd/src/ccd/list.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/list.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,155 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_LIST_H__ +#define __CCD_LIST_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct _ccd_list_t { + struct _ccd_list_t *next, *prev; +}; +typedef struct _ccd_list_t ccd_list_t; + + + +/** + * Get the struct for this entry. + * @ptr: the &ccd_list_t pointer. + * @type: the type of the struct this is embedded in. + * @member: the name of the list_struct within the struct. + */ +#define ccdListEntry(ptr, type, member) \ + ccd_container_of(ptr, type, member) + +/** + * Iterates over list. + */ +#define ccdListForEach(list, item) \ + for (item = (list)->next; \ + _ccd_prefetch((item)->next), item != (list); \ + item = (item)->next) + +/** + * Iterates over list safe against remove of list entry + */ +#define ccdListForEachSafe(list, item, tmp) \ + for (item = (list)->next, tmp = (item)->next; \ + item != (list); \ + item = tmp, tmp = (item)->next) + +/** + * Iterates over list of given type. + * @pos: the type * to use as a loop cursor. + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define ccdListForEachEntry(head, pos, postype, member) \ + for (pos = ccdListEntry((head)->next, postype, member); \ + _ccd_prefetch(pos->member.next), &pos->member != (head); \ + pos = ccdListEntry(pos->member.next, postype, member)) + +/** + * Iterates over list of given type safe against removal of list entry + * @pos: the type * to use as a loop cursor. + * @n: another type * to use as temporary storage + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define ccdListForEachEntrySafe(head, pos, postype, n, ntype, member) \ + for (pos = ccdListEntry((head)->next, postype, member), \ + n = ccdListEntry(pos->member.next, postype, member); \ + &pos->member != (head); \ + pos = n, n = ccdListEntry(n->member.next, ntype, member)) + + +/** + * Initialize list. + */ +_ccd_inline void ccdListInit(ccd_list_t *l); + +_ccd_inline ccd_list_t *ccdListNext(ccd_list_t *l); +_ccd_inline ccd_list_t *ccdListPrev(ccd_list_t *l); + +/** + * Returns true if list is empty. + */ +_ccd_inline int ccdListEmpty(const ccd_list_t *head); + +/** + * Appends item to end of the list l. + */ +_ccd_inline void ccdListAppend(ccd_list_t *l, ccd_list_t *item); + +/** + * Removes item from list. + */ +_ccd_inline void ccdListDel(ccd_list_t *item); + + + +/// +/// INLINES: +/// + +_ccd_inline void ccdListInit(ccd_list_t *l) +{ + l->next = l; + l->prev = l; +} + +_ccd_inline ccd_list_t *ccdListNext(ccd_list_t *l) +{ + return l->next; +} + +_ccd_inline ccd_list_t *ccdListPrev(ccd_list_t *l) +{ + return l->prev; +} + +_ccd_inline int ccdListEmpty(const ccd_list_t *head) +{ + return head->next == head; +} + +_ccd_inline void ccdListAppend(ccd_list_t *l, ccd_list_t *newccd) +{ + newccd->prev = l->prev; + newccd->next = l; + l->prev->next = newccd; + l->prev = newccd; +} + +_ccd_inline void ccdListDel(ccd_list_t *item) +{ + item->next->prev = item->prev; + item->prev->next = item->next; + item->next = item; + item->prev = item; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* __CCD_LIST_H__ */ diff -Nru ode-0.11.1/libccd/src/ccd/polytope.h ode-0.14/libccd/src/ccd/polytope.h --- ode-0.11.1/libccd/src/ccd/polytope.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/polytope.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,322 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_POLYTOPE_H__ +#define __CCD_POLYTOPE_H__ + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#define CCD_PT_VERTEX 1 +#define CCD_PT_EDGE 2 +#define CCD_PT_FACE 3 + + +#define __CCD_PT_EL \ + int type; /*! type of element */ \ + ccd_real_t dist; /*! distance from origin */ \ + ccd_vec3_t witness; /*! witness point of projection of origin */ \ + ccd_list_t list; /*! list of elements of same type */ + +/** + * General polytope element. + * Could be vertex, edge or triangle. + */ +struct _ccd_pt_el_t { + __CCD_PT_EL +}; +typedef struct _ccd_pt_el_t ccd_pt_el_t; + +struct _ccd_pt_edge_t; +struct _ccd_pt_face_t; + +/** + * Polytope's vertex. + */ +struct _ccd_pt_vertex_t { + __CCD_PT_EL + + int id; + ccd_support_t v; + ccd_list_t edges; //!< List of edges +}; +typedef struct _ccd_pt_vertex_t ccd_pt_vertex_t; + +/** + * Polytope's edge. + */ +struct _ccd_pt_edge_t { + __CCD_PT_EL + + ccd_pt_vertex_t *vertex[2]; //!< Reference to vertices + struct _ccd_pt_face_t *faces[2]; //!< Reference to faces + + ccd_list_t vertex_list[2]; //!< List items in vertices' lists +}; +typedef struct _ccd_pt_edge_t ccd_pt_edge_t; + +/** + * Polytope's triangle faces. + */ +struct _ccd_pt_face_t { + __CCD_PT_EL + + ccd_pt_edge_t *edge[3]; //!< Reference to surrounding edges +}; +typedef struct _ccd_pt_face_t ccd_pt_face_t; + + +/** + * Struct containing polytope. + */ +struct _ccd_pt_t { + ccd_list_t vertices; //!< List of vertices + ccd_list_t edges; //!< List of edges + ccd_list_t faces; //!< List of faces + + ccd_pt_el_t *nearest; + ccd_real_t nearest_dist; + int nearest_type; +}; +typedef struct _ccd_pt_t ccd_pt_t; + + +void ccdPtInit(ccd_pt_t *pt); +void ccdPtDestroy(ccd_pt_t *pt); + +/** + * Returns vertices surrounding given triangle face. + */ +_ccd_inline void ccdPtFaceVec3(const ccd_pt_face_t *face, + ccd_vec3_t **a, + ccd_vec3_t **b, + ccd_vec3_t **c); +_ccd_inline void ccdPtFaceVertices(const ccd_pt_face_t *face, + ccd_pt_vertex_t **a, + ccd_pt_vertex_t **b, + ccd_pt_vertex_t **c); +_ccd_inline void ccdPtFaceEdges(const ccd_pt_face_t *f, + ccd_pt_edge_t **a, + ccd_pt_edge_t **b, + ccd_pt_edge_t **c); + +_ccd_inline void ccdPtEdgeVec3(const ccd_pt_edge_t *e, + ccd_vec3_t **a, + ccd_vec3_t **b); +_ccd_inline void ccdPtEdgeVertices(const ccd_pt_edge_t *e, + ccd_pt_vertex_t **a, + ccd_pt_vertex_t **b); +_ccd_inline void ccdPtEdgeFaces(const ccd_pt_edge_t *e, + ccd_pt_face_t **f1, + ccd_pt_face_t **f2); + + +/** + * Adds vertex to polytope and returns pointer to newly created vertex. + */ +ccd_pt_vertex_t *ccdPtAddVertex(ccd_pt_t *pt, const ccd_support_t *v); +_ccd_inline ccd_pt_vertex_t *ccdPtAddVertexCoords(ccd_pt_t *pt, + ccd_real_t x, ccd_real_t y, ccd_real_t z); + +/** + * Adds edge to polytope. + */ +ccd_pt_edge_t *ccdPtAddEdge(ccd_pt_t *pt, ccd_pt_vertex_t *v1, + ccd_pt_vertex_t *v2); + +/** + * Adds face to polytope. + */ +ccd_pt_face_t *ccdPtAddFace(ccd_pt_t *pt, ccd_pt_edge_t *e1, + ccd_pt_edge_t *e2, + ccd_pt_edge_t *e3); + +/** + * Deletes vertex from polytope. + * Returns 0 on success, -1 otherwise. + */ +_ccd_inline int ccdPtDelVertex(ccd_pt_t *pt, ccd_pt_vertex_t *); +_ccd_inline int ccdPtDelEdge(ccd_pt_t *pt, ccd_pt_edge_t *); +_ccd_inline int ccdPtDelFace(ccd_pt_t *pt, ccd_pt_face_t *); + + +/** + * Recompute distances from origin for all elements in pt. + */ +void ccdPtRecomputeDistances(ccd_pt_t *pt); + +/** + * Returns nearest element to origin. + */ +ccd_pt_el_t *ccdPtNearest(ccd_pt_t *pt); + + +void ccdPtDumpSVT(ccd_pt_t *pt, const char *fn); +void ccdPtDumpSVT2(ccd_pt_t *pt, FILE *); + + +/**** INLINES ****/ +_ccd_inline ccd_pt_vertex_t *ccdPtAddVertexCoords(ccd_pt_t *pt, + ccd_real_t x, ccd_real_t y, ccd_real_t z) +{ + ccd_support_t s; + ccdVec3Set(&s.v, x, y, z); + return ccdPtAddVertex(pt, &s); +} + +_ccd_inline int ccdPtDelVertex(ccd_pt_t *pt, ccd_pt_vertex_t *v) +{ + // test if any edge is connected to this vertex + if (!ccdListEmpty(&v->edges)) + return -1; + + // delete vertex from main list + ccdListDel(&v->list); + + if ((void *)pt->nearest == (void *)v){ + pt->nearest = NULL; + } + + free(v); + return 0; +} + +_ccd_inline int ccdPtDelEdge(ccd_pt_t *pt, ccd_pt_edge_t *e) +{ + // text if any face is connected to this edge (faces[] is always + // aligned to lower indices) + if (e->faces[0] != NULL) + return -1; + + // disconnect edge from lists of edges in vertex struct + ccdListDel(&e->vertex_list[0]); + ccdListDel(&e->vertex_list[1]); + + // disconnect edge from main list + ccdListDel(&e->list); + + if ((void *)pt->nearest == (void *)e){ + pt->nearest = NULL; + } + + free(e); + return 0; +} + +_ccd_inline int ccdPtDelFace(ccd_pt_t *pt, ccd_pt_face_t *f) +{ + ccd_pt_edge_t *e; + size_t i; + + // remove face from edges' recerence lists + for (i = 0; i < 3; i++){ + e = f->edge[i]; + if (e->faces[0] == f){ + e->faces[0] = e->faces[1]; + } + e->faces[1] = NULL; + } + + // remove face from list of all faces + ccdListDel(&f->list); + + if ((void *)pt->nearest == (void *)f){ + pt->nearest = NULL; + } + + free(f); + return 0; +} + +_ccd_inline void ccdPtFaceVec3(const ccd_pt_face_t *face, + ccd_vec3_t **a, + ccd_vec3_t **b, + ccd_vec3_t **c) +{ + *a = &face->edge[0]->vertex[0]->v.v; + *b = &face->edge[0]->vertex[1]->v.v; + + if (face->edge[1]->vertex[0] != face->edge[0]->vertex[0] + && face->edge[1]->vertex[0] != face->edge[0]->vertex[1]){ + *c = &face->edge[1]->vertex[0]->v.v; + }else{ + *c = &face->edge[1]->vertex[1]->v.v; + } +} + +_ccd_inline void ccdPtFaceVertices(const ccd_pt_face_t *face, + ccd_pt_vertex_t **a, + ccd_pt_vertex_t **b, + ccd_pt_vertex_t **c) +{ + *a = face->edge[0]->vertex[0]; + *b = face->edge[0]->vertex[1]; + + if (face->edge[1]->vertex[0] != face->edge[0]->vertex[0] + && face->edge[1]->vertex[0] != face->edge[0]->vertex[1]){ + *c = face->edge[1]->vertex[0]; + }else{ + *c = face->edge[1]->vertex[1]; + } +} + +_ccd_inline void ccdPtFaceEdges(const ccd_pt_face_t *f, + ccd_pt_edge_t **a, + ccd_pt_edge_t **b, + ccd_pt_edge_t **c) +{ + *a = f->edge[0]; + *b = f->edge[1]; + *c = f->edge[2]; +} + +_ccd_inline void ccdPtEdgeVec3(const ccd_pt_edge_t *e, + ccd_vec3_t **a, + ccd_vec3_t **b) +{ + *a = &e->vertex[0]->v.v; + *b = &e->vertex[1]->v.v; +} + +_ccd_inline void ccdPtEdgeVertices(const ccd_pt_edge_t *e, + ccd_pt_vertex_t **a, + ccd_pt_vertex_t **b) +{ + *a = e->vertex[0]; + *b = e->vertex[1]; +} + +_ccd_inline void ccdPtEdgeFaces(const ccd_pt_edge_t *e, + ccd_pt_face_t **f1, + ccd_pt_face_t **f2) +{ + *f1 = e->faces[0]; + *f2 = e->faces[1]; +} + + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* __CCD_POLYTOPE_H__ */ diff -Nru ode-0.11.1/libccd/src/ccd/precision.h.in ode-0.14/libccd/src/ccd/precision.h.in --- ode-0.11.1/libccd/src/ccd/precision.h.in 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/precision.h.in 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,14 @@ +#ifndef __CCD_PRECISION_H__ +#define __CCD_PRECISION_H__ + +/* define either CCD_SINGLE or CCD_DOUBLE */ + +#if defined(CCD_IDESINGLE) +#define CCD_SINGLE +#elif defined(CCD_IDEDOUBLE) +#define CCD_DOUBLE +#else +#define @CCD_PRECISION@ +#endif + +#endif diff -Nru ode-0.11.1/libccd/src/ccd/quat.h ode-0.14/libccd/src/ccd/quat.h --- ode-0.11.1/libccd/src/ccd/quat.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/quat.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,245 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_QUAT_H__ +#define __CCD_QUAT_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct _ccd_quat_t { + ccd_real_t q[4]; //!< x, y, z, w +}; +typedef struct _ccd_quat_t ccd_quat_t; + +#define CCD_QUAT(name, x, y, z, w) \ + ccd_quat_t name = { {x, y, z, w} } + +_ccd_inline ccd_real_t ccdQuatLen2(const ccd_quat_t *q); +_ccd_inline ccd_real_t ccdQuatLen(const ccd_quat_t *q); + +_ccd_inline void ccdQuatSet(ccd_quat_t *q, ccd_real_t x, ccd_real_t y, ccd_real_t z, ccd_real_t w); +_ccd_inline void ccdQuatCopy(ccd_quat_t *dest, const ccd_quat_t *src); + +_ccd_inline int ccdQuatNormalize(ccd_quat_t *q); + +_ccd_inline void ccdQuatSetAngleAxis(ccd_quat_t *q, + ccd_real_t angle, const ccd_vec3_t *axis); + +_ccd_inline void ccdQuatScale(ccd_quat_t *q, ccd_real_t k); + +/** + * q = q * q2 + */ +_ccd_inline void ccdQuatMul(ccd_quat_t *q, const ccd_quat_t *q2); + +/** + * q = a * b + */ +_ccd_inline void ccdQuatMul2(ccd_quat_t *q, + const ccd_quat_t *a, const ccd_quat_t *b); + +/** + * Inverts quaternion. + * Returns 0 on success. + */ +_ccd_inline int ccdQuatInvert(ccd_quat_t *q); +_ccd_inline int ccdQuatInvert2(ccd_quat_t *dest, const ccd_quat_t *src); + + +/** + * Rotate vector v by quaternion q. + */ +_ccd_inline void ccdQuatRotVec(ccd_vec3_t *v, const ccd_quat_t *q); + + +/**** INLINES ****/ +_ccd_inline ccd_real_t ccdQuatLen2(const ccd_quat_t *q) +{ + ccd_real_t len; + + len = q->q[0] * q->q[0]; + len += q->q[1] * q->q[1]; + len += q->q[2] * q->q[2]; + len += q->q[3] * q->q[3]; + + return len; +} + +_ccd_inline ccd_real_t ccdQuatLen(const ccd_quat_t *q) +{ + return CCD_SQRT(ccdQuatLen2(q)); +} + +_ccd_inline void ccdQuatSet(ccd_quat_t *q, ccd_real_t x, ccd_real_t y, ccd_real_t z, ccd_real_t w) +{ + q->q[0] = x; + q->q[1] = y; + q->q[2] = z; + q->q[3] = w; +} + +_ccd_inline void ccdQuatCopy(ccd_quat_t *dest, const ccd_quat_t *src) +{ + *dest = *src; +} + + +_ccd_inline int ccdQuatNormalize(ccd_quat_t *q) +{ + ccd_real_t len = ccdQuatLen(q); + if (len < CCD_EPS) + return 0; + + ccdQuatScale(q, CCD_ONE / len); + return 1; +} + +_ccd_inline void ccdQuatSetAngleAxis(ccd_quat_t *q, + ccd_real_t angle, const ccd_vec3_t *axis) +{ + ccd_real_t a, x, y, z, n, s; + + a = angle/2; + x = ccdVec3X(axis); + y = ccdVec3Y(axis); + z = ccdVec3Z(axis); + n = CCD_SQRT(x*x + y*y + z*z); + + // axis==0? (treat this the same as angle==0 with an arbitrary axis) + if (n < CCD_EPS){ + q->q[0] = q->q[1] = q->q[2] = CCD_ZERO; + q->q[3] = CCD_ONE; + }else{ + s = sin(a)/n; + + q->q[3] = cos(a); + q->q[0] = x*s; + q->q[1] = y*s; + q->q[2] = z*s; + + ccdQuatNormalize(q); + } +} + + +_ccd_inline void ccdQuatScale(ccd_quat_t *q, ccd_real_t k) +{ + size_t i; + for (i = 0; i < 4; i++) + q->q[i] *= k; +} + +_ccd_inline void ccdQuatMul(ccd_quat_t *q, const ccd_quat_t *q2) +{ + ccd_quat_t a; + ccdQuatCopy(&a, q); + ccdQuatMul2(q, &a, q2); +} + +_ccd_inline void ccdQuatMul2(ccd_quat_t *q, + const ccd_quat_t *a, const ccd_quat_t *b) +{ + q->q[0] = a->q[3] * b->q[0] + + a->q[0] * b->q[3] + + a->q[1] * b->q[2] + - a->q[2] * b->q[1]; + q->q[1] = a->q[3] * b->q[1] + + a->q[1] * b->q[3] + - a->q[0] * b->q[2] + + a->q[2] * b->q[0]; + q->q[2] = a->q[3] * b->q[2] + + a->q[2] * b->q[3] + + a->q[0] * b->q[1] + - a->q[1] * b->q[0]; + q->q[3] = a->q[3] * b->q[3] + - a->q[0] * b->q[0] + - a->q[1] * b->q[1] + - a->q[2] * b->q[2]; +} + +_ccd_inline int ccdQuatInvert(ccd_quat_t *q) +{ + ccd_real_t len2 = ccdQuatLen2(q); + if (len2 < CCD_EPS) + return -1; + + len2 = CCD_ONE / len2; + + q->q[0] = -q->q[0] * len2; + q->q[1] = -q->q[1] * len2; + q->q[2] = -q->q[2] * len2; + q->q[3] = q->q[3] * len2; + + return 0; +} +_ccd_inline int ccdQuatInvert2(ccd_quat_t *dest, const ccd_quat_t *src) +{ + ccdQuatCopy(dest, src); + return ccdQuatInvert(dest); +} + +_ccd_inline void ccdQuatRotVec(ccd_vec3_t *v, const ccd_quat_t *q) +{ + ccd_real_t w, x, y, z, ww, xx, yy, zz, wx, wy, wz, xy, xz, yz; + ccd_real_t vx, vy, vz; + + w = q->q[3]; + x = q->q[0]; + y = q->q[1]; + z = q->q[2]; + ww = w*w; + xx = x*x; + yy = y*y; + zz = z*z; + wx = w*x; + wy = w*y; + wz = w*z; + xy = x*y; + xz = x*z; + yz = y*z; + + vx = ww * ccdVec3X(v) + + xx * ccdVec3X(v) + - yy * ccdVec3X(v) + - zz * ccdVec3X(v) + + 2 * ((xy - wz) * ccdVec3Y(v) + + (xz + wy) * ccdVec3Z(v)); + vy = ww * ccdVec3Y(v) + - xx * ccdVec3Y(v) + + yy * ccdVec3Y(v) + - zz * ccdVec3Y(v) + + 2 * ((xy + wz) * ccdVec3X(v) + + (yz - wx) * ccdVec3Z(v)); + vz = ww * ccdVec3Z(v) + - xx * ccdVec3Z(v) + - yy * ccdVec3Z(v) + + zz * ccdVec3Z(v) + + 2 * ((xz - wy) * ccdVec3X(v) + + (yz + wx) * ccdVec3Y(v)); + ccdVec3Set(v, vx, vy, vz); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* __CCD_QUAT_H__ */ diff -Nru ode-0.11.1/libccd/src/ccd/simplex.h ode-0.14/libccd/src/ccd/simplex.h --- ode-0.11.1/libccd/src/ccd/simplex.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/simplex.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,104 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_SIMPLEX_H__ +#define __CCD_SIMPLEX_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct _ccd_simplex_t { + ccd_support_t ps[4]; + int last; /*!< index of last added point*/ +}; +typedef struct _ccd_simplex_t ccd_simplex_t; + + +_ccd_inline void ccdSimplexInit(ccd_simplex_t *s); +_ccd_inline int ccdSimplexSize(const ccd_simplex_t *s); +_ccd_inline const ccd_support_t *ccdSimplexLast(const ccd_simplex_t *s); +_ccd_inline const ccd_support_t *ccdSimplexPoint(const ccd_simplex_t *s, int idx); +_ccd_inline ccd_support_t *ccdSimplexPointW(ccd_simplex_t *s, int idx); + +_ccd_inline void ccdSimplexAdd(ccd_simplex_t *s, const ccd_support_t *v); +_ccd_inline void ccdSimplexSet(ccd_simplex_t *s, size_t pos, const ccd_support_t *a); +_ccd_inline void ccdSimplexSetSize(ccd_simplex_t *s, int size); +_ccd_inline void ccdSimplexSwap(ccd_simplex_t *s, size_t pos1, size_t pos2); + + +/**** INLINES ****/ + +_ccd_inline void ccdSimplexInit(ccd_simplex_t *s) +{ + s->last = -1; +} + +_ccd_inline int ccdSimplexSize(const ccd_simplex_t *s) +{ + return s->last + 1; +} + +_ccd_inline const ccd_support_t *ccdSimplexLast(const ccd_simplex_t *s) +{ + return ccdSimplexPoint(s, s->last); +} + +_ccd_inline const ccd_support_t *ccdSimplexPoint(const ccd_simplex_t *s, int idx) +{ + /* here is no check on boundaries */ + return &s->ps[idx]; +} +_ccd_inline ccd_support_t *ccdSimplexPointW(ccd_simplex_t *s, int idx) +{ + return &s->ps[idx]; +} + +_ccd_inline void ccdSimplexAdd(ccd_simplex_t *s, const ccd_support_t *v) +{ + /* here is no check on boundaries in sake of speed */ + ++s->last; + ccdSupportCopy(s->ps + s->last, v); +} + +_ccd_inline void ccdSimplexSet(ccd_simplex_t *s, size_t pos, const ccd_support_t *a) +{ + ccdSupportCopy(s->ps + pos, a); +} + +_ccd_inline void ccdSimplexSetSize(ccd_simplex_t *s, int size) +{ + s->last = size - 1; +} + +_ccd_inline void ccdSimplexSwap(ccd_simplex_t *s, size_t pos1, size_t pos2) +{ + ccd_support_t supp; + + ccdSupportCopy(&supp, &s->ps[pos1]); + ccdSupportCopy(&s->ps[pos1], &s->ps[pos2]); + ccdSupportCopy(&s->ps[pos2], &supp); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* __CCD_SIMPLEX_H__ */ diff -Nru ode-0.11.1/libccd/src/ccd/support.h ode-0.14/libccd/src/ccd/support.h --- ode-0.11.1/libccd/src/ccd/support.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/support.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,57 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_SUPPORT_H__ +#define __CCD_SUPPORT_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct _ccd_support_t { + ccd_vec3_t v; /*!< Support point in minkowski sum*/ + ccd_vec3_t v1; /*!< Support point in obj1*/ + ccd_vec3_t v2; /*!< Support point in obj2*/ +}; +typedef struct _ccd_support_t ccd_support_t; + +_ccd_inline void ccdSupportCopy(ccd_support_t *, const ccd_support_t *s); + +/** + * Computes support point of obj1 and obj2 in direction dir. + * Support point is returned via supp. + */ +void __ccdSupport(const void *obj1, const void *obj2, + const ccd_vec3_t *dir, const ccd_t *ccd, + ccd_support_t *supp); + + +/**** INLINES ****/ +_ccd_inline void ccdSupportCopy(ccd_support_t *d, const ccd_support_t *s) +{ + *d = *s; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* __CCD_SUPPORT_H__ */ diff -Nru ode-0.11.1/libccd/src/ccd/vec3.h ode-0.14/libccd/src/ccd/vec3.h --- ode-0.11.1/libccd/src/ccd/vec3.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd/vec3.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,337 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010,2011 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#ifndef __CCD_VEC3_H__ +#define __CCD_VEC3_H__ + +#include +#include +#include + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#ifndef CCD_SINGLE +# ifndef CCD_DOUBLE +# error You must define CCD_SINGLE or CCD_DOUBLE +# endif /* CCD_DOUBLE */ +#endif /* CCD_SINGLE */ + + +#if defined(_MSC_VER) +/* Define fmin, fmax, fminf, fmaxf which are missing from MSVC (up to VS2005 at least) */ +static __inline double fmin(double x, double y) { return __min(x, y); } +static __inline double fmax(double x, double y) { return __max(x, y); } +static __inline float fminf(float x, float y) { return __min(x, y); } +static __inline float fmaxf(float x, float y) { return __max(x, y); } + +#endif /* #if defined(_MSC_VER) */ + + +#ifdef CCD_SINGLE +# ifdef CCD_DOUBLE +# error You can define either CCD_SINGLE or CCD_DOUBLE, not both! +# endif /* CCD_DOUBLE */ + +typedef float ccd_real_t; + +/*# define CCD_EPS 1E-6*/ +# define CCD_EPS FLT_EPSILON + +# define CCD_REAL_MAX FLT_MAX + +# define CCD_REAL(x) (x ## f) /*!< form a constant */ +# define CCD_SQRT(x) (sqrtf(x)) /*!< square root */ +# define CCD_FABS(x) (fabsf(x)) /*!< absolute value */ +# define CCD_FMAX(x, y) (fmaxf((x), (y))) /*!< maximum of two floats */ +# define CCD_FMIN(x, y) (fminf((x), (y))) /*!< minimum of two floats */ +#endif /* CCD_SINGLE */ + +#ifdef CCD_DOUBLE +typedef double ccd_real_t; + +/*# define CCD_EPS 1E-10*/ +# define CCD_EPS DBL_EPSILON + +# define CCD_REAL_MAX DBL_MAX + +# define CCD_REAL(x) (x) /*!< form a constant */ +# define CCD_SQRT(x) (sqrt(x)) /*!< square root */ +# define CCD_FABS(x) (fabs(x)) /*!< absolute value */ +# define CCD_FMAX(x, y) (fmax((x), (y))) /*!< maximum of two floats */ +# define CCD_FMIN(x, y) (fmin((x), (y))) /*!< minimum of two floats */ +#endif /* CCD_DOUBLE */ + +#define CCD_ONE CCD_REAL(1.) +#define CCD_ZERO CCD_REAL(0.) + +struct _ccd_vec3_t { + ccd_real_t v[3]; +}; +typedef struct _ccd_vec3_t ccd_vec3_t; + + +/** + * Holds origin (0,0,0) - this variable is meant to be read-only! + */ +extern ccd_vec3_t *ccd_vec3_origin; + +/** + * Array of points uniformly distributed on unit sphere. + */ +extern ccd_vec3_t *ccd_points_on_sphere; +extern size_t ccd_points_on_sphere_len; + +/** Returns sign of value. */ +_ccd_inline int ccdSign(ccd_real_t val); +/** Returns true if val is zero. **/ +_ccd_inline int ccdIsZero(ccd_real_t val); +/** Returns true if a and b equal. **/ +_ccd_inline int ccdEq(ccd_real_t a, ccd_real_t b); + + +#define CCD_VEC3_STATIC(x, y, z) \ + { { (x), (y), (z) } } + +#define CCD_VEC3(name, x, y, z) \ + ccd_vec3_t name = CCD_VEC3_STATIC((x), (y), (z)) + +_ccd_inline ccd_real_t ccdVec3X(const ccd_vec3_t *v); +_ccd_inline ccd_real_t ccdVec3Y(const ccd_vec3_t *v); +_ccd_inline ccd_real_t ccdVec3Z(const ccd_vec3_t *v); + +/** + * Returns true if a and b equal. + */ +_ccd_inline int ccdVec3Eq(const ccd_vec3_t *a, const ccd_vec3_t *b); + +/** + * Returns squared length of vector. + */ +_ccd_inline ccd_real_t ccdVec3Len2(const ccd_vec3_t *v); + +/** + * Returns distance between a and b. + */ +_ccd_inline ccd_real_t ccdVec3Dist2(const ccd_vec3_t *a, const ccd_vec3_t *b); + + +_ccd_inline void ccdVec3Set(ccd_vec3_t *v, ccd_real_t x, ccd_real_t y, ccd_real_t z); + +/** + * v = w + */ +_ccd_inline void ccdVec3Copy(ccd_vec3_t *v, const ccd_vec3_t *w); + +/** + * Substracts coordinates of vector w from vector v. v = v - w + */ +_ccd_inline void ccdVec3Sub(ccd_vec3_t *v, const ccd_vec3_t *w); + +/** + * Adds coordinates of vector w to vector v. v = v + w + */ +_ccd_inline void ccdVec3Add(ccd_vec3_t *v, const ccd_vec3_t *w); + +/** + * d = v - w + */ +_ccd_inline void ccdVec3Sub2(ccd_vec3_t *d, const ccd_vec3_t *v, const ccd_vec3_t *w); + +/** + * d = d * k; + */ +_ccd_inline void ccdVec3Scale(ccd_vec3_t *d, ccd_real_t k); + +/** + * Normalizes given vector to unit length. + */ +_ccd_inline void ccdVec3Normalize(ccd_vec3_t *d); + + +/** + * Dot product of two vectors. + */ +_ccd_inline ccd_real_t ccdVec3Dot(const ccd_vec3_t *a, const ccd_vec3_t *b); + +/** + * Cross product: d = a x b. + */ +_ccd_inline void ccdVec3Cross(ccd_vec3_t *d, const ccd_vec3_t *a, const ccd_vec3_t *b); + + +/** + * Returns distance2 of point P to segment ab. + * If witness is non-NULL it is filled with coordinates of point from which + * was computaed distance to point P. + */ +ccd_real_t ccdVec3PointSegmentDist2(const ccd_vec3_t *P, + const ccd_vec3_t *a, const ccd_vec3_t *b, + ccd_vec3_t *witness); + +/** + * Returns distance2 of point P from triangle formed by triplet a, b, c. + * If witness vector is provided it is filled with coordinates of point + * from which was computed distance to point P. + */ +ccd_real_t ccdVec3PointTriDist2(const ccd_vec3_t *P, + const ccd_vec3_t *a, const ccd_vec3_t *b, + const ccd_vec3_t *c, + ccd_vec3_t *witness); + + +/**** INLINES ****/ +_ccd_inline int ccdSign(ccd_real_t val) +{ + if (ccdIsZero(val)){ + return 0; + }else if (val < CCD_ZERO){ + return -1; + } + return 1; +} + +_ccd_inline int ccdIsZero(ccd_real_t val) +{ + return CCD_FABS(val) < CCD_EPS; +} + +_ccd_inline int ccdEq(ccd_real_t _a, ccd_real_t _b) +{ + ccd_real_t ab; + ccd_real_t a, b; + + ab = CCD_FABS(_a - _b); + if (CCD_FABS(ab) < CCD_EPS) + return 1; + + a = CCD_FABS(_a); + b = CCD_FABS(_b); + if (b > a){ + return ab < CCD_EPS * b; + }else{ + return ab < CCD_EPS * a; + } +} + + +_ccd_inline ccd_real_t ccdVec3X(const ccd_vec3_t *v) +{ + return v->v[0]; +} + +_ccd_inline ccd_real_t ccdVec3Y(const ccd_vec3_t *v) +{ + return v->v[1]; +} + +_ccd_inline ccd_real_t ccdVec3Z(const ccd_vec3_t *v) +{ + return v->v[2]; +} + +_ccd_inline int ccdVec3Eq(const ccd_vec3_t *a, const ccd_vec3_t *b) +{ + return ccdEq(ccdVec3X(a), ccdVec3X(b)) + && ccdEq(ccdVec3Y(a), ccdVec3Y(b)) + && ccdEq(ccdVec3Z(a), ccdVec3Z(b)); +} + +_ccd_inline ccd_real_t ccdVec3Len2(const ccd_vec3_t *v) +{ + return ccdVec3Dot(v, v); +} + +_ccd_inline ccd_real_t ccdVec3Dist2(const ccd_vec3_t *a, const ccd_vec3_t *b) +{ + ccd_vec3_t ab; + ccdVec3Sub2(&ab, a, b); + return ccdVec3Len2(&ab); +} + +_ccd_inline void ccdVec3Set(ccd_vec3_t *v, ccd_real_t x, ccd_real_t y, ccd_real_t z) +{ + v->v[0] = x; + v->v[1] = y; + v->v[2] = z; +} + +_ccd_inline void ccdVec3Copy(ccd_vec3_t *v, const ccd_vec3_t *w) +{ + *v = *w; +} + +_ccd_inline void ccdVec3Sub(ccd_vec3_t *v, const ccd_vec3_t *w) +{ + v->v[0] -= w->v[0]; + v->v[1] -= w->v[1]; + v->v[2] -= w->v[2]; +} +_ccd_inline void ccdVec3Sub2(ccd_vec3_t *d, const ccd_vec3_t *v, const ccd_vec3_t *w) +{ + d->v[0] = v->v[0] - w->v[0]; + d->v[1] = v->v[1] - w->v[1]; + d->v[2] = v->v[2] - w->v[2]; +} + +_ccd_inline void ccdVec3Add(ccd_vec3_t *v, const ccd_vec3_t *w) +{ + v->v[0] += w->v[0]; + v->v[1] += w->v[1]; + v->v[2] += w->v[2]; +} + +_ccd_inline void ccdVec3Scale(ccd_vec3_t *d, ccd_real_t k) +{ + d->v[0] *= k; + d->v[1] *= k; + d->v[2] *= k; +} + +_ccd_inline void ccdVec3Normalize(ccd_vec3_t *d) +{ + ccd_real_t k = CCD_ONE / CCD_SQRT(ccdVec3Len2(d)); + ccdVec3Scale(d, k); +} + +_ccd_inline ccd_real_t ccdVec3Dot(const ccd_vec3_t *a, const ccd_vec3_t *b) +{ + ccd_real_t dot; + + dot = a->v[0] * b->v[0]; + dot += a->v[1] * b->v[1]; + dot += a->v[2] * b->v[2]; + return dot; +} + +_ccd_inline void ccdVec3Cross(ccd_vec3_t *d, const ccd_vec3_t *a, const ccd_vec3_t *b) +{ + d->v[0] = (a->v[1] * b->v[2]) - (a->v[2] * b->v[1]); + d->v[1] = (a->v[2] * b->v[0]) - (a->v[0] * b->v[2]); + d->v[2] = (a->v[0] * b->v[1]) - (a->v[1] * b->v[0]); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* __CCD_VEC3_H__ */ diff -Nru ode-0.11.1/libccd/src/ccd.c ode-0.14/libccd/src/ccd.c --- ode-0.11.1/libccd/src/ccd.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/ccd.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,954 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + + +/** Performs GJK algorithm. Returns 0 if intersection was found and simplex + * is filled with resulting polytope. */ +static int __ccdGJK(const void *obj1, const void *obj2, + const ccd_t *ccd, ccd_simplex_t *simplex); + +/** Performs GJK+EPA algorithm. Returns 0 if intersection was found and + * pt is filled with resulting polytope and nearest with pointer to + * nearest element (vertex, edge, face) of polytope to origin. */ +static int __ccdGJKEPA(const void *obj1, const void *obj2, + const ccd_t *ccd, + ccd_pt_t *pt, ccd_pt_el_t **nearest); + + +/** Returns true if simplex contains origin. + * This function also alteres simplex and dir according to further + * processing of GJK algorithm. */ +static int doSimplex(ccd_simplex_t *simplex, ccd_vec3_t *dir); +static int doSimplex2(ccd_simplex_t *simplex, ccd_vec3_t *dir); +static int doSimplex3(ccd_simplex_t *simplex, ccd_vec3_t *dir); +static int doSimplex4(ccd_simplex_t *simplex, ccd_vec3_t *dir); + +/** d = a x b x c */ +_ccd_inline void tripleCross(const ccd_vec3_t *a, const ccd_vec3_t *b, + const ccd_vec3_t *c, ccd_vec3_t *d); + + +/** Transforms simplex to polytope. It is assumed that simplex has 4 + * vertices. */ +static int simplexToPolytope4(const void *obj1, const void *obj2, + const ccd_t *ccd, + ccd_simplex_t *simplex, + ccd_pt_t *pt, ccd_pt_el_t **nearest); + +/** Transforms simplex to polytope, three vertices required */ +static int simplexToPolytope3(const void *obj1, const void *obj2, + const ccd_t *ccd, + const ccd_simplex_t *simplex, + ccd_pt_t *pt, ccd_pt_el_t **nearest); + +/** Transforms simplex to polytope, two vertices required */ +static int simplexToPolytope2(const void *obj1, const void *obj2, + const ccd_t *ccd, + const ccd_simplex_t *simplex, + ccd_pt_t *pt, ccd_pt_el_t **nearest); + +/** Expands polytope using new vertex v. */ +static void expandPolytope(ccd_pt_t *pt, ccd_pt_el_t *el, + const ccd_support_t *newv); + +/** Finds next support point (at stores it in out argument). + * Returns 0 on success, -1 otherwise */ +static int nextSupport(const void *obj1, const void *obj2, const ccd_t *ccd, + const ccd_pt_el_t *el, + ccd_support_t *out); + + + +void ccdFirstDirDefault(const void *o1, const void *o2, ccd_vec3_t *dir) +{ + ccdVec3Set(dir, CCD_ONE, CCD_ZERO, CCD_ZERO); +} + +int ccdGJKIntersect(const void *obj1, const void *obj2, const ccd_t *ccd) +{ + ccd_simplex_t simplex; + return __ccdGJK(obj1, obj2, ccd, &simplex) == 0; +} + +int ccdGJKSeparate(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_vec3_t *sep) +{ + ccd_pt_t polytope; + ccd_pt_el_t *nearest; + int ret; + + ccdPtInit(&polytope); + + ret = __ccdGJKEPA(obj1, obj2, ccd, &polytope, &nearest); + + // set separation vector + if (nearest) + ccdVec3Copy(sep, &nearest->witness); + + ccdPtDestroy(&polytope); + + return ret; +} + + +static int penEPAPosCmp(const void *a, const void *b) +{ + ccd_pt_vertex_t *v1, *v2; + v1 = *(ccd_pt_vertex_t **)a; + v2 = *(ccd_pt_vertex_t **)b; + + if (ccdEq(v1->dist, v2->dist)){ + return 0; + }else if (v1->dist < v2->dist){ + return -1; + }else{ + return 1; + } +} + +static void penEPAPos(const ccd_pt_t *pt, const ccd_pt_el_t *nearest, + ccd_vec3_t *pos) +{ + ccd_pt_vertex_t *v; + ccd_pt_vertex_t **vs; + size_t i, len; + ccd_real_t scale; + + // compute median + len = 0; + ccdListForEachEntry(&pt->vertices, v, ccd_pt_vertex_t, list){ + len++; + } + + vs = CCD_ALLOC_ARR(ccd_pt_vertex_t *, len); + i = 0; + ccdListForEachEntry(&pt->vertices, v, ccd_pt_vertex_t, list){ + vs[i++] = v; + } + + qsort(vs, len, sizeof(ccd_pt_vertex_t *), penEPAPosCmp); + + ccdVec3Set(pos, CCD_ZERO, CCD_ZERO, CCD_ZERO); + scale = CCD_ZERO; + if (len % 2 == 1) + len++; + + for (i = 0; i < len / 2; i++){ + ccdVec3Add(pos, &vs[i]->v.v1); + ccdVec3Add(pos, &vs[i]->v.v2); + scale += CCD_REAL(2.); + } + ccdVec3Scale(pos, CCD_ONE / scale); + + free(vs); +} + +int ccdGJKPenetration(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_real_t *depth, ccd_vec3_t *dir, ccd_vec3_t *pos) +{ + ccd_pt_t polytope; + ccd_pt_el_t *nearest; + int ret; + + ccdPtInit(&polytope); + + ret = __ccdGJKEPA(obj1, obj2, ccd, &polytope, &nearest); + + // set separation vector + if (ret == 0 && nearest){ + // compute depth of penetration + *depth = CCD_SQRT(nearest->dist); + + // store normalized direction vector + ccdVec3Copy(dir, &nearest->witness); + ccdVec3Normalize(dir); + + // compute position + penEPAPos(&polytope, nearest, pos); + } + + ccdPtDestroy(&polytope); + + return ret; +} + + + + +static int __ccdGJK(const void *obj1, const void *obj2, + const ccd_t *ccd, ccd_simplex_t *simplex) +{ + unsigned long iterations; + ccd_vec3_t dir; // direction vector + ccd_support_t last; // last support point + int do_simplex_res; + + // initialize simplex struct + ccdSimplexInit(simplex); + + // get first direction + ccd->first_dir(obj1, obj2, &dir); + // get first support point + __ccdSupport(obj1, obj2, &dir, ccd, &last); + // and add this point to simplex as last one + ccdSimplexAdd(simplex, &last); + + // set up direction vector to as (O - last) which is exactly -last + ccdVec3Copy(&dir, &last.v); + ccdVec3Scale(&dir, -CCD_ONE); + + // start iterations + for (iterations = 0UL; iterations < ccd->max_iterations; ++iterations) { + // obtain support point + __ccdSupport(obj1, obj2, &dir, ccd, &last); + + // check if farthest point in Minkowski difference in direction dir + // isn't somewhere before origin (the test on negative dot product) + // - because if it is, objects are not intersecting at all. + if (ccdVec3Dot(&last.v, &dir) < CCD_ZERO){ + return -1; // intersection not found + } + + // add last support vector to simplex + ccdSimplexAdd(simplex, &last); + + // if doSimplex returns 1 if objects intersect, -1 if objects don't + // intersect and 0 if algorithm should continue + do_simplex_res = doSimplex(simplex, &dir); + if (do_simplex_res == 1){ + return 0; // intersection found + }else if (do_simplex_res == -1){ + return -1; // intersection not found + } + + if (ccdIsZero(ccdVec3Len2(&dir))){ + return -1; // intersection not found + } + } + + // intersection wasn't found + return -1; +} + +static int __ccdGJKEPA(const void *obj1, const void *obj2, + const ccd_t *ccd, + ccd_pt_t *polytope, ccd_pt_el_t **nearest) +{ + ccd_simplex_t simplex; + ccd_support_t supp; // support point + int ret, size; + + *nearest = NULL; + + // run GJK and obtain terminal simplex + ret = __ccdGJK(obj1, obj2, ccd, &simplex); + if (ret != 0) + return -1; + + // transform simplex to polytope - simplex won't be used anymore + size = ccdSimplexSize(&simplex); + if (size == 4){ + if (simplexToPolytope4(obj1, obj2, ccd, &simplex, polytope, nearest) != 0){ + return 0;// touch contact + } + }else if (size == 3){ + if (simplexToPolytope3(obj1, obj2, ccd, &simplex, polytope, nearest) != 0){ + return 0; // touch contact + } + }else{ // size == 2 + if (simplexToPolytope2(obj1, obj2, ccd, &simplex, polytope, nearest) != 0){ + return 0; // touch contact + } + } + + while (1){ + // get triangle nearest to origin + *nearest = ccdPtNearest(polytope); + + // get next support point + if (nextSupport(obj1, obj2, ccd, *nearest, &supp) != 0) + break; + + // expand nearest triangle using new point - supp + expandPolytope(polytope, *nearest, &supp); + } + + return 0; +} + + + +static int doSimplex2(ccd_simplex_t *simplex, ccd_vec3_t *dir) +{ + const ccd_support_t *A, *B; + ccd_vec3_t AB, AO, tmp; + ccd_real_t dot; + + // get last added as A + A = ccdSimplexLast(simplex); + // get the other point + B = ccdSimplexPoint(simplex, 0); + // compute AB oriented segment + ccdVec3Sub2(&AB, &B->v, &A->v); + // compute AO vector + ccdVec3Copy(&AO, &A->v); + ccdVec3Scale(&AO, -CCD_ONE); + + // dot product AB . AO + dot = ccdVec3Dot(&AB, &AO); + + // check if origin doesn't lie on AB segment + ccdVec3Cross(&tmp, &AB, &AO); + if (ccdIsZero(ccdVec3Len2(&tmp)) && dot > CCD_ZERO){ + return 1; + } + + // check if origin is in area where AB segment is + if (ccdIsZero(dot) || dot < CCD_ZERO){ + // origin is in outside are of A + ccdSimplexSet(simplex, 0, A); + ccdSimplexSetSize(simplex, 1); + ccdVec3Copy(dir, &AO); + }else{ + // origin is in area where AB segment is + + // keep simplex untouched and set direction to + // AB x AO x AB + tripleCross(&AB, &AO, &AB, dir); + } + + return 0; +} + +static int doSimplex3(ccd_simplex_t *simplex, ccd_vec3_t *dir) +{ + const ccd_support_t *A, *B, *C; + ccd_vec3_t AO, AB, AC, ABC, tmp; + ccd_real_t dot, dist; + + // get last added as A + A = ccdSimplexLast(simplex); + // get the other points + B = ccdSimplexPoint(simplex, 1); + C = ccdSimplexPoint(simplex, 0); + + // check touching contact + dist = ccdVec3PointTriDist2(ccd_vec3_origin, &A->v, &B->v, &C->v, NULL); + if (ccdIsZero(dist)){ + return 1; + } + + // check if triangle is really triangle (has area > 0) + // if not simplex can't be expanded and thus no itersection is found + if (ccdVec3Eq(&A->v, &B->v) || ccdVec3Eq(&A->v, &C->v)){ + return -1; + } + + // compute AO vector + ccdVec3Copy(&AO, &A->v); + ccdVec3Scale(&AO, -CCD_ONE); + + // compute AB and AC segments and ABC vector (perpendircular to triangle) + ccdVec3Sub2(&AB, &B->v, &A->v); + ccdVec3Sub2(&AC, &C->v, &A->v); + ccdVec3Cross(&ABC, &AB, &AC); + + ccdVec3Cross(&tmp, &ABC, &AC); + dot = ccdVec3Dot(&tmp, &AO); + if (ccdIsZero(dot) || dot > CCD_ZERO){ + dot = ccdVec3Dot(&AC, &AO); + if (ccdIsZero(dot) || dot > CCD_ZERO){ + // C is already in place + ccdSimplexSet(simplex, 1, A); + ccdSimplexSetSize(simplex, 2); + tripleCross(&AC, &AO, &AC, dir); + }else{ +ccd_do_simplex3_45: + dot = ccdVec3Dot(&AB, &AO); + if (ccdIsZero(dot) || dot > CCD_ZERO){ + ccdSimplexSet(simplex, 0, B); + ccdSimplexSet(simplex, 1, A); + ccdSimplexSetSize(simplex, 2); + tripleCross(&AB, &AO, &AB, dir); + }else{ + ccdSimplexSet(simplex, 0, A); + ccdSimplexSetSize(simplex, 1); + ccdVec3Copy(dir, &AO); + } + } + }else{ + ccdVec3Cross(&tmp, &AB, &ABC); + dot = ccdVec3Dot(&tmp, &AO); + if (ccdIsZero(dot) || dot > CCD_ZERO){ + goto ccd_do_simplex3_45; + }else{ + dot = ccdVec3Dot(&ABC, &AO); + if (ccdIsZero(dot) || dot > CCD_ZERO){ + ccdVec3Copy(dir, &ABC); + }else{ + ccd_support_t Ctmp; + ccdSupportCopy(&Ctmp, C); + ccdSimplexSet(simplex, 0, B); + ccdSimplexSet(simplex, 1, &Ctmp); + + ccdVec3Copy(dir, &ABC); + ccdVec3Scale(dir, -CCD_ONE); + } + } + } + + return 0; +} + +static int doSimplex4(ccd_simplex_t *simplex, ccd_vec3_t *dir) +{ + const ccd_support_t *A, *B, *C, *D; + ccd_vec3_t AO, AB, AC, AD, ABC, ACD, ADB; + int B_on_ACD, C_on_ADB, D_on_ABC; + int AB_O, AC_O, AD_O; + ccd_real_t dist; + + // get last added as A + A = ccdSimplexLast(simplex); + // get the other points + B = ccdSimplexPoint(simplex, 2); + C = ccdSimplexPoint(simplex, 1); + D = ccdSimplexPoint(simplex, 0); + + // check if tetrahedron is really tetrahedron (has volume > 0) + // if it is not simplex can't be expanded and thus no intersection is + // found + dist = ccdVec3PointTriDist2(&A->v, &B->v, &C->v, &D->v, NULL); + if (ccdIsZero(dist)){ + return -1; + } + + // check if origin lies on some of tetrahedron's face - if so objects + // intersect + dist = ccdVec3PointTriDist2(ccd_vec3_origin, &A->v, &B->v, &C->v, NULL); + if (ccdIsZero(dist)) + return 1; + dist = ccdVec3PointTriDist2(ccd_vec3_origin, &A->v, &C->v, &D->v, NULL); + if (ccdIsZero(dist)) + return 1; + dist = ccdVec3PointTriDist2(ccd_vec3_origin, &A->v, &B->v, &D->v, NULL); + if (ccdIsZero(dist)) + return 1; + dist = ccdVec3PointTriDist2(ccd_vec3_origin, &B->v, &C->v, &D->v, NULL); + if (ccdIsZero(dist)) + return 1; + + // compute AO, AB, AC, AD segments and ABC, ACD, ADB normal vectors + ccdVec3Copy(&AO, &A->v); + ccdVec3Scale(&AO, -CCD_ONE); + ccdVec3Sub2(&AB, &B->v, &A->v); + ccdVec3Sub2(&AC, &C->v, &A->v); + ccdVec3Sub2(&AD, &D->v, &A->v); + ccdVec3Cross(&ABC, &AB, &AC); + ccdVec3Cross(&ACD, &AC, &AD); + ccdVec3Cross(&ADB, &AD, &AB); + + // side (positive or negative) of B, C, D relative to planes ACD, ADB + // and ABC respectively + B_on_ACD = ccdSign(ccdVec3Dot(&ACD, &AB)); + C_on_ADB = ccdSign(ccdVec3Dot(&ADB, &AC)); + D_on_ABC = ccdSign(ccdVec3Dot(&ABC, &AD)); + + // whether origin is on same side of ACD, ADB, ABC as B, C, D + // respectively + AB_O = ccdSign(ccdVec3Dot(&ACD, &AO)) == B_on_ACD; + AC_O = ccdSign(ccdVec3Dot(&ADB, &AO)) == C_on_ADB; + AD_O = ccdSign(ccdVec3Dot(&ABC, &AO)) == D_on_ABC; + + if (AB_O && AC_O && AD_O){ + // origin is in tetrahedron + return 1; + + // rearrange simplex to triangle and call doSimplex3() + }else if (!AB_O){ + // B is farthest from the origin among all of the tetrahedron's + // points, so remove it from the list and go on with the triangle + // case + + // D and C are in place + ccdSimplexSet(simplex, 2, A); + ccdSimplexSetSize(simplex, 3); + }else if (!AC_O){ + // C is farthest + ccdSimplexSet(simplex, 1, D); + ccdSimplexSet(simplex, 0, B); + ccdSimplexSet(simplex, 2, A); + ccdSimplexSetSize(simplex, 3); + }else{ // (!AD_O) + ccdSimplexSet(simplex, 0, C); + ccdSimplexSet(simplex, 1, B); + ccdSimplexSet(simplex, 2, A); + ccdSimplexSetSize(simplex, 3); + } + + return doSimplex3(simplex, dir); +} + +static int doSimplex(ccd_simplex_t *simplex, ccd_vec3_t *dir) +{ + if (ccdSimplexSize(simplex) == 2){ + // simplex contains segment only one segment + return doSimplex2(simplex, dir); + }else if (ccdSimplexSize(simplex) == 3){ + // simplex contains triangle + return doSimplex3(simplex, dir); + }else{ // ccdSimplexSize(simplex) == 4 + // tetrahedron - this is the only shape which can encapsule origin + // so doSimplex4() also contains test on it + return doSimplex4(simplex, dir); + } +} + +_ccd_inline void tripleCross(const ccd_vec3_t *a, const ccd_vec3_t *b, + const ccd_vec3_t *c, ccd_vec3_t *d) +{ + ccd_vec3_t e; + ccdVec3Cross(&e, a, b); + ccdVec3Cross(d, &e, c); +} + + + +/** Transforms simplex to polytope. It is assumed that simplex has 4 + * vertices! */ +static int simplexToPolytope4(const void *obj1, const void *obj2, + const ccd_t *ccd, + ccd_simplex_t *simplex, + ccd_pt_t *pt, ccd_pt_el_t **nearest) +{ + const ccd_support_t *a, *b, *c, *d; + int use_polytope3; + ccd_real_t dist; + ccd_pt_vertex_t *v[4]; + ccd_pt_edge_t *e[6]; + size_t i; + + a = ccdSimplexPoint(simplex, 0); + b = ccdSimplexPoint(simplex, 1); + c = ccdSimplexPoint(simplex, 2); + d = ccdSimplexPoint(simplex, 3); + + // check if origin lies on some of tetrahedron's face - if so use + // simplexToPolytope3() + use_polytope3 = 0; + dist = ccdVec3PointTriDist2(ccd_vec3_origin, &a->v, &b->v, &c->v, NULL); + if (ccdIsZero(dist)){ + use_polytope3 = 1; + } + dist = ccdVec3PointTriDist2(ccd_vec3_origin, &a->v, &c->v, &d->v, NULL); + if (ccdIsZero(dist)){ + use_polytope3 = 1; + ccdSimplexSet(simplex, 1, c); + ccdSimplexSet(simplex, 2, d); + } + dist = ccdVec3PointTriDist2(ccd_vec3_origin, &a->v, &b->v, &d->v, NULL); + if (ccdIsZero(dist)){ + use_polytope3 = 1; + ccdSimplexSet(simplex, 2, d); + } + dist = ccdVec3PointTriDist2(ccd_vec3_origin, &b->v, &c->v, &d->v, NULL); + if (ccdIsZero(dist)){ + use_polytope3 = 1; + ccdSimplexSet(simplex, 0, b); + ccdSimplexSet(simplex, 1, c); + ccdSimplexSet(simplex, 2, d); + } + + if (use_polytope3){ + ccdSimplexSetSize(simplex, 3); + return simplexToPolytope3(obj1, obj2, ccd, simplex, pt, nearest); + } + + // no touching contact - simply create tetrahedron + for (i = 0; i < 4; i++){ + v[i] = ccdPtAddVertex(pt, ccdSimplexPoint(simplex, i)); + } + + e[0] = ccdPtAddEdge(pt, v[0], v[1]); + e[1] = ccdPtAddEdge(pt, v[1], v[2]); + e[2] = ccdPtAddEdge(pt, v[2], v[0]); + e[3] = ccdPtAddEdge(pt, v[3], v[0]); + e[4] = ccdPtAddEdge(pt, v[3], v[1]); + e[5] = ccdPtAddEdge(pt, v[3], v[2]); + + ccdPtAddFace(pt, e[0], e[1], e[2]); + ccdPtAddFace(pt, e[3], e[4], e[0]); + ccdPtAddFace(pt, e[4], e[5], e[1]); + ccdPtAddFace(pt, e[5], e[3], e[2]); + + return 0; +} + +/** Transforms simplex to polytope, three vertices required */ +static int simplexToPolytope3(const void *obj1, const void *obj2, + const ccd_t *ccd, + const ccd_simplex_t *simplex, + ccd_pt_t *pt, ccd_pt_el_t **nearest) +{ + const ccd_support_t *a, *b, *c; + ccd_support_t d, d2; + ccd_vec3_t ab, ac, dir; + ccd_pt_vertex_t *v[5]; + ccd_pt_edge_t *e[9]; + ccd_real_t dist, dist2; + + *nearest = NULL; + + a = ccdSimplexPoint(simplex, 0); + b = ccdSimplexPoint(simplex, 1); + c = ccdSimplexPoint(simplex, 2); + + // If only one triangle left from previous GJK run origin lies on this + // triangle. So it is necessary to expand triangle into two + // tetrahedrons connected with base (which is exactly abc triangle). + + // get next support point in direction of normal of triangle + ccdVec3Sub2(&ab, &b->v, &a->v); + ccdVec3Sub2(&ac, &c->v, &a->v); + ccdVec3Cross(&dir, &ab, &ac); + __ccdSupport(obj1, obj2, &dir, ccd, &d); + dist = ccdVec3PointTriDist2(&d.v, &a->v, &b->v, &c->v, NULL); + + // and second one take in opposite direction + ccdVec3Scale(&dir, -CCD_ONE); + __ccdSupport(obj1, obj2, &dir, ccd, &d2); + dist2 = ccdVec3PointTriDist2(&d2.v, &a->v, &b->v, &c->v, NULL); + + // check if face isn't already on edge of minkowski sum and thus we + // have touching contact + if (ccdIsZero(dist) || ccdIsZero(dist2)){ + v[0] = ccdPtAddVertex(pt, a); + v[1] = ccdPtAddVertex(pt, b); + v[2] = ccdPtAddVertex(pt, c); + e[0] = ccdPtAddEdge(pt, v[0], v[1]); + e[1] = ccdPtAddEdge(pt, v[1], v[2]); + e[2] = ccdPtAddEdge(pt, v[2], v[0]); + *nearest = (ccd_pt_el_t *)ccdPtAddFace(pt, e[0], e[1], e[2]); + + return -1; + } + + // form polyhedron + v[0] = ccdPtAddVertex(pt, a); + v[1] = ccdPtAddVertex(pt, b); + v[2] = ccdPtAddVertex(pt, c); + v[3] = ccdPtAddVertex(pt, &d); + v[4] = ccdPtAddVertex(pt, &d2); + + e[0] = ccdPtAddEdge(pt, v[0], v[1]); + e[1] = ccdPtAddEdge(pt, v[1], v[2]); + e[2] = ccdPtAddEdge(pt, v[2], v[0]); + + e[3] = ccdPtAddEdge(pt, v[3], v[0]); + e[4] = ccdPtAddEdge(pt, v[3], v[1]); + e[5] = ccdPtAddEdge(pt, v[3], v[2]); + + e[6] = ccdPtAddEdge(pt, v[4], v[0]); + e[7] = ccdPtAddEdge(pt, v[4], v[1]); + e[8] = ccdPtAddEdge(pt, v[4], v[2]); + + ccdPtAddFace(pt, e[3], e[4], e[0]); + ccdPtAddFace(pt, e[4], e[5], e[1]); + ccdPtAddFace(pt, e[5], e[3], e[2]); + + ccdPtAddFace(pt, e[6], e[7], e[0]); + ccdPtAddFace(pt, e[7], e[8], e[1]); + ccdPtAddFace(pt, e[8], e[6], e[2]); + + return 0; +} + +/** Transforms simplex to polytope, two vertices required */ +static int simplexToPolytope2(const void *obj1, const void *obj2, + const ccd_t *ccd, + const ccd_simplex_t *simplex, + ccd_pt_t *pt, ccd_pt_el_t **nearest) +{ + const ccd_support_t *a, *b; + ccd_vec3_t ab, ac, dir; + ccd_support_t supp[4]; + ccd_pt_vertex_t *v[6]; + ccd_pt_edge_t *e[12]; + size_t i; + int found; + + a = ccdSimplexPoint(simplex, 0); + b = ccdSimplexPoint(simplex, 1); + + // This situation is a bit tricky. If only one segment comes from + // previous run of GJK - it means that either this segment is on + // minkowski edge (and thus we have touch contact) or it it isn't and + // therefore segment is somewhere *inside* minkowski sum and it *must* + // be possible to fully enclose this segment with polyhedron formed by + // at least 8 triangle faces. + + // get first support point (any) + found = 0; + for (i = 0; i < ccd_points_on_sphere_len; i++){ + __ccdSupport(obj1, obj2, &ccd_points_on_sphere[i], ccd, &supp[0]); + if (!ccdVec3Eq(&a->v, &supp[0].v) && !ccdVec3Eq(&b->v, &supp[0].v)){ + found = 1; + break; + } + } + if (!found) + goto simplexToPolytope2_touching_contact; + + // get second support point in opposite direction than supp[0] + ccdVec3Copy(&dir, &supp[0].v); + ccdVec3Scale(&dir, -CCD_ONE); + __ccdSupport(obj1, obj2, &dir, ccd, &supp[1]); + if (ccdVec3Eq(&a->v, &supp[1].v) || ccdVec3Eq(&b->v, &supp[1].v)) + goto simplexToPolytope2_touching_contact; + + // next will be in direction of normal of triangle a,supp[0],supp[1] + ccdVec3Sub2(&ab, &supp[0].v, &a->v); + ccdVec3Sub2(&ac, &supp[1].v, &a->v); + ccdVec3Cross(&dir, &ab, &ac); + __ccdSupport(obj1, obj2, &dir, ccd, &supp[2]); + if (ccdVec3Eq(&a->v, &supp[2].v) || ccdVec3Eq(&b->v, &supp[2].v)) + goto simplexToPolytope2_touching_contact; + + // and last one will be in opposite direction + ccdVec3Scale(&dir, -CCD_ONE); + __ccdSupport(obj1, obj2, &dir, ccd, &supp[3]); + if (ccdVec3Eq(&a->v, &supp[3].v) || ccdVec3Eq(&b->v, &supp[3].v)) + goto simplexToPolytope2_touching_contact; + + goto simplexToPolytope2_not_touching_contact; +simplexToPolytope2_touching_contact: + v[0] = ccdPtAddVertex(pt, a); + v[1] = ccdPtAddVertex(pt, b); + *nearest = (ccd_pt_el_t *)ccdPtAddEdge(pt, v[0], v[1]); + return -1; + +simplexToPolytope2_not_touching_contact: + // form polyhedron + v[0] = ccdPtAddVertex(pt, a); + v[1] = ccdPtAddVertex(pt, &supp[0]); + v[2] = ccdPtAddVertex(pt, b); + v[3] = ccdPtAddVertex(pt, &supp[1]); + v[4] = ccdPtAddVertex(pt, &supp[2]); + v[5] = ccdPtAddVertex(pt, &supp[3]); + + e[0] = ccdPtAddEdge(pt, v[0], v[1]); + e[1] = ccdPtAddEdge(pt, v[1], v[2]); + e[2] = ccdPtAddEdge(pt, v[2], v[3]); + e[3] = ccdPtAddEdge(pt, v[3], v[0]); + + e[4] = ccdPtAddEdge(pt, v[4], v[0]); + e[5] = ccdPtAddEdge(pt, v[4], v[1]); + e[6] = ccdPtAddEdge(pt, v[4], v[2]); + e[7] = ccdPtAddEdge(pt, v[4], v[3]); + + e[8] = ccdPtAddEdge(pt, v[5], v[0]); + e[9] = ccdPtAddEdge(pt, v[5], v[1]); + e[10] = ccdPtAddEdge(pt, v[5], v[2]); + e[11] = ccdPtAddEdge(pt, v[5], v[3]); + + ccdPtAddFace(pt, e[4], e[5], e[0]); + ccdPtAddFace(pt, e[5], e[6], e[1]); + ccdPtAddFace(pt, e[6], e[7], e[2]); + ccdPtAddFace(pt, e[7], e[4], e[3]); + + ccdPtAddFace(pt, e[8], e[9], e[0]); + ccdPtAddFace(pt, e[9], e[10], e[1]); + ccdPtAddFace(pt, e[10], e[11], e[2]); + ccdPtAddFace(pt, e[11], e[8], e[3]); + + return 0; +} + +/** Expands polytope's tri by new vertex v. Triangle tri is replaced by + * three triangles each with one vertex in v. */ +static void expandPolytope(ccd_pt_t *pt, ccd_pt_el_t *el, + const ccd_support_t *newv) +{ + ccd_pt_vertex_t *v[5]; + ccd_pt_edge_t *e[8] = {0}; + ccd_pt_face_t *f[2]; + + + // element can be either segment or triangle + if (el->type == CCD_PT_EDGE){ + // In this case, segment should be replaced by new point. + // Simpliest case is when segment stands alone and in this case + // this segment is replaced by two other segments both connected to + // newv. + // Segment can be also connected to max two faces and in that case + // each face must be replaced by two other faces. To do this + // correctly it is necessary to have correctly ordered edges and + // vertices which is exactly what is done in following code. + // + + ccdPtEdgeVertices((const ccd_pt_edge_t *)el, &v[0], &v[2]); + + ccdPtEdgeFaces((ccd_pt_edge_t *)el, &f[0], &f[1]); + + if (f[0]){ + ccdPtFaceEdges(f[0], &e[0], &e[1], &e[2]); + if (e[0] == (ccd_pt_edge_t *)el){ + e[0] = e[2]; + }else if (e[1] == (ccd_pt_edge_t *)el){ + e[1] = e[2]; + } + ccdPtEdgeVertices(e[0], &v[1], &v[3]); + if (v[1] != v[0] && v[3] != v[0]){ + e[2] = e[0]; + e[0] = e[1]; + e[1] = e[2]; + if (v[1] == v[2]) + v[1] = v[3]; + }else{ + if (v[1] == v[0]) + v[1] = v[3]; + } + + if (f[1]){ + ccdPtFaceEdges(f[1], &e[2], &e[3], &e[4]); + if (e[2] == (ccd_pt_edge_t *)el){ + e[2] = e[4]; + }else if (e[3] == (ccd_pt_edge_t *)el){ + e[3] = e[4]; + } + ccdPtEdgeVertices(e[2], &v[3], &v[4]); + if (v[3] != v[2] && v[4] != v[2]){ + e[4] = e[2]; + e[2] = e[3]; + e[3] = e[4]; + if (v[3] == v[0]) + v[3] = v[4]; + }else{ + if (v[3] == v[2]) + v[3] = v[4]; + } + } + + + v[4] = ccdPtAddVertex(pt, newv); + + ccdPtDelFace(pt, f[0]); + if (f[1]){ + ccdPtDelFace(pt, f[1]); + ccdPtDelEdge(pt, (ccd_pt_edge_t *)el); + } + + e[4] = ccdPtAddEdge(pt, v[4], v[2]); + e[5] = ccdPtAddEdge(pt, v[4], v[0]); + e[6] = ccdPtAddEdge(pt, v[4], v[1]); + if (f[1]) + e[7] = ccdPtAddEdge(pt, v[4], v[3]); + + ccdPtAddFace(pt, e[1], e[4], e[6]); + ccdPtAddFace(pt, e[0], e[6], e[5]); + if (f[1]){ + ccdPtAddFace(pt, e[3], e[5], e[7]); + ccdPtAddFace(pt, e[4], e[7], e[2]); + }else{ + ccdPtAddFace(pt, e[4], e[5], (ccd_pt_edge_t *)el); + } + } + }else{ // el->type == CCD_PT_FACE + // replace triangle by tetrahedron without base (base would be the + // triangle that will be removed) + + // get triplet of surrounding edges and vertices of triangle face + ccdPtFaceEdges((const ccd_pt_face_t *)el, &e[0], &e[1], &e[2]); + ccdPtEdgeVertices(e[0], &v[0], &v[1]); + ccdPtEdgeVertices(e[1], &v[2], &v[3]); + + // following code sorts edges to have e[0] between vertices 0-1, + // e[1] between 1-2 and e[2] between 2-0 + if (v[2] != v[1] && v[3] != v[1]){ + // swap e[1] and e[2] + e[3] = e[1]; + e[1] = e[2]; + e[2] = e[3]; + } + if (v[3] != v[0] && v[3] != v[1]) + v[2] = v[3]; + + // remove triangle face + ccdPtDelFace(pt, (ccd_pt_face_t *)el); + + // expand triangle to tetrahedron + v[3] = ccdPtAddVertex(pt, newv); + e[3] = ccdPtAddEdge(pt, v[3], v[0]); + e[4] = ccdPtAddEdge(pt, v[3], v[1]); + e[5] = ccdPtAddEdge(pt, v[3], v[2]); + + ccdPtAddFace(pt, e[3], e[4], e[0]); + ccdPtAddFace(pt, e[4], e[5], e[1]); + ccdPtAddFace(pt, e[5], e[3], e[2]); + } +} + +/** Finds next support point (at stores it in out argument). + * Returns 0 on success, -1 otherwise */ +static int nextSupport(const void *obj1, const void *obj2, const ccd_t *ccd, + const ccd_pt_el_t *el, + ccd_support_t *out) +{ + ccd_vec3_t *a, *b, *c; + ccd_real_t dist; + + if (el->type == CCD_PT_VERTEX) + return -1; + + // touch contact + if (ccdIsZero(el->dist)) + return -1; + + __ccdSupport(obj1, obj2, &el->witness, ccd, out); + + if (el->type == CCD_PT_EDGE){ + // fetch end points of edge + ccdPtEdgeVec3((ccd_pt_edge_t *)el, &a, &b); + + // get distance from segment + dist = ccdVec3PointSegmentDist2(&out->v, a, b, NULL); + }else{ // el->type == CCD_PT_FACE + // fetch vertices of triangle face + ccdPtFaceVec3((ccd_pt_face_t *)el, &a, &b, &c); + + // check if new point can significantly expand polytope + dist = ccdVec3PointTriDist2(&out->v, a, b, c, NULL); + } + + if (dist < ccd->epa_tolerance) + return -1; + + return 0; +} diff -Nru ode-0.11.1/libccd/src/Makefile.am ode-0.14/libccd/src/Makefile.am --- ode-0.11.1/libccd/src/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,21 @@ +SUBDIRS = . testsuites + +AM_CFLAGS = -std=c99 + +noinst_LTLIBRARIES = libccd.la + +libccd_la_SOURCES = alloc.c ccd/alloc.h \ + ccd/compiler.h \ + ccd/dbg.h \ + ccd.c ccd/ccd.h \ + ccd/list.h \ + polytope.c ccd/polytope.h \ + ccd/quat.h \ + ccd/simplex.h \ + support.c ccd/support.h \ + vec3.c ccd/vec3.h \ + mpr.c + +nodist_libccd_la_SOURCES = ccd/precision.h + +EXTRA_DIST = ccd/precision.h.in diff -Nru ode-0.11.1/libccd/src/Makefile.include ode-0.14/libccd/src/Makefile.include --- ode-0.11.1/libccd/src/Makefile.include 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/Makefile.include 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,100 @@ +### +# libccd +# --------------------------------- +# Copyright (c)2010 Daniel Fiser +# +# +# This file is part of libccd. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file BDS-LICENSE for details or see +# . +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +## + +CC ?= gcc +M4 ?= m4 +PYTHON ?= python + +SYSTEM = $(shell uname) + +SYSTEM_CXXFLAGS = +SYSTEM_LDFLAGS = + +ifeq '$(SYSTEM)' 'FreeBSD' + SYSTEM_CXXFLAGS = -Wno-long-long +else +endif + +NOWALL ?= no +NOPEDANTIC ?= no +DEBUG ?= no +PROFIL ?= no + +ifeq '$(PROFIL)' 'yes' + DEBUG = yes +endif + +ifeq '$(DEBUG)' 'yes' + CFLAGS = -g +endif +ifeq '$(PROFIL)' 'yes' + CFLAGS += -pg +endif + +ifneq '$(NOWALL)' 'yes' + CFLAGS += -Wall +endif +ifneq '$(NOPEDANTIC)' 'yes' + CFLAGS += -pedantic +endif + +CONFIG_FLAGS = +USE_DOUBLE ?= yes +USE_SINGLE ?= no + +ifeq '$(USE_SINGLE)' 'yes' + CONFIG_FLAGS += -DUSE_SINGLE + USE_DOUBLE = no +endif +ifeq '$(USE_DOUBLE)' 'yes' + CONFIG_FLAGS += -DUSE_DOUBLE +endif + +CFLAGS += --std=gnu99 +LDFLAGS += $(SYSTEM_LDFLAGS) + +CHECKTARGETS = +check-dep: $(CHECKTARGETS) + +PREFIX ?= /usr/local +INCLUDEDIR ?= include +LIBDIR ?= lib + +showvars: + @echo "SYSTEM = "$(SYSTEM) + @echo "" + @echo "CC = $(CC)" + @echo "M4 = $(M4)" + @echo "" + @echo "DEBUG = $(DEBUG)" + @echo "PROFIL = $(PROFIL)" + @echo "NOWALL = $(NOWALL)" + @echo "NOPEDANTIC = $(NOPEDANTIC)" + @echo "USE_SINGLE = $(USE_SINGLE)" + @echo "USE_DOUBLE = $(USE_DOUBLE)" + @echo "" + @echo "CFLAGS = $(CFLAGS)" + @echo "LDFLAGS = $(LDFLAGS)" + @echo "CONFIG_FLAGS = $(CONFIG_FLAGS)" + @echo "" + @echo "PREFIX = $(PREFIX)" + @echo "INCLUDEDIR = $(INCLUDEDIR)" + @echo "LIBDIR = $(LIBDIR)" + @echo "" + +.DEFAULT_GOAL := all +.PHONY: showvars diff -Nru ode-0.11.1/libccd/src/mpr.c ode-0.14/libccd/src/mpr.c --- ode-0.11.1/libccd/src/mpr.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/mpr.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,538 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010,2011 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#include +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/** Finds origin (center) of Minkowski difference (actually it can be any + * interior point of Minkowski difference. */ +_ccd_inline void findOrigin(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_support_t *center); + +/** Discovers initial portal - that is tetrahedron that intersects with + * origin ray (ray from center of Minkowski diff to (0,0,0). + * + * Returns -1 if already recognized that origin is outside Minkowski + * portal. + * Returns 1 if origin lies on v1 of simplex (only v0 and v1 are present + * in simplex). + * Returns 2 if origin lies on v0-v1 segment. + * Returns 0 if portal was built. + */ +static int discoverPortal(const void *obj1, const void *obj2, + const ccd_t *ccd, ccd_simplex_t *portal); + + +/** Expands portal towards origin and determine if objects intersect. + * Already established portal must be given as argument. + * If intersection is found 0 is returned, -1 otherwise */ +static int refinePortal(const void *obj1, const void *obj2, + const ccd_t *ccd, ccd_simplex_t *portal); + +/** Finds penetration info by expanding provided portal. */ +static void findPenetr(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_simplex_t *portal, + ccd_real_t *depth, ccd_vec3_t *dir, ccd_vec3_t *pos); + +/** Finds penetration info if origin lies on portal's v1 */ +static void findPenetrTouch(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_simplex_t *portal, + ccd_real_t *depth, ccd_vec3_t *dir, ccd_vec3_t *pos); + +/** Find penetration info if origin lies on portal's segment v0-v1 */ +static void findPenetrSegment(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_simplex_t *portal, + ccd_real_t *depth, ccd_vec3_t *dir, ccd_vec3_t *pos); + +/** Finds position vector from fully established portal */ +static void findPos(const void *obj1, const void *obj2, const ccd_t *ccd, + const ccd_simplex_t *portal, ccd_vec3_t *pos); + +/** Extends portal with new support point. + * Portal must have face v1-v2-v3 arranged to face outside portal. */ +_ccd_inline void expandPortal(ccd_simplex_t *portal, + const ccd_support_t *v4); + +/** Fill dir with direction outside portal. Portal's v1-v2-v3 face must be + * arranged in correct order! */ +_ccd_inline void portalDir(const ccd_simplex_t *portal, ccd_vec3_t *dir); + +/** Returns true if portal encapsules origin (0,0,0), dir is direction of + * v1-v2-v3 face. */ +_ccd_inline int portalEncapsulesOrigin(const ccd_simplex_t *portal, + const ccd_vec3_t *dir); + +/** Returns true if portal with new point v4 would reach specified + * tolerance (i.e. returns true if portal can _not_ significantly expand + * within Minkowski difference). + * + * v4 is candidate for new point in portal, dir is direction in which v4 + * was obtained. */ +_ccd_inline int portalReachTolerance(const ccd_simplex_t *portal, + const ccd_support_t *v4, + const ccd_vec3_t *dir, + const ccd_t *ccd); + +/** Returns true if portal expanded by new point v4 could possibly contain + * origin, dir is direction in which v4 was obtained. */ +_ccd_inline int portalCanEncapsuleOrigin(const ccd_simplex_t *portal, + const ccd_support_t *v4, + const ccd_vec3_t *dir); + + +int ccdMPRIntersect(const void *obj1, const void *obj2, const ccd_t *ccd) +{ + ccd_simplex_t portal; + int res; + + // Phase 1: Portal discovery - find portal that intersects with origin + // ray (ray from center of Minkowski diff to origin of coordinates) + res = discoverPortal(obj1, obj2, ccd, &portal); + if (res < 0) + return 0; + if (res > 0) + return 1; + + // Phase 2: Portal refinement + res = refinePortal(obj1, obj2, ccd, &portal); + return (res == 0 ? 1 : 0); +} + +int ccdMPRPenetration(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_real_t *depth, ccd_vec3_t *dir, ccd_vec3_t *pos) +{ + ccd_simplex_t portal; + int res; + + // Phase 1: Portal discovery + res = discoverPortal(obj1, obj2, ccd, &portal); + if (res < 0){ + // Origin isn't inside portal - no collision. + return -1; + + }else if (res == 1){ + // Touching contact on portal's v1. + findPenetrTouch(obj1, obj2, ccd, &portal, depth, dir, pos); + + }else if (res == 2){ + // Origin lies on v0-v1 segment. + findPenetrSegment(obj1, obj2, ccd, &portal, depth, dir, pos); + + }else if (res == 0){ + // Phase 2: Portal refinement + res = refinePortal(obj1, obj2, ccd, &portal); + if (res < 0) + return -1; + + // Phase 3. Penetration info + findPenetr(obj1, obj2, ccd, &portal, depth, dir, pos); + } + + return 0; +} + + + +_ccd_inline void findOrigin(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_support_t *center) +{ + ccd->center1(obj1, ¢er->v1); + ccd->center2(obj2, ¢er->v2); + ccdVec3Sub2(¢er->v, ¢er->v1, ¢er->v2); +} + +static int discoverPortal(const void *obj1, const void *obj2, + const ccd_t *ccd, ccd_simplex_t *portal) +{ + ccd_vec3_t dir, va, vb; + ccd_real_t dot; + int cont; + + // vertex 0 is center of portal + findOrigin(obj1, obj2, ccd, ccdSimplexPointW(portal, 0)); + ccdSimplexSetSize(portal, 1); + + if (ccdVec3Eq(&ccdSimplexPoint(portal, 0)->v, ccd_vec3_origin)){ + // Portal's center lies on origin (0,0,0) => we know that objects + // intersect but we would need to know penetration info. + // So move center little bit... + ccdVec3Set(&va, CCD_EPS * CCD_REAL(10.), CCD_ZERO, CCD_ZERO); + ccdVec3Add(&ccdSimplexPointW(portal, 0)->v, &va); + } + + + // vertex 1 = support in direction of origin + ccdVec3Copy(&dir, &ccdSimplexPoint(portal, 0)->v); + ccdVec3Scale(&dir, CCD_REAL(-1.)); + ccdVec3Normalize(&dir); + __ccdSupport(obj1, obj2, &dir, ccd, ccdSimplexPointW(portal, 1)); + ccdSimplexSetSize(portal, 2); + + // test if origin isn't outside of v1 + dot = ccdVec3Dot(&ccdSimplexPoint(portal, 1)->v, &dir); + if (ccdIsZero(dot) || dot < CCD_ZERO) + return -1; + + + // vertex 2 + ccdVec3Cross(&dir, &ccdSimplexPoint(portal, 0)->v, + &ccdSimplexPoint(portal, 1)->v); + if (ccdIsZero(ccdVec3Len2(&dir))){ + if (ccdVec3Eq(&ccdSimplexPoint(portal, 1)->v, ccd_vec3_origin)){ + // origin lies on v1 + return 1; + }else{ + // origin lies on v0-v1 segment + return 2; + } + } + + ccdVec3Normalize(&dir); + __ccdSupport(obj1, obj2, &dir, ccd, ccdSimplexPointW(portal, 2)); + dot = ccdVec3Dot(&ccdSimplexPoint(portal, 2)->v, &dir); + if (ccdIsZero(dot) || dot < CCD_ZERO) + return -1; + + ccdSimplexSetSize(portal, 3); + + // vertex 3 direction + ccdVec3Sub2(&va, &ccdSimplexPoint(portal, 1)->v, + &ccdSimplexPoint(portal, 0)->v); + ccdVec3Sub2(&vb, &ccdSimplexPoint(portal, 2)->v, + &ccdSimplexPoint(portal, 0)->v); + ccdVec3Cross(&dir, &va, &vb); + ccdVec3Normalize(&dir); + + // it is better to form portal faces to be oriented "outside" origin + dot = ccdVec3Dot(&dir, &ccdSimplexPoint(portal, 0)->v); + if (dot > CCD_ZERO){ + ccdSimplexSwap(portal, 1, 2); + ccdVec3Scale(&dir, CCD_REAL(-1.)); + } + + while (ccdSimplexSize(portal) < 4){ + __ccdSupport(obj1, obj2, &dir, ccd, ccdSimplexPointW(portal, 3)); + dot = ccdVec3Dot(&ccdSimplexPoint(portal, 3)->v, &dir); + if (ccdIsZero(dot) || dot < CCD_ZERO) + return -1; + + cont = 0; + + // test if origin is outside (v1, v0, v3) - set v2 as v3 and + // continue + ccdVec3Cross(&va, &ccdSimplexPoint(portal, 1)->v, + &ccdSimplexPoint(portal, 3)->v); + dot = ccdVec3Dot(&va, &ccdSimplexPoint(portal, 0)->v); + if (dot < CCD_ZERO && !ccdIsZero(dot)){ + ccdSimplexSet(portal, 2, ccdSimplexPoint(portal, 3)); + cont = 1; + } + + if (!cont){ + // test if origin is outside (v3, v0, v2) - set v1 as v3 and + // continue + ccdVec3Cross(&va, &ccdSimplexPoint(portal, 3)->v, + &ccdSimplexPoint(portal, 2)->v); + dot = ccdVec3Dot(&va, &ccdSimplexPoint(portal, 0)->v); + if (dot < CCD_ZERO && !ccdIsZero(dot)){ + ccdSimplexSet(portal, 1, ccdSimplexPoint(portal, 3)); + cont = 1; + } + } + + if (cont){ + ccdVec3Sub2(&va, &ccdSimplexPoint(portal, 1)->v, + &ccdSimplexPoint(portal, 0)->v); + ccdVec3Sub2(&vb, &ccdSimplexPoint(portal, 2)->v, + &ccdSimplexPoint(portal, 0)->v); + ccdVec3Cross(&dir, &va, &vb); + ccdVec3Normalize(&dir); + }else{ + ccdSimplexSetSize(portal, 4); + } + } + + return 0; +} + +static int refinePortal(const void *obj1, const void *obj2, + const ccd_t *ccd, ccd_simplex_t *portal) +{ + ccd_vec3_t dir; + ccd_support_t v4; + + while (1){ + // compute direction outside the portal (from v0 throught v1,v2,v3 + // face) + portalDir(portal, &dir); + + // test if origin is inside the portal + if (portalEncapsulesOrigin(portal, &dir)) + return 0; + + // get next support point + __ccdSupport(obj1, obj2, &dir, ccd, &v4); + + // test if v4 can expand portal to contain origin and if portal + // expanding doesn't reach given tolerance + if (!portalCanEncapsuleOrigin(portal, &v4, &dir) + || portalReachTolerance(portal, &v4, &dir, ccd)){ + return -1; + } + + // v1-v2-v3 triangle must be rearranged to face outside Minkowski + // difference (direction from v0). + expandPortal(portal, &v4); + } + + return -1; +} + + +static void findPenetr(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_simplex_t *portal, + ccd_real_t *depth, ccd_vec3_t *pdir, ccd_vec3_t *pos) +{ + ccd_vec3_t dir; + ccd_support_t v4; + unsigned long iterations; + + iterations = 0UL; + while (1){ + // compute portal direction and obtain next support point + portalDir(portal, &dir); + __ccdSupport(obj1, obj2, &dir, ccd, &v4); + + // reached tolerance -> find penetration info + if (portalReachTolerance(portal, &v4, &dir, ccd) + || iterations > ccd->max_iterations){ + *depth = ccdVec3PointTriDist2(ccd_vec3_origin, + &ccdSimplexPoint(portal, 1)->v, + &ccdSimplexPoint(portal, 2)->v, + &ccdSimplexPoint(portal, 3)->v, + pdir); + *depth = CCD_SQRT(*depth); + ccdVec3Normalize(pdir); + + // barycentric coordinates: + findPos(obj1, obj2, ccd, portal, pos); + + return; + } + + expandPortal(portal, &v4); + + iterations++; + } +} + +static void findPenetrTouch(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_simplex_t *portal, + ccd_real_t *depth, ccd_vec3_t *dir, ccd_vec3_t *pos) +{ + // Touching contact on portal's v1 - so depth is zero and direction + // is unimportant and pos can be guessed + *depth = CCD_REAL(0.); + ccdVec3Copy(dir, ccd_vec3_origin); + + ccdVec3Copy(pos, &ccdSimplexPoint(portal, 1)->v1); + ccdVec3Add(pos, &ccdSimplexPoint(portal, 1)->v2); + ccdVec3Scale(pos, 0.5); +} + +static void findPenetrSegment(const void *obj1, const void *obj2, const ccd_t *ccd, + ccd_simplex_t *portal, + ccd_real_t *depth, ccd_vec3_t *dir, ccd_vec3_t *pos) +{ + /* + ccd_vec3_t vec; + ccd_real_t k; + */ + + // Origin lies on v0-v1 segment. + // Depth is distance to v1, direction also and position must be + // computed + + ccdVec3Copy(pos, &ccdSimplexPoint(portal, 1)->v1); + ccdVec3Add(pos, &ccdSimplexPoint(portal, 1)->v2); + ccdVec3Scale(pos, CCD_REAL(0.5)); + + /* + ccdVec3Sub2(&vec, &ccdSimplexPoint(portal, 1)->v, + &ccdSimplexPoint(portal, 0)->v); + k = CCD_SQRT(ccdVec3Len2(&ccdSimplexPoint(portal, 0)->v)); + k /= CCD_SQRT(ccdVec3Len2(&vec)); + ccdVec3Scale(&vec, -k); + ccdVec3Add(pos, &vec); + */ + + ccdVec3Copy(dir, &ccdSimplexPoint(portal, 1)->v); + *depth = CCD_SQRT(ccdVec3Len2(dir)); + ccdVec3Normalize(dir); +} + + +static void findPos(const void *obj1, const void *obj2, const ccd_t *ccd, + const ccd_simplex_t *portal, ccd_vec3_t *pos) +{ + ccd_vec3_t dir; + size_t i; + ccd_real_t b[4], sum, inv; + ccd_vec3_t vec, p1, p2; + + portalDir(portal, &dir); + + // use barycentric coordinates of tetrahedron to find origin + ccdVec3Cross(&vec, &ccdSimplexPoint(portal, 1)->v, + &ccdSimplexPoint(portal, 2)->v); + b[0] = ccdVec3Dot(&vec, &ccdSimplexPoint(portal, 3)->v); + + ccdVec3Cross(&vec, &ccdSimplexPoint(portal, 3)->v, + &ccdSimplexPoint(portal, 2)->v); + b[1] = ccdVec3Dot(&vec, &ccdSimplexPoint(portal, 0)->v); + + ccdVec3Cross(&vec, &ccdSimplexPoint(portal, 0)->v, + &ccdSimplexPoint(portal, 1)->v); + b[2] = ccdVec3Dot(&vec, &ccdSimplexPoint(portal, 3)->v); + + ccdVec3Cross(&vec, &ccdSimplexPoint(portal, 2)->v, + &ccdSimplexPoint(portal, 1)->v); + b[3] = ccdVec3Dot(&vec, &ccdSimplexPoint(portal, 0)->v); + + sum = b[0] + b[1] + b[2] + b[3]; + + if (ccdIsZero(sum) || sum < CCD_ZERO){ + b[0] = CCD_REAL(0.); + + ccdVec3Cross(&vec, &ccdSimplexPoint(portal, 2)->v, + &ccdSimplexPoint(portal, 3)->v); + b[1] = ccdVec3Dot(&vec, &dir); + ccdVec3Cross(&vec, &ccdSimplexPoint(portal, 3)->v, + &ccdSimplexPoint(portal, 1)->v); + b[2] = ccdVec3Dot(&vec, &dir); + ccdVec3Cross(&vec, &ccdSimplexPoint(portal, 1)->v, + &ccdSimplexPoint(portal, 2)->v); + b[3] = ccdVec3Dot(&vec, &dir); + + sum = b[1] + b[2] + b[3]; + } + + inv = CCD_REAL(1.) / sum; + + ccdVec3Copy(&p1, ccd_vec3_origin); + ccdVec3Copy(&p2, ccd_vec3_origin); + for (i = 0; i < 4; i++){ + ccdVec3Copy(&vec, &ccdSimplexPoint(portal, i)->v1); + ccdVec3Scale(&vec, b[i]); + ccdVec3Add(&p1, &vec); + + ccdVec3Copy(&vec, &ccdSimplexPoint(portal, i)->v2); + ccdVec3Scale(&vec, b[i]); + ccdVec3Add(&p2, &vec); + } + ccdVec3Scale(&p1, inv); + ccdVec3Scale(&p2, inv); + + ccdVec3Copy(pos, &p1); + ccdVec3Add(pos, &p2); + ccdVec3Scale(pos, 0.5); +} + +_ccd_inline void expandPortal(ccd_simplex_t *portal, + const ccd_support_t *v4) +{ + ccd_real_t dot; + ccd_vec3_t v4v0; + + ccdVec3Cross(&v4v0, &v4->v, &ccdSimplexPoint(portal, 0)->v); + dot = ccdVec3Dot(&ccdSimplexPoint(portal, 1)->v, &v4v0); + if (dot > CCD_ZERO){ + dot = ccdVec3Dot(&ccdSimplexPoint(portal, 2)->v, &v4v0); + if (dot > CCD_ZERO){ + ccdSimplexSet(portal, 1, v4); + }else{ + ccdSimplexSet(portal, 3, v4); + } + }else{ + dot = ccdVec3Dot(&ccdSimplexPoint(portal, 3)->v, &v4v0); + if (dot > CCD_ZERO){ + ccdSimplexSet(portal, 2, v4); + }else{ + ccdSimplexSet(portal, 1, v4); + } + } +} + +_ccd_inline void portalDir(const ccd_simplex_t *portal, ccd_vec3_t *dir) +{ + ccd_vec3_t v2v1, v3v1; + + ccdVec3Sub2(&v2v1, &ccdSimplexPoint(portal, 2)->v, + &ccdSimplexPoint(portal, 1)->v); + ccdVec3Sub2(&v3v1, &ccdSimplexPoint(portal, 3)->v, + &ccdSimplexPoint(portal, 1)->v); + ccdVec3Cross(dir, &v2v1, &v3v1); + ccdVec3Normalize(dir); +} + +_ccd_inline int portalEncapsulesOrigin(const ccd_simplex_t *portal, + const ccd_vec3_t *dir) +{ + ccd_real_t dot; + dot = ccdVec3Dot(dir, &ccdSimplexPoint(portal, 1)->v); + return ccdIsZero(dot) || dot > CCD_ZERO; +} + +_ccd_inline int portalReachTolerance(const ccd_simplex_t *portal, + const ccd_support_t *v4, + const ccd_vec3_t *dir, + const ccd_t *ccd) +{ + ccd_real_t dv1, dv2, dv3, dv4; + ccd_real_t dot1, dot2, dot3; + + // find the smallest dot product of dir and {v1-v4, v2-v4, v3-v4} + + dv1 = ccdVec3Dot(&ccdSimplexPoint(portal, 1)->v, dir); + dv2 = ccdVec3Dot(&ccdSimplexPoint(portal, 2)->v, dir); + dv3 = ccdVec3Dot(&ccdSimplexPoint(portal, 3)->v, dir); + dv4 = ccdVec3Dot(&v4->v, dir); + + dot1 = dv4 - dv1; + dot2 = dv4 - dv2; + dot3 = dv4 - dv3; + + dot1 = CCD_FMIN(dot1, dot2); + dot1 = CCD_FMIN(dot1, dot3); + + return ccdEq(dot1, ccd->mpr_tolerance) || dot1 < ccd->mpr_tolerance; +} + +_ccd_inline int portalCanEncapsuleOrigin(const ccd_simplex_t *portal, + const ccd_support_t *v4, + const ccd_vec3_t *dir) +{ + ccd_real_t dot; + dot = ccdVec3Dot(&v4->v, dir); + return ccdIsZero(dot) || dot > CCD_ZERO; +} diff -Nru ode-0.11.1/libccd/src/polytope.c ode-0.14/libccd/src/polytope.c --- ode-0.11.1/libccd/src/polytope.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/polytope.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,287 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#include +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +_ccd_inline void _ccdPtNearestUpdate(ccd_pt_t *pt, ccd_pt_el_t *el) +{ + if (ccdEq(pt->nearest_dist, el->dist)){ + if (el->type < pt->nearest_type){ + pt->nearest = el; + pt->nearest_dist = el->dist; + pt->nearest_type = el->type; + } + }else if (el->dist < pt->nearest_dist){ + pt->nearest = el; + pt->nearest_dist = el->dist; + pt->nearest_type = el->type; + } +} + +static void _ccdPtNearestRenew(ccd_pt_t *pt) +{ + ccd_pt_vertex_t *v; + ccd_pt_edge_t *e; + ccd_pt_face_t *f; + + pt->nearest_dist = CCD_REAL_MAX; + pt->nearest_type = 3; + pt->nearest = NULL; + + ccdListForEachEntry(&pt->vertices, v, ccd_pt_vertex_t, list){ + _ccdPtNearestUpdate(pt, (ccd_pt_el_t *)v); + } + + ccdListForEachEntry(&pt->edges, e, ccd_pt_edge_t, list){ + _ccdPtNearestUpdate(pt, (ccd_pt_el_t *)e); + } + + ccdListForEachEntry(&pt->faces, f, ccd_pt_face_t, list){ + _ccdPtNearestUpdate(pt, (ccd_pt_el_t *)f); + } +} + + + +void ccdPtInit(ccd_pt_t *pt) +{ + ccdListInit(&pt->vertices); + ccdListInit(&pt->edges); + ccdListInit(&pt->faces); + + pt->nearest = NULL; + pt->nearest_dist = CCD_REAL_MAX; + pt->nearest_type = 3; +} + +void ccdPtDestroy(ccd_pt_t *pt) +{ + ccd_pt_face_t *f, *f2; + ccd_pt_edge_t *e, *e2; + ccd_pt_vertex_t *v, *v2; + + // first delete all faces + ccdListForEachEntrySafe(&pt->faces, f, ccd_pt_face_t, f2, ccd_pt_face_t, list){ + ccdPtDelFace(pt, f); + } + + // delete all edges + ccdListForEachEntrySafe(&pt->edges, e, ccd_pt_edge_t, e2, ccd_pt_edge_t, list){ + ccdPtDelEdge(pt, e); + } + + // delete all vertices + ccdListForEachEntrySafe(&pt->vertices, v, ccd_pt_vertex_t, v2, ccd_pt_vertex_t, list){ + ccdPtDelVertex(pt, v); + } +} + + +ccd_pt_vertex_t *ccdPtAddVertex(ccd_pt_t *pt, const ccd_support_t *v) +{ + ccd_pt_vertex_t *vert; + + vert = CCD_ALLOC(ccd_pt_vertex_t); + vert->type = CCD_PT_VERTEX; + ccdSupportCopy(&vert->v, v); + + vert->dist = ccdVec3Len2(&vert->v.v); + ccdVec3Copy(&vert->witness, &vert->v.v); + + ccdListInit(&vert->edges); + + // add vertex to list + ccdListAppend(&pt->vertices, &vert->list); + + // update position in .nearest array + _ccdPtNearestUpdate(pt, (ccd_pt_el_t *)vert); + + return vert; +} + +ccd_pt_edge_t *ccdPtAddEdge(ccd_pt_t *pt, ccd_pt_vertex_t *v1, + ccd_pt_vertex_t *v2) +{ + const ccd_vec3_t *a, *b; + ccd_pt_edge_t *edge; + + edge = CCD_ALLOC(ccd_pt_edge_t); + edge->type = CCD_PT_EDGE; + edge->vertex[0] = v1; + edge->vertex[1] = v2; + edge->faces[0] = edge->faces[1] = NULL; + + a = &edge->vertex[0]->v.v; + b = &edge->vertex[1]->v.v; + edge->dist = ccdVec3PointSegmentDist2(ccd_vec3_origin, a, b, &edge->witness); + + ccdListAppend(&edge->vertex[0]->edges, &edge->vertex_list[0]); + ccdListAppend(&edge->vertex[1]->edges, &edge->vertex_list[1]); + + ccdListAppend(&pt->edges, &edge->list); + + // update position in .nearest array + _ccdPtNearestUpdate(pt, (ccd_pt_el_t *)edge); + + return edge; +} + +ccd_pt_face_t *ccdPtAddFace(ccd_pt_t *pt, ccd_pt_edge_t *e1, + ccd_pt_edge_t *e2, + ccd_pt_edge_t *e3) +{ + const ccd_vec3_t *a, *b, *c; + ccd_pt_face_t *face; + ccd_pt_edge_t *e; + size_t i; + + face = CCD_ALLOC(ccd_pt_face_t); + face->type = CCD_PT_FACE; + face->edge[0] = e1; + face->edge[1] = e2; + face->edge[2] = e3; + + // obtain triplet of vertices + a = &face->edge[0]->vertex[0]->v.v; + b = &face->edge[0]->vertex[1]->v.v; + e = face->edge[1]; + if (e->vertex[0] != face->edge[0]->vertex[0] + && e->vertex[0] != face->edge[0]->vertex[1]){ + c = &e->vertex[0]->v.v; + }else{ + c = &e->vertex[1]->v.v; + } + face->dist = ccdVec3PointTriDist2(ccd_vec3_origin, a, b, c, &face->witness); + + + for (i = 0; i < 3; i++){ + if (face->edge[i]->faces[0] == NULL){ + face->edge[i]->faces[0] = face; + }else{ + face->edge[i]->faces[1] = face; + } + } + + ccdListAppend(&pt->faces, &face->list); + + // update position in .nearest array + _ccdPtNearestUpdate(pt, (ccd_pt_el_t *)face); + + return face; +} + + +void ccdPtRecomputeDistances(ccd_pt_t *pt) +{ + ccd_pt_vertex_t *v; + ccd_pt_edge_t *e; + ccd_pt_face_t *f; + const ccd_vec3_t *a, *b, *c; + ccd_real_t dist; + + ccdListForEachEntry(&pt->vertices, v, ccd_pt_vertex_t, list){ + dist = ccdVec3Len2(&v->v.v); + v->dist = dist; + ccdVec3Copy(&v->witness, &v->v.v); + } + + ccdListForEachEntry(&pt->edges, e, ccd_pt_edge_t, list){ + a = &e->vertex[0]->v.v; + b = &e->vertex[1]->v.v; + dist = ccdVec3PointSegmentDist2(ccd_vec3_origin, a, b, &e->witness); + e->dist = dist; + } + + ccdListForEachEntry(&pt->faces, f, ccd_pt_face_t, list){ + // obtain triplet of vertices + a = &f->edge[0]->vertex[0]->v.v; + b = &f->edge[0]->vertex[1]->v.v; + e = f->edge[1]; + if (e->vertex[0] != f->edge[0]->vertex[0] + && e->vertex[0] != f->edge[0]->vertex[1]){ + c = &e->vertex[0]->v.v; + }else{ + c = &e->vertex[1]->v.v; + } + + dist = ccdVec3PointTriDist2(ccd_vec3_origin, a, b, c, &f->witness); + f->dist = dist; + } +} + +ccd_pt_el_t *ccdPtNearest(ccd_pt_t *pt) +{ + if (!pt->nearest){ + _ccdPtNearestRenew(pt); + } + return pt->nearest; +} + + +void ccdPtDumpSVT(ccd_pt_t *pt, const char *fn) +{ + FILE *fout; + + fout = fopen(fn, "a"); + if (fout == NULL) + return; + + ccdPtDumpSVT2(pt, fout); + + fclose(fout); +} + +void ccdPtDumpSVT2(ccd_pt_t *pt, FILE *fout) +{ + ccd_pt_vertex_t *v, *a, *b, *c; + ccd_pt_edge_t *e; + ccd_pt_face_t *f; + size_t i; + + fprintf(fout, "-----\n"); + + fprintf(fout, "Points:\n"); + i = 0; + ccdListForEachEntry(&pt->vertices, v, ccd_pt_vertex_t, list){ + v->id = i++; + fprintf(fout, "%lf %lf %lf\n", + ccdVec3X(&v->v.v), ccdVec3Y(&v->v.v), ccdVec3Z(&v->v.v)); + } + + fprintf(fout, "Edges:\n"); + ccdListForEachEntry(&pt->edges, e, ccd_pt_edge_t, list){ + fprintf(fout, "%d %d\n", e->vertex[0]->id, e->vertex[1]->id); + } + + fprintf(fout, "Faces:\n"); + ccdListForEachEntry(&pt->faces, f, ccd_pt_face_t, list){ + a = f->edge[0]->vertex[0]; + b = f->edge[0]->vertex[1]; + c = f->edge[1]->vertex[0]; + if (c == a || c == b){ + c = f->edge[1]->vertex[1]; + } + fprintf(fout, "%d %d %d\n", a->id, b->id, c->id); + } +} diff -Nru ode-0.11.1/libccd/src/support.c ode-0.14/libccd/src/support.c --- ode-0.11.1/libccd/src/support.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/support.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,39 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + + +void __ccdSupport(const void *obj1, const void *obj2, + const ccd_vec3_t *_dir, const ccd_t *ccd, + ccd_support_t *supp) +{ + ccd_vec3_t dir; + + ccdVec3Copy(&dir, _dir); + + ccd->support1(obj1, &dir, &supp->v1); + + ccdVec3Scale(&dir, -CCD_ONE); + ccd->support2(obj2, &dir, &supp->v2); + + ccdVec3Sub2(&supp->v, &supp->v1, &supp->v2); +} diff -Nru ode-0.11.1/libccd/src/testsuites/bench2.c ode-0.14/libccd/src/testsuites/bench2.c --- ode-0.11.1/libccd/src/testsuites/bench2.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/bench2.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,263 @@ +#define CU_ENABLE_TIMER +#include +#include +#include +#include +#include "support.h" + +TEST_SUITES { + TEST_SUITES_CLOSURE +}; + +static int bench_num = 1; +static size_t cycles = 10000; + +static void runBench(const void *o1, const void *o2, const ccd_t *ccd) +{ + ccd_real_t depth; + ccd_vec3_t dir, pos; + int res; + size_t i; + const struct timespec *timer; + + cuTimerStart(); + for (i = 0; i < cycles; i++){ + res = ccdMPRPenetration(o1, o2, ccd, &depth, &dir, &pos); + } + timer = cuTimerStop(); + fprintf(stdout, "%02d: %ld %ld\n", bench_num, + (long)timer->tv_sec, (long)timer->tv_nsec); + fflush(stdout); + + bench_num++; +} + +static void boxbox(void) +{ + fprintf(stdout, "%s:\n", __func__); + + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + ccd_vec3_t axis; + ccd_quat_t rot; + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.5; + box2.y = 1.; + box2.z = 1.5; + + bench_num = 1; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + ccdVec3Set(&box1.pos, -0.3, 0.5, 1.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, 0., 0., 0.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0., 0.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.5, 0.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&axis, 1., 1., 1.); + ccdQuatSetAngleAxis(&rot, M_PI / 4., &axis); + ccdQuatMul(&box1.quat, &rot); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.2; box2.y = 0.5; box2.z = 1.; + box2.x = box2.y = box2.z = 1.; + + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&axis, 1., 0., 0.); + ccdQuatSetAngleAxis(&rot, M_PI / 4., &axis); + ccdQuatMul(&box1.quat, &rot); + ccdVec3Set(&box1.pos, -1.3, 0., 0.); + + ccdVec3Set(&box2.pos, 0., 0., 0.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + + fprintf(stdout, "\n----\n\n"); +} + +void cylcyl(void) +{ + fprintf(stdout, "%s:\n", __func__); + + ccd_t ccd; + CCD_CYL(cyl1); + CCD_CYL(cyl2); + ccd_vec3_t axis; + + cyl1.radius = 0.35; + cyl1.height = 0.5; + cyl2.radius = 0.5; + cyl2.height = 1.; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&cyl1.pos, 0.3, 0.1, 0.1); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, 0., 0., 0.); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, -0.2, 0.7, 0.2); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&axis, 0.567, 1.2, 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, 0.6, -0.7, 0.2); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&axis, -4.567, 1.2, 0.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl2.pos, 0.6, -0.7, 0.2); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + fprintf(stdout, "\n----\n\n"); +} + +void boxcyl(void) +{ + fprintf(stdout, "%s:\n", __func__); + + ccd_t ccd; + CCD_BOX(box); + CCD_CYL(cyl); + ccd_vec3_t axis; + + box.x = 0.5; + box.y = 1.; + box.z = 1.5; + cyl.radius = 0.4; + cyl.height = 0.7; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&cyl.pos, .6, 0., 0.); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&axis, 0., 1., 0.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&axis, 0.67, 1.1, 0.12); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .6, 0., 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .9, 0.8, 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + fprintf(stdout, "\n----\n\n"); +} + +int main(int argc, char *argv[]) +{ + if (argc > 1){ + cycles = atol(argv[1]); + } + + fprintf(stdout, "Cycles: %u\n", cycles); + fprintf(stdout, "\n"); + + boxbox(); + cylcyl(); + boxcyl(); + + return 0; +} diff -Nru ode-0.11.1/libccd/src/testsuites/bench.c ode-0.14/libccd/src/testsuites/bench.c --- ode-0.11.1/libccd/src/testsuites/bench.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/bench.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,257 @@ +#define CU_ENABLE_TIMER +#include +#include +#include +#include +#include "support.h" + +TEST_SUITES { + TEST_SUITES_CLOSURE +}; + +static int bench_num = 1; +static size_t cycles = 10000; + +static void runBench(const void *o1, const void *o2, const ccd_t *ccd) +{ + ccd_real_t depth; + ccd_vec3_t dir, pos; + int res; + size_t i; + const struct timespec *timer; + + cuTimerStart(); + for (i = 0; i < cycles; i++){ + res = ccdGJKPenetration(o1, o2, ccd, &depth, &dir, &pos); + } + timer = cuTimerStop(); + fprintf(stdout, "%02d: %ld %ld\n", bench_num, + (long)timer->tv_sec, (long)timer->tv_nsec); + fflush(stdout); + + bench_num++; +} + +static void boxbox(void) +{ + fprintf(stdout, "%s:\n", __func__); + + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + ccd_vec3_t axis; + ccd_quat_t rot; + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.5; + box2.y = 1.; + box2.z = 1.5; + + bench_num = 1; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + ccdVec3Set(&box1.pos, -0.3, 0.5, 1.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, 0., 0., 0.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0., 0.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.5, 0.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&axis, 1., 1., 1.); + ccdQuatSetAngleAxis(&rot, M_PI / 4., &axis); + ccdQuatMul(&box1.quat, &rot); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.2; box2.y = 0.5; box2.z = 1.; + box2.x = box2.y = box2.z = 1.; + + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&axis, 1., 0., 0.); + ccdQuatSetAngleAxis(&rot, M_PI / 4., &axis); + ccdQuatMul(&box1.quat, &rot); + ccdVec3Set(&box1.pos, -1.3, 0., 0.); + + ccdVec3Set(&box2.pos, 0., 0., 0.); + runBench(&box1, &box2, &ccd); + runBench(&box2, &box1, &ccd); + + + fprintf(stdout, "\n----\n\n"); +} + +void cylcyl(void) +{ + fprintf(stdout, "%s:\n", __func__); + + ccd_t ccd; + CCD_CYL(cyl1); + CCD_CYL(cyl2); + ccd_vec3_t axis; + + cyl1.radius = 0.35; + cyl1.height = 0.5; + cyl2.radius = 0.5; + cyl2.height = 1.; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&cyl1.pos, 0.3, 0.1, 0.1); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, 0., 0., 0.); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, -0.2, 0.7, 0.2); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&axis, 0.567, 1.2, 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, 0.6, -0.7, 0.2); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + ccdVec3Set(&axis, -4.567, 1.2, 0.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl2.pos, 0.6, -0.7, 0.2); + runBench(&cyl1, &cyl2, &ccd); + runBench(&cyl2, &cyl1, &ccd); + + fprintf(stdout, "\n----\n\n"); +} + +void boxcyl(void) +{ + fprintf(stdout, "%s:\n", __func__); + + ccd_t ccd; + CCD_BOX(box); + CCD_CYL(cyl); + ccd_vec3_t axis; + + box.x = 0.5; + box.y = 1.; + box.z = 1.5; + cyl.radius = 0.4; + cyl.height = 0.7; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&cyl.pos, .6, 0., 0.); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&axis, 0., 1., 0.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&axis, 0.67, 1.1, 0.12); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .6, 0., 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .9, 0.8, 0.5); + runBench(&box, &cyl, &ccd); + runBench(&cyl, &box, &ccd); + + fprintf(stdout, "\n----\n\n"); +} + +int main(int argc, char *argv[]) +{ + if (argc > 1){ + cycles = atol(argv[1]); + } + + fprintf(stdout, "Cycles: %u\n", cycles); + fprintf(stdout, "\n"); + + boxbox(); + cylcyl(); + boxcyl(); + + return 0; +} diff -Nru ode-0.11.1/libccd/src/testsuites/boxbox.c ode-0.14/libccd/src/testsuites/boxbox.c --- ode-0.11.1/libccd/src/testsuites/boxbox.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/boxbox.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,467 @@ +#include +#include + +#include +#include "support.h" +#include +#include +#include "common.h" + + +TEST(boxboxSetUp) +{ +} + +TEST(boxboxTearDown) +{ +} + +TEST(boxboxAlignedX) +{ + size_t i; + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + //ccd.max_iterations = 20; + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, -5., 0., 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&box1, &box2, &ccd); + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[0] += 0.1; + } + + + box1.x = 0.1; + box1.y = 0.2; + box1.z = 0.1; + box2.x = 0.2; + box2.y = 0.1; + box2.z = 0.2; + + ccdVec3Set(&box1.pos, -0.5, 0., 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&box1, &box2, &ccd); + + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[0] += 0.01; + } + + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, -5., -0.1, 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&box1, &box2, &ccd); + + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[0] += 0.1; + } +} + +TEST(boxboxAlignedY) +{ + size_t i; + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, 0., -5., 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&box1, &box2, &ccd); + + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[1] += 0.1; + } +} + +TEST(boxboxAlignedZ) +{ + size_t i; + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, 0., 0., -5.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&box1, &box2, &ccd); + + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[2] += 0.1; + } +} + + +TEST(boxboxRot) +{ + size_t i; + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + ccd_vec3_t axis; + ccd_real_t angle; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, -5., 0.5, 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + ccdVec3Set(&axis, 0., 1., 0.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&box1, &box2, &ccd); + + if (i < 33 || i > 67){ + assertFalse(res); + }else if (i != 33 && i != 67){ + assertTrue(res); + } + + box1.pos.v[0] += 0.1; + } + + box1.x = 1; + box1.y = 1; + box1.z = 1; + box2.x = 1; + box2.y = 1; + box2.z = 1; + + ccdVec3Set(&box1.pos, -1.01, 0., 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + + ccdVec3Set(&axis, 0., 1., 0.); + angle = 0.; + for (i = 0; i < 30; i++){ + res = ccdGJKIntersect(&box1, &box2, &ccd); + + if (i != 0 && i != 10 && i != 20){ + assertTrue(res); + }else{ + assertFalse(res); + } + + angle += M_PI / 20.; + ccdQuatSetAngleAxis(&box1.quat, angle, &axis); + } + +} + + + +static void pConf(ccd_box_t *box1, ccd_box_t *box2, const ccd_vec3_t *v) +{ + fprintf(stdout, "# box1.pos: [%lf %lf %lf]\n", + ccdVec3X(&box1->pos), ccdVec3Y(&box1->pos), ccdVec3Z(&box1->pos)); + fprintf(stdout, "# box1->quat: [%lf %lf %lf %lf]\n", + box1->quat.q[0], box1->quat.q[1], box1->quat.q[2], box1->quat.q[3]); + fprintf(stdout, "# box2->pos: [%lf %lf %lf]\n", + ccdVec3X(&box2->pos), ccdVec3Y(&box2->pos), ccdVec3Z(&box2->pos)); + fprintf(stdout, "# box2->quat: [%lf %lf %lf %lf]\n", + box2->quat.q[0], box2->quat.q[1], box2->quat.q[2], box2->quat.q[3]); + fprintf(stdout, "# sep: [%lf %lf %lf]\n", + ccdVec3X(v), ccdVec3Y(v), ccdVec3Z(v)); + fprintf(stdout, "#\n"); +} + +TEST(boxboxSeparate) +{ + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + ccd_vec3_t sep, expsep, expsep2, axis; + + fprintf(stderr, "\n\n\n---- boxboxSeparate ----\n\n\n"); + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.5; + box2.y = 1.; + box2.z = 1.5; + + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + ccdVec3Set(&box1.pos, -0.5, 0.5, 0.2); + res = ccdGJKIntersect(&box1, &box2, &ccd); + assertTrue(res); + + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + ccdVec3Set(&expsep, 0.25, 0., 0.); + assertTrue(ccdVec3Eq(&sep, &expsep)); + + ccdVec3Scale(&sep, -1.); + ccdVec3Add(&box1.pos, &sep); + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + ccdVec3Set(&expsep, 0., 0., 0.); + assertTrue(ccdVec3Eq(&sep, &expsep)); + + + ccdVec3Set(&box1.pos, -0.3, 0.5, 1.); + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + ccdVec3Set(&expsep, 0., 0., -0.25); + assertTrue(ccdVec3Eq(&sep, &expsep)); + + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, 0., 0., 0.); + + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + ccdVec3Set(&expsep, 0., 0., 1.); + ccdVec3Set(&expsep2, 0., 0., -1.); + assertTrue(ccdVec3Eq(&sep, &expsep) || ccdVec3Eq(&sep, &expsep2)); + + + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0., 0.); + + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + pConf(&box1, &box2, &sep); + + + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + pConf(&box1, &box2, &sep); +} + + +#define TOSVT() \ + svtObjPen(&box1, &box2, stdout, "Pen 1", depth, &dir, &pos); \ + ccdVec3Scale(&dir, depth); \ + ccdVec3Add(&box2.pos, &dir); \ + svtObjPen(&box1, &box2, stdout, "Pen 1", depth, &dir, &pos) + +TEST(boxboxPenetration) +{ + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + ccd_vec3_t axis; + ccd_quat_t rot; + ccd_real_t depth; + ccd_vec3_t dir, pos; + + fprintf(stderr, "\n\n\n---- boxboxPenetration ----\n\n\n"); + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.5; + box2.y = 1.; + box2.z = 1.5; + + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + ccdVec3Set(&box2.pos, 0.1, 0., 0.); + res = ccdGJKPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 1"); + //TOSVT(); + + + ccdVec3Set(&box1.pos, -0.3, 0.5, 1.); + res = ccdGJKPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 2"); + //TOSVT(); <<< + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, 0.1, 0., 0.1); + + res = ccdGJKPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 3"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0., 0.); + + res = ccdGJKPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 4"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.5, 0.); + + res = ccdGJKPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 5"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&box2.pos, 0.1, 0., 0.); + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + + res = ccdGJKPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 6"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&axis, 1., 1., 1.); + ccdQuatSetAngleAxis(&rot, M_PI / 4., &axis); + ccdQuatMul(&box1.quat, &rot); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + + res = ccdGJKPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 7"); + //TOSVT(); <<< + + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.2; box2.y = 0.5; box2.z = 1.; + box2.x = box2.y = box2.z = 1.; + + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&axis, 1., 0., 0.); + ccdQuatSetAngleAxis(&rot, M_PI / 4., &axis); + ccdQuatMul(&box1.quat, &rot); + ccdVec3Set(&box1.pos, -1.3, 0., 0.); + + ccdVec3Set(&box2.pos, 0., 0., 0.); + + res = ccdGJKPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 8"); + //TOSVT(); +} diff -Nru ode-0.11.1/libccd/src/testsuites/boxbox.h ode-0.14/libccd/src/testsuites/boxbox.h --- ode-0.11.1/libccd/src/testsuites/boxbox.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/boxbox.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +#ifndef BOX_BOX +#define BOX_BOX + +#include + +TEST(boxboxSetUp); +TEST(boxboxTearDown); + +TEST(boxboxAlignedX); +TEST(boxboxAlignedY); +TEST(boxboxAlignedZ); + +TEST(boxboxRot); + +TEST(boxboxSeparate); +TEST(boxboxPenetration); + +TEST_SUITE(TSBoxBox) { + TEST_ADD(boxboxSetUp), + + TEST_ADD(boxboxAlignedX), + TEST_ADD(boxboxAlignedY), + TEST_ADD(boxboxAlignedZ), + TEST_ADD(boxboxRot), + TEST_ADD(boxboxSeparate), + TEST_ADD(boxboxPenetration), + + TEST_ADD(boxboxTearDown), + TEST_SUITE_CLOSURE +}; + +#endif diff -Nru ode-0.11.1/libccd/src/testsuites/boxcyl.c ode-0.14/libccd/src/testsuites/boxcyl.c --- ode-0.11.1/libccd/src/testsuites/boxcyl.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/boxcyl.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,162 @@ +#include +#include "common.h" +#include +#include "support.h" + + +#define TOSVT() \ + svtObjPen(&box, &cyl, stdout, "Pen 1", depth, &dir, &pos); \ + ccdVec3Scale(&dir, depth); \ + ccdVec3Add(&cyl.pos, &dir); \ + svtObjPen(&box, &cyl, stdout, "Pen 1", depth, &dir, &pos) + + +TEST(boxcylIntersect) +{ + ccd_t ccd; + CCD_BOX(box); + CCD_CYL(cyl); + int res; + ccd_vec3_t axis; + + box.x = 0.5; + box.y = 1.; + box.z = 1.5; + cyl.radius = 0.4; + cyl.height = 0.7; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + ccdVec3Set(&cyl.pos, 0.1, 0., 0.); + res = ccdGJKIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&cyl.pos, .6, 0., 0.); + res = ccdGJKIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.); + res = ccdGJKIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + res = ccdGJKIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&axis, 0., 1., 0.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + res = ccdGJKIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&axis, 0.67, 1.1, 0.12); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + res = ccdGJKIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .6, 0., 0.5); + res = ccdGJKIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .9, 0.8, 0.5); + res = ccdGJKIntersect(&box, &cyl, &ccd); + assertTrue(res); +} + + +TEST(boxcylPenEPA) +{ + ccd_t ccd; + CCD_BOX(box); + CCD_CYL(cyl); + int res; + ccd_vec3_t axis; + ccd_real_t depth; + ccd_vec3_t dir, pos; + + box.x = 0.5; + box.y = 1.; + box.z = 1.5; + cyl.radius = 0.4; + cyl.height = 0.7; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + ccdVec3Set(&cyl.pos, 0.1, 0., 0.); + res = ccdGJKPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 1"); + //TOSVT(); + + ccdVec3Set(&cyl.pos, .6, 0., 0.); + res = ccdGJKPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 2"); + //TOSVT(); <<< + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.); + res = ccdGJKPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 3"); + //TOSVT(); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + res = ccdGJKPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 4"); + //TOSVT(); + + ccdVec3Set(&axis, 0., 1., 0.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + res = ccdGJKPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 5"); + //TOSVT(); + + ccdVec3Set(&axis, 0.67, 1.1, 0.12); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + res = ccdGJKPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 6"); + //TOSVT(); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .6, 0., 0.5); + res = ccdGJKPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 7"); + //TOSVT(); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .9, 0.8, 0.5); + res = ccdGJKPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 8"); + //TOSVT(); +} + diff -Nru ode-0.11.1/libccd/src/testsuites/boxcyl.h ode-0.14/libccd/src/testsuites/boxcyl.h --- ode-0.11.1/libccd/src/testsuites/boxcyl.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/boxcyl.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,16 @@ +#ifndef TEST_BOXCYL_H +#define TEST_BOXCYL_H + +#include + +TEST(boxcylIntersect); +TEST(boxcylPenEPA); + +TEST_SUITE(TSBoxCyl){ + TEST_ADD(boxcylIntersect), + TEST_ADD(boxcylPenEPA), + + TEST_SUITE_CLOSURE +}; + +#endif diff -Nru ode-0.11.1/libccd/src/testsuites/common.c ode-0.14/libccd/src/testsuites/common.c --- ode-0.11.1/libccd/src/testsuites/common.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/common.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,174 @@ +#include "common.h" +#include +#include +#include "support.h" + +static void svtCyl(ccd_cyl_t *c, FILE *out, const char *color, const char *name) +{ + ccd_vec3_t v[32]; + ccd_quat_t rot; + ccd_vec3_t axis, vpos, vpos2; + ccd_real_t angle, x, y; + size_t i; + + ccdVec3Set(&axis, 0., 0., 1.); + ccdVec3Set(&vpos, 0., c->radius, 0.); + angle = 0.; + for (i = 0; i < 16; i++){ + angle = (ccd_real_t)i * (2. * M_PI / 16.); + + ccdQuatSetAngleAxis(&rot, angle, &axis); + ccdVec3Copy(&vpos2, &vpos); + ccdQuatRotVec(&vpos2, &rot); + x = ccdVec3X(&vpos2); + y = ccdVec3Y(&vpos2); + + ccdVec3Set(&v[i], x, y, c->height / 2.); + ccdVec3Set(&v[i + 16], x, y, -c->height / 2.); + } + + for (i = 0; i < 32; i++){ + ccdQuatRotVec(&v[i], &c->quat); + ccdVec3Add(&v[i], &c->pos); + } + + fprintf(out, "-----\n"); + if (name) + fprintf(out, "Name: %s\n", name); + + fprintf(out, "Face color: %s\n", color); + fprintf(out, "Edge color: %s\n", color); + fprintf(out, "Point color: %s\n", color); + fprintf(out, "Points:\n"); + for (i = 0; i < 32; i++){ + fprintf(out, "%lf %lf %lf\n", ccdVec3X(&v[i]), ccdVec3Y(&v[i]), ccdVec3Z(&v[i])); + } + + fprintf(out, "Edges:\n"); + fprintf(out, "0 16\n"); + fprintf(out, "0 31\n"); + for (i = 1; i < 16; i++){ + fprintf(out, "0 %d\n", i); + fprintf(out, "16 %d\n", i + 16); + if (i != 0){ + fprintf(out, "%d %d\n", i - 1, i); + fprintf(out, "%d %d\n", i + 16 - 1, i + 16); + } + + fprintf(out, "%d %d\n", i, i + 16); + fprintf(out, "%d %d\n", i, i + 16 - 1); + } + + fprintf(out, "Faces:\n"); + for (i = 2; i < 16; i++){ + fprintf(out, "0 %d %d\n", i, i -1); + fprintf(out, "16 %d %d\n", i + 16, i + 16 -1); + + } + fprintf(out, "0 16 31\n"); + fprintf(out, "0 31 15\n"); + for (i = 1; i < 16; i++){ + fprintf(out, "%d %d %d\n", i, i + 16, i + 16 - 1); + fprintf(out, "%d %d %d\n", i, i + 16 - 1, i - 1); + } + fprintf(out, "-----\n"); +} + +static void svtBox(ccd_box_t *b, FILE *out, const char *color, const char *name) +{ + ccd_vec3_t v[8]; + size_t i; + + ccdVec3Set(&v[0], b->x * 0.5, b->y * 0.5, b->z * 0.5); + ccdVec3Set(&v[1], b->x * 0.5, b->y * -0.5, b->z * 0.5); + ccdVec3Set(&v[2], b->x * 0.5, b->y * 0.5, b->z * -0.5); + ccdVec3Set(&v[3], b->x * 0.5, b->y * -0.5, b->z * -0.5); + ccdVec3Set(&v[4], b->x * -0.5, b->y * 0.5, b->z * 0.5); + ccdVec3Set(&v[5], b->x * -0.5, b->y * -0.5, b->z * 0.5); + ccdVec3Set(&v[6], b->x * -0.5, b->y * 0.5, b->z * -0.5); + ccdVec3Set(&v[7], b->x * -0.5, b->y * -0.5, b->z * -0.5); + + for (i = 0; i < 8; i++){ + ccdQuatRotVec(&v[i], &b->quat); + ccdVec3Add(&v[i], &b->pos); + } + + fprintf(out, "-----\n"); + if (name) + fprintf(out, "Name: %s\n", name); + fprintf(out, "Face color: %s\n", color); + fprintf(out, "Edge color: %s\n", color); + fprintf(out, "Point color: %s\n", color); + fprintf(out, "Points:\n"); + for (i = 0; i < 8; i++){ + fprintf(out, "%lf %lf %lf\n", ccdVec3X(&v[i]), ccdVec3Y(&v[i]), ccdVec3Z(&v[i])); + } + + fprintf(out, "Edges:\n"); + fprintf(out, "0 1\n 0 2\n2 3\n3 1\n1 2\n6 2\n1 7\n1 5\n"); + fprintf(out, "5 0\n0 4\n4 2\n6 4\n6 5\n5 7\n6 7\n7 2\n7 3\n4 5\n"); + + fprintf(out, "Faces:\n"); + fprintf(out, "0 2 1\n1 2 3\n6 2 4\n4 2 0\n4 0 5\n5 0 1\n"); + fprintf(out, "5 1 7\n7 1 3\n6 4 5\n6 5 7\n2 6 7\n2 7 3\n"); + fprintf(out, "-----\n"); +} + + +void svtObj(void *_o, FILE *out, const char *color, const char *name) +{ + ccd_obj_t *o = (ccd_obj_t *)_o; + + if (o->type == CCD_OBJ_CYL){ + svtCyl((ccd_cyl_t *)o, out, color, name); + }else if (o->type == CCD_OBJ_BOX){ + svtBox((ccd_box_t *)o, out, color, name); + } +} + +void svtObjPen(void *o1, void *o2, + FILE *out, const char *name, + ccd_real_t depth, const ccd_vec3_t *dir, const ccd_vec3_t *pos) +{ + ccd_vec3_t sep; + char oname[500]; + + ccdVec3Copy(&sep, dir); + ccdVec3Scale(&sep, depth); + ccdVec3Add(&sep, pos); + + fprintf(out, "------\n"); + if (name) + fprintf(out, "Name: %s\n", name); + fprintf(out, "Point color: 0.1 0.1 0.9\n"); + fprintf(out, "Points:\n%lf %lf %lf\n", ccdVec3X(pos), ccdVec3Y(pos), ccdVec3Z(pos)); + fprintf(out, "------\n"); + fprintf(out, "Point color: 0.1 0.9 0.9\n"); + fprintf(out, "Edge color: 0.1 0.9 0.9\n"); + fprintf(out, "Points:\n%lf %lf %lf\n", ccdVec3X(pos), ccdVec3Y(pos), ccdVec3Z(pos)); + fprintf(out, "%lf %lf %lf\n", ccdVec3X(&sep), ccdVec3Y(&sep), ccdVec3Z(&sep)); + fprintf(out, "Edges: 0 1\n"); + + oname[0] = 0x0; + if (name) + sprintf(oname, "%s o1", name); + svtObj(o1, out, "0.9 0.1 0.1", oname); + + oname[0] = 0x0; + if (name) + sprintf(oname, "%s o1", name); + svtObj(o2, out, "0.1 0.9 0.1", oname); +} + + +void recPen(ccd_real_t depth, const ccd_vec3_t *dir, const ccd_vec3_t *pos, + FILE *out, const char *note) +{ + if (!note) + note = ""; + + fprintf(out, "# %s: depth: %lf\n", note, depth); + fprintf(out, "# %s: dir: [%lf %lf %lf]\n", note, ccdVec3X(dir), ccdVec3Y(dir), ccdVec3Z(dir)); + fprintf(out, "# %s: pos: [%lf %lf %lf]\n", note, ccdVec3X(pos), ccdVec3Y(pos), ccdVec3Z(pos)); + fprintf(out, "#\n"); +} diff -Nru ode-0.11.1/libccd/src/testsuites/common.h ode-0.14/libccd/src/testsuites/common.h --- ode-0.11.1/libccd/src/testsuites/common.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/common.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,14 @@ +#ifndef TEST_COMMON +#define TEST_COMMON + +#include +#include + +void svtObj(void *o, FILE *out, const char *color, const char *name); +void svtObjPen(void *o1, void *o2, + FILE *out, const char *name, + ccd_real_t depth, const ccd_vec3_t *dir, const ccd_vec3_t *pos); +void recPen(ccd_real_t depth, const ccd_vec3_t *dir, const ccd_vec3_t *pos, + FILE *out, const char *note); + +#endif diff -Nru ode-0.11.1/libccd/src/testsuites/cu/check-regressions ode-0.14/libccd/src/testsuites/cu/check-regressions --- ode-0.11.1/libccd/src/testsuites/cu/check-regressions 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/cu/check-regressions 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,413 @@ +#!/usr/bin/python +## +# CU - C unit testing framework +# --------------------------------- +# Copyright (c)2007,2008 Daniel Fiser +# +# +# This file is part of CU. +# +# CU is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 3 of +# the License, or (at your option) any later version. +# +# CU is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . +# + +from subprocess import Popen, PIPE +import os +import re +import sys +import math +from getopt import gnu_getopt, GetoptError + +EPS = 0.6 +BASE_DIR = "." +MAX_DIFF_LINES = 20 +EXACT = False + +PROGRESS_ON = True +MSG_BASE = "" + +class Hunk: + """ This class represents one hunk from diff. """ + + def __init__(self): + self.added = [] + self.deleted = [] + self.lines = [] + + # to identify lines with floating point numbers + self.re_is_num = re.compile("^.*[0-9].*$") + + # pattern to match floating point number + self.num_pattern = r"-?(?:(?:[0-9]+(?:\.[0-9]*)?)|(?:\.[0-9]+))(?:[eE]-?[0-9]+)?" + self.re_num = re.compile(self.num_pattern) + + def numLines(self): + return len(self.lines) + def numLinesAdded(self): + return len(self.added) + def numLinesDeleted(self): + return len(self.deleted) + + def addLineAdded(self, line): + self.added.append(line) + def addLineDeleted(self, line): + self.deleted.append(line) + def addLine(self, line): + self.lines.append(line) + + def getLines(self): + return self.lines + def getLinesAdded(self): + return self.added + def getLinesDeleted(self): + return self.deleted + + def __eq(self, num1, num2): + """ Returns True if num1 equals to num2 with respect to EPS + (defined above) """ + return math.fabs(num1 - num2) < EPS + + def checkFloats(self): + """ This method try to check if only difference between added and + deleted lines of this hunk is different precission of floating + point numbers + """ + + # If number of added and deleted lines differs, then there is more + # differences that precission of floating point numbers + if self.numLinesAdded() != self.numLinesDeleted(): + return False + + for i in xrange(0, self.numLinesAdded()): + # if any line does not contain number - return False because + # there must be more differences than in numbers + if not self.re_is_num.match(self.added[i]) \ + or not self.re_is_num.match(self.deleted[i]): + return False + + line1 = self.added[i] + line2 = self.deleted[i] + + # Extract all floating point numbers from each line + nums1 = self.re_num.findall(line1) + nums2 = self.re_num.findall(line2) + # and remove all empty strings + nums1 = filter(lambda x: len(x) > 0, nums1) + nums2 = filter(lambda x: len(x) > 0, nums2) + + # if length of list nums1 does not equal to length of nums2 + # return False + if len(nums1) != len(nums2): + return False + + # iterate trough all numbers + for j in xrange(0, len(nums1)): + # if numbers do not equal to each other return False + if not self.__eq(float(nums1[j]), float(nums2[j])): + return False + + # compare the rest of lines + line1 = self.re_num.sub("", line1) + line2 = self.re_num.sub("", line2) + if line1 != line2: + return False + + # If it does not fail anywhere, added and deleted lines must be + # same + return True + + +class Diff: + """ Represents whole diff. """ + + def __init__(self): + self.hunks = [] + self.lines = 0 + self.omitted_lines = 0 + + def addHunk(self, hunk): + self.hunks.append(hunk) + self.lines += hunk.numLines() + + def numLines(self): + return self.lines + def numOmittedLines(self): + return self.omitted_lines + + def getHunks(self): + return self.hunks + def numHunks(self): + return len(self.hunks) + + def checkFloats(self): + """ Will call method checkFloats on each hunk """ + hks = self.hunks[:] + self.hunks = [] + self.lines = 0 + for h in hks: + if not h.checkFloats(): + self.hunks.append(h) + self.lines += h.numLines() + else: + self.omitted_lines += h.numLines() + + + +class Parser: + def __init__(self, fin): + self.fin = fin + self.line = "" + self.diff = Diff() + self.cur_hunk = None + + # to recognize beginning of hunk: + self.re_hunk = re.compile(r"^[0-9]*(,[0-9]*){0,1}[a-zA-Z]?[0-9]*(,[0-9]*){0,1}$") + + self.re_added = re.compile(r"^> (.*)$") + self.re_deleted = re.compile(r"^< (.*)$") + + def __readNextLine(self): + self.line = self.fin.readline() + if len(self.line) == 0: + return False + return True + + def parse(self): + global PROGRESS_ON + global MSG_BASE + + num_lines = 0 + while self.__readNextLine(): + # beggining of hunk + if self.re_hunk.match(self.line): + if self.cur_hunk is not None: + self.diff.addHunk(self.cur_hunk) + self.cur_hunk = Hunk() + self.cur_hunk.addLine(self.line) + + # line added + match = self.re_added.match(self.line) + if match is not None: + self.cur_hunk.addLine(self.line) + self.cur_hunk.addLineAdded(match.group(1)) + + # line deleted + match = self.re_deleted.match(self.line) + if match is not None: + self.cur_hunk.addLine(self.line) + self.cur_hunk.addLineDeleted(match.group(1)) + + num_lines += 1 + + if PROGRESS_ON and num_lines % 50 == 0: + print MSG_BASE, "[ %08d ]" % num_lines, "\r", + sys.stdout.flush() + + # last push to list of hunks + if self.cur_hunk is not None: + self.diff.addHunk(self.cur_hunk) + + if PROGRESS_ON: + print MSG_BASE, " ", "\r", + sys.stdout.flush() + + def getDiff(self): + return self.diff + + +def regressionFilesInDir(): + """ Returns sorted list of pairs of filenames where first name in pair + is tmp. file and second corresponding file with saved regressions. + """ + + re_tmp_out_file = re.compile(r"tmp\.(.*\.out)") + re_tmp_err_file = re.compile(r"tmp\.(.*\.err)") + files = [] + + all_files = os.listdir(".") + all_files.sort() + for file in all_files: + res = re_tmp_out_file.match(file) + if res is not None: + fname = res.group(1) + tmp = [file, ""] + for file2 in all_files: + if file2 == fname: + tmp = [file, file2,] + break + files.append(tmp) + + res = re_tmp_err_file.match(file) + if res is not None: + fname = res.group(1) + tmp = [file, ""] + for file2 in all_files: + if file2 == fname: + tmp = [file, file2,] + break + files.append(tmp) + + return files + + +def MSG(str = "", wait = False): + if wait: + print str, + else: + print str +def MSGOK(prestr = "", str = "", poststr = ""): + print prestr, "\033[0;32m" + str + "\033[0;0m", poststr +def MSGFAIL(prestr = "", str = "", poststr = ""): + print prestr, "\033[0;31m" + str + "\033[0;0m", poststr +def MSGINFO(prestr = "", str = "", poststr = ""): + print prestr, "\033[0;33m" + str + "\033[0;0m", poststr +def dumpLines(lines, prefix = "", wait = False, max_lines = -1): + line_num = 0 + if wait: + for line in lines: + print prefix, line, + line_num += 1 + if max_lines >= 0 and line_num > max_lines: + break + else: + for line in lines: + print prefix, line + line_num += 1 + if max_lines >= 0 and line_num > max_lines: + break + +def main(files): + global MSG_BASE + + # As first compute length of columns + len1 = 0 + len2 = 0 + for filenames in files: + if len(filenames[0]) > len1: + len1 = len(filenames[0]) + if len(filenames[1]) > len2: + len2 = len(filenames[1]) + + for filenames in files: + if len(filenames[1]) == 0: + MSGFAIL("", "===", "Can't compare %s %s, bacause %s does not exist!" % \ + (filenames[0], filenames[0][4:], filenames[0][4:])) + continue + + cmd = ["diff", filenames[0], filenames[1]] + MSG_BASE = "Comparing %s and %s" % \ + (filenames[0].ljust(len1) ,filenames[1].ljust(len2)) + if not PROGRESS_ON: + print MSG_BASE, + sys.stdout.flush() + + pipe = Popen(cmd, stdout=PIPE) + parser = Parser(pipe.stdout) + parser.parse() + diff = parser.getDiff() + if not EXACT: + diff.checkFloats() + + if PROGRESS_ON: + print MSG_BASE, + + if diff.numHunks() == 0: + MSGOK(" [", "OK", "]") + if diff.numOmittedLines() > 0: + MSGINFO(" -->", str(diff.numOmittedLines()) + " lines from diff omitted") + else: + MSGFAIL(" [", "FAILED", "]") + if diff.numOmittedLines() > 0: + MSGINFO(" -->", str(diff.numOmittedLines()) + " lines from diff omitted") + MSGINFO(" -->", "Diff has " + str(diff.numLines()) + " lines") + + if diff.numLines() <= MAX_DIFF_LINES: + MSGINFO(" -->", "Diff:") + for h in diff.getHunks(): + dumpLines(h.getLines(), " |", True) + else: + MSGINFO(" -->", "Printing only first " + str(MAX_DIFF_LINES) + " lines:") + lines = [] + for h in diff.getHunks(): + lines += h.getLines() + if len(lines) > MAX_DIFF_LINES: + break; + dumpLines(lines, " |", True, MAX_DIFF_LINES) + +def usage(): + print "Usage: " + sys.argv[0] + " [ OPTIONS ] [ directory, [ directory, [ ... ] ] ]" + print "" + print " OPTIONS:" + print " --help / -h none Print this help" + print " --exact / -e none Switch do exact comparasion of files" + print " --not-exact / -n none Switch do non exact comparasion of files (default behaviour)" + print " --max-diff-lines int Maximum of lines of diff which can be printed (default " + str(MAX_DIFF_LINES) + ")" + print " --eps float Precision of floating point numbers (epsilon) (default " + str(EPS) + ")" + print " --no-progress none Turn off progress bar" + print " --progress none Turn on progress bar (default)" + print "" + print " This program is able to compare files with regressions generated by CU testsuites." + print " You can specify directories which are to be searched for regression files." + print " In non exact copmarasion mode (which is default), this program tries to compare" + print " floating point numbers in files with respect to specified precision (see --eps) and" + print " those lines which differ only in precission of floating point numbers are omitted." + print "" + sys.exit(-1) + + + +# Init: + +# Set up base dir +BASE_DIR = os.getcwd() + +# Parse command line options: +optlist, args = gnu_getopt(sys.argv[1:], + "hen", + ["help", "max-diff-lines=", "eps=", \ + "exact", "not-exact", \ + "no-progress", "progress"]) +for opt in optlist: + if opt[0] == "--help" or opt[0] == "-h": + usage() + if opt[0] == "--exact" or opt[0] == "-e": + EXACT = True + if opt[0] == "--not-exact" or opt[0] == "-n": + EXACT = False + if opt[0] == "--max-diff-lines": + MAX_DIFF_LINES = int(opt[1]) + if opt[0] == "--eps": + EPS = float(opt[1]) + if opt[0] == "--no-progress": + PROGRESS_ON = False + if opt[0] == "--progress": + PROGRESS_ON = True + +if len(args) == 0: + files = regressionFilesInDir() + main(files) +else: + for dir in args: + os.chdir(BASE_DIR) + + MSGINFO() + MSGINFO("", "Processing directory '" + dir + "':") + MSGINFO() + try: + os.chdir(dir) + except: + MSGFAIL(" -->", "Directory '" + dir + "' does not exist.") + files = regressionFilesInDir() + main(files) + +sys.exit(0) diff -Nru ode-0.11.1/libccd/src/testsuites/cu/COPYING ode-0.14/libccd/src/testsuites/cu/COPYING --- ode-0.11.1/libccd/src/testsuites/cu/COPYING 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/cu/COPYING 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff -Nru ode-0.11.1/libccd/src/testsuites/cu/COPYING.LESSER ode-0.14/libccd/src/testsuites/cu/COPYING.LESSER --- ode-0.11.1/libccd/src/testsuites/cu/COPYING.LESSER 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/cu/COPYING.LESSER 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff -Nru ode-0.11.1/libccd/src/testsuites/cu/cu.c ode-0.14/libccd/src/testsuites/cu/cu.c --- ode-0.11.1/libccd/src/testsuites/cu/cu.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/cu/cu.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,387 @@ +/*** + * CU - C unit testing framework + * --------------------------------- + * Copyright (c)2007,2008,2009 Daniel Fiser + * + * + * This file is part of CU. + * + * CU is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. + * + * CU is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#include +#include +#include +#include + +#include "cu.h" + +/** Declared here, because I didn't find header file where it is declared */ +char *strsignal(int sig); + +const char *cu_current_test; +const char *cu_current_test_suite; +int cu_success_test_suites = 0; +int cu_fail_test_suites = 0; +int cu_success_tests = 0; +int cu_fail_tests = 0; +int cu_success_checks = 0; +int cu_fail_checks = 0; + +char cu_out_prefix[CU_OUT_PREFIX_LENGTH+1] = ""; + + +/* globally used file descriptor for reading/writing messages */ +int fd; + +/* indicate if test was failed */ +int test_failed; + +/* codes of messages */ +#define CHECK_FAILED '0' +#define CHECK_SUCCEED '1' +#define TEST_FAILED '2' +#define TEST_SUCCEED '3' +#define TEST_SUITE_FAILED '4' +#define TEST_SUITE_SUCCEED '5' +#define END '6' +#define TEST_NAME '7' + +/* predefined messages */ +#define MSG_CHECK_SUCCEED write(fd, "1\n", 2) +#define MSG_TEST_FAILED write(fd, "2\n", 2) +#define MSG_TEST_SUCCEED write(fd, "3\n", 2) +#define MSG_TEST_SUITE_FAILED write(fd, "4\n", 2) +#define MSG_TEST_SUITE_SUCCEED write(fd, "5\n", 2) +#define MSG_END write(fd, "6\n", 2) + +/* length of buffers */ +#define BUF_LEN 1000 +#define MSGBUF_LEN 300 + + +static void redirect_out_err(const char *testName); +static void close_out_err(void); +static void run_test_suite(const char *ts_name, cu_test_suite_t *ts); +static void receive_messages(void); + +static void cu_run_fork(const char *ts_name, cu_test_suite_t *test_suite); +static void cu_print_results(void); + +void cu_run(int argc, char *argv[]) +{ + cu_test_suites_t *tss; + int i; + char found = 0; + + if (argc > 1){ + for (i=1; i < argc; i++){ + tss = cu_test_suites; + while (tss->name != NULL && tss->test_suite != NULL){ + if (strcmp(argv[i], tss->name) == 0){ + found = 1; + cu_run_fork(tss->name, tss->test_suite); + break; + } + tss++; + } + + if (tss->name == NULL || tss->test_suite == NULL){ + fprintf(stderr, "ERROR: Could not find test suite '%s'\n", argv[i]); + } + } + + if (found == 1) + cu_print_results(); + + }else{ + tss = cu_test_suites; + while (tss->name != NULL && tss->test_suite != NULL){ + cu_run_fork(tss->name, tss->test_suite); + tss++; + } + cu_print_results(); + } + + +} + +static void cu_run_fork(const char *ts_name, cu_test_suite_t *ts) +{ + int pipefd[2]; + int pid; + int status; + + if (pipe(pipefd) == -1){ + perror("Pipe error"); + exit(-1); + } + + fprintf(stdout, " -> %s [IN PROGESS]\n", ts_name); + fflush(stdout); + + pid = fork(); + if (pid < 0){ + perror("Fork error"); + exit(-1); + } + + if (pid == 0){ + /* close read end of pipe */ + close(pipefd[0]); + + fd = pipefd[1]; + + /* run testsuite, messages go to fd */ + run_test_suite(ts_name, ts); + + MSG_END; + close(fd); + + /* stop process where running testsuite */ + exit(0); + }else{ + /* close write end of pipe */ + close(pipefd[1]); + + fd = pipefd[0]; + + /* receive and interpret all messages */ + receive_messages(); + + /* wait for children */ + wait(&status); + if (!WIFEXITED(status)){ /* if child process ends up abnormaly */ + if (WIFSIGNALED(status)){ + fprintf(stdout, "Test suite was terminated by signal %d (%s).\n", + WTERMSIG(status), strsignal(WTERMSIG(status))); + }else{ + fprintf(stdout, "Test suite terminated abnormaly!\n"); + } + + /* mark this test suite as failed, because was terminated + * prematurely */ + cu_fail_test_suites++; + } + + close(fd); + + fprintf(stdout, " -> %s [DONE]\n\n", ts_name); + fflush(stdout); + } + +} + +static void run_test_suite(const char *ts_name, cu_test_suite_t *ts) +{ + int test_suite_failed = 0; + char buffer[MSGBUF_LEN]; + int len; + + /* set up current test suite name for later messaging... */ + cu_current_test_suite = ts_name; + + /* redirect stdout and stderr */ + redirect_out_err(cu_current_test_suite); + + while (ts->name != NULL && ts->func != NULL){ + test_failed = 0; + + /* set up name of test for later messaging */ + cu_current_test = ts->name; + + /* send message what test is currently running */ + len = snprintf(buffer, MSGBUF_LEN, "%c --> Running %s...\n", + TEST_NAME, cu_current_test); + write(fd, buffer, len); + + /* run test */ + (*(ts->func))(); + + if (test_failed){ + MSG_TEST_FAILED; + test_suite_failed = 1; + }else{ + MSG_TEST_SUCCEED; + } + + ts++; /* next test in test suite */ + } + + if (test_suite_failed){ + MSG_TEST_SUITE_FAILED; + }else{ + MSG_TEST_SUITE_SUCCEED; + } + + /* close redirected stdout and stderr */ + close_out_err(); +} + + +static void receive_messages(void) +{ + char buf[BUF_LEN]; /* buffer */ + int buf_len; /* how many chars stored in buf */ + char bufout[MSGBUF_LEN]; /* buffer which can be printed out */ + int bufout_len; + int state = 0; /* 0 - waiting for code, 1 - copy msg to stdout */ + int i; + int end = 0; /* end of messages? */ + + bufout_len = 0; + while((buf_len = read(fd, buf, BUF_LEN)) > 0 && !end){ + for (i=0; i < buf_len; i++){ + + /* Prepare message for printing out */ + if (state == 1 || state == 2){ + if (bufout_len < MSGBUF_LEN) + bufout[bufout_len++] = buf[i]; + } + + /* reset state on '\n' in msg */ + if (buf[i] == '\n'){ + /* copy messages out */ + if (state == 1) + write(1, bufout, bufout_len); + if (state == 2) + write(2, bufout, bufout_len); + + state = 0; + bufout_len = 0; + continue; + } + + if (state == 0){ + if (buf[i] == CHECK_FAILED){ + cu_fail_checks++; + state = 2; + }else if (buf[i] == TEST_NAME){ + state = 1; + }else if (buf[i] == CHECK_SUCCEED){ + cu_success_checks++; + }else if (buf[i] == TEST_FAILED){ + cu_fail_tests++; + }else if (buf[i] == TEST_SUCCEED){ + cu_success_tests++; + }else if (buf[i] == TEST_SUITE_FAILED){ + cu_fail_test_suites++; + }else if (buf[i] == TEST_SUITE_SUCCEED){ + cu_success_test_suites++; + }else if (buf[i] == END){ + end = 1; + break; + } + } + } + } +} + +void cu_success_assertation(void) +{ + MSG_CHECK_SUCCEED; +} + +void cu_fail_assertation(const char *file, int line, const char *msg) +{ + char buf[MSGBUF_LEN]; + int len; + + len = snprintf(buf, MSGBUF_LEN, "%c%s:%d (%s::%s) :: %s\n", + CHECK_FAILED, + file, line, cu_current_test_suite, cu_current_test, msg); + write(fd, buf, len); + + /* enable test_failed flag */ + test_failed = 1; +} + +static void cu_print_results(void) +{ + fprintf(stdout, "\n"); + fprintf(stdout, "==================================================\n"); + fprintf(stdout, "| | failed | succeed | total |\n"); + fprintf(stdout, "|------------------------------------------------|\n"); + fprintf(stdout, "| assertations: | %6d | %7d | %5d |\n", + cu_fail_checks, cu_success_checks, + cu_success_checks+cu_fail_checks); + fprintf(stdout, "| tests: | %6d | %7d | %5d |\n", + cu_fail_tests, cu_success_tests, + cu_success_tests+cu_fail_tests); + fprintf(stdout, "| tests suites: | %6d | %7d | %5d |\n", + cu_fail_test_suites, cu_success_test_suites, + cu_success_test_suites+cu_fail_test_suites); + fprintf(stdout, "==================================================\n"); +} + +void cu_set_out_prefix(const char *str) +{ + strncpy(cu_out_prefix, str, CU_OUT_PREFIX_LENGTH); +} + +static void redirect_out_err(const char *test_name) +{ + char buf[100]; + + snprintf(buf, 99, "%stmp.%s.out", cu_out_prefix, test_name); + if (freopen(buf, "w", stdout) == NULL){ + perror("Redirecting of stdout failed"); + exit(-1); + } + + snprintf(buf, 99, "%stmp.%s.err", cu_out_prefix, test_name); + if (freopen(buf, "w", stderr) == NULL){ + perror("Redirecting of stderr failed"); + exit(-1); + } +} + +static void close_out_err(void) +{ + fclose(stdout); + fclose(stderr); +} + + +#ifdef CU_ENABLE_TIMER +/* global variables for timer functions */ +struct timespec __cu_timer; +static struct timespec __cu_timer_start, __cu_timer_stop; + +const struct timespec *cuTimer(void) +{ + return &__cu_timer; +} + +void cuTimerStart(void) +{ + clock_gettime(CLOCK_MONOTONIC, &__cu_timer_start); +} + +const struct timespec *cuTimerStop(void) +{ + clock_gettime(CLOCK_MONOTONIC, &__cu_timer_stop); + + /* store into t difference between time_start and time_end */ + if (__cu_timer_stop.tv_nsec > __cu_timer_start.tv_nsec){ + __cu_timer.tv_nsec = __cu_timer_stop.tv_nsec - __cu_timer_start.tv_nsec; + __cu_timer.tv_sec = __cu_timer_stop.tv_sec - __cu_timer_start.tv_sec; + }else{ + __cu_timer.tv_nsec = __cu_timer_stop.tv_nsec + 1000000000L - __cu_timer_start.tv_nsec; + __cu_timer.tv_sec = __cu_timer_stop.tv_sec - 1 - __cu_timer_start.tv_sec; + } + + return &__cu_timer; +} +#endif /* CU_ENABLE_TIMER */ diff -Nru ode-0.11.1/libccd/src/testsuites/cu/cu.h ode-0.14/libccd/src/testsuites/cu/cu.h --- ode-0.11.1/libccd/src/testsuites/cu/cu.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/cu/cu.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,164 @@ +/*** + * CU - C unit testing framework + * --------------------------------- + * Copyright (c)2007,2008,2009 Daniel Fiser + * + * + * This file is part of CU. + * + * CU is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. + * + * CU is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#ifndef _CU_H_ +#define _CU_H_ + +#ifdef CU_ENABLE_TIMER +# include +#endif /* CU_ENABLE_TIMER */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/***** PUBLIC API *****/ +/** + * Define test + */ +#define TEST(name) \ + void name(void) + +/** + * Define testsuite + */ +#define TEST_SUITE(name) \ + cu_test_suite_t test_suite_##name[] = +/** + * Must be on the end of list of tests. + */ +#define TEST_SUITE_CLOSURE \ + { NULL, NULL } + +#define TEST_SUITES \ + cu_test_suites_t cu_test_suites[] = +#define TEST_SUITES_CLOSURE \ + { NULL, NULL } +#define TEST_SUITE_ADD(name) \ + { #name, test_suite_##name } + +/** + * Add test to testsuite + */ +#define TEST_ADD(name) \ + { #name, name } + +#define CU_RUN(argc, argv) \ + cu_run(argc, argv) + +/** + * Set prefix for files printed out. Must contain trailing /. + */ +#define CU_SET_OUT_PREFIX(str) \ + cu_set_out_prefix(str) + +/** + * Assertations + * Assertations with suffix 'M' (e.g. assertTrueM) is variation of macro + * where is possible to specify error message. + */ +#define assertTrueM(a, message) \ + if (a){ \ + cu_success_assertation(); \ + }else{ \ + cu_fail_assertation(__FILE__, __LINE__, message); \ + } +#define assertTrue(a) \ + assertTrueM((a), #a " is not true") + +#define assertFalseM(a, message) \ + assertTrueM(!(a), message) +#define assertFalse(a) \ + assertFalseM((a), #a " is not false") + +#define assertEqualsM(a,b,message) \ + assertTrueM((a) == (b), message) +#define assertEquals(a,b) \ + assertEqualsM((a), (b), #a " not equals " #b) + +#define assertNotEqualsM(a,b,message) \ + assertTrueM((a) != (b), message) +#define assertNotEquals(a,b) \ + assertNotEqualsM((a), (b), #a " equals " #b) +/***** PUBLIC API END *****/ + + +#include + +#define CU_MAX_NAME_LENGTH 30 + +typedef void (*cu_test_func_t)(void); +typedef struct _cu_test_suite_t { + const char *name; + cu_test_func_t func; +} cu_test_suite_t; +typedef struct _cu_test_suites_t { + const char *name; + cu_test_suite_t *test_suite; +} cu_test_suites_t; + +extern cu_test_suites_t cu_test_suites[]; + +extern const char *cu_current_test; +extern const char *cu_current_test_suite; + +extern int cu_success_test_suites; +extern int cu_fail_test_suites; +extern int cu_success_tests; +extern int cu_fail_tests; +extern int cu_success_checks; +extern int cu_fail_checks; + +#define CU_OUT_PREFIX_LENGTH 30 +extern char cu_out_prefix[CU_OUT_PREFIX_LENGTH+1]; + +void cu_run(int argc, char *argv[]); +void cu_success_assertation(void); +void cu_fail_assertation(const char *file, int line, const char *msg); +void cu_set_out_prefix(const char *str); + +/** Timer **/ +#ifdef CU_ENABLE_TIMER +extern struct timespec __cu_timer; + +/** + * Returns value of timer. (as timespec struct) + */ +const struct timespec *cuTimer(void); + +/** + * Starts timer. + */ +void cuTimerStart(void); + +/** + * Stops timer and record elapsed time from last call of cuTimerStart(). + * Returns current value of timer. + */ +const struct timespec *cuTimerStop(void); +#endif /* CU_ENABLE_TIMER */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif diff -Nru ode-0.11.1/libccd/src/testsuites/cu/latest.sh ode-0.14/libccd/src/testsuites/cu/latest.sh --- ode-0.11.1/libccd/src/testsuites/cu/latest.sh 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/cu/latest.sh 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/bash + +repo=http://git.danfis.cz/cu.git +files="COPYING \ + COPYING.LESSER \ + cu.h \ + cu.c \ + Makefile \ + check-regressions \ + .gitignore \ + " +rm -rf cu +git clone $repo +for file in $files; do + mv cu/"$file" . +done; +rm -rf cu diff -Nru ode-0.11.1/libccd/src/testsuites/cu/Makefile.am ode-0.14/libccd/src/testsuites/cu/Makefile.am --- ode-0.11.1/libccd/src/testsuites/cu/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/cu/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ +AM_CPPFLAGS = -DCU_ENABLE_TIMER + +check_LTLIBRARIES = libcu.la + +libcu_la_SOURCES = cu.c cu.h + diff -Nru ode-0.11.1/libccd/src/testsuites/cylcyl.c ode-0.14/libccd/src/testsuites/cylcyl.c --- ode-0.11.1/libccd/src/testsuites/cylcyl.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/cylcyl.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,180 @@ +#include +#include +#include +#include "support.h" +#include "common.h" + + +TEST(cylcylSetUp) +{ +} + +TEST(cylcylTearDown) +{ +} + + +TEST(cylcylAlignedX) +{ + ccd_t ccd; + CCD_CYL(c1); + CCD_CYL(c2); + size_t i; + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + c1.radius = 0.35; + c1.height = 0.5; + c2.radius = 0.5; + c2.height = 1.; + + ccdVec3Set(&c1.pos, -5., 0., 0.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&c1, &c2, &ccd); + + if (i < 42 || i > 58){ + assertFalse(res); + }else{ + assertTrue(res); + } + + c1.pos.v[0] += 0.1; + } +} + +TEST(cylcylAlignedY) +{ + ccd_t ccd; + CCD_CYL(c1); + CCD_CYL(c2); + size_t i; + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + c1.radius = 0.35; + c1.height = 0.5; + c2.radius = 0.5; + c2.height = 1.; + + ccdVec3Set(&c1.pos, 0., -5., 0.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&c1, &c2, &ccd); + + if (i < 42 || i > 58){ + assertFalse(res); + }else{ + assertTrue(res); + } + + c1.pos.v[1] += 0.1; + } +} + +TEST(cylcylAlignedZ) +{ + ccd_t ccd; + CCD_CYL(c1); + CCD_CYL(c2); + size_t i; + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + c1.radius = 0.35; + c1.height = 0.5; + c2.radius = 0.5; + c2.height = 1.; + + ccdVec3Set(&c1.pos, 0., 0., -5.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&c1, &c2, &ccd); + + if (i < 43 || i > 57){ + assertFalse(res); + }else{ + assertTrue(res); + } + + c1.pos.v[2] += 0.1; + } +} + +#define TOSVT() \ + svtObjPen(&cyl1, &cyl2, stdout, "Pen 1", depth, &dir, &pos); \ + ccdVec3Scale(&dir, depth); \ + ccdVec3Add(&cyl2.pos, &dir); \ + svtObjPen(&cyl1, &cyl2, stdout, "Pen 1", depth, &dir, &pos) + +TEST(cylcylPenetrationEPA) +{ + ccd_t ccd; + CCD_CYL(cyl1); + CCD_CYL(cyl2); + int res; + ccd_vec3_t axis; + ccd_real_t depth; + ccd_vec3_t dir, pos; + + fprintf(stderr, "\n\n\n---- cylcylPenetration ----\n\n\n"); + + cyl1.radius = 0.35; + cyl1.height = 0.5; + cyl2.radius = 0.5; + cyl2.height = 1.; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + ccdVec3Set(&cyl2.pos, 0., 0., 0.3); + res = ccdGJKPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 1"); + //TOSVT(); + + ccdVec3Set(&cyl1.pos, 0.3, 0.1, 0.1); + res = ccdGJKPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 2"); + //TOSVT(); <<< + + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, 0., 0., 0.); + res = ccdGJKPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 3"); + //TOSVT(); + + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, -0.2, 0.7, 0.2); + res = ccdGJKPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 4"); + //TOSVT(); + + ccdVec3Set(&axis, 0.567, 1.2, 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, 0.6, -0.7, 0.2); + res = ccdGJKPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 5"); + //TOSVT(); + + ccdVec3Set(&axis, -4.567, 1.2, 0.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl2.pos, 0.6, -0.7, 0.2); + res = ccdGJKPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 6"); + //TOSVT(); +} diff -Nru ode-0.11.1/libccd/src/testsuites/cylcyl.h ode-0.14/libccd/src/testsuites/cylcyl.h --- ode-0.11.1/libccd/src/testsuites/cylcyl.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/cylcyl.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,29 @@ +#ifndef CYL_CYL +#define CYL_CYL + +#include + +TEST(cylcylSetUp); +TEST(cylcylTearDown); + +TEST(cylcylAlignedX); +TEST(cylcylAlignedY); +TEST(cylcylAlignedZ); + +TEST(cylcylPenetrationEPA); + +TEST_SUITE(TSCylCyl) { + TEST_ADD(cylcylSetUp), + + TEST_ADD(cylcylAlignedX), + TEST_ADD(cylcylAlignedY), + TEST_ADD(cylcylAlignedZ), + + TEST_ADD(cylcylPenetrationEPA), + + TEST_ADD(cylcylTearDown), + TEST_SUITE_CLOSURE +}; + +#endif + diff -Nru ode-0.11.1/libccd/src/testsuites/main.c ode-0.14/libccd/src/testsuites/main.c --- ode-0.11.1/libccd/src/testsuites/main.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/main.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +#include "vec3.h" +#include "polytope.h" +#include "boxbox.h" +#include "spheresphere.h" +#include "cylcyl.h" +#include "boxcyl.h" + +#include "mpr_boxbox.h" +#include "mpr_cylcyl.h" +#include "mpr_boxcyl.h" + +TEST_SUITES { + TEST_SUITE_ADD(TSVec3), + TEST_SUITE_ADD(TSPt), + TEST_SUITE_ADD(TSBoxBox), + TEST_SUITE_ADD(TSSphereSphere), + TEST_SUITE_ADD(TSCylCyl), + TEST_SUITE_ADD(TSBoxCyl), + + TEST_SUITE_ADD(TSMPRBoxBox), + TEST_SUITE_ADD(TSMPRCylCyl), + TEST_SUITE_ADD(TSMPRBoxCyl), + + TEST_SUITES_CLOSURE +}; +int main(int argc, char *argv[]) +{ + CU_SET_OUT_PREFIX("regressions/"); + CU_RUN(argc, argv); + + return 0; +} diff -Nru ode-0.11.1/libccd/src/testsuites/Makefile.am ode-0.14/libccd/src/testsuites/Makefile.am --- ode-0.11.1/libccd/src/testsuites/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,28 @@ +SUBDIRS = cu + +AM_CPPFLAGS = -I $(srcdir)/.. -I $(builddir)/.. -I $(srcdir)/cu + +LDADD = $(builddir)/cu/libcu.la $(builddir)/../libccd.la + + +check_PROGRAMS = test bench bench2 + +test_SOURCES = main.c \ + common.c common.h \ + support.c support.h \ + vec3.c vec3.h \ + polytope.c polytope.h \ + boxbox.c boxbox.h \ + spheresphere.c spheresphere.h \ + cylcyl.c cylcyl.h \ + boxcyl.c boxcyl.h \ + mpr_boxbox.c mpr_boxbox.h \ + mpr_cylcyl.c mpr_cylcyl.h \ + mpr_boxcyl.c mpr_boxcyl.h + +bench_SOURCES = bench.c \ + support.c support.h + +bench2_SOURCES = bench2.c \ + support.c support.h + diff -Nru ode-0.11.1/libccd/src/testsuites/mpr_boxbox.c ode-0.14/libccd/src/testsuites/mpr_boxbox.c --- ode-0.11.1/libccd/src/testsuites/mpr_boxbox.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/mpr_boxbox.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,500 @@ +#include +#include + +#include +#include "support.h" +#include +#include +#include "common.h" + + +TEST(mprBoxboxAlignedX) +{ + size_t i; + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, -5., 0., 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdMPRIntersect(&box1, &box2, &ccd); + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[0] += 0.1; + } + + box1.x = 0.1; + box1.y = 0.2; + box1.z = 0.1; + box2.x = 0.2; + box2.y = 0.1; + box2.z = 0.2; + + ccdVec3Set(&box1.pos, -0.5, 0., 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdMPRIntersect(&box1, &box2, &ccd); + + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[0] += 0.01; + } + + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, -5., -0.1, 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdMPRIntersect(&box1, &box2, &ccd); + + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[0] += 0.1; + } +} + +TEST(mprBoxboxAlignedY) +{ + size_t i; + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, 0., -5., 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdMPRIntersect(&box1, &box2, &ccd); + + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[1] += 0.1; + } +} + +TEST(mprBoxboxAlignedZ) +{ + size_t i; + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, 0., 0., -5.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + for (i = 0; i < 100; i++){ + res = ccdMPRIntersect(&box1, &box2, &ccd); + + if (i < 35 || i > 65){ + assertFalse(res); + }else if (i != 35 && i != 65){ + assertTrue(res); + } + + box1.pos.v[2] += 0.1; + } +} + + +TEST(mprBoxboxRot) +{ + size_t i; + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + ccd_vec3_t axis; + ccd_real_t angle; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + box1.x = 1; + box1.y = 2; + box1.z = 1; + box2.x = 2; + box2.y = 1; + box2.z = 2; + + ccdVec3Set(&box1.pos, -5., 0.5, 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + ccdVec3Set(&axis, 0., 1., 0.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + + for (i = 0; i < 100; i++){ + res = ccdMPRIntersect(&box1, &box2, &ccd); + + if (i < 33 || i > 67){ + assertFalse(res); + }else if (i != 33 && i != 67){ + assertTrue(res); + } + + box1.pos.v[0] += 0.1; + } + + box1.x = 1; + box1.y = 1; + box1.z = 1; + box2.x = 1; + box2.y = 1; + box2.z = 1; + + ccdVec3Set(&box1.pos, -1.01, 0., 0.); + ccdVec3Set(&box2.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + + ccdVec3Set(&axis, 0., 1., 0.); + angle = 0.; + for (i = 0; i < 30; i++){ + res = ccdMPRIntersect(&box1, &box2, &ccd); + + if (i != 0 && i != 10 && i != 20){ + assertTrue(res); + }else{ + assertFalse(res); + } + + angle += M_PI / 20.; + ccdQuatSetAngleAxis(&box1.quat, angle, &axis); + } + +} + + + +static void pConf(ccd_box_t *box1, ccd_box_t *box2, const ccd_vec3_t *v) +{ + fprintf(stdout, "# box1.pos: [%lf %lf %lf]\n", + ccdVec3X(&box1->pos), ccdVec3Y(&box1->pos), ccdVec3Z(&box1->pos)); + fprintf(stdout, "# box1->quat: [%lf %lf %lf %lf]\n", + box1->quat.q[0], box1->quat.q[1], box1->quat.q[2], box1->quat.q[3]); + fprintf(stdout, "# box2->pos: [%lf %lf %lf]\n", + ccdVec3X(&box2->pos), ccdVec3Y(&box2->pos), ccdVec3Z(&box2->pos)); + fprintf(stdout, "# box2->quat: [%lf %lf %lf %lf]\n", + box2->quat.q[0], box2->quat.q[1], box2->quat.q[2], box2->quat.q[3]); + fprintf(stdout, "# sep: [%lf %lf %lf]\n", + ccdVec3X(v), ccdVec3Y(v), ccdVec3Z(v)); + fprintf(stdout, "#\n"); +} + +TEST(mprBoxboxSeparate) +{ + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + ccd_vec3_t sep, expsep, expsep2, axis; + + fprintf(stderr, "\n\n\n---- boxboxSeparate ----\n\n\n"); + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.5; + box2.y = 1.; + box2.z = 1.5; + + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + ccdVec3Set(&box1.pos, -0.5, 0.5, 0.2); + res = ccdMPRIntersect(&box1, &box2, &ccd); + assertTrue(res); + + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + ccdVec3Set(&expsep, 0.25, 0., 0.); + assertTrue(ccdVec3Eq(&sep, &expsep)); + + ccdVec3Scale(&sep, -1.); + ccdVec3Add(&box1.pos, &sep); + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + ccdVec3Set(&expsep, 0., 0., 0.); + assertTrue(ccdVec3Eq(&sep, &expsep)); + + + ccdVec3Set(&box1.pos, -0.3, 0.5, 1.); + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + ccdVec3Set(&expsep, 0., 0., -0.25); + assertTrue(ccdVec3Eq(&sep, &expsep)); + + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, 0., 0., 0.); + + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + ccdVec3Set(&expsep, 0., 0., 1.); + ccdVec3Set(&expsep2, 0., 0., -1.); + assertTrue(ccdVec3Eq(&sep, &expsep) || ccdVec3Eq(&sep, &expsep2)); + + + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0., 0.); + + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + pConf(&box1, &box2, &sep); + + + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + + res = ccdGJKSeparate(&box1, &box2, &ccd, &sep); + assertTrue(res == 0); + pConf(&box1, &box2, &sep); +} + + +#define TOSVT() \ + svtObjPen(&box1, &box2, stdout, "Pen 1", depth, &dir, &pos); \ + ccdVec3Scale(&dir, depth); \ + ccdVec3Add(&box2.pos, &dir); \ + svtObjPen(&box1, &box2, stdout, "Pen 1", depth, &dir, &pos) + +TEST(mprBoxboxPenetration) +{ + ccd_t ccd; + CCD_BOX(box1); + CCD_BOX(box2); + int res; + ccd_vec3_t axis; + ccd_quat_t rot; + ccd_real_t depth; + ccd_vec3_t dir, pos; + + fprintf(stderr, "\n\n\n---- boxboxPenetration ----\n\n\n"); + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.5; + box2.y = 1.; + box2.z = 1.5; + + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + /* + ccdVec3Set(&box2.pos, 0., 0., 0.); + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 1"); + TOSVT(); + */ + + ccdVec3Set(&box2.pos, 0.1, 0., 0.); + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 1"); + //TOSVT(); + + + ccdVec3Set(&box1.pos, -0.3, 0.5, 1.); + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 2"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, 0.1, 0., 0.1); + + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 3"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0., 0.); + + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 4"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.5, 0.); + + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 5"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + box2.x = box2.y = box2.z = 1.; + ccdVec3Set(&box2.pos, 0.1, 0., 0.); + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 6"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&axis, 1., 1., 1.); + ccdQuatSetAngleAxis(&rot, M_PI / 4., &axis); + ccdQuatMul(&box1.quat, &rot); + ccdVec3Set(&box1.pos, -0.5, 0.1, 0.4); + + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 7"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.2; box2.y = 0.5; box2.z = 1.; + box2.x = box2.y = box2.z = 1.; + + ccdVec3Set(&axis, 0., 0., 1.); + ccdQuatSetAngleAxis(&box1.quat, M_PI / 4., &axis); + ccdVec3Set(&axis, 1., 0., 0.); + ccdQuatSetAngleAxis(&rot, M_PI / 4., &axis); + ccdQuatMul(&box1.quat, &rot); + ccdVec3Set(&box1.pos, -1.3, 0., 0.); + + ccdVec3Set(&box2.pos, 0., 0., 0.); + + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 8"); + //TOSVT(); + + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.5; box2.y = 0.5; box2.z = .5; + ccdVec3Set(&box1.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdVec3Set(&box2.pos, 0., 0.73, 0.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 9"); + //TOSVT(); + + box1.x = box1.y = box1.z = 1.; + box2.x = 0.5; box2.y = 0.5; box2.z = .5; + ccdVec3Set(&box1.pos, 0., 0., 0.); + ccdQuatSet(&box1.quat, 0., 0., 0., 1.); + ccdVec3Set(&box2.pos, 0.3, 0.738, 0.); + ccdQuatSet(&box2.quat, 0., 0., 0., 1.); + + res = ccdMPRPenetration(&box1, &box2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 10"); + //TOSVT(); +} diff -Nru ode-0.11.1/libccd/src/testsuites/mpr_boxbox.h ode-0.14/libccd/src/testsuites/mpr_boxbox.h --- ode-0.11.1/libccd/src/testsuites/mpr_boxbox.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/mpr_boxbox.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,26 @@ +#ifndef MPR_BOX_BOX +#define MPR_BOX_BOX + +#include + +TEST(mprBoxboxAlignedX); +TEST(mprBoxboxAlignedY); +TEST(mprBoxboxAlignedZ); + +TEST(mprBoxboxRot); + +TEST(mprBoxboxSeparate); +TEST(mprBoxboxPenetration); + +TEST_SUITE(TSMPRBoxBox) { + TEST_ADD(mprBoxboxAlignedX), + TEST_ADD(mprBoxboxAlignedY), + TEST_ADD(mprBoxboxAlignedZ), + TEST_ADD(mprBoxboxRot), + //TEST_ADD(mprBoxboxSeparate), + TEST_ADD(mprBoxboxPenetration), + + TEST_SUITE_CLOSURE +}; + +#endif diff -Nru ode-0.11.1/libccd/src/testsuites/mpr_boxcyl.c ode-0.14/libccd/src/testsuites/mpr_boxcyl.c --- ode-0.11.1/libccd/src/testsuites/mpr_boxcyl.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/mpr_boxcyl.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,165 @@ +#include +#include "common.h" +#include +#include "support.h" + +#define TOSVT() \ + svtObjPen(&box, &cyl, stdout, "Pen 1", depth, &dir, &pos); \ + ccdVec3Scale(&dir, depth); \ + ccdVec3Add(&cyl.pos, &dir); \ + svtObjPen(&box, &cyl, stdout, "Pen 1", depth, &dir, &pos) + +TEST(mprBoxcylIntersect) +{ + ccd_t ccd; + CCD_BOX(box); + CCD_CYL(cyl); + int res; + ccd_vec3_t axis; + + box.x = 0.5; + box.y = 1.; + box.z = 1.5; + cyl.radius = 0.4; + cyl.height = 0.7; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + ccdVec3Set(&cyl.pos, 0.1, 0., 0.); + res = ccdMPRIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&cyl.pos, .6, 0., 0.); + res = ccdMPRIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.); + res = ccdMPRIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + res = ccdMPRIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&axis, 0., 1., 0.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + res = ccdMPRIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&axis, 0.67, 1.1, 0.12); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + res = ccdMPRIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .6, 0., 0.5); + res = ccdMPRIntersect(&box, &cyl, &ccd); + assertTrue(res); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .9, 0.8, 0.5); + res = ccdMPRIntersect(&box, &cyl, &ccd); + assertTrue(res); +} + + + +TEST(mprBoxcylPen) +{ + ccd_t ccd; + CCD_BOX(box); + CCD_CYL(cyl); + int res; + ccd_vec3_t axis; + ccd_real_t depth; + ccd_vec3_t dir, pos; + + box.x = 0.5; + box.y = 1.; + box.z = 1.5; + cyl.radius = 0.4; + cyl.height = 0.7; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + ccdVec3Set(&cyl.pos, 0.1, 0., 0.); + res = ccdMPRPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 1"); + //TOSVT(); + + ccdVec3Set(&cyl.pos, .6, 0., 0.); + res = ccdMPRPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 2"); + //TOSVT(); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.); + res = ccdMPRPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 3"); + //TOSVT(); + + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + res = ccdMPRPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 4"); + //TOSVT(); + + ccdVec3Set(&axis, 0., 1., 0.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl.pos, .6, 0.6, 0.5); + res = ccdMPRPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 5"); + //TOSVT(); + + ccdVec3Set(&axis, 0.67, 1.1, 0.12); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + res = ccdMPRPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 6"); + //TOSVT(); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .6, 0., 0.5); + res = ccdMPRPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 7"); + //TOSVT(); + + ccdVec3Set(&axis, -0.1, 2.2, -1.); + ccdQuatSetAngleAxis(&cyl.quat, M_PI / 5., &axis); + ccdVec3Set(&cyl.pos, .6, 0., 0.5); + ccdVec3Set(&axis, 1., 1., 0.); + ccdQuatSetAngleAxis(&box.quat, -M_PI / 4., &axis); + ccdVec3Set(&box.pos, .9, 0.8, 0.5); + res = ccdMPRPenetration(&box, &cyl, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 8"); + //TOSVT(); +} + diff -Nru ode-0.11.1/libccd/src/testsuites/mpr_boxcyl.h ode-0.14/libccd/src/testsuites/mpr_boxcyl.h --- ode-0.11.1/libccd/src/testsuites/mpr_boxcyl.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/mpr_boxcyl.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,16 @@ +#ifndef MPR_TEST_BOXCYL_H +#define MPR_TEST_BOXCYL_H + +#include + +TEST(mprBoxcylIntersect); +TEST(mprBoxcylPen); + +TEST_SUITE(TSMPRBoxCyl){ + TEST_ADD(mprBoxcylIntersect), + TEST_ADD(mprBoxcylPen), + + TEST_SUITE_CLOSURE +}; + +#endif diff -Nru ode-0.11.1/libccd/src/testsuites/mpr_cylcyl.c ode-0.14/libccd/src/testsuites/mpr_cylcyl.c --- ode-0.11.1/libccd/src/testsuites/mpr_cylcyl.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/mpr_cylcyl.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,179 @@ +#include +#include +#include +#include "support.h" +#include "common.h" + + +TEST(mprCylcylAlignedX) +{ + ccd_t ccd; + CCD_CYL(c1); + CCD_CYL(c2); + size_t i; + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + c1.radius = 0.35; + c1.height = 0.5; + c2.radius = 0.5; + c2.height = 1.; + + ccdVec3Set(&c1.pos, -5., 0., 0.); + for (i = 0; i < 100; i++){ + res = ccdMPRIntersect(&c1, &c2, &ccd); + + if (i < 42 || i > 58){ + assertFalse(res); + }else{ + assertTrue(res); + } + + c1.pos.v[0] += 0.1; + } +} + +TEST(mprCylcylAlignedY) +{ + ccd_t ccd; + CCD_CYL(c1); + CCD_CYL(c2); + size_t i; + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + c1.radius = 0.35; + c1.height = 0.5; + c2.radius = 0.5; + c2.height = 1.; + + ccdVec3Set(&c1.pos, 0., -5., 0.); + for (i = 0; i < 100; i++){ + res = ccdMPRIntersect(&c1, &c2, &ccd); + + if (i < 42 || i > 58){ + assertFalse(res); + }else{ + assertTrue(res); + } + + c1.pos.v[1] += 0.1; + } +} + +TEST(mprCylcylAlignedZ) +{ + ccd_t ccd; + CCD_CYL(c1); + CCD_CYL(c2); + size_t i; + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + c1.radius = 0.35; + c1.height = 0.5; + c2.radius = 0.5; + c2.height = 1.; + + ccdVec3Set(&c1.pos, 0., 0., -5.); + for (i = 0; i < 100; i++){ + res = ccdMPRIntersect(&c1, &c2, &ccd); + + if (i < 43 || i > 57){ + assertFalse(res); + }else{ + assertTrue(res); + } + + c1.pos.v[2] += 0.1; + } +} + +#define TOSVT() \ + svtObjPen(&cyl1, &cyl2, stdout, "Pen 1", depth, &dir, &pos); \ + ccdVec3Scale(&dir, depth); \ + ccdVec3Add(&cyl2.pos, &dir); \ + svtObjPen(&cyl1, &cyl2, stdout, "Pen 1", depth, &dir, &pos) + +TEST(mprCylcylPenetration) +{ + ccd_t ccd; + CCD_CYL(cyl1); + CCD_CYL(cyl2); + int res; + ccd_vec3_t axis; + ccd_real_t depth; + ccd_vec3_t dir, pos; + + fprintf(stderr, "\n\n\n---- mprCylcylPenetration ----\n\n\n"); + + cyl1.radius = 0.35; + cyl1.height = 0.5; + cyl2.radius = 0.5; + cyl2.height = 1.; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + ccd.center1 = ccdObjCenter; + ccd.center2 = ccdObjCenter; + + ccdVec3Set(&cyl2.pos, 0., 0., 0.3); + res = ccdMPRPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 1"); + //TOSVT(); + + ccdVec3Set(&cyl1.pos, 0.3, 0.1, 0.1); + res = ccdMPRPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 2"); + //TOSVT(); + + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, 0., 0., 0.); + res = ccdMPRPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 3"); + //TOSVT(); + + ccdVec3Set(&axis, 0., 1., 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, -0.2, 0.7, 0.2); + res = ccdMPRPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 4"); + //TOSVT(); + + ccdVec3Set(&axis, 0.567, 1.2, 1.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 4., &axis); + ccdVec3Set(&cyl2.pos, 0.6, -0.7, 0.2); + res = ccdMPRPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 5"); + //TOSVT(); + + ccdVec3Set(&axis, -4.567, 1.2, 0.); + ccdQuatSetAngleAxis(&cyl2.quat, M_PI / 3., &axis); + ccdVec3Set(&cyl2.pos, 0.6, -0.7, 0.2); + res = ccdMPRPenetration(&cyl1, &cyl2, &ccd, &depth, &dir, &pos); + assertTrue(res == 0); + recPen(depth, &dir, &pos, stdout, "Pen 6"); + //TOSVT(); +} diff -Nru ode-0.11.1/libccd/src/testsuites/mpr_cylcyl.h ode-0.14/libccd/src/testsuites/mpr_cylcyl.h --- ode-0.11.1/libccd/src/testsuites/mpr_cylcyl.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/mpr_cylcyl.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,23 @@ +#ifndef MPR_CYL_CYL +#define MPR_CYL_CYL + +#include + +TEST(mprCylcylAlignedX); +TEST(mprCylcylAlignedY); +TEST(mprCylcylAlignedZ); + +TEST(mprCylcylPenetration); + +TEST_SUITE(TSMPRCylCyl) { + TEST_ADD(mprCylcylAlignedX), + TEST_ADD(mprCylcylAlignedY), + TEST_ADD(mprCylcylAlignedZ), + + TEST_ADD(mprCylcylPenetration), + + TEST_SUITE_CLOSURE +}; + +#endif + diff -Nru ode-0.11.1/libccd/src/testsuites/polytope.c ode-0.14/libccd/src/testsuites/polytope.c --- ode-0.11.1/libccd/src/testsuites/polytope.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/polytope.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,398 @@ +//#undef NDEBUG +#include +#include +#include + +TEST(ptSetUp) +{ +} + +TEST(ptTearDown) +{ +} + + +TEST(ptCreate1) +{ + ccd_pt_t pt; + ccd_pt_vertex_t *v[3]; + ccd_pt_edge_t *e[3]; + ccd_pt_face_t *f; + ccd_vec3_t u; + int res; + size_t i; + + DBG2("------"); + + ccdPtInit(&pt); + ccdPtDestroy(&pt); + + + ccdPtInit(&pt); + + ccdVec3Set(&u, -1., -1., 0.); + v[0] = ccdPtAddVertexCoords(&pt, -1., -1., 0.); + assertTrue(ccdVec3Eq(&u, &v[0]->v.v)); + + ccdVec3Set(&u, 1., 0., 0.); + v[1] = ccdPtAddVertexCoords(&pt, 1., 0., 0.); + assertTrue(ccdVec3Eq(&u, &v[1]->v.v)); + + ccdVec3Set(&u, 0., 0., 1.); + v[2] = ccdPtAddVertexCoords(&pt, 0., 0., 1.); + assertTrue(ccdVec3Eq(&u, &v[2]->v.v)); + + for (i = 0; i < 3; i++){ + assertTrue(ccdEq(v[i]->dist, ccdVec3Len2(&v[i]->v.v))); + } + + + e[0] = ccdPtAddEdge(&pt, v[0], v[1]); + e[1] = ccdPtAddEdge(&pt, v[1], v[2]); + e[2] = ccdPtAddEdge(&pt, v[2], v[0]); + for (i = 0; i < 3; i++){ + DBG("e[%d]->dist: %lf", i, e[i]->dist); + DBG_VEC3(&e[i]->witness, " ->witness: "); + } + + f = ccdPtAddFace(&pt, e[0], e[1], e[2]); + DBG("f->dist: %lf", f->dist); + DBG_VEC3(&f->witness, " ->witness: "); + + for (i = 0; i < 3; i++){ + res = ccdPtDelVertex(&pt, v[i]); + assertFalse(res == 0); + res = ccdPtDelEdge(&pt, e[i]); + assertFalse(res == 0); + } + + ccdPtDelFace(&pt, f); + for (i = 0; i < 3; i++){ + res = ccdPtDelVertex(&pt, v[i]); + assertFalse(res == 0); + } + for (i = 0; i < 3; i++){ + res = ccdPtDelEdge(&pt, e[i]); + assertTrue(res == 0); + } + for (i = 0; i < 3; i++){ + res = ccdPtDelVertex(&pt, v[i]); + assertTrue(res == 0); + } + + v[0] = ccdPtAddVertexCoords(&pt, -1., -1., 0.); + v[1] = ccdPtAddVertexCoords(&pt, 1., 0., 0.); + v[2] = ccdPtAddVertexCoords(&pt, 0., 0., 1.); + + e[0] = ccdPtAddEdge(&pt, v[0], v[1]); + e[1] = ccdPtAddEdge(&pt, v[1], v[2]); + e[2] = ccdPtAddEdge(&pt, v[2], v[0]); + + f = ccdPtAddFace(&pt, e[0], e[1], e[2]); + + ccdPtDestroy(&pt); +} + +TEST(ptCreate2) +{ + ccd_pt_t pt; + ccd_pt_vertex_t *v[4]; + ccd_pt_edge_t *e[6]; + ccd_pt_face_t *f[4]; + ccd_vec3_t u; + int res; + size_t i; + + DBG2("------"); + + ccdPtInit(&pt); + + ccdVec3Set(&u, -1., -1., 0.); + v[0] = ccdPtAddVertexCoords(&pt, -1., -1., 0.); + assertTrue(ccdVec3Eq(&u, &v[0]->v.v)); + + ccdVec3Set(&u, 1., 0., 0.); + v[1] = ccdPtAddVertexCoords(&pt, 1., 0., 0.); + assertTrue(ccdVec3Eq(&u, &v[1]->v.v)); + + ccdVec3Set(&u, 0., 0., 1.); + v[2] = ccdPtAddVertexCoords(&pt, 0., 0., 1.); + assertTrue(ccdVec3Eq(&u, &v[2]->v.v)); + + ccdVec3Set(&u, 0., 1., 0.); + v[3] = ccdPtAddVertexCoords(&pt, 0., 1., 0.); + assertTrue(ccdVec3Eq(&u, &v[3]->v.v)); + + for (i = 0; i < 4; i++){ + assertTrue(ccdEq(v[i]->dist, ccdVec3Len2(&v[i]->v.v))); + } + for (i = 0; i < 4; i++){ + DBG("v[%d]->dist: %lf", i, v[i]->dist); + DBG_VEC3(&v[i]->witness, " ->witness: "); + } + + e[0] = ccdPtAddEdge(&pt, v[0], v[1]); + e[1] = ccdPtAddEdge(&pt, v[1], v[2]); + e[2] = ccdPtAddEdge(&pt, v[2], v[0]); + e[3] = ccdPtAddEdge(&pt, v[3], v[0]); + e[4] = ccdPtAddEdge(&pt, v[3], v[1]); + e[5] = ccdPtAddEdge(&pt, v[3], v[2]); + for (i = 0; i < 6; i++){ + DBG("e[%d]->dist: %lf", i, e[i]->dist); + DBG_VEC3(&e[i]->witness, " ->witness: "); + } + + f[0] = ccdPtAddFace(&pt, e[0], e[1], e[2]); + f[1] = ccdPtAddFace(&pt, e[3], e[4], e[0]); + f[2] = ccdPtAddFace(&pt, e[4], e[5], e[1]); + f[3] = ccdPtAddFace(&pt, e[5], e[3], e[2]); + for (i = 0; i < 4; i++){ + DBG("f[%d]->dist: %lf", i, f[i]->dist); + DBG_VEC3(&f[i]->witness, " ->witness: "); + } + + for (i = 0; i < 4; i++){ + res = ccdPtDelVertex(&pt, v[i]); + assertFalse(res == 0); + } + for (i = 0; i < 6; i++){ + res = ccdPtDelEdge(&pt, e[i]); + assertFalse(res == 0); + } + + res = ccdPtDelFace(&pt, f[0]); + for (i = 0; i < 6; i++){ + res = ccdPtDelEdge(&pt, e[i]); + assertFalse(res == 0); + } + + res = ccdPtDelFace(&pt, f[1]); + assertTrue(ccdPtDelEdge(&pt, e[0]) == 0); + assertFalse(ccdPtDelEdge(&pt, e[1]) == 0); + assertFalse(ccdPtDelEdge(&pt, e[2]) == 0); + assertFalse(ccdPtDelEdge(&pt, e[3]) == 0); + assertFalse(ccdPtDelEdge(&pt, e[4]) == 0); + assertFalse(ccdPtDelEdge(&pt, e[5]) == 0); + for (i = 0; i < 4; i++){ + res = ccdPtDelVertex(&pt, v[i]); + assertFalse(res == 0); + } + + res = ccdPtDelFace(&pt, f[2]); + assertTrue(ccdPtDelEdge(&pt, e[1]) == 0); + assertTrue(ccdPtDelEdge(&pt, e[4]) == 0); + assertFalse(ccdPtDelEdge(&pt, e[2]) == 0); + assertFalse(ccdPtDelEdge(&pt, e[3]) == 0); + assertFalse(ccdPtDelEdge(&pt, e[5]) == 0); + + assertTrue(ccdPtDelVertex(&pt, v[1]) == 0); + assertFalse(ccdPtDelVertex(&pt, v[0]) == 0); + assertFalse(ccdPtDelVertex(&pt, v[2]) == 0); + assertFalse(ccdPtDelVertex(&pt, v[3]) == 0); + + res = ccdPtDelFace(&pt, f[3]); + assertTrue(ccdPtDelEdge(&pt, e[2]) == 0); + assertTrue(ccdPtDelEdge(&pt, e[3]) == 0); + assertTrue(ccdPtDelEdge(&pt, e[5]) == 0); + + assertTrue(ccdPtDelVertex(&pt, v[0]) == 0); + assertTrue(ccdPtDelVertex(&pt, v[2]) == 0); + assertTrue(ccdPtDelVertex(&pt, v[3]) == 0); + + + v[0] = ccdPtAddVertexCoords(&pt, -1., -1., 0.); + v[1] = ccdPtAddVertexCoords(&pt, 1., 0., 0.); + v[2] = ccdPtAddVertexCoords(&pt, 0., 0., 1.); + v[3] = ccdPtAddVertexCoords(&pt, 0., 1., 0.); + + e[0] = ccdPtAddEdge(&pt, v[0], v[1]); + e[1] = ccdPtAddEdge(&pt, v[1], v[2]); + e[2] = ccdPtAddEdge(&pt, v[2], v[0]); + e[3] = ccdPtAddEdge(&pt, v[3], v[0]); + e[4] = ccdPtAddEdge(&pt, v[3], v[1]); + e[5] = ccdPtAddEdge(&pt, v[3], v[2]); + + f[0] = ccdPtAddFace(&pt, e[0], e[1], e[2]); + f[1] = ccdPtAddFace(&pt, e[3], e[4], e[0]); + f[2] = ccdPtAddFace(&pt, e[4], e[5], e[1]); + f[3] = ccdPtAddFace(&pt, e[5], e[3], e[2]); + + ccdPtDestroy(&pt); +} + +TEST(ptNearest) +{ + ccd_pt_t pt; + ccd_pt_vertex_t *v[4]; + ccd_pt_edge_t *e[6]; + ccd_pt_face_t *f[4]; + ccd_pt_el_t *nearest; + + DBG2("------"); + + ccdPtInit(&pt); + + v[0] = ccdPtAddVertexCoords(&pt, -1., -1., 0.); + v[1] = ccdPtAddVertexCoords(&pt, 1., 0., 0.); + v[2] = ccdPtAddVertexCoords(&pt, 0., 0., 1.); + v[3] = ccdPtAddVertexCoords(&pt, 0., 1., 0.); + + e[0] = ccdPtAddEdge(&pt, v[0], v[1]); + e[1] = ccdPtAddEdge(&pt, v[1], v[2]); + e[2] = ccdPtAddEdge(&pt, v[2], v[0]); + e[3] = ccdPtAddEdge(&pt, v[3], v[0]); + e[4] = ccdPtAddEdge(&pt, v[3], v[1]); + e[5] = ccdPtAddEdge(&pt, v[3], v[2]); + + f[0] = ccdPtAddFace(&pt, e[0], e[1], e[2]); + f[1] = ccdPtAddFace(&pt, e[3], e[4], e[0]); + f[2] = ccdPtAddFace(&pt, e[4], e[5], e[1]); + f[3] = ccdPtAddFace(&pt, e[5], e[3], e[2]); + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_FACE); + assertEquals(nearest, (ccd_pt_el_t *)f[1]); + assertTrue(ccdPtDelFace(&pt, f[1]) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_FACE); + assertTrue(nearest == (ccd_pt_el_t *)f[0] + || nearest == (ccd_pt_el_t *)f[3]); + assertTrue(ccdPtDelFace(&pt, (ccd_pt_face_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_FACE); + assertTrue(nearest == (ccd_pt_el_t *)f[0] + || nearest == (ccd_pt_el_t *)f[3]); + assertTrue(ccdPtDelFace(&pt, (ccd_pt_face_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_EDGE); + assertTrue(nearest == (ccd_pt_el_t *)e[0] + || nearest == (ccd_pt_el_t *)e[3]); + assertTrue(ccdPtDelEdge(&pt, (ccd_pt_edge_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_EDGE); + assertTrue(nearest == (ccd_pt_el_t *)e[0] + || nearest == (ccd_pt_el_t *)e[3]); + assertTrue(ccdPtDelEdge(&pt, (ccd_pt_edge_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_FACE); + assertEquals(nearest, (ccd_pt_el_t *)f[2]); + assertTrue(ccdPtDelFace(&pt, f[2]) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_EDGE); + assertTrue(nearest == (ccd_pt_el_t *)e[1] + || nearest == (ccd_pt_el_t *)e[4] + || nearest == (ccd_pt_el_t *)e[5]); + assertTrue(ccdPtDelEdge(&pt, (ccd_pt_edge_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_EDGE); + assertTrue(nearest == (ccd_pt_el_t *)e[1] + || nearest == (ccd_pt_el_t *)e[4] + || nearest == (ccd_pt_el_t *)e[5]); + assertTrue(ccdPtDelEdge(&pt, (ccd_pt_edge_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_EDGE); + assertTrue(nearest == (ccd_pt_el_t *)e[1] + || nearest == (ccd_pt_el_t *)e[4] + || nearest == (ccd_pt_el_t *)e[5]); + assertTrue(ccdPtDelEdge(&pt, (ccd_pt_edge_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_EDGE); + assertTrue(nearest == (ccd_pt_el_t *)e[2]); + assertTrue(ccdPtDelEdge(&pt, (ccd_pt_edge_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_VERTEX); + assertTrue(nearest == (ccd_pt_el_t *)v[1] + || nearest == (ccd_pt_el_t *)v[2] + || nearest == (ccd_pt_el_t *)v[3]); + assertTrue(ccdPtDelVertex(&pt, (ccd_pt_vertex_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_VERTEX); + assertTrue(nearest == (ccd_pt_el_t *)v[1] + || nearest == (ccd_pt_el_t *)v[2] + || nearest == (ccd_pt_el_t *)v[3]); + assertTrue(ccdPtDelVertex(&pt, (ccd_pt_vertex_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_VERTEX); + assertTrue(nearest == (ccd_pt_el_t *)v[1] + || nearest == (ccd_pt_el_t *)v[2] + || nearest == (ccd_pt_el_t *)v[3]); + assertTrue(ccdPtDelVertex(&pt, (ccd_pt_vertex_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + //DBG("nearest->type: %d", nearest->type); + //DBG(" ->dist: %lf", nearest->dist); + //DBG_VEC3(&nearest->witness, " ->witness: "); + assertEquals(nearest->type, CCD_PT_VERTEX); + assertTrue(nearest == (ccd_pt_el_t *)v[0]); + assertTrue(ccdPtDelVertex(&pt, (ccd_pt_vertex_t *)nearest) == 0); + + + nearest = ccdPtNearest(&pt); + assertTrue(nearest == NULL); + + ccdPtDestroy(&pt); +} diff -Nru ode-0.11.1/libccd/src/testsuites/polytope.h ode-0.14/libccd/src/testsuites/polytope.h --- ode-0.11.1/libccd/src/testsuites/polytope.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/polytope.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,24 @@ +#ifndef TEST_POLYTOPE_H +#define TEST_POLYTOPE_H + +#include + +TEST(ptSetUp); +TEST(ptTearDown); + +TEST(ptCreate1); +TEST(ptCreate2); +TEST(ptNearest); + +TEST_SUITE(TSPt) { + TEST_ADD(ptSetUp), + + TEST_ADD(ptCreate1), + TEST_ADD(ptCreate2), + TEST_ADD(ptNearest), + + TEST_ADD(ptTearDown), + TEST_SUITE_CLOSURE +}; + +#endif diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSBoxBox.err ode-0.14/libccd/src/testsuites/regressions/TSBoxBox.err --- ode-0.11.1/libccd/src/testsuites/regressions/TSBoxBox.err 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSBoxBox.err 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,12 @@ + + + +---- boxboxSeparate ---- + + + + + +---- boxboxPenetration ---- + + diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSBoxBox.out ode-0.14/libccd/src/testsuites/regressions/TSBoxBox.out --- ode-0.11.1/libccd/src/testsuites/regressions/TSBoxBox.out 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSBoxBox.out 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,44 @@ +# box1.pos: [-0.500000 0.000000 0.000000] +# box1->quat: [0.000000 0.000000 0.382683 0.923880] +# box2->pos: [0.000000 0.000000 0.000000] +# box2->quat: [0.000000 0.000000 0.000000 1.000000] +# sep: [0.707107 0.000000 0.000000] +# +# box1.pos: [-0.500000 0.100000 0.400000] +# box1->quat: [0.000000 0.270598 0.270598 0.923880] +# box2->pos: [0.000000 0.000000 0.000000] +# box2->quat: [0.000000 0.000000 0.000000 1.000000] +# sep: [0.633939 0.000000 -0.371353] +# +# Pen 1: depth: 0.650000 +# Pen 1: dir: [1.000000 0.000000 0.000000] +# Pen 1: pos: [0.096875 0.000000 0.000000] +# +# Pen 2: depth: 0.250000 +# Pen 2: dir: [-0.000000 0.000000 -1.000000] +# Pen 2: pos: [-0.058333 0.250000 0.583333] +# +# Pen 3: depth: 0.900000 +# Pen 3: dir: [0.000000 0.000000 -1.000000] +# Pen 3: pos: [0.111506 0.000000 0.050000] +# +# Pen 4: depth: 0.607107 +# Pen 4: dir: [1.000000 0.000000 0.000000] +# Pen 4: pos: [-0.153585 0.000000 0.000000] +# +# Pen 5: depth: 0.429289 +# Pen 5: dir: [0.707107 -0.707107 0.000000] +# Pen 5: pos: [-0.167157 0.379289 0.000000] +# +# Pen 6: depth: 0.648412 +# Pen 6: dir: [0.862856 0.000000 -0.505449] +# Pen 6: pos: [-0.148223 0.055362 0.319638] +# +# Pen 7: depth: 0.622622 +# Pen 7: dir: [1.000000 0.000000 -0.000000] +# Pen 7: pos: [-0.095997 0.063593 0.067678] +# +# Pen 8: depth: 0.053553 +# Pen 8: dir: [1.000000 0.000000 0.000000] +# Pen 8: pos: [-0.523223 -0.073223 0.020711] +# diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSBoxCyl.out ode-0.14/libccd/src/testsuites/regressions/TSBoxCyl.out --- ode-0.11.1/libccd/src/testsuites/regressions/TSBoxCyl.out 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSBoxCyl.out 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +# Pen 1: depth: 0.549996 +# Pen 1: dir: [0.999992 -0.003902 0.000000] +# Pen 1: pos: [0.020284 0.000000 0.000000] +# +# Pen 2: depth: 0.050000 +# Pen 2: dir: [0.999992 -0.003902 0.000000] +# Pen 2: pos: [0.253480 0.000000 0.025000] +# +# Pen 3: depth: 0.030994 +# Pen 3: dir: [0.950248 0.311493 0.000000] +# Pen 3: pos: [0.246546 0.420744 0.000000] +# +# Pen 4: depth: 0.033436 +# Pen 4: dir: [0.976101 0.217308 0.001900] +# Pen 4: pos: [0.243648 0.480401 0.450000] +# +# Pen 5: depth: 0.142160 +# Pen 5: dir: [0.968442 0.249235 0.001146] +# Pen 5: pos: [0.190887 0.421462 0.605496] +# +# Pen 6: depth: 0.179282 +# Pen 6: dir: [0.999995 0.001057 0.002913] +# Pen 6: pos: [0.176026 0.036944 0.488189] +# +# Pen 7: depth: 0.750000 +# Pen 7: dir: [-0.853795 -0.143509 -0.500438] +# Pen 7: pos: [0.572744 0.014828 0.562324] +# +# Pen 8: depth: 0.142666 +# Pen 8: dir: [-0.475515 -0.841074 0.257839] +# Pen 8: pos: [0.824886 0.230213 0.463136] +# diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSCylCyl.err ode-0.14/libccd/src/testsuites/regressions/TSCylCyl.err --- ode-0.11.1/libccd/src/testsuites/regressions/TSCylCyl.err 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSCylCyl.err 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ + + + +---- cylcylPenetration ---- + + diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSCylCyl.out ode-0.14/libccd/src/testsuites/regressions/TSCylCyl.out --- ode-0.11.1/libccd/src/testsuites/regressions/TSCylCyl.out 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSCylCyl.out 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,24 @@ +# Pen 1: depth: 0.750000 +# Pen 1: dir: [0.000000 0.000000 1.000000] +# Pen 1: pos: [0.004079 -0.012238 0.009615] +# +# Pen 2: depth: 0.531931 +# Pen 2: dir: [-0.926428 -0.376463 -0.002666] +# Pen 2: pos: [0.218566 0.072232 0.025000] +# +# Pen 3: depth: 0.645740 +# Pen 3: dir: [-0.500000 -0.146447 -0.853553] +# Pen 3: pos: [0.177594 0.070484 0.186987] +# +# Pen 4: depth: 0.104445 +# Pen 4: dir: [-0.482095 0.866317 0.130685] +# Pen 4: pos: [0.123724 0.348390 0.269312] +# +# Pen 5: depth: 0.093082 +# Pen 5: dir: [0.034600 -0.999228 -0.018627] +# Pen 5: pos: [0.311257 -0.203923 -0.064270] +# +# Pen 6: depth: 0.198749 +# Pen 6: dir: [0.411370 -0.911372 0.013223] +# Pen 6: pos: [0.405836 -0.130066 0.121441] +# diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSMPRBoxBox.err ode-0.14/libccd/src/testsuites/regressions/TSMPRBoxBox.err --- ode-0.11.1/libccd/src/testsuites/regressions/TSMPRBoxBox.err 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSMPRBoxBox.err 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ + + + +---- boxboxPenetration ---- + + diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSMPRBoxBox.out ode-0.14/libccd/src/testsuites/regressions/TSMPRBoxBox.out --- ode-0.11.1/libccd/src/testsuites/regressions/TSMPRBoxBox.out 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSMPRBoxBox.out 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,40 @@ +# Pen 1: depth: 0.650000 +# Pen 1: dir: [1.000000 0.000000 0.000000] +# Pen 1: pos: [0.175000 0.000000 0.000000] +# +# Pen 2: depth: 0.250000 +# Pen 2: dir: [-0.000000 0.000000 -1.000000] +# Pen 2: pos: [-0.033333 0.250000 0.600000] +# +# Pen 3: depth: 0.900000 +# Pen 3: dir: [0.000000 0.000000 -1.000000] +# Pen 3: pos: [0.100000 0.000000 0.050000] +# +# Pen 4: depth: 0.607107 +# Pen 4: dir: [1.000000 0.000000 0.000000] +# Pen 4: pos: [-0.096447 0.000000 0.000000] +# +# Pen 5: depth: 0.429289 +# Pen 5: dir: [0.707107 -0.707107 0.000000] +# Pen 5: pos: [-0.222183 0.322183 0.000000] +# +# Pen 6: depth: 0.648412 +# Pen 6: dir: [0.862856 -0.000000 -0.505449] +# Pen 6: pos: [-0.163060 0.012676 0.263060] +# +# Pen 7: depth: 0.622928 +# Pen 7: dir: [0.999509 0.028016 -0.014008] +# Pen 7: pos: [-0.145374 0.170833 0.176732] +# +# Pen 8: depth: 0.053553 +# Pen 8: dir: [1.000000 0.000000 0.000000] +# Pen 8: pos: [-0.480217 -0.140652 0.000000] +# +# Pen 9: depth: 0.020000 +# Pen 9: dir: [0.000000 1.000000 0.000000] +# Pen 9: pos: [0.000000 0.490000 0.000000] +# +# Pen 10: depth: 0.012000 +# Pen 10: dir: [-0.000000 1.000000 0.000000] +# Pen 10: pos: [0.200000 0.492000 0.000000] +# diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSMPRBoxCyl.out ode-0.14/libccd/src/testsuites/regressions/TSMPRBoxCyl.out --- ode-0.11.1/libccd/src/testsuites/regressions/TSMPRBoxCyl.out 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSMPRBoxCyl.out 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,32 @@ +# Pen 1: depth: 0.550000 +# Pen 1: dir: [1.000000 0.000000 0.000000] +# Pen 1: pos: [-0.025000 0.000000 0.000000] +# +# Pen 2: depth: 0.050000 +# Pen 2: dir: [1.000000 0.000000 0.000000] +# Pen 2: pos: [0.225000 0.000000 0.000000] +# +# Pen 3: depth: 0.038532 +# Pen 3: dir: [0.788956 0.614450 -0.000000] +# Pen 3: pos: [0.238587 0.477175 0.000000] +# +# Pen 4: depth: 0.038654 +# Pen 4: dir: [0.779134 0.626832 -0.005696] +# Pen 4: pos: [0.238603 0.477206 0.340909] +# +# Pen 5: depth: 0.166653 +# Pen 5: dir: [0.734126 0.679013 -0.000000] +# Pen 5: pos: [0.208320 0.416640 0.595113] +# +# Pen 6: depth: 0.180673 +# Pen 6: dir: [1.000000 0.000003 -0.000000] +# Pen 6: pos: [0.192142 0.009404 0.479162] +# +# Pen 7: depth: 0.771410 +# Pen 7: dir: [-0.922598 -0.242256 -0.300208] +# Pen 7: pos: [0.600000 0.000000 0.500000] +# +# Pen 8: depth: 0.142813 +# Pen 8: dir: [-0.476782 -0.840534 0.257259] +# Pen 8: pos: [0.776128 0.285646 0.436629] +# diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSMPRCylCyl.err ode-0.14/libccd/src/testsuites/regressions/TSMPRCylCyl.err --- ode-0.11.1/libccd/src/testsuites/regressions/TSMPRCylCyl.err 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSMPRCylCyl.err 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,6 @@ + + + +---- mprCylcylPenetration ---- + + diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSMPRCylCyl.out ode-0.14/libccd/src/testsuites/regressions/TSMPRCylCyl.out --- ode-0.11.1/libccd/src/testsuites/regressions/TSMPRCylCyl.out 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSMPRCylCyl.out 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,24 @@ +# Pen 1: depth: 0.450000 +# Pen 1: dir: [0.000000 0.000000 1.000000] +# Pen 1: pos: [0.000000 0.000000 0.025000] +# +# Pen 2: depth: 0.533732 +# Pen 2: dir: [-0.952492 -0.304562 0.000000] +# Pen 2: pos: [0.176471 0.058824 0.166667] +# +# Pen 3: depth: 0.720933 +# Pen 3: dir: [-0.947406 -0.320033 0.000085] +# Pen 3: pos: [0.198747 0.066309 0.050800] +# +# Pen 4: depth: 0.106076 +# Pen 4: dir: [-0.524820 0.835278 0.163936] +# Pen 4: pos: [0.138692 0.362418 0.320024] +# +# Pen 5: depth: 0.103863 +# Pen 5: dir: [0.291494 -0.956567 -0.003314] +# Pen 5: pos: [0.337721 -0.209314 -0.094587] +# +# Pen 6: depth: 0.202625 +# Pen 6: dir: [0.347225 -0.937782 -0.000000] +# Pen 6: pos: [0.399554 -0.164780 0.199941] +# diff -Nru ode-0.11.1/libccd/src/testsuites/regressions/TSPt.err ode-0.14/libccd/src/testsuites/regressions/TSPt.err --- ode-0.11.1/libccd/src/testsuites/regressions/TSPt.err 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/regressions/TSPt.err 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,39 @@ +ptCreate1 :: ------ +ptCreate1 :: e[0]->dist: 0.200000 +ptCreate1 :: ->witness: [0.200000 -0.400000 0.000000] +ptCreate1 :: e[1]->dist: 0.500000 +ptCreate1 :: ->witness: [0.500000 0.000000 0.500000] +ptCreate1 :: e[2]->dist: 0.666667 +ptCreate1 :: ->witness: [-0.333333 -0.333333 0.666667] +ptCreate1 :: f->dist: 0.166667 +ptCreate1 :: ->witness: [0.166667 -0.333333 0.166667] +ptCreate2 :: ------ +ptCreate2 :: v[0]->dist: 2.000000 +ptCreate2 :: ->witness: [-1.000000 -1.000000 0.000000] +ptCreate2 :: v[1]->dist: 1.000000 +ptCreate2 :: ->witness: [1.000000 0.000000 0.000000] +ptCreate2 :: v[2]->dist: 1.000000 +ptCreate2 :: ->witness: [0.000000 0.000000 1.000000] +ptCreate2 :: v[3]->dist: 1.000000 +ptCreate2 :: ->witness: [0.000000 1.000000 0.000000] +ptCreate2 :: e[0]->dist: 0.200000 +ptCreate2 :: ->witness: [0.200000 -0.400000 0.000000] +ptCreate2 :: e[1]->dist: 0.500000 +ptCreate2 :: ->witness: [0.500000 0.000000 0.500000] +ptCreate2 :: e[2]->dist: 0.666667 +ptCreate2 :: ->witness: [-0.333333 -0.333333 0.666667] +ptCreate2 :: e[3]->dist: 0.200000 +ptCreate2 :: ->witness: [-0.400000 0.200000 0.000000] +ptCreate2 :: e[4]->dist: 0.500000 +ptCreate2 :: ->witness: [0.500000 0.500000 0.000000] +ptCreate2 :: e[5]->dist: 0.500000 +ptCreate2 :: ->witness: [0.000000 0.500000 0.500000] +ptCreate2 :: f[0]->dist: 0.166667 +ptCreate2 :: ->witness: [0.166667 -0.333333 0.166667] +ptCreate2 :: f[1]->dist: 0.000000 +ptCreate2 :: ->witness: [0.000000 0.000000 0.000000] +ptCreate2 :: f[2]->dist: 0.333333 +ptCreate2 :: ->witness: [0.333333 0.333333 0.333333] +ptCreate2 :: f[3]->dist: 0.166667 +ptCreate2 :: ->witness: [-0.333333 0.166667 0.166667] +ptNearest :: ------ diff -Nru ode-0.11.1/libccd/src/testsuites/spheresphere.c ode-0.14/libccd/src/testsuites/spheresphere.c --- ode-0.11.1/libccd/src/testsuites/spheresphere.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/spheresphere.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,99 @@ +#include +#include +#include "support.h" +#include + +TEST(spheresphereSetUp) +{ +} + +TEST(spheresphereTearDown) +{ +} + +TEST(spheresphereAlignedX) +{ + ccd_t ccd; + CCD_SPHERE(s1); + CCD_SPHERE(s2); + size_t i; + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + s1.radius = 0.35; + s2.radius = .5; + + ccdVec3Set(&s1.pos, -5., 0., 0.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&s1, &s2, &ccd); + + if (i < 42 || i > 58){ + assertFalse(res); + }else{ + assertTrue(res); + } + + s1.pos.v[0] += 0.1; + } +} + +TEST(spheresphereAlignedY) +{ + ccd_t ccd; + CCD_SPHERE(s1); + CCD_SPHERE(s2); + size_t i; + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + s1.radius = 0.35; + s2.radius = .5; + + ccdVec3Set(&s1.pos, 0., -5., 0.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&s1, &s2, &ccd); + + if (i < 42 || i > 58){ + assertFalse(res); + }else{ + assertTrue(res); + } + + s1.pos.v[1] += 0.1; + } +} + +TEST(spheresphereAlignedZ) +{ + ccd_t ccd; + CCD_SPHERE(s1); + CCD_SPHERE(s2); + size_t i; + int res; + + CCD_INIT(&ccd); + ccd.support1 = ccdSupport; + ccd.support2 = ccdSupport; + + s1.radius = 0.35; + s2.radius = .5; + + ccdVec3Set(&s1.pos, 0., 0., -5.); + for (i = 0; i < 100; i++){ + res = ccdGJKIntersect(&s1, &s2, &ccd); + + if (i < 42 || i > 58){ + assertFalse(res); + }else{ + assertTrue(res); + } + + s1.pos.v[2] += 0.1; + } +} diff -Nru ode-0.11.1/libccd/src/testsuites/spheresphere.h ode-0.14/libccd/src/testsuites/spheresphere.h --- ode-0.11.1/libccd/src/testsuites/spheresphere.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/spheresphere.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,24 @@ +#ifndef SPHERE_SPHERE +#define SPHERE_SPHERE + +#include + +TEST(spheresphereSetUp); +TEST(spheresphereTearDown); + +TEST(spheresphereAlignedX); +TEST(spheresphereAlignedY); +TEST(spheresphereAlignedZ); + +TEST_SUITE(TSSphereSphere) { + TEST_ADD(spheresphereSetUp), + + TEST_ADD(spheresphereAlignedX), + TEST_ADD(spheresphereAlignedY), + TEST_ADD(spheresphereAlignedZ), + + TEST_ADD(spheresphereTearDown), + TEST_SUITE_CLOSURE +}; + +#endif diff -Nru ode-0.11.1/libccd/src/testsuites/support.c ode-0.14/libccd/src/testsuites/support.c --- ode-0.11.1/libccd/src/testsuites/support.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/support.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,85 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#include +#include +#include +#include "support.h" + +void ccdSupport(const void *_obj, const ccd_vec3_t *_dir, + ccd_vec3_t *v) +{ + // Support function is made according to Gino van den Bergen's paper + // A Fast and Robust CCD Implementation for Collision Detection of + // Convex Objects + + ccd_obj_t *obj = (ccd_obj_t *)_obj; + ccd_vec3_t dir; + ccd_quat_t qinv; + + ccdVec3Copy(&dir, _dir); + ccdQuatInvert2(&qinv, &obj->quat); + + ccdQuatRotVec(&dir, &qinv); + + if (obj->type == CCD_OBJ_BOX){ + ccd_box_t *box = (ccd_box_t *)obj; + ccdVec3Set(v, ccdSign(ccdVec3X(&dir)) * box->x * CCD_REAL(0.5), + ccdSign(ccdVec3Y(&dir)) * box->y * CCD_REAL(0.5), + ccdSign(ccdVec3Z(&dir)) * box->z * CCD_REAL(0.5)); + }else if (obj->type == CCD_OBJ_SPHERE){ + ccd_sphere_t *sphere = (ccd_sphere_t *)obj; + ccd_real_t len; + + len = ccdVec3Len2(&dir); + if (len - CCD_EPS > CCD_ZERO){ + ccdVec3Copy(v, &dir); + ccdVec3Scale(v, sphere->radius / CCD_SQRT(len)); + }else{ + ccdVec3Set(v, CCD_ZERO, CCD_ZERO, CCD_ZERO); + } + }else if (obj->type == CCD_OBJ_CYL){ + ccd_cyl_t *cyl = (ccd_cyl_t *)obj; + ccd_real_t zdist, rad; + + zdist = dir.v[0] * dir.v[0] + dir.v[1] * dir.v[1]; + zdist = CCD_SQRT(zdist); + if (ccdIsZero(zdist)){ + ccdVec3Set(v, CCD_ZERO, CCD_ZERO, + ccdSign(ccdVec3Z(&dir)) * cyl->height * CCD_REAL(0.5)); + }else{ + rad = cyl->radius / zdist; + + ccdVec3Set(v, rad * ccdVec3X(&dir), + rad * ccdVec3Y(&dir), + ccdSign(ccdVec3Z(&dir)) * cyl->height * CCD_REAL(0.5)); + } + } + + // transform support vertex + ccdQuatRotVec(v, &obj->quat); + ccdVec3Add(v, &obj->pos); +} + +void ccdObjCenter(const void *_obj, ccd_vec3_t *center) +{ + ccd_obj_t *obj = (ccd_obj_t *)_obj; + + ccdVec3Set(center, CCD_ZERO, CCD_ZERO, CCD_ZERO); + // rotation is not needed + ccdVec3Add(center, &obj->pos); +} diff -Nru ode-0.11.1/libccd/src/testsuites/support.h ode-0.14/libccd/src/testsuites/support.h --- ode-0.11.1/libccd/src/testsuites/support.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/support.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,102 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +/*** + * Some support() functions for some convex shapes. + */ + +#ifndef __CCD_SUPPORT_H__ +#define __CCD_SUPPORT_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#define CCD_OBJ_BOX 1 +#define CCD_OBJ_SPHERE 2 +#define CCD_OBJ_CYL 3 + +#define __CCD_OBJ__ \ + int type; \ + ccd_vec3_t pos; \ + ccd_quat_t quat; + +struct _ccd_obj_t { + __CCD_OBJ__ +}; +typedef struct _ccd_obj_t ccd_obj_t; + +struct _ccd_box_t { + __CCD_OBJ__ + ccd_real_t x, y, z; //!< Lengths of box's edges +}; +typedef struct _ccd_box_t ccd_box_t; + +struct _ccd_sphere_t { + __CCD_OBJ__ + ccd_real_t radius; +}; +typedef struct _ccd_sphere_t ccd_sphere_t; + +struct _ccd_cyl_t { + __CCD_OBJ__ + ccd_real_t radius; + ccd_real_t height; +}; +typedef struct _ccd_cyl_t ccd_cyl_t; + + +#define CCD_BOX(name) \ + ccd_box_t name = { .type = CCD_OBJ_BOX, \ + .pos = { .v = { 0., 0., 0. } }, \ + .quat = { .q = { 0., 0., 0., 1. } }, \ + .x = 0., \ + .y = 0., \ + .z = 0. } + +#define CCD_SPHERE(name) \ + ccd_sphere_t name = { .type = CCD_OBJ_SPHERE, \ + .pos = { .v = { 0., 0., 0. } }, \ + .quat = { .q = { 0., 0., 0., 1. } }, \ + .radius = 0. } + +#define CCD_CYL(name) \ + ccd_cyl_t name = { .type = CCD_OBJ_CYL, \ + .pos = { .v = { 0., 0., 0. } }, \ + .quat = { .q = { 0., 0., 0., 1. } }, \ + .radius = 0., \ + .height = 0. } + +/** + * Returns supporting vertex via v. + * Supporting vertex is fathest vertex from object in direction dir. + */ +void ccdSupport(const void *obj, const ccd_vec3_t *dir, + ccd_vec3_t *v); + +/** + * Returns center of object. + */ +void ccdObjCenter(const void *obj, ccd_vec3_t *center); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* __CCD_SUPPORT_H__ */ diff -Nru ode-0.11.1/libccd/src/testsuites/vec3.c ode-0.14/libccd/src/testsuites/vec3.c --- ode-0.11.1/libccd/src/testsuites/vec3.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/vec3.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,273 @@ +#include +#include +#include + +TEST(vec3SetUp) +{ +} + +TEST(vec3TearDown) +{ +} + + +TEST(vec3PointSegmentDist) +{ + ccd_vec3_t P, a, b, w, ew; + ccd_real_t dist; + + ccdVec3Set(&a, 0., 0., 0.); + ccdVec3Set(&b, 1., 0., 0.); + + // extereme w == a + ccdVec3Set(&P, -1., 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 1.)); + assertTrue(ccdVec3Eq(&w, &a)); + + ccdVec3Set(&P, -0.5, 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 0.5 * 0.5)); + assertTrue(ccdVec3Eq(&w, &a)); + + ccdVec3Set(&P, -0.1, 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, .1 * .1)); + assertTrue(ccdVec3Eq(&w, &a)); + + ccdVec3Set(&P, 0., 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &a)); + + ccdVec3Set(&P, -1., 1., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 2.)); + assertTrue(ccdVec3Eq(&w, &a)); + + ccdVec3Set(&P, -0.5, 0.5, 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 0.5)); + assertTrue(ccdVec3Eq(&w, &a)); + + ccdVec3Set(&P, -0.1, -1., 2.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 5.01)); + assertTrue(ccdVec3Eq(&w, &a)); + + + // extereme w == b + ccdVec3Set(&P, 2., 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 1.)); + assertTrue(ccdVec3Eq(&w, &b)); + + ccdVec3Set(&P, 1.5, 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 0.5 * 0.5)); + assertTrue(ccdVec3Eq(&w, &b)); + + ccdVec3Set(&P, 1.1, 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, .1 * .1)); + assertTrue(ccdVec3Eq(&w, &b)); + + ccdVec3Set(&P, 1., 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &b)); + + ccdVec3Set(&P, 2., 1., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 2.)); + assertTrue(ccdVec3Eq(&w, &b)); + + ccdVec3Set(&P, 1.5, 0.5, 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 0.5)); + assertTrue(ccdVec3Eq(&w, &b)); + + ccdVec3Set(&P, 1.1, -1., 2.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 5.01)); + assertTrue(ccdVec3Eq(&w, &b)); + + // inside segment + ccdVec3Set(&P, .5, 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &P)); + + ccdVec3Set(&P, .9, 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &P)); + + ccdVec3Set(&P, .5, 1., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 1.)); + ccdVec3Set(&ew, 0.5, 0., 0.); + assertTrue(ccdVec3Eq(&w, &ew)); + + ccdVec3Set(&P, .5, 1., 1.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 2.)); + ccdVec3Set(&ew, 0.5, 0., 0.); + assertTrue(ccdVec3Eq(&w, &ew)); + + + + ccdVec3Set(&a, -.5, 2., 1.); + ccdVec3Set(&b, 1., 1.5, 0.5); + + // extereme w == a + ccdVec3Set(&P, -10., 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 9.5 * 9.5 + 2. * 2. + 1.)); + assertTrue(ccdVec3Eq(&w, &a)); + + ccdVec3Set(&P, -10., 9.2, 3.4); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 9.5 * 9.5 + 7.2 * 7.2 + 2.4 * 2.4)); + assertTrue(ccdVec3Eq(&w, &a)); + + // extereme w == b + ccdVec3Set(&P, 10., 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 9. * 9. + 1.5 * 1.5 + 0.5 * 0.5)); + assertTrue(ccdVec3Eq(&w, &b)); + + ccdVec3Set(&P, 10., 9.2, 3.4); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 9. * 9. + 7.7 * 7.7 + 2.9 * 2.9)); + assertTrue(ccdVec3Eq(&w, &b)); + + // inside ab + ccdVec3Set(&a, -.1, 1., 1.); + ccdVec3Set(&b, 1., 1., 1.); + ccdVec3Set(&P, 0., 0., 0.); + dist = ccdVec3PointSegmentDist2(&P, &a, &b, &w); + assertTrue(ccdEq(dist, 2.)); + ccdVec3Set(&ew, 0., 1., 1.); + assertTrue(ccdVec3Eq(&w, &ew)); +} + + +TEST(vec3PointTriDist) +{ + ccd_vec3_t P, a, b, c, w, P0; + ccd_real_t dist; + + ccdVec3Set(&a, -1., 0., 0.); + ccdVec3Set(&b, 0., 1., 1.); + ccdVec3Set(&c, -1., 0., 1.); + + ccdVec3Set(&P, -1., 0., 0.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &a)); + + ccdVec3Set(&P, 0., 1., 1.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &b)); + + ccdVec3Set(&P, -1., 0., 1.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &c)); + + ccdVec3Set(&P, 0., 0., 0.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, NULL); + assertTrue(ccdEq(dist, 2./3.)); + + + // region 4 + ccdVec3Set(&P, -2., 0., 0.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, ccdVec3Dist2(&P, &a))); + assertTrue(ccdVec3Eq(&w, &a)); + ccdVec3Set(&P, -2., 0.2, -1.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, ccdVec3Dist2(&P, &a))); + assertTrue(ccdVec3Eq(&w, &a)); + + // region 2 + ccdVec3Set(&P, -1.3, 0., 1.2); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, ccdVec3Dist2(&P, &c))); + assertTrue(ccdVec3Eq(&w, &c)); + ccdVec3Set(&P, -1.2, 0.2, 1.1); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, ccdVec3Dist2(&P, &c))); + assertTrue(ccdVec3Eq(&w, &c)); + + // region 6 + ccdVec3Set(&P, 0.3, 1., 1.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, ccdVec3Dist2(&P, &b))); + assertTrue(ccdVec3Eq(&w, &b)); + ccdVec3Set(&P, .1, 1., 1.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, ccdVec3Dist2(&P, &b))); + assertTrue(ccdVec3Eq(&w, &b)); + + // region 1 + ccdVec3Set(&P, 0., 1., 2.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 1.)); + assertTrue(ccdVec3Eq(&w, &b)); + ccdVec3Set(&P, -1., 0., 2.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 1.)); + assertTrue(ccdVec3Eq(&w, &c)); + ccdVec3Set(&P, -0.5, 0.5, 2.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 1.)); + ccdVec3Set(&P0, -0.5, 0.5, 1.); + assertTrue(ccdVec3Eq(&w, &P0)); + + // region 3 + ccdVec3Set(&P, -2., -1., 0.7); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 2.)); + ccdVec3Set(&P0, -1., 0., 0.7); + assertTrue(ccdVec3Eq(&w, &P0)); + + // region 5 + ccdVec3Set(&P, 0., 0., 0.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 2./3.)); + ccdVec3Set(&P0, -2./3., 1./3., 1./3.); + assertTrue(ccdVec3Eq(&w, &P0)); + + // region 0 + ccdVec3Set(&P, -0.5, 0.5, 0.5); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &P)); + ccdVec3Set(&P, -0.5, 0.5, 0.7); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &P)); + ccdVec3Set(&P, -0.5, 0.5, 0.9); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 0.)); + assertTrue(ccdVec3Eq(&w, &P)); + + ccdVec3Set(&P, 0., 0., 0.5); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 0.5)); + ccdVec3Set(&P0, -.5, .5, .5); + assertTrue(ccdVec3Eq(&w, &P0)); + + ccdVec3Set(&a, -1., 0., 0.); + ccdVec3Set(&b, 0., 1., -1.); + ccdVec3Set(&c, 0., 1., 1.); + ccdVec3Set(&P, 0., 0., 0.); + dist = ccdVec3PointTriDist2(&P, &a, &b, &c, &w); + assertTrue(ccdEq(dist, 0.5)); + ccdVec3Set(&P0, -.5, .5, 0.); + assertTrue(ccdVec3Eq(&w, &P0)); + //fprintf(stderr, "dist: %lf\n", dist); +} diff -Nru ode-0.11.1/libccd/src/testsuites/vec3.h ode-0.14/libccd/src/testsuites/vec3.h --- ode-0.11.1/libccd/src/testsuites/vec3.h 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/testsuites/vec3.h 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,20 @@ +#ifndef TEST_VEC3_H +#define TEST_VEC3_H + +#include + +TEST(vec3SetUp); +TEST(vec3TearDown); +TEST(vec3PointSegmentDist); +TEST(vec3PointTriDist); + +TEST_SUITE(TSVec3) { + TEST_ADD(vec3SetUp), + + TEST_ADD(vec3PointSegmentDist), + TEST_ADD(vec3PointTriDist), + + TEST_ADD(vec3TearDown), + TEST_SUITE_CLOSURE +}; +#endif diff -Nru ode-0.11.1/libccd/src/vec3.c ode-0.14/libccd/src/vec3.c --- ode-0.11.1/libccd/src/vec3.c 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/libccd/src/vec3.c 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,215 @@ +/*** + * libccd + * --------------------------------- + * Copyright (c)2010 Daniel Fiser + * + * + * This file is part of libccd. + * + * Distributed under the OSI-approved BSD License (the "License"); + * see accompanying file BDS-LICENSE for details or see + * . + * + * This software is distributed WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the License for more information. + */ + +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +static CCD_VEC3(__ccd_vec3_origin, CCD_ZERO, CCD_ZERO, CCD_ZERO); +ccd_vec3_t *ccd_vec3_origin = &__ccd_vec3_origin; + +static ccd_vec3_t points_on_sphere[] = { + CCD_VEC3_STATIC(CCD_REAL( 0.000000), CCD_REAL(-0.000000), CCD_REAL(-1.000000)), + CCD_VEC3_STATIC(CCD_REAL( 0.723608), CCD_REAL(-0.525725), CCD_REAL(-0.447219)), + CCD_VEC3_STATIC(CCD_REAL(-0.276388), CCD_REAL(-0.850649), CCD_REAL(-0.447219)), + CCD_VEC3_STATIC(CCD_REAL(-0.894426), CCD_REAL(-0.000000), CCD_REAL(-0.447216)), + CCD_VEC3_STATIC(CCD_REAL(-0.276388), CCD_REAL( 0.850649), CCD_REAL(-0.447220)), + CCD_VEC3_STATIC(CCD_REAL( 0.723608), CCD_REAL( 0.525725), CCD_REAL(-0.447219)), + CCD_VEC3_STATIC(CCD_REAL( 0.276388), CCD_REAL(-0.850649), CCD_REAL( 0.447220)), + CCD_VEC3_STATIC(CCD_REAL(-0.723608), CCD_REAL(-0.525725), CCD_REAL( 0.447219)), + CCD_VEC3_STATIC(CCD_REAL(-0.723608), CCD_REAL( 0.525725), CCD_REAL( 0.447219)), + CCD_VEC3_STATIC(CCD_REAL( 0.276388), CCD_REAL( 0.850649), CCD_REAL( 0.447219)), + CCD_VEC3_STATIC(CCD_REAL( 0.894426), CCD_REAL( 0.000000), CCD_REAL( 0.447216)), + CCD_VEC3_STATIC(CCD_REAL(-0.000000), CCD_REAL( 0.000000), CCD_REAL( 1.000000)), + CCD_VEC3_STATIC(CCD_REAL( 0.425323), CCD_REAL(-0.309011), CCD_REAL(-0.850654)), + CCD_VEC3_STATIC(CCD_REAL(-0.162456), CCD_REAL(-0.499995), CCD_REAL(-0.850654)), + CCD_VEC3_STATIC(CCD_REAL( 0.262869), CCD_REAL(-0.809012), CCD_REAL(-0.525738)), + CCD_VEC3_STATIC(CCD_REAL( 0.425323), CCD_REAL( 0.309011), CCD_REAL(-0.850654)), + CCD_VEC3_STATIC(CCD_REAL( 0.850648), CCD_REAL(-0.000000), CCD_REAL(-0.525736)), + CCD_VEC3_STATIC(CCD_REAL(-0.525730), CCD_REAL(-0.000000), CCD_REAL(-0.850652)), + CCD_VEC3_STATIC(CCD_REAL(-0.688190), CCD_REAL(-0.499997), CCD_REAL(-0.525736)), + CCD_VEC3_STATIC(CCD_REAL(-0.162456), CCD_REAL( 0.499995), CCD_REAL(-0.850654)), + CCD_VEC3_STATIC(CCD_REAL(-0.688190), CCD_REAL( 0.499997), CCD_REAL(-0.525736)), + CCD_VEC3_STATIC(CCD_REAL( 0.262869), CCD_REAL( 0.809012), CCD_REAL(-0.525738)), + CCD_VEC3_STATIC(CCD_REAL( 0.951058), CCD_REAL( 0.309013), CCD_REAL( 0.000000)), + CCD_VEC3_STATIC(CCD_REAL( 0.951058), CCD_REAL(-0.309013), CCD_REAL( 0.000000)), + CCD_VEC3_STATIC(CCD_REAL( 0.587786), CCD_REAL(-0.809017), CCD_REAL( 0.000000)), + CCD_VEC3_STATIC(CCD_REAL( 0.000000), CCD_REAL(-1.000000), CCD_REAL( 0.000000)), + CCD_VEC3_STATIC(CCD_REAL(-0.587786), CCD_REAL(-0.809017), CCD_REAL( 0.000000)), + CCD_VEC3_STATIC(CCD_REAL(-0.951058), CCD_REAL(-0.309013), CCD_REAL(-0.000000)), + CCD_VEC3_STATIC(CCD_REAL(-0.951058), CCD_REAL( 0.309013), CCD_REAL(-0.000000)), + CCD_VEC3_STATIC(CCD_REAL(-0.587786), CCD_REAL( 0.809017), CCD_REAL(-0.000000)), + CCD_VEC3_STATIC(CCD_REAL(-0.000000), CCD_REAL( 1.000000), CCD_REAL(-0.000000)), + CCD_VEC3_STATIC(CCD_REAL( 0.587786), CCD_REAL( 0.809017), CCD_REAL(-0.000000)), + CCD_VEC3_STATIC(CCD_REAL( 0.688190), CCD_REAL(-0.499997), CCD_REAL( 0.525736)), + CCD_VEC3_STATIC(CCD_REAL(-0.262869), CCD_REAL(-0.809012), CCD_REAL( 0.525738)), + CCD_VEC3_STATIC(CCD_REAL(-0.850648), CCD_REAL( 0.000000), CCD_REAL( 0.525736)), + CCD_VEC3_STATIC(CCD_REAL(-0.262869), CCD_REAL( 0.809012), CCD_REAL( 0.525738)), + CCD_VEC3_STATIC(CCD_REAL( 0.688190), CCD_REAL( 0.499997), CCD_REAL( 0.525736)), + CCD_VEC3_STATIC(CCD_REAL( 0.525730), CCD_REAL( 0.000000), CCD_REAL( 0.850652)), + CCD_VEC3_STATIC(CCD_REAL( 0.162456), CCD_REAL(-0.499995), CCD_REAL( 0.850654)), + CCD_VEC3_STATIC(CCD_REAL(-0.425323), CCD_REAL(-0.309011), CCD_REAL( 0.850654)), + CCD_VEC3_STATIC(CCD_REAL(-0.425323), CCD_REAL( 0.309011), CCD_REAL( 0.850654)), + CCD_VEC3_STATIC(CCD_REAL( 0.162456), CCD_REAL( 0.499995), CCD_REAL( 0.850654)) +}; +ccd_vec3_t *ccd_points_on_sphere = points_on_sphere; +size_t ccd_points_on_sphere_len = sizeof(points_on_sphere) / sizeof(ccd_vec3_t); + + +_ccd_inline ccd_real_t __ccdVec3PointSegmentDist2(const ccd_vec3_t *P, + const ccd_vec3_t *x0, + const ccd_vec3_t *b, + ccd_vec3_t *witness) +{ + // The computation comes from solving equation of segment: + // S(t) = x0 + t.d + // where - x0 is initial point of segment + // - d is direction of segment from x0 (|d| > 0) + // - t belongs to <0, 1> interval + // + // Than, distance from a segment to some point P can be expressed: + // D(t) = |x0 + t.d - P|^2 + // which is distance from any point on segment. Minimization + // of this function brings distance from P to segment. + // Minimization of D(t) leads to simple quadratic equation that's + // solving is straightforward. + // + // Bonus of this method is witness point for free. + + ccd_real_t dist, t; + ccd_vec3_t d, a; + + // direction of segment + ccdVec3Sub2(&d, b, x0); + + // precompute vector from P to x0 + ccdVec3Sub2(&a, x0, P); + + t = -CCD_REAL(1.) * ccdVec3Dot(&a, &d); + t /= ccdVec3Len2(&d); + + if (t < CCD_ZERO || ccdIsZero(t)){ + dist = ccdVec3Dist2(x0, P); + if (witness) + ccdVec3Copy(witness, x0); + }else if (t > CCD_ONE || ccdEq(t, CCD_ONE)){ + dist = ccdVec3Dist2(b, P); + if (witness) + ccdVec3Copy(witness, b); + }else{ + if (witness){ + ccdVec3Copy(witness, &d); + ccdVec3Scale(witness, t); + ccdVec3Add(witness, x0); + dist = ccdVec3Dist2(witness, P); + }else{ + // recycling variables + ccdVec3Scale(&d, t); + ccdVec3Add(&d, &a); + dist = ccdVec3Len2(&d); + } + } + + return dist; +} + +ccd_real_t ccdVec3PointSegmentDist2(const ccd_vec3_t *P, + const ccd_vec3_t *x0, const ccd_vec3_t *b, + ccd_vec3_t *witness) +{ + return __ccdVec3PointSegmentDist2(P, x0, b, witness); +} + +ccd_real_t ccdVec3PointTriDist2(const ccd_vec3_t *P, + const ccd_vec3_t *x0, const ccd_vec3_t *B, + const ccd_vec3_t *C, + ccd_vec3_t *witness) +{ + // Computation comes from analytic expression for triangle (x0, B, C) + // T(s, t) = x0 + s.d1 + t.d2, where d1 = B - x0 and d2 = C - x0 and + // Then equation for distance is: + // D(s, t) = | T(s, t) - P |^2 + // This leads to minimization of quadratic function of two variables. + // The solution from is taken only if s is between 0 and 1, t is + // between 0 and 1 and t + s < 1, otherwise distance from segment is + // computed. + + ccd_vec3_t d1, d2, a; + ccd_real_t u, v, w, p, q, r; + ccd_real_t s, t, dist, dist2; + ccd_vec3_t witness2; + + ccdVec3Sub2(&d1, B, x0); + ccdVec3Sub2(&d2, C, x0); + ccdVec3Sub2(&a, x0, P); + + u = ccdVec3Dot(&a, &a); + v = ccdVec3Dot(&d1, &d1); + w = ccdVec3Dot(&d2, &d2); + p = ccdVec3Dot(&a, &d1); + q = ccdVec3Dot(&a, &d2); + r = ccdVec3Dot(&d1, &d2); + + s = (q * r - w * p) / (w * v - r * r); + t = (-s * r - q) / w; + + if ((ccdIsZero(s) || s > CCD_ZERO) + && (ccdEq(s, CCD_ONE) || s < CCD_ONE) + && (ccdIsZero(t) || t > CCD_ZERO) + && (ccdEq(t, CCD_ONE) || t < CCD_ONE) + && (ccdEq(t + s, CCD_ONE) || t + s < CCD_ONE)){ + + if (witness){ + ccdVec3Scale(&d1, s); + ccdVec3Scale(&d2, t); + ccdVec3Copy(witness, x0); + ccdVec3Add(witness, &d1); + ccdVec3Add(witness, &d2); + + dist = ccdVec3Dist2(witness, P); + }else{ + dist = s * s * v; + dist += t * t * w; + dist += CCD_REAL(2.) * s * t * r; + dist += CCD_REAL(2.) * s * p; + dist += CCD_REAL(2.) * t * q; + dist += u; + } + }else{ + dist = __ccdVec3PointSegmentDist2(P, x0, B, witness); + + dist2 = __ccdVec3PointSegmentDist2(P, x0, C, &witness2); + if (dist2 < dist){ + dist = dist2; + if (witness) + ccdVec3Copy(witness, &witness2); + } + + dist2 = __ccdVec3PointSegmentDist2(P, B, C, &witness2); + if (dist2 < dist){ + dist = dist2; + if (witness) + ccdVec3Copy(witness, &witness2); + } + } + + return dist; +} diff -Nru ode-0.11.1/LICENSE-BSD.TXT ode-0.14/LICENSE-BSD.TXT --- ode-0.11.1/LICENSE-BSD.TXT 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/LICENSE-BSD.TXT 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,34 @@ + +This is the BSD-style license for the Open Dynamics Engine +---------------------------------------------------------- + +Open Dynamics Engine +Copyright (c) 2001-2007, Russell L. Smith. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +Neither the names of ODE's copyright owner nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -Nru ode-0.11.1/ltmain.sh ode-0.14/ltmain.sh --- ode-0.11.1/ltmain.sh 2009-05-24 22:15:36.000000000 +0000 +++ ode-0.14/ltmain.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,8426 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6 -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=2.2.6 -TIMESTAMP="" -package_revision=1.3012 - -# define SED for historic ltconfig's generated by Libtool 1.3 -test -z "$SED" && SED=sed - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - if test "$module" = yes ; then - # [Mandriva] dropping ld option "--no-undefined" which is wrong for plugins - linker_flags=`$ECHO "X $linker_flags" | $Xsed -e 's/ --no-undefined//'` - compiler_flags=`$ECHO "X $compiler_flags" | $Xsed -e 's/ -Wl,--no-undefined//'` - fi - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - inst_prefix_arg= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - if test -n "$inst_prefix_dir" && (echo "$test_deplib" | grep -- "$inst_prefix_dir" >/dev/null); then - inst_prefix_arg="$inst_prefix_arg $test_deplib" - else - tmp_deplibs="$tmp_deplibs $test_deplib" - fi - ;; - esac - done - deplibs="$tmp_deplibs" - if test -n "$inst_prefix_arg"; then - deplibs="$inst_prefix_arg $deplibs" - fi - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff -Nru ode-0.11.1/m4/pkg.m4 ode-0.14/m4/pkg.m4 --- ode-0.11.1/m4/pkg.m4 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/m4/pkg.m4 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,157 @@ +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT]) + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .]) + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES diff -Nru ode-0.11.1/Makefile.am ode-0.14/Makefile.am --- ode-0.11.1/Makefile.am 2008-08-23 00:31:01.000000000 +0000 +++ ode-0.14/Makefile.am 2015-12-18 14:09:27.000000000 +0000 @@ -1,7 +1,16 @@ +AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 --install + if ENABLE_OU OU_DIR = ou endif +if LIBCCD +if LIBCCD_INTERNAL +LIBCCD_DIR = libccd +endif +endif + if ENABLE_DEMOS DRAWSTUFF_DIR = drawstuff endif @@ -19,6 +28,7 @@ $(GIMPACT_DIR) \ $(OPCODE_DIR) \ $(OU_DIR) \ + $(LIBCCD_DIR) \ ode \ tests @@ -28,8 +38,9 @@ release: dist-gzip dist-bzip2 @echo Created release packages for ${PACKAGE}-${VERSION}. -EXTRA_DIST = autogen.sh build tools \ - CHANGELOG.txt INSTALL.txt README.txt LICENSE.TXT +EXTRA_DIST = bootstrap build tools \ + CHANGELOG.txt COPYING INSTALL.txt README.md LICENSE.TXT \ + bindings pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = ode.pc diff -Nru ode-0.11.1/Makefile.in ode-0.14/Makefile.in --- ode-0.11.1/Makefile.in 2009-05-24 22:15:39.000000000 +0000 +++ ode-0.14/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,723 +0,0 @@ -# Makefile.in generated by automake 1.10.2 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 = . -DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/ode-config.in \ - $(srcdir)/ode.pc.in $(top_srcdir)/configure compile \ - config.guess config.sub depcomp install-sh ltmain.sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/ode/src/config.h -CONFIG_CLEAN_FILES = ode-config ode.pc -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(bin_SCRIPTS) -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 -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgconfig_DATA) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = include drawstuff GIMPACT OPCODE ou ode tests -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXTRA_LIBTOOL_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ -FGREP = @FGREP@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSTDCXX = @LIBSTDCXX@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ODE_PRECISION = @ODE_PRECISION@ -ODE_RELEASE = @ODE_RELEASE@ -ODE_VERSION_INFO = @ODE_VERSION_INFO@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -WINDRES = @WINDRES@ -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_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_WINDRES = @ac_ct_WINDRES@ -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@ -lt_ECHO = @lt_ECHO@ -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@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -@ENABLE_OU_TRUE@OU_DIR = ou -@ENABLE_DEMOS_TRUE@DRAWSTUFF_DIR = drawstuff -@GIMPACT_TRUE@GIMPACT_DIR = GIMPACT -@OPCODE_TRUE@OPCODE_DIR = OPCODE -SUBDIRS = include \ - $(DRAWSTUFF_DIR) \ - $(GIMPACT_DIR) \ - $(OPCODE_DIR) \ - $(OU_DIR) \ - ode \ - tests - -bin_SCRIPTS = ode-config -EXTRA_DIST = autogen.sh build tools \ - CHANGELOG.txt INSTALL.txt README.txt LICENSE.TXT - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = ode.pc -all: all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -ode-config: $(top_builddir)/config.status $(srcdir)/ode-config.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -ode.pc: $(top_builddir)/config.status $(srcdir)/ode.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ - else :; fi; \ - done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -# 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; nonempty = 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) - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @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 - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(SCRIPTS) $(DATA) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -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 $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-pkgconfigDATA - -install-dvi: install-dvi-recursive - -install-exec-am: install-binSCRIPTS - -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 $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -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: uninstall-binSCRIPTS uninstall-pkgconfigDATA - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binSCRIPTS 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-pkgconfigDATA 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 uninstall-binSCRIPTS \ - uninstall-pkgconfigDATA - - -# Utility rule for making a release -release: dist-gzip dist-bzip2 - @echo Created release packages for ${PACKAGE}-${VERSION}. -# 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 -Nru ode-0.11.1/missing ode-0.14/missing --- ode-0.11.1/missing 2009-05-24 22:15:46.000000000 +0000 +++ ode-0.14/missing 1970-01-01 00:00:00.000000000 +0000 @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff -Nru ode-0.11.1/ode/demo/demo_basket.cpp ode-0.14/ode/demo/demo_basket.cpp --- ode-0.11.1/ode/demo/demo_basket.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_basket.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -1,280 +1,276 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -// Basket ball demo. -// Serves as a test for the sphere vs trimesh collider -// By Bram Stolk. -// Press the spacebar to reset the position of the ball. - -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#include "texturepath.h" -#include "basket_geom.h" // this is our world mesh - -#ifdef _MSC_VER -#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints -#endif - -// some constants - -#define RADIUS 0.14 - -// dynamics and collision objects (chassis, 3 wheels, environment) - -static dWorldID world; -static dSpaceID space; - -static dBodyID sphbody; -static dGeomID sphgeom; - -static dJointGroupID contactgroup; -static dGeomID world_mesh; - - -// this is called by dSpaceCollide when two objects in space are -// potentially colliding. - -static void nearCallback (void *data, dGeomID o1, dGeomID o2) -{ - assert(o1); - assert(o2); - - if (dGeomIsSpace(o1) || dGeomIsSpace(o2)) - { - fprintf(stderr,"testing space %p %p\n", o1,o2); - // colliding a space with something - dSpaceCollide2(o1,o2,data,&nearCallback); - // Note we do not want to test intersections within a space, - // only between spaces. - return; - } - -// fprintf(stderr,"testing geoms %p %p\n", o1, o2); - - const int N = 32; - dContact contact[N]; - int n = dCollide (o1,o2,N,&(contact[0].geom),sizeof(dContact)); - if (n > 0) - { - for (int i=0; i +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include "texturepath.h" +#include "basket_geom.h" // this is our world mesh + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif + +// some constants + +#define RADIUS 0.14 + +// dynamics and collision objects (chassis, 3 wheels, environment) + +static dWorldID world; +static dSpaceID space; + +static dBodyID sphbody; +static dGeomID sphgeom; + +static dJointGroupID contactgroup; +static dGeomID world_mesh; + + +// this is called by dSpaceCollide when two objects in space are +// potentially colliding. + +static void nearCallback (void *data, dGeomID o1, dGeomID o2) +{ + assert(o1); + assert(o2); + + if (dGeomIsSpace(o1) || dGeomIsSpace(o2)) + { + fprintf(stderr,"testing space %p %p\n", (void*)o1, (void*)o2); + // colliding a space with something + dSpaceCollide2(o1,o2,data,&nearCallback); + // Note we do not want to test intersections within a space, + // only between spaces. + return; + } + +// fprintf(stderr,"testing geoms %p %p\n", o1, o2); + + const int N = 32; + dContact contact[N]; + int n = dCollide (o1,o2,N,&(contact[0].geom),sizeof(dContact)); + if (n > 0) + { + for (int i=0; ibody && o2->body) return; + int i; + // if (o1->body && o2->body) return; - // exit without doing anything if the two bodies are connected by a joint - dBodyID b1 = dGeomGetBody(o1); - dBodyID b2 = dGeomGetBody(o2); - if (b1 && b2 && dAreConnectedExcluding (b1,b2,dJointTypeContact)) return; - - dContact contact[MAX_CONTACTS]; // up to MAX_CONTACTS contacts per box-box - for (i=0; i= 'A' && c <= 'Z') return c - ('a'-'A'); else return c; @@ -209,286 +210,247 @@ // called when a key pressed -static void command (int cmd) +static void command(int cmd) { - size_t i; - int j,k; - dReal sides[3]; - dMass m; - int setBody; - - cmd = locase (cmd); - if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x' || cmd == 'y' || cmd == 'v') - { - setBody = 0; - if (num < NUM) { - i = num; - num++; - } - else { - i = nextobj; - nextobj++; - if (nextobj >= num) nextobj = 0; - - // destroy the body and geoms for slot i - dBodyDestroy (obj[i].body); - for (k=0; k < GPB; k++) { - if (obj[i].geom[k]) dGeomDestroy (obj[i].geom[k]); - } - memset (&obj[i],0,sizeof(obj[i])); - } + size_t i; + int j,k; + dReal sides[3]; + dMass m; + bool setBody = false; + + cmd = locase(cmd); + if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x' || cmd == 'y' || cmd == 'v') { + if (num < NUM) { + // new object to be created + i = num; + num++; + } else { + // recycle existing object + i = nextobj++; + nextobj %= num; // wrap-around if needed + + // destroy the body and geoms for slot i + dBodyDestroy (obj[i].body); + obj[i].body = 0; + + for (k=0; k < GPB; k++) + if (obj[i].geom[k]) { + dGeomDestroy(obj[i].geom[k]); + obj[i].geom[k] = 0; + } + } - obj[i].body = dBodyCreate (world); - for (k=0; k<3; k++) sides[k] = dRandReal()*0.5+0.1; + obj[i].body = dBodyCreate(world); - dMatrix3 R; - if (random_pos) - { - dBodySetPosition (obj[i].body, - dRandReal()*2-1,dRandReal()*2-1,dRandReal()+2); - dRFromAxisAndAngle (R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, - dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); - } - else - { - dReal maxheight = 0; - for (k=0; k maxheight) maxheight = pos[2]; - } - dBodySetPosition (obj[i].body, 0,0,maxheight+1); - dRSetIdentity (R); - //dRFromAxisAndAngle (R,0,0,1,/*dRandReal()*10.0-5.0*/0); - } - dBodySetRotation (obj[i].body,R); - dBodySetData (obj[i].body,(void*) i); - - if (cmd == 'b') { - dMassSetBox (&m,DENSITY,sides[0],sides[1],sides[2]); - obj[i].geom[0] = dCreateBox (space,sides[0],sides[1],sides[2]); - } - else if (cmd == 'c') { - sides[0] *= 0.5; - dMassSetCapsule (&m,DENSITY,3,sides[0],sides[1]); - obj[i].geom[0] = dCreateCapsule (space,sides[0],sides[1]); - } - //<---- Convex Object - else if (cmd == 'v') - { - dMassSetBox (&m,DENSITY,0.25,0.25,0.25); + for (k=0; k<3; k++) + sides[k] = dRandReal()*0.5+0.1; + + dMatrix3 R; + if (random_pos) { + dBodySetPosition(obj[i].body, + dRandReal()*2-1,dRandReal()*2-1,dRandReal()+2); + dRFromAxisAndAngle(R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, + dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); + } else { + // higher than highest body position + dReal maxheight = 0; + for (k=0; k maxheight) + maxheight = pos[2]; + } + dBodySetPosition(obj[i].body, 0,0,maxheight+1); + dRSetIdentity(R); + //dRFromAxisAndAngle (R,0,0,1,/*dRandReal()*10.0-5.0*/0); + } + + dBodySetRotation(obj[i].body,R); + + if (cmd == 'b') { + + dMassSetBox(&m,DENSITY,sides[0],sides[1],sides[2]); + obj[i].geom[0] = dCreateBox(space,sides[0],sides[1],sides[2]); + + } else if (cmd == 'c') { + + sides[0] *= 0.5; + dMassSetCapsule(&m,DENSITY,3,sides[0],sides[1]); + obj[i].geom[0] = dCreateCapsule (space,sides[0],sides[1]); + + } else if (cmd == 'v') { + + dMassSetBox(&m,DENSITY,0.25,0.25,0.25); #if 0 - obj[i].geom[0] = dCreateConvex (space, - planes, - planecount, - points, - pointcount, - polygons); + obj[i].geom[0] = dCreateConvex(space, + planes, + planecount, + points, + pointcount, + polygons); #else - obj[i].geom[0] = dCreateConvex (space, - Sphere_planes, - Sphere_planecount, - Sphere_points, - Sphere_pointcount, - Sphere_polygons); + obj[i].geom[0] = dCreateConvex(space, + Sphere_planes, + Sphere_planecount, + Sphere_points, + Sphere_pointcount, + Sphere_polygons); #endif - } - //----> Convex Object - else if (cmd == 'y') { - dMassSetCylinder (&m,DENSITY,3,sides[0],sides[1]); - obj[i].geom[0] = dCreateCylinder (space,sides[0],sides[1]); - } - else if (cmd == 's') { - sides[0] *= 0.5; - dMassSetSphere (&m,DENSITY,sides[0]); - obj[i].geom[0] = dCreateSphere (space,sides[0]); - } - else if (cmd == 'x' && USE_GEOM_OFFSET) { - setBody = 1; - // start accumulating masses for the encapsulated geometries - dMass m2; - dMassSetZero (&m); - dReal dpos[GPB][3]; // delta-positions for encapsulated geometries - dMatrix3 drot[GPB]; + } else if (cmd == 'y') { + + dMassSetCylinder(&m,DENSITY,3,sides[0],sides[1]); + obj[i].geom[0] = dCreateCylinder(space,sides[0],sides[1]); + + } else if (cmd == 's') { + + sides[0] *= 0.5; + dMassSetSphere (&m,DENSITY,sides[0]); + obj[i].geom[0] = dCreateSphere (space,sides[0]); + + } else if (cmd == 'x') { + + setBody = true; + // start accumulating masses for the composite geometries + dMass m2; + dMassSetZero (&m); + + dReal dpos[GPB][3]; // delta-positions for composite geometries + dMatrix3 drot[GPB]; - // set random delta positions - for (j=0; j= num) selected = 0; - if (selected < 0) selected = 0; - } - else if (cmd == 'd' && selected >= 0 && selected < num) { - dBodyDisable (obj[selected].body); - } - else if (cmd == 'e' && selected >= 0 && selected < num) { - dBodyEnable (obj[selected].body); - } - else if (cmd == 'a') { - show_aabb ^= 1; - } - else if (cmd == 't') { - show_contacts ^= 1; - } - else if (cmd == 'r') { - random_pos ^= 1; - } - else if (cmd == '1') { - write_world = 1; - } - else if (cmd == 'p'&& selected >= 0) - { - const dReal* pos = dGeomGetPosition(obj[selected].geom[0]); - const dReal* rot = dGeomGetRotation(obj[selected].geom[0]); - printf("POSITION:\n\t[%f,%f,%f]\n\n",pos[0],pos[1],pos[2]); - printf("ROTATION:\n\t[%f,%f,%f,%f]\n\t[%f,%f,%f,%f]\n\t[%f,%f,%f,%f]\n\n", - rot[0],rot[1],rot[2],rot[3], - rot[4],rot[5],rot[6],rot[7], - rot[8],rot[9],rot[10],rot[11]); - } - else if (cmd == 'f' && selected >= 0 && selected < num) { - if (dBodyIsEnabled(obj[selected].body)) + if (cmd == ' ') { + + selected++; + if (selected >= num) + selected = 0; + if (selected == -1) + selected = 0; + + } else if (cmd == 'd' && selected >= 0 && selected < num) { + + dBodyDisable(obj[selected].body); + + } else if (cmd == 'e' && selected >= 0 && selected < num) { + + dBodyEnable(obj[selected].body); + + } else if (cmd == 'a') { + + show_aabb = !show_aabb; + + } else if (cmd == 't') { + + show_contacts = !show_contacts; + + } else if (cmd == 'r') { + + random_pos = !random_pos; + } else if (cmd == '1') { + + write_world = 1; + + } else if (cmd == 'p'&& selected >= 0) { + + const dReal* pos = dGeomGetPosition(obj[selected].geom[0]); + const dReal* rot = dGeomGetRotation(obj[selected].geom[0]); + printf("POSITION:\n\t[%f,%f,%f]\n\n",pos[0],pos[1],pos[2]); + printf("ROTATION:\n\t[%f,%f,%f,%f]\n\t[%f,%f,%f,%f]\n\t[%f,%f,%f,%f]\n\n", + rot[0],rot[1],rot[2],rot[3], + rot[4],rot[5],rot[6],rot[7], + rot[8],rot[9],rot[10],rot[11]); + + } else if (cmd == 'f' && selected >= 0 && selected < num) { + + if (dBodyIsEnabled(obj[selected].body)) doFeedback = 1; - } + + } } // draw a geom -void drawGeom (dGeomID g, const dReal *pos, const dReal *R, int show_aabb) +void drawGeom(dGeomID g, const dReal *pos, const dReal *R, int show_aabb) { - int i; + int i; - if (!g) return; - if (!pos) pos = dGeomGetPosition (g); - if (!R) R = dGeomGetRotation (g); - - int type = dGeomGetClass (g); - if (type == dBoxClass) { - dVector3 sides; - dGeomBoxGetLengths (g,sides); - dsDrawBox (pos,R,sides); - } - else if (type == dSphereClass) { - dsDrawSphere (pos,R,dGeomSphereGetRadius (g)); - } - else if (type == dCapsuleClass) { - dReal radius,length; - dGeomCapsuleGetParams (g,&radius,&length); - dsDrawCapsule (pos,R,length,radius); - } - //<---- Convex Object - else if (type == dConvexClass) - { + if (!g) + return; + if (!pos) + pos = dGeomGetPosition(g); + if (!R) + R = dGeomGetRotation(g); + + int type = dGeomGetClass(g); + if (type == dBoxClass) { + + dVector3 sides; + dGeomBoxGetLengths (g,sides); + dsDrawBox(pos,R,sides); + + } else if (type == dSphereClass) { + + dsDrawSphere(pos,R,dGeomSphereGetRadius(g)); + + } else if (type == dCapsuleClass) { + + dReal radius,length; + dGeomCapsuleGetParams(g,&radius,&length); + dsDrawCapsule(pos,R,length,radius); + + } else if (type == dConvexClass) { + #if 0 dsDrawConvex(pos,R,planes, planecount, @@ -497,163 +459,161 @@ polygons); #else dsDrawConvex(pos,R, - Sphere_planes, + Sphere_planes, Sphere_planecount, Sphere_points, Sphere_pointcount, Sphere_polygons); #endif + + } else if (type == dCylinderClass) { + + dReal radius,length; + dGeomCylinderGetParams(g,&radius,&length); + dsDrawCylinder(pos,R,length,radius); + } - //----> Convex Object - else if (type == dCylinderClass) { - dReal radius,length; - dGeomCylinderGetParams (g,&radius,&length); - dsDrawCylinder (pos,R,length,radius); - } - else if (type == dGeomTransformClass) { - dGeomID g2 = dGeomTransformGetGeom (g); - const dReal *pos2 = dGeomGetPosition (g2); - const dReal *R2 = dGeomGetRotation (g2); - dVector3 actual_pos; - dMatrix3 actual_R; - dMULTIPLY0_331 (actual_pos,R,pos2); - actual_pos[0] += pos[0]; - actual_pos[1] += pos[1]; - actual_pos[2] += pos[2]; - dMULTIPLY0_333 (actual_R,R,R2); - drawGeom (g2,actual_pos,actual_R,0); - } - if (show_body) { - dBodyID body = dGeomGetBody(g); - if (body) { - const dReal *bodypos = dBodyGetPosition (body); - const dReal *bodyr = dBodyGetRotation (body); - dReal bodySides[3] = { 0.1, 0.1, 0.1 }; - dsSetColorAlpha(0,1,0,1); - dsDrawBox(bodypos,bodyr,bodySides); + + if (show_body) { + dBodyID body = dGeomGetBody(g); + if (body) { + const dReal *bodypos = dBodyGetPosition(body); + const dReal *bodyr = dBodyGetRotation(body); + dReal bodySides[3] = { 0.1, 0.1, 0.1 }; + dsSetColorAlpha(0,1,0,1); + dsDrawBox(bodypos,bodyr,bodySides); + } + } + + if (show_aabb) { + // draw the bounding box for this geom + dReal aabb[6]; + dGeomGetAABB(g,aabb); + dVector3 bbpos; + for (i=0; i<3; i++) + bbpos[i] = 0.5*(aabb[i*2] + aabb[i*2+1]); + dVector3 bbsides; + for (i=0; i<3; i++) + bbsides[i] = aabb[i*2+1] - aabb[i*2]; + dMatrix3 RI; + dRSetIdentity (RI); + dsSetColorAlpha(1,0,0,0.5); + dsDrawBox(bbpos,RI,bbsides); } - } - if (show_aabb) { - // draw the bounding box for this geom - dReal aabb[6]; - dGeomGetAABB (g,aabb); - dVector3 bbpos; - for (i=0; i<3; i++) bbpos[i] = 0.5*(aabb[i*2] + aabb[i*2+1]); - dVector3 bbsides; - for (i=0; i<3; i++) bbsides[i] = aabb[i*2+1] - aabb[i*2]; - dMatrix3 RI; - dRSetIdentity (RI); - dsSetColorAlpha (1,0,0,0.5); - dsDrawBox (bbpos,RI,bbsides); - } } // simulation loop -static void simLoop (int pause) +static void simLoop(int pause) { - dsSetColor (0,0,2); - dSpaceCollide (space,0,&nearCallback); - if (!pause) dWorldQuickStep (world,0.02); - - if (write_world) { - FILE *f = fopen ("state.dif","wt"); - if (f) { - dWorldExportDIF (world,f,"X"); - fclose (f); + dSpaceCollide(space, 0, &nearCallback); + + if (!pause) + dWorldQuickStep(world, 0.02); + + if (write_world) { + FILE *f = fopen("state.dif","wt"); + if (f) { + dWorldExportDIF(world,f,"X"); + fclose (f); + } + write_world = 0; } - write_world = 0; - } - if (doFeedback) - { - if (fbnum>MAX_FEEDBACKNUM) - printf("joint feedback buffer overflow!\n"); - else - { - dVector3 sum = {0, 0, 0}; - printf("\n"); - for (int i=0; iMAX_FEEDBACKNUM) + printf("joint feedback buffer overflow!\n"); + else { + dVector3 sum = {0, 0, 0}; + printf("\n"); + for (int i=0; i #include #include @@ -119,7 +141,7 @@ puts(" = - one more level"); } -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { // exit without doing anything if the two bodies are connected by a joint dBodyID b1 = dGeomGetBody(o1); @@ -208,6 +230,7 @@ dJointGroupDestroy(contactgroup); dWorldDestroy(world); + dGeomDestroy(ground); dSpaceDestroy(space); dCloseODE(); diff -Nru ode-0.11.1/ode/demo/demo_chain1.c ode-0.14/ode/demo/demo_chain1.c --- ode-0.11.1/ode/demo/demo_chain1.c 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_chain1.c 2015-12-18 14:09:27.000000000 +0000 @@ -28,7 +28,7 @@ #include "texturepath.h" #ifdef _MSC_VER -#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#pragma warning(disable:4244 4305) /* for VC++, no precision loss complaints */ #endif /* select correct drawing functions */ @@ -68,6 +68,7 @@ /* exit without doing anything if the two bodies are connected by a joint */ dBodyID b1,b2; dContact contact; + (void)data; b1 = dGeomGetBody(o1); b2 = dGeomGetBody(o2); diff -Nru ode-0.11.1/ode/demo/demo_chain2.cpp ode-0.14/ode/demo/demo_chain2.cpp --- ode-0.11.1/ode/demo/demo_chain2.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_chain2.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -62,7 +62,7 @@ // this is called by space.collide when two objects in space are // potentially colliding. -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { // exit without doing anything if the two bodies are connected by a joint dBodyID b1 = dGeomGetBody(o1); diff -Nru ode-0.11.1/ode/demo/demo_collision.cpp ode-0.14/ode/demo/demo_collision.cpp --- ode-0.11.1/ode/demo/demo_collision.cpp 2008-06-04 23:47:13.000000000 +0000 +++ ode-0.14/ode/demo/demo_collision.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -44,6 +44,7 @@ #define dsDrawBox dsDrawBoxD #define dsDrawLine dsDrawLineD #define dsDrawCapsule dsDrawCapsuleD +#define dsDrawCylinder dsDrawCylinderD #endif //**************************************************************************** @@ -102,7 +103,7 @@ //**************************************************************************** // draw all objects in a space, and draw all the collision contact points -void nearCallback (void *data, dGeomID o1, dGeomID o2) +void nearCallback (void *, dGeomID o1, dGeomID o2) { int i,j,n; const int N = 100; @@ -190,6 +191,13 @@ dsDrawCapsule (pos,dGeomGetRotation(g),length,radius); break; } + case dCylinderClass: { + dsSetColorAlpha (0,1,0,0.8); + dReal radius,length; + dGeomCylinderGetParams (g,&radius,&length); + dsDrawCylinder (pos,dGeomGetRotation(g),length,radius); + break; + } case dPlaneClass: { dVector4 n; @@ -372,7 +380,7 @@ for (j=0; j<3; j++) a[j] = dRandReal()-0.5; dNormalize3 (a); - if (dDOT14(a,R+2) > 0) { + if (dCalcVectorDot3_14(a,R+2) > 0) { for (j=0; j<3; j++) a[j] = p[j] + a[j]*r + l*0.5*R[j*4+2]; } else { @@ -404,7 +412,7 @@ d = (dRandReal()*2-1) * r; for (j=0; j<3; j++) a[j] = dRandReal()-0.5; dNormalize3 (a); - if (dDOT14(a,R+2) > 0) { + if (dCalcVectorDot3_14(a,R+2) > 0) { for (j=0; j<3; j++) a[j] = p[j] + a[j]*(r-d) + l*0.5*R[j*4+2]; } else { @@ -527,7 +535,7 @@ for (j=0; j<3; j++) n[j] = q2[j] - q[j]; dNormalize3 (n); dGeomRaySet (ray,q[0],q[1],q[2],n[0],n[1],n[2]); - dGeomRaySetLength (ray,dDISTANCE (q,q2)); + dGeomRaySetLength (ray,dCalcPointsDistance3(q,q2)); if (dCollide (ray,sphere,1,&contact,sizeof(dContactGeom)) != 0) FAILED(); // ********** test finite length ray totally outside the sphere @@ -538,7 +546,7 @@ dMakeRandomVector (n,3,1.0); dNormalize3 (n); } - while (dDOT(n,q) < 0); // make sure normal goes away from sphere + while (dCalcVectorDot3(n,q) < 0); // make sure normal goes away from sphere for (j=0; j<3; j++) q[j] = 1.01*r * q[j] + p[j]; dGeomRaySet (ray,q[0],q[1],q[2],n[0],n[1],n[2]); dGeomRaySetLength (ray,100); @@ -559,7 +567,7 @@ dGeomRaySetLength (ray,1.01*r); if (dCollide (ray,sphere,1,&contact,sizeof(dContactGeom)) != 1) FAILED(); for (j=0; j<3; j++) q2[j] = r * q[j] + p[j]; - if (dDISTANCE (contact.pos,q2) > tol) FAILED(); + if (dCalcPointsDistance3 (contact.pos,q2) > tol) FAILED(); // ********** test contact point distance for random rays @@ -572,10 +580,10 @@ dGeomRaySet (ray,q[0],q[1],q[2],n[0],n[1],n[2]); dGeomRaySetLength (ray,100); if (dCollide (ray,sphere,1,&contact,sizeof(dContactGeom))) { - k = dDISTANCE (contact.pos,dGeomGetPosition(sphere)); + k = dCalcPointsDistance3 (contact.pos,dGeomGetPosition(sphere)); if (dFabs(k - r) > tol) FAILED(); // also check normal signs - if (dDOT (n,contact.normal) > 0) FAILED(); + if (dCalcVectorDot3 (n,contact.normal) > 0) FAILED(); // also check depth of contact point if (dFabs (dGeomSpherePointDepth (sphere,contact.pos[0],contact.pos[1],contact.pos[2])) > tol) @@ -673,7 +681,7 @@ for (j=0; j<3; j++) n[j] = q4[j] - q2[j]; dNormalize3 (n); dGeomRaySet (ray,q2[0],q2[1],q2[2],n[0],n[1],n[2]); - dGeomRaySetLength (ray,dDISTANCE(q2,q4)); + dGeomRaySetLength (ray,dCalcPointsDistance3(q2,q4)); if (dCollide (ray,box,1,&contact,sizeof(dContactGeom)) != 0) FAILED(); // ********** test finite length ray totally outside the box @@ -729,7 +737,7 @@ FAILED(); } // also check normal signs - if (dDOT (q3,contact.normal) > 0) FAILED(); + if (dCalcVectorDot3 (q3,contact.normal) > 0) FAILED(); draw_all_objects (space); } @@ -773,7 +781,7 @@ dNormalize3 (b); k = (dRandReal()-0.5)*l; for (j=0; j<3; j++) b[j] = p[j] + r*0.99*b[j] + k*0.99*R[j*4+2]; - dGeomRaySetLength (ray,dDISTANCE(a,b)); + dGeomRaySetLength (ray,dCalcPointsDistance3(a,b)); for (j=0; j<3; j++) b[j] -= a[j]; dNormalize3 (b); dGeomRaySet (ray,a[0],a[1],a[2],b[0],b[1],b[2]); @@ -804,7 +812,7 @@ for (j=0; j<3; j++) a[j] = dRandReal()-0.5; dNormalize3 (a); - if (dDOT14(a,R+2) < 0) { + if (dCalcVectorDot3_14(a,R+2) < 0) { for (j=0; j<3; j++) b[j] = p[j] - a[j]*2*r + l*0.5*R[j*4+2]; } else { @@ -838,7 +846,7 @@ FAILED(); // check normal signs - if (dDOT (n,contact.normal) > 0) FAILED(); + if (dCalcVectorDot3 (n,contact.normal) > 0) FAILED(); draw_all_objects (space); } @@ -846,6 +854,60 @@ PASSED(); } +/* + Test rays within the cylinder + -completely inside + -exiting through side + -exiting through cap + -exiting through corner + Test rays outside the cylinder +*/ +int test_ray_and_cylinder() +{ + dVector3 a,b; + + dSimpleSpace space(0); + dGeomID ray = dCreateRay(space,4); + + // The first thing that happens is the ray is + // rotated into cylinder coordinates. We'll trust that's + // done right. The major axis is in the z-dir. + + + // Random tests + /*b[0]=4*dRandReal()-2; + b[1]=4*dRandReal()-2; + b[2]=4*dRandReal()-2; + a[0]=2*dRandReal()-1; + a[1]=2*dRandReal()-1; + a[2]=2*dRandReal()-1;*/ + + // Inside out + b[0]=dRandReal()-0.5; + b[1]=dRandReal()-0.5; + b[2]=dRandReal()-0.5; + a[0]=2*dRandReal()-1; + a[1]=2*dRandReal()-1; + a[2]=2*dRandReal()-1; + + // Outside in + /*b[0]=4*dRandReal()-2; + b[1]=4*dRandReal()-2; + b[2]=4*dRandReal()-2; + a[0]=-b[0]; + a[1]=-b[1]; + a[2]=-b[2];*/ + + + dGeomRaySet (ray,b[0],b[1],b[2],a[0],a[1],a[2]); + // This is just for visual inspection right now. + //if (dCollide (ray,cyl,1,&contact,sizeof(dContactGeom)) != 1) FAILED(); + + draw_all_objects (space); + + PASSED(); +} + int test_ray_and_plane() { @@ -912,9 +974,9 @@ dGeomRaySetLength (ray,10); if (dCollide (ray,plane,1,&contact,sizeof(dContactGeom))) { // test that contact is on plane surface - if (dFabs (dDOT(contact.pos,n) - d) > tol) FAILED(); + if (dFabs (dCalcVectorDot3(contact.pos,n) - d) > tol) FAILED(); // also check normal signs - if (dDOT (h,contact.normal) > 0) FAILED(); + if (dCalcVectorDot3 (h,contact.normal) > 0) FAILED(); // also check contact point depth if (dFabs (dGeomPlanePointDepth (plane,contact.pos[0],contact.pos[1],contact.pos[2])) > tol) @@ -969,25 +1031,25 @@ dVector3 u1,u2,n,tmp; for (k=0; k<3; k++) u1[k] = p3[k]-p1[k]; for (k=0; k<3; k++) u2[k] = p2[k]-p1[k]; - dReal d1 = dSqrt(dDOT(u1,u1)); - dReal d2 = dSqrt(dDOT(u2,u2)); + dReal d1 = dSqrt(dCalcVectorDot3(u1,u1)); + dReal d2 = dSqrt(dCalcVectorDot3(u2,u2)); dNormalize3 (u1); dNormalize3 (u2); - if (dFabs(dDOT(u1,u2)) > 1e-6) dDebug (0,"bad u1/u2"); - dCROSS (n,=,u1,u2); + if (dFabs(dCalcVectorDot3(u1,u2)) > 1e-6) dDebug (0,"bad u1/u2"); + dCalcVectorCross3(n,u1,u2); for (k=0; k<3; k++) tmp[k] = v2[k]-v1[k]; - dReal d = -dDOT(n,p1); - if (dFabs(dDOT(n,p1)+d) > 1e-8) dDebug (0,"bad n wrt p1"); - if (dFabs(dDOT(n,p2)+d) > 1e-8) dDebug (0,"bad n wrt p2"); - if (dFabs(dDOT(n,p3)+d) > 1e-8) dDebug (0,"bad n wrt p3"); - dReal alpha = -(d+dDOT(n,v1))/dDOT(n,tmp); + dReal d = -dCalcVectorDot3(n,p1); + if (dFabs(dCalcVectorDot3(n,p1)+d) > 1e-8) dDebug (0,"bad n wrt p1"); + if (dFabs(dCalcVectorDot3(n,p2)+d) > 1e-8) dDebug (0,"bad n wrt p2"); + if (dFabs(dCalcVectorDot3(n,p3)+d) > 1e-8) dDebug (0,"bad n wrt p3"); + dReal alpha = -(d+dCalcVectorDot3(n,v1))/dCalcVectorDot3(n,tmp); for (k=0; k<3; k++) tmp[k] = v1[k]+alpha*(v2[k]-v1[k]); - if (dFabs(dDOT(n,tmp)+d) > 1e-6) dDebug (0,"bad tmp"); + if (dFabs(dCalcVectorDot3(n,tmp)+d) > 1e-6) dDebug (0,"bad tmp"); if (alpha < 0) return 0; if (alpha > 1) return 0; for (k=0; k<3; k++) tmp[k] -= p1[k]; - dReal a1 = dDOT(u1,tmp); - dReal a2 = dDOT(u2,tmp); + dReal a1 = dCalcVectorDot3(u1,tmp); + dReal a2 = dCalcVectorDot3(u2,tmp); if (a1<0 || a2<0 || a1>d1 || a2>d2) return 0; return 1; } @@ -1006,12 +1068,12 @@ v[0] = i*0.5*side1[0]; v[1] = j*0.5*side1[1]; v[2] = k*0.5*side1[2]; - dMULTIPLY0_331 (vv,R1,v); + dMultiply0_331 (vv,R1,v); vv[0] += p1[0] - p2[0]; vv[1] += p1[1] - p2[1]; vv[2] += p1[2] - p2[2]; for (int axis=0; axis < 3; axis++) { - dReal z = dDOT14(vv,R2+axis); + dReal z = dCalcVectorDot3_14(vv,R2+axis); if (z < (-side2[axis]*0.5) || z > (side2[axis]*0.5)) return 0; } } @@ -1050,7 +1112,7 @@ } for (j=0; j<4; j++) { for (k=0; k<3; k++) fp[j][k] *= 0.5*side2[k]; - dMULTIPLY0_331 (tmp,R2,fp[j]); + dMultiply0_331 (tmp,R2,fp[j]); for (k=0; k<3; k++) fp[j][k] = tmp[k] + p2[k]; } @@ -1067,8 +1129,8 @@ for (k=0; k<3; k++) vv1[k] = v1[k] * 0.5*side1[k]; for (k=0; k<3; k++) vv2[k] = (v1[k] + (k==ei)*2)*0.5*side1[k]; dVector3 vertex1,vertex2; - dMULTIPLY0_331 (vertex1,R1,vv1); - dMULTIPLY0_331 (vertex2,R1,vv2); + dMultiply0_331 (vertex1,R1,vv1); + dMultiply0_331 (vertex2,R1,vv2); for (k=0; k<3; k++) vertex1[k] += p1[k]; for (k=0; k<3; k++) vertex2[k] += p1[k]; @@ -1245,7 +1307,7 @@ // simulation loop -static void simLoop (int pause) +static void simLoop (int) { do { draw_all_objects_called = 0; @@ -1364,6 +1426,7 @@ MAKE_TEST(11,test_ray_and_box); MAKE_TEST(12,test_ray_and_ccylinder); MAKE_TEST(13,test_ray_and_plane); + MAKE_TEST(14,test_ray_and_cylinder); MAKE_TEST(100,test_dBoxTouchesBox); MAKE_TEST(101,test_dBoxBox); diff -Nru ode-0.11.1/ode/demo/demo_convex_cd.cpp ode-0.14/ode/demo/demo_convex_cd.cpp --- ode-0.11.1/ode/demo/demo_convex_cd.cpp 2008-10-02 20:59:35.000000000 +0000 +++ ode-0.14/ode/demo/demo_convex_cd.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,395 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include -#include -#include -#include "texturepath.h" - -#ifdef _MSC_VER -#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints -#endif - - -#ifndef M_PI -#define M_PI (3.14159265358979323846) -#endif - -//<---- Convex Object -dReal planes[]= // planes for a cube - { - 1.0f ,0.0f ,0.0f ,0.25f, - 0.0f ,1.0f ,0.0f ,0.25f, - 0.0f ,0.0f ,1.0f ,0.25f, - -1.0f,0.0f ,0.0f ,0.25f, - 0.0f ,-1.0f,0.0f ,0.25f, - 0.0f ,0.0f ,-1.0f,0.25f - /* - 1.0f ,0.0f ,0.0f ,2.0f, - 0.0f ,1.0f ,0.0f ,1.0f, - 0.0f ,0.0f ,1.0f ,1.0f, - 0.0f ,0.0f ,-1.0f,1.0f, - 0.0f ,-1.0f,0.0f ,1.0f, - -1.0f,0.0f ,0.0f ,0.0f - */ - }; -const unsigned int planecount=6; - -dReal points[]= // points for a cube - { - 0.25f,0.25f,0.25f, // point 0 - -0.25f,0.25f,0.25f, // point 1 - - 0.25f,-0.25f,0.25f, // point 2 - -0.25f,-0.25f,0.25f,// point 3 - - 0.25f,0.25f,-0.25f, // point 4 - -0.25f,0.25f,-0.25f,// point 5 - - 0.25f,-0.25f,-0.25f,// point 6 - -0.25f,-0.25f,-0.25f,// point 7 - }; -const unsigned int pointcount=8; -unsigned int polygons[] = //Polygons for a cube (6 squares) - { - 4,0,2,6,4, // positive X Side 0 - 4,1,0,4,5, // positive Y Side 1 - 4,0,1,3,2, // positive Z Side 2 - 4,3,1,5,7, // negative X Side 3 - 4,2,3,7,6, // negative Y Side 4 - 4,5,4,6,7, // negative Z Side 5 - }; -//----> Convex Object - -#ifdef dDOUBLE -#define dsDrawConvex dsDrawConvexD -#define dsDrawBox dsDrawBoxD -#endif - -dGeomID* geoms; -dGeomID boxes[2]; -dGeomID convex[2]; -dSpaceID space; -dWorldID world; -dJointGroupID contactgroup; -/* -glRotate Matrix: -( xx(1-c)+c xy(1-c)-zs xz(1-c)+ys 0 ) -| | -| yx(1-c)+zs yy(1-c)+c yz(1-c)-xs 0 | -| xz(1-c)-ys yz(1-c)+xs zz(1-c)+c 0 | -| | -( 0 0 0 1 ) -Where c = cos(angle), s = sine(angle), and ||( x,y,z )|| = 1 - (if not, the GL will normalize this vector). -*/ - -dVector3 geom1pos={0.0,0.250,0.50}; -dQuaternion geom1quat={1,0,0,0}; -dQuaternion geom0quat={0.7071,0,0.7071,0}; - -bool DumpInfo=true; -int drawmode = DS_WIREFRAME; - -#if 0 -const dReal fixed_pos_0[]={0.703704,-0.748281,0.249495}; -const dReal fixed_rot_0[]={0.996994,-0.001009,-0.077468,0.000000, - -0.077468,-0.000117,-0.996995,0.000000, - 0.000996, 1.000000,-0.000195,0.000000}; - -const dReal fixed_pos_1[]={0.894169,-0.372081,0.249432}; -const dReal fixed_rot_1[]={-0.999461, 0.032777,0.001829,0.000000, - -0.032777,-0.999463,0.000033,0.000000, - 0.001829,-0.000027,0.999998,0.000000}; - -#else -// for EDGE-EDGE test -const dReal fixed_pos_0[]={0.0,0.0,0.25}; -const dReal fixed_rot_0[]={ 1,0,0,0,0,1,0,0,0,0,1,0 }; -const dReal fixed_pos_1[]={0.000000,0.450000,0.600000}; -const dReal fixed_rot_1[]={0.708311,-0.705472,-0.000000,0.000000, - 0.516939,0.519297,-0.679785,0.000000, - 0.480067,0.481293,0.733034,0.000000}; -#endif -void start() -{ - // adjust the starting viewpoint a bit - float xyz[3],hpr[3]; - dsGetViewpoint (xyz,hpr); - hpr[0] += 7; - dsSetViewpoint (xyz,hpr); - convex[0]=dCreateConvex (space, - planes, - planecount, - points, - pointcount, - polygons); - convex[1]=dCreateConvex (space, - planes, - planecount, - points, - pointcount, - polygons); - boxes[0]=dCreateBox(space,0.5,0.5,0.5); - boxes[1]=dCreateBox(space,0.5,0.5,0.5); - geoms=convex; - - dMatrix3 m1 = { 1,0,0,0,0,1,0,0,0,0,1,0 }; - dMatrix3 m2 = { 1,0,0,0,0,1,0,0,0,0,1,0 }; -#if 0 - dGeomSetPosition (convex[0], - 0.0, - 0.0, - 0.25); - dGeomSetPosition (convex[1], - geom1pos[0], - geom1pos[1], - geom1pos[2]); - dQtoR (geom0quat, m1); - dGeomSetRotation (convex[0],m1); - dQtoR (geom1quat, m2); - dGeomSetRotation (convex[1],m2); - - dGeomSetPosition (boxes[0], - 0.0, - 0.0, - 0.25); - dGeomSetPosition (boxes[1], - geom1pos[0], - geom1pos[1], - geom1pos[2]); - dQtoR (geom0quat, m1); - dGeomSetRotation (boxes[0],m1); - dQtoR (geom1quat, m2); - dGeomSetRotation (boxes[1],m2); -#else - dGeomSetPosition (convex[0], - fixed_pos_0[0], - fixed_pos_0[1], - fixed_pos_0[2]); - dGeomSetPosition (convex[1], - fixed_pos_1[0], - fixed_pos_1[1], - fixed_pos_1[2]); - dGeomSetRotation (convex[0],fixed_rot_0); - dGeomSetRotation (convex[1],fixed_rot_1); - dGeomSetPosition (boxes[0], - fixed_pos_0[0], - fixed_pos_0[1], - fixed_pos_0[2]); - dGeomSetPosition (boxes[1], - fixed_pos_1[0], - fixed_pos_1[1], - fixed_pos_1[2]); - dGeomSetRotation (boxes[0],fixed_rot_0); - dGeomSetRotation (boxes[1],fixed_rot_1); -#endif - -} - -int dCollideConvexConvex (dxGeom *o1, dxGeom *o2, int flags, - dContactGeom *contact, int skip); -int dCollideBoxBox (dxGeom *o1, dxGeom *o2, int flags, - dContactGeom *contact, int skip); - -void simLoop (int pause) -{ - int contactcount; - const dReal ss[3] = {0.02,0.02,0.02}; - dContactGeom contacts[8]; -if(geoms==convex) - contactcount = dCollideConvexConvex(geoms[0],geoms[1],8,contacts,sizeof(dContactGeom)); -else - contactcount = dCollideBoxBox(geoms[0],geoms[1],8,contacts,sizeof(dContactGeom)); - - //fprintf(stdout,"Contact Count %d\n",contactcount); - const dReal* pos; - const dReal* R; - dsSetTexture (DS_WOOD); - pos = dGeomGetPosition (geoms[0]); - R = dGeomGetRotation (geoms[0]); - dsSetColor (0.6f,0.6f,1); - dsSetDrawMode(drawmode); - dsDrawConvex(pos,R,planes, - planecount, - points, - pointcount, - polygons); - dsSetDrawMode(DS_POLYFILL); - pos = dGeomGetPosition (geoms[1]); - R = dGeomGetRotation (geoms[1]); - dsSetColor (0.4f,1,1); - dsSetDrawMode(drawmode); - dsDrawConvex(pos,R,planes, - planecount, - points, - pointcount, - polygons); - dsSetDrawMode(DS_POLYFILL); - /*if (show_contacts) */ - dMatrix3 RI; - dRSetIdentity (RI); - dsSetColor (1.0f,0,0); - for(int i=0;i\n"); - } - else - { - printf("BOX--------------------------------------------------------->\n"); - } - break; - default: - dsPrint ("received command %d (`%c')\n",cmd,cmd); - } -#if 0 - dGeomSetPosition (geoms[1], - geom1pos[0], - geom1pos[1], - geom1pos[2]); - dQtoR (geom1quat, m); - dGeomSetRotation(geoms[1],m); - if(changed) - { - - printf("POS: %f,%f,%f\n",geom1pos[0],geom1pos[1],geom1pos[2]); - printf("ROT:\n%f,%f,%f,%f\n%f,%f,%f,%f\n%f,%f,%f,%f\n", - m[0],m[1],m[2],m[3], - m[4],m[5],m[6],m[7], - m[8],m[9],m[10],m[11]); - } -#endif - DumpInfo=true; -} - - -int main (int argc, char **argv) -{ - // setup pointers to callback functions - dsFunctions fn; - fn.version = DS_VERSION; - fn.start = &start; - fn.step = &simLoop; - fn.command = command; - fn.stop = 0; - fn.path_to_textures = DRAWSTUFF_TEXTURE_PATH; // uses default - world = dWorldCreate(); - space = dHashSpaceCreate (0); - contactgroup = dJointGroupCreate (0); - - // run simulation - dsSimulationLoop (argc,argv,400,400,&fn); - dJointGroupDestroy (contactgroup); - dSpaceDestroy (space); - dWorldDestroy (world); - - return 0; -} diff -Nru ode-0.11.1/ode/demo/demo_crash.cpp ode-0.14/ode/demo/demo_crash.cpp --- ode-0.11.1/ode/demo/demo_crash.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_crash.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -23,6 +23,7 @@ // This is a demo of the QuickStep and StepFast methods, // originally by David Whittaker. + #include #include #include "texturepath.h" @@ -41,10 +42,6 @@ #endif -// select the method you want to test here (only uncomment *one* line) -#define QUICKSTEP 1 -//#define STEPFAST 1 - // some constants #define LENGTH 3.5 // chassis length @@ -84,6 +81,8 @@ static dWorldID world; static dSpaceID space; +static dThreadingImplementationID threading; +static dThreadingThreadPoolID pool; static dBodyID body[10000]; static int bodies; static dJointID joint[100000]; @@ -115,7 +114,7 @@ // this is called by dSpaceCollide when two objects in space are // potentially colliding. -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { int i,n; @@ -165,8 +164,6 @@ "\t'2' to lower the cannon.\n" "\t'x' to shoot from the cannon.\n" "\t'f' to toggle fast step mode.\n" - "\t'+' to increase AutoEnableDepth.\n" - "\t'-' to decrease AutoEnableDepth.\n" "\t'r' to reset simulation.\n"); } @@ -234,19 +231,29 @@ sphereI += 4; } +static +void shutdownSimulation() +{ + // destroy world if it exists + if (bodies) + { + dThreadingImplementationShutdownProcessing(threading); + dThreadingFreeThreadPool(pool); + dWorldSetStepThreadingImplementation(world, NULL, NULL); + dThreadingFreeImplementation(threading); + + dJointGroupDestroy (contactgroup); + dSpaceDestroy (space); + dWorldDestroy (world); -void resetSimulation() + bodies = 0; + } +} + +static +void setupSimulation() { int i; - i = 0; - // destroy world if it exists - if (bodies) - { - dJointGroupDestroy (contactgroup); - dSpaceDestroy (space); - dWorldDestroy (world); - } - for (i = 0; i < 1000; i++) wb_stepsdis[i] = 0; @@ -263,6 +270,14 @@ dWorldSetCFM (world, 1e-5); dWorldSetERP (world, 0.8); dWorldSetQuickStepNumIterations (world,ITERS); + + threading = dThreadingAllocateMultiThreadedImplementation(); + pool = dThreadingAllocateThreadPool(4, 0, dAllocateFlagBasicData, NULL); + dThreadingThreadPoolServeMultiThreadedImplementation(pool, threading); + // dWorldSetStepIslandsProcessingMaxThreadCount(world, 1); + dWorldSetStepThreadingImplementation(world, dThreadingImplementationGetFunctions(threading), threading); + + ground = dCreatePlane (space,0,0,1,0); bodies = 0; @@ -451,14 +466,9 @@ case 'f': case 'F': doFast = !doFast; break; - case '+': - dWorldSetAutoEnableDepthSF1 (world, dWorldGetAutoEnableDepthSF1 (world) + 1); - break; - case '-': - dWorldSetAutoEnableDepthSF1 (world, dWorldGetAutoEnableDepthSF1 (world) - 1); - break; case 'r': case 'R': - resetSimulation(); + shutdownSimulation(); + setupSimulation(); break; case '[': cannon_angle += 0.1; @@ -515,11 +525,7 @@ if (doFast) { dSpaceCollide (space,0,&nearCallback); -#if defined(QUICKSTEP) dWorldQuickStep (world,0.05); -#elif defined(STEPFAST) - dWorldStepFast1 (world,0.05,ITERS); -#endif dJointGroupEmpty (contactgroup); } else @@ -625,14 +631,12 @@ boxes = 0; spheres = 0; - resetSimulation(); + setupSimulation(); // run simulation dsSimulationLoop (argc,argv,352,288,&fn); - dJointGroupDestroy (contactgroup); - dSpaceDestroy (space); - dWorldDestroy (world); + shutdownSimulation(); dCloseODE(); return 0; } diff -Nru ode-0.11.1/ode/demo/demo_cyl.cpp ode-0.14/ode/demo/demo_cyl.cpp --- ode-0.11.1/ode/demo/demo_cyl.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_cyl.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -74,7 +74,7 @@ if (dGeomIsSpace(o1) || dGeomIsSpace(o2)) { - fprintf(stderr,"testing space %p %p\n", o1,o2); + fprintf(stderr,"testing space %p %p\n", (void*)o1, (void*)o2); // colliding a space with something dSpaceCollide2(o1,o2,data,&nearCallback); // Note we do not want to test intersections within a space, diff -Nru ode-0.11.1/ode/demo/demo_cylvssphere.cpp ode-0.14/ode/demo/demo_cylvssphere.cpp --- ode-0.11.1/ode/demo/demo_cylvssphere.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_cylvssphere.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -1,240 +1,240 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -// Test for cylinder vs sphere, by Bram Stolk - -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#include "texturepath.h" - -#ifdef _MSC_VER -#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints -#endif - - -// dynamics and collision objects (chassis, 3 wheels, environment) - -static dWorldID world; -static dSpaceID space; - -static dBodyID cylbody; -static dGeomID cylgeom; - -static dBodyID sphbody; -static dGeomID sphgeom; - -static dJointGroupID contactgroup; - -static bool show_contacts = true; - -#define CYLRADIUS 0.6 -#define CYLLENGTH 2.0 -#define SPHERERADIUS 0.5 - - -#ifdef dDOUBLE -#define dsDrawBox dsDrawBoxD -#define dsDrawLine dsDrawLineD -#endif - - - -// this is called by dSpaceCollide when two objects in space are -// potentially colliding. - -static void nearCallback (void *data, dGeomID o1, dGeomID o2) -{ - assert(o1); - assert(o2); - - if (dGeomIsSpace(o1) || dGeomIsSpace(o2)) - { - fprintf(stderr,"testing space %p %p\n", o1,o2); - // colliding a space with something - dSpaceCollide2(o1,o2,data,&nearCallback); - // Note we do not want to test intersections within a space, - // only between spaces. - return; - } - - const int N = 32; - dContact contact[N]; - int n = dCollide (o1,o2,N,&(contact[0].geom),sizeof(dContact)); - if (n > 0) - { - for (int i=0; i +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include "texturepath.h" + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif + + +// dynamics and collision objects (chassis, 3 wheels, environment) + +static dWorldID world; +static dSpaceID space; + +static dBodyID cylbody; +static dGeomID cylgeom; + +static dBodyID sphbody; +static dGeomID sphgeom; + +static dJointGroupID contactgroup; + +static bool show_contacts = true; + +#define CYLRADIUS 0.6 +#define CYLLENGTH 2.0 +#define SPHERERADIUS 0.5 + + +#ifdef dDOUBLE +#define dsDrawBox dsDrawBoxD +#define dsDrawLine dsDrawLineD +#endif + + + +// this is called by dSpaceCollide when two objects in space are +// potentially colliding. + +static void nearCallback (void *data, dGeomID o1, dGeomID o2) +{ + assert(o1); + assert(o2); + + if (dGeomIsSpace(o1) || dGeomIsSpace(o2)) + { + fprintf(stderr,"testing space %p %p\n", (void*)o1, (void*)o2); + // colliding a space with something + dSpaceCollide2(o1,o2,data,&nearCallback); + // Note we do not want to test intersections within a space, + // only between spaces. + return; + } + + const int N = 32; + dContact contact[N]; + int n = dCollide (o1,o2,N,&(contact[0].geom),sizeof(dContact)); + if (n > 0) + { + for (int i=0; i +#include +#include "texturepath.h" + +#ifdef dDOUBLE +#define dsDrawSphere dsDrawSphereD +#define dsDrawBox dsDrawBoxD +#define dsDrawLine dsDrawLineD +#endif + + +dWorldID world; +dSpaceID space; +dBodyID body1; +dBodyID body2; +dJointID joint1, joint2; + +void start() +{ + world = dWorldCreate(); + dWorldSetGravity (world,0,0,-9.8); + + dWorldSetDamping(world, 1e-4, 1e-5); +// dWorldSetERP(world, 1); + + space = dSimpleSpaceCreate (0); + + body1 = dBodyCreate(world); + body2 = dBodyCreate(world); + + dBodySetPosition(body1, 0, 0, 3); + dBodySetPosition(body2, 0, 0, 1); + + + dGeomID g; + dMass mass; + + g = dCreateBox(space, 0.2, 0.2, 1); + dGeomSetBody(g, body1); + dMassSetBox(&mass, 1, 0.2, 0.2, 1); + dBodySetMass(body1, &mass); + + g = dCreateBox(space, 0.2, 0.2, 1); + dGeomSetBody(g, body2); + dMassSetBox(&mass, 1, 0.2, 0.2, 1); + dBodySetMass(body2, &mass); + + joint1 = dJointCreateDBall(world, 0); + dJointAttach(joint1, body1, 0); + dJointSetDBallAnchor1(joint1, 0, 0, 3.5); + dJointSetDBallAnchor2(joint1, 0, 0, 4.5); + + joint2 = dJointCreateDBall(world, 0); + dJointAttach(joint2, body1, body2); + dJointSetDBallAnchor1(joint2, 0, 0, 2.5); + dJointSetDBallAnchor2(joint2, 0, 0, 1.5); + + + // initial camera position + static float xyz[3] = {3.8966, -2.0614, 4.0300}; + static float hpr[3] = {153.5, -16.5, 0}; + dsSetViewpoint (xyz,hpr); +} + +void stop() +{ + dSpaceDestroy(space); + + dWorldDestroy(world); +} + + +void drawGeom(dGeomID g) +{ + int gclass = dGeomGetClass(g); + const dReal *pos = dGeomGetPosition(g); + const dReal *rot = dGeomGetRotation(g); + + switch (gclass) { + case dSphereClass: + dsSetColorAlpha(0, 0.75, 0.5, 1); + dsSetTexture (DS_CHECKERED); + dsDrawSphere(pos, rot, dGeomSphereGetRadius(g)); + break; + case dBoxClass: + { + dVector3 lengths; + dsSetColorAlpha(1, 1, 0, 1); + dsSetTexture (DS_WOOD); + dGeomBoxGetLengths(g, lengths); + dsDrawBox(pos, rot, lengths); + break; + } + + default: + {} + } +} + +void simLoop(int pause) +{ + if (!pause) { + + static dReal t = 0; + + const dReal step = 0.005; + const unsigned nsteps = 4; + + for (unsigned i=0; i +#include +#include "texturepath.h" + +#ifdef dDOUBLE +#define dsDrawSphere dsDrawSphereD +#define dsDrawBox dsDrawBoxD +#define dsDrawLine dsDrawLineD +#endif + + +dWorldID world; +dSpaceID space; +dBodyID body1; +dBodyID body2; +dJointID joint1, joint2; +bool applyForce = false; + +void start() +{ + world = dWorldCreate(); + dWorldSetGravity (world,0,0,-9.8); + + dWorldSetDamping(world, 1e-4, 1e-5); +// dWorldSetERP(world, 1); + + space = dSimpleSpaceCreate (0); + + body1 = dBodyCreate(world); + body2 = dBodyCreate(world); + + dBodySetPosition(body1, 0, 0, 3); + dBodySetPosition(body2, 0, 0, 1); + + + dGeomID g; + dMass mass; + + g = dCreateBox(space, 0.2, 0.2, 1); + dGeomSetBody(g, body1); + dMassSetBox(&mass, 1, 0.2, 0.2, 1); + dBodySetMass(body1, &mass); + + g = dCreateBox(space, 0.2, 0.2, 1); + dGeomSetBody(g, body2); + dMassSetBox(&mass, 1, 0.2, 0.2, 1); + dBodySetMass(body2, &mass); + +#if 1 + joint1 = dJointCreateDHinge(world, 0); + dJointAttach(joint1, body1, 0); + dJointSetDHingeAxis(joint1, 0, 1, 0); + dJointSetDHingeAnchor1(joint1, 0, 0, 3.5); + dJointSetDHingeAnchor2(joint1, 0, 0, 4.5); +#endif + +#if 1 + joint2 = dJointCreateDHinge(world, 0); + dJointAttach(joint2, body1, body2); + dJointSetDHingeAxis(joint2, 1, 0, 0); + dJointSetDHingeAnchor1(joint2, 0, 0, 2.5); + dJointSetDHingeAnchor2(joint2, 0, 0, 1.5); +#else + joint2 = dJointCreateDBall(world, 0); + dJointAttach(joint2, body1, body2); + dJointSetDBallAnchor1(joint2, 0, 0, 2.5); + dJointSetDBallAnchor2(joint2, 0, 0, 1.5); +#endif + + //dBodyAddForce(body1, 20, 0, 0); + + + // initial camera position + static float xyz[3] = {3.8966, -2.0614, 4.0300}; + static float hpr[3] = {153.5, -16.5, 0}; + dsSetViewpoint (xyz,hpr); +} + +void stop() +{ + dSpaceDestroy(space); + + dWorldDestroy(world); +} + + +void drawGeom(dGeomID g) +{ + int gclass = dGeomGetClass(g); + const dReal *pos = dGeomGetPosition(g); + const dReal *rot = dGeomGetRotation(g); + + switch (gclass) { + case dBoxClass: + { + dVector3 lengths; + if (applyForce) + dsSetColor(1, .5, 0); + else + dsSetColor(1, 1, 0); + dsSetTexture (DS_WOOD); + dGeomBoxGetLengths(g, lengths); + dsDrawBox(pos, rot, lengths); + break; + } + + default: + {} + } +} + + +void simLoop(int pause) +{ + if (!pause) { + + static dReal t = 0; + + const dReal step = 0.005; + const unsigned nsteps = 2; + + for (unsigned i=0; i 2.; + + if (applyForce) { + dReal f = 0.3 * sin(t*1.2); + dBodyAddForceAtRelPos(body1, + f, 0, 0, + 0, 0, -0.5); // at the lower end + + dReal g = 0.3 * sin(t*0.7); + dBodyAddForceAtRelPos(body2, + 0, g, 0, + 0, 0, -0.5); // at the lower end + } + + t += step; + if (t > 20.) + t = 0.; + + dWorldQuickStep(world, step); + } + } + + // now we draw everything + unsigned ngeoms = dSpaceGetNumGeoms(space); + for (unsigned i=0; i -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#include "texturepath.h" - - -#ifdef _MSC_VER -#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints -#endif - -#ifdef dDOUBLE -#define dsDrawBox dsDrawBoxD -#define dsDrawCylinder dsDrawCylinderD -#endif - - -// dynamics and collision objects (chassis, 3 wheels, environment) - -static dWorldID world; -static dSpaceID space; - -static const int STACKCNT=10; // nr of weights on bridge -static const int SEGMCNT=16; // nr of segments in bridge -static const float SEGMDIM[3] = { 0.9, 4, 0.1 }; - -static dGeomID groundgeom; -static dBodyID segbodies[SEGMCNT]; -static dGeomID seggeoms[SEGMCNT]; -static dBodyID stackbodies[STACKCNT]; -static dGeomID stackgeoms[STACKCNT]; -static dJointID hinges[SEGMCNT-1]; -static dJointID sliders[2]; -static dJointFeedback jfeedbacks[SEGMCNT-1]; -static dReal colours[SEGMCNT]; -static int stress[SEGMCNT-1]; - -static dJointGroupID contactgroup; - - -// this is called by dSpaceCollide when two objects in space are -// potentially colliding. - -static void nearCallback (void *data, dGeomID o1, dGeomID o2) -{ - assert(o1); - assert(o2); - - if (dGeomIsSpace(o1) || dGeomIsSpace(o2)) - { - fprintf(stderr,"testing space %p %p\n", o1,o2); - // colliding a space with something - dSpaceCollide2(o1,o2,data,&nearCallback); - // Note we do not want to test intersections within a space, - // only between spaces. - return; - } - - const int N = 32; - dContact contact[N]; - int n = dCollide (o1,o2,N,&(contact[0].geom),sizeof(dContact)); - if (n > 0) - { - for (int i=0; i forcelimit || l1 > forcelimit) - stress[i]++; - else - stress[i]=0; - if (stress[i]>4) - { - // Low-pass filter the noisy feedback data. - // Only after 4 consecutive timesteps with excessive load, snap. - fprintf(stderr,"SNAP! (that was the sound of joint %d breaking)\n", i); - dJointAttach (hinges[i], 0, 0); - } - } - } -} - - -// simulation loop - -static void simLoop (int pause) -{ - int i; - - double simstep = 0.002; // 2ms simulation steps - double dt = dsElapsedTime(); - int nrofsteps = (int) ceilf(dt/simstep); - for (i=0; i1.0) v=1.0; - if (v<0.5) - { - r=2*v; - g=1.0; - } - else - { - r=1.0; - g=2*(1.0-v); - } - dsSetColor (r,g,b); - drawGeom(seggeoms[i]); - } - dsSetColor (1,1,1); - for (i=0; i +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include "texturepath.h" + + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif + +#ifdef dDOUBLE +#define dsDrawBox dsDrawBoxD +#define dsDrawCylinder dsDrawCylinderD +#endif + + +// dynamics and collision objects (chassis, 3 wheels, environment) + +static dWorldID world; +static dSpaceID space; + +static const int STACKCNT=10; // nr of weights on bridge +static const int SEGMCNT=16; // nr of segments in bridge +static const float SEGMDIM[3] = { 0.9, 4, 0.1 }; + +static dGeomID groundgeom; +static dBodyID segbodies[SEGMCNT]; +static dGeomID seggeoms[SEGMCNT]; +static dBodyID stackbodies[STACKCNT]; +static dGeomID stackgeoms[STACKCNT]; +static dJointID hinges[SEGMCNT-1]; +static dJointID sliders[2]; +static dJointFeedback jfeedbacks[SEGMCNT-1]; +static dReal colours[SEGMCNT]; +static int stress[SEGMCNT-1]; + +static dJointGroupID contactgroup; + + +// this is called by dSpaceCollide when two objects in space are +// potentially colliding. + +static void nearCallback (void *data, dGeomID o1, dGeomID o2) +{ + assert(o1); + assert(o2); + + if (dGeomIsSpace(o1) || dGeomIsSpace(o2)) + { + fprintf(stderr,"testing space %p %p\n", (void*)o1, (void*)o2); + // colliding a space with something + dSpaceCollide2(o1,o2,data,&nearCallback); + // Note we do not want to test intersections within a space, + // only between spaces. + return; + } + + const int N = 32; + dContact contact[N]; + int n = dCollide (o1,o2,N,&(contact[0].geom),sizeof(dContact)); + if (n > 0) + { + for (int i=0; i forcelimit || l1 > forcelimit) + stress[i]++; + else + stress[i]=0; + if (stress[i]>4) + { + // Low-pass filter the noisy feedback data. + // Only after 4 consecutive timesteps with excessive load, snap. + fprintf(stderr,"SNAP! (that was the sound of joint %d breaking)\n", i); + dJointAttach (hinges[i], 0, 0); + } + } + } +} + + +// simulation loop + +static void simLoop (int pause) +{ + int i; + + double simstep = 0.002; // 2ms simulation steps + double dt = dsElapsedTime(); + int nrofsteps = (int) ceilf(dt/simstep); + for (i=0; i1.0) v=1.0; + if (v<0.5) + { + r=2*v; + g=1.0; + } + else + { + r=1.0; + g=2*(1.0-v); + } + dsSetColor (r,g,b); + drawGeom(seggeoms[i]); + } + dsSetColor (1,1,1); + for (i=0; i +#include +#include "texturepath.h" + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif + +// select correct drawing functions +#ifdef dDOUBLE +#define dsDrawBox dsDrawBoxD +#define dsDrawSphere dsDrawSphereD +#define dsDrawCylinder dsDrawCylinderD +#define dsDrawCapsule dsDrawCapsuleD +#endif + +// dynamics and collision objects +static dWorldID world = 0; + +static const dReal dt = 1/REAL(60.0); // 60 fps +// Water density if units are meters and kg +static const dReal density = 1000; + +// A long skinny thing +static dVector3 sides = {2,.5,.25}; +// Initial angular velocity +static dVector3 omega = {5,1,2}; +static dVector3 torque = {0,10,0}; +static dBodyID noGyroBody; +static dBodyID expGyroBody; +static dBodyID impGyroBody; + +// start simulation - set viewpoint + +static void start() +{ + dAllocateODEDataForThread(dAllocateMaskAll); + + static float xyz[3] = {0,-4.0f,3.0f}; + static float hpr[3] = {90.0000,-15.0000,0.0000}; + dsSetViewpoint (xyz,hpr); + printf ("Press:\n" + "\t'a' to apply a torque\n" + "\t'r' to reset simulation.\n"); +} + +/** + Delete the bodies, etc. +*/ +static void clear() +{ + if (world) dWorldDestroy (world); + world = 0; +} + + + +/** + Cleanup if necessary and rebuild the + world. +*/ +static void reset() +{ + clear(); + + // create world + world = dWorldCreate(); + + // Calculate mass for a box; + dMass boxMass; + dMassSetBox(&boxMass,density,sides[0],sides[1],sides[2]); + + noGyroBody = dBodyCreate(world);// Conservation of ang-velocity + expGyroBody = dBodyCreate(world);// Explicit conservation of ang-momentum + impGyroBody = dBodyCreate(world);// Implicit conservation of ang-momentum + + dBodySetMass( noGyroBody , &boxMass ); + dBodySetMass( expGyroBody, &boxMass ); + dBodySetMass( impGyroBody, &boxMass ); + + // Try to avoid collisions. + dReal sep = dCalcVectorLength3(sides); + dBodySetPosition( noGyroBody , -sep, 0, sep); + dBodySetPosition( expGyroBody, 0, 0, sep); + dBodySetPosition( impGyroBody, sep, 0, sep); + + // Set the initial angular velocity + dBodySetAngularVel( noGyroBody , omega[0], omega[1], omega[2]); + dBodySetAngularVel( expGyroBody, omega[0], omega[1], omega[2]); + dBodySetAngularVel( impGyroBody, omega[0], omega[1], omega[2]); + + dBodySetGyroscopicMode( noGyroBody, 0); + // We compute this ourselves using the math + // that was in the old stepper. + dBodySetGyroscopicMode(expGyroBody, 0); + // Keep things from crashing by limiting + // the angular speed of the explicit body. + // Note that this isn't necessary for + // the other two bodies. + dBodySetMaxAngularSpeed( expGyroBody, 40 ); +} + +static void command (int cmd) +{ + switch (cmd) { + case 'a': case 'A': + dBodyAddTorque( noGyroBody, torque[0], torque[1], torque[2]); + dBodyAddTorque(expGyroBody, torque[0], torque[1], torque[2]); + dBodyAddTorque(impGyroBody, torque[0], torque[1], torque[2]); + break; + case 'r': case 'R': + reset(); + break; + } + +} + +/** + This is the explicit computation of + gyroscopic forces. +*/ +static void expStep(dBodyID body) +{ + // Explicit computation + dMatrix3 I,tmp; + dMass m; + dBodyGetMass(body,&m); + const dReal* R = dBodyGetRotation(body); + // compute inertia tensor in global frame + dMultiply2_333 (tmp,m.I,R); + dMultiply0_333 (I,R,tmp); + // compute explicit rotational force + // we treat 'tmp'like a vector, but that's okay. + const dReal* w = dBodyGetAngularVel(body); + dMultiply0_331 (tmp,I,w); + dVector3 tau; + dCalcVectorCross3(tau,tmp,w); + dBodyAddTorque(body,tau[0],tau[1],tau[2]); +} + + +// simulation loop +static void simLoop (int pause) +{ + if (!pause) { + expStep(expGyroBody); + dWorldStep (world,dt); + } + + dsSetTexture (DS_WOOD); + dsSetColor(1,0,0); + dsDrawBox(dBodyGetPosition(noGyroBody ),dBodyGetRotation(noGyroBody ),sides); + dsSetColor(1,1,0); + dsDrawBox(dBodyGetPosition(expGyroBody),dBodyGetRotation(expGyroBody),sides); + dsSetColor(0,1,0); + dsDrawBox(dBodyGetPosition(impGyroBody),dBodyGetRotation(impGyroBody),sides); +} + + +int main (int argc, char **argv) +{ + // setup pointers to drawstuff callback functions + dsFunctions fn; + fn.version = DS_VERSION; + fn.start = &start; + fn.step = &simLoop; + fn.command = &command; + fn.stop = 0; + fn.path_to_textures = DRAWSTUFF_TEXTURE_PATH; + + dInitODE2(0); + reset(); + + // run simulation + dsSimulationLoop (argc,argv,352,288,&fn); + + clear(); + dCloseODE(); + return 0; +} diff -Nru ode-0.11.1/ode/demo/demo_gyroscopic.cpp ode-0.14/ode/demo/demo_gyroscopic.cpp --- ode-0.11.1/ode/demo/demo_gyroscopic.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_gyroscopic.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + #include #include #include "texturepath.h" @@ -31,7 +53,7 @@ #define MAX_CONTACTS 4 -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { // for drawing the contact points dMatrix3 RI; @@ -66,6 +88,9 @@ static float xyz[3] = {4.777f, -2.084f, 2.18f}; static float hpr[3] = {153.0f, -14.5f, 0.0f}; dsSetViewpoint (xyz,hpr); + printf ("Orange top approximates conservation of angular momentum\n"); + printf ("Green top uses conservation of angular velocity\n"); + printf ("---\n"); printf ("SPACE to reset\n"); printf ("A to tilt the tops.\n"); printf ("T to toggle showing the contact points.\n"); @@ -156,8 +181,8 @@ top1->setPosition(0.8f, -2, 2); top2->setPosition(0.8f, 2, 2); - top1->setAngularVel(0,0,5); - top2->setAngularVel(0,0,5); + top1->setAngularVel(1,0,7); + top2->setAngularVel(1,0,7); top1->setLinearVel(0,0.2f,0); top2->setLinearVel(0,0.2f,0); diff -Nru ode-0.11.1/ode/demo/demo_heightfield.cpp ode-0.14/ode/demo/demo_heightfield.cpp --- ode-0.11.1/ode/demo/demo_heightfield.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_heightfield.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -1,761 +1,713 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include -#include "texturepath.h" -#include "bunny_geom.h" - -#ifdef _MSC_VER -#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints -#endif - - -#define DEGTORAD 0.01745329251994329577f //!< PI / 180.0, convert degrees to radians - -int g_allow_trimesh; - -// Our heightfield geom -dGeomID gheight; - - - -// Heightfield dimensions - -#define HFIELD_WSTEP 15 // Vertex count along edge >= 2 -#define HFIELD_DSTEP 31 - -#define HFIELD_WIDTH REAL( 4.0 ) -#define HFIELD_DEPTH REAL( 8.0 ) - -#define HFIELD_WSAMP ( HFIELD_WIDTH / ( HFIELD_WSTEP-1 ) ) -#define HFIELD_DSAMP ( HFIELD_DEPTH / ( HFIELD_DSTEP-1 ) ) - - - -//<---- Convex Object -dReal planes[]= // planes for a cube - { - 1.0f ,0.0f ,0.0f ,0.25f, - 0.0f ,1.0f ,0.0f ,0.25f, - 0.0f ,0.0f ,1.0f ,0.25f, - 0.0f ,0.0f ,-1.0f,0.25f, - 0.0f ,-1.0f,0.0f ,0.25f, - -1.0f,0.0f ,0.0f ,0.25f - /* - 1.0f ,0.0f ,0.0f ,2.0f, - 0.0f ,1.0f ,0.0f ,1.0f, - 0.0f ,0.0f ,1.0f ,1.0f, - 0.0f ,0.0f ,-1.0f,1.0f, - 0.0f ,-1.0f,0.0f ,1.0f, - -1.0f,0.0f ,0.0f ,0.0f - */ - }; -const unsigned int planecount=6; - -dReal points[]= // points for a cube - { - 0.25f,0.25f,0.25f, // point 0 - -0.25f,0.25f,0.25f, // point 1 - - 0.25f,-0.25f,0.25f, // point 2 - -0.25f,-0.25f,0.25f,// point 3 - - 0.25f,0.25f,-0.25f, // point 4 - -0.25f,0.25f,-0.25f,// point 5 - - 0.25f,-0.25f,-0.25f,// point 6 - -0.25f,-0.25f,-0.25f,// point 7 - }; -const unsigned int pointcount=8; -unsigned int polygons[] = //Polygons for a cube (6 squares) - { - 4,0,2,6,4, // positive X - 4,1,0,4,5, // positive Y - 4,0,1,3,2, // positive Z - 4,3,1,5,7, // negative X - 4,2,3,7,6, // negative Y - 4,5,4,6,7, // negative Z - }; -//----> Convex Object - -// select correct drawing functions - -#ifdef dDOUBLE -#define dsDrawBox dsDrawBoxD -#define dsDrawSphere dsDrawSphereD -#define dsDrawCylinder dsDrawCylinderD -#define dsDrawCapsule dsDrawCapsuleD -#define dsDrawConvex dsDrawConvexD -#define dsDrawTriangle dsDrawTriangleD -#endif - - -// some constants - -#define NUM 100 // max number of objects -#define DENSITY (5.0) // density of all objects -#define GPB 3 // maximum number of geometries per body -#define MAX_CONTACTS 64 // maximum number of contact points per body - - -// dynamics and collision objects - -struct MyObject { - dBodyID body; // the body - dGeomID geom[GPB]; // geometries representing this body - - // Trimesh only - double buffered matrices for 'last transform' setup - dReal matrix_dblbuff[ 16 * 2 ]; - int last_matrix_index; -}; - -static int num=0; // number of objects in simulation -static int nextobj=0; // next object to recycle if num==NUM -static dWorldID world; -static dSpaceID space; -static MyObject obj[NUM]; -static dJointGroupID contactgroup; -static int selected = -1; // selected object -static int show_aabb = 0; // show geom AABBs? -static int show_contacts = 0; // show contact points? -static int random_pos = 1; // drop objects from random position? -static int write_world = 0; - - - - -//============================ - -dGeomID TriMesh1; -dGeomID TriMesh2; -//static dTriMeshDataID TriData1, TriData2; // reusable static trimesh data - -//============================ - - -dReal heightfield_callback( void* pUserData, int x, int z ) -{ - dIASSERT( x < HFIELD_WSTEP ); - dIASSERT( z < HFIELD_DSTEP ); - - dReal fx = ( ((dReal)x) - ( HFIELD_WSTEP-1 )/2 ) / (dReal)( HFIELD_WSTEP-1 ); - dReal fz = ( ((dReal)z) - ( HFIELD_DSTEP-1 )/2 ) / (dReal)( HFIELD_DSTEP-1 ); - - // Create an interesting 'hump' shape - dReal h = REAL( 1.0 ) + ( REAL( -16.0 ) * ( fx*fx*fx + fz*fz*fz ) ); - - return h; -} - - - - -// this is called by dSpaceCollide when two objects in space are -// potentially colliding. - -static void nearCallback (void *data, dGeomID o1, dGeomID o2) -{ - int i; - // if (o1->body && o2->body) return; - - // exit without doing anything if the two bodies are connected by a joint - dBodyID b1 = dGeomGetBody(o1); - dBodyID b2 = dGeomGetBody(o2); - if (b1 && b2 && dAreConnectedExcluding (b1,b2,dJointTypeContact)) return; - - dContact contact[MAX_CONTACTS]; // up to MAX_CONTACTS contacts per box-box - for (i=0; i= 'A' && c <= 'Z') return c - ('a'-'A'); - else return c; -} - - -// called when a key pressed - -static void command (int cmd) -{ - size_t i; - int j,k; - dReal sides[3]; - dMass m; - - cmd = locase (cmd); - - - // - // Geom Creation - // - - if ( cmd == 'b' || cmd == 's' || cmd == 'c' || ( cmd == 'm' && g_allow_trimesh ) || - cmd == 'x' || cmd == 'y' || cmd == 'v' ) - { - if ( num < NUM ) - { - i = num; - num++; - } - else - { - i = nextobj; - nextobj++; - if (nextobj >= num) nextobj = 0; - - // destroy the body and geoms for slot i - dBodyDestroy (obj[i].body); - for (k=0; k < GPB; k++) - { - if (obj[i].geom[k]) dGeomDestroy (obj[i].geom[k]); - } - memset (&obj[i],0,sizeof(obj[i])); - } - - obj[i].body = dBodyCreate (world); - for (k=0; k<3; k++) sides[k] = dRandReal()*0.5+0.1; - - dMatrix3 R; - if (random_pos) { - dBodySetPosition (obj[i].body, - (dRandReal()-0.5)*HFIELD_WIDTH*0.75, - (dRandReal()-0.5)*HFIELD_DEPTH*0.75, - dRandReal() + 2 ); - dRFromAxisAndAngle (R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, - dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); - } - else { - dReal maxheight = 0; - for (k=0; k maxheight) maxheight = pos[2]; - } - dBodySetPosition (obj[i].body, 0,maxheight+1,0); - dRFromAxisAndAngle (R,0,0,1,dRandReal()*10.0-5.0); - } - dBodySetRotation (obj[i].body,R); - dBodySetData (obj[i].body,(void*) i); - - if (cmd == 'b') - { - dMassSetBox (&m,DENSITY,sides[0],sides[1],sides[2]); - obj[i].geom[0] = dCreateBox (space,sides[0],sides[1],sides[2]); - } - else if (cmd == 'c') - { - sides[0] *= 0.5; - dMassSetCapsule (&m,DENSITY,3,sides[0],sides[1]); - obj[i].geom[0] = dCreateCapsule (space,sides[0],sides[1]); - } - //<---- Convex Object - else if (cmd == 'v') - { - dMassSetBox (&m,DENSITY,0.25,0.25,0.25); - obj[i].geom[0] = dCreateConvex (space, - planes, - planecount, - points, - pointcount, - polygons); - } - //----> Convex Object - else if (cmd == 'y') - { - dMassSetCylinder (&m,DENSITY,3,sides[0],sides[1]); - obj[i].geom[0] = dCreateCylinder (space,sides[0],sides[1]); - } - else if (cmd == 's') - { - sides[0] *= 0.5; - dMassSetSphere (&m,DENSITY,sides[0]); - obj[i].geom[0] = dCreateSphere (space,sides[0]); - } - else if (cmd == 'm' && g_allow_trimesh) - { - dTriMeshDataID new_tmdata = dGeomTriMeshDataCreate(); - dGeomTriMeshDataBuildSingle(new_tmdata, &Vertices[0], 3 * sizeof(float), VertexCount, - &Indices[0], IndexCount, 3 * sizeof(dTriIndex)); - - obj[i].geom[0] = dCreateTriMesh(space, new_tmdata, 0, 0, 0); - - dMassSetTrimesh( &m, DENSITY, obj[i].geom[0] ); - printf("mass at %f %f %f\n", m.c[0], m.c[1], m.c[2]); - dGeomSetPosition(obj[i].geom[0], -m.c[0], -m.c[1], -m.c[2]); - dMassTranslate(&m, -m.c[0], -m.c[1], -m.c[2]); - } - else if (cmd == 'x') - { - dGeomID g2[GPB]; // encapsulated geometries - dReal dpos[GPB][3]; // delta-positions for encapsulated geometries - - // start accumulating masses for the encapsulated geometries - dMass m2; - dMassSetZero (&m); - - // set random delta positions - for (j=0; j= num) selected = 0; - if (selected < 0) selected = 0; - } - else if (cmd == 'd' && selected >= 0 && selected < num) { - dBodyDisable (obj[selected].body); - } - else if (cmd == 'e' && selected >= 0 && selected < num) { - dBodyEnable (obj[selected].body); - } - else if (cmd == 'a') { - show_aabb ^= 1; - } - else if (cmd == 't') { - show_contacts ^= 1; - } - else if (cmd == 'r') { - random_pos ^= 1; - } - else if (cmd == '1') { - write_world = 1; - } -} - - -// draw a geom - -void drawGeom (dGeomID g, const dReal *pos, const dReal *R, int show_aabb) -{ - int i; - - if (!g) return; - if (!pos) pos = dGeomGetPosition (g); - if (!R) R = dGeomGetRotation (g); - - int type = dGeomGetClass (g); - if (type == dBoxClass) { - dVector3 sides; - dGeomBoxGetLengths (g,sides); - dsDrawBox (pos,R,sides); - } - else if (type == dSphereClass) { - dsDrawSphere (pos,R,dGeomSphereGetRadius (g)); - } - else if (type == dCapsuleClass) { - dReal radius,length; - dGeomCapsuleGetParams (g,&radius,&length); - dsDrawCapsule (pos,R,length,radius); - } - //<---- Convex Object - else if (type == dConvexClass) - { - //dVector3 sides={0.50,0.50,0.50}; - dsDrawConvex(pos,R,planes, - planecount, - points, - pointcount, - polygons); - } - //----> Convex Object - else if (type == dCylinderClass) { - dReal radius,length; - dGeomCylinderGetParams (g,&radius,&length); - dsDrawCylinder (pos,R,length,radius); - } - else if (type == dGeomTransformClass) { - dGeomID g2 = dGeomTransformGetGeom (g); - const dReal *pos2 = dGeomGetPosition (g2); - const dReal *R2 = dGeomGetRotation (g2); - dVector3 actual_pos; - dMatrix3 actual_R; - dMULTIPLY0_331 (actual_pos,R,pos2); - actual_pos[0] += pos[0]; - actual_pos[1] += pos[1]; - actual_pos[2] += pos[2]; - dMULTIPLY0_333 (actual_R,R,R2); - drawGeom (g2,actual_pos,actual_R,0); - } - - if (show_aabb) { - // draw the bounding box for this geom - dReal aabb[6]; - dGeomGetAABB (g,aabb); - dVector3 bbpos; - for (i=0; i<3; i++) bbpos[i] = 0.5*(aabb[i*2] + aabb[i*2+1]); - dVector3 bbsides; - for (i=0; i<3; i++) bbsides[i] = aabb[i*2+1] - aabb[i*2]; - dMatrix3 RI; - dRSetIdentity (RI); - dsSetColorAlpha (1,0,0,0.5); - dsDrawBox (bbpos,RI,bbsides); - } - -} - -// simulation loop - -static void simLoop (int pause) -{ - int i,j; - - dsSetColor (0,0,2); - - dSpaceCollide (space,0,&nearCallback); - - //if (!pause) dWorldStep (world,0.05); - //if (!pause) dWorldQuickStep (world,0.05); - if (!pause) dWorldStepFast1 (world,0.05, 5); - - - if (write_world) { - FILE *f = fopen ("state.dif","wt"); - if (f) { - dWorldExportDIF (world,f,"X"); - fclose (f); - } - write_world = 0; - } - - // remove all contact joints - dJointGroupEmpty (contactgroup); - - - - const dReal* pReal = dGeomGetPosition( gheight ); - - const dReal* RReal = dGeomGetRotation( gheight ); - - // - // Draw Heightfield - // - - // Set ox and oz to zero for DHEIGHTFIELD_CORNER_ORIGIN mode. - int ox = (int) ( -HFIELD_WIDTH/2 ); - int oz = (int) ( -HFIELD_DEPTH/2 ); - -// for ( int tx = -1; tx < 2; ++tx ) -// for ( int tz = -1; tz < 2; ++tz ) - { - dsSetColorAlpha (0.5,1,0.5,0.5); - dsSetTexture( DS_WOOD ); - - for ( int i = 0; i < HFIELD_WSTEP - 1; ++i ) - for ( int j = 0; j < HFIELD_DSTEP - 1; ++j ) - { - dReal a[3], b[3], c[3], d[3]; - - a[ 0 ] = ox + ( i ) * HFIELD_WSAMP; - a[ 1 ] = heightfield_callback( NULL, i, j ); - a[ 2 ] = oz + ( j ) * HFIELD_DSAMP; - - b[ 0 ] = ox + ( i + 1 ) * HFIELD_WSAMP; - b[ 1 ] = heightfield_callback( NULL, i + 1, j ); - b[ 2 ] = oz + ( j ) * HFIELD_DSAMP; - - c[ 0 ] = ox + ( i ) * HFIELD_WSAMP; - c[ 1 ] = heightfield_callback( NULL, i, j + 1 ); - c[ 2 ] = oz + ( j + 1 ) * HFIELD_DSAMP; - - d[ 0 ] = ox + ( i + 1 ) * HFIELD_WSAMP; - d[ 1 ] = heightfield_callback( NULL, i + 1, j + 1 ); - d[ 2 ] = oz + ( j + 1 ) * HFIELD_DSAMP; - - dsDrawTriangle( pReal, RReal, a, c, b, 1 ); - dsDrawTriangle( pReal, RReal, b, c, d, 1 ); - } - } - - - - - - dsSetColor (1,1,0); - dsSetTexture (DS_WOOD); - for (i=0; i +#include +#include "texturepath.h" +#include "bunny_geom.h" + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif + + +#define DEGTORAD 0.01745329251994329577f //!< PI / 180.0, convert degrees to radians + +int g_allow_trimesh; + +// Our heightfield geom +dGeomID gheight; + + + +// Heightfield dimensions + +#define HFIELD_WSTEP 15 // Vertex count along edge >= 2 +#define HFIELD_DSTEP 31 + +#define HFIELD_WIDTH REAL( 4.0 ) +#define HFIELD_DEPTH REAL( 8.0 ) + +#define HFIELD_WSAMP ( HFIELD_WIDTH / ( HFIELD_WSTEP-1 ) ) +#define HFIELD_DSAMP ( HFIELD_DEPTH / ( HFIELD_DSTEP-1 ) ) + + + +//<---- Convex Object +dReal planes[]= // planes for a cube + { + 1.0f ,0.0f ,0.0f ,0.25f, + 0.0f ,1.0f ,0.0f ,0.25f, + 0.0f ,0.0f ,1.0f ,0.25f, + 0.0f ,0.0f ,-1.0f,0.25f, + 0.0f ,-1.0f,0.0f ,0.25f, + -1.0f,0.0f ,0.0f ,0.25f + /* + 1.0f ,0.0f ,0.0f ,2.0f, + 0.0f ,1.0f ,0.0f ,1.0f, + 0.0f ,0.0f ,1.0f ,1.0f, + 0.0f ,0.0f ,-1.0f,1.0f, + 0.0f ,-1.0f,0.0f ,1.0f, + -1.0f,0.0f ,0.0f ,0.0f + */ + }; +const unsigned int planecount=6; + +dReal points[]= // points for a cube + { + 0.25f,0.25f,0.25f, // point 0 + -0.25f,0.25f,0.25f, // point 1 + + 0.25f,-0.25f,0.25f, // point 2 + -0.25f,-0.25f,0.25f,// point 3 + + 0.25f,0.25f,-0.25f, // point 4 + -0.25f,0.25f,-0.25f,// point 5 + + 0.25f,-0.25f,-0.25f,// point 6 + -0.25f,-0.25f,-0.25f,// point 7 + }; +const unsigned int pointcount=8; +unsigned int polygons[] = //Polygons for a cube (6 squares) + { + 4,0,2,6,4, // positive X + 4,1,0,4,5, // positive Y + 4,0,1,3,2, // positive Z + 4,3,1,5,7, // negative X + 4,2,3,7,6, // negative Y + 4,5,4,6,7, // negative Z + }; +//----> Convex Object + +// select correct drawing functions + +#ifdef dDOUBLE +#define dsDrawBox dsDrawBoxD +#define dsDrawSphere dsDrawSphereD +#define dsDrawCylinder dsDrawCylinderD +#define dsDrawCapsule dsDrawCapsuleD +#define dsDrawConvex dsDrawConvexD +#define dsDrawTriangle dsDrawTriangleD +#endif + + +// some constants + +#define NUM 100 // max number of objects +#define DENSITY (5.0) // density of all objects +#define GPB 3 // maximum number of geometries per body +#define MAX_CONTACTS 64 // maximum number of contact points per body + + +// dynamics and collision objects + +struct MyObject { + dBodyID body; // the body + dGeomID geom[GPB]; // geometries representing this body + + // Trimesh only - double buffered matrices for 'last transform' setup + dReal matrix_dblbuff[ 16 * 2 ]; + int last_matrix_index; +}; + +static int num=0; // number of objects in simulation +static int nextobj=0; // next object to recycle if num==NUM +static dWorldID world; +static dSpaceID space; +static MyObject obj[NUM]; +static dJointGroupID contactgroup; +static int selected = -1; // selected object +static int show_aabb = 0; // show geom AABBs? +static int show_contacts = 0; // show contact points? +static int random_pos = 1; // drop objects from random position? +static int write_world = 0; + + + + +//============================ + +dGeomID TriMesh1; +dGeomID TriMesh2; +//static dTriMeshDataID TriData1, TriData2; // reusable static trimesh data + +//============================ + + +dReal heightfield_callback( void*, int x, int z ) +{ + dReal fx = ( ((dReal)x) - ( HFIELD_WSTEP-1 )/2 ) / (dReal)( HFIELD_WSTEP-1 ); + dReal fz = ( ((dReal)z) - ( HFIELD_DSTEP-1 )/2 ) / (dReal)( HFIELD_DSTEP-1 ); + + // Create an interesting 'hump' shape + dReal h = REAL( 1.0 ) + ( REAL( -16.0 ) * ( fx*fx*fx + fz*fz*fz ) ); + + return h; +} + + + + +// this is called by dSpaceCollide when two objects in space are +// potentially colliding. + +static void nearCallback (void *, dGeomID o1, dGeomID o2) +{ + int i; + // if (o1->body && o2->body) return; + + // exit without doing anything if the two bodies are connected by a joint + dBodyID b1 = dGeomGetBody(o1); + dBodyID b2 = dGeomGetBody(o2); + if (b1 && b2 && dAreConnectedExcluding(b1,b2,dJointTypeContact)) + return; + + dContact contact[MAX_CONTACTS]; // up to MAX_CONTACTS contacts per box-box + for (i=0; i= 'A' && c <= 'Z') return c - ('a'-'A'); + else return c; +} + + +// called when a key pressed + +static void command(int cmd) +{ + size_t i; + int j,k; + dReal sides[3]; + dMass m; + bool setBody = false; + + cmd = locase (cmd); + + + // + // Geom Creation + // + + if ( cmd == 'b' || cmd == 's' || cmd == 'c' || ( cmd == 'm' && g_allow_trimesh ) || + cmd == 'x' || cmd == 'y' || cmd == 'v' ) { + + if ( num < NUM ) { + i = num; + num++; + } else { + i = nextobj++; + nextobj %= num; + + // destroy the body and geoms for slot i + dBodyDestroy(obj[i].body); + obj[i].body = 0; + + for (k=0; k < GPB; k++) + if (obj[i].geom[k]) { + dGeomDestroy(obj[i].geom[k]); + obj[i].geom[k] = 0; + } + } + + obj[i].body = dBodyCreate(world); + for (k=0; k<3; k++) + sides[k] = dRandReal()*0.5+0.1; + + dMatrix3 R; + if (random_pos) { + dBodySetPosition(obj[i].body, + (dRandReal()-0.5)*HFIELD_WIDTH*0.75, + (dRandReal()-0.5)*HFIELD_DEPTH*0.75, + dRandReal() + 2 ); + dRFromAxisAndAngle(R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, + dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); + } else { + dReal maxheight = 0; + for (k=0; k maxheight) + maxheight = pos[2]; + } + dBodySetPosition(obj[i].body, 0,maxheight+1,0); + dRFromAxisAndAngle(R,0,0,1,dRandReal()*10.0-5.0); + } + + dBodySetRotation(obj[i].body,R); + + if (cmd == 'b') { + + dMassSetBox(&m,DENSITY,sides[0],sides[1],sides[2]); + obj[i].geom[0] = dCreateBox(space,sides[0],sides[1],sides[2]); + + } else if (cmd == 'c') { + + sides[0] *= 0.5; + dMassSetCapsule(&m,DENSITY,3,sides[0],sides[1]); + obj[i].geom[0] = dCreateCapsule(space,sides[0],sides[1]); + + } else if (cmd == 'v') { + + dMassSetBox (&m,DENSITY,0.25,0.25,0.25); + obj[i].geom[0] = dCreateConvex(space, + planes, + planecount, + points, + pointcount, + polygons); + + } else if (cmd == 'y') { + + dMassSetCylinder(&m,DENSITY,3,sides[0],sides[1]); + obj[i].geom[0] = dCreateCylinder(space,sides[0],sides[1]); + + } else if (cmd == 's') { + + sides[0] *= 0.5; + dMassSetSphere(&m,DENSITY,sides[0]); + obj[i].geom[0] = dCreateSphere(space,sides[0]); + + } else if (cmd == 'm' && g_allow_trimesh) { + + dTriMeshDataID new_tmdata = dGeomTriMeshDataCreate(); + dGeomTriMeshDataBuildSingle(new_tmdata, &Vertices[0], 3 * sizeof(float), VertexCount, + &Indices[0], IndexCount, 3 * sizeof(dTriIndex)); + + obj[i].geom[0] = dCreateTriMesh(space, new_tmdata, 0, 0, 0); + + dMassSetTrimesh( &m, DENSITY, obj[i].geom[0] ); + printf("mass at %f %f %f\n", m.c[0], m.c[1], m.c[2]); + dGeomSetPosition(obj[i].geom[0], -m.c[0], -m.c[1], -m.c[2]); + dMassTranslate(&m, -m.c[0], -m.c[1], -m.c[2]); + + } else if (cmd == 'x') { + + setBody = 1; + // start accumulating masses for the composite geometries + dMass m2; + dMassSetZero (&m); + + dReal dpos[GPB][3]; // delta-positions for composite geometries + dMatrix3 drot[GPB]; + + // set random delta positions + for (j=0; j= num) + selected = 0; + if (selected < -1) + selected = 0; + + } else if (cmd == 'd' && selected >= 0 && selected < num) { + + dBodyDisable(obj[selected].body); + + } else if (cmd == 'e' && selected >= 0 && selected < num) { + + dBodyEnable(obj[selected].body); + + } else if (cmd == 'a') { + + show_aabb = !show_aabb; + + } else if (cmd == 't') { + + show_contacts = !show_contacts; + + } else if (cmd == 'r') { + + random_pos = !random_pos; + + } else if (cmd == '1') { + + write_world = 1; + + } +} + + +// draw a geom + +void drawGeom (dGeomID g, const dReal *pos, const dReal *R, int show_aabb) +{ + if (!g) + return; + if (!pos) + pos = dGeomGetPosition(g); + if (!R) + R = dGeomGetRotation(g); + + int type = dGeomGetClass(g); + if (type == dBoxClass) { + + dVector3 sides; + dGeomBoxGetLengths(g,sides); + dsDrawBox(pos,R,sides); + + } else if (type == dSphereClass) { + + dsDrawSphere(pos,R,dGeomSphereGetRadius(g)); + + } else if (type == dCapsuleClass) { + + dReal radius,length; + dGeomCapsuleGetParams(g,&radius,&length); + dsDrawCapsule(pos,R,length,radius); + + } else if (type == dConvexClass) { + + //dVector3 sides={0.50,0.50,0.50}; + dsDrawConvex(pos,R,planes, + planecount, + points, + pointcount, + polygons); + + } else if (type == dCylinderClass) { + + dReal radius,length; + dGeomCylinderGetParams(g,&radius,&length); + dsDrawCylinder(pos,R,length,radius); + + } else if (type == dTriMeshClass) { + + dTriIndex* Indices = (dTriIndex*)::Indices; + + // assume all trimeshes are drawn as bunnies + for (int ii = 0; ii < IndexCount / 3; ii++) { + const dReal v[9] = { // explicit conversion from float to dReal + Vertices[Indices[ii * 3 + 0] * 3 + 0], + Vertices[Indices[ii * 3 + 0] * 3 + 1], + Vertices[Indices[ii * 3 + 0] * 3 + 2], + Vertices[Indices[ii * 3 + 1] * 3 + 0], + Vertices[Indices[ii * 3 + 1] * 3 + 1], + Vertices[Indices[ii * 3 + 1] * 3 + 2], + Vertices[Indices[ii * 3 + 2] * 3 + 0], + Vertices[Indices[ii * 3 + 2] * 3 + 1], + Vertices[Indices[ii * 3 + 2] * 3 + 2] + }; + dsDrawTriangle(pos, R, &v[0], &v[3], &v[6], 1); + } + + } else if (type == dHeightfieldClass) { + + // Set ox and oz to zero for DHEIGHTFIELD_CORNER_ORIGIN mode. + int ox = (int) ( -HFIELD_WIDTH/2 ); + int oz = (int) ( -HFIELD_DEPTH/2 ); + + // for ( int tx = -1; tx < 2; ++tx ) + // for ( int tz = -1; tz < 2; ++tz ) + dsSetColorAlpha (0.5,1,0.5,0.5); + dsSetTexture( DS_WOOD ); + + for ( int i = 0; i < HFIELD_WSTEP - 1; ++i ) + for ( int j = 0; j < HFIELD_DSTEP - 1; ++j ) { + dReal a[3], b[3], c[3], d[3]; + + a[ 0 ] = ox + ( i ) * HFIELD_WSAMP; + a[ 1 ] = heightfield_callback( NULL, i, j ); + a[ 2 ] = oz + ( j ) * HFIELD_DSAMP; + + b[ 0 ] = ox + ( i + 1 ) * HFIELD_WSAMP; + b[ 1 ] = heightfield_callback( NULL, i + 1, j ); + b[ 2 ] = oz + ( j ) * HFIELD_DSAMP; + + c[ 0 ] = ox + ( i ) * HFIELD_WSAMP; + c[ 1 ] = heightfield_callback( NULL, i, j + 1 ); + c[ 2 ] = oz + ( j + 1 ) * HFIELD_DSAMP; + + d[ 0 ] = ox + ( i + 1 ) * HFIELD_WSAMP; + d[ 1 ] = heightfield_callback( NULL, i + 1, j + 1 ); + d[ 2 ] = oz + ( j + 1 ) * HFIELD_DSAMP; + + dsDrawTriangle( pos, R, a, c, b, 1 ); + dsDrawTriangle( pos, R, b, c, d, 1 ); + } + + } + + if (show_aabb) { + // draw the bounding box for this geom + dReal aabb[6]; + dGeomGetAABB(g,aabb); + dVector3 bbpos; + for (int i=0; i<3; i++) + bbpos[i] = 0.5*(aabb[i*2] + aabb[i*2+1]); + dVector3 bbsides; + for (int i=0; i<3; i++) + bbsides[i] = aabb[i*2+1] - aabb[i*2]; + dMatrix3 RI; + dRSetIdentity(RI); + dsSetColorAlpha(1,0,0,0.5); + dsDrawBox(bbpos,RI,bbsides); + } + +} + +// simulation loop + +static void simLoop (int pause) +{ + int i,j; + + dSpaceCollide(space,0,&nearCallback); + + if (!pause) + dWorldQuickStep(world,0.05); + + + if (write_world) { + FILE *f = fopen ("state.dif","wt"); + if (f) { + dWorldExportDIF(world,f,"X"); + fclose (f); + } + write_world = 0; + } + + // remove all contact joints + dJointGroupEmpty(contactgroup); + + + + // + // Draw Heightfield + // + + drawGeom(gheight, 0, 0, 0); + + + + dsSetColor (1,1,0); + dsSetTexture (DS_WOOD); + for (i=0; i -#include -#include -#include -#include "texturepath.h" - - -#ifdef _MSC_VER -#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints -#endif -// select correct drawing functions -#ifdef dDOUBLE -#define dsDrawBox dsDrawBoxD -#endif - - -// physics parameters -#define BOX1_LENGTH 2 // Size along the X axis -#define BOX1_WIDTH 1 // Size along the Y axis -#define BOX1_HEIGHT 0.4 // Size along the Z axis (up) since gravity is (0,0,-10) -#define BOX2_LENGTH 0.2 -#define BOX2_WIDTH 0.1 -#define BOX2_HEIGHT 0.4 -#define Mass1 10 -#define Mass2 0.1 - - -#define PRISMATIC_ONLY 1 -#define ROTOIDE_ONLY 2 -int flag = 0; - - -//camera view -static float xyz[3] = {2.0f,-3.5f,2.0000f}; -static float hpr[3] = {90.000f,-25.5000f,0.0000f}; -//world,space,body & geom -static dWorldID world; -static dSpaceID space; -static dSpaceID box1_space; -static dBodyID box1_body[1]; -static dBodyID box2_body[1]; -static dJointID joint[1]; -static dJointGroupID contactgroup; -static dGeomID ground; -static dGeomID box1[1]; -static dGeomID box2[1]; - - -//collision detection -static void nearCallback (void *data, dGeomID o1, dGeomID o2) -{ - int i,n; - - dBodyID b1 = dGeomGetBody(o1); - dBodyID b2 = dGeomGetBody(o2); - if (b1 && b2 && dAreConnectedExcluding (b1,b2,dJointTypeContact)) return; - const int N = 10; - dContact contact[N]; - n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact)); - if (n > 0) - { - for (i=0; i= 2 ) - { - for (int i=1; i < argc; ++i) - { - if ( 0 == strcmp("-h", argv[i]) || 0 == strcmp("--help", argv[i]) ) - Help(argv); - - if (!flag && (0 == strcmp("-p", argv[i]) ||0 == strcmp("--prismatic-only", argv[i])) ) - flag = PRISMATIC_ONLY; - - if (!flag && (0 == strcmp("-r", argv[i]) || 0 == strcmp("--rotoide-only", argv[i])) ) - flag = ROTOIDE_ONLY; - - if (0 == strcmp("-t", argv[i]) || 0 == strcmp("--texture-path", argv[i])) - { - int j = i+1; - if ( j+1 > argc || // Check if we have enough arguments - argv[j] == '\0' || // We should have a path here - argv[j][0] == '-' ) // We should have a path not a command line - Help(argv); - else - fn.path_to_textures = argv[++i]; // Increase i since we use this argument - } - } - } - - dInitODE2(0); - - // create world - world = dWorldCreate(); - space = dHashSpaceCreate (0); - contactgroup = dJointGroupCreate (0); - dWorldSetGravity (world,0,0,-10); - ground = dCreatePlane (space,0,0,1,0); - - //create two boxes - dMass m; - box1_body[0] = dBodyCreate (world); - dMassSetBox (&m,1,BOX1_LENGTH,BOX1_WIDTH,BOX1_HEIGHT); - dMassAdjust (&m,Mass1); - dBodySetMass (box1_body[0],&m); - box1[0] = dCreateBox (0,BOX1_LENGTH,BOX1_WIDTH,BOX1_HEIGHT); - dGeomSetBody (box1[0],box1_body[0]); - - box2_body[0] = dBodyCreate (world); - dMassSetBox (&m,10,BOX2_LENGTH,BOX2_WIDTH,BOX2_HEIGHT); - dMassAdjust (&m,Mass2); - dBodySetMass (box2_body[0],&m); - box2[0] = dCreateBox (0,BOX2_LENGTH,BOX2_WIDTH,BOX2_HEIGHT); - dGeomSetBody (box2[0],box2_body[0]); - - //set the initial positions of body1 and body2 - dMatrix3 R; - dRSetIdentity(R); - dBodySetPosition (box1_body[0],0,0,BOX1_HEIGHT/2.0); - dBodySetRotation (box1_body[0], R); - - dBodySetPosition (box2_body[0], - 2.1, - 0.0, - BOX2_HEIGHT/2.0); - dBodySetRotation (box2_body[0], R); - - - //set PR joint - joint[0] = dJointCreatePR(world,0); - dJointAttach (joint[0],box1_body[0],box2_body[0]); - switch (flag) - { - case PRISMATIC_ONLY: - dJointSetPRAnchor (joint[0], - 2.1, - 0.0, - BOX2_HEIGHT/2.0); - dJointSetPRParam (joint[0],dParamLoStop, -0.5); - dJointSetPRParam (joint[0],dParamHiStop, 1.5); - break; - - case ROTOIDE_ONLY: - dJointSetPRAnchor (joint[0], - 0.0, - 0.0, - BOX2_HEIGHT/2.0); - dJointSetPRParam (joint[0],dParamLoStop, 0.0); - dJointSetPRParam (joint[0],dParamHiStop, 0.0); - break; - - default: - dJointSetPRAnchor (joint[0], - 1.1, - 0.0, - BOX2_HEIGHT/2.0); - dJointSetPRParam (joint[0],dParamLoStop, -0.5); - dJointSetPRParam (joint[0],dParamHiStop, 1.5); - break; - } - - dJointSetPRAxis1(joint[0],1,0,0); - dJointSetPRAxis2(joint[0],0,0,1); -// We position the 2 body -// The position of the rotoide joint is on the second body so it can rotate on itself -// and move along the X axis. -// With this anchor -// - A force in X will move only the body 2 inside the low and hi limit -// of the prismatic -// - A force in Y will make the 2 bodies to rotate around on the plane - - box1_space = dSimpleSpaceCreate (space); - dSpaceSetCleanup (box1_space,0); - dSpaceAdd(box1_space,box1[0]); - - // run simulation - dsSimulationLoop (argc,argv,400,300,&fn); - dJointGroupDestroy (contactgroup); - dSpaceDestroy (space); - dWorldDestroy (world); - dCloseODE(); - return 0; -} - +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +/* + +This file try to demonstrate how the PR joint is working. + +The axisP is draw in red and the axisR is in green + +*/ + + +#include +#include +#include +#include +#include "texturepath.h" + + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif +// select correct drawing functions +#ifdef dDOUBLE +#define dsDrawBox dsDrawBoxD +#endif + + +// physics parameters +#define BOX1_LENGTH 2 // Size along the X axis +#define BOX1_WIDTH 1 // Size along the Y axis +#define BOX1_HEIGHT 0.4 // Size along the Z axis (up) since gravity is (0,0,-10) +#define BOX2_LENGTH 0.2 +#define BOX2_WIDTH 0.1 +#define BOX2_HEIGHT 0.4 +#define Mass1 10 +#define Mass2 0.1 + + +#define PRISMATIC_ONLY 1 +#define ROTOIDE_ONLY 2 +int flag = 0; + + +//camera view +static float xyz[3] = {2.0f,-3.5f,2.0000f}; +static float hpr[3] = {90.000f,-25.5000f,0.0000f}; +//world,space,body & geom +static dWorldID world; +static dSpaceID space; +static dSpaceID box1_space; +static dBodyID box1_body[1]; +static dBodyID box2_body[1]; +static dJointID joint[1]; +static dJointGroupID contactgroup; +static dGeomID ground; +static dGeomID box1[1]; +static dGeomID box2[1]; + + +//collision detection +static void nearCallback (void *, dGeomID o1, dGeomID o2) +{ + int i,n; + + dBodyID b1 = dGeomGetBody(o1); + dBodyID b2 = dGeomGetBody(o2); + if (b1 && b2 && dAreConnectedExcluding (b1,b2,dJointTypeContact)) return; + const int N = 10; + dContact contact[N]; + n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact)); + if (n > 0) + { + for (i=0; i= 2 ) + { + for (int i=1; i < argc; ++i) + { + if ( 0 == strcmp("-h", argv[i]) || 0 == strcmp("--help", argv[i]) ) + Help(argv); + + if (!flag && (0 == strcmp("-p", argv[i]) ||0 == strcmp("--prismatic-only", argv[i])) ) + flag = PRISMATIC_ONLY; + + if (!flag && (0 == strcmp("-r", argv[i]) || 0 == strcmp("--rotoide-only", argv[i])) ) + flag = ROTOIDE_ONLY; + + if (0 == strcmp("-t", argv[i]) || 0 == strcmp("--texture-path", argv[i])) + { + int j = i+1; + if ( j+1 > argc || // Check if we have enough arguments + argv[j] == '\0' || // We should have a path here + argv[j][0] == '-' ) // We should have a path not a command line + Help(argv); + else + fn.path_to_textures = argv[++i]; // Increase i since we use this argument + } + } + } + + dInitODE2(0); + + // create world + world = dWorldCreate(); + space = dHashSpaceCreate (0); + contactgroup = dJointGroupCreate (0); + dWorldSetGravity (world,0,0,-10); + ground = dCreatePlane (space,0,0,1,0); + + //create two boxes + dMass m; + box1_body[0] = dBodyCreate (world); + dMassSetBox (&m,1,BOX1_LENGTH,BOX1_WIDTH,BOX1_HEIGHT); + dMassAdjust (&m,Mass1); + dBodySetMass (box1_body[0],&m); + box1[0] = dCreateBox (0,BOX1_LENGTH,BOX1_WIDTH,BOX1_HEIGHT); + dGeomSetBody (box1[0],box1_body[0]); + + box2_body[0] = dBodyCreate (world); + dMassSetBox (&m,10,BOX2_LENGTH,BOX2_WIDTH,BOX2_HEIGHT); + dMassAdjust (&m,Mass2); + dBodySetMass (box2_body[0],&m); + box2[0] = dCreateBox (0,BOX2_LENGTH,BOX2_WIDTH,BOX2_HEIGHT); + dGeomSetBody (box2[0],box2_body[0]); + + //set the initial positions of body1 and body2 + dMatrix3 R; + dRSetIdentity(R); + dBodySetPosition (box1_body[0],0,0,BOX1_HEIGHT/2.0); + dBodySetRotation (box1_body[0], R); + + dBodySetPosition (box2_body[0], + 2.1, + 0.0, + BOX2_HEIGHT/2.0); + dBodySetRotation (box2_body[0], R); + + + //set PR joint + joint[0] = dJointCreatePR(world,0); + dJointAttach (joint[0],box1_body[0],box2_body[0]); + switch (flag) + { + case PRISMATIC_ONLY: + dJointSetPRAnchor (joint[0], + 2.1, + 0.0, + BOX2_HEIGHT/2.0); + dJointSetPRParam (joint[0],dParamLoStop, -0.5); + dJointSetPRParam (joint[0],dParamHiStop, 1.5); + break; + + case ROTOIDE_ONLY: + dJointSetPRAnchor (joint[0], + 0.0, + 0.0, + BOX2_HEIGHT/2.0); + dJointSetPRParam (joint[0],dParamLoStop, 0.0); + dJointSetPRParam (joint[0],dParamHiStop, 0.0); + break; + + default: + dJointSetPRAnchor (joint[0], + 1.1, + 0.0, + BOX2_HEIGHT/2.0); + dJointSetPRParam (joint[0],dParamLoStop, -0.5); + dJointSetPRParam (joint[0],dParamHiStop, 1.5); + break; + } + + dJointSetPRAxis1(joint[0],1,0,0); + dJointSetPRAxis2(joint[0],0,0,1); +// We position the 2 body +// The position of the rotoide joint is on the second body so it can rotate on itself +// and move along the X axis. +// With this anchor +// - A force in X will move only the body 2 inside the low and hi limit +// of the prismatic +// - A force in Y will make the 2 bodies to rotate around on the plane + + box1_space = dSimpleSpaceCreate (space); + dSpaceSetCleanup (box1_space,0); + dSpaceAdd(box1_space,box1[0]); + + // run simulation + dsSimulationLoop (argc,argv,400,300,&fn); + dJointGroupDestroy (contactgroup); + dSpaceDestroy (space); + dWorldDestroy (world); + dCloseODE(); + return 0; +} + diff -Nru ode-0.11.1/ode/demo/demo_jointPU.cpp ode-0.14/ode/demo/demo_jointPU.cpp --- ode-0.11.1/ode/demo/demo_jointPU.cpp 2009-04-07 14:08:09.000000000 +0000 +++ ode-0.14/ode/demo/demo_jointPU.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -139,13 +139,10 @@ //collision detection -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { int i,n; - dBodyID b1 = dGeomGetBody (o1); - dBodyID b2 = dGeomGetBody (o2); - if (b1 && b2 && dAreConnectedExcluding (b1,b2,dJointTypeContact) ) return; const int N = 10; dContact contact[N]; n = dCollide (o1,o2,N,&contact[0].geom,sizeof (dContact) ); @@ -286,6 +283,7 @@ case ',': case '<' : { dReal vel = joint->getParam (dParamVel3) - VEL_INC; joint->setParam (dParamVel3, vel); + joint->setParam (dParamFMax3, 2); std::cout<<"Velocity = "<' : { dReal vel = joint->getParam (dParamVel3) + VEL_INC; joint->setParam (dParamVel3, vel); + joint->setParam (dParamFMax3, 2); std::cout<<"Velocity = "< #include #include @@ -33,7 +55,7 @@ geom(*space, 0.2, 0.2, 0.2) { dMass mass; - mass.setBox(1, 0.2, 0.2, 0.2); + mass.setBox(10, 0.2, 0.2, 0.2); body.setMass(mass); geom.setData(this); geom.setBody(body); @@ -57,7 +79,7 @@ dReal px = (rand() / float(RAND_MAX)) * 2 - 1; dReal py = (rand() / float(RAND_MAX)) * 2 - 1; - dReal pz = 3; + dReal pz = 2.5; box->body.setPosition(px, py, pz); boxes.insert(box); @@ -80,7 +102,7 @@ } -void nearCallback(void *data, dGeomID g1, dGeomID g2) +void nearCallback(void *, dGeomID g1, dGeomID g2) { if (g1 == ground->id()) { queueRemoval(g2); @@ -113,19 +135,19 @@ simLoop(int pause) { if (!pause) { - const dReal timestep = 0.005; + const dReal timestep = 0.04; // this does a hard-coded circular motion animation static float t=0; t += timestep/4; if (t > 2*M_PI) t = 0; - dReal px = cos(t); - dReal py = sin(t); - dReal vx = -sin(t)/4; - dReal vy = cos(t)/4; - kbody->setPosition(px, py, .5); - kbody->setLinearVel(vx, vy, 0); + dVector3 next_pos = { dCos(t), dSin(t), REAL(0.5)}; + dVector3 vel; + // vel = (next_pos - cur_pos) / timestep + dSubtractVectors3(vel, next_pos, kbody->getPosition()); + dScaleVector3(vel, 1/timestep); + kbody->setLinearVel(vel); // end of hard-coded animation space->collide(0, nearCallback); diff -Nru ode-0.11.1/ode/demo/demo_motion.cpp ode-0.14/ode/demo/demo_motion.cpp --- ode-0.11.1/ode/demo/demo_motion.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_motion.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + /* This demo shows how to use dContactMotionN in a lifting platform. */ @@ -113,9 +135,9 @@ geom's velocity against the contact normal and fdir1, fdir2 (obtained with dPlaneSpace()). Assuming moving geom=g2 (so the contact joint is in the moving geom's reference frame): - motion1 = dDOT(fdir1, vel); - motion2 = dDOT(fdir2, vel); - motionN = dDOT(normal, vel); + motion1 = dCalcVectorDot3(fdir1, vel); + motion2 = dCalcVectorDot3(fdir2, vel); + motionN = dCalcVectorDot3(normal, vel); For geom=g1 just negate motionN and motion2. fdir1 is an arbitrary vector, so there's no need to negate motion1. @@ -138,9 +160,9 @@ if (contact.geom.g1 == platform) inv = -1; - contact.surface.motion1 = dDOT(mov2_vel, motiondir1); - contact.surface.motion2 = inv * dDOT(mov2_vel, motiondir2); - contact.surface.motionN = inv * dDOT(mov2_vel, contact.geom.normal); + contact.surface.motion1 = dCalcVectorDot3(mov2_vel, motiondir1); + contact.surface.motion2 = inv * dCalcVectorDot3(mov2_vel, motiondir2); + contact.surface.motionN = inv * dCalcVectorDot3(mov2_vel, contact.geom.normal); } @@ -148,7 +170,7 @@ -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { dMatrix3 RI; static const dReal ss[3] = {0.02,0.02,0.02}; @@ -241,9 +263,13 @@ if (nextobj >= num) nextobj = 0; // destroy the body and geoms for slot i - dBodyDestroy (obj[i].body); + if (obj[i].body) { + dBodyDestroy (obj[i].body); + } for (k=0; k < GPB; k++) { - if (obj[i].geom[k]) dGeomDestroy (obj[i].geom[k]); + if (obj[i].geom[k]) { + dGeomDestroy (obj[i].geom[k]); + } } memset (&obj[i],0,sizeof(obj[i])); } @@ -293,7 +319,9 @@ if (!setBody) for (k=0; k < GPB; k++) { - if (obj[i].geom[k]) dGeomSetBody (obj[i].geom[k],obj[i].body); + if (obj[i].geom[k]) { + dGeomSetBody (obj[i].geom[k],obj[i].body); + } } dBodySetMass (obj[i].body,&m); @@ -349,19 +377,7 @@ dGeomCylinderGetParams (g,&radius,&length); dsDrawCylinder (pos,R,length,radius); } - else if (type == dGeomTransformClass) { - dGeomID g2 = dGeomTransformGetGeom (g); - const dReal *pos2 = dGeomGetPosition (g2); - const dReal *R2 = dGeomGetRotation (g2); - dVector3 actual_pos; - dMatrix3 actual_R; - dMULTIPLY0_331 (actual_pos,R,pos2); - actual_pos[0] += pos[0]; - actual_pos[1] += pos[1]; - actual_pos[2] += pos[2]; - dMULTIPLY0_333 (actual_R,R,R2); - drawGeom (g2,actual_pos,actual_R,0); - } + if (show_body) { dBodyID body = dGeomGetBody(g); if (body) { @@ -462,9 +478,17 @@ // create world dInitODE(); world = dWorldCreate(); - //space = dHashSpaceCreate (0); + +#if 1 + space = dHashSpaceCreate (0); +#elif 0 dVector3 center = {0,0,0}, extents = { 100, 100, 100}; space = dQuadTreeSpaceCreate(0, center, extents, 5); +#elif 0 + space = dSweepAndPruneSpaceCreate (0, dSAP_AXES_XYZ); +#else + space = dSimpleSpaceCreate(0); +#endif contactgroup = dJointGroupCreate (0); dWorldSetGravity (world,0,0,-0.5); @@ -476,6 +500,7 @@ dWorldSetContactSurfaceLayer (world,0.001); ground = dCreatePlane (space,0,0,1,0); + memset (obj,0,sizeof(obj)); // create lift platform diff -Nru ode-0.11.1/ode/demo/demo_motor.cpp ode-0.14/ode/demo/demo_motor.cpp --- ode-0.11.1/ode/demo/demo_motor.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_motor.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -97,7 +97,7 @@ -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { // exit without doing anything if the two bodies are connected by a joint dBodyID b1 = dGeomGetBody(o1); diff -Nru ode-0.11.1/ode/demo/demo_moving_convex.cpp ode-0.14/ode/demo/demo_moving_convex.cpp --- ode-0.11.1/ode/demo/demo_moving_convex.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_moving_convex.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -75,7 +75,7 @@ // this is called by dSpaceCollide when two objects in space are // potentially colliding. -static void nearCallback( void *data, dGeomID o1, dGeomID o2 ) +static void nearCallback( void *, dGeomID o1, dGeomID o2 ) { int i; // if (o1->body && o2->body) return; @@ -144,12 +144,12 @@ // called when a key pressed static void command( int cmd ) { - int i,j,k; + int i,k; dReal sides[3]; dMass m; cmd = locase( cmd ); - if ( cmd == 'v' || cmd == 'b' || cmd == 'c' || cmd == 's' ) + if ( cmd == 'v' || cmd == 'b' || cmd == 'c' || cmd == 's' || cmd == 'y') { if ( num < NUM ) { @@ -207,6 +207,10 @@ dMassSetCapsule( &m,DENSITY,3,sides[0],sides[1] ); obj[i].geom[0] = dCreateCapsule( space,sides[0],sides[1] ); } + else if (cmd == 'y') { + dMassSetCylinder (&m,DENSITY,3,sides[0],sides[1]); + obj[i].geom[0] = dCreateCylinder (space,sides[0],sides[1]); + } else if ( cmd == 's' ) { sides[0] *= 0.5; @@ -293,6 +297,11 @@ { dsDrawSphere( pos,R,dGeomSphereGetRadius( g ) ); } + else if (type == dCylinderClass) { + dReal radius,length; + dGeomCylinderGetParams (g,&radius,&length); + dsDrawCylinder (pos,R,length,radius); + } else if ( type == dCapsuleClass ) { dReal radius,length; @@ -332,7 +341,7 @@ dsSetColor( 0,0,2 ); dSpaceCollide( space,0,&nearCallback ); - if ( !pause ) dWorldStepFast1( world,0.05, 5 ); + if ( !pause ) dWorldQuickStep( world,0.05 ); for ( int j = 0; j < dSpaceGetNumGeoms( space ); j++ ) { diff -Nru ode-0.11.1/ode/demo/demo_moving_trimesh.cpp ode-0.14/ode/demo/demo_moving_trimesh.cpp --- ode-0.11.1/ode/demo/demo_moving_trimesh.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_moving_trimesh.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -29,6 +29,84 @@ #pragma warning(disable:4244 4305) // for VC++, no precision loss complaints #endif +//<---- Convex Object +static const dReal planes[] = // planes for a cube +{ + 1.0f ,0.0f ,0.0f ,0.25f, + 0.0f ,1.0f ,0.0f ,0.25f, + 0.0f ,0.0f ,1.0f ,0.25f, + 0.0f ,0.0f ,-1.0f,0.25f, + 0.0f ,-1.0f,0.0f ,0.25f, + -1.0f,0.0f ,0.0f ,0.25f + /* + 1.0f ,0.0f ,0.0f ,2.0f, + 0.0f ,1.0f ,0.0f ,1.0f, + 0.0f ,0.0f ,1.0f ,1.0f, + 0.0f ,0.0f ,-1.0f,1.0f, + 0.0f ,-1.0f,0.0f ,1.0f, + -1.0f,0.0f ,0.0f ,0.0f + */ +}; +static const unsigned int planecount=6; + +static const dReal points[] = // points for a cube +{ + 0.25f,0.25f,0.25f, + -0.25f,0.25f,0.25f, + + 0.25f,-0.25f,0.25f, + -0.25f,-0.25f,0.25f, + + 0.25f,0.25f,-0.25f, + -0.25f,0.25f,-0.25f, + + 0.25f,-0.25f,-0.25f, + -0.25f,-0.25f,-0.25f, +}; +static const unsigned int pointcount=8; + +static const unsigned int polygons[] = //Polygons for a cube (6 squares) + { + 4,0,2,6,4, // positive X + 4,1,0,4,5, // positive Y + 4,0,1,3,2, // positive Z + 4,3,1,5,7, // negative X + 4,2,3,7,6, // negative Y + 4,5,4,6,7, // negative Z + }; +//----> Convex Object + +int tmTriangles[] = +{ + 0,2,6, + 0,6,4, + 1,0,4, + 1,4,5, + 0,1,3, + 0,3,2, + 3,1,5, + 3,5,7, + 2,3,7, + 2,7,6, + 5,4,6, + 5,6,7 +}; + +float tmVertices[] = +{ + 0.25f,0.25f,0.25f, // point 0 + -0.25f,0.25f,0.25f, // point 1 + + 0.25f,-0.25f,0.25f, // point 2 + -0.25f,-0.25f,0.25f,// point 3 + + 0.25f,0.25f,-0.25f, // point 4 + -0.25f,0.25f,-0.25f,// point 5 + + 0.25f,-0.25f,-0.25f,// point 6 + -0.25f,-0.25f,-0.25f,// point 7 +}; + // select correct drawing functions #ifdef dDOUBLE @@ -38,6 +116,7 @@ #define dsDrawCapsule dsDrawCapsuleD #define dsDrawLine dsDrawLineD #define dsDrawTriangle dsDrawTriangleD +#define dsDrawConvex dsDrawConvexD #endif @@ -80,7 +159,7 @@ // this is called by dSpaceCollide when two objects in space are // potentially colliding. -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { int i; // if (o1->body && o2->body) return; @@ -128,6 +207,7 @@ printf (" y for cylinder.\n"); printf (" c for capsule.\n"); printf (" x for a composite object.\n"); + printf (" v for a convex object.\n"); printf (" m for a trimesh.\n"); printf ("To select an object, press space.\n"); printf ("To disable the selected object, press d.\n"); @@ -149,168 +229,177 @@ static void command (int cmd) { - int i,j,k; - dReal sides[3]; - dMass m; - - cmd = locase (cmd); - if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x' || cmd == 'm' || cmd == 'y' ) { - if (num < NUM) { - i = num; - num++; - } - else { - i = nextobj; - nextobj++; - if (nextobj >= num) nextobj = 0; - - // destroy the body and geoms for slot i - dBodyDestroy (obj[i].body); - for (k=0; k < GPB; k++) { - if (obj[i].geom[k]) dGeomDestroy (obj[i].geom[k]); - } - memset (&obj[i],0,sizeof(obj[i])); - } + int i,j,k; + dReal sides[3]; + dMass m; + bool setBody = false; + + cmd = locase (cmd); + if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x' || cmd == 'm' || cmd == 'y' || cmd == 'v') { + if (num < NUM) { + i = num; + num++; + } + else { + i = nextobj; + nextobj++; + if (nextobj >= num) nextobj = 0; + + // destroy the body and geoms for slot i + dBodyDestroy (obj[i].body); + for (k=0; k < GPB; k++) { + if (obj[i].geom[k]) dGeomDestroy (obj[i].geom[k]); + } + memset (&obj[i],0,sizeof(obj[i])); + } - obj[i].body = dBodyCreate (world); - for (k=0; k<3; k++) sides[k] = dRandReal()*0.5+0.1; + obj[i].body = dBodyCreate (world); + for (k=0; k<3; k++) sides[k] = dRandReal()*0.5+0.1; - dMatrix3 R; - if (random_pos) { - dBodySetPosition (obj[i].body, - dRandReal()*2-1,dRandReal()*2-1,dRandReal()+3); - dRFromAxisAndAngle (R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, - dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); - } - else { - dReal maxheight = 0; - for (k=0; k maxheight) maxheight = pos[2]; - } - dBodySetPosition (obj[i].body, 0,0,maxheight+1); - dRFromAxisAndAngle (R,0,0,1,dRandReal()*10.0-5.0); - } - dBodySetRotation (obj[i].body,R); - dBodySetData (obj[i].body,(void*)(size_t)i); + dMatrix3 R; + if (random_pos) { + dBodySetPosition (obj[i].body, + dRandReal()*2-1,dRandReal()*2-1,dRandReal()+3); + dRFromAxisAndAngle (R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, + dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); + } + else { + dReal maxheight = 0; + for (k=0; k maxheight) maxheight = pos[2]; + } + dBodySetPosition (obj[i].body, 0,0,maxheight+1); + dRFromAxisAndAngle (R,0,0,1,dRandReal()*10.0-5.0); + } + dBodySetRotation (obj[i].body,R); + dBodySetData (obj[i].body,(void*)(size_t)i); - if (cmd == 'b') { - dMassSetBox (&m,DENSITY,sides[0],sides[1],sides[2]); - obj[i].geom[0] = dCreateBox (space,sides[0],sides[1],sides[2]); - } - else if (cmd == 'c') { - sides[0] *= 0.5; - dMassSetCapsule (&m,DENSITY,3,sides[0],sides[1]); - obj[i].geom[0] = dCreateCapsule (space,sides[0],sides[1]); - } - else if (cmd == 'y') { - sides[1] *= 0.5; - dMassSetCylinder (&m,DENSITY,3,sides[0],sides[1]); - obj[i].geom[0] = dCreateCylinder (space,sides[0],sides[1]); - } + if (cmd == 'b') { + dMassSetBox (&m,DENSITY,sides[0],sides[1],sides[2]); + obj[i].geom[0] = dCreateBox (space,sides[0],sides[1],sides[2]); + } + else if (cmd == 'c') { + sides[0] *= 0.5; + dMassSetCapsule (&m,DENSITY,3,sides[0],sides[1]); + obj[i].geom[0] = dCreateCapsule (space,sides[0],sides[1]); + } else if (cmd == 'v') { + + dMassSetBox (&m,DENSITY,0.25,0.25,0.25); + obj[i].geom[0] = dCreateConvex(space, + planes, + planecount, + points, + pointcount, + polygons); + } + else if (cmd == 'y') { + sides[1] *= 0.5; + dMassSetCylinder (&m,DENSITY,3,sides[0],sides[1]); + obj[i].geom[0] = dCreateCylinder (space,sides[0],sides[1]); + } else if (cmd == 's') { - sides[0] *= 0.5; - dMassSetSphere (&m,DENSITY,sides[0]); - obj[i].geom[0] = dCreateSphere (space,sides[0]); - } - else if (cmd == 'm') { - dTriMeshDataID new_tmdata = dGeomTriMeshDataCreate(); - dGeomTriMeshDataBuildSingle(new_tmdata, &Vertices[0], 3 * sizeof(float), VertexCount, - (dTriIndex*)&Indices[0], IndexCount, 3 * sizeof(dTriIndex)); - - obj[i].geom[0] = dCreateTriMesh(space, new_tmdata, 0, 0, 0); - - // remember the mesh's dTriMeshDataID on its userdata for convenience. - dGeomSetData(obj[i].geom[0], new_tmdata); - - dMassSetTrimesh( &m, DENSITY, obj[i].geom[0] ); - printf("mass at %f %f %f\n", m.c[0], m.c[1], m.c[2]); - dGeomSetPosition(obj[i].geom[0], -m.c[0], -m.c[1], -m.c[2]); - dMassTranslate(&m, -m.c[0], -m.c[1], -m.c[2]); - } - else if (cmd == 'x') { - dGeomID g2[GPB]; // encapsulated geometries - dReal dpos[GPB][3]; // delta-positions for encapsulated geometries - - // start accumulating masses for the encapsulated geometries - dMass m2; - dMassSetZero (&m); - - // set random delta positions - for (j=0; j= num) selected = 0; - if (selected < 0) selected = 0; - } - else if (cmd == 'd' && selected >= 0 && selected < num) { - dBodyDisable (obj[selected].body); - } - else if (cmd == 'e' && selected >= 0 && selected < num) { - dBodyEnable (obj[selected].body); - } - else if (cmd == 'a') { - show_aabb ^= 1; - } - else if (cmd == 't') { - show_contacts ^= 1; - } - else if (cmd == 'r') { - random_pos ^= 1; - } + if (cmd == ' ') { + selected++; + if (selected >= num) selected = 0; + if (selected < 0) selected = 0; + } + else if (cmd == 'd' && selected >= 0 && selected < num) { + dBodyDisable (obj[selected].body); + } + else if (cmd == 'e' && selected >= 0 && selected < num) { + dBodyEnable (obj[selected].body); + } + else if (cmd == 'a') { + show_aabb ^= 1; + } + else if (cmd == 't') { + show_contacts ^= 1; + } + else if (cmd == 'r') { + random_pos ^= 1; + } } @@ -340,20 +429,13 @@ dReal radius,length; dGeomCylinderGetParams (g,&radius,&length); dsDrawCylinder (pos,R,length,radius); - } - - else if (type == dGeomTransformClass) { - dGeomID g2 = dGeomTransformGetGeom (g); - const dReal *pos2 = dGeomGetPosition (g2); - const dReal *R2 = dGeomGetRotation (g2); - dVector3 actual_pos; - dMatrix3 actual_R; - dMULTIPLY0_331 (actual_pos,R,pos2); - actual_pos[0] += pos[0]; - actual_pos[1] += pos[1]; - actual_pos[2] += pos[2]; - dMULTIPLY0_333 (actual_R,R,R2); - drawGeom (g2,actual_pos,actual_R,0); + } else if (type == dConvexClass) { + //dVector3 sides={0.50,0.50,0.50}; + dsDrawConvex(pos,R,planes, + planecount, + points, + pointcount, + polygons); } if (show_aabb) { @@ -415,7 +497,7 @@ #endif //if (!pause) dWorldStep (world,0.05); - if (!pause) dWorldStepFast1 (world,0.05, 5); + if (!pause) dWorldQuickStep (world,0.05); for (int j = 0; j < dSpaceGetNumGeoms(space); j++){ dSpaceGetGeom(space, j); @@ -568,9 +650,20 @@ dRFromAxisAndAngle(Rotation, 1, 0, 0, M_PI / 2); dGeomSetRotation(TriMesh2, Rotation);} + dThreadingImplementationID threading = dThreadingAllocateMultiThreadedImplementation(); + dThreadingThreadPoolID pool = dThreadingAllocateThreadPool(4, 0, dAllocateFlagBasicData, NULL); + dThreadingThreadPoolServeMultiThreadedImplementation(pool, threading); + // dWorldSetStepIslandsProcessingMaxThreadCount(world, 1); + dWorldSetStepThreadingImplementation(world, dThreadingImplementationGetFunctions(threading), threading); + // run simulation dsSimulationLoop (argc,argv,352,288,&fn); + dThreadingImplementationShutdownProcessing(threading); + dThreadingFreeThreadPool(pool); + dWorldSetStepThreadingImplementation(world, NULL, NULL); + dThreadingFreeImplementation(threading); + dJointGroupDestroy (contactgroup); dSpaceDestroy (space); dWorldDestroy (world); diff -Nru ode-0.11.1/ode/demo/demo_ode.cpp ode-0.14/ode/demo/demo_ode.cpp --- ode-0.11.1/ode/demo/demo_ode.cpp 2009-01-28 03:43:22.000000000 +0000 +++ ode-0.14/ode/demo/demo_ode.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -155,10 +155,10 @@ dMakeRandomVector (b,3,1.0); dMakeRandomVector (c,3,1.0); - dCROSS (a1,=,b,c); + dCalcVectorCross3(a1,b,c); dSetZero (B,12); - dCROSSMAT (B,b,4,+,-); + dSetCrossMatrixPlus(B,b,4); dMultiply0 (a2,B,c,3,3,1); dReal diff = dMaxDifference(a1,a2,3,1); @@ -189,11 +189,11 @@ dMakeRandomVector (n1,3,1.0); for (j=0; j<3; j++) n2[j]=n1[j]; dNormalize3 (n2); - if (dFabs(dDOT(n2,n2) - 1.0) > tol) bad |= 1; + if (dFabs(dCalcVectorDot3(n2,n2) - 1.0) > tol) bad |= 1; if (dFabs(n2[0]/n1[0] - n2[1]/n1[1]) > tol) bad |= 2; if (dFabs(n2[0]/n1[0] - n2[2]/n1[2]) > tol) bad |= 4; if (dFabs(n2[1]/n1[1] - n2[2]/n1[2]) > tol) bad |= 8; - if (dFabs(dDOT(n2,n1) - dSqrt(dDOT(n1,n1))) > tol) bad |= 16; + if (dFabs(dCalcVectorDot3(n2,n1) - dSqrt(dCalcVectorDot3(n1,n1))) > tol) bad |= 16; if (bad) { printf ("\tFAILED (code=%x)\n",bad); return; @@ -225,11 +225,11 @@ dMakeRandomVector (n,3,1.0); dNormalize3 (n); dPlaneSpace (n,p,q); - if (fabs(dDOT(n,p)) > tol) bad = 1; - if (fabs(dDOT(n,q)) > tol) bad = 1; - if (fabs(dDOT(p,q)) > tol) bad = 1; - if (fabs(dDOT(p,p)-1) > tol) bad = 1; - if (fabs(dDOT(q,q)-1) > tol) bad = 1; + if (fabs(dCalcVectorDot3(n,p)) > tol) bad = 1; + if (fabs(dCalcVectorDot3(n,q)) > tol) bad = 1; + if (fabs(dCalcVectorDot3(p,q)) > tol) bad = 1; + if (fabs(dCalcVectorDot3(p,p)-1) > tol) bad = 1; + if (fabs(dCalcVectorDot3(q,q)-1) > tol) bad = 1; } printf ("\t%s\n", bad ? "FAILED" : "passed"); } @@ -285,38 +285,38 @@ dMakeRandomMatrix (C,3,3,1.0); dMakeRandomMatrix (x,3,1,1.0); - // dMULTIPLY0_331() - dMULTIPLY0_331 (a,B,x); + // dMultiply0_331() + dMultiply0_331 (a,B,x); dMultiply0 (a2,B,x,3,3,1); printf ("\t%s (1)\n",(dMaxDifference (a,a2,3,1) > tol) ? "FAILED" : "passed"); - // dMULTIPLY1_331() - dMULTIPLY1_331 (a,B,x); + // dMultiply1_331() + dMultiply1_331 (a,B,x); dMultiply1 (a2,B,x,3,3,1); printf ("\t%s (2)\n",(dMaxDifference (a,a2,3,1) > tol) ? "FAILED" : "passed"); - // dMULTIPLY0_133 - dMULTIPLY0_133 (a,x,B); + // dMultiply0_133 + dMultiply0_133 (a,x,B); dMultiply0 (a2,x,B,1,3,3); printf ("\t%s (3)\n",(dMaxDifference (a,a2,1,3) > tol) ? "FAILED" : "passed"); - // dMULTIPLY0_333() - dMULTIPLY0_333 (A,B,C); + // dMultiply0_333() + dMultiply0_333 (A,B,C); dMultiply0 (A2,B,C,3,3,3); printf ("\t%s (4)\n",(dMaxDifference (A,A2,3,3) > tol) ? "FAILED" : "passed"); - // dMULTIPLY1_333() - dMULTIPLY1_333 (A,B,C); + // dMultiply1_333() + dMultiply1_333 (A,B,C); dMultiply1 (A2,B,C,3,3,3); printf ("\t%s (5)\n",(dMaxDifference (A,A2,3,3) > tol) ? "FAILED" : "passed"); - // dMULTIPLY2_333() - dMULTIPLY2_333 (A,B,C); + // dMultiply2_333() + dMultiply2_333 (A,B,C); dMultiply2 (A2,B,C,3,3,3); printf ("\t%s (6)\n",(dMaxDifference (A,A2,3,3) > tol) ? "FAILED" : "passed"); @@ -733,12 +733,12 @@ dMakeRandomVector (u1,3,1.0); dNormalize3 (u1); dMakeRandomVector (u2,3,1.0); - dReal d = dDOT(u1,u2); + dReal d = dCalcVectorDot3(u1,u2); u2[0] -= d*u1[0]; u2[1] -= d*u1[1]; u2[2] -= d*u1[2]; - dNormalize3 (u2); - dCROSS (u3,=,u1,u2); + dNormalize3(u2); + dCalcVectorCross3(u3,u1,u2); } @@ -846,14 +846,46 @@ //**************************************************************************** -#include "../src/array.h" -#include "../src/array.cpp" +#include + +template +class simplevector +{ +private: + int n; + int max; + T* data; + +public: + simplevector() { initialize(); } + ~simplevector() { finalize(); } + T& operator[](int i) { assert(i>=0 && i=0 && i mat; + simplevector mat; int afterfirst,index; public: @@ -919,9 +951,10 @@ va_list ap; va_start (ap,name); vsprintf (mi->name,name,ap); + va_end (ap); if (strlen(mi->name) >= sizeof (mi->name)) dDebug (0,"name too long"); - mat.push (mi); + mat.push_back(mi); return 0; } else { @@ -935,6 +968,7 @@ va_list ap; va_start (ap,name); vsprintf (mi.name,name,ap); + va_end (ap); if (strlen(mi.name) >= sizeof (mi.name)) dDebug (0,"name too long"); if (strcmp(mp->name,mi.name) != 0) @@ -973,7 +1007,7 @@ dFree (mat[i]->data,mat[i]->size); dFree (mat[i],sizeof(dMatInfo)); } - mat.setSize (0); + mat.clear(); afterfirst = 0; index = 0; } @@ -992,7 +1026,7 @@ // static jmp_buf jump_buffer; -static void myDebug (int num, const char *msg, va_list ap) +static void myDebug (int /*num*/, const char */*msg*/, va_list /*ap*/) { // printf ("(Error %d: ",num); // vprintf (msg,ap); @@ -1093,7 +1127,7 @@ // internal unit tests extern "C" void dTestDataStructures(); extern "C" void dTestMatrixComparison(); -extern "C" void dTestSolveLCP(); +extern "C" int dTestSolveLCP(); int main() diff -Nru ode-0.11.1/ode/demo/demo_piston.cpp ode-0.14/ode/demo/demo_piston.cpp --- ode-0.11.1/ode/demo/demo_piston.cpp 2009-01-06 17:45:09.000000000 +0000 +++ ode-0.14/ode/demo/demo_piston.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -132,7 +132,7 @@ //collision detection -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { int i,n; diff -Nru ode-0.11.1/ode/demo/demo_plane2d.cpp ode-0.14/ode/demo/demo_plane2d.cpp --- ode-0.11.1/ode/demo/demo_plane2d.cpp 2008-10-15 21:19:01.000000000 +0000 +++ ode-0.14/ode/demo/demo_plane2d.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -1,273 +1,304 @@ -// Test my Plane2D constraint. -// Uses ode-0.35 collision API. - -# include -# include -# include -# include -# include -#include "texturepath.h" - - -# define drand48() ((double) (((double) rand()) / ((double) RAND_MAX))) - -# define N_BODIES 40 -# define STAGE_SIZE 8.0 // in m - -# define TIME_STEP 0.01 -# define K_SPRING 10.0 -# define K_DAMP 10.0 - -//using namespace ode; - -static dWorld dyn_world; -static dBody dyn_bodies[N_BODIES]; -static dReal bodies_sides[N_BODIES][3]; - -static dSpaceID coll_space_id; -static dJointID plane2d_joint_ids[N_BODIES]; -static dJointGroup - coll_contacts; - - - -static void cb_start () -/*************************/ -{ - dAllocateODEDataForThread(dAllocateMaskAll); - - static float xyz[3] = { 0.5f*STAGE_SIZE, 0.5f*STAGE_SIZE, 0.65f*STAGE_SIZE}; - static float hpr[3] = { 90.0f, -90.0f, 0 }; - - dsSetViewpoint (xyz, hpr); -} - - - -static void cb_near_collision (void *data, dGeomID o1, dGeomID o2) -/********************************************************************/ -{ - dBodyID b1 = dGeomGetBody (o1); - dBodyID b2 = dGeomGetBody (o2); - dContact contact; - - - // exit without doing anything if the two bodies are static - if (b1 == 0 && b2 == 0) - return; - - // exit without doing anything if the two bodies are connected by a joint - if (b1 && b2 && dAreConnected (b1, b2)) - { - /* MTRAP; */ - return; - } - - contact.surface.mode = 0; - contact.surface.mu = 0; // frictionless - - if (dCollide (o1, o2, 1, &contact.geom, sizeof (dContactGeom))) - { - dJointID c = dJointCreateContact (dyn_world.id(), - coll_contacts.id (), &contact); - dJointAttach (c, b1, b2); - } -} - - -static void track_to_pos (dBody &body, dJointID joint_id, - dReal target_x, dReal target_y) -/************************************************************************/ -{ - dReal curr_x = body.getPosition()[0]; - dReal curr_y = body.getPosition()[1]; - - dJointSetPlane2DXParam (joint_id, dParamVel, 1 * (target_x - curr_x)); - dJointSetPlane2DYParam (joint_id, dParamVel, 1 * (target_y - curr_y)); -} - - - -static void cb_sim_step (int pause) -/*************************************/ -{ - if (! pause) - { - static dReal angle = 0; - - angle += REAL( 0.01 ); - - track_to_pos (dyn_bodies[0], plane2d_joint_ids[0], - dReal( STAGE_SIZE/2 + STAGE_SIZE/2.0 * cos (angle) ), - dReal( STAGE_SIZE/2 + STAGE_SIZE/2.0 * sin (angle) )); - - /* double f0 = 0.001; */ - /* for (int b = 0; b < N_BODIES; b ++) */ - /* { */ - /* double p = 1 + b / (double) N_BODIES; */ - /* double q = 2 - b / (double) N_BODIES; */ - /* dyn_bodies[b].addForce (f0 * cos (p*angle), f0 * sin (q*angle), 0); */ - /* } */ - /* dyn_bodies[0].addTorque (0, 0, 0.1); */ - - const int n = 10; - for (int i = 0; i < n; i ++) - { - dSpaceCollide (coll_space_id, 0, &cb_near_collision); - dyn_world.step (dReal(TIME_STEP/n)); - coll_contacts.empty (); - } - } - -# if 1 /* [ */ - { - // @@@ hack Plane2D constraint error reduction here: - for (int b = 0; b < N_BODIES; b ++) - { - const dReal *rot = dBodyGetAngularVel (dyn_bodies[b].id()); - const dReal *quat_ptr; - dReal quat[4], - quat_len; - - - quat_ptr = dBodyGetQuaternion (dyn_bodies[b].id()); - quat[0] = quat_ptr[0]; - quat[1] = 0; - quat[2] = 0; - quat[3] = quat_ptr[3]; - quat_len = sqrt (quat[0] * quat[0] + quat[3] * quat[3]); - quat[0] /= quat_len; - quat[3] /= quat_len; - dBodySetQuaternion (dyn_bodies[b].id(), quat); - dBodySetAngularVel (dyn_bodies[b].id(), 0, 0, rot[2]); - } - } -# endif /* ] */ - - -# if 0 /* [ */ - { - // @@@ friction - for (int b = 0; b < N_BODIES; b ++) - { - const dReal *vel = dBodyGetLinearVel (dyn_bodies[b].id()), - *rot = dBodyGetAngularVel (dyn_bodies[b].id()); - dReal s = 1.00; - dReal t = 0.99; - - dBodySetLinearVel (dyn_bodies[b].id(), s*vel[0],s*vel[1],s*vel[2]); - dBodySetAngularVel (dyn_bodies[b].id(),t*rot[0],t*rot[1],t*rot[2]); - } - } -# endif /* ] */ - - - { - // ode drawstuff - - dsSetTexture (DS_WOOD); - for (int b = 0; b < N_BODIES; b ++) - { - if (b == 0) - dsSetColor (1.0, 0.5, 1.0); - else - dsSetColor (0, 0.5, 1.0); -#ifdef dDOUBLE - dsDrawBoxD (dyn_bodies[b].getPosition(), dyn_bodies[b].getRotation(), bodies_sides[b]); -#else - dsDrawBox (dyn_bodies[b].getPosition(), dyn_bodies[b].getRotation(), bodies_sides[b]); -#endif - } - } -} - - - -extern int main -/******************/ -( - int argc, - char **argv -) -{ - int b; - dsFunctions drawstuff_functions; - - - dInitODE2(0); - - // dynamic world - - dReal cf_mixing;// = 1 / TIME_STEP * K_SPRING + K_DAMP; - dReal err_reduct;// = TIME_STEP * K_SPRING * cf_mixing; - err_reduct = REAL( 0.5 ); - cf_mixing = REAL( 0.001 ); - dWorldSetERP (dyn_world.id (), err_reduct); - dWorldSetCFM (dyn_world.id (), cf_mixing); - dyn_world.setGravity (0, 0.0, -1.0); - - coll_space_id = dSimpleSpaceCreate (0); - - // dynamic bodies - for (b = 0; b < N_BODIES; b ++) - { - int l = (int) (1 + sqrt ((double) N_BODIES)); - dReal x = dReal( (0.5 + (b / l)) / l * STAGE_SIZE ); - dReal y = dReal( (0.5 + (b % l)) / l * STAGE_SIZE ); - dReal z = REAL( 1.0 ) + REAL( 0.1 ) * (dReal)drand48(); - - bodies_sides[b][0] = dReal( 5 * (0.2 + 0.7*drand48()) / sqrt((double)N_BODIES) ); - bodies_sides[b][1] = dReal( 5 * (0.2 + 0.7*drand48()) / sqrt((double)N_BODIES) ); - bodies_sides[b][2] = z; - - dyn_bodies[b].create (dyn_world); - dyn_bodies[b].setPosition (x, y, z/2); - dyn_bodies[b].setData ((void*) (size_t)b); - dBodySetLinearVel (dyn_bodies[b].id (), - dReal( 3 * (drand48 () - 0.5) ), - dReal( 3 * (drand48 () - 0.5) ), 0); - - dMass m; - m.setBox (1, bodies_sides[b][0],bodies_sides[b][1],bodies_sides[b][2]); - m.adjust (REAL(0.1) * bodies_sides[b][0] * bodies_sides[b][1]); - dyn_bodies[b].setMass (&m); - - plane2d_joint_ids[b] = dJointCreatePlane2D (dyn_world.id (), 0); - dJointAttach (plane2d_joint_ids[b], dyn_bodies[b].id (), 0); - } - - dJointSetPlane2DXParam (plane2d_joint_ids[0], dParamFMax, 10); - dJointSetPlane2DYParam (plane2d_joint_ids[0], dParamFMax, 10); - - - // collision geoms and joints - dCreatePlane (coll_space_id, 1, 0, 0, 0); - dCreatePlane (coll_space_id, -1, 0, 0, -STAGE_SIZE); - dCreatePlane (coll_space_id, 0, 1, 0, 0); - dCreatePlane (coll_space_id, 0, -1, 0, -STAGE_SIZE); - - for (b = 0; b < N_BODIES; b ++) - { - dGeomID coll_box_id; - coll_box_id = dCreateBox (coll_space_id, - bodies_sides[b][0], bodies_sides[b][1], bodies_sides[b][2]); - dGeomSetBody (coll_box_id, dyn_bodies[b].id ()); - } - - coll_contacts.create (); - - { - // simulation loop (by drawstuff lib) - drawstuff_functions.version = DS_VERSION; - drawstuff_functions.start = &cb_start; - drawstuff_functions.step = &cb_sim_step; - drawstuff_functions.command = 0; - drawstuff_functions.stop = 0; - drawstuff_functions.path_to_textures = DRAWSTUFF_TEXTURE_PATH; - - dsSimulationLoop (argc, argv, 352,288,&drawstuff_functions); - } - - dCloseODE(); - return 0; -} +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +// Test my Plane2D constraint. +// Uses ode-0.35 collision API. + +# include +# include +# include +# include +# include +#include "texturepath.h" + + +# define drand48() ((double) (((double) rand()) / ((double) RAND_MAX))) + +# define N_BODIES 40 +# define STAGE_SIZE 8.0 // in m + +# define TIME_STEP 0.01 +# define K_SPRING 10.0 +# define K_DAMP 10.0 + +//using namespace ode; + +struct GlobalVars +{ + dWorld dyn_world; + dBody dyn_bodies[N_BODIES]; + dReal bodies_sides[N_BODIES][3]; + + dSpaceID coll_space_id; + dJointID plane2d_joint_ids[N_BODIES]; + dJointGroup coll_contacts; +}; + +static GlobalVars *g_globals_ptr = NULL; + + + +static void cb_start () +/*************************/ +{ + dAllocateODEDataForThread(dAllocateMaskAll); + + static float xyz[3] = { 0.5f*STAGE_SIZE, 0.5f*STAGE_SIZE, 0.65f*STAGE_SIZE}; + static float hpr[3] = { 90.0f, -90.0f, 0 }; + + dsSetViewpoint (xyz, hpr); +} + + + +static void cb_near_collision (void *, dGeomID o1, dGeomID o2) +/********************************************************************/ +{ + dBodyID b1 = dGeomGetBody (o1); + dBodyID b2 = dGeomGetBody (o2); + dContact contact; + + + // exit without doing anything if the two bodies are static + if (b1 == 0 && b2 == 0) + return; + + // exit without doing anything if the two bodies are connected by a joint + if (b1 && b2 && dAreConnected (b1, b2)) + { + /* MTRAP; */ + return; + } + + contact.surface.mode = 0; + contact.surface.mu = 0; // frictionless + + if (dCollide (o1, o2, 1, &contact.geom, sizeof (dContactGeom))) + { + dJointID c = dJointCreateContact (g_globals_ptr->dyn_world.id(), + g_globals_ptr->coll_contacts.id (), &contact); + dJointAttach (c, b1, b2); + } +} + + +static void track_to_pos (dBody &body, dJointID joint_id, + dReal target_x, dReal target_y) +/************************************************************************/ +{ + dReal curr_x = body.getPosition()[0]; + dReal curr_y = body.getPosition()[1]; + + dJointSetPlane2DXParam (joint_id, dParamVel, 1 * (target_x - curr_x)); + dJointSetPlane2DYParam (joint_id, dParamVel, 1 * (target_y - curr_y)); +} + + + +static void cb_sim_step (int pause) +/*************************************/ +{ + if (! pause) + { + static dReal angle = 0; + + angle += REAL( 0.01 ); + + track_to_pos (g_globals_ptr->dyn_bodies[0], g_globals_ptr->plane2d_joint_ids[0], + dReal( STAGE_SIZE/2 + STAGE_SIZE/2.0 * cos (angle) ), + dReal( STAGE_SIZE/2 + STAGE_SIZE/2.0 * sin (angle) )); + + /* double f0 = 0.001; */ + /* for (int b = 0; b < N_BODIES; b ++) */ + /* { */ + /* double p = 1 + b / (double) N_BODIES; */ + /* double q = 2 - b / (double) N_BODIES; */ + /* g_globals_ptr->dyn_bodies[b].addForce (f0 * cos (p*angle), f0 * sin (q*angle), 0); */ + /* } */ + /* g_globals_ptr->dyn_bodies[0].addTorque (0, 0, 0.1); */ + + const int n = 10; + for (int i = 0; i < n; i ++) + { + dSpaceCollide (g_globals_ptr->coll_space_id, 0, &cb_near_collision); + g_globals_ptr->dyn_world.step (dReal(TIME_STEP/n)); + g_globals_ptr->coll_contacts.empty (); + } + } + +# if 1 /* [ */ + { + // @@@ hack Plane2D constraint error reduction here: + for (int b = 0; b < N_BODIES; b ++) + { + const dReal *rot = dBodyGetAngularVel (g_globals_ptr->dyn_bodies[b].id()); + const dReal *quat_ptr; + dReal quat[4], + quat_len; + + + quat_ptr = dBodyGetQuaternion (g_globals_ptr->dyn_bodies[b].id()); + quat[0] = quat_ptr[0]; + quat[1] = 0; + quat[2] = 0; + quat[3] = quat_ptr[3]; + quat_len = sqrt (quat[0] * quat[0] + quat[3] * quat[3]); + quat[0] /= quat_len; + quat[3] /= quat_len; + dBodySetQuaternion (g_globals_ptr->dyn_bodies[b].id(), quat); + dBodySetAngularVel (g_globals_ptr->dyn_bodies[b].id(), 0, 0, rot[2]); + } + } +# endif /* ] */ + + +# if 0 /* [ */ + { + // @@@ friction + for (int b = 0; b < N_BODIES; b ++) + { + const dReal *vel = dBodyGetLinearVel (g_globals_ptr->dyn_bodies[b].id()), + *rot = dBodyGetAngularVel (g_globals_ptr->dyn_bodies[b].id()); + dReal s = 1.00; + dReal t = 0.99; + + dBodySetLinearVel (g_globals_ptr->dyn_bodies[b].id(), s*vel[0],s*vel[1],s*vel[2]); + dBodySetAngularVel (g_globals_ptr->dyn_bodies[b].id(),t*rot[0],t*rot[1],t*rot[2]); + } + } +# endif /* ] */ + + + { + // ode drawstuff + + dsSetTexture (DS_WOOD); + for (int b = 0; b < N_BODIES; b ++) + { + if (b == 0) + dsSetColor (1.0, 0.5, 1.0); + else + dsSetColor (0, 0.5, 1.0); +#ifdef dDOUBLE + dsDrawBoxD (g_globals_ptr->dyn_bodies[b].getPosition(), g_globals_ptr->dyn_bodies[b].getRotation(), g_globals_ptr->bodies_sides[b]); +#else + dsDrawBox (g_globals_ptr->dyn_bodies[b].getPosition(), g_globals_ptr->dyn_bodies[b].getRotation(), g_globals_ptr->bodies_sides[b]); +#endif + } + } +} + + + +extern int main +/******************/ +( + int argc, + char **argv +) +{ + int b; + dsFunctions drawstuff_functions; + + + dInitODE2(0); + + g_globals_ptr = new GlobalVars(); + + // dynamic world + + dReal cf_mixing;// = 1 / TIME_STEP * K_SPRING + K_DAMP; + dReal err_reduct;// = TIME_STEP * K_SPRING * cf_mixing; + err_reduct = REAL( 0.5 ); + cf_mixing = REAL( 0.001 ); + dWorldSetERP (g_globals_ptr->dyn_world.id (), err_reduct); + dWorldSetCFM (g_globals_ptr->dyn_world.id (), cf_mixing); + g_globals_ptr->dyn_world.setGravity (0, 0.0, -1.0); + + g_globals_ptr->coll_space_id = dSimpleSpaceCreate (0); + + // dynamic bodies + for (b = 0; b < N_BODIES; b ++) + { + int l = (int) (1 + sqrt ((double) N_BODIES)); + dReal x = dReal( (0.5 + (b / l)) / l * STAGE_SIZE ); + dReal y = dReal( (0.5 + (b % l)) / l * STAGE_SIZE ); + dReal z = REAL( 1.0 ) + REAL( 0.1 ) * (dReal)drand48(); + + g_globals_ptr->bodies_sides[b][0] = dReal( 5 * (0.2 + 0.7*drand48()) / sqrt((double)N_BODIES) ); + g_globals_ptr->bodies_sides[b][1] = dReal( 5 * (0.2 + 0.7*drand48()) / sqrt((double)N_BODIES) ); + g_globals_ptr->bodies_sides[b][2] = z; + + g_globals_ptr->dyn_bodies[b].create (g_globals_ptr->dyn_world); + g_globals_ptr->dyn_bodies[b].setPosition (x, y, z/2); + g_globals_ptr->dyn_bodies[b].setData ((void*) (size_t)b); + dBodySetLinearVel (g_globals_ptr->dyn_bodies[b].id (), + dReal( 3 * (drand48 () - 0.5) ), + dReal( 3 * (drand48 () - 0.5) ), 0); + + dMass m; + m.setBox (1, g_globals_ptr->bodies_sides[b][0],g_globals_ptr->bodies_sides[b][1],g_globals_ptr->bodies_sides[b][2]); + m.adjust (REAL(0.1) * g_globals_ptr->bodies_sides[b][0] * g_globals_ptr->bodies_sides[b][1]); + g_globals_ptr->dyn_bodies[b].setMass (&m); + + g_globals_ptr->plane2d_joint_ids[b] = dJointCreatePlane2D (g_globals_ptr->dyn_world.id (), 0); + dJointAttach (g_globals_ptr->plane2d_joint_ids[b], g_globals_ptr->dyn_bodies[b].id (), 0); + } + + dJointSetPlane2DXParam (g_globals_ptr->plane2d_joint_ids[0], dParamFMax, 10); + dJointSetPlane2DYParam (g_globals_ptr->plane2d_joint_ids[0], dParamFMax, 10); + + + // collision geoms and joints + dCreatePlane (g_globals_ptr->coll_space_id, 1, 0, 0, 0); + dCreatePlane (g_globals_ptr->coll_space_id, -1, 0, 0, -STAGE_SIZE); + dCreatePlane (g_globals_ptr->coll_space_id, 0, 1, 0, 0); + dCreatePlane (g_globals_ptr->coll_space_id, 0, -1, 0, -STAGE_SIZE); + + for (b = 0; b < N_BODIES; b ++) + { + dGeomID coll_box_id; + coll_box_id = dCreateBox (g_globals_ptr->coll_space_id, + g_globals_ptr->bodies_sides[b][0], g_globals_ptr->bodies_sides[b][1], g_globals_ptr->bodies_sides[b][2]); + dGeomSetBody (coll_box_id, g_globals_ptr->dyn_bodies[b].id ()); + } + + g_globals_ptr->coll_contacts.create (); + + { + // simulation loop (by drawstuff lib) + drawstuff_functions.version = DS_VERSION; + drawstuff_functions.start = &cb_start; + drawstuff_functions.step = &cb_sim_step; + drawstuff_functions.command = 0; + drawstuff_functions.stop = 0; + drawstuff_functions.path_to_textures = DRAWSTUFF_TEXTURE_PATH; + + dsSimulationLoop (argc, argv, 352,288,&drawstuff_functions); + } + + delete g_globals_ptr; + g_globals_ptr = NULL; + + dCloseODE(); + return 0; +} diff -Nru ode-0.11.1/ode/demo/demo_rfriction.cpp ode-0.14/ode/demo/demo_rfriction.cpp --- ode-0.11.1/ode/demo/demo_rfriction.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ode-0.14/ode/demo/demo_rfriction.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -0,0 +1,258 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: russ@q12.org Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: * + * (1) The GNU Lesser General Public License as published by the Free * + * Software Foundation; either version 2.1 of the License, or (at * + * your option) any later version. The text of the GNU Lesser * + * General Public License is included with this library in the * + * file LICENSE.TXT. * + * (2) The BSD-style license that is included with this library in * + * the file LICENSE-BSD.TXT. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * + * LICENSE.TXT and LICENSE-BSD.TXT for more details. * + * * + *************************************************************************/ + +/* +Angular friction demo: + +A bunch of ramps of different pitch. +A bunch of spheres with rolling friction. +*/ + + +#include +#include +#include "texturepath.h" + +#ifdef _MSC_VER +#pragma warning(disable:4244 4305) // for VC++, no precision loss complaints +#endif + +// select correct drawing functions +#ifdef dDOUBLE +#define dsDrawBox dsDrawBoxD +#define dsDrawSphere dsDrawSphereD +#define dsDrawCylinder dsDrawCylinderD +#define dsDrawCapsule dsDrawCapsuleD +#endif + + +// some constants +#define GRAVITY 10 // the global gravity to use +#define RAMP_COUNT 8 + +static const dReal rampX = 6.0f; +static const dReal rampY = 0.5f; +static const dReal rampZ = 0.25f; +static const dReal sphereRadius = 0.25f; +static const dReal maxRamp = M_PI/4.0f; // Needs to be less than pi/2 +static const dReal rampInc = maxRamp/RAMP_COUNT; + +// dynamics and collision objects +static dWorldID world = 0; +static dSpaceID space = 0; +static dJointGroupID contactgroup = 0; +static dGeomID ground; + +static dReal mu = REAL(0.37); // the global mu to use +static dReal rho = REAL(0.1); // the global rho to use +static dReal omega = REAL(25.0); + +static dGeomID rampGeom[RAMP_COUNT]; +static dBodyID sphereBody[RAMP_COUNT]; +static dGeomID sphereGeom[RAMP_COUNT]; + + +// this is called by dSpaceCollide when two objects in space are +// potentially colliding. + +static void nearCallback (void *, dGeomID o1, dGeomID o2) +{ + int i; + + dBodyID b1 = dGeomGetBody(o1); + dBodyID b2 = dGeomGetBody(o2); + + if (b1==0 && b2==0) return; + + dContact contact[3]; + for (int ii=0; ii<3; ii++) { + contact[ii].surface.mode = dContactApprox1 | dContactRolling; + contact[ii].surface.mu = mu; + contact[ii].surface.rho = rho; + } + if (int numc = dCollide (o1,o2,3,&contact[0].geom,sizeof(dContact))) { + for (i=0; i1) rho=1; + break; + case 'n': case 'N': + mu-=0.02; + if (mu<0) mu=0; + break; + case 'm': case 'M': + mu+=0.02; + if (mu>1) mu=1; + break; + case 'r': case 'R': + reset(); + break; + case ']': + omega+=1; + break; + case '[': + omega-=1; + break; + } +} + +// simulation loop + +static void simLoop (int pause) +{ + if (!pause) { + dSpaceCollide (space,0,&nearCallback); + dWorldStep (world,0.017); // 60 fps + // remove all contact joints + dJointGroupEmpty (contactgroup); + } + + // Render ramps and spheres + dsSetTexture (DS_WOOD); + for (int ii=0;ii + #include #include #include "texturepath.h" @@ -44,7 +46,8 @@ #define DENSITY (5.0) // density of all objects #define GPB 3 // maximum number of geometries per body #define MAX_CONTACTS 4 // maximum number of contact points per body -#define WORLD_SIZE 100 +#define WORLD_SIZE 20 +#define WORLD_HEIGHT 20 // dynamics and collision objects @@ -57,7 +60,7 @@ static int num=0; // number of objects in simulation static int nextobj=0; // next object to recycle if num==NUM static dWorldID world; -static dSpaceID space; +static dSpaceID space = NULL; static MyObject obj[NUM]; static dJointGroupID contactgroup; static int selected = -1; // selected object @@ -70,7 +73,7 @@ // this is called by dSpaceCollide when two objects in space are // potentially colliding. -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { int i; // if (o1->body && o2->body) return; @@ -109,7 +112,7 @@ { dAllocateODEDataForThread(dAllocateMaskAll); - static float xyz[3] = {2.1640f,-1.3079f,1.7600f}; + static float xyz[3] = {2.1640f,-1.3079f,3.7600f}; static float hpr[3] = {125.5000f,-17.0000f,0.0000f}; dsSetViewpoint (xyz,hpr); printf ("To drop another object, press:\n"); @@ -118,6 +121,7 @@ printf (" s for sphere.\n"); printf (" c for cylinder.\n"); printf (" x for a composite object.\n"); + printf (" y for cylinder.\n"); printf ("To select an object, press space.\n"); printf ("To disable the selected object, press d.\n"); printf ("To enable the selected object, press e.\n"); @@ -127,10 +131,10 @@ } -char locase (char c) +char locase(char c) { - if (c >= 'A' && c <= 'Z') return c - ('a'-'A'); - else return c; + if (c >= 'A' && c <= 'Z') return c - ('a'-'A'); + else return c; } @@ -138,136 +142,143 @@ static void command (int cmd) { - int i,j,k; - dReal sides[3]; - dMass m; - - cmd = locase (cmd); - if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x' - /* || cmd == 'l' */) { - if (num < NUM) { - i = num; - num++; - } - else { - i = nextobj; - nextobj++; - if (nextobj >= num) nextobj = 0; - - // destroy the body and geoms for slot i - dBodyDestroy (obj[i].body); - for (k=0; k < GPB; k++) { - if (obj[i].geom[k]) dGeomDestroy (obj[i].geom[k]); - } - memset (&obj[i],0,sizeof(obj[i])); - } - - obj[i].body = dBodyCreate (world); - for (k=0; k<3; k++) sides[k] = dRandReal()*0.5+0.1; + int i,j,k; + dReal sides[3]; + dMass m; + bool setBody = false; + + cmd = locase(cmd); + if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x' || cmd == 'y') { + if (num < NUM) { + // new object to be created + i = num; + num++; + } else { + // recycle existing object + i = nextobj++; + nextobj %= num; // wrap-around if needed + + // destroy the body and geoms for slot i + dBodyDestroy (obj[i].body); + obj[i].body = 0; + + for (k=0; k < GPB; k++) + if (obj[i].geom[k]) { + dGeomDestroy(obj[i].geom[k]); + obj[i].geom[k] = 0; + } + } + + obj[i].body = dBodyCreate(world); + + for (k=0; k<3; k++) + sides[k] = dRandReal()*0.5+0.1; + + dMatrix3 R; + if (random_pos) { + dBodySetPosition(obj[i].body, + dRandReal()*2-1,dRandReal()*2-1,dRandReal()+2); + dRFromAxisAndAngle(R,dRandReal()*2.0-1.0,dRandReal()*2.0-1.0, + dRandReal()*2.0-1.0,dRandReal()*10.0-5.0); + } else { + // higher than highest body position + dReal maxheight = 0; + for (k=0; k maxheight) + maxheight = pos[2]; + } + dBodySetPosition(obj[i].body, 0,0,maxheight+1); + dRSetIdentity(R); + //dRFromAxisAndAngle (R,0,0,1,/*dRandReal()*10.0-5.0*/0); + } + + dBodySetRotation(obj[i].body,R); + + if (cmd == 'b') { + + dMassSetBox(&m,DENSITY,sides[0],sides[1],sides[2]); + obj[i].geom[0] = dCreateBox(space,sides[0],sides[1],sides[2]); + + } else if (cmd == 'c') { + + sides[0] *= 0.5; + dMassSetCapsule(&m,DENSITY,3,sides[0],sides[1]); + obj[i].geom[0] = dCreateCapsule (space,sides[0],sides[1]); + + } else if (cmd == 'y') { + + dMassSetCylinder(&m,DENSITY,3,sides[0],sides[1]); + obj[i].geom[0] = dCreateCylinder(space,sides[0],sides[1]); + + } else if (cmd == 's') { + + sides[0] *= 0.5; + dMassSetSphere (&m,DENSITY,sides[0]); + obj[i].geom[0] = dCreateSphere (space,sides[0]); + + } else if (cmd == 'x') { + + setBody = true; + // start accumulating masses for the composite geometries + dMass m2; + dMassSetZero (&m); + + dReal dpos[GPB][3]; // delta-positions for composite geometries + dMatrix3 drot[GPB]; + + // set random delta positions + for (j=0; j maxheight) maxheight = pos[2]; - } - dBodySetPosition (obj[i].body, 0,0,maxheight+1); - dRFromAxisAndAngle (R,0,0,1,dRandReal()*10.0-5.0); - } - dBodySetRotation (obj[i].body,R); - dBodySetData (obj[i].body,(void*)(size_t)i); - if (cmd == 'b') { - dMassSetBox (&m,DENSITY,sides[0],sides[1],sides[2]); - obj[i].geom[0] = dCreateBox (space,sides[0],sides[1],sides[2]); - } - else if (cmd == 'c') { - sides[0] *= 0.5; - dMassSetCapsule (&m,DENSITY,3,sides[0],sides[1]); - obj[i].geom[0] = dCreateCapsule (space,sides[0],sides[1]); - } -/* - // cylinder option not yet implemented - else if (cmd == 'l') { - sides[1] *= 0.5; - dMassSetCapsule (&m,DENSITY,3,sides[0],sides[1]); - obj[i].geom[0] = dCreateCylinder (space,sides[0],sides[1]); - } -*/ - else if (cmd == 's') { - sides[0] *= 0.5; - dMassSetSphere (&m,DENSITY,sides[0]); - obj[i].geom[0] = dCreateSphere (space,sides[0]); - } - else if (cmd == 'x') { - dGeomID g2[GPB]; // encapsulated geometries - dReal dpos[GPB][3]; // delta-positions for encapsulated geometries - - // start accumulating masses for the encapsulated geometries - dMass m2; - dMassSetZero (&m); - - // set random delta positions - for (j=0; j +#include +#include +#include "texturepath.h" + +#ifdef dDOUBLE +#define dsDrawSphere dsDrawSphereD +#define dsDrawBox dsDrawBoxD +#define dsDrawTriangle dsDrawTriangleD +#define dsDrawLine dsDrawLineD +#endif + + + +const dReal ball_radius = 0.4; +const dReal balls_sep = 2; // separation between the balls + +/* Choose one test case + */ +#define TEST_CASE 0 + +#if TEST_CASE == 0 +const dReal track_len = 10; +const dReal track_height = 1; +const dReal track_width = 0.1; +const dReal track_gauge = 1; +const dReal track_elevation = 2; +const dReal track_angle = 80 * M_PI/180.; +const dReal track_incl = 10 * M_PI/180.; +#elif TEST_CASE == 1 +const dReal track_len = 10; +const dReal track_height = 1; +const dReal track_width = 0.1; +const dReal track_gauge = 1.9*ball_radius; +const dReal track_elevation = 2; +const dReal track_angle = 0 * M_PI/180.; +const dReal track_incl = 10 * M_PI/180.; +#elif TEST_CASE == 2 +const dReal track_len = 10; +const dReal track_height = 1; +const dReal track_width = 0.1; +const dReal track_gauge = 1.9*ball_radius; +const dReal track_elevation = 2; +const dReal track_angle = 15 * M_PI/180.; +const dReal track_incl = 10 * M_PI/180.; +#elif TEST_CASE == 3 +const dReal track_len = 10; +const dReal track_height = .7; +const dReal track_width = 0.1; +const dReal track_gauge = track_height*1.1; +const dReal track_elevation = 2; +const dReal track_angle = 90 * M_PI/180.; +const dReal track_incl = 10 * M_PI/180.; +#else +#error "TEST_CAST to a valid value!" +#endif + + + +dWorldID world; +dSpaceID space; +dJointGroupID contact_group; +dGeomID ground; +dGeomID ball1_geom, ball2_geom; +dTriMeshDataID mesh_data; +dGeomID mesh_geom; + +dBodyID ball1_body, ball2_body; + +const unsigned n_box_verts = 8; +dVector3 box_verts[n_box_verts] = { + {-track_len/2, -track_width/2, track_height/2}, // 0 + { track_len/2, -track_width/2, track_height/2}, // 1 + { track_len/2, track_width/2, track_height/2}, // 2 + {-track_len/2, track_width/2, track_height/2}, // 3 + { track_len/2, -track_width/2, -track_height/2}, // 4 + {-track_len/2, -track_width/2, -track_height/2}, // 5 + {-track_len/2, track_width/2, -track_height/2}, // 6 + { track_len/2, track_width/2, -track_height/2} // 7 +}; + +const unsigned n_box_faces = 12; +dTriIndex box_faces[n_box_faces * 3] = { + 0, 1, 2, + 0, 2, 3, + 1, 4, 7, + 1, 7, 2, + 4, 5, 6, + 4, 6, 7, + 5, 0, 3, + 5, 3, 6, + 3, 2, 7, + 3, 7, 6, + 0, 5, 4, + 0, 4, 1 +}; + + +const unsigned n_track_verts = n_box_verts * 2; +const unsigned n_track_faces = n_box_faces * 2; + +dVector3 track_verts[n_track_verts]; +dTriIndex track_faces[n_track_faces * 3]; + + + +void resetBall(dBodyID b, unsigned idx) +{ + dBodySetPosition(b, + 0.5*track_len*cos(track_incl) // Z + - 0.5*track_height*sin(track_incl) + - ball_radius, // X + balls_sep*idx, // Y + track_elevation + ball_radius// Z + + 0.5*track_len*sin(track_incl) + + 0.5*track_height*cos(track_incl)); + dMatrix3 r = {1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0}; + dBodySetRotation(b, r); + dBodySetLinearVel(b, 0, 0, 0); + dBodySetAngularVel(b, 0, 0, 0); + +} + + +void resetSim() +{ + resetBall(ball1_body, 0); + resetBall(ball2_body, 1); +} + + +void start() +{ + dAllocateODEDataForThread(dAllocateMaskAll); + + world = dWorldCreate(); + dWorldSetGravity (world,0,0,-9.8); + + contact_group = dJointGroupCreate(0); + + space = dSimpleSpaceCreate (0); + + + // first, the ground plane + // it has to coincide with the plane we have in drawstuff + ground = dCreatePlane(space, 0, 0, 1, 0); + + + // now a ball + dMass m; + dMassSetSphere(&m, 0.1, ball_radius); + + ball1_geom = dCreateSphere(space, ball_radius); + ball1_body = dBodyCreate(world); + dGeomSetBody(ball1_geom, ball1_body); + dBodySetMass(ball1_body, &m); + + ball2_geom = dCreateSphere(space, ball_radius); + ball2_body = dBodyCreate(world); + dGeomSetBody(ball2_geom, ball2_body); + dBodySetMass(ball2_body, &m); + + + + + // tracks made out of boxes + dGeomID trk; + dMatrix3 r1, r2, r3; + dVector3 ro = {0, -(0.5*track_gauge + 0.5*track_width), track_elevation}; + dMatrix3 s1, s2, s3; + dVector3 so = {0, 0.5*track_gauge + 0.5*track_width, track_elevation}; + + dRFromAxisAndAngle(r1, 1, 0, 0, track_angle); + dRFromAxisAndAngle(r2, 0, 1, 0, -track_incl); + dMultiply0_333(r3, r2, r1); + + dRFromAxisAndAngle(s1, 1, 0, 0, -track_angle); + dRFromAxisAndAngle(s2, 0, 1, 0, -track_incl); + dMultiply0_333(s3, s2, s1); + + trk = dCreateBox(space, track_len, track_width, track_height); + dGeomSetPosition(trk, ro[0], ro[1] + balls_sep, ro[2]); + dGeomSetRotation(trk, r3); + + trk = dCreateBox(space, track_len, track_width, track_height); + dGeomSetPosition(trk, so[0], so[1] + balls_sep, so[2]); + dGeomSetRotation(trk, s3); + + + + + + // tracks made out of trimesh + for (unsigned i=0; i 0.99 // about 8 degrees of difference + && + dCalcPointsDistance3(contacts[i].geom.pos, contacts[j].geom.pos) < epsilon) { + // they are too close + closest_point = j; + //clog << "found close points: " << j << " and " << i << endl; + break; + } + } + + if (closest_point != i) { + // we discard one of the points + if (contacts[i].geom.depth > contacts[closest_point].geom.depth) + // the new point is deeper, copy it over closest_point + contacts[closest_point] = contacts[i]; + } else + contacts[new_n++] = contacts[i]; // the point is preserved + } + //clog << "reduced from " << n << " to " << new_n << endl; + n = new_n; + + for (int i=0; i +#include +#include "texturepath.h" + +#ifdef dDOUBLE +#define dsDrawCylinder dsDrawCylinderD +#define dsDrawLine dsDrawLineD +#define dsDrawSphere dsDrawSphereD +#endif + +dReal theta = M_PI / 4; +dReal ratio = 1, speed = 5, rho_1 = 1, rho_2 = 1, backlash = 0.1; +int mode = 0; + +dWorldID world; +dSpaceID space; +dBodyID body1, body2; +dGeomID geom1, geom2; +dJointID hinge1, hinge2, transmission; +dJointFeedback feedback; + +void setup() { + dMatrix3 R; + + switch (mode) { + case 0: + // Parallel axes. + + dBodySetPosition(body1, 1, 0, 1); + dBodySetPosition(body2, -1, 0, 1); + + dRSetIdentity (R); + dBodySetRotation (body1, R); + dBodySetRotation (body2, R); + + dJointSetHingeAnchor(hinge2, -1, 0, 1); + dJointSetHingeAxis(hinge2, 0, 0, 1); + + dJointSetHingeAnchor(hinge1, 1, 0, 1); + dJointSetHingeAxis(hinge1, 0, 0, 1); + + dJointSetTransmissionMode(transmission, dTransmissionParallelAxes); + dJointSetTransmissionRatio(transmission, ratio); + dJointSetTransmissionAnchor1(transmission, 1, 0, 1); + dJointSetTransmissionAnchor2(transmission, -1, 0, 1); + dJointSetTransmissionAxis(transmission, 0, 0, 1); + + break; + case 1: + // Intersecting axes. + + dBodySetPosition(body1, 1, 0, 1); + dBodySetPosition(body2, -1, 0, 2); + + dRSetIdentity (R); + dBodySetRotation (body1, R); + + dRFromZAxis (R, cos(theta), 0, sin(theta)); + dBodySetRotation (body2, R); + + dJointSetHingeAnchor(hinge2, -1, 0, 2); + dJointSetHingeAxis(hinge2, cos(theta), 0, sin(theta)); + + dJointSetHingeAnchor(hinge1, 1, 0, 1); + dJointSetHingeAxis(hinge1, 0, 0, 1); + + dJointSetTransmissionMode(transmission, dTransmissionIntersectingAxes); + dJointSetTransmissionAnchor1(transmission, 1, 0, 1); + dJointSetTransmissionAnchor2(transmission, -1, 0, 2); + dJointSetTransmissionAxis1(transmission, 0, 0, -1); + dJointSetTransmissionAxis2(transmission, cos(theta), 0, sin(theta)); + + break; + case 2: + // Chain. + + dBodySetPosition(body1, 2, 0, 1); + dBodySetPosition(body2, -2, 0, 1); + + dRSetIdentity (R); + dBodySetRotation (body1, R); + dBodySetRotation (body2, R); + + dJointSetHingeAnchor(hinge2, -2, 0, 1); + dJointSetHingeAxis(hinge2, 0, 0, 1); + + dJointSetHingeAnchor(hinge1, 2, 0, 1); + dJointSetHingeAxis(hinge1, 0, 0, 1); + + dJointSetTransmissionMode(transmission, dTransmissionChainDrive); + dJointSetTransmissionAnchor1(transmission, 2, 0, 1); + dJointSetTransmissionAnchor2(transmission, -2, 0, 1); + dJointSetTransmissionRadius1(transmission, rho_1); + dJointSetTransmissionRadius2(transmission, rho_2); + dJointSetTransmissionAxis(transmission, 0, 0, 1); + + break; + } + + dJointSetTransmissionBacklash(transmission, backlash); + + dJointSetHingeParam(hinge2, dParamVel, speed); + dJointSetHingeParam(hinge2, dParamFMax, 50); + + dJointSetHingeParam(hinge1, dParamVel, 0); + dJointSetHingeParam(hinge1, dParamFMax, 2); + + dBodySetLinearVel(body1, 0, 0, 0); + dBodySetLinearVel(body2, 0, 0, 0); + dBodySetAngularVel(body1, 0, 0, 0); + dBodySetAngularVel(body2, 0, 0, 0); +} + +void start() +{ + dMass mass; + + world = dWorldCreate(); + dWorldSetGravity (world,0,0,-9.8); + + dWorldSetERP(world, 0.2); + + space = dSimpleSpaceCreate (0); + + body1 = dBodyCreate(world); + body2 = dBodyCreate(world); + + dBodySetFiniteRotationMode(body1, 1); + dBodySetFiniteRotationMode(body2, 1); + + geom1 = dCreateCylinder(space, 0.2, 0.5); + dGeomSetBody(geom1, body1); + dMassSetCylinder(&mass, 100, 3, 0.2, 0.5); + dBodySetMass(body1, &mass); + + geom2 = dCreateCylinder(space, 0.2, 0.5); + dGeomSetBody(geom2, body2); + dMassSetCylinder(&mass, 100, 3, 0.2, 0.5); + dBodySetMass(body2, &mass); + + hinge1 = dJointCreateHinge(world, 0); + dJointAttach(hinge1, body1, 0); + + hinge2 = dJointCreateHinge(world, 0); + dJointAttach(hinge2, body2, 0); + + transmission = dJointCreateTransmission(world, 0); + dJointAttach(transmission, body1, body2); + dJointSetFeedback(transmission, &feedback); + + setup(); + + // initial camera position + static float xyz[3] = {1.15,-2.78,4.1}; + static float hpr[3] = {105,-45.5,0}; + dsSetViewpoint (xyz,hpr); + + fprintf (stderr, + "The green wheel is driving the red one. To control it use the following:\n" + " '[' : decrease wheel ratio\n" + " ']' : increase wheel ratio\n" + " ',' : decrease driving wheel speed\n" + " '.' : increase driving wheel speed\n" + " '-' : decrease backlash\n" + " '=' : increase backlash\n" + " '1' : switch to parallel axes gears mode\n" + " '2' : switch to intersecting axes gears mode\n" + " '3' : switch to chain (or belt) mode\n" +); +} + +void stop() +{ + dSpaceDestroy(space); + + dWorldDestroy(world); +} + +void drawGeom(dGeomID g) +{ + int gclass = dGeomGetClass(g); + const dReal *pos = dGeomGetPosition(g); + const dReal *rot = dGeomGetRotation(g); + + switch (gclass) { + case dCylinderClass: + { + dReal length, radius; + + if (g == geom1) { + dsSetColorAlpha(1, 0, 0, 1); + } else { + dsSetColorAlpha(0, 1, 0, 1); + } + + dsSetTexture (DS_WOOD); + dGeomCylinderGetParams(g, &radius, &length); + dsDrawCylinder(pos, rot, length, radius); + break; + } + + default: + { + abort(); + } + } +} + +void simLoop(int pause) +{ + if (!pause) { + + const dReal step = 0.003; + const unsigned nsteps = 4; + + for (unsigned i=0; i 0.125) { + ratio *= 0.5; + + fprintf (stderr, "Gear ratio set to %.3f.\n", ratio); + } + break; + case dTransmissionIntersectingAxes: + if (theta > 0.1) { + theta -= 0.1; + + fprintf (stderr, "Gear angle set to %.3f deg.\n", + theta / M_PI * 180); + } + break; + case dTransmissionChainDrive: + if (rho_2 > 0.125) { + rho_2 /= 2; + + fprintf (stderr, "Sprocket ratio set to %.3f.\n", rho_2 / rho_1); + } + break; + } + + setup(); + } else if (cmd == ']') { + switch(mode) { + case dTransmissionParallelAxes: + if (ratio < 8) { + ratio *= 2; + + fprintf (stderr, "Gear ratio set to %.3f.\n", ratio); + } + break; + case dTransmissionIntersectingAxes: + if (theta < 0.9) { + theta += 0.1; + + fprintf (stderr, "Gear angle set to %.3f deg.\n", + theta / M_PI * 180); + } + break; + case dTransmissionChainDrive: + if (rho_2 < 2) { + rho_2 *= 2; + + fprintf (stderr, "Sprocket ratio set to %.3f.\n", rho_2 / rho_1); + } + break; + } + + setup(); + } else if (cmd == '.') { + speed += 5; + + fprintf (stderr, "Driving wheel speed set to %g rad/s.\n", speed); + + dJointSetHingeParam(hinge2, dParamVel, speed); + } else if (cmd == ',') { + speed -= 5; + + fprintf (stderr, "Driving wheel speed set to %g rad/s.\n", speed); + + dJointSetHingeParam(hinge2, dParamVel, speed); + } else if (cmd == '/') { + if (dJointGetHingeParam(hinge2, dParamFMax) > 0) { + dJointSetHingeParam(hinge2, dParamFMax, 0); + } else { + dJointSetHingeParam(hinge2, dParamFMax, 50); + } + + } else if (cmd == '-') { + backlash -= 0.1; + + fprintf (stderr, "Backlash set to %g m.\n", backlash); + + dJointSetTransmissionBacklash(transmission, backlash); + } else if (cmd == '=') { + backlash += 0.1; + + fprintf (stderr, "Backlash set to %g m.\n", backlash); + + dJointSetTransmissionBacklash(transmission, backlash); + } else if (cmd == '1') { + mode = dTransmissionParallelAxes; + setup(); + } else if (cmd == '2') { + mode = dTransmissionIntersectingAxes; + setup(); + } else if (cmd == '3') { + mode = dTransmissionChainDrive; + setup(); + } +} + +int main(int argc, char **argv) +{ + // setup pointers to drawstuff callback functions + dsFunctions fn; + fn.version = DS_VERSION; + fn.start = &start; + fn.step = &simLoop; + fn.command = &command; + fn.stop = stop; + fn.path_to_textures = DRAWSTUFF_TEXTURE_PATH; + + // create world + dInitODE(); + + // run demo + dsSimulationLoop (argc, argv, 800, 600, &fn); + + dCloseODE(); + return 0; +} diff -Nru ode-0.11.1/ode/demo/demo_trimesh.cpp ode-0.14/ode/demo/demo_trimesh.cpp --- ode-0.11.1/ode/demo/demo_trimesh.cpp 2009-05-24 22:03:58.000000000 +0000 +++ ode-0.14/ode/demo/demo_trimesh.cpp 2015-12-18 14:09:27.000000000 +0000 @@ -30,6 +30,53 @@ #pragma warning(disable:4244 4305) // for VC++, no precision loss complaints #endif +//<---- Convex Object +static const dReal planes[] = // planes for a cube +{ + 1.0f ,0.0f ,0.0f ,0.25f, + 0.0f ,1.0f ,0.0f ,0.25f, + 0.0f ,0.0f ,1.0f ,0.25f, + 0.0f ,0.0f ,-1.0f,0.25f, + 0.0f ,-1.0f,0.0f ,0.25f, + -1.0f,0.0f ,0.0f ,0.25f + /* + 1.0f ,0.0f ,0.0f ,2.0f, + 0.0f ,1.0f ,0.0f ,1.0f, + 0.0f ,0.0f ,1.0f ,1.0f, + 0.0f ,0.0f ,-1.0f,1.0f, + 0.0f ,-1.0f,0.0f ,1.0f, + -1.0f,0.0f ,0.0f ,0.0f + */ +}; +static const unsigned int planecount=6; + +static const dReal points[] = // points for a cube +{ + 0.25f,0.25f,0.25f, + -0.25f,0.25f,0.25f, + + 0.25f,-0.25f,0.25f, + -0.25f,-0.25f,0.25f, + + 0.25f,0.25f,-0.25f, + -0.25f,0.25f,-0.25f, + + 0.25f,-0.25f,-0.25f, + -0.25f,-0.25f,-0.25f, +}; +static const unsigned int pointcount=8; + +static const unsigned int polygons[] = //Polygons for a cube (6 squares) + { + 4,0,2,6,4, // positive X + 4,1,0,4,5, // positive Y + 4,0,1,3,2, // positive Z + 4,3,1,5,7, // negative X + 4,2,3,7,6, // negative Y + 4,5,4,6,7, // negative Z + }; +//----> Convex Object + // select correct drawing functions #ifdef dDOUBLE @@ -39,6 +86,7 @@ #define dsDrawCapsule dsDrawCapsuleD #define dsDrawLine dsDrawLineD #define dsDrawTriangle dsDrawTriangleD +#define dsDrawConvex dsDrawConvexD #endif @@ -82,7 +130,7 @@ // this is called by dSpaceCollide when two objects in space are // potentially colliding. -static void nearCallback (void *data, dGeomID o1, dGeomID o2) +static void nearCallback (void *, dGeomID o1, dGeomID o2) { int i; // if (o1->body && o2->body) return; @@ -143,6 +191,7 @@ printf (" b for box.\n"); printf (" s for sphere.\n"); printf (" c for cylinder.\n"); + printf( " v for a convex.\n" ); printf (" x for a composite object.\n"); printf ("To select an object, press space.\n"); printf ("To disable the selected object, press d.\n"); @@ -167,9 +216,10 @@ int i,j,k; dReal sides[3]; dMass m; + bool setBody = false; cmd = locase (cmd); - if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x' + if (cmd == 'b' || cmd == 's' || cmd == 'c' || cmd == 'x' || cmd == 'v' /* || cmd == 'l' */) { if (num < NUM) { i = num; @@ -233,66 +283,75 @@ obj[i].geom[0] = dCreateSphere (space,sides[0]); } else if (cmd == 'x') { - dGeomID g2[GPB]; // encapsulated geometries - dReal dpos[GPB][3]; // delta-positions for encapsulated geometries - - // start accumulating masses for the encapsulated geometries - dMass m2; - dMassSetZero (&m); - - // set random delta positions - for (j=0; j