RavEngine
Loading...
Searching...
No Matches
physx::PxLocationHit Struct Reference

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

#include <PxGeometryHit.h>

Inheritance diagram for physx::PxLocationHit:
[legend]
Collaboration diagram for physx::PxLocationHit:
[legend]

Public Member Functions

PX_INLINE bool hadInitialOverlap () const
 

Public Attributes

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

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.

Member Function Documentation

◆ hadInitialOverlap()

PX_INLINE bool physx::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 physx::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

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