Remove an overlapping pair
| 75 | |
| 76 | // Remove an overlapping pair |
| 77 | void OverlappingPairs::removePair(uint64 pairId) { |
| 78 | |
| 79 | RP3D_PROFILE("OverlappingPairs::removePair()", mProfiler); |
| 80 | |
| 81 | assert(mMapConvexPairIdToPairIndex.containsKey(pairId) || mMapConcavePairIdToPairIndex.containsKey(pairId) || |
| 82 | mMapDisabledConvexPairIdToPairIndex.containsKey(pairId) || mMapDisabledConcavePairIdToPairIndex.containsKey(pairId)); |
| 83 | |
| 84 | auto it = mMapConvexPairIdToPairIndex.find(pairId); |
| 85 | if (it != mMapConvexPairIdToPairIndex.end()) { |
| 86 | removeConvexPairWithIndex(it->second, true); |
| 87 | return; |
| 88 | } |
| 89 | |
| 90 | auto it2 = mMapConcavePairIdToPairIndex.find(pairId); |
| 91 | if (it2 != mMapConcavePairIdToPairIndex.end()) { |
| 92 | removeConcavePairWithIndex(it2->second, true); |
| 93 | return; |
| 94 | } |
| 95 | |
| 96 | auto it3 = mMapDisabledConvexPairIdToPairIndex.find(pairId); |
| 97 | if (it3 != mMapDisabledConvexPairIdToPairIndex.end()) { |
| 98 | removeDisabledConvexPairWithIndex(it3->second, true); |
| 99 | return; |
| 100 | } |
| 101 | |
| 102 | auto it4 = mMapDisabledConcavePairIdToPairIndex.find(pairId); |
| 103 | if (it4 != mMapDisabledConcavePairIdToPairIndex.end()) { |
| 104 | removeDisabledConcavePairWithIndex(it4->second, true); |
| 105 | return; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | // Remove an disabled convex overlapping pair |
| 110 | void OverlappingPairs::removeDisabledConvexPairWithIndex(uint64 pairIndex, bool removeFromColliders) { |
no test coverage detected