physx::PxTask Class Reference

A PxBaseTask implementation with deferred execution and full dependencies. More...

#include <PxTask.h>

Inheritance diagram for physx::PxTask:
Collaboration diagram for physx::PxTask:

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 PxTaskManagergetTaskManager () 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...
 
PxTaskManagermTm
 Owning PxTaskManager instance. More...
 

Friends

class PxTaskMgr
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PxTask()

physx::PxTask::PxTask ( )
inline

◆ ~PxTask()

virtual physx::PxTask::~PxTask ( )
inlinevirtual

Member Function Documentation

◆ addReference()

PX_INLINE void physx::PxTask::addReference ( )
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.

◆ finishBefore()

PX_INLINE void physx::PxTask::finishBefore ( PxTaskID  taskID)
inline

Inform the PxTaskManager this task must finish before the given.

References physx::PxBaseTask::mTm, and PX_ASSERT.

◆ getReference()

PX_INLINE int32_t physx::PxTask::getReference ( ) const
inlinevirtual

Return the ref-count for this task.

Implements physx::PxBaseTask.

References mTaskID, and physx::PxBaseTask::mTm.

◆ getTaskID()

PX_INLINE PxTaskID physx::PxTask::getTaskID ( ) const
inline

Return the unique ID for this task.

References mTaskID.

◆ release()

virtual void physx::PxTask::release ( void  )
inlinevirtual

Release method implementation.

Implements physx::PxBaseTask.

References physx::PxBaseTask::mTm, PX_ASSERT, and physx::PxTaskManager::taskCompleted().

◆ removeReference()

PX_INLINE void physx::PxTask::removeReference ( )
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.

◆ startAfter()

PX_INLINE void physx::PxTask::startAfter ( PxTaskID  taskID)
inline

Inform the PxTaskManager this task cannot start until the given.

References physx::PxBaseTask::mTm, and PX_ASSERT.

◆ submitted()

virtual void physx::PxTask::submitted ( )
inlinevirtual

Called by PxTaskManager at submission time for initialization.

Perform simulation step initialization here.

Friends And Related Function Documentation

◆ PxTaskMgr

friend class PxTaskMgr
friend

Member Data Documentation

◆ mTaskID

PxTaskID physx::PxTask::mTaskID
protected

ID assigned at submission.

Referenced by addReference(), getReference(), getTaskID(), and removeReference().


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