MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / updateWorkingList

Method updateWorkingList

Engine/source/collision/convex.cpp:466–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464//----------------------------------------------------------------------------
465
466void 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
491void Convex::clearWorkingList()
492{

Calls 9

isCollisionEnabledMethod · 0.80
findObjectsMethod · 0.80
isOverlappedMethod · 0.60
getBoundingBoxMethod · 0.45
getObjectMethod · 0.45
freeMethod · 0.45
getContainerMethod · 0.45
sizeMethod · 0.45
buildConvexMethod · 0.45

Tested by

no test coverage detected