27#ifndef PX_TASK_MANAGER_H
28#define PX_TASK_MANAGER_H
30#include "foundation/PxSimpleTypes.h"
31#include "foundation/PxErrorCallback.h"
41typedef unsigned int PxTaskID;
61 TT_CPU PX_DEPRECATED =
eCPU,
184 virtual void finishBefore(
PxTask& task, PxTaskID taskID) = 0;
185 virtual void startAfter(
PxTask& task, PxTaskID taskID) = 0;
187 virtual void addReference(PxTaskID taskID) = 0;
188 virtual void decrReference(PxTaskID taskID) = 0;
189 virtual int32_t getReference(PxTaskID taskID)
const = 0;
Base class of all task types.
Definition PxTask.h:45
A CpuDispatcher is responsible for scheduling the execution of tasks passed to it by the SDK.
Definition PxCpuDispatcher.h:50
User defined interface class. Used by the library to emit debug information.
Definition PxErrorCallback.h:51
A PxBaseTask implementation with immediate execution and simple dependencies.
Definition PxTask.h:209
The PxTaskManager interface.
Definition PxTaskManager.h:81
virtual void taskCompleted(PxTask &task)=0
Called by the worker threads to inform the PxTaskManager that a task has completed processing.
virtual PxTaskID submitUnnamedTask(PxTask &task, PxTaskType::Enum type=PxTaskType::eCPU)=0
Submit an unnamed task.
virtual void stopSimulation()=0
Called by the owning scene at the end of a simulation step.
virtual void resetDependencies()=0
Reset any dependencies between Tasks.
virtual PxTaskID submitNamedTask(PxTask *task, const char *name, PxTaskType::Enum type=PxTaskType::eCPU)=0
Submit a task with a unique name.
static PxTaskManager * createTaskManager(PxErrorCallback &errorCallback, PxCpuDispatcher *=NULL)
Construct a new PxTaskManager instance with the given [optional] dispatchers.
Definition TaskManager.cpp:138
virtual void startSimulation()=0
Called by the owning scene to start the task graph.
virtual void release()=0
Release the PxTaskManager object, referenced dispatchers will not be released.
virtual void setCpuDispatcher(PxCpuDispatcher &ref)=0
Set the user-provided dispatcher object for CPU tasks.
virtual PxTaskID getNamedTask(const char *name)=0
Retrieve a task by name.
virtual PxTask * getTaskFromID(PxTaskID id)=0
Retrieve a task given a task ID.
virtual PxCpuDispatcher * getCpuDispatcher() const =0
Get the user-provided dispatcher object for CPU tasks.
A PxBaseTask implementation with deferred execution and full dependencies.
Definition PxTask.h:111
#define PX_DEPRECATED
Definition PxPreprocessor.h:418
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Identifies the type of each heavyweight PxTask object.
Definition PxTaskManager.h:52
Enum
Identifies the type of each heavyweight PxTask object.
Definition PxTaskManager.h:57
@ eNOT_PRESENT
Return code when attempting to find a task that does not exist.
Definition PxTaskManager.h:59
@ eCOMPLETED
PxTask execution has been completed.
Definition PxTaskManager.h:60
@ eCPU
PxTask will be run on the CPU.
Definition PxTaskManager.h:58