Changeset 8351 for code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h
- Timestamp:
- Apr 28, 2011, 7:15:14 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h
r5781 r8351 31 31 typedef bool (*ContactProcessedCallback)(btManifoldPoint& cp,void* body0,void* body1); 32 32 extern ContactDestroyedCallback gContactDestroyedCallback; 33 34 35 33 extern ContactProcessedCallback gContactProcessedCallback; 34 35 36 enum btContactManifoldTypes 37 { 38 BT_PERSISTENT_MANIFOLD_TYPE = 1, 39 MAX_CONTACT_MANIFOLD_TYPE 40 }; 36 41 37 42 #define MANIFOLD_CACHE_SIZE 4 … … 44 49 ///the contact point with deepest penetration is always kept, and it tries to maximuze the area covered by the points 45 50 ///note that some pairs of objects might have more then one contact manifold. 46 ATTRIBUTE_ALIGNED16( class) btPersistentManifold 51 52 53 ATTRIBUTE_ALIGNED128( class) btPersistentManifold : public btTypedObject 54 //ATTRIBUTE_ALIGNED16( class) btPersistentManifold : public btTypedObject 47 55 { 48 56 … … 53 61 void* m_body0; 54 62 void* m_body1; 63 55 64 int m_cachedPoints; 56 65 … … 68 77 BT_DECLARE_ALIGNED_ALLOCATOR(); 69 78 79 int m_companionIdA; 80 int m_companionIdB; 81 70 82 int m_index1a; 71 83 … … 73 85 74 86 btPersistentManifold(void* body0,void* body1,int , btScalar contactBreakingThreshold,btScalar contactProcessingThreshold) 75 : m_body0(body0),m_body1(body1),m_cachedPoints(0), 87 : btTypedObject(BT_PERSISTENT_MANIFOLD_TYPE), 88 m_body0(body0),m_body1(body1),m_cachedPoints(0), 76 89 m_contactBreakingThreshold(contactBreakingThreshold), 77 90 m_contactProcessingThreshold(contactProcessingThreshold) 78 91 { 79 80 92 } 81 93 … … 135 147 //get rid of duplicated userPersistentData pointer 136 148 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; 152 137 153 m_pointCache[lastUsedIndex].m_appliedImpulse = 0.f; 138 154 m_pointCache[lastUsedIndex].m_lateralFrictionInitialized = false; … … 152 168 #ifdef MAINTAIN_PERSISTENCY 153 169 int lifeTime = m_pointCache[insertIndex].getLifeTime(); 154 btScalar appliedImpulse = m_pointCache[insertIndex].m_appliedImpulse; 155 btScalar appliedLateralImpulse1 = m_pointCache[insertIndex].m_appliedImpulseLateral1; 156 btScalar appliedLateralImpulse2 = m_pointCache[insertIndex].m_appliedImpulseLateral2; 157 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; 173 // bool isLateralFrictionInitialized = m_pointCache[insertIndex].m_lateralFrictionInitialized; 174 175 176 158 177 btAssert(lifeTime>=0); 159 178 void* cache = m_pointCache[insertIndex].m_userPersistentData; … … 166 185 m_pointCache[insertIndex].m_appliedImpulseLateral2 = appliedLateralImpulse2; 167 186 187 m_pointCache[insertIndex].mConstraintRow[0].mAccumImpulse = appliedImpulse; 188 m_pointCache[insertIndex].mConstraintRow[1].mAccumImpulse = appliedLateralImpulse1; 189 m_pointCache[insertIndex].mConstraintRow[2].mAccumImpulse = appliedLateralImpulse2; 190 191 168 192 m_pointCache[insertIndex].m_lifeTime = lifeTime; 169 193 #else
Note: See TracChangeset
for help on using the changeset viewer.