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:
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
index 93990235afe..9fb6a67c4a3 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
@@ -69,15 +69,23 @@ protected:
void* m_internalOwner;
///time of impact calculation
- btScalar m_hitFraction;
+ btScalar m_hitFraction;
///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
- btScalar m_ccdSweptSphereRadius;
+ btScalar m_ccdSweptSphereRadius;
/// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold
- btScalar m_ccdSquareMotionThreshold;
+ btScalar m_ccdSquareMotionThreshold;
- char m_pad[8];
+ /// If some object should have elaborate collision filtering by sub-classes
+ bool m_checkCollideWith;
+
+ char m_pad[7];
+
+ virtual bool checkCollideWithOverride(btCollisionObject* co)
+ {
+ return true;
+ }
public:
@@ -118,6 +126,7 @@ public:
btCollisionObject();
+ virtual ~btCollisionObject();
void setCollisionShape(btCollisionShape* collisionShape)
{
@@ -159,7 +168,7 @@ public:
return ((getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION));
}
- void setRestitution(btScalar rest)
+ void setRestitution(btScalar rest)
{
m_restitution = rest;
}
@@ -322,6 +331,15 @@ public:
m_userObjectPointer = userPointer;
}
+ inline bool checkCollideWith(btCollisionObject* co)
+ {
+ if (m_checkCollideWith)
+ return checkCollideWithOverride(co);
+
+ return true;
+ }
+
+
}
;