PxLocationHit Struct Reference

Scene query hit information for raycasts and sweeps returning hit position and normal information. More...

#include <PxQueryReport.h>

Inheritance diagram for PxLocationHit:
Collaboration diagram for PxLocationHit:

Public Member Functions

PX_INLINE PxLocationHit ()
 
PX_INLINE bool hadInitialOverlap () const
 
- Public Member Functions inherited from PxQueryHit
PX_INLINE PxQueryHit ()
 
- Public Member Functions inherited from PxActorShape
PX_INLINE PxActorShape ()
 
PX_INLINE PxActorShape (PxRigidActor *a, PxShape *s)
 

Public Attributes

PxHitFlags flags
 Hit flags specifying which members contain valid values. More...
 
PxVec3 position
 World-space hit position (flag: PxHitFlag::ePOSITION) More...
 
PxVec3 normal
 World-space hit normal (flag: PxHitFlag::eNORMAL) More...
 
PxF32 distance
 Distance to hit. More...
 
- Public Attributes inherited from PxQueryHit
PxU32 faceIndex
 
- Public Attributes inherited from PxActorShape
PxRigidActoractor
 
PxShapeshape
 

Detailed Description

Scene query hit information for raycasts and sweeps returning hit position and normal information.

PxHitFlag flags can be passed to scene query functions, as an optimization, to cause the SDK to only generate specific members of this structure.

Constructor & Destructor Documentation

◆ PxLocationHit()

PX_INLINE PxLocationHit::PxLocationHit ( )
inline

Member Function Documentation

◆ hadInitialOverlap()

PX_INLINE bool PxLocationHit::hadInitialOverlap ( ) const
inline
Note
For raycast hits: true for shapes overlapping with raycast origin.
For sweep hits: true for shapes overlapping at zero sweep distance.
See also
PxRaycastHit PxSweepHit

Member Data Documentation

◆ distance

PxF32 PxLocationHit::distance

Distance to hit.

Note
If the eMTD flag is used, distance will be a negative value if shapes are overlapping indicating the penetration depth.
Otherwise, this value will be >= 0

◆ flags

PxHitFlags PxLocationHit::flags

Hit flags specifying which members contain valid values.

◆ normal

PxVec3 PxLocationHit::normal

World-space hit normal (flag: PxHitFlag::eNORMAL)

◆ position

PxVec3 PxLocationHit::position

World-space hit position (flag: PxHitFlag::ePOSITION)


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