PxQueryHitType

Defined in include/PxQueryFiltering.h

struct PxQueryHitType

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.

Public Types

enum Enum

Values:

enumerator eNONE

the query should ignore this shape

enumerator eTOUCH

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

enumerator eBLOCK

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