RavEngine
Loading...
Searching...
No Matches
physx::PxTaskManager Class Referenceabstract

The PxTaskManager interface. More...

#include <PxTaskManager.h>

Inheritance diagram for physx::PxTaskManager:
[legend]

Public Member Functions

virtual void setCpuDispatcher (PxCpuDispatcher &ref)=0
 Set the user-provided dispatcher object for CPU tasks.
 
virtual PxCpuDispatcher * getCpuDispatcher () const =0
 Get the user-provided dispatcher object for CPU 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.
 
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::eCPU)=0
 Submit a task with a unique name.
 
virtual PxTaskID submitUnnamedTask (PxTask &task, PxTaskType::Enum type=PxTaskType::eCPU)=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 *=NULL)
 Construct a new PxTaskManager instance with the given [optional] dispatchers.
 

Friends

class PxBaseTask
 
class PxTask
 
class PxLightCpuTask
 

Detailed Description

The PxTaskManager interface.

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.

See also
PxCpuDispatcher

Member Function Documentation

◆ getCpuDispatcher()

virtual PxCpuDispatcher * physx::PxTaskManager::getCpuDispatcher ( ) const
pure virtual

Get the user-provided dispatcher object for CPU tasks.

Returns
The CPU dispatcher object.
See also
PxCpuDispatcher

Implemented in physx::PxTaskMgr.

◆ getNamedTask()

virtual PxTaskID physx::PxTaskManager::getNamedTask ( const char *  name)
pure 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

Implemented in physx::PxTaskMgr.

◆ getTaskFromID()

virtual PxTask * physx::PxTaskManager::getTaskFromID ( PxTaskID  id)
pure 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

Implemented in physx::PxTaskMgr.

◆ release()

virtual void physx::PxTaskManager::release ( )
pure virtual

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

Implemented in physx::PxTaskMgr.

◆ resetDependencies()

virtual void physx::PxTaskManager::resetDependencies ( )
pure virtual

Reset any dependencies between Tasks.

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

Implemented in physx::PxTaskMgr.

◆ setCpuDispatcher()

virtual void physx::PxTaskManager::setCpuDispatcher ( PxCpuDispatcher &  ref)
pure virtual

Set the user-provided dispatcher object for CPU tasks.

Parameters
[in]refThe dispatcher object.
See also
PxCpuDispatcher

Implemented in physx::PxTaskMgr.

◆ startSimulation()

virtual void physx::PxTaskManager::startSimulation ( )
pure 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

Implemented in physx::PxTaskMgr.

◆ stopSimulation()

virtual void physx::PxTaskManager::stopSimulation ( )
pure virtual

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

Implemented in physx::PxTaskMgr.

◆ submitNamedTask()

virtual PxTaskID physx::PxTaskManager::submitNamedTask ( PxTask *  task,
const char *  name,
PxTaskType::Enum  type = PxTaskType::eCPU 
)
pure 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

Implemented in physx::PxTaskMgr.

◆ submitUnnamedTask()

virtual PxTaskID physx::PxTaskManager::submitUnnamedTask ( PxTask &  task,
PxTaskType::Enum  type = PxTaskType::eCPU 
)
pure 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

Implemented in physx::PxTaskMgr.

◆ taskCompleted()

virtual void physx::PxTaskManager::taskCompleted ( PxTask &  task)
pure virtual

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

Parameters
[in]taskThe task which has been completed

Implemented in physx::PxTaskMgr.


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