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:
authorErwin Coumans <blender@erwincoumans.com>2008-09-21 19:17:50 +0400
committerErwin Coumans <blender@erwincoumans.com>2008-09-21 19:17:50 +0400
commit1c29d02305685a942742846c757775800202a52a (patch)
tree516370cd730151a5a6246a713f1622e40b0b287d /extern/bullet2/src/BulletSoftBody
parent92829e821f345596edec123e06187186e2471027 (diff)
BGE real-time soft bodies, step 2 / 3: create a btSoftBody. Next step is hooking up / deform graphics mesh and choose collision shape.
Note: feature is still disabled.
Diffstat (limited to 'extern/bullet2/src/BulletSoftBody')
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBody.cpp2
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBody.h7
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h1
3 files changed, 8 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp
index 91b9d6f1bbd..e42a613343b 100644
--- a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp
+++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp
@@ -69,7 +69,7 @@ btSoftBody::btSoftBody(btSoftBodyWorldInfo* worldInfo,int node_count, const btV
pm->m_flags = fMaterial::Default;
/* Collision shape */
///for now, create a collision shape internally
- setCollisionShape(new btSoftBodyCollisionShape(this));
+ m_collisionShape = new btSoftBodyCollisionShape(this);
m_collisionShape->setMargin(0.25);
/* Nodes */
const btScalar margin=getCollisionShape()->getMargin();
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.h b/extern/bullet2/src/BulletSoftBody/btSoftBody.h
index 91d732b4e9a..4306ed9c471 100644
--- a/extern/bullet2/src/BulletSoftBody/btSoftBody.h
+++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.h
@@ -606,6 +606,13 @@ public:
/* dtor */
virtual ~btSoftBody();
/* Check for existing link */
+
+
+ virtual void setCollisionShape(btCollisionShape* collisionShape)
+ {
+ //don't do anything, due to the internal shape hack: todo: fix this
+ }
+
bool checkLink( int node0,
int node1) const;
bool checkLink( const Node* node0,
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h b/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h
index 1a7be2cb840..8fcf633fecc 100644
--- a/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h
+++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h
@@ -94,7 +94,6 @@ public:
virtual void setLocalScaling(const btVector3& /*scaling*/)
{
///na
- btAssert(0);
}
virtual const btVector3& getLocalScaling() const
{