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

Method setArticulation

physx/source/simulationcontroller/src/ScBodySim.cpp:898–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896}
897
898void 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
930void BodySim::createSqBounds()
931{

Callers 2

addBodyMethod · 0.45
removeBodyMethod · 0.45

Calls 6

setActiveFunction · 0.85
getIslandNodeIndexMethod · 0.80
indexMethod · 0.80
setWakeCounterFromSimMethod · 0.80
getFlagsFastFunction · 0.70
setIndicesMethod · 0.45

Tested by

no test coverage detected