MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / removeBody

Method removeBody

physx/source/simulationcontroller/src/ScScene.cpp:1693–1719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1691}
1692
1693void Sc::Scene::removeBody(BodySim& body) //this also notifies any connected joints!
1694{
1695 ConstraintGroupNode* node = body.getConstraintGroup();
1696 if (node)
1697 {
1698 //invalidate the constraint group:
1699 //this adds all constraints of the group to the dirty list such that groups get re-generated next frame
1700 getProjectionManager().invalidateGroup(*node, NULL);
1701 }
1702
1703 BodyCore& core = body.getBodyCore();
1704
1705 // Remove from sleepBodies array
1706 mSleepBodies.erase(&core);
1707 PX_ASSERT(!mSleepBodies.contains(&core));
1708
1709 // Remove from wokeBodies array
1710 mWokeBodies.erase(&core);
1711 PX_ASSERT(!mWokeBodies.contains(&core));
1712
1713 if (body.isActive() && (core.getFlags() & PxRigidBodyFlag::eENABLE_POSE_INTEGRATION_PREVIEW))
1714 removeFromPosePreviewList(body);
1715 else
1716 PX_ASSERT(!isInPosePreviewList(body));
1717
1718 markReleasedBodyIDForLostTouch(body.getRigidID());
1719}
1720
1721void Sc::Scene::addConstraint(ConstraintCore& constraint, RigidCore* body0, RigidCore* body1)
1722{

Callers 4

~BodySimMethod · 0.45
~ArticulationJointSimMethod · 0.45
switchRigidToNoSimMethod · 0.45
addOrRemoveRigidObjectFunction · 0.45

Calls 15

isInPosePreviewListFunction · 0.85
getConstraintGroupMethod · 0.80
invalidateGroupMethod · 0.80
isArticulationLinkMethod · 0.80
indexMethod · 0.80
eraseMethod · 0.45
containsMethod · 0.45
isActiveMethod · 0.45
getFlagsMethod · 0.45
getRigidIDMethod · 0.45

Tested by

no test coverage detected