pub enum HitFlag {
Position,
Normal,
Uv,
AssumeNoInitialOverlap,
AnyHit,
MeshMultiple,
MeshBothSides,
PreciseSweep,
Mtd,
FaceIndex,
Default,
ModifiableFlags,
}
Expand description
Scene query and geometry query behavior flags.
PxHitFlags are used for 3 different purposes:
- To request hit fields to be filled in by scene queries (such as hit position, normal, face index or UVs).
- Once query is completed, to indicate which fields are valid (note that a query may produce more valid fields than requested).
- 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).
Variants§
Position
“position” member of PxQueryHit
is valid
Normal
“normal” member of PxQueryHit
is valid
Uv
“u” and “v” barycentric coordinates of PxQueryHit
are valid. Not applicable to sweep queries.
AssumeNoInitialOverlap
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.
AnyHit
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.
MeshMultiple
Report all hits for meshes rather than just the first. Not applicable to sweep queries.
MeshBothSides
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.
PreciseSweep
Use more accurate but slower narrow phase sweep tests. May provide better compatibility with PhysX 3.2 sweep behavior.
Mtd
Report the minimum translation depth, normal and contact point.
FaceIndex
“face index” member of PxQueryHit
is valid
Default
ModifiableFlags
Only this subset of flags can be modified by pre-filter. Other modifications will be discarded.