Rhino C++ API  8.12
Classes | Public Member Functions | Protected Member Functions | List of all members
IRhRdkPostEffectThreadEngine Class Referenceabstract

#include <RhRdkNewPostEffectPlugIn.h>

Classes

class  IJob
 

Public Member Functions

virtual void * EVF (const wchar_t *, void *)=0
 
virtual bool RunPostEffect (IJob &job, IRhRdkPostEffectPipeline &pepl, const IRhRdkPostEffect &pe, const ON_4iRect &rect, const ON_SimpleArray< UUID > &aChanId, void *pExtension)=0
 

Protected Member Functions

virtual ~IRhRdkPostEffectThreadEngine ()
 

Detailed Description

This class allows post effects to run asynchronously (off of the main thread) by queuing jobs that run on a worker thread. It is implemented by the RDK. Example usage:

bool CMyPostEffect::Execute(IRhRdkPostEffectPipeline& pepl, const ON_4iRect& rect) const { CMyPostEffectJob job(*this); // Implements IRhRdkPostEffectThreadEngine::IJob ON_SimpleArray<UUID> aChanId; aChanId.Append(IRhRdkRenderWindow::chanRGBA); aChanId.Append(...); return pepl.ThreadEngine().RunPostEffect(job, pepl, *this, rect, aChanId, nullptr); }

Constructor & Destructor Documentation

◆ ~IRhRdkPostEffectThreadEngine()

virtual IRhRdkPostEffectThreadEngine::~IRhRdkPostEffectThreadEngine ( )
inlineprotectedvirtual

Member Function Documentation

◆ EVF()

virtual void* IRhRdkPostEffectThreadEngine::EVF ( const wchar_t *  ,
void *   
)
pure virtual

Emergency virtual function for future expansion.

◆ RunPostEffect()

virtual bool IRhRdkPostEffectThreadEngine::RunPostEffect ( IJob job,
IRhRdkPostEffectPipeline pepl,
const IRhRdkPostEffect pe,
const ON_4iRect rect,
const ON_SimpleArray< UUID > &  aChanId,
void *  pExtension 
)
pure virtual

Called from a post effect's Execute() method to run the post effect asynchronously. Post effects are queued as 'jobs' and run in sequence on a worker thread.

Parameters
jobis the job that will be executed asynchronously (on a thread). The job is copied so that ownership of 'job' remains with the caller. Note that IJob& job should be const and this will be corrected the next time we can break the SDK.
peplis the post effect pipeline that was passed to the post effect's Execute() method.
peis the post effect being executed.
rectis the rectangle that was passed to the post effect's Execute() method.
aChanIdis an array of channel identifiers to the channels the post effect will process.
pExtensionis for future expansion and should be passed as nullptr.
Returns
true if successful, else false.