31 #ifndef PX_PHYSICS_NX_SCENEQUERYREPORT 32 #define PX_PHYSICS_NX_SCENEQUERYREPORT 68 eASSUME_NO_INITIAL_OVERLAP = (1<<4),
69 eMESH_MULTIPLE = (1<<5),
72 eMESH_BOTH_SIDES = (1<<7),
74 ePRECISE_SWEEP = (1<<8),
79 eFACE_INDEX = (1<<10),
81 eDEFAULT = ePOSITION|eNORMAL|eFACE_INDEX,
84 eMODIFIABLE_FLAGS = eMESH_MULTIPLE|eMESH_BOTH_SIDES|eASSUME_NO_INITIAL_OVERLAP|ePRECISE_SWEEP
231 template<
typename HitType>
262 : hasBlock(false), touches(aTouches), maxNbTouches(aMaxNbTouches), nbTouches(0)
285 virtual PxAgain processTouches(
const HitType* buffer,
PxU32 nbHits) = 0;
309 template<
typename HitType>
328 return index < getNbTouches() ? getTouches()[index] : this->block; }
Definition: GuContactBuffer.h:37
PX_INLINE PxActorShape(PxRigidActor *a, PxShape *s)
Definition: PxQueryReport.h:106
PxHitBuffer< PxRaycastHit > PxRaycastBuffer
Raycast query buffer.
Definition: PxQueryReport.h:353
PxHitCallback< PxRaycastHit > PxRaycastCallback
Raycast query callback.
Definition: PxQueryReport.h:344
PxHitBuffer< PxSweepHit > PxSweepBuffer
Sweep query buffer.
Definition: PxQueryReport.h:359
float PxF32
Definition: PxSimpleTypes.h:76
virtual ~PxHitCallback()
Definition: PxQueryReport.h:289
collection of set bits defined in PxHitFlag.
Definition: PxQueryReport.h:103
PxF32 distance
Distance to hit.
Definition: PxQueryReport.h:158
Abstract class for collision shapes.
Definition: PxShape.h:142
PX_INLINE const HitType & getTouch(const PxU32 index) const
Definition: PxQueryReport.h:332
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:364
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:179
PX_INLINE PxQueryHit()
Definition: PxQueryReport.h:118
PxHitCallback< PxSweepHit > PxSweepCallback
Sweep query callback.
Definition: PxQueryReport.h:350
PX_INLINE PxLocationHit()
Definition: PxQueryReport.h:139
#define PX_MAX_REAL
Definition: PxSimpleTypes.h:93
uint32_t PxU32
Definition: PxSimpleTypes.h:71
PxRaycastBufferN()
Definition: PxQueryReport.h:366
Scene query and geometry query behavior flags.
Definition: PxQueryReport.h:61
bool hasBlock
Set to true if there was a blocking hit during query.
Definition: PxQueryReport.h:235
PX_INLINE const HitType * getTouches() const
Definition: PxQueryReport.h:331
PxRigidActor * actor
Definition: PxQueryReport.h:108
PxHitFlags flags
Hit flags specifying which members contain valid values.
Definition: PxQueryReport.h:150
PX_INLINE PxU32 getMaxNbTouches() const
Definition: PxQueryReport.h:333
PxU32 nbTouches
Number of touching hits returned by the query. Used with PxHitBuffer.
Definition: PxQueryReport.h:248
PxU32 padTo16Bytes
Definition: PxQueryReport.h:203
PxSweepBufferN()
Definition: PxQueryReport.h:382
PX_INLINE PxU32 getNbAnyHits() const
Computes the number of any hits in this result, blocking or touching.
Definition: PxQueryReport.h:325
PxU32 padTo16Bytes
Definition: PxQueryReport.h:191
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:310
PxShape * shape
Definition: PxQueryReport.h:109
bool PxAgain
Describes query behavior after returning a partial query result via a callback.
Definition: PxQueryReport.h:215
HitType block
Holds the closest blocking hit result for the query. Invalid if hasBlock is false.
Definition: PxQueryReport.h:234
PX_INLINE PxRaycastHit()
Definition: PxQueryReport.h:175
Scene query hit information for raycasts and sweeps returning hit position and normal information...
Definition: PxQueryReport.h:137
PxVec3 normal
World-space hit normal (flag: PxHitFlag::eNORMAL)
Definition: PxQueryReport.h:152
PX_INLINE bool hadInitialOverlap() const
Definition: PxQueryReport.h:147
PxVec3 position
World-space hit position (flag: PxHitFlag::ePOSITION)
Definition: PxQueryReport.h:151
HitType * touches
User specified buffer for touching hits.
Definition: PxQueryReport.h:237
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:327
PxU16 flags
a set of Px1DConstraintFlags
Definition: PxConstraintDesc.h:110
PxU32 faceIndex
Definition: PxQueryReport.h:128
PxOverlapBufferN()
Definition: PxQueryReport.h:374
Enum
Definition: PxQueryReport.h:63
PxU32 maxNbTouches
Size of the user specified touching hits buffer.
Definition: PxQueryReport.h:243
This callback class facilitates reporting scene query hits (intersections) to the user...
Definition: PxQueryReport.h:232
Returns touching sweep hits to the user in a fixed size array embedded in the buffer class...
Definition: PxQueryReport.h:379
Scene query hit information.
Definition: PxQueryReport.h:116
virtual PxAgain processTouches(const HitType *buffer, PxU32 nbHits)
virtual callback function used to communicate query results to the user.
Definition: PxQueryReport.h:339
Returns touching raycast hits to the user in a fixed size array embedded in the buffer class...
Definition: PxQueryReport.h:363
PX_INLINE PxActorShape()
Definition: PxQueryReport.h:105
PX_CUDA_CALLABLE PX_INLINE void PX_UNUSED(T const &)
Definition: PxPreprocessor.h:479
PX_FORCE_INLINE bool hasAnyHits()
Returns true if any blocking or touching hits were encountered during a query.
Definition: PxQueryReport.h:292
PX_INLINE PxU32 getNbTouches() const
Definition: PxQueryReport.h:330
PxHitCallback(HitType *aTouches, PxU32 aMaxNbTouches)
Initializes the class with user provided buffer.
Definition: PxQueryReport.h:261
Stores results of overlap queries.
Definition: PxQueryReport.h:191
PxHitCallback< PxOverlapHit > PxOverlapCallback
Overlap query callback.
Definition: PxQueryReport.h:347
virtual ~PxHitBuffer()
Definition: PxQueryReport.h:335
#define PX_ASSERT(exp)
Definition: PxAssert.h:61
Stores results of sweep queries.
Definition: PxQueryReport.h:199
Stores results of raycast queries.
Definition: PxQueryReport.h:173
uint16_t PxU16
Definition: PxSimpleTypes.h:73
uint32_t PxU32
Definition: Px.h:48
PX_INLINE PxSweepHit()
Definition: PxQueryReport.h:201
PxHitBuffer(HitType *aTouches=NULL, PxU32 aMaxNbTouches=0)
Initializes the buffer with user memory.
Definition: PxQueryReport.h:322
#define PX_INLINE
Definition: PxPreprocessor.h:349
virtual void finalizeQuery()
Query finalization callback, called after the last processTouches callback.
Definition: PxQueryReport.h:287
PxHitBuffer< PxOverlapHit > PxOverlapBuffer
Overlap query buffer.
Definition: PxQueryReport.h:356
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:371