PxQueryHitType Struct Reference

Classification of scene query hits (intersections). More...

#include <PxQueryFiltering.h>

Public Types

enum  Enum { eNONE = 0, eTOUCH = 1, eBLOCK = 2 }
 

Detailed Description

Classification of scene query hits (intersections).

  • eNONE: Returning this hit type means that the hit should not be reported.
  • eBLOCK: For all raycast, sweep and overlap queries the nearest eBLOCK type hit will always be returned in PxHitCallback::block member.
  • eTOUCH: Whenever a raycast, sweep or overlap query was called with non-zero PxHitCallback::nbTouches and PxHitCallback::touches parameters, eTOUCH type hits that are closer or same distance (touchDistance <= blockDistance condition) as the globally nearest eBLOCK type hit, will be reported.
  • For example, to record all hits from a raycast query, always return eTOUCH.

All hits in overlap() queries are treated as if the intersection distance were zero. This means the hits are unsorted and all eTOUCH hits are recorded by the callback even if an eBLOCK overlap hit was encountered. Even though all overlap() blocking hits have zero length, only one (arbitrary) eBLOCK overlap hit is recorded in PxHitCallback::block. All overlap() eTOUCH type hits are reported (zero touchDistance <= zero blockDistance condition).

For raycast/sweep/overlap calls with zero touch buffer or PxHitCallback::nbTouches member, only the closest hit of type eBLOCK is returned. All eTOUCH hits are discarded.

See also
PxQueryFilterCallback.preFilter PxQueryFilterCallback.postFilter PxScene.raycast PxScene.sweep PxScene.overlap

Member Enumeration Documentation

◆ Enum

Enumerator
eNONE 

the query should ignore this shape

eTOUCH 

a hit on the shape touches the intersection geometry of the query but does not block it

eBLOCK 

a hit on the shape blocks the query (does not block overlap queries)


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