| 1691 | } |
| 1692 | |
| 1693 | void 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 | |
| 1721 | void Sc::Scene::addConstraint(ConstraintCore& constraint, RigidCore* body0, RigidCore* body1) |
| 1722 | { |
no test coverage detected