| 896 | } |
| 897 | |
| 898 | void BodySim::setArticulation(ArticulationSim* a, PxReal wakeCounter, bool asleep, PxU32 bodyIndex) |
| 899 | { |
| 900 | mArticulation = a; |
| 901 | if(a) |
| 902 | { |
| 903 | IG::NodeIndex index = mArticulation->getIslandNodeIndex(); |
| 904 | mNodeIndex.setIndices(index.index(), bodyIndex); |
| 905 | getBodyCore().setWakeCounterFromSim(wakeCounter); |
| 906 | |
| 907 | if (getFlagsFast() & PxRigidBodyFlag::eENABLE_SPECULATIVE_CCD) |
| 908 | getScene().setSpeculativeCCDArticulationLink(mNodeIndex.index()); |
| 909 | |
| 910 | if (!asleep) |
| 911 | { |
| 912 | setActive(true); |
| 913 | notifyWakeUp(false); |
| 914 | } |
| 915 | else |
| 916 | { |
| 917 | notifyReadyForSleeping(); |
| 918 | notifyPutToSleep(); |
| 919 | setActive(false); |
| 920 | } |
| 921 | } |
| 922 | else |
| 923 | { |
| 924 | //Setting a 1 in the articulation ID to avoid returning the node Index to the node index |
| 925 | //manager |
| 926 | mNodeIndex.setIndices(IG_INVALID_NODE, 1); |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | void BodySim::createSqBounds() |
| 931 | { |
no test coverage detected