| 283 | /////////////////////////////////////////////////////////////////////////////// |
| 284 | |
| 285 | void 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 |
no test coverage detected