| 1134 | } |
| 1135 | |
| 1136 | void AABBManager::destroy() |
| 1137 | { |
| 1138 | releasePairs(mActorAggregatePairs); |
| 1139 | releasePairs(mAggregateAggregatePairs); |
| 1140 | |
| 1141 | const PxU32 nb = mAggregates.size(); |
| 1142 | for(PxU32 i=0;i<nb;i++) |
| 1143 | { |
| 1144 | bool found = false; |
| 1145 | PxU32 currentFree = mFirstFreeAggregate; |
| 1146 | while(currentFree!=PX_INVALID_U32) |
| 1147 | { |
| 1148 | if(currentFree==i) |
| 1149 | { |
| 1150 | found = true; |
| 1151 | break; |
| 1152 | } |
| 1153 | currentFree = PxU32(reinterpret_cast<size_t>(mAggregates[currentFree])); |
| 1154 | } |
| 1155 | |
| 1156 | if(!found) |
| 1157 | { |
| 1158 | Aggregate* a = mAggregates[i]; |
| 1159 | PX_DELETE(a); |
| 1160 | } |
| 1161 | } |
| 1162 | |
| 1163 | BpCacheData* entry = static_cast<BpCacheData*>(mBpThreadContextPool.pop()); |
| 1164 | while (entry) |
| 1165 | { |
| 1166 | entry->~BpCacheData(); |
| 1167 | PX_FREE(entry); |
| 1168 | entry = static_cast<BpCacheData*>(mBpThreadContextPool.pop()); |
| 1169 | } |
| 1170 | |
| 1171 | PX_DELETE(this); |
| 1172 | } |
| 1173 | |
| 1174 | /*bool AABBManager::checkID(ShapeHandle id) |
| 1175 | { |
nothing calls this directly
no test coverage detected