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

Method invalidate

physx/source/scenequery/src/SqPruningStructure.cpp:401–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399//////////////////////////////////////////////////////////////////////////
400
401void PruningStructure::invalidate(PxActor* actor)
402{
403 PX_ASSERT(actor);
404
405 // remove actor from the actor list to avoid mem corruption
406 // this slow, but should be called only with error msg send to user about invalid behavior
407 for (PxU32 i = 0; i < mNbActors; i++)
408 {
409 if(mActors[i] == actor)
410 {
411 // set pruning structure to NULL and remove the actor from the list
412 PxType type = mActors[i]->getConcreteType();
413 if (type == PxConcreteType::eRIGID_STATIC)
414 {
415 static_cast<NpRigidStatic*>(mActors[i])->getShapeManager().setPruningStructure(NULL);
416 }
417 else if (type == PxConcreteType::eRIGID_DYNAMIC)
418 {
419 static_cast<NpRigidDynamic*>(mActors[i])->getShapeManager().setPruningStructure(NULL);
420 }
421
422 mActors[i] = mActors[mNbActors--];
423 break;
424 }
425 }
426
427 mValid = false;
428}
429

Callers 11

updateSQMethod · 0.45
setFlagsInternalMethod · 0.45
setGlobalPoseMethod · 0.45
releaseMethod · 0.45
releaseShapeMethod · 0.45
attachShapeMethod · 0.45
detachShapeMethod · 0.45
setGlobalPoseMethod · 0.45
removeObjectsMethod · 0.45
commitMethod · 0.45
buildStepMethod · 0.45

Calls 2

getShapeManagerMethod · 0.80
getConcreteTypeMethod · 0.45

Tested by

no test coverage detected