apply patch to allow soft body rayTest. Minor change in patch: test for current hitfraction, so only report hits closer than current closest hit fraction.
Thanks to Benoit Bolsee for the patch, see Issue 311 http://code.google.com/p/bullet/issues/detail?id=311
This commit is contained in:
@@ -80,6 +80,18 @@ public:
|
||||
return m_softBodies;
|
||||
}
|
||||
|
||||
|
||||
virtual void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const;
|
||||
|
||||
/// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest.
|
||||
/// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape.
|
||||
/// This allows more customization.
|
||||
static void rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
|
||||
btCollisionObject* collisionObject,
|
||||
const btCollisionShape* collisionShape,
|
||||
const btTransform& colObjWorldTransform,
|
||||
RayResultCallback& resultCallback);
|
||||
|
||||
};
|
||||
|
||||
#endif //BT_SOFT_RIGID_DYNAMICS_WORLD_H
|
||||
|
||||
Reference in New Issue
Block a user