Changeset 8393 for code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h
- Timestamp:
- May 3, 2011, 5:07:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/external/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h
r8351 r8393 14 14 */ 15 15 16 #ifndef PERSISTENT_MANIFOLD_H17 #define PERSISTENT_MANIFOLD_H16 #ifndef BT_PERSISTENT_MANIFOLD_H 17 #define BT_PERSISTENT_MANIFOLD_H 18 18 19 19 … … 33 33 extern ContactProcessedCallback gContactProcessedCallback; 34 34 35 35 //the enum starts at 1024 to avoid type conflicts with btTypedConstraint 36 36 enum btContactManifoldTypes 37 37 { 38 BT_PERSISTENT_MANIFOLD_TYPE = 1,39 MAX_CONTACT_MANIFOLD_TYPE38 MIN_CONTACT_MANIFOLD_TYPE = 1024, 39 BT_PERSISTENT_MANIFOLD_TYPE 40 40 }; 41 41 … … 147 147 //get rid of duplicated userPersistentData pointer 148 148 m_pointCache[lastUsedIndex].m_userPersistentData = 0; 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;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; 152 152 153 153 m_pointCache[lastUsedIndex].m_appliedImpulse = 0.f; … … 168 168 #ifdef MAINTAIN_PERSISTENCY 169 169 int lifeTime = m_pointCache[insertIndex].getLifeTime(); 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;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; 173 173 // bool isLateralFrictionInitialized = m_pointCache[insertIndex].m_lateralFrictionInitialized; 174 174 … … 185 185 m_pointCache[insertIndex].m_appliedImpulseLateral2 = appliedLateralImpulse2; 186 186 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;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; 190 190 191 191 … … 200 200 bool validContactDistance(const btManifoldPoint& pt) const 201 201 { 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 203 208 } 204 209 /// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin … … 225 230 226 231 227 #endif // PERSISTENT_MANIFOLD_H232 #endif //BT_PERSISTENT_MANIFOLD_H
Note: See TracChangeset
for help on using the changeset viewer.