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

Method setContactOffset

physx/source/physx/src/NpShape.cpp:471–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471void NpShape::setContactOffset(PxReal contactOffset)
472{
473 NP_WRITE_CHECK(getOwnerScene());
474
475 PX_CHECK_AND_RETURN(PxIsFinite(contactOffset), "PxShape::setContactOffset: invalid float");
476 PX_CHECK_AND_RETURN((contactOffset >= 0.0f && contactOffset > mShape.getRestOffset()), "PxShape::setContactOffset: contactOffset should be positive, and greater than restOffset!");
477 PX_CHECK_AND_RETURN(isWritable(), "PxShape::setContactOffset: shared shapes attached to actors are not writable.");
478
479 mShape.setContactOffset(contactOffset);
480}
481
482PxReal NpShape::getContactOffset() const
483{

Callers 4

initPhysicsFunction · 0.45
PxCloneShapeFunction · 0.45
onContactOffsetChangeMethod · 0.45
setPxShape_ContactOffsetFunction · 0.45

Calls 2

PxIsFiniteFunction · 0.85
getRestOffsetMethod · 0.80

Tested by

no test coverage detected