Merging fluidcontrol to trunk from rev16649 fluidcontrol branch. Code provided by...
[blender-staging.git] / extern / bullet2 / src / BulletCollision / CollisionDispatch / btCollisionObject.h
index 96cbd1c3eb8f3d38c632ec141de54fa4042f62c2..0961f3e75c98ed37ff2eecb4ca6c54ca12b3705e 100644 (file)
@@ -81,8 +81,8 @@ protected:
        ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
        btScalar                m_ccdSweptSphereRadius;
 
-       /// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold
-       btScalar                m_ccdSquareMotionThreshold;
+       /// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold
+       btScalar                m_ccdMotionThreshold;
        
        /// If some object should have elaborate collision filtering by sub-classes
        bool                    m_checkCollideWith;
@@ -143,7 +143,7 @@ public:
 
        virtual ~btCollisionObject();
 
-       void    setCollisionShape(btCollisionShape* collisionShape)
+       virtual void    setCollisionShape(btCollisionShape* collisionShape)
        {
                m_collisionShape = collisionShape;
                m_rootCollisionShape = collisionShape;
@@ -268,6 +268,15 @@ public:
                m_interpolationWorldTransform = trans;
        }
 
+       void    setInterpolationLinearVelocity(const btVector3& linvel)
+       {
+               m_interpolationLinearVelocity = linvel;
+       }
+
+       void    setInterpolationAngularVelocity(const btVector3& angvel)
+       {
+               m_interpolationAngularVelocity = angvel;
+       }
 
        const btVector3&        getInterpolationLinearVelocity() const
        {
@@ -332,16 +341,22 @@ public:
                m_ccdSweptSphereRadius = radius;
        }
 
+       btScalar        getCcdMotionThreshold() const
+       {
+               return m_ccdMotionThreshold;
+       }
+
        btScalar        getCcdSquareMotionThreshold() const
        {
-               return m_ccdSquareMotionThreshold;
+               return m_ccdMotionThreshold*m_ccdMotionThreshold;
        }
 
 
-       /// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold
-       void    setCcdSquareMotionThreshold(btScalar ccdSquareMotionThreshold)
+
+       /// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold
+       void    setCcdMotionThreshold(btScalar ccdMotionThreshold)
        {
-               m_ccdSquareMotionThreshold = ccdSquareMotionThreshold;
+               m_ccdMotionThreshold = ccdMotionThreshold*ccdMotionThreshold;
        }
 
        ///users can point to their objects, userPointer is not used by Bullet