BGE: Optimize Soft body conversion: don't create BVH structure.
authorBenoit Bolsee <benoit.bolsee@online.be>
Wed, 3 Feb 2010 21:41:03 +0000 (21:41 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Wed, 3 Feb 2010 21:41:03 +0000 (21:41 +0000)
commit0020de72e45cae82561e07e284c520170e5e3ea8
treeee7a23bfc47d2edaa7ec5d6fcb666c7f28ec28cd
parent02d9da1d5d0387238014e7737b76c87cd520b754
BGE: Optimize Soft body conversion: don't create BVH structure.

A btBvhTriangleMeshShape object is created when converting
a mesh to physics, also in case of Soft body although the
soft body will not use it (it only uses the mesh interface).

This patch keeps this system for compatibility with the
KX converter but avoids the creation of the BVH structure,
which consumes a lots of CPU. This should speed up
significantly the conversion of large mesh to softbody.

A secondary optimization is that the sharing of shapeInfo
is extended to rigid body using gImpact. Before it was
only active between static body and soft body.
source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.h