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

Method detachAll

deps/physx/physx/source/physx/src/NpShapeManager.cpp:170–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void NpShapeManager::detachAll(NpScene* scene, const PxRigidActor& actor)
171{
172 // assumes all SQ data has been released, which is currently the responsbility of the owning actor
173 const PxU32 nbShapes = getNbShapes();
174 NpShape*const *shapes = getShapes();
175
176 if(scene)
177 teardownAllSceneQuery(scene->getSceneQueryManagerFast(), actor);
178
179 // actor cleanup in Scb/Sc will remove any outstanding references corresponding to sim objects, so we don't need to do that here.
180 for(PxU32 i=0;i<nbShapes;i++)
181 shapes[i]->onActorDetach();
182
183 PtrTableStorageManager& sm = NpFactory::getInstance().getPtrTableStorageManager();
184
185 mShapes.clear(sm);
186 mSceneQueryData.clear(sm);
187}
188
189PxU32 NpShapeManager::getShapes(PxShape** buffer, PxU32 bufferSize, PxU32 startIndex) const
190{

Callers 1

releaseMethod · 0.80

Calls 3

getNbShapesFunction · 0.85
onActorDetachMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected