PxBatchQuery Class Reference
[Scenequery]
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. | |
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 PxClientID | getOwnerClient () const =0 |
Retrieves the client specified with PxBatchQueryDesc::ownerClient at creation time. | |
virtual void | release ()=0 |
Releases PxBatchQuery from PxSceneQueryManager. | |
virtual void | raycastAny (const PxVec3 &origin, const PxVec3 &unitDir, PxReal distance=PX_MAX_F32, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), void *userData=NULL, const PxSceneQueryCache *cache=NULL) const =0 |
Returns whether any object of type objectsType is hit along the ray. | |
virtual void | raycastSingle (const PxVec3 &origin, const PxVec3 &unitDir, PxReal distance=PX_MAX_F32, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFlags outputFlags=PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV, void *userData=NULL, const PxSceneQueryCache *cache=NULL) const =0 |
Returns the first object of type objectsType that is hit along the ray. | |
virtual void | raycastMultiple (const PxVec3 &origin, const PxVec3 &unitDir, PxReal distance=PX_MAX_F32, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFlags outputFlags=PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV, void *userData=NULL, const PxSceneQueryCache *cache=NULL) const =0 |
Find all objects of type objectsType which a ray intersects. | |
virtual void | overlapMultiple (const PxGeometry &geometry, const PxTransform &pose, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), void *userData=NULL, const PxSceneQueryCache *cache=NULL, PxU32 maxShapes=0) const =0 |
Test overlap between a geometry and objects in the scene. Returns all objects of type objectsType which overlap the world-space sphere. | |
PX_INLINE void | overlapAny (const PxGeometry &geometry, const PxTransform &pose, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), void *userData=NULL, const PxSceneQueryCache *cache=NULL) |
Test returning, for a given geometry, any overlapping object in the scene. Returns any object of type objectsType which overlap the world-space sphere. | |
virtual void | sweepSingle (const PxGeometry &geometry, const PxTransform &pose, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryFlags outputFlags=PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), void *userData=NULL, const PxSceneQueryCache *cache=NULL) const =0 |
Sweeps returning a single result. | |
virtual void | linearCompoundGeometrySweepSingle (const PxGeometry **geometryList, const PxTransform *poseList, const PxFilterData *filterDataList, PxU32 geometryCount, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryFilterFlags filterFlags, PxSceneQueryFlags outputFlags=PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV, void *userData=NULL, const PxSweepCache *cache=NULL) const =0 |
Performs a linear sweep through space with a compound of geometry objects. | |
virtual void | sweepMultiple (const PxGeometry &geometry, const PxTransform &pose, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryFlags outputFlags=PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), void *userData=NULL, const PxSceneQueryCache *cache=NULL) const =0 |
Sweep returning multiple results. | |
virtual void | linearCompoundGeometrySweepMultiple (const PxGeometry **geometryList, const PxTransform *poseList, const PxFilterData *filterDataList, PxU32 geometryCount, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryFilterFlags filterFlags, PxSceneQueryFlags outputFlags=PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV, void *userData=NULL, const PxSweepCache *cache=NULL) const =0 |
Performs a linear sweep through space with a compound of geometry objects, returning all overlaps. | |
Protected Member Functions | |
virtual | ~PxBatchQuery () |
Detailed Description
Batched queries object. This is used to perform several queries at the same time.
- See also:
- PxSceneQueryManager
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.
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].
virtual 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 void PxBatchQuery::linearCompoundGeometrySweepMultiple | ( | const PxGeometry ** | geometryList, | |
const PxTransform * | poseList, | |||
const PxFilterData * | filterDataList, | |||
PxU32 | geometryCount, | |||
const PxVec3 & | unitDir, | |||
const PxReal | distance, | |||
PxSceneQueryFilterFlags | filterFlags, | |||
PxSceneQueryFlags | outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV , |
|||
void * | userData = NULL , |
|||
const PxSweepCache * | cache = NULL | |||
) | const [pure virtual] |
Performs a linear sweep through space with a compound of geometry objects, returning all overlaps.
- Note:
- Supported geometries are: PxBoxGeometry, PxSphereGeometry, PxCapsuleGeometry, PxConvexMeshGeometry.
If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
- Parameters:
-
[in] geometryList List of pointers to the geometry objects to sweep [in] poseList The world pose for each geometry object [in] filterDataList Filter data for each geometry object. NULL, if no filtering should be done [in] geometryCount Number of geometry objects specified [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] filterFlags Filter logic settings. See PxSceneQueryFilterFlag. [in] outputFlags Allows the user to specify which field of PxSweepHit they are interested in. See PxSceneQueryFlag [in] userData user can assign this to a value of his choice, usually to identify this particular query [in] cache Sweep cache to use with the query
- See also:
- PxSceneQueryFilterFlag PxFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxSceneQueryReport PxSweepHit linearCompoundGeometrySweepSingle
virtual void PxBatchQuery::linearCompoundGeometrySweepSingle | ( | const PxGeometry ** | geometryList, | |
const PxTransform * | poseList, | |||
const PxFilterData * | filterDataList, | |||
PxU32 | geometryCount, | |||
const PxVec3 & | unitDir, | |||
const PxReal | distance, | |||
PxSceneQueryFilterFlags | filterFlags, | |||
PxSceneQueryFlags | outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV , |
|||
void * | userData = NULL , |
|||
const PxSweepCache * | cache = NULL | |||
) | const [pure virtual] |
Performs a linear sweep through space with a compound of geometry objects.
- Note:
- Supported geometries are: PxBoxGeometry, PxSphereGeometry, PxCapsuleGeometry, PxConvexMeshGeometry.
If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
- Parameters:
-
[in] geometryList List of pointers to the geometry objects to sweep [in] poseList The world pose for each geometry object [in] filterDataList Filter data for each geometry object. NULL, if no filtering should be done [in] geometryCount Number of geometry objects specified [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] filterFlags Filter logic settings. See PxSceneQueryFilterFlag. [in] outputFlags Allows the user to specify which field of PxSweepHit they are interested in. See PxSceneQueryFlag [in] userData user can assign this to a value of his choice, usually to identify this particular query [in] cache Sweep cache to use with the query
PX_INLINE void PxBatchQuery::overlapAny | ( | const PxGeometry & | geometry, | |
const PxTransform & | pose, | |||
const PxSceneQueryFilterData & | filterData = PxSceneQueryFilterData() , |
|||
void * | userData = NULL , |
|||
const PxSceneQueryCache * | cache = NULL | |||
) | [inline] |
Test returning, for a given geometry, any overlapping object in the scene. Returns any object of type objectsType which overlap the world-space sphere.
- Note:
- Filtering: Overlap tests do not distinguish between touching and blocking hit types (see PxSceneQueryHitType). Both get written to the hit buffer.
PxSceneQueryFilterFlag::eMESH_MULTIPLE and PxSceneQueryFilterFlag::eBACKFACE have no effect in this case
- Parameters:
-
[in] geometry Geometry of object to check for overlap (supported types are: box, sphere, capsule, convex). [in] pose Pose of the object. [in] filterData Filtering data and simple logic. See PxSceneQueryFilterData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader [in] userData user can assign this to a value of his choice, usually to identify this particular query [in] cache Cached hit shape (optional). Ray is tested against cached shape first then 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.
virtual void PxBatchQuery::overlapMultiple | ( | const PxGeometry & | geometry, | |
const PxTransform & | pose, | |||
const PxSceneQueryFilterData & | filterData = PxSceneQueryFilterData() , |
|||
void * | userData = NULL , |
|||
const PxSceneQueryCache * | cache = NULL , |
|||
PxU32 | maxShapes = 0 | |||
) | const [pure virtual] |
Test overlap between a geometry and objects in the scene. Returns all objects of type objectsType which overlap the world-space sphere.
- Note:
- Filtering: Overlap tests do not distinguish between touching and blocking hit types (see PxSceneQueryHitType). Both get written to the hit buffer.
PxSceneQueryFilterFlag::eMESH_MULTIPLE and PxSceneQueryFilterFlag::eBACKFACE have no effect in this case
- Parameters:
-
[in] geometry Geometry of object to check for overlap (supported types are: box, sphere, capsule, convex). [in] pose Pose of the object. [in] filterData Filtering data and simple logic. See PxSceneQueryFilterData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader [in] userData user can assign this to a value of his choice, usually to identify this particular query [in] cache Cached hit shape (optional). Ray is tested against cached shape first then 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. [in] maxShapes user-defined limit on number of reported shapes (0 to report all shapes)
virtual void PxBatchQuery::raycastAny | ( | const PxVec3 & | origin, | |
const PxVec3 & | unitDir, | |||
PxReal | distance = PX_MAX_F32 , |
|||
const PxSceneQueryFilterData & | filterData = PxSceneQueryFilterData() , |
|||
void * | userData = NULL , |
|||
const PxSceneQueryCache * | cache = NULL | |||
) | const [pure virtual] |
Returns whether any object of type objectsType is hit along the ray.
- Note:
- Make certain that the direction vector of the ray is normalized.
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] filterData filterData which is passed to the filer shader. See PxSceneQueryFilterData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader [in] userData user can assign this to a value of his choice, usually to identify this particular query [in] cache Cached hit shape (optional). Ray 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.
virtual void PxBatchQuery::raycastMultiple | ( | const PxVec3 & | origin, | |
const PxVec3 & | unitDir, | |||
PxReal | distance = PX_MAX_F32 , |
|||
const PxSceneQueryFilterData & | filterData = PxSceneQueryFilterData() , |
|||
PxSceneQueryFlags | outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV , |
|||
void * | userData = NULL , |
|||
const PxSceneQueryCache * | cache = NULL | |||
) | const [pure virtual] |
Find all objects of type objectsType which a ray intersects.
hintFlags is a combination of PxSceneQueryFlag flags.
- Note:
- Make certain that the direction vector of the ray is normalized.
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] outputFlags Specifies which properties should be written to the hit information [in] filterData filterData which is passed to the filer shader. See PxSceneQueryFilterData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader [in] userData user can assign this to a value of his choice, usually to identify this particular query [in] cache Cached hit shape (optional). Ray is tested against cached shape first then 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.
virtual void PxBatchQuery::raycastSingle | ( | const PxVec3 & | origin, | |
const PxVec3 & | unitDir, | |||
PxReal | distance = PX_MAX_F32 , |
|||
const PxSceneQueryFilterData & | filterData = PxSceneQueryFilterData() , |
|||
PxSceneQueryFlags | outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV , |
|||
void * | userData = NULL , |
|||
const PxSceneQueryCache * | cache = NULL | |||
) | const [pure virtual] |
Returns the first object of type objectsType that is hit along the ray.
The world space intersection point, and the distance along the ray are also provided. hintFlags is a combination of PxSceneQueryFlag flags.
- Note:
- Make certain that the direction vector of the ray is normalized.
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] outputFlags Specifies which properties should be written to the hit information [in] filterData filterData which is passed to the filer shader. See PxSceneQueryFilterData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader [in] userData user can assign this to a value of his choice, usually to identify this particular query [in] cache Cached hit shape (optional). Ray is tested against cached shape first then 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.
virtual void PxBatchQuery::release | ( | ) | [pure virtual] |
virtual void PxBatchQuery::sweepMultiple | ( | const PxGeometry & | geometry, | |
const PxTransform & | pose, | |||
const PxVec3 & | unitDir, | |||
const PxReal | distance, | |||
PxSceneQueryFlags | outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV , |
|||
const PxSceneQueryFilterData & | filterData = PxSceneQueryFilterData() , |
|||
void * | userData = NULL , |
|||
const PxSceneQueryCache * | cache = NULL | |||
) | const [pure virtual] |
Sweep returning multiple results.
Find all rigid actors that get hit along the sweep. Each result contains data as specified by the outputFlags field.
- Note:
- Touching hits are not ordered.
If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
- 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] outputFlags Specifies which properties should be written to the hit information. [in] filterData Filtering data and simple logic. [in] cache Cached hit shape (optional). Ray is tested against cached shape first then 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. [in] userData user can assign this to a value of his choice, usually to identify this particular query
virtual void PxBatchQuery::sweepSingle | ( | const PxGeometry & | geometry, | |
const PxTransform & | pose, | |||
const PxVec3 & | unitDir, | |||
const PxReal | distance, | |||
PxSceneQueryFlags | outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV , |
|||
const PxSceneQueryFilterData & | filterData = PxSceneQueryFilterData() , |
|||
void * | userData = NULL , |
|||
const PxSceneQueryCache * | cache = NULL | |||
) | const [pure virtual] |
Sweeps returning a single result.
Returns the first rigid actor that is hit along the ray. Data for a blocking hit will be returned as specified by the outputFlags field. Touching hits will be ignored.
- Note:
- If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
- 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] outputFlags Specifies which properties should be written to the hit information. [in] filterData Filtering data and simple logic. [in] cache Cached hit shape (optional). Ray is tested against cached shape first then 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. [in] userData user can assign this to a value of his choice, usually to identify this particular query
The documentation for this class was generated from the following file:
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com