Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h
index e105ecbff18..2cce335145b 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h
@@ -18,7 +18,10 @@ subject to the following restrictions:
#include "LinearMath/btAlignedObjectArray.h"
- #define USE_PATH_COMPRESSION 1
+#define USE_PATH_COMPRESSION 1
+
+///see for discussion of static island optimizations by Vroonsh here: http://code.google.com/p/bullet/issues/detail?id=406
+#define STATIC_SIMULATION_ISLAND_OPTIMIZATION 1
struct btElement
{
@@ -106,10 +109,12 @@ class btUnionFind
//not really a reason not to use path compression, and it flattens the trees/improves find performance dramatically
#ifdef USE_PATH_COMPRESSION
- //
- m_elements[x].m_id = m_elements[m_elements[x].m_id].m_id;
- #endif //
+ const btElement* elementPtr = &m_elements[m_elements[x].m_id];
+ m_elements[x].m_id = elementPtr->m_id;
+ x = elementPtr->m_id;
+ #else//
x = m_elements[x].m_id;
+ #endif
//btAssert(x < m_N);
//btAssert(x >= 0);