RavEngine
Loading...
Searching...
No Matches
physx::Cm::DelegateTask< T, Fn > Class Template Reference
Inheritance diagram for physx::Cm::DelegateTask< T, Fn >:
[legend]
Collaboration diagram for physx::Cm::DelegateTask< T, Fn >:
[legend]

Public Member Functions

 DelegateTask (PxU64 contextID, T *obj, const char *name)
 
virtual void run ()
 The user-implemented run method where the task's work should be performed.
 
virtual void runInternal ()
 
virtual const char * getName () const
 Return a user-provided task name for profiling purposes.
 
void setObject (T *obj)
 
- Public Member Functions inherited from physx::Cm::Task
 Task (PxU64 contextId)
 
- Public Member Functions inherited from physx::PxLightCpuTask
PX_INLINE void setContinuation (PxTaskManager &tm, PxBaseTask *c)
 Initialize this task and specify the task that will have its ref count decremented on completion.
 
PX_INLINE void setContinuation (PxBaseTask *c)
 Initialize this task and specify the task that will have its ref count decremented on completion.
 
PX_INLINE PxBaseTask * getContinuation () const
 Retrieves continuation task.
 
virtual void removeReference () PX_OVERRIDE
 Manually decrement this task's reference count. If the reference count reaches zero, the task will be dispatched.
 
virtual int32_t getReference () const PX_OVERRIDE
 Return the ref-count for this task.
 
virtual void addReference () PX_OVERRIDE
 Manually increment this task's reference count. The task will not be allowed to run until removeReference() is called.
 
virtual void release () PX_OVERRIDE
 called by CpuDispatcher after run method has completed
 
- Public Member Functions inherited from physx::PxBaseTask
PX_FORCE_INLINE PxTaskManager * getTaskManager () const
 Return PxTaskManager to which this task was submitted.
 
PX_FORCE_INLINE void setContextId (PxU64 id)
 
PX_FORCE_INLINE PxU64 getContextId () const
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Additional Inherited Members

- Protected Attributes inherited from physx::PxLightCpuTask
PxBaseTask * mCont
 Continuation task, can be NULL.
 
volatile int32_t mRefCount
 PxTask is dispatched when reaches 0.
 
- Protected Attributes inherited from physx::PxBaseTask
PxU64 mContextID
 Context ID for profiler interface.
 
PxTaskManager * mTm
 Owning PxTaskManager instance.
 

Member Function Documentation

◆ getName()

template<class T , void(T::*)(physx::PxBaseTask *) Fn>
virtual const char * physx::Cm::DelegateTask< T, Fn >::getName ( ) const
inlinevirtual

Return a user-provided task name for profiling purposes.

It does not have to be unique, but unique names are helpful.

Returns
The name of this task

Implements physx::PxBaseTask.

◆ run()

template<class T , void(T::*)(physx::PxBaseTask *) Fn>
virtual void physx::Cm::DelegateTask< T, Fn >::run ( )
inlinevirtual

The user-implemented run method where the task's work should be performed.

run() methods must be thread safe, stack friendly (no alloca, etc), and must never block.

Reimplemented from physx::Cm::Task.

◆ runInternal()

template<class T , void(T::*)(physx::PxBaseTask *) Fn>
virtual void physx::Cm::DelegateTask< T, Fn >::runInternal ( )
inlinevirtual

Implements physx::Cm::Task.


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