MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / setWakeCounter

Method setWakeCounter

deps/physx/physx/source/physx/src/NpRigidDynamic.cpp:405–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403
404
405void NpRigidDynamic::setWakeCounter(PxReal wakeCounterValue)
406{
407 Scb::Body& b = getScbBodyFast();
408
409 NP_WRITE_CHECK(NpActor::getOwnerScene(*this));
410 PX_CHECK_AND_RETURN(PxIsFinite(wakeCounterValue), "PxRigidDynamic::setWakeCounter: invalid float.");
411 PX_CHECK_AND_RETURN(wakeCounterValue>=0.0f, "PxRigidDynamic::setWakeCounter: wakeCounterValue must be non-negative!");
412 PX_CHECK_AND_RETURN(!(b.getFlags() & PxRigidBodyFlag::eKINEMATIC), "PxRigidDynamic::setWakeCounter: Body must be non-kinematic!");
413 PX_CHECK_AND_RETURN(!(b.getActorFlags() & PxActorFlag::eDISABLE_SIMULATION), "PxRigidDynamic::setWakeCounter: Not allowed if PxActorFlag::eDISABLE_SIMULATION is set!");
414
415 b.setWakeCounter(wakeCounterValue);
416}
417
418
419PxReal NpRigidDynamic::getWakeCounter() const

Callers 4

spawnDebugObjectMethod · 0.45
wakeUpActorsMethod · 0.45

Calls 3

PxIsFiniteFunction · 0.85
getFlagsMethod · 0.45
getActorFlagsMethod · 0.45

Tested by

no test coverage detected