RavEngine
Loading...
Searching...
No Matches
physx::PxTaskMgr Class Reference
Inheritance diagram for physx::PxTaskMgr:
[legend]
Collaboration diagram for physx::PxTaskMgr:
[legend]

Public Member Functions

 PxTaskMgr (PxErrorCallback &, PxCpuDispatcher *)
 
void setCpuDispatcher (PxCpuDispatcher &ref)
 Set the user-provided dispatcher object for CPU tasks.
 
PxCpuDispatcher * getCpuDispatcher () const
 Get the user-provided dispatcher object for CPU tasks.
 
void resetDependencies ()
 Reset any dependencies between Tasks.
 
void startSimulation ()
 Called by the owning scene to start the task graph.
 
void stopSimulation ()
 Called by the owning scene at the end of a simulation step.
 
void taskCompleted (PxTask &task)
 Called by the worker threads to inform the PxTaskManager that a task has completed processing.
 
PxTaskID getNamedTask (const char *name)
 Retrieve a task by name.
 
PxTaskID submitNamedTask (PxTask *task, const char *name, PxTaskType::Enum type=PxTaskType::eCPU)
 Submit a task with a unique name.
 
PxTaskID submitUnnamedTask (PxTask &task, PxTaskType::Enum type=PxTaskType::eCPU)
 Submit an unnamed task.
 
PxTask * getTaskFromID (PxTaskID)
 Retrieve a task given a task ID.
 
void dispatchTask (PxTaskID taskID)
 
void resolveRow (PxTaskID taskID)
 
void release ()
 Release the PxTaskManager object, referenced dispatchers will not be released.
 
void finishBefore (PxTask &task, PxTaskID taskID)
 
void startAfter (PxTask &task, PxTaskID taskID)
 
void addReference (PxTaskID taskID)
 
void decrReference (PxTaskID taskID)
 
int32_t getReference (PxTaskID taskID) const
 
void decrReference (PxLightCpuTask &lighttask)
 
void addReference (PxLightCpuTask &lighttask)
 
- 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)
 

Public Attributes

PxErrorCallback & mErrorCallback
 
PxCpuDispatcher * mCpuDispatcher
 
PxTaskNameToIDMap mName2IDmap
 
volatile int mPendingTasks
 
PxMutex mMutex
 
PxTaskDepTable mDepTable
 
PxTaskTable mTaskTable
 
PxArray< PxTaskID > mStartDispatch
 

Additional Inherited Members

- Static Public Member Functions inherited from physx::PxTaskManager
static PxTaskManager * createTaskManager (PxErrorCallback &errorCallback, PxCpuDispatcher *=NULL)
 Construct a new PxTaskManager instance with the given [optional] dispatchers.
 

Member Function Documentation

◆ getCpuDispatcher()

PxCpuDispatcher * physx::PxTaskMgr::getCpuDispatcher ( ) const
inlinevirtual

Get the user-provided dispatcher object for CPU tasks.

Returns
The CPU dispatcher object.
See also
PxCpuDispatcher

Implements physx::PxTaskManager.

◆ getNamedTask()

PxTaskID physx::PxTaskMgr::getNamedTask ( const char *  name)
virtual

Retrieve a task by name.

Parameters
[in]nameThe unique name of a task
Returns
The ID of the task with that name, or eNOT_PRESENT if not found

Implements physx::PxTaskManager.

◆ getTaskFromID()

PxTask * physx::PxTaskMgr::getTaskFromID ( PxTaskID  id)
virtual

Retrieve a task given a task ID.

Parameters
[in]idThe ID of the task to return, a valid ID must be passed or results are undefined
Returns
The task associated with the ID

Implements physx::PxTaskManager.

◆ release()

void physx::PxTaskMgr::release ( )
virtual

Release the PxTaskManager object, referenced dispatchers will not be released.

Implements physx::PxTaskManager.

◆ resetDependencies()

void physx::PxTaskMgr::resetDependencies ( )
virtual

Reset any dependencies between Tasks.

Note
Will be called at the start of every frame before tasks are submitted.
See also
PxTask

Implements physx::PxTaskManager.

◆ setCpuDispatcher()

void physx::PxTaskMgr::setCpuDispatcher ( PxCpuDispatcher &  ref)
inlinevirtual

Set the user-provided dispatcher object for CPU tasks.

Parameters
[in]refThe dispatcher object.
See also
PxCpuDispatcher

Implements physx::PxTaskManager.

◆ startSimulation()

void physx::PxTaskMgr::startSimulation ( )
virtual

Called by the owning scene to start the task graph.

Note
All tasks with ref count of 1 will be dispatched.
See also
PxTask

Implements physx::PxTaskManager.

◆ stopSimulation()

void physx::PxTaskMgr::stopSimulation ( )
virtual

Called by the owning scene at the end of a simulation step.

Implements physx::PxTaskManager.

◆ submitNamedTask()

PxTaskID physx::PxTaskMgr::submitNamedTask ( PxTask *  task,
const char *  name,
PxTaskType::Enum  type = PxTaskType::eCPU 
)
virtual

Submit a task with a unique name.

Parameters
[in]taskThe task to be executed
[in]nameThe unique name of a task
[in]typeThe type of the task (default eCPU)
Returns
The ID of the task with that name, or eNOT_PRESENT if not found

Implements physx::PxTaskManager.

◆ submitUnnamedTask()

PxTaskID physx::PxTaskMgr::submitUnnamedTask ( PxTask &  task,
PxTaskType::Enum  type = PxTaskType::eCPU 
)
virtual

Submit an unnamed task.

Parameters
[in]taskThe task to be executed
[in]typeThe type of the task (default eCPU)
Returns
The ID of the task with that name, or eNOT_PRESENT if not found

Implements physx::PxTaskManager.

◆ taskCompleted()

void physx::PxTaskMgr::taskCompleted ( PxTask &  task)
virtual

Called by the worker threads to inform the PxTaskManager that a task has completed processing.

Parameters
[in]taskThe task which has been completed

Implements physx::PxTaskManager.


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