Back to index

supertuxkart  0.5+dfsg1
Functions | Variables
btManifoldResult.cpp File Reference
#include "btManifoldResult.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"

Go to the source code of this file.

Functions

btScalar calculateCombinedFriction (const btCollisionObject *body0, const btCollisionObject *body1)
 User can override this material combiner by implementing gContactAddedCallback and setting body0->m_collisionFlags |= btCollisionObject::customMaterialCallback;.
btScalar calculateCombinedRestitution (const btCollisionObject *body0, const btCollisionObject *body1)

Variables

ContactAddedCallback gContactAddedCallback = 0
 This is to allow MaterialCombiner/Custom Friction/Restitution values.

Function Documentation

btScalar calculateCombinedFriction ( const btCollisionObject *  body0,
const btCollisionObject *  body1 
) [inline]

User can override this material combiner by implementing gContactAddedCallback and setting body0->m_collisionFlags |= btCollisionObject::customMaterialCallback;.

Definition at line 26 of file btManifoldResult.cpp.

{
       btScalar friction = body0->getFriction() * body1->getFriction();

       const btScalar MAX_FRICTION  = btScalar(10.);
       if (friction < -MAX_FRICTION)
              friction = -MAX_FRICTION;
       if (friction > MAX_FRICTION)
              friction = MAX_FRICTION;
       return friction;

}

Here is the caller graph for this function:

btScalar calculateCombinedRestitution ( const btCollisionObject *  body0,
const btCollisionObject *  body1 
) [inline]

Definition at line 39 of file btManifoldResult.cpp.

{
       return body0->getRestitution() * body1->getRestitution();
}

Here is the caller graph for this function:


Variable Documentation

This is to allow MaterialCombiner/Custom Friction/Restitution values.

Definition at line 23 of file btManifoldResult.cpp.