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/NarrowPhaseCollision/btVoronoiSimplexSolver.h')
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h
index d3162d9fbeb..9a4f552924c 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h
@@ -24,6 +24,11 @@ subject to the following restrictions:
#define VORONOI_SIMPLEX_MAX_VERTS 5
+///disable next define, or use defaultCollisionConfiguration->getSimplexSolver()->setEqualVertexThreshold(0.f) to disable/configure
+#define BT_USE_EQUAL_VERTEX_THRESHOLD
+#define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD 0.0001f
+
+
struct btUsageBitfield{
btUsageBitfield()
{
@@ -106,8 +111,11 @@ public:
btVector3 m_cachedP2;
btVector3 m_cachedV;
btVector3 m_lastW;
+
+ btScalar m_equalVertexThreshold;
bool m_cachedValidClosest;
+
btSubSimplexClosestResult m_cachedBC;
bool m_needsUpdate;
@@ -122,10 +130,23 @@ public:
public:
+ btVoronoiSimplexSolver()
+ : m_equalVertexThreshold(VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD)
+ {
+ }
void reset();
void addVertex(const btVector3& w, const btVector3& p, const btVector3& q);
+ void setEqualVertexThreshold(btScalar threshold)
+ {
+ m_equalVertexThreshold = threshold;
+ }
+
+ btScalar getEqualVertexThreshold() const
+ {
+ return m_equalVertexThreshold;
+ }
bool closest(btVector3& v);