Batched queries object. This is used to perform several queries at the same time. More...
#include <PxBatchQuery.h>
Public Member Functions | |
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 PxClientID | getOwnerClient () const =0 |
Retrieves the client specified with PxBatchQueryDesc::ownerClient at creation time. 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 | setRunOnSpu (bool runOnSpu)=0 |
PS3 only. Enables or disables SPU execution for this query. More... | |
virtual bool | getRunOnSpu ()=0 |
PS3 only. Returns true if this query should run on SPU. More... | |
virtual void | raycast (const PxVec3 &origin, const PxVec3 &unitDir, PxReal distance=PX_MAX_F32, PxU16 maxTouchHits=0, PxHitFlags hitFlags=PxHitFlag::ePOSITION|PxHitFlag::eNORMAL|PxHitFlag::eDISTANCE, 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::ePOSITION|PxHitFlag::eNORMAL|PxHitFlag::eDISTANCE, 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... | |
Protected Member Functions | |
virtual | ~PxBatchQuery () |
Batched queries object. This is used to perform several queries at the same time.
|
inlineprotectedvirtual |
|
pure virtual |
Executes batched queries.
|
pure virtual |
Gets the shared global filter data in use for this scene query.
|
pure virtual |
Gets the size of the shared global filter data (PxSceneDesc.filterShaderData)
|
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.
|
pure virtual |
Gets the postfilter shader in use for this scene query.
|
pure virtual |
Gets the prefilter shader in use for this scene query.
|
pure virtual |
PS3 only. Returns true if this query should run on SPU.
|
pure virtual |
Gets the user memory pointers.
|
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. |
|
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.
[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. |
|
pure virtual |
Releases PxBatchQuery from PxScene.
|
pure virtual |
PS3 only. Enables or disables SPU execution for this query.
|
pure virtual |
Sets new user memory pointers.
It is not possible to change the memory during query execute.
|
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.
[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. |