A PxBaseTask implementation with deferred execution and full dependencies. More...
#include <PxTask.h>
Public Member Functions | |
PxTask () | |
virtual | ~PxTask () |
virtual void | release () |
Release method implementation. More... | |
PX_INLINE void | finishBefore (PxTaskID taskID) |
Inform the PxTaskManager this task must finish before the given. More... | |
PX_INLINE void | startAfter (PxTaskID taskID) |
Inform the PxTaskManager this task cannot start until the given. More... | |
PX_INLINE void | addReference () |
Manually increment this task's reference count. The task will not be allowed to run until removeReference() is called. More... | |
PX_INLINE void | removeReference () |
Manually decrement this task's reference count. If the reference count reaches zero, the task will be dispatched. More... | |
PX_INLINE int32_t | getReference () const |
Return the ref-count for this task. More... | |
PX_INLINE PxTaskID | getTaskID () const |
Return the unique ID for this task. More... | |
virtual void | submitted () |
Called by PxTaskManager at submission time for initialization. More... | |
Public Member Functions inherited from physx::PxBaseTask | |
PxBaseTask () | |
virtual | ~PxBaseTask () |
virtual void | run ()=0 |
The user-implemented run method where the task's work should be performed. More... | |
virtual const char * | getName () const =0 |
Return a user-provided task name for profiling purposes. More... | |
PX_FORCE_INLINE PxTaskManager * | getTaskManager () const |
Return PxTaskManager to which this task was submitted. More... | |
PX_FORCE_INLINE void | setContextId (PxU64 id) |
PX_FORCE_INLINE PxU64 | getContextId () const |
Protected Attributes | |
PxTaskID | mTaskID |
ID assigned at submission. More... | |
Protected Attributes inherited from physx::PxBaseTask | |
PxU64 | mContextID |
Context ID for profiler interface. More... | |
PxTaskManager * | mTm |
Owning PxTaskManager instance. More... | |
Friends | |
class | PxTaskMgr |
A PxBaseTask implementation with deferred execution and full dependencies.
A PxTask must be submitted to a PxTaskManager to to be executed, Tasks may optionally be named when they are submitted.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Manually increment this task's reference count. The task will not be allowed to run until removeReference() is called.
Implements physx::PxBaseTask.
References mTaskID, physx::PxBaseTask::mTm, and PX_ASSERT.
Inform the PxTaskManager this task must finish before the given.
References physx::PxBaseTask::mTm, and PX_ASSERT.
|
inlinevirtual |
Return the ref-count for this task.
Implements physx::PxBaseTask.
References mTaskID, and physx::PxBaseTask::mTm.
Return the unique ID for this task.
References mTaskID.
|
inlinevirtual |
Release method implementation.
Implements physx::PxBaseTask.
References physx::PxBaseTask::mTm, PX_ASSERT, and physx::PxTaskManager::taskCompleted().
|
inlinevirtual |
Manually decrement this task's reference count. If the reference count reaches zero, the task will be dispatched.
Implements physx::PxBaseTask.
References mTaskID, physx::PxBaseTask::mTm, and PX_ASSERT.
Inform the PxTaskManager this task cannot start until the given.
References physx::PxBaseTask::mTm, and PX_ASSERT.
|
inlinevirtual |
Called by PxTaskManager at submission time for initialization.
Perform simulation step initialization here.
|
friend |
|
protected |
ID assigned at submission.
Referenced by addReference(), getReference(), getTaskID(), and removeReference().