| 4874 | } |
| 4875 | |
| 4876 | void Sc::Scene::addBody(BodyCore& body, void*const *shapes, PxU32 nbShapes, size_t shapePtrOffset, PxBounds3* outBounds, bool compound) |
| 4877 | { |
| 4878 | // sim objects do all the necessary work of adding themselves to broad phase, |
| 4879 | // activation, registering with the interaction system, etc |
| 4880 | |
| 4881 | BodySim* sim = mBodySimPool->construct(*this, body, compound); |
| 4882 | |
| 4883 | const bool isArticulationLink = sim->isArticulationLink(); |
| 4884 | |
| 4885 | if (sim->getLowLevelBody().mCore->mFlags & PxRigidBodyFlag::eENABLE_SPECULATIVE_CCD) |
| 4886 | { |
| 4887 | if (isArticulationLink) |
| 4888 | { |
| 4889 | if (sim->getNodeIndex().isValid()) |
| 4890 | mSpeculativeCDDArticulationBitMap.growAndSet(sim->getNodeIndex().index()); |
| 4891 | } |
| 4892 | else |
| 4893 | mSpeculativeCCDRigidBodyBitMap.growAndSet(sim->getNodeIndex().index()); |
| 4894 | } |
| 4895 | //if rigid body is articulation link, the node index will be invalid. We should add the link to the scene after we add the |
| 4896 | //articulation for gpu |
| 4897 | if(sim->getNodeIndex().isValid()) |
| 4898 | mSimulationController->addDynamic(&sim->getLowLevelBody(), sim->getNodeIndex()); |
| 4899 | mNbRigidDynamics++; |
| 4900 | addShapes(shapes, nbShapes, shapePtrOffset, *sim, outBounds); |
| 4901 | } |
| 4902 | |
| 4903 | void Sc::Scene::removeBody(BodyCore& body, Ps::InlineArray<const Sc::ShapeCore*,64>& removedShapes, bool wakeOnLostTouch) |
| 4904 | { |
no test coverage detected