You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(18) |
Apr
(29) |
May
(32) |
Jun
(17) |
Jul
(34) |
Aug
(12) |
Sep
(39) |
Oct
(9) |
Nov
(20) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(13) |
Feb
(9) |
Mar
(1) |
Apr
(17) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(9) |
Sep
(65) |
Oct
(22) |
Nov
(23) |
Dec
(28) |
2008 |
Jan
(18) |
Feb
(4) |
Mar
(69) |
Apr
(33) |
May
(11) |
Jun
(39) |
Jul
(22) |
Aug
(13) |
Sep
(1) |
Oct
(43) |
Nov
(5) |
Dec
(13) |
2009 |
Jan
(31) |
Feb
(12) |
Mar
(6) |
Apr
(6) |
May
(9) |
Jun
(9) |
Jul
(1) |
Aug
(5) |
Sep
(5) |
Oct
(11) |
Nov
(4) |
Dec
(6) |
2010 |
Jan
(8) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(5) |
Aug
(17) |
Sep
(6) |
Oct
(5) |
Nov
(6) |
Dec
(5) |
2011 |
Jan
(13) |
Feb
(2) |
Mar
(4) |
Apr
(12) |
May
(16) |
Jun
(4) |
Jul
(3) |
Aug
|
Sep
(4) |
Oct
(8) |
Nov
(5) |
Dec
(12) |
2012 |
Jan
(2) |
Feb
(8) |
Mar
(13) |
Apr
(6) |
May
(4) |
Jun
(3) |
Jul
(9) |
Aug
(1) |
Sep
|
Oct
|
Nov
(3) |
Dec
(16) |
2013 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dan...@us...> - 2012-03-29 04:39:49
|
Revision: 1879 http://opende.svn.sourceforge.net/opende/?rev=1879&view=rev Author: danielosmari Date: 2012-03-29 04:39:41 +0000 (Thu, 29 Mar 2012) Log Message: ----------- removed function tests that we don't use nor provide alternatives Modified Paths: -------------- trunk/configure.in Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2012-03-17 00:14:15 UTC (rev 1878) +++ trunk/configure.in 2012-03-29 04:39:41 UTC (rev 1879) @@ -284,13 +284,8 @@ 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 strchr strstr pthread_attr_setstacklazy]) +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]) AC_FUNC_ALLOCA -AC_FUNC_MALLOC -AC_FUNC_OBSTACK -AC_FUNC_REALLOC -AC_FUNC_SELECT_ARGTYPES -AC_FUNC_VPRINTF use_ou="yes" AC_ARG_ENABLE([ou], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-03-17 00:14:24
|
Revision: 1878 http://opende.svn.sourceforge.net/opende/?rev=1878&view=rev Author: oleh_derevenko Date: 2012-03-17 00:14:15 +0000 (Sat, 17 Mar 2012) Log Message: ----------- Threaded execution support interface added. Optional built-in threading implementation added. Modified Paths: -------------- trunk/CHANGELOG.txt trunk/build/config-default.h trunk/build/premake4.lua trunk/configure.in trunk/include/ode/Makefile.am trunk/include/ode/objects.h trunk/include/ode/ode.h trunk/ode/demo/demo_boxstack.cpp trunk/ode/demo/demo_heightfield.cpp trunk/ode/demo/demo_moving_trimesh.cpp trunk/ode/demo/demo_trimesh.cpp trunk/ode/src/Makefile.am trunk/ode/src/objects.cpp trunk/ode/src/objects.h trunk/ode/src/ode.cpp trunk/ode/src/odeinit.cpp trunk/ode/src/util.cpp trunk/ode/src/util.h Added Paths: ----------- trunk/include/ode/threading.h trunk/include/ode/threading_impl.h trunk/ode/src/threading_atomics_provs.h trunk/ode/src/threading_base.cpp trunk/ode/src/threading_base.h trunk/ode/src/threading_fake_sync.h trunk/ode/src/threading_impl.cpp trunk/ode/src/threading_impl.h trunk/ode/src/threading_impl_posix.h trunk/ode/src/threading_impl_templates.h trunk/ode/src/threading_impl_win.h trunk/ode/src/threading_pool_posix.cpp trunk/ode/src/threading_pool_win.cpp Modified: trunk/CHANGELOG.txt =================================================================== --- trunk/CHANGELOG.txt 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/CHANGELOG.txt 2012-03-17 00:14:15 UTC (rev 1878) @@ -8,6 +8,15 @@ * keep the format consistent (79 char width, M/D/Y date format). ------------------------------------------------------------------------------ +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 Modified: trunk/build/config-default.h =================================================================== --- trunk/build/config-default.h 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/build/config-default.h 2012-03-17 00:14:15 UTC (rev 1878) @@ -18,18 +18,23 @@ * 32 bit indices. Use the dTriIndex type to * detect the correct index size. * - * dTRIMESH_OPCODE_USE_NEW_TRIMESH_TRIMESH_COLLIDER (experimental)- - * Use an alternative trimesh-trimesh collider - * which should yield better results. + * dTRIMESH_OPCODE_USE_NEWOLD_TRIMESH_TRIMESH_COLLIDER + * Use old implementation of trimesh-trimesh collider + * (for backward compatibility only) * - * dOU_ENABLED (experimental) - * dATOMICS_ENABLED (experimental) - * dTLS_ENABLED (experimental) + * dOU_ENABLED - always enabled + * dATOMICS_ENABLED - always enabled + * dTLS_ENABLED * 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). + * ******************************************************************/ #define dTRIMESH_ENABLED 1 @@ -38,11 +43,13 @@ #define dTRIMESH_OPCODE_USE_OLD_TRIMESH_TRIMESH_COLLIDER 0 -/* #define dOU_ENABLED 1 */ -/* #define dATOMICS_ENABLED 1 */ +#define dOU_ENABLED 1 +#define dATOMICS_ENABLED 1 /* #define dTLS_ENABLED 1 */ +/* #define dBUILTIN_THREADING_IMPL_ENABLED 1 */ + /****************************************************************** * SYSTEM SETTINGS - you shouldn't need to change these. If you * run into an issue with these settings, please report it to Modified: trunk/build/premake4.lua =================================================================== --- trunk/build/premake4.lua 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/build/premake4.lua 2012-03-17 00:14:15 UTC (rev 1878) @@ -94,10 +94,15 @@ newoption { trigger = "with-ou", - description = "Use TLS for global caches (experimental)" + 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 = "16bit-indices", description = "Use 16-bit indices for trimeshes (default is 32-bit)" } @@ -188,6 +193,8 @@ "../ode/src" } + defines { "_MT" } + -- apply the configuration list built above configurations (configs) @@ -286,6 +293,11 @@ "../ode/src/collision_std.cpp", } +-- Include OU files by default to enable atomics +-- configuration { "with-ou" } + files { "../ou/**.h", "../ou/**.cpp" } + defines { "_OU_NAMESPACE=odeou" } + configuration { "no-dif" } excludes { "../ode/src/export-dif.cpp" } @@ -311,10 +323,6 @@ configuration { "not no-trimesh", "not with-gimpact" } files { "../OPCODE/**.h", "../OPCODE/**.cpp" } - configuration { "with-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_CYL_CYL" } @@ -333,6 +341,9 @@ kind "SharedLib" defines "ODE_DLL" + configuration { "*DLL" } + defines "_DLL" + configuration { "Debug" } targetname "oded" @@ -368,11 +379,13 @@ end if _OPTIONS["with-ou"] 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") text = string.gsub(text, "/%* #define dTLS_ENABLED 1 %*/", "#define dTLS_ENABLED 1") end + if _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 Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/configure.in 2012-03-17 00:14:15 UTC (rev 1878) @@ -284,7 +284,7 @@ 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 strchr strstr]) +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 strchr strstr pthread_attr_setstacklazy]) AC_FUNC_ALLOCA AC_FUNC_MALLOC AC_FUNC_OBSTACK @@ -292,11 +292,12 @@ AC_FUNC_SELECT_ARGTYPES AC_FUNC_VPRINTF +use_ou="yes" 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 TLS for global caches (allows threaded collision checks for separated spaces)] ), - use_ou=$enableval,use_ou=no) + use_ou_tls=$enableval,use_ou_tls=no) if test x$use_ou = xyes then OU_NAMESPACE=odeou @@ -304,7 +305,10 @@ 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]) + 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*) @@ -346,6 +350,15 @@ AC_CONFIG_SUBDIRS([ou]) AM_CONDITIONAL(ENABLE_OU, test x$use_ou = xyes) +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 col_cylinder_cylinder=none col_box_cylinder=default @@ -530,7 +543,8 @@ 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 " TLS for global caches: $use_ou_tls" +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" Modified: trunk/include/ode/Makefile.am =================================================================== --- trunk/include/ode/Makefile.am 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/include/ode/Makefile.am 2012-03-17 00:14:15 UTC (rev 1878) @@ -20,6 +20,8 @@ export-dif.h \ ode.h \ timer.h \ + threading.h \ + threading_impl.h \ odeconfig.h EXTRA_DIST = README Modified: trunk/include/ode/objects.h =================================================================== --- trunk/include/ode/objects.h 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/include/ode/objects.h 2012-03-17 00:14:15 UTC (rev 1878) @@ -26,6 +26,7 @@ #include <ode/common.h> #include <ode/mass.h> #include <ode/contact.h> +#include <ode/threading.h> #ifdef __cplusplus extern "C" { @@ -116,7 +117,44 @@ ODE_API dReal dWorldGetCFM (dWorldID); +#define dWORLDSTEP_THREADCOUNT_UNLIMITED 0U + /** + * @brief Set maximum threads to be used for island stepping + * + * 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 + * @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 @@ -141,6 +179,11 @@ * 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. @@ -177,6 +220,7 @@ */ ODE_API void dWorldCleanupWorkingMemory(dWorldID w); + #define dWORLDSTEP_RESERVEFACTOR_DEFAULT 1.2f #define dWORLDSTEP_RESERVESIZE_DEFAULT 65536U @@ -287,6 +331,22 @@ 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 Modified: trunk/include/ode/ode.h =================================================================== --- trunk/include/ode/ode.h 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/include/ode/ode.h 2012-03-17 00:14:15 UTC (rev 1878) @@ -42,6 +42,8 @@ #include <ode/odecpp.h> #include <ode/collision_space.h> #include <ode/collision.h> +#include <ode/threading.h> +#include <ode/threading_impl.h> #include <ode/odecpp_collision.h> #include <ode/export-dif.h> Added: trunk/include/ode/threading.h =================================================================== --- trunk/include/ode/threading.h (rev 0) +++ trunk/include/ode/threading.h 2012-03-17 00:14:15 UTC (rev 1878) @@ -0,0 +1,405 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... Web: www.q12.org * + * * + * Threading support header file. * + * Copyright (C) 2011-2012 Oleh Derevenko. All rights reserved. * + * e-mail: od...@el... (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 <ode/odeconfig.h> + + +#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_ Property changes on: trunk/include/ode/threading.h ___________________________________________________________________ Added: svn:mime-type + text/cpp Added: svn:eol-style + native Added: trunk/include/ode/threading_impl.h =================================================================== --- trunk/include/ode/threading_impl.h (rev 0) +++ trunk/include/ode/threading_impl.h 2012-03-17 00:14:15 UTC (rev 1878) @@ -0,0 +1,264 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... Web: www.q12.org * + * * + * Builtin ODE threading implementation header. * + * Copyright (C) 2011-2012 Oleh Derevenko. All rights reserved. * + * e-mail: od...@el... (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 <ode/odeconfig.h> +#include <ode/threading.h> + + +#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_ Property changes on: trunk/include/ode/threading_impl.h ___________________________________________________________________ Added: svn:mime-type + text/cpp Added: svn:eol-style + native Modified: trunk/ode/demo/demo_boxstack.cpp =================================================================== --- trunk/ode/demo/demo_boxstack.cpp 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/ode/demo/demo_boxstack.cpp 2012-03-17 00:14:15 UTC (rev 1878) @@ -648,9 +648,20 @@ dCreatePlane (space,0,0,1,0); memset (obj,0,sizeof(obj)); + 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); Modified: trunk/ode/demo/demo_heightfield.cpp =================================================================== --- trunk/ode/demo/demo_heightfield.cpp 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/ode/demo/demo_heightfield.cpp 2012-03-17 00:14:15 UTC (rev 1878) @@ -745,9 +745,20 @@ dGeomSetRotation( gheight, R ); dGeomSetPosition( gheight, pos[0], pos[1], pos[2] ); + 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); Modified: trunk/ode/demo/demo_moving_trimesh.cpp =================================================================== --- trunk/ode/demo/demo_moving_trimesh.cpp 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/ode/demo/demo_moving_trimesh.cpp 2012-03-17 00:14:15 UTC (rev 1878) @@ -568,9 +568,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); Modified: trunk/ode/demo/demo_trimesh.cpp =================================================================== --- trunk/ode/demo/demo_trimesh.cpp 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/ode/demo/demo_trimesh.cpp 2012-03-17 00:14:15 UTC (rev 1878) @@ -529,9 +529,20 @@ dGeomRaySet(Ray, Origin[0], Origin[1], Origin[2], Direction[0], Direction[1], Direction[2]); + 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); Modified: trunk/ode/src/Makefile.am =================================================================== --- trunk/ode/src/Makefile.am 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/ode/src/Makefile.am 2012-03-17 00:14:15 UTC (rev 1878) @@ -58,6 +58,15 @@ sphere.cpp \ step.cpp step.h \ timer.cpp \ + threading_atomics_provs.h \ + threading_fake_sync.h \ + threading_impl_templates.h \ + threading_impl_posix.h \ + threading_impl_win.h \ + threading_impl.cpp threading_impl.h \ + threading_pool_posix.cpp \ + threading_pool_win.cpp \ + threading_base.cpp threading_base.h \ util.cpp util.h Modified: trunk/ode/src/objects.cpp =================================================================== --- trunk/ode/src/objects.cpp 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/ode/src/objects.cpp 2012-03-17 00:14:15 UTC (rev 1878) @@ -24,12 +24,14 @@ #include <ode/common.h> +#include <ode/threading_impl.h> #include <ode/objects.h> #include <ode/matrix.h> #include "config.h" #include "objects.h" #include "util.h" +#include "threading_impl.h" #define dWORLD_DEFAULT_GLOBAL_ERP REAL(0.2) @@ -42,6 +44,8 @@ #error dSINGLE or dDOUBLE must be defined #endif +static dThreadingImplementationID g_world_default_threading_impl = NULL; +static const dThreadingFunctionsInfo *g_world_default_threading_functions = NULL; dObject::~dObject() @@ -81,6 +85,7 @@ dxWorld::dxWorld(): dBase(), + dxThreadingBase(), firstbody(NULL), firstjoint(NULL), nb(0), @@ -89,12 +94,15 @@ global_cfm(dWORLD_DEFAULT_GLOBAL_CFM), adis(NULL), body_flags(0), + islands_max_threads(dWORLDSTEP_THREADCOUNT_UNLIMITED), wmem(NULL), qs(NULL), contactp(NULL), dampingp(NULL), max_angular_speed(dInfinity) { + dxThreadingBase::SetThreadingDefaultImplProvider(this); + dSetZero (gravity, 4); } @@ -102,8 +110,75 @@ { if (wmem) { + wmem->CleanupWorldReferences(this); wmem->Release(); } } +bool dxWorld::InitializeDefaultThreading() +{ + dIASSERT(g_world_default_threading_impl == NULL); + bool init_result = false; + + dThreadingImplementationID threading_impl = dThreadingAllocateSelfThreadedImplementation(); + + if (threading_impl != NULL) + { + g_world_default_threading_functions = dThreadingImplementationGetFunctions(threading_impl); + g_world_default_threading_impl = threading_impl; + + init_result = true; + } + + return init_result; +} + +void dxWorld::FinalizeDefaultThreading() +{ + dThreadingImplementationID threading_impl = g_world_default_threading_impl; + + if (threading_impl != NULL) + { + dThreadingFreeImplementation(threading_impl); + + g_world_default_threading_functions = NULL; + g_world_default_threading_impl = NULL; + } +} + +void dxWorld::AssignThreadingImpl(const dxThreadingFunctionsInfo *functions_info, dThreadingImplementationID threading_impl) +{ + if (wmem != NULL) + { + // Free objects allocated with old threading + wmem->CleanupWorldReferences(this); + } + + dxThreadingBase::AssignThreadingImpl(functions_info, threading_impl); +} + +unsigned dxWorld::GetThreadingIslandsMaxThreadsCount(unsigned *out_active_thread_count_ptr/*=NULL*/) const +{ + unsigned active_thread_count = RetrieveThreadingThreadCount(); + if (out_active_thread_count_ptr != NULL) + { + *out_active_thread_count_ptr = active_thread_count; + } + + return islands_max_threads == dWORLDSTEP_THREADCOUNT_UNLIMITED + ? active_thread_count + : (islands_max_threads < active_thread_count ? islands_max_threads : active_thread_count); +} + +dxWorldProcessContext *dxWorld::UnsafeGetWorldProcessingContext() const +{ + return wmem->GetWorldProcessingContext(); +} + +const dxThreadingFunctionsInfo *dxWorld::RetrieveThreadingDefaultImpl(dThreadingImplementationID &out_default_impl) +{ + out_default_impl = g_world_default_threading_impl; + return g_world_default_threading_functions; +} + Modified: trunk/ode/src/objects.h =================================================================== --- trunk/ode/src/objects.h 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/ode/src/objects.h 2012-03-17 00:14:15 UTC (rev 1878) @@ -30,8 +30,11 @@ #include <ode/memory.h> #include <ode/mass.h> #include "array.h" +#include "threading_base.h" + class dxStepWorkingMemory; +class dxWorldProcessContext; // some body flags @@ -154,7 +157,7 @@ }; -struct dxWorld : public dBase { +struct dxWorld : public dBase, public dxThreadingBase, private dxIThreadingDefaultImplProvider { dxBody *firstbody; // body linked list dxJoint *firstjoint; // joint linked list int nb,nj; // number of bodies and joints in lists @@ -163,6 +166,7 @@ dReal global_cfm; // global constraint force mixing parameter dxAutoDisable adis; // auto-disable parameters int body_flags; // flags for new bodies + unsigned islands_max_threads; // maximum threads to allocate for island processing dxStepWorkingMemory *wmem; // Working memory object for dWorldStep/dWorldQuickStep dxQuickStepParameters qs; @@ -172,8 +176,18 @@ dxWorld(); - ~dxWorld(); + virtual ~dxWorld(); // Compilers emit warnings if a class with virtual methods does not have a virtual destructor :( + + static bool InitializeDefaultThreading(); + static void FinalizeDefaultThreading(); + + void AssignThreadingImpl(const dxThreadingFunctionsInfo *functions_info, dThreadingImplementationID threading_impl); + unsigned GetThreadingIslandsMaxThreadsCount(unsigned *out_active_thread_count_ptr=NULL) const; + dxWorldProcessContext *UnsafeGetWorldProcessingContext() const; + +private: // dxIThreadingDefaultImplProvider + virtual const dxThreadingFunctionsInfo *RetrieveThreadingDefaultImpl(dThreadingImplementationID &out_default_impl); }; -#endif +#endif // #ifndef _ODE__PRIVATE_OBJECTS_H_ Modified: trunk/ode/src/ode.cpp =================================================================== --- trunk/ode/src/ode.cpp 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/ode/src/ode.cpp 2012-03-17 00:14:15 UTC (rev 1878) @@ -1639,6 +1639,18 @@ } +void dWorldSetStepIslandsProcessingMaxThreadCount(dWorldID w, unsigned count) +{ + dAASSERT (w); + w->islands_max_threads = count; +} + +unsigned dWorldGetStepIslandsProcessingMaxThreadCount(dWorldID w) +{ + dAASSERT (w); + return w->islands_max_threads; +} + int dWorldUseSharedWorkingMemory(dWorldID w, dWorldID from_world) { dUASSERT (w,"bad world argument"); @@ -1728,7 +1740,7 @@ int dWorldSetStepMemoryManager(dWorldID w, const dWorldStepMemoryFunctionsInfo *memfuncs) { dUASSERT (w,"bad world argument"); - dUASSERT (!memfuncs || memfuncs->struct_size >= sizeof(*memfuncs), "Bad functions info"); + dUASSERT (!memfuncs || memfuncs->struct_size >= sizeof(*memfuncs), "Bad memory functions info"); bool result = false; @@ -1755,7 +1767,16 @@ return result; } +void dWorldSetStepThreadingImplementation(dWorldID w, + const dxThreadingFunctionsInfo *functions_info, dThreadingImplementationID threading_impl) +{ + dUASSERT (w,"bad world argument"); + dUASSERT (!functions_info || functions_info->struct_size >= sizeof(*functions_info), "Bad threading functions info"); + w->AssignThreadingImpl(functions_info, threading_impl); +} + + int dWorldStep (dWorldID w, dReal stepsize) { dUASSERT (w,"bad world argument"); @@ -1766,13 +1787,12 @@ dxWorldProcessIslandsInfo islandsinfo; if (dxReallocateWorldProcessContext (w, islandsinfo, stepsize, &dxEstimateStepMemoryRequirements)) { - dxProcessIslands (w, islandsinfo, stepsize, &dInternalStepIsland); - + if (dxProcessIslands (w, islandsinfo, stepsize, &dInternalStepIsland)) + { result = true; } + } - dxCleanupWorldProcessContext (w); - return result; } @@ -1786,13 +1806,12 @@ dxWorldProcessIslandsInfo islandsinfo; if (dxReallocateWorldProcessContext (w, islandsinfo, stepsize, &dxEstimateQuickStepMemoryRequirements)) { - dxProcessIslands (w, islandsinfo, stepsize, &dxQuickStepper); - + if (dxProcessIslands (w, islandsinfo, stepsize, &dxQuickStepper)) + { result = true; } + } - dxCleanupWorldProcessContext (w); - return result; } @@ -2191,6 +2210,12 @@ REGISTER_EXTENSION( ODE_EXT_mt_collisions ) #endif // dTLS_ENABLED +REGISTER_EXTENSION( ODE_EXT_threading ) + +#if dBUILTIN_THREADING_IMPL_ENABLED +REGISTER_EXTENSION( ODE_THR_builtin_impl ) +#endif // #if dBUILTIN_THREADING_IMPL_ENABLED + //********************************** // EXTENSION LIST END Modified: trunk/ode/src/odeinit.cpp =================================================================== --- trunk/ode/src/odeinit.cpp 2012-03-13 08:19:03 UTC (rev 1877) +++ trunk/ode/src/odeinit.cpp 2012-03-17 00:14:15 UTC (rev 1878) @@ -36,6 +36,7 @@ #include "collision_trimesh_internal.h" #include "odetls.h" #include "odeou.h" +#include "objects.h" #include "util.h" @@ -229,6 +230,8 @@ bool bTlsInitialized = false; #endif + bool bWorldThreadingInitialized = false; + do { bool bAnyModeAlreadyInitialized = IsODEAnyModeInitialized(); @@ -265,6 +268,13 @@ if (!bAnyModeAlreadyInitialized) { + if (!dxWorld::InitializeDefaultThreading()) + { + break; + } + + bWorldThreadingInitialized = true; + #if dTRIMESH_ENABLED && dTRIMESH_OPCODE if (!Opcode::InitOpcode()) { @@ -285,6 +295,11 @@ if (!bResult) { + if (bWorldThreadingInitialized) + { + dxWorld::FinalizeDefaultThreading(); + } + #if dTLS_ENABLED if (bTlsInitialized) { @@ -371,6 +386,8 @@ Opcode::CloseOpcode(); #endif + + dxWorld::FinalizeDefaultThreading(); } #if dTLS_ENABLED Added: trunk/ode/src/threading_atomics_provs.h =================================================================== --- trunk/ode/src/threading_atomics_provs.h (rev 0) +++ trunk/ode/src/threading_atomics_provs.h 2012-03-17 00:14:15 UTC (rev 1878) @@ -0,0 +1,194 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... Web: www.q12.org * + * * + * Threading atomics providers file. * + * Copyright (C) 2011-2012 Oleh Derevenko. All rights reserved. * + * e-mail: od...@el... (change all "a" to "e") * + * ... [truncated message content] |
From: <ole...@us...> - 2012-03-13 08:19:12
|
Revision: 1877 http://opende.svn.sourceforge.net/opende/?rev=1877&view=rev Author: oleh_derevenko Date: 2012-03-13 08:19:03 +0000 (Tue, 13 Mar 2012) Log Message: ----------- Cosmetic: Copyright headers formatting corrected and some headers added for files where those were missing Modified Paths: -------------- trunk/include/ode/objects.h trunk/include/ode/odeconfig.h trunk/include/ode/odecpp.h trunk/include/ode/odecpp_collision.h trunk/include/ode/odeinit.h trunk/ode/demo/demo_cards.cpp trunk/ode/demo/demo_gyroscopic.cpp trunk/ode/demo/demo_kinematic.cpp trunk/ode/demo/demo_motion.cpp trunk/ode/demo/demo_plane2d.cpp trunk/ode/demo/demo_tracks.cpp trunk/ode/src/collision_cylinder_box.cpp trunk/ode/src/collision_cylinder_plane.cpp trunk/ode/src/collision_cylinder_sphere.cpp trunk/ode/src/collision_cylinder_trimesh.cpp trunk/ode/src/collision_libccd.cpp trunk/ode/src/collision_libccd.h trunk/ode/src/collision_trimesh_ccylinder.cpp trunk/ode/src/collision_trimesh_colliders.h trunk/ode/src/collision_trimesh_distance.cpp trunk/ode/src/fastdot.c trunk/ode/src/fastldlt.c trunk/ode/src/fastlsolve.c trunk/ode/src/fastltsolve.c trunk/ode/src/heightfield.cpp trunk/ode/src/heightfield.h trunk/ode/src/joints/joint.h trunk/ode/src/lcp.cpp trunk/ode/src/nextafterf.c trunk/ode/src/obstack.cpp trunk/ode/src/ode.cpp trunk/ode/src/odeinit.cpp trunk/ode/src/odeou.cpp trunk/ode/src/odeou.h trunk/ode/src/odetls.cpp trunk/ode/src/odetls.h trunk/ode/src/quickstep.cpp trunk/ode/src/step.cpp trunk/ode/src/util.cpp Modified: trunk/include/ode/objects.h =================================================================== --- trunk/include/ode/objects.h 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/include/ode/objects.h 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,5 +1,3 @@ - - /************************************************************************* * * * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * Modified: trunk/include/ode/odeconfig.h =================================================================== --- trunk/include/ode/odeconfig.h 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/include/ode/odeconfig.h 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,6 +1,28 @@ -#ifndef ODECONFIG_H -#define ODECONFIG_H +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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_ODECONFIG_H_ +#define _ODE_ODECONFIG_H_ + /* Pull in the standard headers */ #include <stddef.h> #include <limits.h> Modified: trunk/include/ode/odecpp.h =================================================================== --- trunk/include/ode/odecpp.h 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/include/ode/odecpp.h 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,23 +1,23 @@ /************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001, 2002 Russell L. Smith. * - * All rights reserved. Email: ru...@q1... 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: ru...@q1... 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 */ Modified: trunk/include/ode/odecpp_collision.h =================================================================== --- trunk/include/ode/odecpp_collision.h 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/include/ode/odecpp_collision.h 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,23 +1,23 @@ /************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: ru...@q1... 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: ru...@q1... 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 */ Modified: trunk/include/ode/odeinit.h =================================================================== --- trunk/include/ode/odeinit.h 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/include/ode/odeinit.h 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,24 +1,24 @@ /************************************************************************* -* * -* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * -* All rights reserved. Email: ru...@q1... 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: ru...@q1... 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. */ Modified: trunk/ode/demo/demo_cards.cpp =================================================================== --- trunk/ode/demo/demo_cards.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/demo/demo_cards.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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 <vector> #include <ode/ode.h> #include <drawstuff/drawstuff.h> Modified: trunk/ode/demo/demo_gyroscopic.cpp =================================================================== --- trunk/ode/demo/demo_gyroscopic.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/demo/demo_gyroscopic.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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 <ode/ode.h> #include <drawstuff/drawstuff.h> #include "texturepath.h" Modified: trunk/ode/demo/demo_kinematic.cpp =================================================================== --- trunk/ode/demo/demo_kinematic.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/demo/demo_kinematic.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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 <iostream> #include <set> #include <algorithm> Modified: trunk/ode/demo/demo_motion.cpp =================================================================== --- trunk/ode/demo/demo_motion.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/demo/demo_motion.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. */ Modified: trunk/ode/demo/demo_plane2d.cpp =================================================================== --- trunk/ode/demo/demo_plane2d.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/demo/demo_plane2d.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. Modified: trunk/ode/demo/demo_tracks.cpp =================================================================== --- trunk/ode/demo/demo_tracks.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/demo/demo_tracks.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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 <iostream> #include <ode/ode.h> #include <drawstuff/drawstuff.h> Modified: trunk/ode/src/collision_cylinder_box.cpp =================================================================== --- trunk/ode/src/collision_cylinder_box.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/collision_cylinder_box.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,24 +1,24 @@ /************************************************************************* -* * -* Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * -* All rights reserved. Email: ru...@q1... 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-2003 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ /* * Cylinder-box collider by Alen Ladavac Modified: trunk/ode/src/collision_cylinder_plane.cpp =================================================================== --- trunk/ode/src/collision_cylinder_plane.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/collision_cylinder_plane.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,24 +1,24 @@ /************************************************************************* -* * -* Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * -* All rights reserved. Email: ru...@q1... 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-2003 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ /* Modified: trunk/ode/src/collision_cylinder_sphere.cpp =================================================================== --- trunk/ode/src/collision_cylinder_sphere.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/collision_cylinder_sphere.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,24 +1,24 @@ /************************************************************************* -* * -* Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * -* All rights reserved. Email: ru...@q1... 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-2003 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ /******************************************************************* Modified: trunk/ode/src/collision_cylinder_trimesh.cpp =================================================================== --- trunk/ode/src/collision_cylinder_trimesh.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/collision_cylinder_trimesh.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,24 +1,24 @@ /************************************************************************* -* * -* Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * -* All rights reserved. Email: ru...@q1... 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-2003 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ /* * Cylinder-trimesh collider by Alen Ladavac Modified: trunk/ode/src/collision_libccd.cpp =================================================================== --- trunk/ode/src/collision_libccd.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/collision_libccd.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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 <ode/collision.h> #include <ode/odemath.h> #include <ccd/ccd.h> Modified: trunk/ode/src/collision_libccd.h =================================================================== --- trunk/ode/src/collision_libccd.h 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/collision_libccd.h 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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 _LIBCCD_COLLISION_H_ #define _LIBCCD_COLLISION_H_ Modified: trunk/ode/src/collision_trimesh_ccylinder.cpp =================================================================== --- trunk/ode/src/collision_trimesh_ccylinder.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/collision_trimesh_ccylinder.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,24 +1,24 @@ /************************************************************************* -* * -* Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * -* All rights reserved. Email: ru...@q1... 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-2003 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ /* * Triangle-Capsule(Capsule) collider by Alen Ladavac Modified: trunk/ode/src/collision_trimesh_colliders.h =================================================================== --- trunk/ode/src/collision_trimesh_colliders.h 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/collision_trimesh_colliders.h 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,24 +1,24 @@ /************************************************************************* -* * -* Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. * -* All rights reserved. Email: ru...@q1... 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-2003 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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_COLLISION_TRIMESH_COLLIDERS_H_ #define _ODE_COLLISION_TRIMESH_COLLIDERS_H_ Modified: trunk/ode/src/collision_trimesh_distance.cpp =================================================================== --- trunk/ode/src/collision_trimesh_distance.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/collision_trimesh_distance.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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 contains some code based on the code from Magic Software. // That code is available under a Free Source License Agreement // that can be found at http://www.magic-software.com/License/free.pdf Modified: trunk/ode/src/fastdot.c =================================================================== --- trunk/ode/src/fastdot.c 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/fastdot.c 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,6 +1,29 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ + /* generated code, do not edit. */ #include "ode/matrix.h" +#include "config.h" dReal _dDot (const dReal *a, const dReal *b, int n) Modified: trunk/ode/src/fastldlt.c =================================================================== --- trunk/ode/src/fastldlt.c 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/fastldlt.c 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,6 +1,29 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ + /* generated code, do not edit. */ #include "ode/matrix.h" +#include "config.h" /* solve L*X=B, with B containing 1 right hand sides. * L is an n*n lower triangular matrix with ones on the diagonal. Modified: trunk/ode/src/fastlsolve.c =================================================================== --- trunk/ode/src/fastlsolve.c 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/fastlsolve.c 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,6 +1,29 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ + /* generated code, do not edit. */ #include "ode/matrix.h" +#include "config.h" /* solve L*X=B, with B containing 1 right hand sides. * L is an n*n lower triangular matrix with ones on the diagonal. Modified: trunk/ode/src/fastltsolve.c =================================================================== --- trunk/ode/src/fastltsolve.c 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/fastltsolve.c 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,6 +1,29 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ + /* generated code, do not edit. */ #include "ode/matrix.h" +#include "config.h" /* solve L^T * x=b, with b containing 1 right hand side. * L is an n*n lower triangular matrix with ones on the diagonal. Modified: trunk/ode/src/heightfield.cpp =================================================================== --- trunk/ode/src/heightfield.cpp 2012-03-12 23:27:07 UTC (rev 1876) +++ trunk/ode/src/heightfield.cpp 2012-03-13 08:19:03 UTC (rev 1877) @@ -1,3 +1,25 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... Web: www.q12.org * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of EITHER: ... [truncated message content] |
From: <ole...@us...> - 2012-03-12 23:27:13
|
Revision: 1876 http://opende.svn.sourceforge.net/opende/?rev=1876&view=rev Author: oleh_derevenko Date: 2012-03-12 23:27:07 +0000 (Mon, 12 Mar 2012) Log Message: ----------- Changes to dCopySign() and dNextAfter() partially reverted and changed to make them fully functional in public headers and at the same time avoid creating conflicts with other libraries Modified Paths: -------------- trunk/CHANGELOG.txt trunk/build/config-default.h trunk/include/ode/common.h trunk/include/ode/odeconfig.h Modified: trunk/CHANGELOG.txt =================================================================== --- trunk/CHANGELOG.txt 2012-03-12 16:23:59 UTC (rev 1875) +++ trunk/CHANGELOG.txt 2012-03-12 23:27:07 UTC (rev 1876) @@ -9,13 +9,12 @@ ------------------------------------------------------------------------------ 03/12/12 Oleh Derevenko - * PURE_INLINE macro renamed to ODE_PURE_INLINE and definition of nextafter()/copysign() - moved into private header. It's now a responsibility of client code to - make sure nextafter()/nextafterf()/copysign()/copysignf() are available - if dNextAfter()/dCopySign() are used. + * 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 + * 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 Modified: trunk/build/config-default.h =================================================================== --- trunk/build/config-default.h 2012-03-12 16:23:59 UTC (rev 1875) +++ trunk/build/config-default.h 2012-03-12 23:27:07 UTC (rev 1876) @@ -88,26 +88,8 @@ #include <alloca.h> #endif -/* Visual C does not define these functions */ -#if defined(_MSC_VER) - #define copysignf(x, y) ((float)_copysign(x, y)) - #define copysign(x, y) _copysign(x, y) - #define nextafterf(x, y) _nextafterf(x, y) - #define nextafter(x, y) _nextafter(x, y) - #if !defined(_WIN64) - #define _ODE__NEXTAFTERF_REQUIRED - #endif -#endif #ifdef dSINGLE - #if defined(_ODE__NEXTAFTERF_REQUIRED) - ODE_EXTERN_C float _nextafterf(float x, float y); - #endif -#else - #undef _ODE__NEXTAFTERF_REQUIRED -#endif - -#ifdef dSINGLE #define dEpsilon FLT_EPSILON #else #define dEpsilon DBL_EPSILON Modified: trunk/include/ode/common.h =================================================================== --- trunk/include/ode/common.h 2012-03-12 16:23:59 UTC (rev 1875) +++ trunk/include/ode/common.h 2012-03-12 23:27:07 UTC (rev 1876) @@ -109,8 +109,8 @@ #define dFMod(a,b) (fmodf(a,b)) /* modulo */ #define dFloor(x) floorf(x) /* floor */ #define dCeil(x) ceilf(x) /* ceil */ -#define dCopySign(a,b) ((dReal)copysignf(a,b)) /* copy value sign */ -#define dNextAfter(x, y) nextafterf(x, y) /* next value after */ +#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)) @@ -144,8 +144,8 @@ #define dFMod(a,b) (fmod((a),(b))) #define dFloor(x) floor(x) #define dCeil(x) ceil(x) -#define dCopySign(a,b) (copysign((a),(b))) -#define dNextAfter(x, y) nextafter(x, y) +#define dCopySign(a,b) _ode_copysign(a, b) +#define dNextAfter(x, y) _ode_nextafter(x, y) #ifdef HAVE___ISNAN #define dIsNan(x) (__isnan(x)) Modified: trunk/include/ode/odeconfig.h =================================================================== --- trunk/include/ode/odeconfig.h 2012-03-12 16:23:59 UTC (rev 1875) +++ trunk/include/ode/odeconfig.h 2012-03-12 23:27:07 UTC (rev 1876) @@ -86,4 +86,22 @@ #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) && 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-03-12 16:24:09
|
Revision: 1875 http://opende.svn.sourceforge.net/opende/?rev=1875&view=rev Author: oleh_derevenko Date: 2012-03-12 16:23:59 +0000 (Mon, 12 Mar 2012) Log Message: ----------- Cosmetic: Changelog text corrected Modified Paths: -------------- trunk/CHANGELOG.txt Modified: trunk/CHANGELOG.txt =================================================================== --- trunk/CHANGELOG.txt 2012-03-12 16:17:18 UTC (rev 1874) +++ trunk/CHANGELOG.txt 2012-03-12 16:23:59 UTC (rev 1875) @@ -9,9 +9,10 @@ ------------------------------------------------------------------------------ 03/12/12 Oleh Derevenko - * PURE_INLINE macro renamed to ODE_PURE_INLINE and definition of nextafter() - moved into private headed. It's now a responsibility of client code to - make sure nextafter()/nextafterf() are available if dNextAfter() is used. + * PURE_INLINE macro renamed to ODE_PURE_INLINE and definition of nextafter()/copysign() + moved into private header. It's now a responsibility of client code to + make sure nextafter()/nextafterf()/copysign()/copysignf() are available + if dNextAfter()/dCopySign() are used. 02/03/12 Oleh Derevenko * Assertion checking macros moved from common.h to error.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-03-12 16:17:29
|
Revision: 1874 http://opende.svn.sourceforge.net/opende/?rev=1874&view=rev Author: oleh_derevenko Date: 2012-03-12 16:17:18 +0000 (Mon, 12 Mar 2012) Log Message: ----------- Definition of nextafter() removed from public header as it led to conflicts in client code. PURE_INLINE renamed to ODE_PURE_INLINE to make identifier more ODE-bound Modified Paths: -------------- trunk/CHANGELOG.txt trunk/build/config-default.h trunk/include/ode/common.h trunk/include/ode/matrix.h trunk/include/ode/odeconfig.h trunk/include/ode/odemath.h trunk/ode/src/collision_trimesh_colliders.h trunk/ode/src/joints/amotor.cpp trunk/ode/src/joints/ball.cpp trunk/ode/src/joints/contact.cpp trunk/ode/src/joints/fixed.cpp trunk/ode/src/joints/hinge.cpp trunk/ode/src/joints/hinge2.cpp trunk/ode/src/joints/lmotor.cpp trunk/ode/src/joints/null.cpp trunk/ode/src/joints/piston.cpp trunk/ode/src/joints/plane2d.cpp trunk/ode/src/joints/pr.cpp trunk/ode/src/joints/pu.cpp trunk/ode/src/joints/slider.cpp trunk/ode/src/joints/universal.cpp trunk/ode/src/nextafterf.c Modified: trunk/CHANGELOG.txt =================================================================== --- trunk/CHANGELOG.txt 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/CHANGELOG.txt 2012-03-12 16:17:18 UTC (rev 1874) @@ -8,8 +8,14 @@ * keep the format consistent (79 char width, M/D/Y date format). ------------------------------------------------------------------------------ +03/12/12 Oleh Derevenko + * PURE_INLINE macro renamed to ODE_PURE_INLINE and definition of nextafter() + moved into private headed. It's now a responsibility of client code to + make sure nextafter()/nextafterf() are available if dNextAfter() is used. + 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 Modified: trunk/build/config-default.h =================================================================== --- trunk/build/config-default.h 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/build/config-default.h 2012-03-12 16:17:18 UTC (rev 1874) @@ -88,8 +88,26 @@ #include <alloca.h> #endif +/* Visual C does not define these functions */ +#if defined(_MSC_VER) + #define copysignf(x, y) ((float)_copysign(x, y)) + #define copysign(x, y) _copysign(x, y) + #define nextafterf(x, y) _nextafterf(x, y) + #define nextafter(x, y) _nextafter(x, y) + #if !defined(_WIN64) + #define _ODE__NEXTAFTERF_REQUIRED + #endif +#endif #ifdef dSINGLE + #if defined(_ODE__NEXTAFTERF_REQUIRED) + ODE_EXTERN_C float _nextafterf(float x, float y); + #endif +#else + #undef _ODE__NEXTAFTERF_REQUIRED +#endif + +#ifdef dSINGLE #define dEpsilon FLT_EPSILON #else #define dEpsilon DBL_EPSILON Modified: trunk/include/ode/common.h =================================================================== --- trunk/include/ode/common.h 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/include/ode/common.h 2012-03-12 16:17:18 UTC (rev 1874) @@ -32,9 +32,6 @@ #endif -#define PURE_INLINE static __inline - - /* configuration stuff */ /* constants */ @@ -115,10 +112,6 @@ #define dCopySign(a,b) ((dReal)copysignf(a,b)) /* copy value sign */ #define dNextAfter(x, y) nextafterf(x, y) /* next value after */ -#if defined(_ODE__NEXTAFTERF_REQUIRED) -float _nextafterf(float x, float y); -#endif - #ifdef HAVE___ISNANF #define dIsNan(x) (__isnanf(x)) #elif defined(HAVE__ISNANF) @@ -154,8 +147,6 @@ #define dCopySign(a,b) (copysign((a),(b))) #define dNextAfter(x, y) nextafter(x, y) -#undef _ODE__NEXTAFTERF_REQUIRED - #ifdef HAVE___ISNAN #define dIsNan(x) (__isnan(x)) #elif defined(HAVE__ISNAN) Modified: trunk/include/ode/matrix.h =================================================================== --- trunk/include/ode/matrix.h 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/include/ode/matrix.h 2012-03-12 16:17:18 UTC (rev 1874) @@ -208,17 +208,17 @@ void _dLDLTRemove (dReal **A, const int *p, dReal *L, dReal *d, int n1, int n2, int r, int nskip, void *tmpbuf); void _dRemoveRowCol (dReal *A, int n, int nskip, int r); -PURE_INLINE size_t _dEstimateFactorCholeskyTmpbufSize(int n) +ODE_PURE_INLINE size_t _dEstimateFactorCholeskyTmpbufSize(int n) { return dPAD(n) * sizeof(dReal); } -PURE_INLINE size_t _dEstimateSolveCholeskyTmpbufSize(int n) +ODE_PURE_INLINE size_t _dEstimateSolveCholeskyTmpbufSize(int n) { return dPAD(n) * sizeof(dReal); } -PURE_INLINE size_t _dEstimateInvertPDMatrixTmpbufSize(int n) +ODE_PURE_INLINE size_t _dEstimateInvertPDMatrixTmpbufSize(int n) { size_t FactorCholesky_size = _dEstimateFactorCholeskyTmpbufSize(n); size_t SolveCholesky_size = _dEstimateSolveCholeskyTmpbufSize(n); @@ -226,17 +226,17 @@ return dPAD(n) * (n + 1) * sizeof(dReal) + MaxCholesky_size; } -PURE_INLINE size_t _dEstimateIsPositiveDefiniteTmpbufSize(int n) +ODE_PURE_INLINE size_t _dEstimateIsPositiveDefiniteTmpbufSize(int n) { return dPAD(n) * n * sizeof(dReal) + _dEstimateFactorCholeskyTmpbufSize(n); } -PURE_INLINE size_t _dEstimateLDLTAddTLTmpbufSize(int nskip) +ODE_PURE_INLINE size_t _dEstimateLDLTAddTLTmpbufSize(int nskip) { return nskip * 2 * sizeof(dReal); } -PURE_INLINE size_t _dEstimateLDLTRemoveTmpbufSize(int n2, int nskip) +ODE_PURE_INLINE size_t _dEstimateLDLTRemoveTmpbufSize(int n2, int nskip) { return n2 * sizeof(dReal) + _dEstimateLDLTAddTLTmpbufSize(nskip); } Modified: trunk/include/ode/odeconfig.h =================================================================== --- trunk/include/ode/odeconfig.h 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/include/ode/odeconfig.h 2012-03-12 16:17:18 UTC (rev 1874) @@ -37,6 +37,14 @@ # define ODE_API_DEPRECATED #endif +#define ODE_PURE_INLINE static __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 @@ -55,19 +63,7 @@ typedef unsigned char uint8; #endif -/* Visual C does not define these functions */ -#if defined(_MSC_VER) - #define copysignf(x, y) ((float)_copysign(x, y)) - #define copysign(x, y) _copysign(x, y) - #define nextafterf(x, y) _nextafterf(x, y) - #define nextafter(x, y) _nextafter(x, y) - #if !defined(_WIN64) - #define _ODE__NEXTAFTERF_REQUIRED - #endif -#endif - - /* Define the dInfinity macro */ #ifdef INFINITY #define dInfinity INFINITY Modified: trunk/include/ode/odemath.h =================================================================== --- trunk/include/ode/odemath.h 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/include/ode/odemath.h 2012-03-12 16:17:18 UTC (rev 1874) @@ -42,7 +42,7 @@ // Some vector math -PURE_INLINE void dAddVectors3(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dAddVectors3(dReal *res, const dReal *a, const dReal *b) { dReal res_0, res_1, res_2; res_0 = a[0] + b[0]; @@ -52,7 +52,7 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; } -PURE_INLINE void dSubtractVectors3(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dSubtractVectors3(dReal *res, const dReal *a, const dReal *b) { dReal res_0, res_1, res_2; res_0 = a[0] - b[0]; @@ -62,7 +62,7 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; } -PURE_INLINE void dAddScaledVectors3(dReal *res, const dReal *a, const dReal *b, dReal a_scale, dReal b_scale) +ODE_PURE_INLINE void dAddScaledVectors3(dReal *res, const dReal *a, const dReal *b, dReal a_scale, dReal b_scale) { dReal res_0, res_1, res_2; res_0 = a_scale * a[0] + b_scale * b[0]; @@ -72,21 +72,21 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; } -PURE_INLINE void dScaleVector3(dReal *res, dReal nScale) +ODE_PURE_INLINE void dScaleVector3(dReal *res, dReal nScale) { res[0] *= nScale ; res[1] *= nScale ; res[2] *= nScale ; } -PURE_INLINE void dNegateVector3(dReal *res) +ODE_PURE_INLINE void dNegateVector3(dReal *res) { res[0] = -res[0]; res[1] = -res[1]; res[2] = -res[2]; } -PURE_INLINE void dCopyVector3(dReal *res, const dReal *a) +ODE_PURE_INLINE void dCopyVector3(dReal *res, const dReal *a) { dReal res_0, res_1, res_2; res_0 = a[0]; @@ -96,7 +96,7 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; } -PURE_INLINE void dCopyScaledVector3(dReal *res, const dReal *a, dReal nScale) +ODE_PURE_INLINE void dCopyScaledVector3(dReal *res, const dReal *a, dReal nScale) { dReal res_0, res_1, res_2; res_0 = a[0] * nScale; @@ -106,7 +106,7 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; } -PURE_INLINE void dCopyNegatedVector3(dReal *res, const dReal *a) +ODE_PURE_INLINE void dCopyNegatedVector3(dReal *res, const dReal *a) { dReal res_0, res_1, res_2; res_0 = -a[0]; @@ -116,7 +116,7 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; } -PURE_INLINE void dCopyVector4(dReal *res, const dReal *a) +ODE_PURE_INLINE void dCopyVector4(dReal *res, const dReal *a) { dReal res_0, res_1, res_2, res_3; res_0 = a[0]; @@ -127,21 +127,21 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; res[3] = res_3; } -PURE_INLINE void dCopyMatrix4x4(dReal *res, const dReal *a) +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); } -PURE_INLINE void dCopyMatrix4x3(dReal *res, const dReal *a) +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); } -PURE_INLINE void dGetMatrixColumn3(dReal *res, const dReal *a, unsigned n) +ODE_PURE_INLINE void dGetMatrixColumn3(dReal *res, const dReal *a, unsigned n) { dReal res_0, res_1, res_2; res_0 = a[n + 0]; @@ -151,17 +151,17 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; } -PURE_INLINE dReal dCalcVectorLength3(const dReal *a) +ODE_PURE_INLINE dReal dCalcVectorLength3(const dReal *a) { return dSqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2]); } -PURE_INLINE dReal dCalcVectorLengthSquare3(const dReal *a) +ODE_PURE_INLINE dReal dCalcVectorLengthSquare3(const dReal *a) { return (a[0] * a[0] + a[1] * a[1] + a[2] * a[2]); } -PURE_INLINE dReal dCalcPointDepth3(const dReal *test_p, const dReal *plane_p, const dReal *plane_n) +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]; } @@ -172,19 +172,19 @@ * step_a and step_b indexes apart respectively. dCalcVectorDot3() means dDot311. */ -PURE_INLINE dReal _dCalcVectorDot3(const dReal *a, const dReal *b, unsigned step_a, unsigned step_b) +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]; } -PURE_INLINE dReal dCalcVectorDot3 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,1,1); } -PURE_INLINE dReal dCalcVectorDot3_13 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,1,3); } -PURE_INLINE dReal dCalcVectorDot3_31 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,3,1); } -PURE_INLINE dReal dCalcVectorDot3_33 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,3,3); } -PURE_INLINE dReal dCalcVectorDot3_14 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,1,4); } -PURE_INLINE dReal dCalcVectorDot3_41 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,4,1); } -PURE_INLINE dReal dCalcVectorDot3_44 (const dReal *a, const dReal *b) { return _dCalcVectorDot3(a,b,4,4); } +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); } /* @@ -193,7 +193,7 @@ * dCalcVectorCross3() means dCross3111. */ -PURE_INLINE void _dCalcVectorCross3(dReal *res, const dReal *a, const dReal *b, unsigned step_res, unsigned step_a, unsigned step_b) +ODE_PURE_INLINE void _dCalcVectorCross3(dReal *res, const dReal *a, const dReal *b, unsigned step_res, unsigned step_a, unsigned step_b) { dReal res_0, res_1, res_2; res_0 = a[ step_a]*b[2*step_b] - a[2*step_a]*b[ step_b]; @@ -205,23 +205,23 @@ res[2*step_res] = res_2; } -PURE_INLINE void dCalcVectorCross3 (dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 1, 1); } -PURE_INLINE void dCalcVectorCross3_114(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 1, 4); } -PURE_INLINE void dCalcVectorCross3_141(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 4, 1); } -PURE_INLINE void dCalcVectorCross3_144(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 1, 4, 4); } -PURE_INLINE void dCalcVectorCross3_411(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 1, 1); } -PURE_INLINE void dCalcVectorCross3_414(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 1, 4); } -PURE_INLINE void dCalcVectorCross3_441(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 4, 1); } -PURE_INLINE void dCalcVectorCross3_444(dReal *res, const dReal *a, const dReal *b) { _dCalcVectorCross3(res, a, b, 4, 4, 4); } +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); } -PURE_INLINE void dAddVectorCross3(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dAddVectorCross3(dReal *res, const dReal *a, const dReal *b) { dReal tmp[3]; dCalcVectorCross3(tmp, a, b); dAddVectors3(res, res, tmp); } -PURE_INLINE void dSubtractVectorCross3(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dSubtractVectorCross3(dReal *res, const dReal *a, const dReal *b) { dReal tmp[3]; dCalcVectorCross3(tmp, a, b); @@ -237,7 +237,7 @@ * if (plus,minus) is (-,+) then a negative version will be written. */ -PURE_INLINE void dSetCrossMatrixPlus(dReal *res, const dReal *a, unsigned skip) +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; @@ -248,7 +248,7 @@ res[2*skip+1] = +a_0; } -PURE_INLINE void dSetCrossMatrixMinus(dReal *res, const dReal *a, unsigned skip) +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; @@ -264,7 +264,7 @@ * compute the distance between two 3D-vectors */ -PURE_INLINE dReal dCalcPointsDistance3(const dReal *a, const dReal *b) +ODE_PURE_INLINE dReal dCalcPointsDistance3(const dReal *a, const dReal *b) { dReal res; dReal tmp[3]; @@ -277,7 +277,7 @@ * special case matrix multiplication, with operator selection */ -PURE_INLINE void dMultiplyHelper0_331(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiplyHelper0_331(dReal *res, const dReal *a, const dReal *b) { dReal res_0, res_1, res_2; res_0 = dCalcVectorDot3(a, b); @@ -287,7 +287,7 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; } -PURE_INLINE void dMultiplyHelper1_331(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiplyHelper1_331(dReal *res, const dReal *a, const dReal *b) { dReal res_0, res_1, res_2; res_0 = dCalcVectorDot3_41(a, b); @@ -297,12 +297,12 @@ res[0] = res_0; res[1] = res_1; res[2] = res_2; } -PURE_INLINE void dMultiplyHelper0_133(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiplyHelper0_133(dReal *res, const dReal *a, const dReal *b) { dMultiplyHelper1_331(res, b, a); } -PURE_INLINE void dMultiplyHelper1_133(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiplyHelper1_133(dReal *res, const dReal *a, const dReal *b) { dReal res_0, res_1, res_2; res_0 = dCalcVectorDot3_44(a, b); @@ -317,64 +317,64 @@ it is not equivalent to A*=B. */ -PURE_INLINE void dMultiply0_331(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiply0_331(dReal *res, const dReal *a, const dReal *b) { dMultiplyHelper0_331(res, a, b); } -PURE_INLINE void dMultiply1_331(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiply1_331(dReal *res, const dReal *a, const dReal *b) { dMultiplyHelper1_331(res, a, b); } -PURE_INLINE void dMultiply0_133(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiply0_133(dReal *res, const dReal *a, const dReal *b) { dMultiplyHelper0_133(res, a, b); } -PURE_INLINE void dMultiply0_333(dReal *res, const dReal *a, const dReal *b) +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); } -PURE_INLINE void dMultiply1_333(dReal *res, const dReal *a, const dReal *b) +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); } -PURE_INLINE void dMultiply2_333(dReal *res, const dReal *a, const dReal *b) +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); } -PURE_INLINE void dMultiplyAdd0_331(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiplyAdd0_331(dReal *res, const dReal *a, const dReal *b) { dReal tmp[3]; dMultiplyHelper0_331(tmp, a, b); dAddVectors3(res, res, tmp); } -PURE_INLINE void dMultiplyAdd1_331(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiplyAdd1_331(dReal *res, const dReal *a, const dReal *b) { dReal tmp[3]; dMultiplyHelper1_331(tmp, a, b); dAddVectors3(res, res, tmp); } -PURE_INLINE void dMultiplyAdd0_133(dReal *res, const dReal *a, const dReal *b) +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); } -PURE_INLINE void dMultiplyAdd0_333(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiplyAdd0_333(dReal *res, const dReal *a, const dReal *b) { dReal tmp[3]; dMultiplyHelper0_133(tmp, a + 0, b); @@ -385,7 +385,7 @@ dAddVectors3(res + 8, res + 8, tmp); } -PURE_INLINE void dMultiplyAdd1_333(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiplyAdd1_333(dReal *res, const dReal *a, const dReal *b) { dReal tmp[3]; dMultiplyHelper1_133(tmp, b, a + 0); @@ -396,7 +396,7 @@ dAddVectors3(res + 8, res + 8, tmp); } -PURE_INLINE void dMultiplyAdd2_333(dReal *res, const dReal *a, const dReal *b) +ODE_PURE_INLINE void dMultiplyAdd2_333(dReal *res, const dReal *a, const dReal *b) { dReal tmp[3]; dMultiplyHelper0_331(tmp, b, a + 0); @@ -431,13 +431,13 @@ int _dSafeNormalize3 (dVector3 a); int _dSafeNormalize4 (dVector4 a); -PURE_INLINE void _dNormalize3(dVector3 a) +ODE_PURE_INLINE void _dNormalize3(dVector3 a) { int bNormalizationResult = _dSafeNormalize3(a); dIVERIFY(bNormalizationResult); } -PURE_INLINE void _dNormalize4(dVector4 a) +ODE_PURE_INLINE void _dNormalize4(dVector4 a) { int bNormalizationResult = _dSafeNormalize4(a); dIVERIFY(bNormalizationResult); Modified: trunk/ode/src/collision_trimesh_colliders.h =================================================================== --- trunk/ode/src/collision_trimesh_colliders.h 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/collision_trimesh_colliders.h 2012-03-12 16:17:18 UTC (rev 1874) @@ -33,7 +33,7 @@ int dCollideTTL(dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip); int dCollideCCTL(dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip); -PURE_INLINE int dCollideRayTrimesh( dxGeom *ray, dxGeom *trimesh, int flags, +ODE_PURE_INLINE int dCollideRayTrimesh( dxGeom *ray, dxGeom *trimesh, int flags, dContactGeom *contact, int skip ) { // Swapped case, for code that needs it (heightfield initially) Modified: trunk/ode/src/joints/amotor.cpp =================================================================== --- trunk/ode/src/joints/amotor.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/amotor.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "amotor.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/ball.cpp =================================================================== --- trunk/ode/src/joints/ball.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/ball.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "ball.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/contact.cpp =================================================================== --- trunk/ode/src/joints/contact.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/contact.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "contact.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/fixed.cpp =================================================================== --- trunk/ode/src/joints/fixed.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/fixed.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "fixed.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/hinge.cpp =================================================================== --- trunk/ode/src/joints/hinge.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/hinge.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "hinge.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/hinge2.cpp =================================================================== --- trunk/ode/src/joints/hinge2.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/hinge2.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "hinge2.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/lmotor.cpp =================================================================== --- trunk/ode/src/joints/lmotor.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/lmotor.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "lmotor.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/null.cpp =================================================================== --- trunk/ode/src/joints/null.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/null.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "null.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/piston.cpp =================================================================== --- trunk/ode/src/joints/piston.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/piston.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "piston.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/plane2d.cpp =================================================================== --- trunk/ode/src/joints/plane2d.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/plane2d.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "plane2d.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/pr.cpp =================================================================== --- trunk/ode/src/joints/pr.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/pr.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "pr.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/pu.cpp =================================================================== --- trunk/ode/src/joints/pu.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/pu.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "pu.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/slider.cpp =================================================================== --- trunk/ode/src/joints/slider.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/slider.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "slider.h" #include "joint_internal.h" Modified: trunk/ode/src/joints/universal.cpp =================================================================== --- trunk/ode/src/joints/universal.cpp 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/joints/universal.cpp 2012-03-12 16:17:18 UTC (rev 1874) @@ -21,6 +21,7 @@ *************************************************************************/ +#include <ode/odeconfig.h> #include "config.h" #include "universal.h" #include "joint_internal.h" Modified: trunk/ode/src/nextafterf.c =================================================================== --- trunk/ode/src/nextafterf.c 2012-03-11 19:13:36 UTC (rev 1873) +++ trunk/ode/src/nextafterf.c 2012-03-12 16:17:18 UTC (rev 1874) @@ -1,7 +1,9 @@ /* _nextafterf() implementation for MSVC */ #include <ode/common.h> +#include "config.h" + #if defined(_ODE__NEXTAFTERF_REQUIRED) /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-03-11 19:13:42
|
Revision: 1873 http://opende.svn.sourceforge.net/opende/?rev=1873&view=rev Author: oleh_derevenko Date: 2012-03-11 19:13:36 +0000 (Sun, 11 Mar 2012) Log Message: ----------- Cosmetic: Whitespace corrected Modified Paths: -------------- trunk/ode/src/odeinit.cpp Modified: trunk/ode/src/odeinit.cpp =================================================================== --- trunk/ode/src/odeinit.cpp 2012-03-10 18:30:47 UTC (rev 1872) +++ trunk/ode/src/odeinit.cpp 2012-03-11 19:13:36 UTC (rev 1873) @@ -477,13 +477,13 @@ } int dInitODE2(unsigned int uiInitFlags/*=0*/) - { +{ bool bResult = false; - + bool bODEInitialized = false; do - { + { if (!InternalInitODE(uiInitFlags)) { break; @@ -495,17 +495,17 @@ { break; } - + bResult = true; } while (false); - + if (!bResult) { if (bODEInitialized) { InternalCloseODE(); -} + } } return bResult; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-03-10 18:30:53
|
Revision: 1872 http://opende.svn.sourceforge.net/opende/?rev=1872&view=rev Author: oleh_derevenko Date: 2012-03-10 18:30:47 +0000 (Sat, 10 Mar 2012) Log Message: ----------- Cosmetic: Constructor/destructor of dObject moved into proper places Modified Paths: -------------- trunk/ode/src/objects.cpp trunk/ode/src/objects.h trunk/ode/src/ode.cpp Modified: trunk/ode/src/objects.cpp =================================================================== --- trunk/ode/src/objects.cpp 2012-03-05 21:34:40 UTC (rev 1871) +++ trunk/ode/src/objects.cpp 2012-03-10 18:30:47 UTC (rev 1872) @@ -44,6 +44,12 @@ +dObject::~dObject() +{ + // Do nothing - a virtual destructor +} + + dxAutoDisable::dxAutoDisable(void *): idle_time(REAL(0.0)), idle_steps(10), Modified: trunk/ode/src/objects.h =================================================================== --- trunk/ode/src/objects.h 2012-03-05 21:34:40 UTC (rev 1871) +++ trunk/ode/src/objects.h 2012-03-10 18:30:47 UTC (rev 1872) @@ -23,8 +23,8 @@ // object, body, and world structs. -#ifndef _ODE_OBJECT_H_ -#define _ODE_OBJECT_H_ +#ifndef _ODE__PRIVATE_OBJECTS_H_ +#define _ODE__PRIVATE_OBJECTS_H_ #include <ode/common.h> #include <ode/memory.h> @@ -67,8 +67,9 @@ dObject **tome; // pointer to previous object's next ptr int tag; // used by dynamics algorithms void *userdata; // user settable data - dObject(dxWorld *w); - virtual ~dObject() { } + + explicit dObject(dxWorld *w): world(w), next(NULL), tome(NULL), tag(0), userdata(NULL) {} + virtual ~dObject(); }; Modified: trunk/ode/src/ode.cpp =================================================================== --- trunk/ode/src/ode.cpp 2012-03-05 21:34:40 UTC (rev 1871) +++ trunk/ode/src/ode.cpp 2012-03-10 18:30:47 UTC (rev 1872) @@ -47,16 +47,6 @@ // utility -dObject::dObject(dxWorld *w) -{ - world = w; - next = 0; - tome = 0; - userdata = 0; - tag = 0; -} - - // add an object `obj' to the list who's head pointer is pointed to by `first'. void addObjectToList (dObject *obj, dObject **first) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <klo...@us...> - 2012-03-05 21:34:46
|
Revision: 1871 http://opende.svn.sourceforge.net/opende/?rev=1871&view=rev Author: klompjeg Date: 2012-03-05 21:34:40 +0000 (Mon, 05 Mar 2012) Log Message: ----------- Added Python binding for 'dGeomClearOffset' through Python geom object method 'clearOffset()'. Modified Paths: -------------- trunk/bindings/python/ode.pxd trunk/bindings/python/ode.pyx Modified: trunk/bindings/python/ode.pxd =================================================================== --- trunk/bindings/python/ode.pxd 2012-03-02 22:13:00 UTC (rev 1870) +++ trunk/bindings/python/ode.pxd 2012-03-05 21:34:40 UTC (rev 1871) @@ -414,6 +414,7 @@ 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) Modified: trunk/bindings/python/ode.pyx =================================================================== --- trunk/bindings/python/ode.pyx 2012-03-02 22:13:00 UTC (rev 1870) +++ trunk/bindings/python/ode.pyx 2012-03-05 21:34:40 UTC (rev 1871) @@ -3177,6 +3177,13 @@ m = <dReal*>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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-03-02 22:13:08
|
Revision: 1870 http://opende.svn.sourceforge.net/opende/?rev=1870&view=rev Author: oleh_derevenko Date: 2012-03-02 22:13:00 +0000 (Fri, 02 Mar 2012) Log Message: ----------- Some code style improvements and cleanup Modified Paths: -------------- trunk/ode/src/Makefile.am trunk/ode/src/joints/joint.cpp trunk/ode/src/joints/joint.h trunk/ode/src/objects.h trunk/ode/src/obstack.cpp trunk/ode/src/obstack.h trunk/ode/src/ode.cpp Added Paths: ----------- trunk/ode/src/objects.cpp Modified: trunk/ode/src/Makefile.am =================================================================== --- trunk/ode/src/Makefile.am 2012-03-02 21:46:22 UTC (rev 1869) +++ trunk/ode/src/Makefile.am 2012-03-02 22:13:00 UTC (rev 1870) @@ -44,7 +44,7 @@ matrix.cpp \ memory.cpp \ misc.cpp \ - objects.h \ + objects.cpp objects.h \ obstack.cpp obstack.h \ ode.cpp \ odeinit.cpp \ Modified: trunk/ode/src/joints/joint.cpp =================================================================== --- trunk/ode/src/joints/joint.cpp 2012-03-02 21:46:22 UTC (rev 1869) +++ trunk/ode/src/joints/joint.cpp 2012-03-02 22:13:00 UTC (rev 1870) @@ -70,6 +70,25 @@ (node[1].body && node[1].body->invMass > 0)) ); } + +size_t dxJointGroup::exportJoints(dxJoint **jlist) +{ + size_t i=0; + dxJoint *j = (dxJoint*) m_stack.rewind(); + while (j != NULL) { + jlist[i++] = j; + j = (dxJoint*) (m_stack.next (j->size())); + } + return i; +} + +void dxJointGroup::freeAll() +{ + m_num = 0; + m_stack.freeAll(); +} + + //**************************************************************************** // externs Modified: trunk/ode/src/joints/joint.h =================================================================== --- trunk/ode/src/joints/joint.h 2012-03-02 21:46:22 UTC (rev 1869) +++ trunk/ode/src/joints/joint.h 2012-03-02 22:13:00 UTC (rev 1870) @@ -1,24 +1,24 @@ /************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: ru...@q1... 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: ru...@q1... 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_ @@ -32,20 +32,20 @@ // 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 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 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, + // 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, - dJOINT_DISABLED = 8 + dJOINT_DISABLED = 8 }; @@ -57,104 +57,104 @@ 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 + 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 }; 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. + // 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). + // 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 - { - // Structure size should not exceed sizeof(pointer) bytes to have - // to have good memory pattern in dxQuickStepper() - int8 m, nub; - }; + struct Info1 + { + // Structure size should not exceed sizeof(pointer) bytes to have + // to have good memory pattern in dxQuickStepper() + int8 m, nub; + }; - // info returned by getInfo2 function + // info returned by getInfo2 function - struct Info2 - { - // integrator parameters: frames per second (1/stepsize), default error - // reduction parameter (0..1). - dReal fps, erp; + 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; + // 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; + // 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; + // 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; + // 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; - }; + // 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; + }; - // info returned by getSureMaxInfo function. - // The information is used for memory reservation in calculations. + // info returned by getSureMaxInfo function. + // The information is used for memory reservation in calculations. - struct SureMaxInfo - { - // The value of `max_m' must ALWAYS be not less than the value of `m' - // the getInfo1 call can generate in current joint state. Another - // requirement is that the value should be provided very quickly, - // without the excessive calculations. - // If it is hard/impossible to quickly predict the maximal value of `m' - // (which is the case for most joint types) the maximum for current - // joint type in general should be returned. If it can be known the `m' - // will be smaller, it can save a bit of memory from being reserved - // for calculations if that smaller value is returned. + struct SureMaxInfo + { + // The value of `max_m' must ALWAYS be not less than the value of `m' + // the getInfo1 call can generate in current joint state. Another + // requirement is that the value should be provided very quickly, + // without the excessive calculations. + // If it is hard/impossible to quickly predict the maximal value of `m' + // (which is the case for most joint types) the maximum for current + // joint type in general should be returned. If it can be known the `m' + // will be smaller, it can save a bit of memory from being reserved + // for calculations if that smaller value is returned. - int8 max_m; // Estimate of maximal `m' in Info1 - }; + int8 max_m; // Estimate of maximal `m' in Info1 + }; - unsigned flags; // dJOINT_xxx flags - dxJointNode node[2]; // connections to bodies. node[1].body can be 0 - dJointFeedback *feedback; // optional feedback structure - dReal lambda[6]; // lambda generated by last step + unsigned flags; // dJOINT_xxx flags + dxJointNode node[2]; // connections to bodies. node[1].body can be 0 + dJointFeedback *feedback; // optional feedback structure + dReal lambda[6]; // lambda generated by last step - dxJoint( dxWorld *w ); - virtual ~dxJoint(); + dxJoint( dxWorld *w ); + virtual ~dxJoint(); - virtual void getInfo1( Info1* info ) = 0; - virtual void getInfo2( Info2* info ) = 0; - // This call quickly!!! estimates maximum value of "m" that could be returned by getInfo1() - // See comments at definition of SureMaxInfo for defails. - virtual void getSureMaxInfo( SureMaxInfo* info ) = 0; - virtual dJointType type() const = 0; - virtual size_t size() const = 0; + virtual void getInfo1( Info1* info ) = 0; + virtual void getInfo2( Info2* info ) = 0; + // This call quickly!!! estimates maximum value of "m" that could be returned by getInfo1() + // See comments at definition of SureMaxInfo for defails. + virtual void getSureMaxInfo( SureMaxInfo* info ) = 0; + virtual dJointType type() const = 0; + virtual size_t size() const = 0; - /// Set values which are relative with respect to bodies. - /// Each dxJoint should redefine it if needed. - virtual void setRelativeValues() {}; + /// Set values which are relative with respect to bodies. + /// Each dxJoint should redefine it if needed. + virtual void setRelativeValues() {}; - // Test if this joint should be used in the simulation step - // (has the enabled flag set, and is attached to at least one dynamic body) - bool isEnabled() const; + // Test if this joint should be used in the simulation step + // (has the enabled flag set, and is attached to at least one dynamic body) + bool isEnabled() const; }; @@ -163,30 +163,52 @@ struct dxJointGroup : public dBase { - int num; // number of joints on the stack - dObStack stack; // a stack of (possibly differently sized) dxJoint -}; // objects. + dxJointGroup(): m_num(0), m_stack() {} + template<class T> + T *alloc(dWorldID w) + { + T *j = (T *)m_stack.alloc(sizeof(T)); + if (j != NULL) { + ++m_num; + new(j) T(w); + j->flags |= dJOINT_INGROUP; + } + return j; + } + size_t getJointCount() const { return m_num; } + size_t exportJoints(dxJoint **jlist); + + void *beginEnum() { return m_stack.rewind(); } + void *continueEnum(size_t num_bytes) { return m_stack.next(num_bytes); } + + void freeAll(); + +private: + size_t m_num; // number of joints on the stack + dObStack m_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 + 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, - const dVector3 ax1, int rotational ); + 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, + const dVector3 ax1, int rotational ); }; Added: trunk/ode/src/objects.cpp =================================================================== --- trunk/ode/src/objects.cpp (rev 0) +++ trunk/ode/src/objects.cpp 2012-03-02 22:13:00 UTC (rev 1870) @@ -0,0 +1,103 @@ +/************************************************************************* + * * + * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * + * All rights reserved. Email: ru...@q1... 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. * + * * + *************************************************************************/ + +// Object, body, and world methods. + + +#include <ode/common.h> +#include <ode/objects.h> +#include <ode/matrix.h> +#include "config.h" + +#include "objects.h" +#include "util.h" + + +#define dWORLD_DEFAULT_GLOBAL_ERP REAL(0.2) + +#if defined(dSINGLE) +#define dWORLD_DEFAULT_GLOBAL_CFM REAL(1e-5) +#elif defined(dDOUBLE) +#define dWORLD_DEFAULT_GLOBAL_CFM REAL(1e-10) +#else +#error dSINGLE or dDOUBLE must be defined +#endif + + + +dxAutoDisable::dxAutoDisable(void *): + idle_time(REAL(0.0)), + idle_steps(10), + average_samples(1), // Default is 1 sample => Instantaneous velocity + linear_average_threshold(REAL(0.01)*REAL(0.01)), // (magnitude squared) + angular_average_threshold(REAL(0.01)*REAL(0.01)) // (magnitude squared) +{ +} + +dxDampingParameters::dxDampingParameters(void *): + linear_scale(REAL(0.0)), + angular_scale(REAL(0.0)), + linear_threshold(REAL(0.01) * REAL(0.01)), + angular_threshold(REAL(0.01) * REAL(0.01)) +{ +} + +dxQuickStepParameters::dxQuickStepParameters(void *): + num_iterations(20), + w(REAL(1.3)) +{ +} + +dxContactParameters::dxContactParameters(void *): + max_vel(dInfinity), + min_depth(REAL(0.0)) +{ +} + +dxWorld::dxWorld(): + dBase(), + firstbody(NULL), + firstjoint(NULL), + nb(0), + nj(0), + global_erp(dWORLD_DEFAULT_GLOBAL_ERP), + global_cfm(dWORLD_DEFAULT_GLOBAL_CFM), + adis(NULL), + body_flags(0), + wmem(NULL), + qs(NULL), + contactp(NULL), + dampingp(NULL), + max_angular_speed(dInfinity) +{ + dSetZero (gravity, 4); +} + +dxWorld::~dxWorld() +{ + if (wmem) + { + wmem->Release(); + } +} + + Property changes on: trunk/ode/src/objects.cpp ___________________________________________________________________ Added: svn:mime-type + text/cpp Added: svn:eol-style + native Modified: trunk/ode/src/objects.h =================================================================== --- trunk/ode/src/objects.h 2012-03-02 21:46:22 UTC (rev 1869) +++ trunk/ode/src/objects.h 2012-03-02 22:13:00 UTC (rev 1870) @@ -76,9 +76,12 @@ struct dxAutoDisable { dReal idle_time; // time the body needs to be idle to auto-disable it int idle_steps; // steps the body needs to be idle to auto-disable it + unsigned int average_samples; // size of the average_lvel and average_avel buffers dReal linear_average_threshold; // linear (squared) average velocity threshold dReal angular_average_threshold; // angular (squared) average velocity threshold - unsigned int average_samples; // size of the average_lvel and average_avel buffers + + dxAutoDisable() {} + explicit dxAutoDisable(void *); }; @@ -88,6 +91,9 @@ dReal angular_scale; // multiply the angular velocity by (1 - scale) dReal linear_threshold; // linear (squared) average speed threshold dReal angular_threshold; // angular (squared) average speed threshold + + dxDampingParameters() {} + explicit dxDampingParameters(void *); }; @@ -95,6 +101,9 @@ struct dxQuickStepParameters { int num_iterations; // number of SOR iterations to perform dReal w; // the SOR over-relaxation parameter + + dxQuickStepParameters() {} + explicit dxQuickStepParameters(void *); }; @@ -102,6 +111,9 @@ struct dxContactParameters { dReal max_vel; // maximum correcting velocity dReal min_depth; // thickness of 'surface layer' + + dxContactParameters() {} + explicit dxContactParameters(void *); }; // position vector and rotation matrix for geometry objects that are not @@ -156,6 +168,10 @@ dxContactParameters contactp; dxDampingParameters dampingp; // damping parameters dReal max_angular_speed; // limit the angular velocity to this magnitude + + + dxWorld(); + ~dxWorld(); }; Modified: trunk/ode/src/obstack.cpp =================================================================== --- trunk/ode/src/obstack.cpp 2012-03-02 21:46:22 UTC (rev 1869) +++ trunk/ode/src/obstack.cpp 2012-03-02 22:13:00 UTC (rev 1870) @@ -1,24 +1,24 @@ /************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: ru...@q1... 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: ru...@q1... 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 <ode/common.h> #include <ode/error.h> @@ -31,7 +31,7 @@ // macros and constants #define ROUND_UP_OFFSET_TO_EFFICIENT_SIZE(arena,ofs) \ - ofs = (size_t) (dEFFICIENT_SIZE( ((intP)(arena)) + ofs ) - ((intP)(arena)) ); + ofs = (size_t) (dEFFICIENT_SIZE( ((intP)(arena)) + ofs ) - ((intP)(arena)) ) #define MAX_ALLOC_SIZE \ ((size_t)(dOBSTACK_ARENA_SIZE - sizeof (Arena) - EFFICIENT_ALIGNMENT + 1)) @@ -39,12 +39,10 @@ //**************************************************************************** // dObStack -dObStack::dObStack() +dObStack::dObStack(): + m_first(NULL), m_last(NULL), + m_current_arena(NULL), m_current_ofs(0) { - first = 0; - last = 0; - current_arena = 0; - current_ofs = 0; } @@ -52,9 +50,9 @@ { // free all arenas Arena *a,*nexta; - a = first; + a = m_first; while (a) { - nexta = a->next; + nexta = a->m_next; dFree (a,dOBSTACK_ARENA_SIZE); a = nexta; } @@ -65,68 +63,95 @@ { if (num_bytes > MAX_ALLOC_SIZE) dDebug (0,"num_bytes too large"); - // allocate or move to a new arena if necessary - if (!first) { - // allocate the first arena if necessary - first = last = (Arena *) dAlloc (dOBSTACK_ARENA_SIZE); - first->next = 0; - first->used = sizeof (Arena); - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (first,first->used); - } - else { - // we already have one or more arenas, see if a new arena must be used - if ((last->used + num_bytes) > dOBSTACK_ARENA_SIZE) { - if (!last->next) { - last->next = (Arena *) dAlloc (dOBSTACK_ARENA_SIZE); - last->next->next = 0; + bool last_alloc_needed = false, last_init_needed = false; + Arena **last_ptr = NULL; + + if (m_last != NULL) { + if ((m_last->m_used + num_bytes) > dOBSTACK_ARENA_SIZE) { + if (m_last->m_next != NULL) { + m_last = m_last->m_next; + last_init_needed = true; + } else { + last_ptr = &m_last->m_next; + last_alloc_needed = true; } - last = last->next; - last->used = sizeof (Arena); - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (last,last->used); } + } else { + last_ptr = &m_last; + last_alloc_needed = true; } + if (last_alloc_needed) { + Arena *new_last = (Arena *) dAlloc (dOBSTACK_ARENA_SIZE); + new_last->m_next = 0; + *last_ptr = new_last; + if (m_first == NULL) { + m_first = new_last; + } + m_last = new_last; + last_init_needed = true; + } + + if (last_init_needed) { + m_last->m_used = sizeof (Arena); + ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (m_last,m_last->m_used); + } + // allocate an area in the arena - char *c = ((char*) last) + last->used; - last->used += num_bytes; - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (last,last->used); + char *c = ((char*) m_last) + m_last->m_used; + m_last->m_used += num_bytes; + ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (m_last,m_last->m_used); return c; } void dObStack::freeAll() { - last = first; - if (first) { - first->used = sizeof(Arena); - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (first,first->used); + Arena *current = m_first; + m_last = current; + // It is necessary to reset used sizes in whole arena chain + // otherwise enumeration may proceed to remains of old deleted joints in unused arenas + while (current) { + current->m_used = sizeof(Arena); + ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (current,current->m_used); + current = current->m_next; } } void *dObStack::rewind() { - current_arena = first; - current_ofs = sizeof (Arena); - if (current_arena) { - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (current_arena,current_ofs) - return ((char*) current_arena) + current_ofs; - } - else return 0; + return switch_to_arena(m_first); } - void *dObStack::next (size_t num_bytes) { // this functions like alloc, except that no new storage is ever allocated - if (!current_arena) return 0; - current_ofs += num_bytes; - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (current_arena,current_ofs); - if (current_ofs >= current_arena->used) { - current_arena = current_arena->next; - if (!current_arena) return 0; - current_ofs = sizeof (Arena); - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (current_arena,current_ofs); + if (!m_current_arena) { + return 0; } - return ((char*) current_arena) + current_ofs; + + m_current_ofs += num_bytes; + ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (m_current_arena,m_current_ofs); + + if (m_current_ofs < m_current_arena->m_used) { + return ((char*) m_current_arena) + m_current_ofs; + } + + return switch_to_arena(m_current_arena->m_next); } + +void *dObStack::switch_to_arena(Arena *next_arena) +{ + m_current_arena = next_arena; + if (!next_arena) { + return 0; + } + m_current_ofs = sizeof (Arena); + ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (next_arena, m_current_ofs); + // Check if end of allocation has been reached + if (m_current_ofs >= next_arena->m_used) { + return 0; + } + return ((char*) next_arena) + m_current_ofs; +} Modified: trunk/ode/src/obstack.h =================================================================== --- trunk/ode/src/obstack.h 2012-03-02 21:46:22 UTC (rev 1869) +++ trunk/ode/src/obstack.h 2012-03-02 22:13:00 UTC (rev 1870) @@ -30,18 +30,6 @@ struct dObStack : public dBase { - struct Arena { - Arena *next; // next arena in linked list - size_t used; // total number of bytes used in this arena, counting - }; // this header - - Arena *first; // head of the arena linked list. 0 if no arenas yet - Arena *last; // arena where blocks are currently being allocated - - // used for iterator - Arena *current_arena; - size_t current_ofs; - dObStack(); ~dObStack(); @@ -62,6 +50,23 @@ // of the previous block. this returns null if there are no more arenas. // the sequence of 'num_bytes' parameters passed to next() during a // traversal of the list must exactly match the parameters passed to alloc(). + +private: + struct Arena { + Arena *m_next; // next arena in linked list + size_t m_used; // total number of bytes used in this arena, counting + }; // this header + +private: + void *switch_to_arena(Arena *next_arena); + +private: + Arena *m_first; // head of the arena linked list. 0 if no arenas yet + Arena *m_last; // arena where blocks are currently being allocated + + // used for iterator + Arena *m_current_arena; + size_t m_current_ofs; }; Modified: trunk/ode/src/ode.cpp =================================================================== --- trunk/ode/src/ode.cpp 2012-03-02 21:46:22 UTC (rev 1869) +++ trunk/ode/src/ode.cpp 2012-03-02 22:13:00 UTC (rev 1870) @@ -1,24 +1,24 @@ /************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: ru...@q1... 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: ru...@q1... 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" @@ -49,11 +49,11 @@ dObject::dObject(dxWorld *w) { - world = w; - next = 0; - tome = 0; - userdata = 0; - tag = 0; + world = w; + next = 0; + tome = 0; + userdata = 0; + tag = 0; } @@ -90,13 +90,13 @@ 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; + if (n->joint == j) { + if (last) last->next = n->next; + else body->firstjoint = n->next; + break; + } + last = n; + n = n->next; } } } @@ -132,8 +132,8 @@ static inline int generateWorldCheckTag() { - // Atomicity is not necessary here - return ++g_world_check_tag_generator; + // Atomicity is not necessary here + return ++g_world_check_tag_generator; } static void checkWorld (dxWorld *w) @@ -177,11 +177,11 @@ /* // 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"); - } + 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 @@ -189,11 +189,11 @@ 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"); + 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"); } } } @@ -202,12 +202,12 @@ 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)"); + 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->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"); } @@ -218,7 +218,7 @@ 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)) + (j->node[1].body && j->node[1].body->tag != count)) dDebug (0,"bad body pointer in joint"); } } @@ -233,9 +233,9 @@ // body dxBody::dxBody(dxWorld *w) : - dObject(w) +dObject(w) { - + } @@ -325,13 +325,13 @@ // delete the average buffers if(b->average_lvel_buffer) { - delete[] (b->average_lvel_buffer); - b->average_lvel_buffer = 0; + delete[] (b->average_lvel_buffer); + b->average_lvel_buffer = 0; } if(b->average_avel_buffer) { - delete[] (b->average_avel_buffer); - b->average_avel_buffer = 0; + delete[] (b->average_avel_buffer); + b->average_avel_buffer = 0; } delete b; @@ -423,11 +423,11 @@ void dBodyCopyPosition (dBodyID b, dVector3 pos) { - dAASSERT (b); - dReal* src = b->posr.pos; - pos[0] = src[0]; - pos[1] = src[1]; - pos[2] = src[2]; + dAASSERT (b); + dReal* src = b->posr.pos; + pos[0] = src[0]; + pos[1] = src[1]; + pos[2] = src[2]; } @@ -440,20 +440,20 @@ void dBodyCopyRotation (dBodyID b, dMatrix3 R) { - dAASSERT (b); - const dReal* src = b->posr.R; - R[0] = src[0]; - R[1] = src[1]; - R[2] = src[2]; - R[3] = src[3]; - R[4] = src[4]; - R[5] = src[5]; - R[6] = src[6]; - R[7] = src[7]; - R[8] = src[8]; - R[9] = src[9]; - R[10] = src[10]; - R[11] = src[11]; + dAASSERT (b); + const dReal* src = b->posr.R; + R[0] = src[0]; + R[1] = src[1]; + R[2] = src[2]; + R[3] = src[3]; + R[4] = src[4]; + R[5] = src[5]; + R[6] = src[6]; + R[7] = src[7]; + R[8] = src[8]; + R[9] = src[9]; + R[10] = src[10]; + R[11] = src[11]; } @@ -466,12 +466,12 @@ void dBodyCopyQuaternion (dBodyID b, dQuaternion quat) { - dAASSERT (b); - dReal* src = b->q; - quat[0] = src[0]; - quat[1] = src[1]; - quat[2] = src[2]; - quat[3] = src[3]; + dAASSERT (b); + dReal* src = b->q; + quat[0] = src[0]; + quat[1] = src[1]; + quat[2] = src[2]; + quat[3] = src[3]; } @@ -497,8 +497,8 @@ // The centre of mass must be at the origin. // Use dMassTranslate( mass, -mass->c[0], -mass->c[1], -mass->c[2] ) to correct it. dUASSERT( fabs( mass->c[0] ) <= dEpsilon && - fabs( mass->c[1] ) <= dEpsilon && - fabs( mass->c[2] ) <= dEpsilon, "The centre of mass must be at the origin." ); + fabs( mass->c[1] ) <= dEpsilon && + fabs( mass->c[2] ) <= dEpsilon, "The centre of mass must be at the origin." ); memcpy (&b->mass,mass,sizeof(dMass)); if (dInvertPDMatrix (b->mass.I,b->invI,3,NULL)==0) { @@ -565,7 +565,7 @@ void dBodyAddForceAtPos (dBodyID b, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) + dReal px, dReal py, dReal pz) { dAASSERT (b); b->facc[0] += fx; @@ -583,7 +583,7 @@ void dBodyAddForceAtRelPos (dBodyID b, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) + dReal px, dReal py, dReal pz) { dAASSERT (b); dVector3 prel,f,p; @@ -604,7 +604,7 @@ void dBodyAddRelForceAtPos (dBodyID b, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) + dReal px, dReal py, dReal pz) { dAASSERT (b); dVector3 frel,f; @@ -625,7 +625,7 @@ void dBodyAddRelForceAtRelPos (dBodyID b, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) + dReal px, dReal py, dReal pz) { dAASSERT (b); dVector3 frel,prel,f,p; @@ -679,7 +679,7 @@ void dBodyGetRelPointPos (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) + dVector3 result) { dAASSERT (b); dVector3 prel,p; @@ -695,7 +695,7 @@ void dBodyGetRelPointVel (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) + dVector3 result) { dAASSERT (b); dVector3 prel,p; @@ -712,7 +712,7 @@ void dBodyGetPointVel (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) + dVector3 result) { dAASSERT (b); dVector3 p; @@ -728,7 +728,7 @@ void dBodyGetPosRelPoint (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) + dVector3 result) { dAASSERT (b); dVector3 prel; @@ -741,7 +741,7 @@ void dBodyVectorToWorld (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) + dVector3 result) { dAASSERT (b); dVector3 p; @@ -754,7 +754,7 @@ void dBodyVectorFromWorld (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) + dVector3 result) { dAASSERT (b); dVector3 p; @@ -773,8 +773,8 @@ 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; + b->finite_rot_axis[2] != 0) { + b->flags |= dxBodyFlagFiniteRotationAxis; } } } @@ -834,7 +834,7 @@ void dBodySetDynamic (dBodyID b) { dAASSERT (b); - + dBodySetMass(b,&b->mass); } @@ -894,132 +894,132 @@ dReal dBodyGetAutoDisableLinearThreshold (dBodyID b) { - dAASSERT(b); - return dSqrt (b->adis.linear_average_threshold); + dAASSERT(b); + return dSqrt (b->adis.linear_average_threshold); } void dBodySetAutoDisableLinearThreshold (dBodyID b, dReal linear_average_threshold) { - dAASSERT(b); - b->adis.linear_average_threshold = linear_average_threshold * linear_average_threshold; + dAASSERT(b); + b->adis.linear_average_threshold = linear_average_threshold * linear_average_threshold; } dReal dBodyGetAutoDisableAngularThreshold (dBodyID b) { - dAASSERT(b); - return dSqrt (b->adis.angular_average_threshold); + dAASSERT(b); + return dSqrt (b->adis.angular_average_threshold); } void dBodySetAutoDisableAngularThreshold (dBodyID b, dReal angular_average_threshold) { - dAASSERT(b); - b->adis.angular_average_threshold = angular_average_threshold * angular_average_threshold; + dAASSERT(b); + b->adis.angular_average_threshold = angular_average_threshold * angular_average_threshold; } int dBodyGetAutoDisableAverageSamplesCount (dBodyID b) { - dAASSERT(b); - return b->adis.average_samples; + dAASSERT(b); + return b->adis.average_samples; } void dBodySetAutoDisableAverageSamplesCount (dBodyID b, unsigned int average_samples_count) { - dAASSERT(b); - b->adis.average_samples = average_samples_count; - // update the average buffers - if(b->average_lvel_buffer) - { - delete[] b->average_lvel_buffer; - b->average_lvel_buffer = 0; - } - if(b->average_avel_buffer) - { - delete[] b->average_avel_buffer; - b->average_avel_buffer = 0; - } - if(b->adis.average_samples > 0) - { - b->average_lvel_buffer = new dVector3[b->adis.average_samples]; - b->average_avel_buffer = new dVector3[b->adis.average_samples]; - } - else - { - b->average_lvel_buffer = 0; - b->average_avel_buffer = 0; - } - // new buffer is empty - b->average_counter = 0; - b->average_ready = 0; + dAASSERT(b); + b->adis.average_samples = average_samples_count; + // update the average buffers + if(b->average_lvel_buffer) + { + delete[] b->average_lvel_buffer; + b->average_lvel_buffer = 0; + } + if(b->average_avel_buffer) + { + delete[] b->average_avel_buffer; + b->average_avel_buffer = 0; + } + if(b->adis.average_samples > 0) + { + b->average_lvel_buffer = new dVector3[b->adis.average_samples]; + b->average_avel_buffer = new dVector3[b->adis.average_samples]; + } + else + { + b->average_lvel_buffer = 0; + b->average_avel_buffer = 0; + } + // new buffer is empty + b->average_counter = 0; + b->average_ready = 0; } int dBodyGetAutoDisableSteps (dBodyID b) { - dAASSERT(b); - return b->adis.idle_steps; + dAASSERT(b); + return b->adis.idle_steps; } void dBodySetAutoDisableSteps (dBodyID b, int steps) { - dAASSERT(b); - b->adis.idle_steps = steps; + dAASSERT(b); + b->adis.idle_steps = steps; } dReal dBodyGetAutoDisableTime (dBodyID b) { - dAASSERT(b); - return b->adis.idle_time; + dAASSERT(b); + return b->adis.idle_time; } void dBodySetAutoDisableTime (dBodyID b, dReal time) { - dAASSERT(b); - b->adis.idle_time = time; + dAASSERT(b); + b->adis.idle_time = time; } int dBodyGetAutoDisableFlag (dBodyID b) { - dAASSERT(b); - return ((b->flags & dxBodyAutoDisable) != 0); + dAASSERT(b); + return ((b->flags & dxBodyAutoDisable) != 0); } void dBodySetAutoDisableFlag (dBodyID b, int do_auto_disable) { - dAASSERT(b); - if (!do_auto_disable) - { - b->flags &= ~dxBodyAutoDisable; - // (mg) we should also reset the IsDisabled state to correspond to the DoDisabling flag - b->flags &= ~dxBodyDisabled; - b->adis.idle_steps = dWorldGetAutoDisableSteps(b->world); - b->adis.idle_time = dWorldGetAutoDisableTime(b->world); - // resetting the average calculations too - dBodySetAutoDisableAverageSamplesCount(b, dWorldGetAutoDisableAverageSamplesCount(b->world) ); - } - else - { - b->flags |= dxBodyAutoDisable; - } + dAASSERT(b); + if (!do_auto_disable) + { + b->flags &= ~dxBodyAutoDisable; + // (mg) we should also reset the IsDisabled state to correspond to the DoDisabling flag + b->flags &= ~dxBodyDisabled; + b->adis.idle_steps = dWorldGetAutoDisableSteps(b->world); + b->adis.idle_time = dWorldGetAutoDisableTime(b->world); + // resetting the average calculations too + dBodySetAutoDisableAverageSamplesCount(b, dWorldGetAutoDisableAverageSamplesCount(b->world) ); + } + else + { + b->flags |= dxBodyAutoDisable; + } } void dBodySetAutoDisableDefaults (dBodyID b) { - dAASSERT(b); - dWorldID w = b->world; - dAASSERT(w); - b->adis = w->adis; - dBodySetAutoDisableFlag (b, w->body_flags & dxBodyAutoDisable); + dAASSERT(b); + dWorldID w = b->world; + dAASSERT(w); + b->adis = w->adis; + dBodySetAutoDisableFlag (b, w->body_flags & dxBodyAutoDisable); } @@ -1027,129 +1027,129 @@ dReal dBodyGetLinearDamping(dBodyID b) { - dAASSERT(b); - return b->dampingp.linear_scale; + dAASSERT(b); + return b->dampingp.linear_scale; } void dBodySetLinearDamping(dBodyID b, dReal scale) { - dAASSERT(b); - if (scale) - b->flags |= dxBodyLinearDamping; - else - b->flags &= ~dxBodyLinearDamping; - b->dampingp.linear_scale = scale; + dAASSERT(b); + if (scale) + b->flags |= dxBodyLinearDamping; + else + b->flags &= ~dxBodyLinearDamping; + b->dampingp.linear_scale = scale; } dReal dBodyGetAngularDamping(dBodyID b) { - dAASSERT(b); - return b->dampingp.angular_scale; + dAASSERT(b); + return b->dampingp.angular_scale; } void dBodySetAngularDamping(dBodyID b, dReal scale) { - dAASSERT(b); - if (scale) - b->flags |= dxBodyAngularDamping; - else - b->flags &= ~dxBodyAngularDamping; - b->dampingp.angular_scale = scale; + dAASSERT(b); + if (scale) + b->flags |= dxBodyAngularDamping; + else + b->flags &= ~dxBodyAngularDamping; + b->dampingp.angular_scale = scale; } void dBodySetDamping(dBodyID b, dReal linear_scale, dReal angular_scale) { - dAASSERT(b); - dBodySetLinearDamping(b, linear_scale); - dBodySetAngularDamping(b, angular_scale); + dAASSERT(b); + dBodySetLinearDamping(b, linear_scale); + dBodySetAngularDamping(b, angular_scale); } dReal dBodyGetLinearDampingThreshold(dBodyID b) { - dAASSERT(b); - return dSqrt(b->dampingp.linear_threshold); + dAASSERT(b); + return dSqrt(b->dampingp.linear_threshold); } void dBodySetLinearDampingThreshold(dBodyID b, dReal threshold) { - dAASSERT(b); - b->dampingp.linear_threshold = threshold*threshold; + dAASSERT(b); + b->dampingp.linear_threshold = threshold*threshold; } dReal dBodyGetAngularDampingThreshold(dBodyID b) { - dAASSERT(b); - return dSqrt(b->dampingp.angular_threshold); + dAASSERT(b); + return dSqrt(b->dampingp.angular_threshold); } void dBodySetAngularDampingThreshold(dBodyID b, dReal threshold) { - dAASSERT(b); - b->dampingp.angular_threshold = threshold*threshold; + dAASSERT(b); + b->dampingp.angular_threshold = threshold*threshold; } void dBodySetDampingDefaults(dBodyID b) { - dAASSERT(b); - dWorldID w = b->world; - dAASSERT(w); - b->dampingp = w->dampingp; - const unsigned mask = dxBodyLinearDamping | dxBodyAngularDamping; - b->flags &= ~mask; // zero them - b->flags |= w->body_flags & mask; + dAASSERT(b); + dWorldID w = b->world; + dAASSERT(w); + b->dampingp = w->dampingp; + const unsigned mask = dxBodyLinearDamping | dxBodyAngularDamping; + b->flags &= ~mask; // zero them + b->flags |= w->body_flags & mask; } dReal dBodyGetMaxAngularSpeed(dBodyID b) { - dAASSERT(b); - return b->max_angular_speed; + dAASSERT(b); + return b->max_angular_speed; } void dBodySetMaxAngularSpeed(dBodyID b, dReal max_speed) { - dAASSERT(b); - if (max_speed < dInfinity) - b->flags |= dxBodyMaxAngularSpeed; - else - b->flags &= ~dxBodyMaxAngularSpeed; - b->max_angular_speed = max_speed; + dAASSERT(b); + if (max_speed < dInfinity) + b->flags |= dxBodyMaxAngularSpeed; + else + b->flags &= ~dxBodyMaxAngularSpeed; + b->max_angular_speed = max_speed; } void dBodySetMovedCallback(dBodyID b, void (*callback)(dBodyID)) { - dAASSERT(b); - b->moved_callback = callback; + dAASSERT(b); + b->moved_callback = callback; } dGeomID dBodyGetFirstGeom(dBodyID b) { - dAASSERT(b); - return b->geom; + dAASSERT(b); + return b->geom; } dGeomID dBodyGetNextGeom(dGeomID geom) { - dAASSERT(geom); - return dGeomGetBodyNext(geom); + dAASSERT(geom); + return dGeomGetBodyNext(geom); } int dBodyGetGyroscopicMode(dBodyID b) { - dAASSERT(b); - return b->flags & dxBodyGyroscopic; + dAASSERT(b); + return b->flags & dxBodyGyroscopic; } void dBodySetGyroscopicMode(dBodyID b, int enabled) { - dAASSERT(b); - if (enabled) - b->flags |= dxBodyGyroscopic; - else - b->flags &= ~dxBodyGyroscopic; + dAASSERT(b); + if (enabled) + b->flags |= dxBodyGyroscopic; + else + b->flags &= ~dxBodyGyroscopic; } @@ -1162,186 +1162,206 @@ template<class T> dxJoint* createJoint(dWorldID w, dJointGroupID group) { - dxJoint *j; - if (group) { - j = (dxJoint*) group->stack.alloc(sizeof(T)); - group->num++; - } else - j = (dxJoint*) dAlloc(sizeof(T)); - - new(j) T(w); - if (group) - j->flags |= dJOINT_INGROUP; - - return j; + dxJoint *j; + if (group) { + j = group->alloc<T>(w); + } else { + j = new T(w); + } + return j; } dxJoint * dJointCreateBall (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointBall>(w,group); + dAASSERT (w); + return createJoint<dxJointBall>(w,group); } dxJoint * dJointCreateHinge (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointHinge>(w,group); + dAASSERT (w); + return createJoint<dxJointHinge>(w,group); } dxJoint * dJointCreateSlider (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointSlider>(w,group); + dAASSERT (w); + return createJoint<dxJointSlider>(w,group); } dxJoint * dJointCreateContact (dWorldID w, dJointGroupID group, - const dContact *c) + const dContact *c) { - dAASSERT (w && c); - dxJointContact *j = (dxJointContact *) - createJoint<dxJointContact> (w,group); - j->contact = *c; - return j; + dAASSERT (w && c); + dxJointContact *j = (dxJointContact *) + createJoint<dxJointContact> (w,group); + j->contact = *c; + return j; } dxJoint * dJointCreateHinge2 (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointHinge2> (w,group); + dAASSERT (w); + return createJoint<dxJointHinge2> (w,group); } dxJoint * dJointCreateUniversal (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointUniversal> (w,group); + dAASSERT (w); + return createJoint<dxJointUniversal> (w,group); } dxJoint * dJointCreatePR (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointPR> (w,group); + dAASSERT (w); + return createJoint<dxJointPR> (w,group); } dxJoint * dJointCreatePU (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointPU> (w,group); + dAASSERT (w); + return createJoint<dxJointPU> (w,group); } dxJoint * dJointCreatePiston (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointPiston> (w,group); + dAASSERT (w); + return createJoint<dxJointPiston> (w,group); } dxJoint * dJointCreateFixed (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointFixed> (w,group); + dAASSERT (w); + return createJoint<dxJointFixed> (w,group); } dxJoint * dJointCreateNull (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointNull> (w,group); + dAASSERT (w); + return createJoint<dxJointNull> (w,group); } dxJoint * dJointCreateAMotor (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointAMotor> (w,group); + dAASSERT (w); + return createJoint<dxJointAMotor> (w,group); } dxJoint * dJointCreateLMotor (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointLMotor> (w,group); + dAASSERT (w); + return createJoint<dxJointLMotor> (w,group); } dxJoint * dJointCreatePlane2D (dWorldID w, dJointGroupID group) { - dAASSERT (w); - return createJoint<dxJointPlane2D> (w,group); + dAASSERT (w); + return createJoint<dxJointPlane2D> (w,group); } -void dJointDestroy (dxJoint *j) +static void FinalizeAndDestroyJointInstance(dxJoint *j, bool delete_it) { - dAASSERT (j); - size_t sz = j->size(); - if (j->flags & dJOINT_INGROUP) return; + // if any group joints have their world pointer set to 0, their world was + // previously destroyed. no special handling is required for these joints. + if (j->world != NULL) { removeJointReferencesFromAttachedBodies (j); removeObjectFromList (j); j->world->nj--; + } + if (delete_it) { + delete j; + } else { j->~dxJoint(); - dFree (j, sz); + } } +void dJointDestroy (dxJoint *j) +{ + dAASSERT (j); + if (!(j->flags & dJOINT_INGROUP)) { + FinalizeAndDestroyJointInstance(j, true); + } +} + 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; + // not any more ... dUASSERT (max_size > 0,"max size must be > 0"); + dxJointGroup *group = new dxJointGroup(); + return group; } void dJointGroupDestroy (dJointGroupID group) { - dAASSERT (group); - dJointGroupEmpty (group); - delete 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); + + const size_t num_joints = group->getJointCount(); + if (num_joints != 0) { + // Local array is used since ALLOCA leads to mysterious NULL values in first array element and crashes under VS2005 :) + const size_t max_stack_jlist_size = 1024; + dxJoint *stack_jlist[max_stack_jlist_size]; + + const size_t jlist_size = num_joints * sizeof(dxJoint*); + dxJoint **jlist = num_joints <= max_stack_jlist_size ? stack_jlist : (dxJoint **)dAlloc(jlist_size); - 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->size())); + if (jlist != NULL) { + // 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. + size_t num_exported = group->exportJoints(jlist); + dIVERIFY(num_exported == num_joints); + + for (size_t i = num_joints; i != 0; ) { + --i; + dxJoint *j = jlist[i]; + FinalizeAndDestroyJointInstance(j, false); + } + } else { + // ...else if there is no memory, go on detaching the way it is possible + size_t joint_bytes; + for (dxJoint *j = (dxJoint *)group->beginEnum(); j != NULL; j = (dxJoint *)group->continueEnum(joint_bytes)) { + joint_bytes = j->size(); // Get size before object is destroyed! + FinalizeAndDestroyJointInstance(j, false); + } } - for (i=group->num-1; i >= 0; i--) { - if (jlist[i]->world) { - removeJointReferencesFromAttachedBodies (jlist[i]); - removeObjectFromList (jlist[i]); - jlist[i]->world->nj--; - jlist[i]->~dxJoint(); - } + + group->freeAll(); + + if (jlist != stack_jlist && jlist != NULL) { + dFree(jlist, jlist_size); } - group->num = 0; - group->stack.freeAll(); + } } + int dJointGetNumBodies(dxJoint *joint) { - // check arguments - dUASSERT (joint,"bad joint argument"); + // check arguments ... [truncated message content] |
From: <ole...@us...> - 2012-03-02 21:46:29
|
Revision: 1869 http://opende.svn.sourceforge.net/opende/?rev=1869&view=rev Author: oleh_derevenko Date: 2012-03-02 21:46:22 +0000 (Fri, 02 Mar 2012) Log Message: ----------- Assertion checking macros moved from common.h to error.h Modified Paths: -------------- trunk/CHANGELOG.txt trunk/include/ode/common.h trunk/include/ode/error.h Modified: trunk/CHANGELOG.txt =================================================================== --- trunk/CHANGELOG.txt 2012-02-25 23:21:03 UTC (rev 1868) +++ trunk/CHANGELOG.txt 2012-03-02 21:46:22 UTC (rev 1869) @@ -8,6 +8,8 @@ * keep the format consistent (79 char width, M/D/Y date format). ------------------------------------------------------------------------------ +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 Modified: trunk/include/ode/common.h =================================================================== --- trunk/include/ode/common.h 2012-02-25 23:21:03 UTC (rev 1868) +++ trunk/include/ode/common.h 2012-03-02 21:46:22 UTC (rev 1869) @@ -22,10 +22,11 @@ #ifndef _ODE_COMMON_H_ #define _ODE_COMMON_H_ + #include <ode/odeconfig.h> #include <ode/error.h> -#include <math.h> + #ifdef __cplusplus extern "C" { #endif @@ -50,54 +51,6 @@ #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 - */ - -# if defined(__STDC__) && __STDC_VERSION__ >= 199901L -# define __FUNCTION__ __func__ -# endif -#ifndef dNODEBUG -# ifdef __GNUC__ -# define dIASSERT(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s() [%s:%u]",__FUNCTION__,__FILE__,__LINE__); } } -# define dUASSERT(a,msg) { if (!(a)) { dDebug (d_ERR_UASSERT, \ - msg " in %s()", __FUNCTION__); } } -# define dDEBUGMSG(msg) { dMessage (d_ERR_UASSERT, \ - msg " in %s() [%s:%u]", __FUNCTION__,__FILE__,__LINE__); } -# else // not __GNUC__ -# define dIASSERT(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s:%u",__FILE__,__LINE__); } } -# define dUASSERT(a,msg) { if (!(a)) { dDebug (d_ERR_UASSERT, \ - msg " (%s:%u)", __FILE__,__LINE__); } } -# define dDEBUGMSG(msg) { dMessage (d_ERR_UASSERT, \ - msg " (%s:%u)", __FILE__,__LINE__); } -# endif -# define dIVERIFY(a) dIASSERT(a) -#else -# define dIASSERT(a) ((void)0) -# define dUASSERT(a,msg) ((void)0) -# define dDEBUGMSG(msg) ((void)0) -# define dIVERIFY(a) ((void)(a)) -#endif - -# ifdef __GNUC__ -# define dICHECK(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s() [%s:%u]",__FUNCTION__,__FILE__,__LINE__); *(int *)0 = 0; } } -# else // not __GNUC__ -# define dICHECK(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s:%u",__FILE__,__LINE__); *(int *)0 = 0; } } -# endif - -// Argument assert is a special case of user assert -#define dAASSERT(a) dUASSERT(a,"Bad argument(s)") - /* floating point data type, vector, matrix and quaternion types */ #if defined(dSINGLE) Modified: trunk/include/ode/error.h =================================================================== --- trunk/include/ode/error.h 2012-02-25 23:21:03 UTC (rev 1868) +++ trunk/include/ode/error.h 2012-03-02 21:46:22 UTC (rev 1869) @@ -56,6 +56,57 @@ ODE_API void dMessage (int num, const char *msg, ...); + + +/* 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 + */ + +# if defined(__STDC__) && __STDC_VERSION__ >= 199901L +# define __FUNCTION__ __func__ +# endif +#ifndef dNODEBUG +# ifdef __GNUC__ +# define dIASSERT(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ + "assertion \"" #a "\" failed in %s() [%s:%u]",__FUNCTION__,__FILE__,__LINE__); } } +# define dUASSERT(a,msg) { if (!(a)) { dDebug (d_ERR_UASSERT, \ + msg " in %s()", __FUNCTION__); } } +# define dDEBUGMSG(msg) { dMessage (d_ERR_UASSERT, \ + msg " in %s() [%s:%u]", __FUNCTION__,__FILE__,__LINE__); } +# else // not __GNUC__ +# define dIASSERT(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ + "assertion \"" #a "\" failed in %s:%u",__FILE__,__LINE__); } } +# define dUASSERT(a,msg) { if (!(a)) { dDebug (d_ERR_UASSERT, \ + msg " (%s:%u)", __FILE__,__LINE__); } } +# define dDEBUGMSG(msg) { dMessage (d_ERR_UASSERT, \ + msg " (%s:%u)", __FILE__,__LINE__); } +# endif +# define dIVERIFY(a) dIASSERT(a) +#else +# define dIASSERT(a) ((void)0) +# define dUASSERT(a,msg) ((void)0) +# define dDEBUGMSG(msg) ((void)0) +# define dIVERIFY(a) ((void)(a)) +#endif + +# ifdef __GNUC__ +# define dICHECK(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ + "assertion \"" #a "\" failed in %s() [%s:%u]",__FUNCTION__,__FILE__,__LINE__); *(int *)0 = 0; } } +# else // not __GNUC__ +# define dICHECK(a) { if (!(a)) { dDebug (d_ERR_IASSERT, \ + "assertion \"" #a "\" failed in %s:%u",__FILE__,__LINE__); *(int *)0 = 0; } } +# endif + +// Argument assert is a special case of user assert +#define dAASSERT(a) dUASSERT(a,"Bad argument(s)") + + #ifdef __cplusplus } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-02-25 23:21:10
|
Revision: 1868 http://opende.svn.sourceforge.net/opende/?rev=1868&view=rev Author: oleh_derevenko Date: 2012-02-25 23:21:03 +0000 (Sat, 25 Feb 2012) Log Message: ----------- Cosmetic: Spelling error corrected Modified Paths: -------------- trunk/INSTALL.txt Modified: trunk/INSTALL.txt =================================================================== --- trunk/INSTALL.txt 2012-02-25 23:16:14 UTC (rev 1867) +++ trunk/INSTALL.txt 2012-02-25 23:21:03 UTC (rev 1868) @@ -97,7 +97,7 @@ $ premake4 --help -4. BUILDING WITH SOMETHING EKSE +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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-02-25 23:16:20
|
Revision: 1867 http://opende.svn.sourceforge.net/opende/?rev=1867&view=rev Author: oleh_derevenko Date: 2012-02-25 23:16:14 +0000 (Sat, 25 Feb 2012) Log Message: ----------- Cosmetic: Changed: CreateThread() -> _beginthreadex() Modified Paths: -------------- trunk/drawstuff/src/windows.cpp Modified: trunk/drawstuff/src/windows.cpp =================================================================== --- trunk/drawstuff/src/windows.cpp 2012-02-24 20:19:52 UTC (rev 1866) +++ trunk/drawstuff/src/windows.cpp 2012-02-25 23:16:14 UTC (rev 1867) @@ -23,6 +23,7 @@ #if defined(WIN32) || defined(__CYGWIN__)// this prevents warnings when dependencies built #include <windows.h> #endif +#include <process.h> #include <ode/odeconfig.h> #include <GL/gl.h> @@ -116,7 +117,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 +426,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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2012-02-24 20:19:58
|
Revision: 1866 http://opende.svn.sourceforge.net/opende/?rev=1866&view=rev Author: danielosmari Date: 2012-02-24 20:19:52 +0000 (Fri, 24 Feb 2012) Log Message: ----------- fixed path in build instructions Modified Paths: -------------- trunk/INSTALL.txt Modified: trunk/INSTALL.txt =================================================================== --- trunk/INSTALL.txt 2012-02-13 22:44:46 UTC (rev 1865) +++ trunk/INSTALL.txt 2012-02-24 20:19:52 UTC (rev 1866) @@ -88,12 +88,12 @@ provide workspaces. Instead, use Premake to create a workspace tailored for your platform and project. Like so: - $ cd ode/build + $ cd build $ premake4 --with-tests --with-demos codeblocks To see a complete list of options: - $ cd ode/build + $ cd build $ premake4 --help This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-02-13 22:44:52
|
Revision: 1865 http://opende.svn.sourceforge.net/opende/?rev=1865&view=rev Author: oleh_derevenko Date: 2012-02-13 22:44:46 +0000 (Mon, 13 Feb 2012) Log Message: ----------- Cosmetic: Commentary corrected Modified Paths: -------------- trunk/include/ode/common.h Modified: trunk/include/ode/common.h =================================================================== --- trunk/include/ode/common.h 2012-02-11 22:17:21 UTC (rev 1864) +++ trunk/include/ode/common.h 2012-02-13 22:44:46 UTC (rev 1865) @@ -158,7 +158,7 @@ #define dAtan2(y,x) (atan2f(y,x)) /* arc tangent with 2 args */ #define dFMod(a,b) (fmodf(a,b)) /* modulo */ #define dFloor(x) floorf(x) /* floor */ -#define dCeil(x) ceilf(x) /* floor */ +#define dCeil(x) ceilf(x) /* ceil */ #define dCopySign(a,b) ((dReal)copysignf(a,b)) /* copy value sign */ #define dNextAfter(x, y) nextafterf(x, y) /* next value after */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2012-02-11 22:17:27
|
Revision: 1864 http://opende.svn.sourceforge.net/opende/?rev=1864&view=rev Author: danielosmari Date: 2012-02-11 22:17:21 +0000 (Sat, 11 Feb 2012) Log Message: ----------- tagging the 0.12 release Added Paths: ----------- tags/0.12/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2012-02-11 22:12:30
|
Revision: 1863 http://opende.svn.sourceforge.net/opende/?rev=1863&view=rev Author: danielosmari Date: 2012-02-11 22:12:22 +0000 (Sat, 11 Feb 2012) Log Message: ----------- bumped version to 0.12 Modified Paths: -------------- trunk/configure.in Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2012-02-11 22:03:27 UTC (rev 1862) +++ trunk/configure.in 2012-02-11 22:12:22 UTC (rev 1863) @@ -1,6 +1,6 @@ dnl AC_INIT does not take a macro as a version nr: set it separately! - Bram -AC_INIT([ODE],[0.11.1],[od...@od...]) -ODE_RELEASE=0.11.1 +AC_INIT([ODE],[0.12],[od...@od...]) +ODE_RELEASE=0.12 AC_SUBST(ODE_RELEASE) # Those are instructions from the Libtool manual: @@ -22,9 +22,9 @@ # # 6. If any interfaces have been removed since the last public release, # then set AGE to 0. -CURRENT=2 -REVISION=1 -AGE=1 +CURRENT=3 +REVISION=0 +AGE=0 AC_ARG_ENABLE(version-info, AS_HELP_STRING([--disable-version-info], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2012-02-11 22:03:33
|
Revision: 1862 http://opende.svn.sourceforge.net/opende/?rev=1862&view=rev Author: danielosmari Date: 2012-02-11 22:03:27 +0000 (Sat, 11 Feb 2012) Log Message: ----------- Fixed bindings path Modified Paths: -------------- trunk/Makefile.am Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2012-02-04 14:05:32 UTC (rev 1861) +++ trunk/Makefile.am 2012-02-11 22:03:27 UTC (rev 1862) @@ -38,7 +38,7 @@ EXTRA_DIST = autogen.sh build tools \ CHANGELOG.txt INSTALL.txt README.txt LICENSE.TXT \ - binding + bindings pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = ode.pc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-02-04 14:05:38
|
Revision: 1861 http://opende.svn.sourceforge.net/opende/?rev=1861&view=rev Author: oleh_derevenko Date: 2012-02-04 14:05:32 +0000 (Sat, 04 Feb 2012) Log Message: ----------- Compilation errors fixed Modified Paths: -------------- trunk/ode/src/collision_trimesh_opcode.cpp trunk/ode/src/ode.cpp Modified: trunk/ode/src/collision_trimesh_opcode.cpp =================================================================== --- trunk/ode/src/collision_trimesh_opcode.cpp 2012-01-20 07:59:41 UTC (rev 1860) +++ trunk/ode/src/collision_trimesh_opcode.cpp 2012-02-04 14:05:32 UTC (rev 1861) @@ -376,7 +376,7 @@ void dGeomTriMeshSetLastTransform( dxGeom* g, dMatrix4 last_trans ) { - dAASSERT(g) + dAASSERT(g); dUASSERT(g->type == dTriMeshClass, "geom not trimesh"); for (int i=0; i<16; i++) @@ -388,7 +388,7 @@ dReal* dGeomTriMeshGetLastTransform( dxGeom* g ) { - dAASSERT(g) + dAASSERT(g); dUASSERT(g->type == dTriMeshClass, "geom not trimesh"); return (dReal*)(((dxTriMesh*)g)->last_trans); Modified: trunk/ode/src/ode.cpp =================================================================== --- trunk/ode/src/ode.cpp 2012-01-20 07:59:41 UTC (rev 1860) +++ trunk/ode/src/ode.cpp 2012-02-04 14:05:32 UTC (rev 1861) @@ -498,7 +498,7 @@ // Use dMassTranslate( mass, -mass->c[0], -mass->c[1], -mass->c[2] ) to correct it. dUASSERT( fabs( mass->c[0] ) <= dEpsilon && fabs( mass->c[1] ) <= dEpsilon && - fabs( mass->c[2] ) <= dEpsilon, "The centre of mass must be at the origin." ) + fabs( mass->c[2] ) <= dEpsilon, "The centre of mass must be at the origin." ); memcpy (&b->mass,mass,sizeof(dMass)); if (dInvertPDMatrix (b->mass.I,b->invI,3,NULL)==0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <klo...@us...> - 2012-01-20 07:59:53
|
Revision: 1860 http://opende.svn.sourceforge.net/opende/?rev=1860&view=rev Author: klompjeg Date: 2012-01-20 07:59:41 +0000 (Fri, 20 Jan 2012) Log Message: ----------- Added compatibility for Python versions below 2.7 and fixed running setup.py as executable on Linux Modified Paths: -------------- trunk/bindings/python/setup.py Modified: trunk/bindings/python/setup.py =================================================================== --- trunk/bindings/python/setup.py 2012-01-15 19:28:21 UTC (rev 1859) +++ trunk/bindings/python/setup.py 2012-01-20 07:59:41 UTC (rev 1860) @@ -1,39 +1,41 @@ -#!/usr/bin/env python - -import os - -from distutils.core import setup -from distutils.extension import Extension -from subprocess import check_output,CalledProcessError - -try: - from Cython.Distutils import build_ext -except ImportError: - raise SystemExit("Requires Cython (http://cython.org/)") - -try: - ode_cflags = check_output(["pkg-config", "--cflags", "ode"]).split() - ode_libs = check_output(["pkg-config", "--libs", "ode"]).split() -except 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.1", - 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]) +#! /usr/bin/env python + +import os, sys + +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().split() + ode_libs = Popen(["pkg-config", "--libs", "ode"], stdout=PIPE).stdout.read().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.1", + 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]) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2012-01-15 19:28:29
|
Revision: 1859 http://opende.svn.sourceforge.net/opende/?rev=1859&view=rev Author: oleh_derevenko Date: 2012-01-15 19:28:21 +0000 (Sun, 15 Jan 2012) Log Message: ----------- Changed: Changes/simplifications to dxWorldProcessContext to prepare for threading Modified Paths: -------------- trunk/include/ode/common.h trunk/ode/src/lcp.cpp trunk/ode/src/lcp.h trunk/ode/src/ode.cpp trunk/ode/src/odetls.h trunk/ode/src/quickstep.cpp trunk/ode/src/quickstep.h trunk/ode/src/step.cpp trunk/ode/src/step.h trunk/ode/src/util.cpp trunk/ode/src/util.h Modified: trunk/include/ode/common.h =================================================================== --- trunk/include/ode/common.h 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/include/ode/common.h 2012-01-15 19:28:21 UTC (rev 1859) @@ -227,7 +227,6 @@ struct dxJointNode; struct dxJointGroup; struct dxWorldProcessThreadingManager; -struct dxWorldProcessContext; typedef struct dxWorld *dWorldID; typedef struct dxSpace *dSpaceID; @@ -236,7 +235,6 @@ typedef struct dxJoint *dJointID; typedef struct dxJointGroup *dJointGroupID; typedef struct dxWorldProcessThreadingManager *dWorldStepThreadingManagerID; -typedef struct dxWorldProcessContext *dWorldStepContextID; /* error numbers */ Modified: trunk/ode/src/lcp.cpp =================================================================== --- trunk/ode/src/lcp.cpp 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/lcp.cpp 2012-01-15 19:28:21 UTC (rev 1859) @@ -781,7 +781,7 @@ //*************************************************************************** // an optimized Dantzig LCP driver routine for the lo-hi LCP problem. -void dSolveLCP (dxWorldProcessContext *context, int n, dReal *A, dReal *x, dReal *b, +void dSolveLCP (dxWorldProcessMemArena *memarena, int n, dReal *A, dReal *x, dReal *b, dReal *outer_w/*=NULL*/, int nub, dReal *lo, dReal *hi, int *findex) { dAASSERT (n>0 && A && x && b && lo && hi && nub >= 0 && nub <= n); @@ -796,7 +796,7 @@ // if all the variables are unbounded then we can just factor, solve, // and return if (nub >= n) { - dReal *d = context->AllocateArray<dReal> (n); + dReal *d = memarena->AllocateArray<dReal> (n); dSetZero (d, n); int nskip = dPAD(n); @@ -808,23 +808,23 @@ } const int nskip = dPAD(n); - dReal *L = context->AllocateArray<dReal> (n*nskip); - dReal *d = context->AllocateArray<dReal> (n); - dReal *w = outer_w ? outer_w : context->AllocateArray<dReal> (n); - dReal *delta_w = context->AllocateArray<dReal> (n); - dReal *delta_x = context->AllocateArray<dReal> (n); - dReal *Dell = context->AllocateArray<dReal> (n); - dReal *ell = context->AllocateArray<dReal> (n); + dReal *L = memarena->AllocateArray<dReal> (n*nskip); + dReal *d = memarena->AllocateArray<dReal> (n); + dReal *w = outer_w ? outer_w : memarena->AllocateArray<dReal> (n); + dReal *delta_w = memarena->AllocateArray<dReal> (n); + dReal *delta_x = memarena->AllocateArray<dReal> (n); + dReal *Dell = memarena->AllocateArray<dReal> (n); + dReal *ell = memarena->AllocateArray<dReal> (n); #ifdef ROWPTRS - dReal **Arows = context->AllocateArray<dReal *> (n); + dReal **Arows = memarena->AllocateArray<dReal *> (n); #else dReal **Arows = NULL; #endif - int *p = context->AllocateArray<int> (n); - int *C = context->AllocateArray<int> (n); + int *p = memarena->AllocateArray<int> (n); + int *C = memarena->AllocateArray<int> (n); // for i in N, state[i] is 0 if x(i)==lo(i) or 1 if x(i)==hi(i) - bool *state = context->AllocateArray<bool> (n); + bool *state = memarena->AllocateArray<bool> (n); // create LCP object. note that tmp is set to delta_w to save space, this // optimization relies on knowledge of how tmp is used, so be careful! @@ -1049,13 +1049,13 @@ case 5: // keep going x[si] = lo[si]; state[si] = false; - tmpbuf = context->PeekBufferRemainder(); + tmpbuf = memarena->PeekBufferRemainder(); lcp.transfer_i_from_C_to_N (si, tmpbuf); break; case 6: // keep going x[si] = hi[si]; state[si] = true; - tmpbuf = context->PeekBufferRemainder(); + tmpbuf = memarena->PeekBufferRemainder(); lcp.transfer_i_from_C_to_N (si, tmpbuf); break; } @@ -1119,8 +1119,8 @@ const int n = 100; size_t memreq = EstimateTestSolveLCPMemoryReq(n); - dxWorldProcessContext *context = dxReallocateTemporayWorldProcessContext(NULL, memreq, NULL, NULL); - if (!context) { + dxWorldProcessMemArena *arena = dxAllocateTemporaryWorldProcessMemArena(memreq, NULL, NULL); + if (arena == NULL) { return 0; } @@ -1133,24 +1133,24 @@ #endif printf ("dTestSolveLCP()\n"); - dReal *A = context->AllocateArray<dReal> (n*nskip); - dReal *x = context->AllocateArray<dReal> (n); - dReal *b = context->AllocateArray<dReal> (n); - dReal *w = context->AllocateArray<dReal> (n); - dReal *lo = context->AllocateArray<dReal> (n); - dReal *hi = context->AllocateArray<dReal> (n); + dReal *A = arena->AllocateArray<dReal> (n*nskip); + dReal *x = arena->AllocateArray<dReal> (n); + dReal *b = arena->AllocateArray<dReal> (n); + dReal *w = arena->AllocateArray<dReal> (n); + dReal *lo = arena->AllocateArray<dReal> (n); + dReal *hi = arena->AllocateArray<dReal> (n); - dReal *A2 = context->AllocateArray<dReal> (n*nskip); - dReal *b2 = context->AllocateArray<dReal> (n); - dReal *lo2 = context->AllocateArray<dReal> (n); - dReal *hi2 = context->AllocateArray<dReal> (n); + dReal *A2 = arena->AllocateArray<dReal> (n*nskip); + dReal *b2 = arena->AllocateArray<dReal> (n); + dReal *lo2 = arena->AllocateArray<dReal> (n); + dReal *hi2 = arena->AllocateArray<dReal> (n); - dReal *tmp1 = context->AllocateArray<dReal> (n); - dReal *tmp2 = context->AllocateArray<dReal> (n); + dReal *tmp1 = arena->AllocateArray<dReal> (n); + dReal *tmp2 = arena->AllocateArray<dReal> (n); double total_time = 0; for (int count=0; count < 1000; count++) { - BEGIN_STATE_SAVE(context, saveInner) { + BEGIN_STATE_SAVE(arena, saveInner) { // form (A,b) = a random positive definite LCP problem dMakeRandomMatrix (A2,n,n,1.0); @@ -1198,7 +1198,7 @@ dStopwatchReset (&sw); dStopwatchStart (&sw); - dSolveLCP (context,n,A2,x,b2,w,nub,lo2,hi2,0); + dSolveLCP (arena,n,A2,x,b2,w,nub,lo2,hi2,0); dStopwatchStop (&sw); double time = dStopwatchTime(&sw); @@ -1234,9 +1234,9 @@ printf ("passed: NL=%3d NH=%3d C=%3d ",n1,n2,n3); printf ("time=%10.3f ms avg=%10.4f\n",time * 1000.0,average); - } END_STATE_SAVE(context, saveInner); + } END_STATE_SAVE(arena, saveInner); } - dxFreeWorldProcessContext(context); + dxFreeTemporaryWorldProcessMemArena(arena); return 1; } Modified: trunk/ode/src/lcp.h =================================================================== --- trunk/ode/src/lcp.h 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/lcp.h 2012-01-15 19:28:21 UTC (rev 1859) @@ -50,9 +50,9 @@ #ifndef _ODE_LCP_H_ #define _ODE_LCP_H_ -struct dxWorldProcessContext; +class dxWorldProcessMemArena; -void dSolveLCP (dxWorldProcessContext *context, +void dSolveLCP (dxWorldProcessMemArena *memarena, int n, dReal *A, dReal *x, dReal *b, dReal *w, int nub, dReal *lo, dReal *hi, int *findex); Modified: trunk/ode/src/ode.cpp =================================================================== --- trunk/ode/src/ode.cpp 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/ode.cpp 2012-01-15 19:28:21 UTC (rev 1859) @@ -1791,13 +1791,16 @@ bool result = false; - if (dxReallocateWorldProcessContext (w, stepsize, &dxEstimateStepMemoryRequirements)) + dxWorldProcessIslandsInfo islandsinfo; + if (dxReallocateWorldProcessContext (w, islandsinfo, stepsize, &dxEstimateStepMemoryRequirements)) { - dxProcessIslands (w, stepsize, &dInternalStepIsland); + dxProcessIslands (w, islandsinfo, stepsize, &dInternalStepIsland); result = true; } + dxCleanupWorldProcessContext (w); + return result; } @@ -1808,13 +1811,16 @@ bool result = false; - if (dxReallocateWorldProcessContext (w, stepsize, &dxEstimateQuickStepMemoryRequirements)) + dxWorldProcessIslandsInfo islandsinfo; + if (dxReallocateWorldProcessContext (w, islandsinfo, stepsize, &dxEstimateQuickStepMemoryRequirements)) { - dxProcessIslands (w, stepsize, &dxQuickStepper); + dxProcessIslands (w, islandsinfo, stepsize, &dxQuickStepper); result = true; } + dxCleanupWorldProcessContext (w); + return result; } Modified: trunk/ode/src/odetls.h =================================================================== --- trunk/ode/src/odetls.h 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/odetls.h 2012-01-15 19:28:21 UTC (rev 1859) @@ -43,8 +43,8 @@ struct TrimeshCollidersCache; -struct dxWorldProcessContext; + enum EODETLSKIND { OTK__MIN, Modified: trunk/ode/src/quickstep.cpp =================================================================== --- trunk/ode/src/quickstep.cpp 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/quickstep.cpp 2012-01-15 19:28:21 UTC (rev 1859) @@ -218,7 +218,7 @@ for (unsigned int i=0; i<n; i++) x[i] = y[i] + z[i]*alpha; } -static void CG_LCP (dxWorldProcessContext *context, +static void CG_LCP (dxWorldProcessMemArena *memarena, unsigned int m, unsigned int nb, dRealMutablePtr J, int *jb, dxBody * const *body, dRealPtr invI, dRealMutablePtr lambda, dRealMutablePtr fc, dRealMutablePtr b, dRealMutablePtr lo, dRealMutablePtr hi, dRealPtr cfm, int *findex, @@ -227,17 +227,17 @@ const unsigned int num_iterations = qs->num_iterations; // precompute iMJ = inv(M)*J' - dReal *iMJ = context->AllocateArray<dReal> ((size_t)m*12); + dReal *iMJ = memarena->AllocateArray<dReal> ((size_t)m*12); compute_invM_JT (m,J,iMJ,jb,body,invI); dReal last_rho = 0; - dReal *r = context->AllocateArray<dReal> (m); - dReal *z = context->AllocateArray<dReal> (m); - dReal *p = context->AllocateArray<dReal> (m); - dReal *q = context->AllocateArray<dReal> (m); + dReal *r = memarena->AllocateArray<dReal> (m); + dReal *z = memarena->AllocateArray<dReal> (m); + dReal *p = memarena->AllocateArray<dReal> (m); + dReal *q = memarena->AllocateArray<dReal> (m); // precompute 1 / diagonals of A - dReal *Ad = context->AllocateArray<dReal> (m); + dReal *Ad = memarena->AllocateArray<dReal> (m); dRealPtr iMJ_ptr = iMJ; dRealPtr J_ptr = J; for (unsigned int i=0; i<m; i++) { @@ -339,7 +339,7 @@ #endif -static void SOR_LCP (dxWorldProcessContext *context, +static void SOR_LCP (dxWorldProcessMemArena *memarena, const unsigned int m, const unsigned int nb, dRealMutablePtr J, int *jb, dxBody * const *body, dRealPtr invI, dRealMutablePtr lambda, dRealMutablePtr fc, dRealMutablePtr b, dRealPtr lo, dRealPtr hi, dRealPtr cfm, const int *findex, @@ -356,7 +356,7 @@ #endif // precompute iMJ = inv(M)*J' - dReal *iMJ = context->AllocateArray<dReal> ((size_t)m*12); + dReal *iMJ = memarena->AllocateArray<dReal> ((size_t)m*12); compute_invM_JT (m,J,iMJ,jb,body,invI); // compute fc=(inv(M)*J')*lambda. we will incrementally maintain fc @@ -367,7 +367,7 @@ dSetZero (fc,(size_t)nb*6); #endif - dReal *Ad = context->AllocateArray<dReal> (m); + dReal *Ad = memarena->AllocateArray<dReal> (m); { const dReal sor_w = qs->w; // SOR over-relaxation parameter @@ -403,7 +403,7 @@ // order to solve constraint rows in - IndexError *order = context->AllocateArray<IndexError> (m); + IndexError *order = memarena->AllocateArray<IndexError> (m); #ifndef REORDER_CONSTRAINTS { @@ -427,7 +427,7 @@ #ifdef REORDER_CONSTRAINTS // the lambda computed at the previous iteration. // this is used to measure error for when we are reordering the indexes. - dReal *last_lambda = context->AllocateArray<dReal> (m); + dReal *last_lambda = memarena->AllocateArray<dReal> (m); #endif const unsigned int num_iterations = qs->num_iterations; @@ -589,7 +589,7 @@ dxJoint::Info1 info; }; -void dxQuickStepper (dxWorldProcessContext *context, +void dxQuickStepper (dxWorldProcessMemArena *memarena, dxWorld *world, dxBody * const *body, unsigned int nb, dxJoint * const *_joint, unsigned int _nj, dReal stepsize) { @@ -605,7 +605,7 @@ // 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 a vertical stack of 3x4 matrices, one per body. - dReal *invI = context->AllocateArray<dReal> (3*4*(size_t)nb); + dReal *invI = memarena->AllocateArray<dReal> (3*4*(size_t)nb); { dReal *invIrow = invI; @@ -667,7 +667,7 @@ // get joint information (m = total constraint dimension, nub = number of unbounded variables). // joints with m=0 are inactive and are removed from the joints array // entirely, so that the code that follows does not consider them. - dJointWithInfo1 *const jointiinfos = context->AllocateArray<dJointWithInfo1> (_nj); + dJointWithInfo1 *const jointiinfos = memarena->AllocateArray<dJointWithInfo1> (_nj); size_t nj; { @@ -685,7 +685,7 @@ nj = jicurr - jointiinfos; } - context->ShrinkArray<dJointWithInfo1>(jointiinfos, _nj, nj); + memarena->ShrinkArray<dJointWithInfo1>(jointiinfos, _nj, nj); unsigned int m; unsigned int mfb; // number of rows of Jacobian we will have to save for joint feedback @@ -716,34 +716,34 @@ unsigned int mlocal = m; const size_t jelements = (size_t)mlocal*12; - J = context->AllocateArray<dReal> (jelements); + J = memarena->AllocateArray<dReal> (jelements); dSetZero (J,jelements); // 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. - cfm = context->AllocateArray<dReal> (mlocal); + cfm = memarena->AllocateArray<dReal> (mlocal); dSetValue (cfm,mlocal,world->global_cfm); - lo = context->AllocateArray<dReal> (mlocal); + lo = memarena->AllocateArray<dReal> (mlocal); dSetValue (lo,mlocal,-dInfinity); - hi = context->AllocateArray<dReal> (mlocal); + hi = memarena->AllocateArray<dReal> (mlocal); dSetValue (hi,mlocal, dInfinity); - findex = context->AllocateArray<int> (mlocal); + findex = memarena->AllocateArray<int> (mlocal); for (unsigned int i=0; i<mlocal; i++) findex[i] = -1; const size_t jbelements = (size_t)mlocal*2; - jb = context->AllocateArray<int> (jbelements); + jb = memarena->AllocateArray<int> (jbelements); - rhs = context->AllocateArray<dReal> (mlocal); + rhs = memarena->AllocateArray<dReal> (mlocal); - Jcopy = context->AllocateArray<dReal> ((size_t)mfb*12); + Jcopy = memarena->AllocateArray<dReal> ((size_t)mfb*12); } - BEGIN_STATE_SAVE(context, cstate) { - dReal *c = context->AllocateArray<dReal> (m); + BEGIN_STATE_SAVE(memarena, cstate) { + dReal *c = memarena->AllocateArray<dReal> (m); dSetZero (c, m); { @@ -829,10 +829,10 @@ dIASSERT (jb_ptr == jb+2*(size_t)m); } - BEGIN_STATE_SAVE(context, tmp1state) { + BEGIN_STATE_SAVE(memarena, tmp1state) { IFTIMING (dTimerNow ("compute rhs")); // compute the right hand side `rhs' - dReal *tmp1 = context->AllocateArray<dReal> ((size_t)nb*6); + dReal *tmp1 = memarena->AllocateArray<dReal> ((size_t)nb*6); // put v/h + invM*fe into tmp1 dReal *tmp1curr = tmp1; const dReal *invIrow = invI; @@ -848,7 +848,7 @@ // put J*tmp1 into rhs multiply_J (m,J,jb,tmp1,rhs); - } END_STATE_SAVE(context, tmp1state); + } END_STATE_SAVE(memarena, tmp1state); // complete rhs for (unsigned int i=0; i<m; i++) rhs[i] = c[i]*stepsize1 - rhs[i]; @@ -856,10 +856,10 @@ // scale CFM for (unsigned int j=0; j<m; j++) cfm[j] *= stepsize1; - } END_STATE_SAVE(context, cstate); + } END_STATE_SAVE(memarena, cstate); // load lambda from the value saved on the previous iteration - dReal *lambda = context->AllocateArray<dReal> (m); + dReal *lambda = memarena->AllocateArray<dReal> (m); #ifdef WARM_STARTING { @@ -874,14 +874,14 @@ } #endif - dReal *cforce = context->AllocateArray<dReal> ((size_t)nb*6); + dReal *cforce = memarena->AllocateArray<dReal> ((size_t)nb*6); - BEGIN_STATE_SAVE(context, lcpstate) { + BEGIN_STATE_SAVE(memarena, lcpstate) { IFTIMING (dTimerNow ("solving LCP problem")); // solve the LCP problem and get lambda and invM*constraint_force - SOR_LCP (context,m,nb,J,jb,body,invI,lambda,cforce,rhs,lo,hi,cfm,findex,&world->qs); + SOR_LCP (memarena,m,nb,J,jb,body,invI,lambda,cforce,rhs,lo,hi,cfm,findex,&world->qs); - } END_STATE_SAVE(context, lcpstate); + } END_STATE_SAVE(memarena, lcpstate); #ifdef WARM_STARTING { @@ -976,8 +976,8 @@ #ifdef CHECK_VELOCITY_OBEYS_CONSTRAINT if (m > 0) { - BEGIN_STATE_SAVE(context, velstate) { - dReal *vel = context->AllocateArray<dReal>((size_t)nb*6); + BEGIN_STATE_SAVE(memarena, velstate) { + dReal *vel = memarena->AllocateArray<dReal>((size_t)nb*6); // check that the updated velocity obeys the constraint (this check needs unmodified J) dReal *velcurr = vel; @@ -988,13 +988,13 @@ velcurr[3+j] = bodycurr->avel[j]; } } - dReal *tmp = context->AllocateArray<dReal> (m); + dReal *tmp = memarena->AllocateArray<dReal> (m); multiply_J (m,J,jb,vel,tmp); dReal error = 0; for (unsigned int i=0; i<m; i++) error += dFabs(tmp[i]); printf ("velocity error = %10.6e\n",error); - } END_STATE_SAVE(context, velstate) + } END_STATE_SAVE(memarena, velstate) } #endif Modified: trunk/ode/src/quickstep.h =================================================================== --- trunk/ode/src/quickstep.h 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/quickstep.h 2012-01-15 19:28:21 UTC (rev 1859) @@ -25,10 +25,13 @@ #include <ode/common.h> +class dxWorldProcessMemArena; + + size_t dxEstimateQuickStepMemoryRequirements ( dxBody * const *body, unsigned int nb, dxJoint * const *_joint, unsigned int _nj); -void dxQuickStepper (dxWorldProcessContext *context, +void dxQuickStepper (dxWorldProcessMemArena *memarena, dxWorld *world, dxBody * const *body, unsigned int nb, dxJoint * const *_joint, unsigned int _nj, dReal stepsize); Modified: trunk/ode/src/step.cpp =================================================================== --- trunk/ode/src/step.cpp 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/step.cpp 2012-01-15 19:28:21 UTC (rev 1859) @@ -184,7 +184,7 @@ dxJoint::Info1 info; }; -static void dInternalStepIsland_x2 (dxWorldProcessContext *context, +static void dInternalStepIsland_x2 (dxWorldProcessMemArena *memarena, dxWorld *world, dxBody * const *body, unsigned int nb, dxJoint * const *_joint, unsigned int _nj, dReal stepsize) { @@ -203,7 +203,7 @@ // accumulator. invI are vertically stacked 3x4 matrices, one per body. // @@@ check computation of rotational force. - dReal *invI = context->AllocateArray<dReal> (3*4*(size_t)nb); + dReal *invI = memarena->AllocateArray<dReal> (3*4*(size_t)nb); { // Identical to QuickStep dReal *invIrow = invI; @@ -277,7 +277,7 @@ // Reserve twice as much memory and start from the middle so that regardless of // what direction the array grows to there would be sufficient room available. const size_t ji_reserve_count = 2 * (size_t)_nj; - dJointWithInfo1 *jointiinfos = context->AllocateArray<dJointWithInfo1> (ji_reserve_count); + dJointWithInfo1 *jointiinfos = memarena->AllocateArray<dJointWithInfo1> (ji_reserve_count); unsigned int nub; size_t ji_start, ji_end; @@ -402,7 +402,7 @@ ji_end = lcp_end; } - context->ShrinkArray<dJointWithInfo1>(jointiinfos, ji_reserve_count, ji_end); + memarena->ShrinkArray<dJointWithInfo1>(jointiinfos, ji_reserve_count, ji_end); jointiinfos += ji_start; unsigned int nj = (unsigned int)(ji_end - ji_start); dIASSERT((size_t)(ji_end - ji_start) <= (size_t)UINT_MAX); @@ -423,7 +423,7 @@ } // this will be set to the force due to the constraints - dReal *cforce = context->AllocateArray<dReal> ((size_t)nb*8); + dReal *cforce = memarena->AllocateArray<dReal> ((size_t)nb*8); dSetZero (cforce,(size_t)nb*8); // if there are constraints, compute cforce @@ -437,34 +437,34 @@ { unsigned int mlocal = m; - lo = context->AllocateArray<dReal> (mlocal); + lo = memarena->AllocateArray<dReal> (mlocal); dSetValue (lo,mlocal,-dInfinity); - hi = context->AllocateArray<dReal> (mlocal); + hi = memarena->AllocateArray<dReal> (mlocal); dSetValue (hi,mlocal, dInfinity); - J = context->AllocateArray<dReal> (2*8*(size_t)mlocal); + J = memarena->AllocateArray<dReal> (2*8*(size_t)mlocal); dSetZero (J,2*8*(size_t)mlocal); - findex = context->AllocateArray<int> (mlocal); + findex = memarena->AllocateArray<int> (mlocal); for (unsigned int i=0; i<mlocal; ++i) findex[i] = -1; unsigned int mskip = dPAD(mlocal); - A = context->AllocateArray<dReal> (mlocal*(size_t)mskip); + A = memarena->AllocateArray<dReal> (mlocal*(size_t)mskip); dSetZero (A,mlocal*(size_t)mskip); - rhs = context->AllocateArray<dReal> (mlocal); + rhs = memarena->AllocateArray<dReal> (mlocal); dSetZero (rhs,mlocal); } // Put 'c' in the same memory as 'rhs' as they transit into each other dReal *c = rhs; rhs = NULL; // erase rhs pointer for now as it is not to be used yet - BEGIN_STATE_SAVE(context, cfmstate) { - dReal *cfm = context->AllocateArray<dReal> (m); + BEGIN_STATE_SAVE(memarena, cfmstate) { + dReal *cfm = memarena->AllocateArray<dReal> (m); dSetValue (cfm,m,world->global_cfm); - dReal *JinvM = context->AllocateArray<dReal> (2*8*(size_t)m); + dReal *JinvM = memarena->AllocateArray<dReal> (2*8*(size_t)m); dSetZero (JinvM,2*8*(size_t)m); { @@ -571,8 +571,8 @@ // 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. - BEGIN_STATE_SAVE(context, ofsstate) { - unsigned int *ofs = context->AllocateArray<unsigned int> (m); + BEGIN_STATE_SAVE(memarena, ofsstate) { + unsigned int *ofs = memarena->AllocateArray<unsigned int> (m); const unsigned int mskip = dPAD(m); unsigned ofsi = 0; @@ -621,7 +621,7 @@ ofsi += infom; } - } END_STATE_SAVE(context, ofsstate); + } END_STATE_SAVE(memarena, ofsstate); } { @@ -656,13 +656,13 @@ } } - } END_STATE_SAVE(context, cfmstate); + } END_STATE_SAVE(memarena, cfmstate); - BEGIN_STATE_SAVE(context, tmp1state) { + BEGIN_STATE_SAVE(memarena, tmp1state) { // compute the right hand side `rhs' IFTIMING(dTimerNow ("compute rhs")); - dReal *tmp1 = context->AllocateArray<dReal> ((size_t)nb*8); + dReal *tmp1 = memarena->AllocateArray<dReal> ((size_t)nb*8); //dSetZero (tmp1,nb*8); { @@ -704,18 +704,18 @@ ofsi += infom; } } - } END_STATE_SAVE(context, tmp1state); + } END_STATE_SAVE(memarena, tmp1state); - dReal *lambda = context->AllocateArray<dReal> (m); + dReal *lambda = memarena->AllocateArray<dReal> (m); - BEGIN_STATE_SAVE(context, lcpstate) { + BEGIN_STATE_SAVE(memarena, lcpstate) { IFTIMING(dTimerNow ("solving LCP problem")); // solve the LCP problem and get lambda. // this will destroy A but that's OK - dSolveLCP (context, m, A, lambda, rhs, NULL, nub, lo, hi, findex); + dSolveLCP (memarena, m, A, lambda, rhs, NULL, nub, lo, hi, findex); - } END_STATE_SAVE(context, lcpstate); + } END_STATE_SAVE(memarena, lcpstate); { IFTIMING(dTimerNow ("compute constraint force")); @@ -838,11 +838,11 @@ //**************************************************************************** -void dInternalStepIsland (dxWorldProcessContext *context, +void dInternalStepIsland (dxWorldProcessMemArena *memarena, dxWorld *world, dxBody * const *body, unsigned int nb, dxJoint * const *joint, unsigned int nj, dReal stepsize) { - dInternalStepIsland_x2 (context,world,body,nb,joint,nj,stepsize); + dInternalStepIsland_x2 (memarena,world,body,nb,joint,nj,stepsize); } size_t dxEstimateStepMemoryRequirements (dxBody * const *body, unsigned int nb, dxJoint * const *_joint, unsigned int _nj) Modified: trunk/ode/src/step.h =================================================================== --- trunk/ode/src/step.h 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/step.h 2012-01-15 19:28:21 UTC (rev 1859) @@ -25,10 +25,13 @@ #include <ode/common.h> +class dxWorldProcessMemArena; + + size_t dxEstimateStepMemoryRequirements ( dxBody * const *body, unsigned int nb, dxJoint * const *_joint, unsigned int _nj); -void dInternalStepIsland (dxWorldProcessContext *context, dxWorld *world, +void dInternalStepIsland (dxWorldProcessMemArena *memarena, dxWorld *world, dxBody * const *body, unsigned int nb, dxJoint * const *joint, unsigned int nj, dReal stepsize); Modified: trunk/ode/src/util.cpp =================================================================== --- trunk/ode/src/util.cpp 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/util.cpp 2012-01-15 19:28:21 UTC (rev 1859) @@ -1,24 +1,24 @@ /************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: ru...@q1... 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: ru...@q1... 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 <ode/ode.h> #include "config.h" @@ -26,7 +26,6 @@ #include "joints/joint.h" #include "util.h" -static void InternalFreeWorldProcessContext (dxWorldProcessContext *context); //**************************************************************************** // Malloc based world stepping memory manager @@ -36,201 +35,201 @@ //**************************************************************************** -// dxWorldProcessContext implementation +// dxWorldProcessContext -void dxWorldProcessContext::CleanupContext() +dxWorldProcessContext::dxWorldProcessContext(): + m_pmaIslandsArena(NULL), + m_pmaStepperArena(NULL) { - ResetState(); - ClearPreallocations(); - FreePreallocationsContext(); + // Do nothing } -void dxWorldProcessContext::SavePreallocations(size_t islandcount, unsigned int const *islandsizes, dxBody *const *bodies, dxJoint *const *joints) +dxWorldProcessContext::~dxWorldProcessContext() { - m_IslandCount = islandcount; - m_pIslandSizes = islandsizes; - m_pBodies = bodies; - m_pJoints = joints; -} + if (m_pmaIslandsArena) + { + dxWorldProcessMemArena::FreeMemArena(m_pmaIslandsArena); + } -void dxWorldProcessContext::RetrievePreallocations(size_t &islandcount, unsigned int const *&islandsizes, dxBody *const *&bodies, dxJoint *const *&joints) -{ - islandcount = m_IslandCount; - islandsizes = m_pIslandSizes; - bodies = m_pBodies; - joints = m_pJoints; + if (m_pmaStepperArena) + { + dxWorldProcessMemArena::FreeMemArena(m_pmaStepperArena); + } } -void dxWorldProcessContext::OffsetPreallocations(size_t stOffset) +bool dxWorldProcessContext::IsStructureValid() const { - // m_IslandCount = -- no offset for count - m_pIslandSizes = m_pIslandSizes ? (unsigned int const *)((size_t)m_pIslandSizes + stOffset) : NULL; - m_pBodies = m_pBodies ? (dxBody *const *)((size_t)m_pBodies + stOffset) : NULL; - m_pJoints = m_pJoints ? (dxJoint *const *)((size_t)m_pJoints + stOffset) : NULL; + return (!m_pmaIslandsArena || m_pmaIslandsArena->IsStructureValid()) && (!m_pmaStepperArena || m_pmaStepperArena->IsStructureValid()); } -void dxWorldProcessContext::CopyPreallocations(const dxWorldProcessContext *othercontext) +void dxWorldProcessContext::CleanupContext() { - m_IslandCount = othercontext->m_IslandCount; - m_pIslandSizes = othercontext->m_pIslandSizes; - m_pBodies = othercontext->m_pBodies; - m_pJoints = othercontext->m_pJoints; + if (m_pmaIslandsArena) + { + m_pmaIslandsArena->ResetState(); + } + + if (m_pmaStepperArena) + { + m_pmaStepperArena->ResetState(); + } } -void dxWorldProcessContext::ClearPreallocations() +dxWorldProcessMemArena *dxWorldProcessContext::ReallocateIslandsMemArena(size_t nMemoryRequirement, + const dxWorldProcessMemoryManager *pmmMemortManager, float fReserveFactor, unsigned uiReserveMinimum) { - m_IslandCount = 0; - m_pIslandSizes = NULL; - m_pBodies = NULL; - m_pJoints = NULL; + dxWorldProcessMemArena *pmaExistingArena = GetIslandsMemArena(); + dxWorldProcessMemArena *pmaNewMemArena = dxWorldProcessMemArena::ReallocateMemArena(pmaExistingArena, nMemoryRequirement, pmmMemortManager, fReserveFactor, uiReserveMinimum); + SetIslandsMemArena(pmaNewMemArena); + return pmaNewMemArena; } -void dxWorldProcessContext::FreePreallocationsContext() +dxWorldProcessMemArena *dxWorldProcessContext::ReallocateStepperMemArena(size_t nMemoryRequirement, + const dxWorldProcessMemoryManager *pmmMemortManager, float fReserveFactor, unsigned uiReserveMinimum) { - if (m_pPreallocationcContext) { - InternalFreeWorldProcessContext(m_pPreallocationcContext); - m_pPreallocationcContext = NULL; - } + dxWorldProcessMemArena *pmaExistingArena = GetStepperMemArena(); + dxWorldProcessMemArena *pmaNewMemArena = dxWorldProcessMemArena::ReallocateMemArena(pmaExistingArena, nMemoryRequirement, pmmMemortManager, fReserveFactor, uiReserveMinimum); + SetStepperMemArena(pmaNewMemArena); + return pmaNewMemArena; } - //**************************************************************************** // Auto disabling void dInternalHandleAutoDisabling (dxWorld *world, dReal stepsize) { - dxBody *bb; - for ( bb=world->firstbody; bb; bb=(dxBody*)bb->next ) - { - // don't freeze objects mid-air (patch 1586738) - if ( bb->firstjoint == NULL ) continue; + dxBody *bb; + for ( bb=world->firstbody; bb; bb=(dxBody*)bb->next ) + { + // don't freeze objects mid-air (patch 1586738) + if ( bb->firstjoint == NULL ) continue; - // nothing to do unless this body is currently enabled and has - // the auto-disable flag set - if ( (bb->flags & (dxBodyAutoDisable|dxBodyDisabled)) != dxBodyAutoDisable ) continue; + // nothing to do unless this body is currently enabled and has + // the auto-disable flag set + if ( (bb->flags & (dxBodyAutoDisable|dxBodyDisabled)) != dxBodyAutoDisable ) continue; - // if sampling / threshold testing is disabled, we can never sleep. - if ( bb->adis.average_samples == 0 ) continue; + // if sampling / threshold testing is disabled, we can never sleep. + if ( bb->adis.average_samples == 0 ) continue; - // - // see if the body is idle - // - + // + // see if the body is idle + // + #ifndef dNODEBUG - // sanity check - if ( bb->average_counter >= bb->adis.average_samples ) - { - dUASSERT( bb->average_counter < bb->adis.average_samples, "buffer overflow" ); + // sanity check + if ( bb->average_counter >= bb->adis.average_samples ) + { + dUASSERT( bb->average_counter < bb->adis.average_samples, "buffer overflow" ); - // something is going wrong, reset the average-calculations - bb->average_ready = 0; // not ready for average calculation - bb->average_counter = 0; // reset the buffer index - } + // something is going wrong, reset the average-calculations + bb->average_ready = 0; // not ready for average calculation + bb->average_counter = 0; // reset the buffer index + } #endif // dNODEBUG - // sample the linear and angular velocity - bb->average_lvel_buffer[bb->average_counter][0] = bb->lvel[0]; - bb->average_lvel_buffer[bb->average_counter][1] = bb->lvel[1]; - bb->average_lvel_buffer[bb->average_counter][2] = bb->lvel[2]; - bb->average_avel_buffer[bb->average_counter][0] = bb->avel[0]; - bb->average_avel_buffer[bb->average_counter][1] = bb->avel[1]; - bb->average_avel_buffer[bb->average_counter][2] = bb->avel[2]; - bb->average_counter++; + // sample the linear and angular velocity + bb->average_lvel_buffer[bb->average_counter][0] = bb->lvel[0]; + bb->average_lvel_buffer[bb->average_counter][1] = bb->lvel[1]; + bb->average_lvel_buffer[bb->average_counter][2] = bb->lvel[2]; + bb->average_avel_buffer[bb->average_counter][0] = bb->avel[0]; + bb->average_avel_buffer[bb->average_counter][1] = bb->avel[1]; + bb->average_avel_buffer[bb->average_counter][2] = bb->avel[2]; + bb->average_counter++; - // buffer ready test - if ( bb->average_counter >= bb->adis.average_samples ) - { - bb->average_counter = 0; // fill the buffer from the beginning - bb->average_ready = 1; // this body is ready now for average calculation - } + // buffer ready test + if ( bb->average_counter >= bb->adis.average_samples ) + { + bb->average_counter = 0; // fill the buffer from the beginning + bb->average_ready = 1; // this body is ready now for average calculation + } - int idle = 0; // Assume it's in motion unless we have samples to disprove it. + int idle = 0; // Assume it's in motion unless we have samples to disprove it. - // enough samples? - if ( bb->average_ready ) - { - idle = 1; // Initial assumption: IDLE + // enough samples? + if ( bb->average_ready ) + { + idle = 1; // Initial assumption: IDLE - // the sample buffers are filled and ready for calculation - dVector3 average_lvel, average_avel; + // the sample buffers are filled and ready for calculation + dVector3 average_lvel, average_avel; - // Store first velocity samples - average_lvel[0] = bb->average_lvel_buffer[0][0]; - average_avel[0] = bb->average_avel_buffer[0][0]; - average_lvel[1] = bb->average_lvel_buffer[0][1]; - average_avel[1] = bb->average_avel_buffer[0][1]; - average_lvel[2] = bb->average_lvel_buffer[0][2]; - average_avel[2] = bb->average_avel_buffer[0][2]; - - // If we're not in "instantaneous mode" - if ( bb->adis.average_samples > 1 ) - { - // add remaining velocities together - for ( unsigned int i = 1; i < bb->adis.average_samples; ++i ) - { - average_lvel[0] += bb->average_lvel_buffer[i][0]; - average_avel[0] += bb->average_avel_buffer[i][0]; - average_lvel[1] += bb->average_lvel_buffer[i][1]; - average_avel[1] += bb->average_avel_buffer[i][1]; - average_lvel[2] += bb->average_lvel_buffer[i][2]; - average_avel[2] += bb->average_avel_buffer[i][2]; - } + // Store first velocity samples + average_lvel[0] = bb->average_lvel_buffer[0][0]; + average_avel[0] = bb->average_avel_buffer[0][0]; + average_lvel[1] = bb->average_lvel_buffer[0][1]; + average_avel[1] = bb->average_avel_buffer[0][1]; + average_lvel[2] = bb->average_lvel_buffer[0][2]; + average_avel[2] = bb->average_avel_buffer[0][2]; - // make average - dReal r1 = dReal( 1.0 ) / dReal( bb->adis.average_samples ); + // If we're not in "instantaneous mode" + if ( bb->adis.average_samples > 1 ) + { + // add remaining velocities together + for ( unsigned int i = 1; i < bb->adis.average_samples; ++i ) + { + average_lvel[0] += bb->average_lvel_buffer[i][0]; + average_avel[0] += bb->average_avel_buffer[i][0]; + average_lvel[1] += bb->average_lvel_buffer[i][1]; + average_avel[1] += bb->average_avel_buffer[i][1]; + average_lvel[2] += bb->average_lvel_buffer[i][2]; + average_avel[2] += bb->average_avel_buffer[i][2]; + } - average_lvel[0] *= r1; - average_avel[0] *= r1; - average_lvel[1] *= r1; - average_avel[1] *= r1; - average_lvel[2] *= r1; - average_avel[2] *= r1; - } + // make average + dReal r1 = dReal( 1.0 ) / dReal( bb->adis.average_samples ); - // threshold test - dReal av_lspeed, av_aspeed; - av_lspeed = dCalcVectorDot3( average_lvel, average_lvel ); - if ( av_lspeed > bb->adis.linear_average_threshold ) - { - idle = 0; // average linear velocity is too high for idle - } - else - { - av_aspeed = dCalcVectorDot3( average_avel, average_avel ); - if ( av_aspeed > bb->adis.angular_average_threshold ) - { - idle = 0; // average angular velocity is too high for idle - } - } - } + average_lvel[0] *= r1; + average_avel[0] *= r1; + average_lvel[1] *= r1; + average_avel[1] *= r1; + average_lvel[2] *= r1; + average_avel[2] *= r1; + } - // if it's idle, accumulate steps and time. - // these counters won't overflow because this code doesn't run for disabled bodies. - if (idle) { - bb->adis_stepsleft--; - bb->adis_timeleft -= stepsize; - } - else { - // Reset countdowns - bb->adis_stepsleft = bb->adis.idle_steps; - bb->adis_timeleft = bb->adis.idle_time; - } + // threshold test + dReal av_lspeed, av_aspeed; + av_lspeed = dCalcVectorDot3( average_lvel, average_lvel ); + if ( av_lspeed > bb->adis.linear_average_threshold ) + { + idle = 0; // average linear velocity is too high for idle + } + else + { + av_aspeed = dCalcVectorDot3( average_avel, average_avel ); + if ( av_aspeed > bb->adis.angular_average_threshold ) + { + idle = 0; // average angular velocity is too high for idle + } + } + } - // disable the body if it's idle for a long enough time - if ( bb->adis_stepsleft <= 0 && bb->adis_timeleft <= 0 ) - { - bb->flags |= dxBodyDisabled; // set the disable flag + // if it's idle, accumulate steps and time. + // these counters won't overflow because this code doesn't run for disabled bodies. + if (idle) { + bb->adis_stepsleft--; + bb->adis_timeleft -= stepsize; + } + else { + // Reset countdowns + bb->adis_stepsleft = bb->adis.idle_steps; + bb->adis_timeleft = bb->adis.idle_time; + } - // disabling bodies should also include resetting the velocity - // should prevent jittering in big "islands" - bb->lvel[0] = 0; - bb->lvel[1] = 0; - bb->lvel[2] = 0; - bb->avel[0] = 0; - bb->avel[1] = 0; - bb->avel[2] = 0; - } - } + // disable the body if it's idle for a long enough time + if ( bb->adis_stepsleft <= 0 && bb->adis_timeleft <= 0 ) + { + bb->flags |= dxBodyDisabled; // set the disable flag + + // disabling bodies should also include resetting the velocity + // should prevent jittering in big "islands" + bb->lvel[0] = 0; + bb->lvel[1] = 0; + bb->lvel[2] = 0; + bb->avel[0] = 0; + bb->avel[1] = 0; + bb->avel[2] = 0; + } + } } @@ -365,7 +364,7 @@ // island processing // This estimates dynamic memory requirements for dxProcessIslands -static size_t EstimateIslandsProcessingMemoryRequirements(dxWorld *world, size_t &sesize) +static size_t EstimateIslandsProcessingMemoryRequirements(dxWorld *world) { size_t res = 0; @@ -376,11 +375,14 @@ size_t jointssize = dEFFICIENT_SIZE((size_t)(unsigned)world->nj * sizeof(dxJoint*)); res += bodiessize + jointssize; - sesize = (bodiessize < jointssize) ? bodiessize : jointssize; + size_t sesize = (bodiessize < jointssize) ? bodiessize : jointssize; + res += sesize; + return res; } -static size_t BuildIslandsAndEstimateStepperMemoryRequirements(dxWorldProcessContext *context, +static size_t BuildIslandsAndEstimateStepperMemoryRequirements( + dxWorldProcessIslandsInfo &islandsinfo, dxWorldProcessMemArena *memarena, dxWorld *world, dReal stepsize, dmemestimate_fn_t stepperestimate) { const unsigned int sizeelements = 2; @@ -391,20 +393,20 @@ unsigned int nb = world->nb, nj = world->nj; // Make array for island body/joint counts - unsigned int *islandsizes = context->AllocateArray<unsigned int>(2 * (size_t)nb); + unsigned int *islandsizes = memarena->AllocateArray<unsigned int>(2 * (size_t)nb); unsigned int *sizescurr; // make arrays for body and joint lists (for a single island) to go into - dxBody **body = context->AllocateArray<dxBody *>(nb); - dxJoint **joint = context->AllocateArray<dxJoint *>(nj); + dxBody **body = memarena->AllocateArray<dxBody *>(nb); + dxJoint **joint = memarena->AllocateArray<dxJoint *>(nj); - BEGIN_STATE_SAVE(context, stackstate) { + BEGIN_STATE_SAVE(memarena, stackstate) { // 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! unsigned int stackalloc = (nj < nb) ? nj : nb; - dxBody **stack = context->AllocateArray<dxBody *>(stackalloc); + dxBody **stack = memarena->AllocateArray<dxBody *>(stackalloc); { // set all body/joint tags to 0 @@ -483,7 +485,7 @@ } } } - } END_STATE_SAVE(context, stackstate); + } END_STATE_SAVE(memarena, stackstate); # ifndef dNODEBUG // if debugging, check that all objects (except for disabled bodies, @@ -513,7 +515,7 @@ # endif size_t islandcount = ((size_t)(sizescurr - islandsizes) / sizeelements); - context->SavePreallocations(islandcount, islandsizes, body, joint); + islandsinfo.AssignInfo(islandcount, islandsizes, body, joint); return maxreq; } @@ -529,7 +531,8 @@ // bodies will not be included in the simulation. disabled bodies are // re-enabled if they are found to be part of an active island. -void dxProcessIslands (dxWorld *world, dReal stepsize, dstepper_fn_t stepper) +void dxProcessIslands (dxWorld *world, const dxWorldProcessIslandsInfo &islandsinfo, + dReal stepsize, dstepper_fn_t stepper) { const unsigned int sizeelements = 2; @@ -537,13 +540,15 @@ dIASSERT(wmem != NULL); dxWorldProcessContext *context = wmem->GetWorldProcessingContext(); + dIASSERT(context != NULL); - size_t islandcount; - unsigned int const *islandsizes; - dxBody *const *body; - dxJoint *const *joint; - context->RetrievePreallocations(islandcount, islandsizes, body, joint); + size_t islandcount = islandsinfo.GetIslandsCount(); + unsigned int const *islandsizes = islandsinfo.GetIslandSizes(); + dxBody *const *body = islandsinfo.GetBodiesArray(); + dxJoint *const *joint = islandsinfo.GetJointsArray(); + dxWorldProcessMemArena *stepperarena = context->GetStepperMemArena(); + dxBody *const *bodystart = body; dxJoint *const *jointstart = joint; @@ -552,235 +557,158 @@ unsigned int bcount = sizescurr[0]; unsigned int jcount = sizescurr[1]; - BEGIN_STATE_SAVE(context, stepperstate) { + BEGIN_STATE_SAVE(stepperarena, stepperstate) { // now do something with body and joint lists - stepper (context,world,bodystart,bcount,jointstart,jcount,stepsize); - } END_STATE_SAVE(context, stepperstate); + stepper (stepperarena,world,bodystart,bcount,jointstart,jcount,stepsize); + } END_STATE_SAVE(stepperarena, stepperstate); bodystart += bcount; jointstart += jcount; } - - context->CleanupContext(); - dIASSERT(context->IsStructureValid()); } //**************************************************************************** // World processing context management -static size_t AdjustArenaSizeForReserveRequirements(size_t arenareq, float rsrvfactor, unsigned rsrvminimum) -{ - float scaledarena = arenareq * rsrvfactor; - size_t adjustedarena = (scaledarena < SIZE_MAX) ? (size_t)scaledarena : SIZE_MAX; - size_t boundedarena = (adjustedarena > rsrvminimum) ? adjustedarena : (size_t)rsrvminimum; - return dEFFICIENT_SIZE(boundedarena); -} - -static dxWorldProcessContext *InternalReallocateWorldProcessContext ( - dxWorldProcessContext *oldcontext, size_t memreq, +dxWorldProcessMemArena *dxWorldProcessMemArena::ReallocateMemArena ( + dxWorldProcessMemArena *oldarena, size_t memreq, const dxWorldProcessMemoryManager *memmgr, float rsrvfactor, unsigned rsrvminimum) { - dxWorldProcessContext *context = oldcontext; + dxWorldProcessMemArena *arena = oldarena; bool allocsuccess = false; - size_t oldarenasize; - void *pOldArena; + size_t nOldArenaSize; + void *pOldArenaBuffer; do { - size_t oldmemsize = oldcontext ? oldcontext->GetMemorySize() : 0; - if (!oldcontext || oldmemsize < memreq) { - oldarenasize = oldcontext ? dxWorldProcessContext::MakeArenaSize(oldmemsize) : 0; - pOldArena = oldcontext ? oldcontext->m_pArenaBegin : NULL; + size_t oldmemsize = oldarena ? oldarena->GetMemorySize() : 0; + if (oldarena == NULL || oldmemsize < memreq) { + nOldArenaSize = oldarena ? dxWorldProcessMemArena::MakeArenaSize(oldmemsize) : 0; + pOldArenaBuffer = oldarena ? oldarena->m_pArenaBegin : NULL; - if (!dxWorldProcessContext::IsArenaPossible(memreq)) { + if (!dxWorldProcessMemArena::IsArenaPossible(memreq)) { break; } - size_t arenareq = dxWorldProcessContext::MakeArenaSize(memreq); + size_t arenareq = dxWorldProcessMemArena::MakeArenaSize(memreq); size_t arenareq_with_reserve = AdjustArenaSizeForReserveRequirements(arenareq, rsrvfactor, rsrvminimum); size_t memreq_with_reserve = memreq + (arenareq_with_reserve - arenareq); - if (oldcontext) { + if (oldarena != NULL) { + oldarena->m_pArenaMemMgr->m_fnFree(pOldArenaBuffer, nOldArenaSize); + oldarena = NULL; - if (oldcontext->m_pAllocCurrent != oldcontext->m_pAllocBegin) { - - // Save old efficient offset and meaningful data size for the case if - // reallocation throws the block at different efficient offset - size_t oldcontextofs = (size_t)oldcontext - (size_t)pOldArena; - size_t datasize = (size_t)oldcontext->m_pAllocCurrent - (size_t)oldcontext; - - // Extra EFFICIENT_ALIGNMENT bytes might be needed after re-allocation with different alignment - size_t shrunkarenasize = dEFFICIENT_SIZE(datasize + oldcontextofs) + EFFICIENT_ALIGNMENT; - if (shrunkarenasize < oldarenasize) { - - void *pShrunkOldArena = oldcontext->m_pArenaMemMgr->m_fnShrink(pOldArena, oldarenasize, shrunkarenasize); - if (!pShrunkOldArena) { - break; - } - - // In case if shrinking is not supported and memory manager had to allocate-copy-free - if (pShrunkOldArena != pOldArena) { - dxWorldProcessContext *shrunkcontext = (dxWorldProcessContext *)dEFFICIENT_PTR(pShrunkOldArena); - - // Preform data shift in case if efficient alignment of new block - // does not match that of old block - size_t shrunkcontextofs = (size_t)shrunkcontext - (size_t)pShrunkOldArena; - size_t offsetdiff = oldcontextofs - shrunkcontextofs; - if (offsetdiff != 0) { - memmove(shrunkcontext, (void *)((size_t)shrunkcontext + offsetdiff), datasize); - } - - // Make sure allocation pointers are valid - that is necessary to - // be able to calculate size and free old arena later - size_t shrunkdatasize = dxWorldProcessContext::MakeBufferSize(shrunkarenasize); - void *blockbegin = dEFFICIENT_PTR(shrunkcontext + 1); - void *blockend = dOFFSET_EFFICIENTLY(blockbegin, shrunkdatasize); - shrunkcontext->m_pAllocBegin = blockbegin; - shrunkcontext->m_pAllocEnd = blockend; - shrunkcontext->m_pAllocCurrent = blockend; // -- set to end to prevent possibility of further allocation - shrunkcontext->m_pArenaBegin = pShrunkOldArena; - - size_t stOffset = ((size_t)pShrunkOldArena - (size_t)pOldArena) - offsetdiff; - shrunkcontext->OffsetPreallocations(stOffset); - - oldcontext = shrunkcontext; - - // Reassign to old arena variables for potential freeing at exit - pOldArena = pShrunkOldArena; - } - - // Reassign to old arena variables for potential freeing at exit - oldarenasize = shrunkarenasize; - } - - } else { - oldcontext->m_pArenaMemMgr->m_fnFree(pOldArena, oldarenasize); - oldcontext = NULL; - // Zero variables to avoid another freeing on exit - pOldArena = NULL; - oldarenasize = 0; - } + pOldArenaBuffer = NULL; + nOldArenaSize = 0; } // Allocate new arena - void *pNewArena = memmgr->m_fnAlloc(arenareq_with_reserve); - if (!pNewArena) { + void *pNewArenaBuffer = memmgr->m_fnAlloc(arenareq_with_reserve); + if (pNewArenaBuffer == NULL) { break; } - context = (dxWorldProcessContext *)dEFFICIENT_PTR(pNewArena); + arena = (dxWorldProcessMemArena *)dEFFICIENT_PTR(pNewArenaBuffer); - void *blockbegin = dEFFICIENT_PTR(context + 1); + void *blockbegin = dEFFICIENT_PTR(arena + 1); void *blockend = dOFFSET_EFFICIENTLY(blockbegin, memreq_with_reserve); - context->m_pAllocBegin = blockbegin; - context->m_pAllocEnd = blockend; - context->m_pArenaBegin = pNewArena; - context->m_pAllocCurrent = blockbegin; - - if (oldcontext) { - context->CopyPreallocations(oldcontext); - } else { - context->ClearPreallocations(); - } - - context->m_pArenaMemMgr = memmgr; - context->m_pPreallocationcContext = oldcontext; + arena->m_pAllocBegin = blockbegin; + arena->m_pAllocEnd = blockend; + arena->m_pArenaBegin = pNewArenaBuffer; + arena->m_pAllocCurrent = blockbegin; + arena->m_pArenaMemMgr = memmgr; } allocsuccess = true; } while (false); if (!allocsuccess) { - if (pOldArena) { - dIASSERT(oldcontext); - oldcontext->m_pArenaMemMgr->m_fnFree(pOldArena, oldarenasize); + if (pOldArenaBuffer != NULL) { + dIASSERT(oldarena != NULL); + oldarena->m_pArenaMemMgr->m_fnFree(pOldArenaBuffer, nOldArenaSize); } - context = NULL; + arena = NULL; } - return context; + return arena; } -static void InternalFreeWorldProcessContext (dxWorldProcessContext *context) +void dxWorldProcessMemArena::FreeMemArena (dxWorldProcessMemArena *arena) { - size_t memsize = context->GetMemorySize(); - size_t arenasize = dxWorldProcessContext::MakeArenaSize(memsize); + size_t memsize = arena->GetMemorySize(); + size_t arenasize = dxWorldProcessMemArena::MakeArenaSize(memsize); - void *pArenaBegin = context->m_pArenaBegin; - context->m_pArenaMemMgr->m_fnFree(pArenaBegin, arenasize); + void *pArenaBegin = arena->m_pArenaBegin; + arena->m_pArenaMemMgr->m_fnFree(pArenaBegin, arenasize); } -bool dxReallocateWorldProcessContext (dxWorld *world, +size_t dxWorldProcessMemArena::AdjustArenaSizeForReserveRequirements(size_t arenareq, float rsrvfactor, unsigned rsrvminimum) +{ + float scaledarena = arenareq * rsrvfactor; + size_t adjustedarena = (scaledarena < SIZE_MAX) ? (size_t)scaledarena : SIZE_MAX; + size_t boundedarena = (adjustedarena > rsrvminimum) ? adjustedarena : (size_t)rsrvminimum; + return dEFFICIENT_SIZE(boundedarena); +} + + +bool dxReallocateWorldProcessContext (dxWorld *world, dxWorldProcessIslandsInfo &islandsinfo, dReal stepsize, dmemestimate_fn_t stepperestimate) { dxStepWorkingMemory *wmem = AllocateOnDemand(world->wmem); - if (!wmem) return false; + if (wmem == NULL) return false; - dxWorldProcessContext *oldcontext = wmem->GetWorldProcessingContext(); - dIASSERT (!oldcontext || oldcontext->IsStructureValid()); + dxWorldProcessContext *context = wmem->SureGetWorldProcessingContext(); + if (context == NULL) return false; + dIASSERT (context->IsStructureValid()); const dxWorldProcessMemoryReserveInfo *reserveinfo = wmem->SureGetMemoryReserveInfo(); const dxWorldProcessMemoryManager *memmgr = wmem->SureGetMemoryManager(); - dxWorldProcessContext *context = oldcontext; - - size_t sesize; - size_t islandsreq = EstimateIslandsProcessingMemoryRequirements(world, sesize); + size_t islandsreq = EstimateIslandsProcessingMemoryRequirements(world); dIASSERT(islandsreq == dEFFICIENT_SIZE(islandsreq)); - dIASSERT(sesize == dEFFICIENT_SIZE(sesize)); - size_t stepperestimatereq = islandsreq + sesize; - context = InternalReallocateWorldProcessContext(context, stepperestimatereq, memmgr, 1.0f, reserveinfo->m_uiReserveMinimum); - - if (context) + dxWorldProcessMemArena *stepperarena = NULL; + dxWorldProcessMemArena *islandsarena = context->ReallocateIslandsMemArena(islandsreq, memmgr, 1.0f, reserveinfo->m_uiReserveMinimum); + + if (islandsarena != NULL) { - size_t stepperreq = BuildIslandsAndEstimateStepperMemoryRequirements(context, world, stepsize, stepperestimate); + size_t stepperreq = BuildIslandsAndEstimateStepperMemoryRequirements(islandsinfo, islandsarena, world, stepsize, stepperestimate); dIASSERT(stepperreq == dEFFICIENT_SIZE(stepperreq)); - size_t memreq = stepperreq + islandsreq; - context = InternalReallocateWorldProcessContext(context, memreq, memmgr, reserveinfo->m_fReserveFactor, reserveinfo->m_uiReserveMinimum); + stepperarena = context->ReallocateStepperMemArena(stepperreq, memmgr, reserveinfo->m_fReserveFactor, reserveinfo->m_uiReserveMinimum); } - wmem->SetWorldProcessingContext(context); - return context != NULL; + return stepperarena != NULL; } -dxWorldProcessContext *dxReallocateTemporayWorldProcessContext(dxWorldProcessContext *oldcontext, - size_t memreq, const dxWorldProcessMemoryManager *memmgr/*=NULL*/, const dxWorldProcessMemoryReserveInfo *reserveinfo/*=NULL*/) +void dxCleanupWorldProcessContext (dxWorld *world) { - dxWorldProcessContext *context = oldcontext; - - if (context && context->GetMemorySize() < memreq) { - dIASSERT(!context->IsPreallocationsContextAssigned()); - - InternalFreeWorldProcessContext(context); - context = NULL; + dxStepWorkingMemory *wmem = world->wmem; + if (wmem != NULL) + { + dxWorldProcessContext *context = wmem->GetWorldProcessingContext(); + if (context != NULL) + { + context->CleanupContext(); + dIASSERT(context->IsStructureValid()); + } } - - if (context == NULL) { - const dxWorldProcessMemoryManager *surememmgr = memmgr ? memmgr : &g_WorldProcessMallocMemoryManager; - const dxWorldProcessMemoryReserveInfo *surereserveinfo = reserveinfo ? reserveinfo : &g_WorldProcessDefaultReserveInfo; - context = InternalReallocateWorldProcessContext(context, memreq, surememmgr, surereserveinfo->m_fReserveFactor, surereserveinfo->m_uiReserveMinimum); - } - - return context; } -void dxFreeWorldProcessContext (dxWorldProcessContext *context) +dxWorldProcessMemArena *dxAllocateTemporaryWorldProcessMemArena( + size_t memreq, const dxWorldProcessMemoryManager *memmgr/*=NULL*/, const dxWorldProcessMemoryReserveInfo *reserveinfo/*=NULL*/) { - // Free old arena for the case if context is freed after reallocation without - // a call to world stepping function - context->FreePreallocationsContext(); + const dxWorldProcessMemoryManager *surememmgr = memmgr ? memmgr : &g_WorldProcessMallocMemoryManager; + const dxWorldProcessMemoryReserveInfo *surereserveinfo = reserveinfo ? reserveinfo : &g_WorldProcessDefaultReserveInfo; + dxWorldProcessMemArena *arena = dxWorldProcessMemArena::ReallocateMemArena(NULL, memreq, surememmgr, surereserveinfo->m_fReserveFactor, surereserveinfo->m_uiReserveMinimum); + return arena; +} - // Assert validity after old arena is freed as validation includes checking for - // old arena to be absent - dUASSERT (context->IsStructureValid(), "invalid context structure"); - - InternalFreeWorldProcessContext(context); +void dxFreeTemporaryWorldProcessMemArena(dxWorldProcessMemArena *arena) +{ + dxWorldProcessMemArena::FreeMemArena(arena); } - - Modified: trunk/ode/src/util.h =================================================================== --- trunk/ode/src/util.h 2011-12-30 13:41:55 UTC (rev 1858) +++ trunk/ode/src/util.h 2012-01-15 19:28:21 UTC (rev 1859) @@ -112,9 +112,11 @@ extern dxWorldProcessMemoryReserveInfo g_WorldProcessDefaultReserveInfo; -struct dxWorldProcessContext +class dxWorldProcessMemArena: + private dBase // new/delete must not be called for this class { -#define BUFFER_TO_ARENA_EXTRA (EFFICIENT_ALIGNMENT + dEFFICIENT_SIZE(sizeof(dxWorldProcessContext))) +public: +#define BUFFER_TO_ARENA_EXTRA (EFFICIENT_ALIGNMENT + dEFFICIENT_SIZE(sizeof(dxWorldProcessMemArena))) static bool IsArenaPossible(size_t nBufferSize) { return SIZE_MAX - BUFFER_TO_ARENA_EXTRA >= nBufferSize; // This ensures there will be no overflow @@ -133,7 +135,7 @@ bool IsStructureValid() const { - return !m_pPreallocationcContext && m_pAllocBegin && m_pAllocEnd && m_pAllocBegin <= m_pAllocEnd && m_pAllocCurrent == m_pAllocBegin && m_pArenaBeg... [truncated message content] |
From: <klo...@us...> - 2011-12-30 13:42:01
|
Revision: 1858 http://opende.svn.sourceforge.net/opende/?rev=1858&view=rev Author: klompjeg Date: 2011-12-30 13:41:55 +0000 (Fri, 30 Dec 2011) Log Message: ----------- Added support for enabling and disabling joints. Modified Paths: -------------- trunk/bindings/python/ode.pxd trunk/bindings/python/ode.pyx Modified: trunk/bindings/python/ode.pxd =================================================================== --- trunk/bindings/python/ode.pxd 2011-12-19 22:07:23 UTC (rev 1857) +++ trunk/bindings/python/ode.pxd 2011-12-30 13:41:55 UTC (rev 1858) @@ -232,6 +232,10 @@ void dJointDestroy (dJointID) + void dJointEnable (dJointID) + void dJointDisable (dJointID) + int dJointIsEnabled (dJointID) + dJointGroupID dJointGroupCreate (int max_size) void dJointGroupDestroy (dJointGroupID) void dJointGroupEmpty (dJointGroupID) Modified: trunk/bindings/python/ode.pyx =================================================================== --- trunk/bindings/python/ode.pyx 2011-12-19 22:07:23 UTC (rev 1857) +++ trunk/bindings/python/ode.pyx 2011-12-30 13:41:55 UTC (rev 1858) @@ -1826,6 +1826,36 @@ """ 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) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2011-12-19 22:07:29
|
Revision: 1857 http://opende.svn.sourceforge.net/opende/?rev=1857&view=rev Author: oleh_derevenko Date: 2011-12-19 22:07:23 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Changed: Renamed "enable-ou" to "with-ou" in premake to stay consistent with all the rest options Modified Paths: -------------- trunk/build/premake4.lua Modified: trunk/build/premake4.lua =================================================================== --- trunk/build/premake4.lua 2011-12-18 22:48:16 UTC (rev 1856) +++ trunk/build/premake4.lua 2011-12-19 22:07:23 UTC (rev 1857) @@ -93,8 +93,8 @@ } newoption { - trigger = "enable-ou", - description = "Use TLS for global variables (experimental)" + trigger = "with-ou", + description = "Use TLS for global caches (experimental)" } newoption { @@ -311,7 +311,7 @@ configuration { "not no-trimesh", "not with-gimpact" } files { "../OPCODE/**.h", "../OPCODE/**.cpp" } - configuration { "enable-ou" } + configuration { "with-ou" } files { "../ou/**.h", "../ou/**.cpp" } defines { "_OU_NAMESPACE=odeou" } @@ -367,7 +367,7 @@ text = string.gsub(text, "#define dTRIMESH_OPCODE 1", "#define dTRIMESH_GIMPACT 1") end - if _OPTIONS["enable-ou"] then + if _OPTIONS["with-ou"] 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") text = string.gsub(text, "/%* #define dTLS_ENABLED 1 %*/", "#define dTLS_ENABLED 1") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ole...@us...> - 2011-12-18 22:48:22
|
Revision: 1856 http://opende.svn.sourceforge.net/opende/?rev=1856&view=rev Author: oleh_derevenko Date: 2011-12-18 22:48:16 +0000 (Sun, 18 Dec 2011) Log Message: ----------- Fixed: Compilation fix for Win x64 target Modified Paths: -------------- trunk/OPCODE/Ice/IceTypes.h Modified: trunk/OPCODE/Ice/IceTypes.h =================================================================== --- trunk/OPCODE/Ice/IceTypes.h 2011-12-18 19:29:04 UTC (rev 1855) +++ trunk/OPCODE/Ice/IceTypes.h 2011-12-18 22:48:16 UTC (rev 1856) @@ -127,7 +127,7 @@ #define ONE_OVER_RAND_MAX (1.0f / float(RAND_MAX)) //!< Inverse of the max possible value returned by rand() - typedef int (__stdcall* PROC)(); //!< A standard procedure call. + // typedef int (__stdcall* PROC)(); -- Oleh Derevenko: Conflicts with Windows headers in x64 mode //!< A standard procedure call. typedef bool (*ENUMERATION)(udword value, udword param, udword context); //!< ICE standard enumeration call typedef void** VTABLE; //!< A V-Table. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2011-12-18 19:29:12
|
Revision: 1855 http://opende.svn.sourceforge.net/opende/?rev=1855&view=rev Author: danielosmari Date: 2011-12-18 19:29:04 +0000 (Sun, 18 Dec 2011) Log Message: ----------- * Removed useless Makefile.deps * Updated autoconf scripts to maintain third-party m4 scripts in tree. Now pkg-config is not required anymore to build ode from svn. Modified Paths: -------------- trunk/Makefile.am trunk/autogen.sh trunk/configure.in Added Paths: ----------- trunk/m4/ trunk/m4/libtool.m4 trunk/m4/ltoptions.m4 trunk/m4/ltsugar.m4 trunk/m4/ltversion.m4 trunk/m4/lt~obsolete.m4 trunk/m4/pkg.m4 Removed Paths: ------------- trunk/Makefile.deps Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2011-12-17 23:15:41 UTC (rev 1854) +++ trunk/Makefile.am 2011-12-18 19:29:04 UTC (rev 1855) @@ -1,3 +1,6 @@ +AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 --install + if ENABLE_OU OU_DIR = ou endif Deleted: trunk/Makefile.deps =================================================================== --- trunk/Makefile.deps 2011-12-17 23:15:41 UTC (rev 1854) +++ trunk/Makefile.deps 2011-12-18 19:29:04 UTC (rev 1855) @@ -1,1845 +0,0 @@ -ode/src/array.o: \ - ode/src/array.cpp \ - include/ode/config.h \ - include/ode/memory.h \ - include/ode/error.h \ - ode/src/array.h -ode/src/error.o: \ - ode/src/error.cpp \ - include/ode/config.h \ - include/ode/error.h -ode/src/memory.o: \ - ode/src/memory.cpp \ - include/ode/config.h \ - include/ode/memory.h \ - include/ode/error.h -ode/src/obstack.o: \ - ode/src/obstack.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/memory.h \ - ode/src/obstack.h \ - ode/src/objects.h \ - include/ode/mass.h \ - ode/src/array.h -ode/src/odemath.o: \ - ode/src/odemath.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/odemath.h -ode/src/matrix.o: \ - ode/src/matrix.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/matrix.h -ode/src/misc.o: \ - ode/src/misc.cpp \ - include/ode/config.h \ - include/ode/misc.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/matrix.h -ode/src/rotation.o: \ - ode/src/rotation.cpp \ - include/ode/rotation.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/compatibility.h \ - include/ode/odemath.h -ode/src/mass.o: \ - ode/src/mass.cpp \ - include/ode/config.h \ - include/ode/mass.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/odemath.h \ - include/ode/matrix.h -ode/src/ode.o: \ - ode/src/ode.cpp \ - ode/src/objects.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - include/ode/ode.h \ - include/ode/compatibility.h \ - include/ode/contact.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - ode/src/joint.h \ - ode/src/obstack.h \ - ode/src/step.h \ - ode/src/quickstep.h \ - ode/src/util.h -ode/src/step.o: \ - ode/src/step.cpp \ - ode/src/objects.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - ode/src/joint.h \ - include/ode/contact.h \ - ode/src/obstack.h \ - include/ode/odemath.h \ - include/ode/rotation.h \ - include/ode/compatibility.h \ - include/ode/timer.h \ - include/ode/matrix.h \ - ode/src/lcp.h \ - ode/src/util.h -ode/src/stepfast.o: \ - ode/src/stepfast.cpp \ - ode/src/objects.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - ode/src/joint.h \ - include/ode/contact.h \ - ode/src/obstack.h \ - include/ode/objects.h \ - include/ode/odemath.h \ - include/ode/rotation.h \ - include/ode/compatibility.h \ - include/ode/timer.h \ - include/ode/matrix.h \ - include/ode/misc.h \ - ode/src/lcp.h \ - ode/src/step.h \ - ode/src/util.h -ode/src/quickstep.o: \ - ode/src/quickstep.cpp \ - ode/src/objects.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - ode/src/joint.h \ - include/ode/contact.h \ - ode/src/obstack.h \ - include/ode/odemath.h \ - include/ode/rotation.h \ - include/ode/compatibility.h \ - include/ode/timer.h \ - include/ode/matrix.h \ - ode/src/lcp.h \ - ode/src/util.h -ode/src/util.o: \ - ode/src/util.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - ode/src/objects.h \ - ode/src/array.h \ - ode/src/joint.h \ - ode/src/obstack.h \ - ode/src/util.h -ode/src/lcp.o: \ - ode/src/lcp.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - ode/src/lcp.h \ - include/ode/matrix.h \ - include/ode/misc.h \ - ode/src/mat.h \ - include/ode/timer.h -ode/src/joint.o: \ - ode/src/joint.cpp \ - include/ode/odemath.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/rotation.h \ - include/ode/compatibility.h \ - include/ode/matrix.h \ - ode/src/joint.h \ - ode/src/objects.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - include/ode/contact.h \ - ode/src/obstack.h -ode/src/timer.o: \ - ode/src/timer.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/timer.h -ode/src/mat.o: \ - ode/src/mat.cpp \ - include/ode/config.h \ - include/ode/misc.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/matrix.h \ - include/ode/memory.h \ - ode/src/mat.h -ode/src/testing.o: \ - ode/src/testing.cpp \ - include/ode/config.h \ - include/ode/misc.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - ode/src/testing.h \ - ode/src/array.h -ode/src/export-dif.o: \ - ode/src/export-dif.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - ode/src/objects.h \ - ode/src/array.h \ - ode/src/joint.h \ - ode/src/obstack.h \ - ode/src/collision_kernel.h -ode/src/collision_kernel.o: \ - ode/src/collision_kernel.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/matrix.h \ - include/ode/rotation.h \ - include/ode/compatibility.h \ - include/ode/objects.h \ - include/ode/mass.h \ - include/ode/contact.h \ - ode/src/collision_kernel.h \ - include/ode/collision.h \ - include/ode/collision_space.h \ - include/ode/collision_trimesh.h \ - ode/src/objects.h \ - include/ode/memory.h \ - ode/src/array.h \ - ode/src/collision_util.h \ - ode/src/collision_std.h \ - ode/src/collision_transform.h \ - ode/src/collision_trimesh_internal.h -ode/src/collision_util.o: \ - ode/src/collision_util.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/collision.h \ - include/ode/collision_space.h \ - include/ode/contact.h \ - include/ode/collision_trimesh.h \ - include/ode/odemath.h \ - ode/src/collision_util.h -ode/src/collision_std.o: \ - ode/src/collision_std.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/collision.h \ - include/ode/collision_space.h \ - include/ode/contact.h \ - include/ode/collision_trimesh.h \ - include/ode/matrix.h \ - include/ode/rotation.h \ - include/ode/compatibility.h \ - include/ode/odemath.h \ - ode/src/collision_kernel.h \ - ode/src/objects.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - ode/src/collision_std.h \ - ode/src/collision_util.h -ode/src/collision_space.o: \ - ode/src/collision_space.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/matrix.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/contact.h \ - include/ode/collision_trimesh.h \ - ode/src/collision_kernel.h \ - ode/src/objects.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - ode/src/collision_space_internal.h -ode/src/collision_transform.o: \ - ode/src/collision_transform.cpp \ - include/ode/collision.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/collision_space.h \ - include/ode/contact.h \ - include/ode/collision_trimesh.h \ - include/ode/matrix.h \ - include/ode/rotation.h \ - include/ode/compatibility.h \ - include/ode/odemath.h \ - ode/src/collision_transform.h \ - ode/src/collision_kernel.h \ - ode/src/objects.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - ode/src/collision_util.h -ode/src/collision_quadtreespace.o: \ - ode/src/collision_quadtreespace.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/matrix.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/contact.h \ - include/ode/collision_trimesh.h \ - ode/src/collision_kernel.h \ - ode/src/objects.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - ode/src/collision_space_internal.h -ode/src/OPC_AABBCollider.o: \ - OPCODE/OPC_AABBCollider.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h \ - OPCODE/OPC_BoxBoxOverlap.h \ - OPCODE/OPC_TriBoxOverlap.h -ode/src/OPC_AABBTree.o: \ - OPCODE/OPC_AABBTree.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_BaseModel.o: \ - OPCODE/OPC_BaseModel.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_BoxPruning.o: \ - OPCODE/OPC_BoxPruning.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_Collider.o: \ - OPCODE/OPC_Collider.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_Common.o: \ - OPCODE/OPC_Common.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_HybridModel.o: \ - OPCODE/OPC_HybridModel.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_LSSCollider.o: \ - OPCODE/OPC_LSSCollider.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h \ - OPCODE/OPC_LSSAABBOverlap.h \ - OPCODE/OPC_LSSTriOverlap.h -ode/src/OPC_MeshInterface.o: \ - OPCODE/OPC_MeshInterface.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_Model.o: \ - OPCODE/OPC_Model.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_OBBCollider.o: \ - OPCODE/OPC_OBBCollider.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h \ - OPCODE/OPC_BoxBoxOverlap.h \ - OPCODE/OPC_TriBoxOverlap.h -ode/src/Opcode.o: \ - OPCODE/Opcode.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_OptimizedTree.o: \ - OPCODE/OPC_OptimizedTree.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_Picking.o: \ - OPCODE/OPC_Picking.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_PlanesCollider.o: \ - OPCODE/OPC_PlanesCollider.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h \ - OPCODE/OPC_PlanesAABBOverlap.h \ - OPCODE/OPC_PlanesTriOverlap.h -ode/src/OPC_RayCollider.o: \ - OPCODE/OPC_RayCollider.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h \ - OPCODE/OPC_RayAABBOverlap.h \ - OPCODE/OPC_RayTriOverlap.h -ode/src/OPC_SphereCollider.o: \ - OPCODE/OPC_SphereCollider.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h \ - OPCODE/OPC_SphereAABBOverlap.h \ - OPCODE/OPC_SphereTriOverlap.h -ode/src/OPC_SweepAndPrune.o: \ - OPCODE/OPC_SweepAndPrune.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_TreeBuilders.o: \ - OPCODE/OPC_TreeBuilders.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/OPC_TreeCollider.o: \ - OPCODE/OPC_TreeCollider.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h \ - OPCODE/OPC_BoxBoxOverlap.h \ - OPCODE/OPC_TriBoxOverlap.h \ - OPCODE/OPC_TriTriOverlap.h -ode/src/OPC_VolumeCollider.o: \ - OPCODE/OPC_VolumeCollider.cpp \ - OPCODE/Stdafx.h \ - OPCODE/Opcode.h \ - OPCODE/OPC_IceHook.h \ - OPCODE/Ice/IcePreprocessor.h \ - OPCODE/Ice/IceTypes.h \ - OPCODE/Ice/IceFPU.h \ - OPCODE/Ice/IceMemoryMacros.h \ - OPCODE/Ice/IceUtils.h \ - OPCODE/Ice/IceContainer.h \ - OPCODE/Ice/IcePairs.h \ - OPCODE/Ice/IceRevisitedRadix.h \ - OPCODE/Ice/IceRandom.h \ - OPCODE/Ice/IceAxes.h \ - OPCODE/Ice/IcePoint.h \ - OPCODE/Ice/IceHPoint.h \ - OPCODE/Ice/IceMatrix3x3.h \ - OPCODE/Ice/IceMatrix4x4.h \ - OPCODE/Ice/IcePlane.h \ - OPCODE/Ice/IceRay.h \ - OPCODE/Ice/IceIndexedTriangle.h \ - OPCODE/Ice/IceTriangle.h \ - OPCODE/Ice/IceTriList.h \ - OPCODE/Ice/IceAABB.h \ - OPCODE/Ice/IceOBB.h \ - OPCODE/Ice/IceBoundingSphere.h \ - OPCODE/Ice/IceSegment.h \ - OPCODE/Ice/IceLSS.h \ - OPCODE/OPC_Settings.h \ - OPCODE/OPC_Common.h \ - OPCODE/OPC_MeshInterface.h \ - OPCODE/OPC_TreeBuilders.h \ - OPCODE/OPC_AABBTree.h \ - OPCODE/OPC_OptimizedTree.h \ - OPCODE/OPC_BaseModel.h \ - OPCODE/OPC_Model.h \ - OPCODE/OPC_HybridModel.h \ - OPCODE/OPC_Collider.h \ - OPCODE/OPC_VolumeCollider.h \ - OPCODE/OPC_TreeCollider.h \ - OPCODE/OPC_RayCollider.h \ - OPCODE/OPC_SphereCollider.h \ - OPCODE/OPC_OBBCollider.h \ - OPCODE/OPC_AABBCollider.h \ - OPCODE/OPC_LSSCollider.h \ - OPCODE/OPC_PlanesCollider.h \ - OPCODE/OPC_Picking.h \ - OPCODE/OPC_BoxPruning.h \ - OPCODE/OPC_SweepAndPrune.h -ode/src/fastldlt.o: \ - ode/src/fastldlt.c \ - include/ode/matrix.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h -ode/src/fastlsolve.o: \ - ode/src/fastlsolve.c \ - include/ode/matrix.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h -ode/src/fastltsolve.o: \ - ode/src/fastltsolve.c \ - include/ode/matrix.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h -ode/src/fastdot.o: \ - ode/src/fastdot.c \ - include/ode/matrix.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h -drawstuff/src/drawstuff.o: \ - drawstuff/src/drawstuff.cpp \ - include/ode/config.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h \ - drawstuff/src/internal.h -drawstuff/src/x11.o: \ - drawstuff/src/x11.cpp \ - include/ode/config.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h \ - drawstuff/src/internal.h -ode/test/test_ode.o: \ - ode/test/test_ode.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h -ode/test/test_chain2.o: \ - ode/test/test_chain2.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_hinge.o: \ - ode/test/test_hinge.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_slider.o: \ - ode/test/test_slider.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_collision.o: \ - ode/test/test_collision.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_boxstack.o: \ - ode/test/test_boxstack.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_buggy.o: \ - ode/test/test_buggy.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_crash.o: \ - ode/test/test_crash.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_joints.o: \ - ode/test/test_joints.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_space.o: \ - ode/test/test_space.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_I.o: \ - ode/test/test_I.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_step.o: \ - ode/test/test_step.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_friction.o: \ - ode/test/test_friction.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_space_stress.o: \ - ode/test/test_space_stress.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_trimesh.o: \ - ode/test/test_trimesh.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_moving_trimesh.o: \ - ode/test/test_moving_trimesh.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/compatibility.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/contact.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/ode/collision_space.h \ - include/ode/collision.h \ - include/ode/collision_trimesh.h \ - include/ode/odecpp_collision.h \ - include/ode/export-dif.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -drawstuff/dstest/dstest.o: \ - drawstuff/dstest/dstest.cpp \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h Modified: trunk/autogen.sh =================================================================== --- trunk/autogen.sh 2011-12-17 23:15:41 UTC (rev 1854) +++ trunk/autogen.sh 2011-12-18 19:29:04 UTC (rev 1855) @@ -30,7 +30,7 @@ echo "Warnings about underquoted definitions are harmless" echo "Running aclocal" -aclocal -I . || exit 1 +aclocal -I m4 --install || exit 1 # on Mac libtoolize is called glibtoolize LIBTOOLIZE=libtoolize #if [ `uname -s` = Darwin ]; then Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2011-12-17 23:15:41 UTC (rev 1854) +++ trunk/configure.in 2011-12-18 19:29:04 UTC (rev 1855) @@ -1,6 +1,5 @@ dnl AC_INIT does not take a macro as a version nr: set it separately! - Bram AC_INIT([ODE],[0.11.1],[od...@od...]) -AC_CONFIG_SRCDIR([ode/src/ode.cpp]) ODE_RELEASE=0.11.1 AC_SUBST(ODE_RELEASE) @@ -41,6 +40,8 @@ AC_SUBST(ODE_VERSION_INFO) +AC_CONFIG_SRCDIR([ode/src/ode.cpp]) +AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_HOST @@ -64,8 +65,6 @@ AC_C_BIGENDIAN AC_C_INLINE AC_C_VOLATILE -AC_HEADER_STDBOOL -AC_TYPE_SIZE_T PKG_PROG_PKG_CONFIG @@ -94,7 +93,8 @@ 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 ]) + string.h stdarg.h malloc.h float.h time.h sys/time.h \ + limits.h stddef.h]) opcode=no @@ -135,21 +135,23 @@ 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=]) +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 + 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 + if test "x$drawstuff" = x then drawstuff="OSX" fi @@ -159,7 +161,7 @@ LINK="$CXXLINK" ;; *) - if test x"$drawstuff" = x + if test "x$drawstuff" = x then drawstuff="X11" # if anything else default to X11 fi @@ -174,9 +176,8 @@ if test "x$drawstuff" = "xX11" then - # The built-in macro causes too many problems, these days everyone uses Xorg, + # 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. - #AC_PATH_XTRA PKG_CHECK_MODULES(X11, x11, [], [drawstuff="none"]) fi @@ -272,10 +273,18 @@ 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 select sqrt sqrtf sinf cosf fabsf atan2f fmodf copysignf copysign snprintf vsnprintf gettimeofday isnan isnanf _isnan _isnanf __isnan __isnanf]) +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 strchr strstr]) AC_FUNC_ALLOCA AC_FUNC_MALLOC AC_FUNC_OBSTACK Added: trunk/m4/libtool.m4 =================================================================== --- trunk/m4/libtool.m4 (rev 0) +++ trunk/m4/libtool.m4 2011-12-18 19:29:04 UTC (rev 1855) @@ -0,0 +1,7857 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 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, 2009, 2010 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 57 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_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +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 + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +d... [truncated message content] |