|
|
| NpOverflowBuffer (HitType *hits, PxU32 count) |
| |
| virtual PxAgain | processTouches (const HitType *, PxU32) |
| | virtual callback function used to communicate query results to the user.
|
| |
| virtual void | finalizeQuery () |
| | Query finalization callback, called after the last processTouches callback.
|
| |
| | PxHitBuffer (HitType *aTouches=NULL, PxU32 aMaxNbTouches=0) |
| | Initializes the buffer with user memory.
|
| |
|
PX_INLINE PxU32 | getNbAnyHits () const |
| | Computes the number of any hits in this result, blocking or touching.
|
| |
|
PX_INLINE const HitType & | getAnyHit (const PxU32 index) const |
| | Convenience iterator used to access any hits in this result, blocking or touching.
|
| |
|
PX_INLINE PxU32 | getNbTouches () const |
| |
|
PX_INLINE const HitType * | getTouches () const |
| |
|
PX_INLINE const HitType & | getTouch (const PxU32 index) const |
| |
|
PX_INLINE PxU32 | getMaxNbTouches () const |
| |
| | PxHitCallback (HitType *aTouches, PxU32 aMaxNbTouches) |
| | Initializes the class with user provided buffer.
|
| |
|
PX_FORCE_INLINE bool | hasAnyHits () |
| | Returns true if any blocking or touching hits were encountered during a query.
|
| |
|
|
bool | overflow |
| |
|
bool | processCalled |
| |
|
PxU32 | saveNbTouches |
| |
|
HitType | block |
| | Holds the closest blocking hit result for the query. Invalid if hasBlock is false.
|
| |
|
bool | hasBlock |
| | Set to true if there was a blocking hit during query.
|
| |
|
HitType * | touches |
| | User specified buffer for touching hits.
|
| |
| PxU32 | maxNbTouches |
| | Size of the user specified touching hits buffer.
|
| |
| PxU32 | nbTouches |
| | Number of touching hits returned by the query. Used with PxHitBuffer.
|
| |
◆ finalizeQuery()
template<typename HitType >
◆ processTouches()
template<typename HitType >
virtual callback function used to communicate query results to the user.
This callback will always be invoked with touches as a buffer if touches was specified as non-NULL. All reported touch hits are guaranteed to be closer than the closest blocking hit.
- Parameters
-
| [in] | buffer | Callback will report touch hits to the user in this buffer. This pointer will be the same as touches. |
| [in] | nbHits | Number of touch hits reported in buffer. This number will not exceed maxNbTouches. |
- Note
- There is a significant performance penalty in case multiple touch callbacks are issued (up to 2x)
-
to avoid the penalty use a bigger buffer so that all touching hits can be reported in a single buffer.
-
If true (again) is returned from the callback, nbTouches will be reset to 0,
-
If false is returned, nbTouched will remain unchanged.
-
By the time processTouches is first called, the globally closest blocking hit is already determined,
-
values of hasBlock and block are final and all touch hits are guaranteed to be closer than the blocking hit.
-
touches and maxNbTouches can be modified inside of processTouches callback.
- Returns
- true to continue receiving callbacks in case there are more hits or false to stop.
- See also
- PxAgain PxRaycastHit PxSweepHit PxOverlapHit
Reimplemented from physx::PxHitBuffer< HitType >.
The documentation for this struct was generated from the following file:
- RavEngine/deps/physx/physx/source/physxextensions/src/ExtSceneQueryExt.cpp