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

Method setRestOffset

physx/source/physx/src/NpShape.cpp:489–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489void NpShape::setRestOffset(PxReal restOffset)
490{
491 NP_WRITE_CHECK(getOwnerScene());
492 PX_CHECK_AND_RETURN(PxIsFinite(restOffset), "PxShape::setRestOffset: invalid float");
493 PX_CHECK_AND_RETURN((restOffset < mShape.getContactOffset()), "PxShape::setRestOffset: restOffset should be less than contactOffset!");
494 PX_CHECK_AND_RETURN(isWritable(), "PxShape::setRestOffset: shared shapes attached to actors are not writable.");
495
496 mShape.setRestOffset(restOffset);
497}
498
499PxReal NpShape::getRestOffset() const
500{

Callers 3

initPhysicsFunction · 0.80
PxCloneShapeFunction · 0.80
setPxShape_RestOffsetFunction · 0.80

Calls 2

PxIsFiniteFunction · 0.85
getContactOffsetMethod · 0.45

Tested by

no test coverage detected