Batched queries object. This is used to perform several queries at the same time.
More...
#include <PxBatchQuery.h>
|
virtual void | execute ()=0 |
| Executes batched queries. More...
|
|
virtual PxBatchQueryPreFilterShader | getPreFilterShader () const =0 |
| Gets the prefilter shader in use for this scene query. More...
|
|
virtual PxBatchQueryPostFilterShader | getPostFilterShader () const =0 |
| Gets the postfilter shader in use for this scene query. More...
|
|
virtual const void * | getFilterShaderData () const =0 |
| Gets the shared global filter data in use for this scene query. More...
|
|
virtual PxU32 | getFilterShaderDataSize () const =0 |
| Gets the size of the shared global filter data (PxSceneDesc.filterShaderData) More...
|
|
virtual void | setUserMemory (const PxBatchQueryMemory &)=0 |
| Sets new user memory pointers. More...
|
|
virtual const PxBatchQueryMemory & | getUserMemory ()=0 |
| Gets the user memory pointers. More...
|
|
virtual void | release ()=0 |
| Releases PxBatchQuery from PxScene. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
Batched queries object. This is used to perform several queries at the same time.
- Deprecated:
- The batched query feature has been deprecated in PhysX version 3.4
- See also
- PxScene, PxScene.createBatchQuery
◆ ~PxBatchQuery()
virtual PxBatchQuery::~PxBatchQuery |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ execute()
virtual void PxBatchQuery::execute |
( |
| ) |
|
|
pure virtual |
Executes batched queries.
◆ getFilterShaderData()
virtual const void* PxBatchQuery::getFilterShaderData |
( |
| ) |
const |
|
pure virtual |
◆ getFilterShaderDataSize()
virtual PxU32 PxBatchQuery::getFilterShaderDataSize |
( |
| ) |
const |
|
pure virtual |
◆ getPostFilterShader()
Gets the postfilter shader in use for this scene query.
- Returns
- Postfilter shader.
- See also
- PxBatchQueryDesc.preFilterShade PxBatchQueryPostFilterShader
◆ getPreFilterShader()
Gets the prefilter shader in use for this scene query.
- Returns
- Prefilter shader.
- See also
- PxBatchQueryDesc.preFilterShade PxBatchQueryPreFilterShader
◆ getUserMemory()
◆ overlap()
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.
- Note
- Filtering: returning eBLOCK from user filter for overlap queries will cause a warning (see PxQueryHitType).
- Parameters
-
[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. |
- Note
- eBLOCK should not be returned from user filters for overlap(). Doing so will result in undefined behavior, and a warning will be issued.
-
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).
- See also
- PxQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader
◆ raycast()
Performs a raycast against objects in the scene, returns results in PxBatchQueryMemory::userRaycastResultBuffer specified at PxBatchQuery creation time or via PxBatchQuery::setUserMemory call.
- Note
- Touching hits are not ordered.
-
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.
- Parameters
-
[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. |
- Note
- 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).
- See also
- PxQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxRaycastHit PxScene::raycast
◆ release()
virtual void PxBatchQuery::release |
( |
| ) |
|
|
pure virtual |
◆ setUserMemory()
Sets new user memory pointers.
It is not possible to change the memory during query execute.
- See also
- PxBatchQueryDesc
◆ sweep()
Performs a sweep test against objects in the scene, returns results in PxBatchQueryMemory::userSweepResultBuffer specified at PxBatchQuery creation time or via PxBatchQuery::setUserMemory call.
- Note
- Touching hits are not ordered.
-
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.
- Parameters
-
[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. |
- Note
- 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).
- See also
- PxHitFlags PxQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxSweepHit
The documentation for this class was generated from the following file: