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

Function setupFiltering

physx/samples/samplesubmarine/SampleSubmarine.cpp:285–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283///////////////////////////////////////////////////////////////////////////////
284
285void setupFiltering(PxRigidActor* actor, PxU32 filterGroup, PxU32 filterMask)
286{
287 PxFilterData filterData;
288 filterData.word0 = filterGroup; // word0 = own ID
289 filterData.word1 = filterMask; // word1 = ID mask to filter pairs that trigger a contact callback;
290 const PxU32 numShapes = actor->getNbShapes();
291 PxShape** shapes = (PxShape**)SAMPLE_ALLOC(sizeof(PxShape*)*numShapes);
292 actor->getShapes(shapes, numShapes);
293 for(PxU32 i = 0; i < numShapes; i++)
294 {
295 PxShape* shape = shapes[i];
296 shape->setSimulationFilterData(filterData);
297 }
298 SAMPLE_FREE(shapes);
299}
300
301///////////////////////////////////////////////////////////////////////////////
302

Callers 6

loadMethod · 0.85
createMethod · 0.85
onInitMethod · 0.85
createSubmarineMethod · 0.85
createSeamineMethod · 0.85
onTickPreRenderMethod · 0.85

Calls 3

getNbShapesMethod · 0.45
getShapesMethod · 0.45

Tested by

no test coverage detected