PxQueryFilterCallback Class Reference
[Scenequery]
Scene query filtering callbacks.
More...
#include <PxQueryFiltering.h>
Public Member Functions | |
virtual PxQueryHitType::Enum | preFilter (const PxFilterData &filterData, const PxShape *shape, const PxRigidActor *actor, PxHitFlags &queryFlags)=0 |
This filter callback is executed before the exact intersection test if PxQueryFlag::ePREFILTER flag was set. | |
virtual PxQueryHitType::Enum | postFilter (const PxFilterData &filterData, const PxQueryHit &hit)=0 |
This filter callback is executed if the exact intersection test returned true and PxQueryFlag::ePOSTFILTER flag was set. | |
virtual | ~PxQueryFilterCallback () |
virtual destructor |
Detailed Description
Scene query filtering callbacks.Custom filtering logic for scene query intersection candidates. If an intersection candidate object passes the data based filter (see PxQueryFilterData), filtering callbacks are executed if requested (see PxQueryFilterData.flags)
- If PxQueryFlag::ePREFILTER is set, the preFilter function runs before exact intersection tests. If this function returns PxQueryHitType::eTOUCH or PxQueryHitType::eBLOCK, exact testing is performed to determine the intersection location.
- If PxQueryFlag::ePREFILTER is not set, precise intersection testing is performed using the original query's filterData.flags.
- If PxQueryFlag::ePOSTFILTER is set, the postFilter function is called for each intersection to determine the touch/block status. This overrides any touch/block status previously returned from the preFilter function for this shape.
- See also:
- PxScene.raycast PxScene.sweep PxScene.overlap PxQueryFlags PxHitFlags
Constructor & Destructor Documentation
virtual PxQueryFilterCallback::~PxQueryFilterCallback | ( | ) | [inline, virtual] |
virtual destructor
Member Function Documentation
virtual PxQueryHitType::Enum PxQueryFilterCallback::postFilter | ( | const PxFilterData & | filterData, | |
const PxQueryHit & | hit | |||
) | [pure virtual] |
This filter callback is executed if the exact intersection test returned true and PxQueryFlag::ePOSTFILTER flag was set.
- Parameters:
-
[in] filterData custom filter data of the query [in] hit Scene query hit information. faceIndex member is not valid for overlap queries. For sweep and raycast queries the hit information can be cast to PxSweepHit and PxRaycastHit respectively.
- Returns:
- the updated hit type for this hit (see PxQueryHitType)
virtual PxQueryHitType::Enum PxQueryFilterCallback::preFilter | ( | const PxFilterData & | filterData, | |
const PxShape * | shape, | |||
const PxRigidActor * | actor, | |||
PxHitFlags & | queryFlags | |||
) | [pure virtual] |
This filter callback is executed before the exact intersection test if PxQueryFlag::ePREFILTER flag was set.
- Parameters:
-
[in] filterData custom filter data specified as the query's filterData.data parameter. [in] shape A shape that has not yet passed the exact intersection test. [in] actor The shape's actor. [in,out] queryFlags scene query flags from the query's function call (only flags from PxHitFlag::eMODIFIABLE_FLAGS bitmask can be modified)
- Returns:
- the updated type for this hit (see PxQueryHitType)
The documentation for this class was generated from the following file:
Copyright © 2008-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com