diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2010-01-06 11:46:04 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2010-01-06 11:46:04 +0300 |
commit | b38a727da3ec458a4dc8be1fc1fffb89115b69d3 (patch) | |
tree | 376659e0d0adb70a4678b79f6dd6c90a2c7a8e6d /extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp | |
parent | 042c2b2aa56fcaaff3204572676125c3085e6a14 (diff) |
Bullet: rework softbody raytest patch after approval by Erwin.
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp index 7159f552829..5c645f82a45 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp @@ -412,31 +412,6 @@ void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra // restore collisionObject->internalSetTemporaryCollisionShape(saveCollisionShape); } - } else { - if (collisionShape->isSoftBody()) { - btSoftBody* softBody = static_cast<btSoftBody*>(collisionObject); - btSoftBody::sRayCast softResult; - if (softBody->rayTest(rayFromTrans.getOrigin(), rayToTrans.getOrigin(), softResult)) - { - btCollisionWorld::LocalShapeInfo shapeInfo; - shapeInfo.m_shapePart = 0; - shapeInfo.m_triangleIndex = softResult.index; - // get the normal - btVector3 normal = softBody->m_faces[softResult.index].m_normal; - btVector3 rayDir = rayToTrans.getOrigin() - rayFromTrans.getOrigin(); - if (normal.dot(rayDir) > 0) { - // normal always point toward origin of the ray - normal = -normal; - } - btCollisionWorld::LocalRayResult rayResult - (collisionObject, - &shapeInfo, - normal, - softResult.fraction); - bool normalInWorldSpace = true; - resultCallback.addSingleResult(rayResult,normalInWorldSpace); - } - } } } } |