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:
authorSergej Reich <sergej.reich@googlemail.com>2014-07-03 23:40:04 +0400
committerSergej Reich <sergej.reich@googlemail.com>2014-07-03 23:40:04 +0400
commit81c3fc9726c64f58ee2976b732fb2701c768f6de (patch)
tree0cb6489099f469d27689eed822df781076b4373e /extern/bullet2
parent6cc78927a301a35dcfdb0bd3ccd03cc3ca3a8863 (diff)
cloth: Speed up collision detection
Noticed this while looking into something else. The change is trivial, but gives a rather nice preformance improvement, so why not. Theres's actually a lot one can do to improve collision performance if one wanted to, the triangle-triangle check alone has a lot of room for improvement.
Diffstat (limited to 'extern/bullet2')
-rw-r--r--extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
index 893453bddaf..21f0aa93220 100644
--- a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
+++ b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
@@ -32,6 +32,7 @@ subject to the following restrictions:
#include "LinearMath/btTransform.h"
#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+#include "BulletCollision/Gimpact/btTriangleShapeEx.h"
#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
#include "BulletCollision/NarrowPhaseCollision/btPointCollector.h"
@@ -341,12 +342,12 @@ void plGetOrientation(plRigidBodyHandle object,plQuaternion orientation)
double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3])
{
btVector3 vp(p1[0], p1[1], p1[2]);
- btTriangleShape trishapeA(vp,
+ btTriangleShapeEx trishapeA(vp,
btVector3(p2[0], p2[1], p2[2]),
btVector3(p3[0], p3[1], p3[2]));
trishapeA.setMargin(0.000001f);
btVector3 vq(q1[0], q1[1], q1[2]);
- btTriangleShape trishapeB(vq,
+ btTriangleShapeEx trishapeB(vq,
btVector3(q2[0], q2[1], q2[2]),
btVector3(q3[0], q3[1], q3[2]));
trishapeB.setMargin(0.000001f);