Main Page Class Hierarchy Compound List Compound Members Related Pages
RenderThread Class ReferenceThe class RenderThread encasulated a single OS thread that renders a part of the image.
More...
#include <RenderThread.h>
Inheritance diagram for RenderThread
[legend]Collaboration diagram for RenderThread:
[legend]List of all members.
Public Methods |
|
| RenderThread (RenderJob *pRenderJob,Scene *pScene,ImageWriter *pWriter) |
| | Constructor.
|
|
virtual | ~RenderThread () |
| | Destructor.
|
| void | setRenderParameter (long nWidth,long nHeight,int nFormat) |
| | Set the initial rendering parameters. More...
|
| void | setRenderTask (const Area &area,Strategy *pStrategy) |
| | Set the render task to do. More...
|
| void | getRenderTask (Area &area,Strategy *&rpStrategy) |
| | Query the currently prepared or performed rendering task. More...
|
Public Attributes |
|
bool | m_bLastThread |
Static Public Methods |
| RenderThread* | getInstance () throw (WrongContextError) |
| | getInstance returns the RenderThread instance of the current thread execution context. More...
|
Protected Methods |
|
virtual void | run () |
Protected Attributes |
|
Scene* | m_pScene |
|
ImageWriter* | m_pWriter |
|
Strategy* | pStrategy |
|
bool | m_bFinished |
|
long | nWidth |
|
long | nHeight |
|
Area | area |
|
int | nFormat |
Detailed Description
The class RenderThread encasulated a single OS thread that renders a part of the image.
It is taking tasks dispatched by the RenderJob (RenderJobImp) and renders them. The RenderThread returns it's results incrementally (asynchronosly) via the ImageWriter Callback object provided by the RenderJob. On terminated the ImageWriter::finishWriter is called and the RenderJob either let the thread terminate or dispatches another rendering task to the thread.
Member Function Documentation
|
RenderThread * RenderThread::getInstance (
|
) throw (WrongContextError) [static]
|
|
|
|
getInstance returns the RenderThread instance of the current thread execution context.
A WrongContextError is thrown if the current thread isn't a RenderThread.
Reimplemented from ContextThread. |
|
void RenderThread::getRenderTask (
|
Area & area,
|
|
Strategy *& rpStrategy )
|
|
|
|
Query the currently prepared or performed rendering task.
-
Parameters:
-
| area
|
the area to render |
| rpStrategy
|
the strategy to use to render this area |
|
|
void RenderThread::setRenderParameter (
|
long nWidth,
|
|
long nHeight,
|
|
int nFormat )
|
|
|
|
Set the initial rendering parameters.
-
Parameters:
-
| nWidth
|
total width of the whole image the rendering takes place on |
| nHeight
|
total height of the whole image the rendering takes place on |
| nFormat
|
the pixelformat the output should be (e.g. 8/16 Bit per channel, alpha channel settings) |
|
|
void RenderThread::setRenderTask (
|
const Area & area,
|
|
Strategy * pStrategy )
|
|
|
|
Set the render task to do.
-
Parameters:
-
| area
|
the area to render |
| pStrategy
|
the strategy to use to render this area |
|
The documentation for this class was generated from the following file:
|