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

Method onRelease

physx/samples/samplebase/PhysXSample.cpp:288–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286//////////////////////////////////////////////////////////////////////////
287
288void PhysXSample::onRelease(const PxBase* observed, void* userData, PxDeletionEventFlag::Enum deletionEvent)
289{
290 PX_UNUSED(userData);
291 PX_UNUSED(deletionEvent);
292
293 if(observed->is<PxRigidActor>())
294 {
295 const PxRigidActor* actor = static_cast<const PxRigidActor*>(observed);
296
297 removeRenderActorsFromPhysicsActor(actor);
298
299 std::vector<PxRigidActor*>::iterator actorIter = std::find(mPhysicsActors.begin(), mPhysicsActors.end(), actor);
300 if(actorIter != mPhysicsActors.end())
301 {
302 mPhysicsActors.erase(actorIter);
303 }
304
305 }
306}
307
308///////////////////////////////////////////////////////////////////////////////
309

Callers

nothing calls this directly

Calls 4

PX_UNUSEDFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected