NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxBatchQuery Class Reference

NVIDIA PhysX SDK 3.4 API

PxBatchQuery Class Reference
[Scenequery]

Batched queries object. This is used to perform several queries at the same time. More...

#include <PxBatchQuery.h>

List of all members.


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 PxBatchQueryMemorygetUserMemory ()=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 ()

Detailed Description

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

Constructor & Destructor Documentation

virtual PxBatchQuery::~PxBatchQuery (  )  [inline, protected, virtual]


Member Function Documentation

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.

Returns:
Shared filter data for filter shader.
See also:
getFilterShaderDataSize() PxBatchQueryDesc.filterShaderData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader

virtual PxU32 PxBatchQuery::getFilterShaderDataSize (  )  const [pure virtual]

Gets the size of the shared global filter data (PxSceneDesc.filterShaderData).

Returns:
Size of shared filter data [bytes].
See also:
getFilterShaderData() PxBatchQueryDesc.filterShaderDataSize PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader

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.

See also:
PxBatchQueryDesc::ownerClient

virtual PxBatchQueryPostFilterShader PxBatchQuery::getPostFilterShader (  )  const [pure virtual]

Gets the postfilter shader in use for this scene query.

Returns:
Postfilter shader.
See also:
PxBatchQueryDesc.preFilterShade PxBatchQueryPostFilterShader

virtual PxBatchQueryPreFilterShader PxBatchQuery::getPreFilterShader (  )  const [pure virtual]

Gets the prefilter shader in use for this scene query.

Returns:
Prefilter shader.
See also:
PxBatchQueryDesc.preFilterShade PxBatchQueryPreFilterShader

virtual const PxBatchQueryMemory& PxBatchQuery::getUserMemory (  )  [pure virtual]

Gets the user memory pointers.

See also:
PxBatchQueryDesc

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.

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

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.

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

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.

See also:
PxBatchQueryDesc

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.

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:



Copyright © 2008-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com