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

Method setWakeCounter

physx/source/physx/src/NpRigidDynamic.cpp:393–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391
392
393void NpRigidDynamic::setWakeCounter(PxReal wakeCounterValue)
394{
395 Scb::Body& b = getScbBodyFast();
396
397 NP_WRITE_CHECK(NpActor::getOwnerScene(*this));
398 PX_CHECK_AND_RETURN(PxIsFinite(wakeCounterValue), "PxRigidDynamic::setWakeCounter: invalid float.");
399 PX_CHECK_AND_RETURN(wakeCounterValue>=0.0f, "PxRigidDynamic::setWakeCounter: wakeCounterValue must be non-negative!");
400 PX_CHECK_AND_RETURN(!(b.getFlags() & PxRigidBodyFlag::eKINEMATIC), "PxRigidDynamic::setWakeCounter: Body must be non-kinematic!");
401 PX_CHECK_AND_RETURN(!(b.getActorFlags() & PxActorFlag::eDISABLE_SIMULATION), "PxRigidDynamic::setWakeCounter: Not allowed if PxActorFlag::eDISABLE_SIMULATION is set!");
402
403 b.setWakeCounter(wakeCounterValue);
404}
405
406
407PxReal NpRigidDynamic::getWakeCounter() const

Callers 5

spawnDebugObjectMethod · 0.45
wakeUpActorsMethod · 0.45
createPxActorMethod · 0.45

Calls 3

PxIsFiniteFunction · 0.85
getFlagsMethod · 0.45
getActorFlagsMethod · 0.45

Tested by

no test coverage detected