#include <PxTaskManager.h>
Public Member Functions | |
virtual void | setCpuDispatcher (PxCpuDispatcher &ref)=0 |
Set the user-provided dispatcher object for CPU tasks. | |
virtual void | setGpuDispatcher (PxGpuDispatcher &ref)=0 |
Set the user-provided dispatcher object for GPU tasks. | |
virtual PxCpuDispatcher * | getCpuDispatcher () const =0 |
Get the user-provided dispatcher object for CPU tasks. | |
virtual PxGpuDispatcher * | getGpuDispatcher () const =0 |
Get the user-provided dispatcher object for GPU tasks. | |
virtual void | resetDependencies ()=0 |
Reset any dependencies between Tasks. | |
virtual void | startSimulation ()=0 |
Called by the owning scene to start the task graph. | |
virtual void | stopSimulation ()=0 |
Called by the owning scene at the end of a simulation step to synchronize the PxGpuDispatcher. | |
virtual void | taskCompleted (PxTask &task)=0 |
Called by the worker threads to inform the PxTaskManager that a task has completed processing. | |
virtual PxTaskID | getNamedTask (const char *name)=0 |
Retrieve a task by name. | |
virtual PxTaskID | submitNamedTask (PxTask *task, const char *name, PxTaskType::Enum type=PxTaskType::TT_CPU)=0 |
Submit a task with a unique name. | |
virtual PxTaskID | submitUnnamedTask (PxTask &task, PxTaskType::Enum type=PxTaskType::TT_CPU)=0 |
Submit an unnamed task. | |
virtual PxTask * | getTaskFromID (PxTaskID id)=0 |
Retrieve a task given a task ID. | |
virtual void | release ()=0 |
Release the PxTaskManager object, referenced dispatchers will not be released. | |
Static Public Member Functions | |
static PxTaskManager * | createTaskManager (PxErrorCallback &errorCallback, PxCpuDispatcher *=0, PxGpuDispatcher *=0) |
Construct a new PxTaskManager instance with the given [optional] dispatchers. | |
Protected Member Functions | |
virtual | ~PxTaskManager () |
Friends | |
class | PxBaseTask |
class | PxTask |
class | PxLightCpuTask |
class | PxGpuWorkerThread |
A PxTaskManager instance holds references to user-provided dispatcher objects, when tasks are submitted the PxTaskManager routes them to the appropriate dispatcher and handles task profiling if enabled. Users should not implement the PxTaskManager interface, the SDK creates its own concrete PxTaskManager object per-scene which users can configure by passing dispatcher objects into the PxSceneDesc.
virtual physx::PxTaskManager::~PxTaskManager | ( | ) | [inline, protected, virtual] |
static PxTaskManager* physx::PxTaskManager::createTaskManager | ( | PxErrorCallback & | errorCallback, | |
PxCpuDispatcher * | = 0 , |
|||
PxGpuDispatcher * | = 0 | |||
) | [static] |
Construct a new PxTaskManager instance with the given [optional] dispatchers.
virtual PxCpuDispatcher* physx::PxTaskManager::getCpuDispatcher | ( | ) | const [pure virtual] |
Get the user-provided dispatcher object for CPU tasks.
virtual PxGpuDispatcher* physx::PxTaskManager::getGpuDispatcher | ( | ) | const [pure virtual] |
Get the user-provided dispatcher object for GPU tasks.
virtual PxTaskID physx::PxTaskManager::getNamedTask | ( | const char * | name | ) | [pure virtual] |
Retrieve a task by name.
[in] | name | The unique name of a task |
Retrieve a task given a task ID.
[in] | id | The ID of the task to return, a valid ID must be passed or results are undefined |
virtual void physx::PxTaskManager::release | ( | ) | [pure virtual] |
Release the PxTaskManager object, referenced dispatchers will not be released.
virtual void physx::PxTaskManager::resetDependencies | ( | ) | [pure virtual] |
Reset any dependencies between Tasks.
virtual void physx::PxTaskManager::setCpuDispatcher | ( | PxCpuDispatcher & | ref | ) | [pure virtual] |
Set the user-provided dispatcher object for CPU tasks.
[in] | ref | The dispatcher object. |
virtual void physx::PxTaskManager::setGpuDispatcher | ( | PxGpuDispatcher & | ref | ) | [pure virtual] |
Set the user-provided dispatcher object for GPU tasks.
[in] | ref | The dispatcher object. |
virtual void physx::PxTaskManager::startSimulation | ( | ) | [pure virtual] |
Called by the owning scene to start the task graph.
virtual void physx::PxTaskManager::stopSimulation | ( | ) | [pure virtual] |
Called by the owning scene at the end of a simulation step to synchronize the PxGpuDispatcher.
virtual PxTaskID physx::PxTaskManager::submitNamedTask | ( | PxTask * | task, | |
const char * | name, | |||
PxTaskType::Enum | type = PxTaskType::TT_CPU | |||
) | [pure virtual] |
Submit a task with a unique name.
[in] | task | The task to be executed |
[in] | name | The unique name of a task |
[in] | type | The type of the task (default TT_CPU) |
virtual PxTaskID physx::PxTaskManager::submitUnnamedTask | ( | PxTask & | task, | |
PxTaskType::Enum | type = PxTaskType::TT_CPU | |||
) | [pure virtual] |
Submit an unnamed task.
[in] | task | The task to be executed |
[in] | type | The type of the task (default TT_CPU) |
virtual void physx::PxTaskManager::taskCompleted | ( | PxTask & | task | ) | [pure virtual] |
Called by the worker threads to inform the PxTaskManager that a task has completed processing.
[in] | task | The task which has been completed |
Referenced by physx::PxTask::release().
friend class PxBaseTask [friend] |
friend class PxGpuWorkerThread [friend] |
friend class PxLightCpuTask [friend] |
friend class PxTask [friend] |