Rhino C++ API
8.10
|
#include <RhRdkNewPostEffectPlugIn.h>
Classes | |
class | IChannel |
Public Member Functions | |
virtual | ~IRhRdkPostEffectPipeline () |
virtual bool | AllowGPU (void) const =0 |
virtual ON_2iSize | Dimensions (void) const =0 |
virtual void * | EVF (const wchar_t *wszFunc, void *pvData)=0 |
virtual bool | Execute (const ON_4iRect &rect, bool bRenderingIsInProgress, ExecuteContexts uc, Histograms flagsHistogramsToUpdate, unsigned int reserved=0, void *pReserved=nullptr)=0 |
virtual IRhRdkPostEffect * | FindPostEffect (const UUID &uuidPostEffect) const =0 |
virtual const IChannel * | GetChannelForRead (const UUID &uuidChannel, unsigned int flags) const =0 |
virtual IChannel * | GetChannelForWrite (const UUID &uuidChannel, unsigned int flags)=0 |
virtual ON__UINT64 | GetEndTimeInMilliseconds (void) const =0 |
virtual float | GetMaxLuminance (void) const =0 |
virtual void | GetPostEffects (OUT ON_SimpleArray< ON_UUID > &uuidPostEffects) const =0 |
virtual ON__UINT64 | GetStartTimeInMilliseconds (void) const =0 |
virtual bool | IsRendering (void) const =0 |
virtual UUID | RenderingId (void) const =0 |
virtual bool | ReportProgress (int rowsCompleted)=0 |
virtual void | SetStartTimeInMilliseconds (ON__UINT64 ms)=0 |
virtual class IRhRdkPostEffectThreadEngine & | ThreadEngine (void) const =0 |
Static Public Member Functions | |
static IRhRdkPostEffectPipeline * | New (IRhRdkRenderWindow &rw, const UUID &uuidShowingChannel, int creationFlags) |
This object provides a way for post effects to access the frame buffer channels from a rendering and create new channels containing post-processed information which can be passed to the next post effect in the chain.
Consider a simple post effect that just modifies the red component of a rendering. It will call GetChannelForRead() to get the RGBA channel as its input, and it will call GetChannelForWrite() to get a new RGBA channel for its output. It will then read the input channel, do calculations and write to the output channel. When finished, it will call IChannel::Commit() passing on the output channel. Because both channels have the same identifier, this will replace the old channel with the new one so that subsequent post effects in the chain will use the new channel instead of the original. Note that this will only replace the channel used by the pipeline. The original channel will still exist in the frame buffer. This system allows any post effect to access any number of channels for reading and create any number of new channels which may or may not replace existing channels depending on the channel id. The final stage (convert to 8-bit) operates on the channels left in the pipeline by the post effect chain to produce the final 32-bit RGBA image.
It is also possible for a post effect to create and use any number of 'scratch' channels. If a post effect needs a temporary pixel buffer for some intermediate results, it can call GetChannelForWrite() with a custom (random) id. Once it is finished with this scratch channel, it will automatically be discarded by the pipeline.
anonymous enum : int |
|
strong |
|
inlinevirtual |
|
pure virtual |
|
pure virtual |
Get the dimensions of the frame buffer. All channels in the frame buffer have the same dimensions.
|
pure virtual |
|
pure virtual |
Execute the pipeline. This executes all the post effects in order.
rect | is a rectangle within the frame buffer. Only this rectangle needs be modified by the post effects. |
bRenderingIsInProgress | is true if rendering is in progress (i.e., not yet completed). |
uc | provides the context that this pipeline is running in. |
flagsHistogramsToUpdate | is a set of flags specifying when to update the frame buffer's histograms. |
|
pure virtual |
|
pure virtual |
Get a channel for reading. A post effect will use this to get channel data as input to its process. Output will be written to new channel(s).
uuidChannel | is the channel identifier. |
flags | is for future use; you should pass zero. |
|
pure virtual |
Get a channel for writing. A post effect will use this to get channel(s) to write the output of its processing to. Input will usually come from existing channels, although a post effect is free to read its own output channels if needed.
uuidChannel | is the channel identifier. |
flags | is for future use; you should pass zero. |
|
pure virtual |
Get the end time of the rendering expressed in milliseconds since some unspecified epoch. Do not make assumptions about what the epoch is; it might be different on different platforms.
|
pure virtual |
Get the max luminance in the rendering.
|
pure virtual |
Get a list of the post effects to be executed by this pipeline in order.
|
pure virtual |
Get the start time of the rendering expressed in milliseconds since some unspecified epoch. Do not make assumptions about what the epoch is; it might be different on different platforms.
|
pure virtual |
|
static |
|
pure virtual |
|
pure virtual |
Post effects should call this during execution to report progress. A good strategy is to call this once per pixel row (or several rows). If the function returns false, your post effect should exit its pixel loop as the user has requested that the operation be canceled.
|
pure virtual |
Set the start time of the rendering in milliseconds since some unspecified epoch.
|
pure virtual |
Provides access to a thread engine that allows post effects to run off of the main thread.