Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2011, 5:07:42 AM (13 years ago)
Author:
rgrieder
Message:

Updated Bullet from v2.77 to v2.78.
(I'm not going to make a branch for that since the update from 2.74 to 2.77 hasn't been tested that much either).

You will HAVE to do a complete RECOMPILE! I tested with MSVC and MinGW and they both threw linker errors at me.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h

    r8351 r8393  
    1414*/
    1515
    16 #ifndef PERSISTENT_MANIFOLD_H
    17 #define PERSISTENT_MANIFOLD_H
     16#ifndef BT_PERSISTENT_MANIFOLD_H
     17#define BT_PERSISTENT_MANIFOLD_H
    1818
    1919
     
    3333extern ContactProcessedCallback gContactProcessedCallback;
    3434
    35 
     35//the enum starts at 1024 to avoid type conflicts with btTypedConstraint
    3636enum btContactManifoldTypes
    3737{
    38         BT_PERSISTENT_MANIFOLD_TYPE = 1,
    39         MAX_CONTACT_MANIFOLD_TYPE
     38        MIN_CONTACT_MANIFOLD_TYPE = 1024,
     39        BT_PERSISTENT_MANIFOLD_TYPE
    4040};
    4141
     
    147147                        //get rid of duplicated userPersistentData pointer
    148148                        m_pointCache[lastUsedIndex].m_userPersistentData = 0;
    149                         m_pointCache[lastUsedIndex].mConstraintRow[0].mAccumImpulse = 0.f;
    150                         m_pointCache[lastUsedIndex].mConstraintRow[1].mAccumImpulse = 0.f;
    151                         m_pointCache[lastUsedIndex].mConstraintRow[2].mAccumImpulse = 0.f;
     149                        m_pointCache[lastUsedIndex].mConstraintRow[0].m_accumImpulse = 0.f;
     150                        m_pointCache[lastUsedIndex].mConstraintRow[1].m_accumImpulse = 0.f;
     151                        m_pointCache[lastUsedIndex].mConstraintRow[2].m_accumImpulse = 0.f;
    152152
    153153                        m_pointCache[lastUsedIndex].m_appliedImpulse = 0.f;
     
    168168#ifdef MAINTAIN_PERSISTENCY
    169169                int     lifeTime = m_pointCache[insertIndex].getLifeTime();
    170                 btScalar        appliedImpulse = m_pointCache[insertIndex].mConstraintRow[0].mAccumImpulse;
    171                 btScalar        appliedLateralImpulse1 = m_pointCache[insertIndex].mConstraintRow[1].mAccumImpulse;
    172                 btScalar        appliedLateralImpulse2 = m_pointCache[insertIndex].mConstraintRow[2].mAccumImpulse;
     170                btScalar        appliedImpulse = m_pointCache[insertIndex].mConstraintRow[0].m_accumImpulse;
     171                btScalar        appliedLateralImpulse1 = m_pointCache[insertIndex].mConstraintRow[1].m_accumImpulse;
     172                btScalar        appliedLateralImpulse2 = m_pointCache[insertIndex].mConstraintRow[2].m_accumImpulse;
    173173//              bool isLateralFrictionInitialized = m_pointCache[insertIndex].m_lateralFrictionInitialized;
    174174               
     
    185185                m_pointCache[insertIndex].m_appliedImpulseLateral2 = appliedLateralImpulse2;
    186186               
    187                 m_pointCache[insertIndex].mConstraintRow[0].mAccumImpulse =  appliedImpulse;
    188                 m_pointCache[insertIndex].mConstraintRow[1].mAccumImpulse = appliedLateralImpulse1;
    189                 m_pointCache[insertIndex].mConstraintRow[2].mAccumImpulse = appliedLateralImpulse2;
     187                m_pointCache[insertIndex].mConstraintRow[0].m_accumImpulse =  appliedImpulse;
     188                m_pointCache[insertIndex].mConstraintRow[1].m_accumImpulse = appliedLateralImpulse1;
     189                m_pointCache[insertIndex].mConstraintRow[2].m_accumImpulse = appliedLateralImpulse2;
    190190
    191191
     
    200200        bool validContactDistance(const btManifoldPoint& pt) const
    201201        {
    202                 return pt.m_distance1 <= getContactBreakingThreshold();
     202                if (pt.m_lifeTime >1)
     203                {
     204                        return pt.m_distance1 <= getContactBreakingThreshold();
     205                }
     206                return pt.m_distance1 <= getContactProcessingThreshold();
     207       
    203208        }
    204209        /// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
     
    225230
    226231
    227 #endif //PERSISTENT_MANIFOLD_H
     232#endif //BT_PERSISTENT_MANIFOLD_H
Note: See TracChangeset for help on using the changeset viewer.