Commit: 81c3fc9726c64f58ee2976b732fb2701c768f6de
Author: Sergej Reich
Date:   Thu Jul 3 21:40:04 2014 +0200
https://developer.blender.org/rB81c3fc9726c64f58ee2976b732fb2701c768f6de

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.

===================================================================

M       extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp

===================================================================

diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp 
b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
index 893453b..21f0aa9 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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to