| 464 | //---------------------------------------------------------------------------- |
| 465 | |
| 466 | void Convex::updateWorkingList(const Box3F& box, const U32 colMask) |
| 467 | { |
| 468 | PROFILE_SCOPE( Convex_UpdateWorkingList ); |
| 469 | |
| 470 | sTag++; |
| 471 | |
| 472 | // Clear objects off the working list that are no longer intersecting |
| 473 | for (CollisionWorkingList* itr = mWorking.wLink.mNext; itr != &mWorking; itr = itr->wLink.mNext) { |
| 474 | itr->mConvex->mTag = sTag; |
| 475 | if ((!box.isOverlapped(itr->mConvex->getBoundingBox())) || (!itr->mConvex->getObject()->isCollisionEnabled())) { |
| 476 | CollisionWorkingList* cl = itr; |
| 477 | itr = itr->wLink.mPrev; |
| 478 | cl->free(); |
| 479 | } |
| 480 | } |
| 481 | |
| 482 | // Special processing for the terrain and interiors... |
| 483 | AssertFatal(mObject->getContainer(), "Must be in a container!"); |
| 484 | |
| 485 | SimpleQueryList sql; |
| 486 | mObject->getContainer()->findObjects(box, colMask,SimpleQueryList::insertionCallback, &sql); |
| 487 | for (U32 i = 0; i < sql.mList.size(); i++) |
| 488 | sql.mList[i]->buildConvex(box, this); |
| 489 | } |
| 490 | |
| 491 | void Convex::clearWorkingList() |
| 492 | { |
no test coverage detected