|
virtual PxFilterFlags | pairFound (PxU32 pairID, PxFilterObjectAttributes attributes0, PxFilterData filterData0, const PxActor *a0, const PxShape *s0, PxFilterObjectAttributes attributes1, PxFilterData filterData1, const PxActor *a1, const PxShape *s1, PxPairFlags &pairFlags)=0 |
| Filter method to specify how a pair of potentially colliding objects should be processed. More...
|
|
virtual void | pairLost (PxU32 pairID, PxFilterObjectAttributes attributes0, PxFilterData filterData0, PxFilterObjectAttributes attributes1, PxFilterData filterData1, bool objectRemoved)=0 |
| Callback to inform that a tracked collision pair is gone. More...
|
|
virtual bool | statusChange (PxU32 &pairID, PxPairFlags &pairFlags, PxFilterFlags &filterFlags)=0 |
| Callback to give the opportunity to change the filter state of a tracked collision pair. More...
|
|
Filter callback to specify handling of collision pairs.
This class is provided to implement more complex and flexible collision pair filtering logic, for instance, taking the state of the user application into account. Filter callbacks also give the user the opportunity to track collision pairs and update their filter state.
You might want to check the documentation on PxSimulationFilterShader as well since it includes more general information on filtering.
- Note
- SDK state should not be modified from within the callbacks. In particular objects should not be created or destroyed. If state modification is needed then the changes should be stored to a buffer and performed after the simulation step.
-
The callbacks may execute in user threads or simulation threads, possibly simultaneously. The corresponding objects may have been deleted by the application earlier in the frame. It is the application's responsibility to prevent race conditions arising from using the SDK API in the callback while an application thread is making write calls to the scene, and to ensure that the callbacks are thread-safe. Return values which depend on when the callback is called during the frame will introduce nondeterminism into the simulation.
- See also
- PxSceneDesc.filterCallback PxSimulationFilterShader