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

Method setupAllSceneQuery

physx/source/physx/src/NpShapeManager.cpp:232–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void NpShapeManager::setupAllSceneQuery(NpScene* scene, const PxRigidActor& actor, bool hasPrunerStructure, const PxBounds3* bounds, const Gu::BVHStructure* bvhStructure)
233{
234 PX_ASSERT(scene); // shouldn't get here unless we're in a scene
235 SceneQueryManager& sqManager = scene->getSceneQueryManagerFast();
236
237 const PxU32 nbShapes = getNbShapes();
238 NpShape*const *shapes = getShapes();
239
240 // if BVH structure was provided, we add shapes into compound pruner
241 if(bvhStructure)
242 {
243 addBVHStructureShapes(sqManager, actor, bvhStructure);
244 }
245 else
246 {
247 const PxType actorType = actor.getConcreteType();
248 const bool isDynamic = actorType == PxConcreteType::eRIGID_DYNAMIC || actorType == PxConcreteType::eARTICULATION_LINK;
249
250 for(PxU32 i=0;i<nbShapes;i++)
251 {
252 if(isSceneQuery(*shapes[i]))
253 addPrunerShape(sqManager, i, *shapes[i], actor, isDynamic, bounds ? bounds + i : NULL, hasPrunerStructure);
254 }
255 }
256}
257
258void NpShapeManager::teardownAllSceneQuery(SceneQueryManager& sqManager, const PxRigidActor& actor)
259{

Callers 2

addActorTFunction · 0.80

Calls 3

getNbShapesFunction · 0.85
isSceneQueryFunction · 0.85
getConcreteTypeMethod · 0.45

Tested by

no test coverage detected