| 530 | |
| 531 | |
| 532 | void DynamicsTGSContext::update(IG::SimpleIslandManager& simpleIslandManager, PxBaseTask* continuation, PxBaseTask* lostTouchTask, |
| 533 | PxsContactManager** /*foundPatchManagers*/, PxU32 /*nbFoundPatchManagers*/, |
| 534 | PxsContactManager** /*lostPatchManagers*/, PxU32 /*nbLostPatchManagers*/, |
| 535 | PxU32 /*maxPatchesPerCM*/, |
| 536 | PxsContactManagerOutputIterator& iterator, |
| 537 | PxsContactManagerOutput*, |
| 538 | const PxReal dt, const PxVec3& gravity, const PxU32 /*bitMapWordCounts*/) |
| 539 | { |
| 540 | PX_PROFILE_ZONE("Dynamics.solverQueueTasks", mContextID); |
| 541 | |
| 542 | PX_UNUSED(simpleIslandManager); |
| 543 | |
| 544 | mOutputIterator = iterator; |
| 545 | |
| 546 | //const PxU32 nbSubsteps = 16; |
| 547 | |
| 548 | mDt = dt; |
| 549 | mInvDt = 1.f / dt; |
| 550 | |
| 551 | mGravity = gravity; |
| 552 | |
| 553 | const IG::IslandSim& islandSim = simpleIslandManager.getAccurateIslandSim(); |
| 554 | |
| 555 | const PxU32 islandCount = islandSim.getNbActiveIslands(); |
| 556 | |
| 557 | const PxU32 activatedContactCount = islandSim.getNbActivatedEdges(IG::Edge::eCONTACT_MANAGER); |
| 558 | const IG::EdgeIndex* const activatingEdges = islandSim.getActivatedEdges(IG::Edge::eCONTACT_MANAGER); |
| 559 | |
| 560 | for (PxU32 a = 0; a < activatedContactCount; ++a) |
| 561 | { |
| 562 | PxsContactManager* cm = simpleIslandManager.getContactManager(activatingEdges[a]); |
| 563 | if (cm) |
| 564 | { |
| 565 | cm->getWorkUnit().frictionPatchCount = 0; //KS - zero the friction patch count on any activating edges |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | #if PX_ENABLE_SIM_STATS |
| 570 | if (islandCount > 0) |
| 571 | { |
| 572 | mSimStats.mNbActiveKinematicBodies = islandSim.getNbActiveKinematics(); |
| 573 | mSimStats.mNbActiveDynamicBodies = islandSim.getNbActiveNodes(IG::Node::eRIGID_BODY_TYPE); |
| 574 | mSimStats.mNbActiveConstraints = islandSim.getNbActiveEdges(IG::Edge::eCONSTRAINT); |
| 575 | } |
| 576 | else |
| 577 | { |
| 578 | mSimStats.mNbActiveKinematicBodies = islandSim.getNbActiveKinematics(); |
| 579 | mSimStats.mNbActiveDynamicBodies = 0; |
| 580 | mSimStats.mNbActiveConstraints = 0; |
| 581 | } |
| 582 | #endif |
| 583 | |
| 584 | mThresholdStreamOut = 0; |
| 585 | |
| 586 | resetThreadContexts(); |
| 587 | |
| 588 | //If there is no work to do then we can do nothing at all. |
| 589 | if (0 == islandCount) |
nothing calls this directly
no test coverage detected