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

Method detachAll

physx/source/physx/src/NpShapeManager.cpp:148–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void NpShapeManager::detachAll(NpScene* scene, const PxRigidActor& actor)
149{
150 // assumes all SQ data has been released, which is currently the responsbility of the owning actor
151 const PxU32 nbShapes = getNbShapes();
152 NpShape*const *shapes = getShapes();
153
154 if(scene)
155 teardownAllSceneQuery(scene->getSceneQueryManagerFast(), actor);
156
157 // actor cleanup in Scb/Sc will remove any outstanding references corresponding to sim objects, so we don't need to do that here.
158 for(PxU32 i=0;i<nbShapes;i++)
159 shapes[i]->onActorDetach();
160
161 PtrTableStorageManager& sm = NpFactory::getInstance().getPtrTableStorageManager();
162
163 mShapes.clear(sm);
164 mSceneQueryData.clear(sm);
165}
166
167PxU32 NpShapeManager::getShapes(PxShape** buffer, PxU32 bufferSize, PxU32 startIndex) const
168{

Callers 1

releaseMethod · 0.80

Calls 3

getNbShapesFunction · 0.85
onActorDetachMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected