Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2011, 6:58:23 PM (14 years ago)
Author:
rgrieder
Message:

Merged revisions 7978 - 8096 from kicklib to kicklib2.

Location:
code/branches/kicklib2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2

  • code/branches/kicklib2/src/external/bullet/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp

    r5781 r8284  
    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.