RavEngine
Loading...
Searching...
No Matches
physx::PxReportCallback< T > Class Template Referenceabstract

Base class for callback reporting an unknown number of items to users. More...

#include <PxReportCallback.h>

Inheritance diagram for physx::PxReportCallback< T >:
[legend]

Public Member Functions

 PxReportCallback (T *buffer=NULL, PxU32 capacity=0)
 
virtual bool flushResults (PxU32 nbItems, const T *items)=0
 Reports query results to users.
 

Public Attributes

T * mBuffer
 
PxU32 mCapacity
 
PxU32 mSize
 Current number of items in the buffer. This is entirely managed by the system.
 

Detailed Description

template<class T>
class physx::PxReportCallback< T >

Base class for callback reporting an unknown number of items to users.

This can be used as-is and customized by users, or several pre-designed callbacks can be used instead (see below).

This design lets users decide how to retrieve the results of a query:

  • either one by one via a regular callback
  • or one batch at a time via a callback
  • or written out directly to their own C-style buffer
  • or pushed back to their own PxArray
  • etc
See also
PxRegularReportCallback PxLocalStorageReportCallback PxExternalStorageReportCallback PxDynamicArrayReportCallback

Member Function Documentation

◆ flushResults()

template<class T >
virtual bool physx::PxReportCallback< T >::flushResults ( PxU32  nbItems,
const T *  items 
)
pure virtual

Reports query results to users.

This will be called by the system as many times as necessary to report all results.

Parameters
[in]nbItemsNumber of reported items
[in]itemsarray of reported items
Returns
true to continue the query, false to abort the query

Implemented in physx::PxDynamicArrayReportCallback< T >, physx::PxRegularReportCallback< T >, physx::PxLocalStorageReportCallback< T, capacityT >, and physx::PxExternalStorageReportCallback< T >.


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