PxHitFlag

Defined in include/geometry/PxGeometryHit.h

struct PxHitFlag

Scene query and geometry query behavior flags.

PxHitFlags are used for 3 different purposes:

1) To request hit fields to be filled in by scene queries (such as hit position, normal, face index or UVs). 2) Once query is completed, to indicate which fields are valid (note that a query may produce more valid fields than requested). 3) To specify additional options for the narrow phase and mid-phase intersection routines.

All these flags apply to both scene queries and geometry queries (PxGeometryQuery).

Public Types

enum Enum

Values:

enumerator ePOSITION

“position” member of PxQueryHit is valid

enumerator eNORMAL

“normal” member of PxQueryHit is valid

enumerator eUV

“u” and “v” barycentric coordinates of PxQueryHit are valid. Not applicable to sweep queries.

enumerator eASSUME_NO_INITIAL_OVERLAP

Performance hint flag for sweeps when it is known upfront there’s no initial overlap. NOTE: using this flag may cause undefined results if shapes are initially overlapping.

enumerator eANY_HIT

Report any first hit. Used for geometries that contain more than one primitive. For meshes, if neither eMESH_MULTIPLE nor eANY_HIT is specified, a single closest hit will be reported.

enumerator eMESH_MULTIPLE

Report all hits for meshes rather than just the first. Not applicable to sweep queries.

enumerator eMESH_ANY

Deprecated:

Deprecated, please use eANY_HIT instead.

enumerator eMESH_BOTH_SIDES

Report hits with back faces of mesh triangles. Also report hits for raycast originating on mesh surface and facing away from the surface normal. Not applicable to sweep queries. Please refer to the user guide for heightfield-specific differences.

enumerator ePRECISE_SWEEP

Use more accurate but slower narrow phase sweep tests. May provide better compatibility with PhysX 3.2 sweep behavior.

enumerator eMTD

Report the minimum translation depth, normal and contact point.

enumerator eFACE_INDEX

“face index” member of PxQueryHit is valid

enumerator eDEFAULT
enumerator eMODIFIABLE_FLAGS

Only this subset of flags can be modified by pre-filter.

Other modifications will be discarded.