RavEngine
Loading...
Searching...
No Matches
ExtBatchQuery Class Reference
Inheritance diagram for ExtBatchQuery:
[legend]
Collaboration diagram for ExtBatchQuery:
[legend]

Public Member Functions

 ExtBatchQuery (const PxScene &scene, PxQueryFilterCallback *queryFilterCallback, PxRaycastBuffer *raycastBuffers, Raycast *raycastQueries, const PxU32 maxNbRaycasts, PxRaycastHit *raycastTouches, const PxU32 maxNbRaycastTouches, PxSweepBuffer *sweepBuffers, Sweep *sweepQueries, const PxU32 maxNbSweeps, PxSweepHit *sweepTouches, const PxU32 maxNbSweepTouches, PxOverlapBuffer *overlapBuffers, Overlap *overlapQueries, const PxU32 maxNbOverlaps, PxOverlapHit *overlapTouches, const PxU32 maxNbOverlapTouches)
 
virtual void release ()
 
virtual PxRaycastBuffer * raycast (const PxVec3 &origin, const PxVec3 &unitDir, const PxReal distance, const PxU16 maxNbTouches, PxHitFlags hitFlags=PxHitFlags(PxHitFlag::eDEFAULT), const PxQueryFilterData &filterData=PxQueryFilterData(), const PxQueryCache *cache=NULL)
 Performs a raycast against objects in the scene.
 
virtual PxSweepBuffer * sweep (const PxGeometry &geometry, const PxTransform &pose, const PxVec3 &unitDir, const PxReal distance, const PxU16 maxNbTouches, PxHitFlags hitFlags=PxHitFlags(PxHitFlag::eDEFAULT), const PxQueryFilterData &filterData=PxQueryFilterData(), const PxQueryCache *cache=NULL, const PxReal inflation=0.f)
 Performs a sweep test against objects in the scene.
 
virtual PxOverlapBuffer * overlap (const PxGeometry &geometry, const PxTransform &pose, PxU16 maxNbTouches=0, const PxQueryFilterData &filterData=PxQueryFilterData(), const PxQueryCache *cache=NULL)
 Performs an overlap test of a given geometry against objects in the scene.
 
virtual void execute ()
 

Member Function Documentation

◆ execute()

void ExtBatchQuery::execute ( )
virtual

◆ overlap()

PxOverlapBuffer * ExtBatchQuery::overlap ( const PxGeometry &  geometry,
const PxTransform &  pose,
PxU16  maxNbTouches = 0,
const PxQueryFilterData &  filterData = PxQueryFilterData(),
const PxQueryCache *  cache = NULL 
)
virtual

Performs an overlap test of a given geometry against objects in the scene.

Note
Filtering: returning eBLOCK from user filter for overlap queries will cause a warning (see #PxQueryHitType).
Parameters
[in]geometryGeometry of object to check for overlap (supported types are: box, sphere, capsule, convex).
[in]posePose of the object.
[in]maxNbTouchesMaximum 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]filterDataFiltering data and simple logic. See #PxQueryFilterData #PxQueryFilterCallback
[in]cacheCached 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).
Returns
Returns a PxOverlapBuffer pointer that will store the result of the query after execute() is completed. This will point either to an element of the buffer allocated on construction or to a user buffer passed to the constructor.
See also
PxCreateBatchQueryExt
PxQueryFilterData PxQueryFilterCallback

Implements physx::PxBatchQueryExt.

◆ raycast()

PxRaycastBuffer * ExtBatchQuery::raycast ( const PxVec3 &  origin,
const PxVec3 &  unitDir,
const PxReal  distance,
const PxU16  maxNbTouches,
PxHitFlags  hitFlags = PxHitFlags(PxHitFlag::eDEFAULT),
const PxQueryFilterData &  filterData = PxQueryFilterData(),
const PxQueryCache *  cache = NULL 
)
virtual

Performs a raycast against objects in the scene.

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]originOrigin of the ray.
[in]unitDirNormalized direction of the ray.
[in]distanceLength of the ray. Needs to be larger than 0.
[in]maxNbTouchesMaximum 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]hitFlagsSpecifies which properties per hit should be computed and returned in hit array and blocking hit.
[in]filterDataFiltering data passed to the filter shader. See #PxQueryFilterData #PxQueryFilterCallback
[in]cacheCached 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).
Returns
Returns a PxRaycastBuffer pointer that will store the result of the query after execute() is completed. This will point either to an element of the buffer allocated on construction or to a user buffer passed to the constructor.
See also
PxCreateBatchQueryExt
PxQueryFilterData PxQueryFilterCallback PxRaycastHit PxScene::raycast

Implements physx::PxBatchQueryExt.

◆ release()

void ExtBatchQuery::release ( )
virtual

◆ sweep()

PxSweepBuffer * ExtBatchQuery::sweep ( const PxGeometry &  geometry,
const PxTransform &  pose,
const PxVec3 &  unitDir,
const PxReal  distance,
const PxU16  maxNbTouches,
PxHitFlags  hitFlags = PxHitFlags(PxHitFlag::eDEFAULT),
const PxQueryFilterData &  filterData = PxQueryFilterData(),
const PxQueryCache *  cache = NULL,
const PxReal  inflation = 0.f 
)
virtual

Performs a sweep test against objects in the scene.

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]geometryGeometry of object to sweep (supported types are: box, sphere, capsule, convex).
[in]posePose of the sweep object.
[in]unitDirNormalized direction of the sweep.
[in]distanceSweep distance. Needs to be larger than 0. Will be clamped to PX_MAX_SWEEP_DISTANCE.
[in]maxNbTouchesMaximum 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]hitFlagsSpecifies which properties per hit should be computed and returned in hit array and blocking hit.
[in]filterDataFiltering data and simple logic. See #PxQueryFilterData #PxQueryFilterCallback
[in]cacheCached 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]inflationThis 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).
Returns
Returns a PxSweepBuffer pointer that will store the result of the query after execute() is completed. This will point either to an element of the buffer allocated on construction or to a user buffer passed to the constructor.
See also
PxCreateBatchQueryExt
PxHitFlags PxQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxSweepHit

Implements physx::PxBatchQueryExt.


The documentation for this class was generated from the following file: