#include <PxBatchQuery.h>
Public Member Functions | |
virtual void | execute ()=0 |
Executes batched queries. | |
virtual PxBatchQueryPreFilterShader | getPreFilterShader () const =0 |
Gets the prefilter shader in use for this scene query. | |
virtual PxBatchQueryPostFilterShader | getPostFilterShader () const =0 |
Gets the postfilter shader in use for this scene query. | |
virtual const void * | getFilterShaderData () const =0 |
Gets the shared global filter data in use for this scene query. | |
virtual PxU32 | getFilterShaderDataSize () const =0 |
Gets the size of the shared global filter data (PxSceneDesc.filterShaderData). | |
virtual PX_DEPRECATED PxClientID | getOwnerClient () const =0 |
Retrieves the client specified with PxBatchQueryDesc::ownerClient at creation time. | |
virtual void | setUserMemory (const PxBatchQueryMemory &)=0 |
Sets new user memory pointers. | |
virtual const PxBatchQueryMemory & | getUserMemory ()=0 |
Gets the user memory pointers. | |
virtual void | release ()=0 |
Releases PxBatchQuery from PxScene. | |
virtual void | raycast (const PxVec3 &origin, const PxVec3 &unitDir, PxReal distance=PX_MAX_F32, PxU16 maxTouchHits=0, PxHitFlags hitFlags=PxHitFlag::eDEFAULT, const PxQueryFilterData &filterData=PxQueryFilterData(), void *userData=NULL, const PxQueryCache *cache=NULL)=0 |
Performs a raycast against objects in the scene, returns results in PxBatchQueryMemory::userRaycastResultBuffer specified at PxBatchQuery creation time or via PxBatchQuery::setUserMemory call. | |
virtual void | overlap (const PxGeometry &geometry, const PxTransform &pose, PxU16 maxTouchHits=0, const PxQueryFilterData &filterData=PxQueryFilterData(), void *userData=NULL, const PxQueryCache *cache=NULL)=0 |
Performs an overlap test of a given geometry against objects in the scene, returns results in PxBatchQueryMemory::userOverlapResultBuffer specified at PxBatchQuery creation time or via PxBatchQuery::setUserMemory call. | |
virtual void | sweep (const PxGeometry &geometry, const PxTransform &pose, const PxVec3 &unitDir, const PxReal distance, PxU16 maxTouchHits=0, PxHitFlags hitFlags=PxHitFlag::eDEFAULT, const PxQueryFilterData &filterData=PxQueryFilterData(), void *userData=NULL, const PxQueryCache *cache=NULL, const PxReal inflation=0.f)=0 |
Performs a sweep test against objects in the scene, returns results in PxBatchQueryMemory::userSweepResultBuffer specified at PxBatchQuery creation time or via PxBatchQuery::setUserMemory call. | |
Protected Member Functions | |
virtual | ~PxBatchQuery () |
virtual PxBatchQuery::~PxBatchQuery | ( | ) | [inline, protected, virtual] |
virtual void PxBatchQuery::execute | ( | ) | [pure virtual] |
Executes batched queries.
virtual const void* PxBatchQuery::getFilterShaderData | ( | ) | const [pure virtual] |
Gets the shared global filter data in use for this scene query.
virtual PxU32 PxBatchQuery::getFilterShaderDataSize | ( | ) | const [pure virtual] |
Gets the size of the shared global filter data (PxSceneDesc.filterShaderData).
virtual PX_DEPRECATED PxClientID PxBatchQuery::getOwnerClient | ( | ) | const [pure virtual] |
Retrieves the client specified with PxBatchQueryDesc::ownerClient at creation time.
It is not possible to change this value after creating the scene query.
virtual PxBatchQueryPostFilterShader PxBatchQuery::getPostFilterShader | ( | ) | const [pure virtual] |
Gets the postfilter shader in use for this scene query.
virtual PxBatchQueryPreFilterShader PxBatchQuery::getPreFilterShader | ( | ) | const [pure virtual] |
Gets the prefilter shader in use for this scene query.
virtual const PxBatchQueryMemory& PxBatchQuery::getUserMemory | ( | ) | [pure virtual] |
virtual void PxBatchQuery::overlap | ( | const PxGeometry & | geometry, | |
const PxTransform & | pose, | |||
PxU16 | maxTouchHits = 0 , |
|||
const PxQueryFilterData & | filterData = PxQueryFilterData() , |
|||
void * | userData = NULL , |
|||
const PxQueryCache * | cache = NULL | |||
) | [pure virtual] |
Performs an overlap test of a given geometry against objects in the scene, returns results in PxBatchQueryMemory::userOverlapResultBuffer specified at PxBatchQuery creation time or via PxBatchQuery::setUserMemory call.
[in] | geometry | Geometry of object to check for overlap (supported types are: box, sphere, capsule, convex). |
[in] | pose | Pose of the object. |
[in] | maxTouchHits | Maximum number of hits to record in the touch buffer for this query. Default=0 reports a single blocking hit. If maxTouchHits is set to 0 all hits are treated as blocking by default. |
[in] | filterData | Filtering data and simple logic. See PxQueryFilterData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader |
[in] | userData | User can pass any value in this argument, usually to identify this particular query |
[in] | cache | Cached hit shape (optional). Query is tested against cached shape first. If no hit is found the ray gets queried against the scene. Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit. Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking. |
If the PxQueryFlag::eNO_BLOCK flag is set, the eBLOCK will instead be automatically converted to an eTOUCH and the warning suppressed.
This query call writes to a list associated with the query object and is NOT thread safe (for performance reasons there is no lock and overlapping writes from different threads may result in undefined behavior).
virtual void PxBatchQuery::raycast | ( | const PxVec3 & | origin, | |
const PxVec3 & | unitDir, | |||
PxReal | distance = PX_MAX_F32 , |
|||
PxU16 | maxTouchHits = 0 , |
|||
PxHitFlags | hitFlags = PxHitFlag::eDEFAULT , |
|||
const PxQueryFilterData & | filterData = PxQueryFilterData() , |
|||
void * | userData = NULL , |
|||
const PxQueryCache * | cache = NULL | |||
) | [pure virtual] |
Performs a raycast against objects in the scene, returns results in PxBatchQueryMemory::userRaycastResultBuffer specified at PxBatchQuery creation time or via PxBatchQuery::setUserMemory call.
Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
[in] | origin | Origin of the ray. |
[in] | unitDir | Normalized direction of the ray. |
[in] | distance | Length of the ray. Needs to be larger than 0. |
[in] | maxTouchHits | Maximum number of hits to record in the touch buffer for this query. Default=0 reports a single blocking hit. If maxTouchHits is set to 0 all hits are treated as blocking by default. |
[in] | hitFlags | Specifies which properties per hit should be computed and returned in hit array and blocking hit. |
[in] | filterData | Filtering data passed to the filer shader. See PxQueryFilterData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader |
[in] | userData | User can pass any value in this argument, usually to identify this particular query |
[in] | cache | Cached hit shape (optional). Query is tested against cached shape first. If no hit is found the ray gets queried against the scene. Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit. Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking. |
virtual void PxBatchQuery::release | ( | ) | [pure virtual] |
virtual void PxBatchQuery::setUserMemory | ( | const PxBatchQueryMemory & | ) | [pure virtual] |
Sets new user memory pointers.
It is not possible to change the memory during query execute.
virtual void PxBatchQuery::sweep | ( | const PxGeometry & | geometry, | |
const PxTransform & | pose, | |||
const PxVec3 & | unitDir, | |||
const PxReal | distance, | |||
PxU16 | maxTouchHits = 0 , |
|||
PxHitFlags | hitFlags = PxHitFlag::eDEFAULT , |
|||
const PxQueryFilterData & | filterData = PxQueryFilterData() , |
|||
void * | userData = NULL , |
|||
const PxQueryCache * | cache = NULL , |
|||
const PxReal | inflation = 0.f | |||
) | [pure virtual] |
Performs a sweep test against objects in the scene, returns results in PxBatchQueryMemory::userSweepResultBuffer specified at PxBatchQuery creation time or via PxBatchQuery::setUserMemory call.
If a shape from the scene is already overlapping with the query shape in its starting position, the hit is returned unless eASSUME_NO_INITIAL_OVERLAP was specified.
[in] | geometry | Geometry of object to sweep (supported types are: box, sphere, capsule, convex). |
[in] | pose | Pose of the sweep object. |
[in] | unitDir | Normalized direction of the sweep. |
[in] | distance | Sweep distance. Needs to be larger than 0. Will be clamped to PX_MAX_SWEEP_DISTANCE. |
[in] | maxTouchHits | Maximum number of hits to record in the touch buffer for this query. Default=0 reports a single blocking hit. If maxTouchHits is set to 0 all hits are treated as blocking by default. |
[in] | hitFlags | Specifies which properties per hit should be computed and returned in hit array and blocking hit. |
[in] | filterData | Filtering data and simple logic. See PxQueryFilterData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader |
[in] | userData | User can pass any value in this argument, usually to identify this particular query |
[in] | cache | Cached hit shape (optional). Query is tested against cached shape first. If no hit is found the ray gets queried against the scene. Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit. Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking. |
[in] | inflation | This parameter creates a skin around the swept geometry which increases its extents for sweeping. The sweep will register a hit as soon as the skin touches a shape, and will return the corresponding distance and normal. Note: ePRECISE_SWEEP doesn't support inflation. Therefore the sweep will be performed with zero inflation. |