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
path: root/extern
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
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')
-rw-r--r--extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp5
-rw-r--r--extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h1
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h2
-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
6 files changed, 12 insertions, 6 deletions
diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp
index e711078f4e2..e00fc6aa5e3 100644
--- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp
+++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp
@@ -119,7 +119,7 @@ void Process(const btDbvtNode* n)
//
btDbvtBroadphase::btDbvtBroadphase(btOverlappingPairCache* paircache)
{
-m_deferedcollide = true;//false;
+m_deferedcollide = false;
m_needcleanup = true;
m_releasepaircache = (paircache!=0)?false:true;
m_prediction = 1/(btScalar)2;
@@ -164,7 +164,7 @@ btBroadphaseProxy* btDbvtBroadphase::createProxy( const btVector3& aabbMin,
void* userPtr,
short int collisionFilterGroup,
short int collisionFilterMask,
- btDispatcher* dispatcher,
+ btDispatcher* /*dispatcher*/,
void* /*multiSapProxy*/)
{
btDbvtProxy* proxy=new(btAlignedAlloc(sizeof(btDbvtProxy),16)) btDbvtProxy( userPtr,
@@ -180,6 +180,7 @@ if(!m_deferedcollide)
btDbvtTreeCollider collider(this);
collider.proxy=proxy;
btDbvt::collideTV(m_sets[0].m_root,proxy->aabb,collider);
+ btDbvt::collideTV(m_sets[1].m_root,proxy->aabb,collider);
}
return(proxy);
}
diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h
index 4576e48f3f4..1f16043a7a8 100644
--- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h
+++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h
@@ -86,7 +86,6 @@ int m_gid; // Gen id
bool m_releasepaircache; // Release pair cache on delete
bool m_deferedcollide; // Defere dynamic/static collision to collide call
bool m_needcleanup; // Need to run cleanup?
-bool m_initialize; // Initialization
#if DBVT_BP_PROFILE
btClock m_clock;
struct {
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
index 7ef3787b3ac..0961f3e75c9 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
@@ -143,7 +143,7 @@ public:
virtual ~btCollisionObject();
- void setCollisionShape(btCollisionShape* collisionShape)
+ virtual void setCollisionShape(btCollisionShape* collisionShape)
{
m_collisionShape = collisionShape;
m_rootCollisionShape = collisionShape;
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
{