OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::UniformScalableTask Class Referenceabstract

A uniform task is a highly parallelizable task that can be divided in many threads where all threads take near the same amount of time to perform. More...

#include <OgreUniformScalableTask.h>

Public Member Functions

virtual void execute (size_t threadId, size_t numThreads)=0
 Overload this function to perform whatever you want. More...
 

Detailed Description

A uniform task is a highly parallelizable task that can be divided in many threads where all threads take near the same amount of time to perform.

They're very simple and not many jobs fit the needs (usually a task-based solution used thread pools is preferred) but there is a prime candidate for this type of solution: Updating all nodes' position & orientation copied from the physics engine. Use it wherever it is accepted in Ogre. For example

See also
SceneManager::processUserScalableTask

Definition at line 45 of file OgreUniformScalableTask.h.

Member Function Documentation

virtual void Ogre::UniformScalableTask::execute ( size_t  threadId,
size_t  numThreads 
)
pure virtual

Overload this function to perform whatever you want.

It will be called from all worker threads at the same time.

Parameters
threadIdThe index of the thread it is being called from. An index is guaranteed to be in range [0; numThreads)
numThreadsNumber of total threads

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