Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 27, 2011, 7:43:24 AM (14 years ago)
Author:
rgrieder
Message:

Updated Bullet Physics Engine from v2.74 to v2.77

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/src/external/bullet/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp

    r5781 r7983  
    3535
    3636btCollisionDispatcher::btCollisionDispatcher (btCollisionConfiguration* collisionConfiguration):
    37         m_count(0),
    38         m_useIslands(true),
    39         m_staticWarningReported(false),
     37m_dispatcherFlags(btCollisionDispatcher::CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD),
    4038        m_collisionConfiguration(collisionConfiguration)
    4139{
     
    8078        btCollisionObject* body1 = (btCollisionObject*)b1;
    8179
    82         //test for Bullet 2.74: use a relative contact breaking threshold without clamping against 'gContactBreakingThreshold'
    83         //btScalar contactBreakingThreshold = btMin(gContactBreakingThreshold,btMin(body0->getCollisionShape()->getContactBreakingThreshold(),body1->getCollisionShape()->getContactBreakingThreshold()));
    84         btScalar contactBreakingThreshold = btMin(body0->getCollisionShape()->getContactBreakingThreshold(),body1->getCollisionShape()->getContactBreakingThreshold());
     80        //optional relative contact breaking threshold, turned on by default (use setDispatcherFlags to switch off feature for improved performance)
     81       
     82        btScalar contactBreakingThreshold =  (m_dispatcherFlags & btCollisionDispatcher::CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD) ?
     83                btMin(body0->getCollisionShape()->getContactBreakingThreshold(gContactBreakingThreshold) , body1->getCollisionShape()->getContactBreakingThreshold(gContactBreakingThreshold))
     84                : gContactBreakingThreshold ;
    8585
    8686        btScalar contactProcessingThreshold = btMin(body0->getContactProcessingThreshold(),body1->getContactProcessingThreshold());
     
    170170
    171171#ifdef BT_DEBUG
    172         if (!m_staticWarningReported)
     172        if (!(m_dispatcherFlags & btCollisionDispatcher::CD_STATIC_STATIC_REPORTED))
    173173        {
    174174                //broadphase filtering already deals with this
     
    176176                        (body1->isStaticObject() || body1->isKinematicObject()))
    177177                {
    178                         m_staticWarningReported = true;
     178                        m_dispatcherFlags |= btCollisionDispatcher::CD_STATIC_STATIC_REPORTED;
    179179                        printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n");
    180180                }
Note: See TracChangeset for help on using the changeset viewer.