31 #ifndef PX_PHYSICS_NX_SCENEQUERYREPORT 32 #define PX_PHYSICS_NX_SCENEQUERYREPORT 69 eASSUME_NO_INITIAL_OVERLAP = (1<<4),
70 eMESH_MULTIPLE = (1<<5),
73 eMESH_BOTH_SIDES = (1<<7),
75 ePRECISE_SWEEP = (1<<8),
80 eFACE_INDEX = (1<<10),
82 eDEFAULT = ePOSITION|eNORMAL|eFACE_INDEX,
85 eMODIFIABLE_FLAGS = eMESH_MULTIPLE|eMESH_BOTH_SIDES|eASSUME_NO_INITIAL_OVERLAP|ePRECISE_SWEEP
232 template<
typename HitType>
263 : hasBlock(false), touches(aTouches), maxNbTouches(aMaxNbTouches), nbTouches(0)
286 virtual PxAgain processTouches(
const HitType* buffer,
PxU32 nbHits) = 0;
310 template<
typename HitType>
329 return index < getNbTouches() ? getTouches()[index] : this->block; }
Definition: GuContactBuffer.h:37
PX_INLINE PxActorShape(PxRigidActor *a, PxShape *s)
Definition: PxQueryReport.h:107
PxHitBuffer< PxRaycastHit > PxRaycastBuffer
Raycast query buffer.
Definition: PxQueryReport.h:354
PxHitCallback< PxRaycastHit > PxRaycastCallback
Raycast query callback.
Definition: PxQueryReport.h:345
PxHitBuffer< PxSweepHit > PxSweepBuffer
Sweep query buffer.
Definition: PxQueryReport.h:360
float PxF32
Definition: PxSimpleTypes.h:76
virtual ~PxHitCallback()
Definition: PxQueryReport.h:290
collection of set bits defined in PxHitFlag.
Definition: PxQueryReport.h:104
PxF32 distance
Distance to hit.
Definition: PxQueryReport.h:159
Abstract class for collision shapes.
Definition: PxShape.h:142
PX_INLINE const HitType & getTouch(const PxU32 index) const
Definition: PxQueryReport.h:333
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:351
float PxReal
Definition: PxSimpleTypes.h:78
PxReal v
barycentric coordinates of hit point, for triangle mesh and height field (flag: PxHitFlag::eUV) ...
Definition: PxQueryReport.h:180
PX_INLINE PxQueryHit()
Definition: PxQueryReport.h:119
PxHitCallback< PxSweepHit > PxSweepCallback
Sweep query callback.
Definition: PxQueryReport.h:351
PX_INLINE PxLocationHit()
Definition: PxQueryReport.h:140
#define PX_MAX_REAL
Definition: PxSimpleTypes.h:93
uint32_t PxU32
Definition: PxSimpleTypes.h:71
PxRaycastBufferN()
Definition: PxQueryReport.h:367
Scene query and geometry query behavior flags.
Definition: PxQueryReport.h:62
bool hasBlock
Set to true if there was a blocking hit during query.
Definition: PxQueryReport.h:236
PX_INLINE const HitType * getTouches() const
Definition: PxQueryReport.h:332
PxRigidActor * actor
Definition: PxQueryReport.h:109
PxHitFlags flags
Hit flags specifying which members contain valid values.
Definition: PxQueryReport.h:151
PX_INLINE PxU32 getMaxNbTouches() const
Definition: PxQueryReport.h:334
PxU32 nbTouches
Number of touching hits returned by the query. Used with PxHitBuffer.
Definition: PxQueryReport.h:249
PxU32 padTo16Bytes
Definition: PxQueryReport.h:204
PxSweepBufferN()
Definition: PxQueryReport.h:383
PX_INLINE PxU32 getNbAnyHits() const
Computes the number of any hits in this result, blocking or touching.
Definition: PxQueryReport.h:326
PxU32 padTo16Bytes
Definition: PxQueryReport.h:192
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition: PxRigidActor.h:58
Returns scene query hits (intersections) to the user in a preallocated buffer.
Definition: PxQueryReport.h:311
PxShape * shape
Definition: PxQueryReport.h:110
bool PxAgain
Describes query behavior after returning a partial query result via a callback.
Definition: PxQueryReport.h:216
HitType block
Holds the closest blocking hit result for the query. Invalid if hasBlock is false.
Definition: PxQueryReport.h:235
PX_INLINE PxRaycastHit()
Definition: PxQueryReport.h:176
Scene query hit information for raycasts and sweeps returning hit position and normal information...
Definition: PxQueryReport.h:138
PxVec3 normal
World-space hit normal (flag: PxHitFlag::eNORMAL)
Definition: PxQueryReport.h:153
PX_INLINE bool hadInitialOverlap() const
Definition: PxQueryReport.h:148
PxVec3 position
World-space hit position (flag: PxHitFlag::ePOSITION)
Definition: PxQueryReport.h:152
HitType * touches
User specified buffer for touching hits.
Definition: PxQueryReport.h:238
PX_INLINE const HitType & getAnyHit(const PxU32 index) const
Convenience iterator used to access any hits in this result, blocking or touching.
Definition: PxQueryReport.h:328
PxU16 flags
a set of Px1DConstraintFlags
Definition: PxConstraintDesc.h:110
PxU32 faceIndex
Definition: PxQueryReport.h:129
PxOverlapBufferN()
Definition: PxQueryReport.h:375
Enum
Definition: PxQueryReport.h:64
PxU32 maxNbTouches
Size of the user specified touching hits buffer.
Definition: PxQueryReport.h:244
This callback class facilitates reporting scene query hits (intersections) to the user...
Definition: PxQueryReport.h:233
Returns touching sweep hits to the user in a fixed size array embedded in the buffer class...
Definition: PxQueryReport.h:380
Scene query hit information.
Definition: PxQueryReport.h:117
virtual PxAgain processTouches(const HitType *buffer, PxU32 nbHits)
virtual callback function used to communicate query results to the user.
Definition: PxQueryReport.h:340
Returns touching raycast hits to the user in a fixed size array embedded in the buffer class...
Definition: PxQueryReport.h:364
PX_INLINE PxActorShape()
Definition: PxQueryReport.h:106
PX_CUDA_CALLABLE PX_INLINE void PX_UNUSED(T const &)
Definition: PxPreprocessor.h:466
PX_FORCE_INLINE bool hasAnyHits()
Returns true if any blocking or touching hits were encountered during a query.
Definition: PxQueryReport.h:293
PX_INLINE PxU32 getNbTouches() const
Definition: PxQueryReport.h:331
PxHitCallback(HitType *aTouches, PxU32 aMaxNbTouches)
Initializes the class with user provided buffer.
Definition: PxQueryReport.h:262
Stores results of overlap queries.
Definition: PxQueryReport.h:192
PxHitCallback< PxOverlapHit > PxOverlapCallback
Overlap query callback.
Definition: PxQueryReport.h:348
virtual ~PxHitBuffer()
Definition: PxQueryReport.h:336
#define PX_ASSERT(exp)
Definition: PxAssert.h:59
Stores results of sweep queries.
Definition: PxQueryReport.h:200
Stores results of raycast queries.
Definition: PxQueryReport.h:174
uint16_t PxU16
Definition: PxSimpleTypes.h:73
uint32_t PxU32
Definition: Px.h:48
PX_INLINE PxSweepHit()
Definition: PxQueryReport.h:202
PxHitBuffer(HitType *aTouches=NULL, PxU32 aMaxNbTouches=0)
Initializes the buffer with user memory.
Definition: PxQueryReport.h:323
#define PX_INLINE
Definition: PxPreprocessor.h:336
virtual void finalizeQuery()
Query finalization callback, called after the last processTouches callback.
Definition: PxQueryReport.h:288
PxHitBuffer< PxOverlapHit > PxOverlapBuffer
Overlap query buffer.
Definition: PxQueryReport.h:357
3 Element vector class.
Definition: PxVec3.h:49
Returns touching overlap hits to the user in a fixed size array embedded in the buffer class...
Definition: PxQueryReport.h:372