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:
@@ -150,6 +150,12 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||
{
|
||||
return (proxyType == COMPOUND_SHAPE_PROXYTYPE);
|
||||
}
|
||||
|
||||
static SIMD_FORCE_INLINE bool isSoftBody(int proxyType)
|
||||
{
|
||||
return (proxyType == SOFTBODY_SHAPE_PROXYTYPE);
|
||||
}
|
||||
|
||||
static SIMD_FORCE_INLINE bool isInfinite(int proxyType)
|
||||
{
|
||||
return (proxyType == STATIC_PLANE_PROXYTYPE);
|
||||
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
|
||||
/// rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback
|
||||
/// This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback.
|
||||
void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const;
|
||||
virtual void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const;
|
||||
|
||||
// convexTest performs a swept convex cast on all objects in the btCollisionWorld, and calls the resultCallback
|
||||
// This allows for several queries: first hit, all hits, any hit, dependent on the value return by the callback.
|
||||
|
||||
@@ -80,6 +80,11 @@ public:
|
||||
return btBroadphaseProxy::isCompound(getShapeType());
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE bool isSoftBody() const
|
||||
{
|
||||
return btBroadphaseProxy::isSoftBody(getShapeType());
|
||||
}
|
||||
|
||||
///isInfinite is used to catch simulation error (aabb check)
|
||||
SIMD_FORCE_INLINE bool isInfinite() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user