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

#include <RhRdkNewPostEffectPlugIn.h>


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 ( )

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.

jobis the job that will be executed asynchronously (on a thread).
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.
true if successful, else false.