PxCustomSceneQuerySystemAdapter

Defined in include/extensions/PxCustomSceneQuerySystem.h

class PxCustomSceneQuerySystemAdapter

An adapter class to customize the object-to-pruner mapping.

In the regular PhysX code static shapes went to the static pruner, and dynamic shapes went to the dynamic pruner.

This class is a replacement for this mapping when N user-defined pruners are involved.

Public Functions

inline PxCustomSceneQuerySystemAdapter()
inline virtual ~PxCustomSceneQuerySystemAdapter()
virtual PxU32 getPrunerIndex(const PxRigidActor &actor, const PxShape &shape) const = 0

Gets a pruner index for an actor/shape.

This user-defined function tells the system in which pruner a given actor/shape should go.

Note

The returned index must be valid, i.e. it must have been previously returned to users by PxCustomSceneQuerySystem::addPruner.

Parameters
  • actor[in] The actor

  • shape[in] The shape

Returns

A pruner index for this actor/shape.

virtual bool processPruner(PxU32 prunerIndex, const PxQueryThreadContext *context, const PxQueryFilterData &filterData, PxQueryFilterCallback *filterCall) const = 0

Pruner filtering callback.

This will be called for each query to validate whether it should process a given pruner.

Parameters
  • prunerIndex[in] The index of currently processed pruner

  • context[in] The query context

  • filterData[in] The query’s filter data

  • filterCall[in] The query’s filter callback

Returns

True to process the pruner, false to skip it entirely