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

Function NpDestroyConstraint

deps/physx/physx/source/physx/src/NpFactory.cpp:823–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

821}
822
823static void NpDestroyConstraint(Scb::Constraint& scb)
824{
825 const size_t offset = size_t(&(reinterpret_cast<NpConstraint*>(0)->getScbConstraint()));
826 NpConstraint* np = reinterpret_cast<NpConstraint*>(reinterpret_cast<char*>(&scb)-offset);
827 if(np->getBaseFlags() & PxBaseFlag::eOWNS_MEMORY)
828 NpFactory::getInstance().releaseConstraintToPool(*np);
829 else
830 np->~NpConstraint();
831 NpPhysics::getInstance().notifyDeletionListenersMemRelease(np, NULL);
832}
833
834namespace physx
835{

Callers 1

NpDestroyFunction · 0.85

Calls 4

getBaseFlagsMethod · 0.80
~NpConstraintMethod · 0.80

Tested by

no test coverage detected