Rhino C++ API
8.10
|
#include <RhRdkNewPostEffectPlugIn.h>
Classes | |
class | IState |
Public Types | |
enum | : unsigned int { uf_ExecuteForProductionRendering = 0x0001, uf_ExecuteForRealtimeRendering = 0x0002, uf_ExecuteForViewportDisplay = 0x0004, uf_Fixed = 0x0100, uf_DefaultShown = 0x0200, uf_DefaultOn = 0x0400, uf_UsesRenderingSettings = 0x0800 } |
enum | ExecuteWhileRenderingOptions { ExecuteWhileRenderingOptions::Never, ExecuteWhileRenderingOptions::Always, ExecuteWhileRenderingOptions::UseDelay } |
enum | Types : int { Types::Early, Types::ToneMapping, Types::Late } |
Public Member Functions | |
virtual | ~IRhRdkPostEffect () |
virtual void | AddUISections (class IRhRdkPostEffectUI &ui)=0 |
virtual IRhRdkPostEffect & | BeginChange (RhRdkChangeContext cc) const =0 |
virtual unsigned int | BitFlags (void) const =0 |
virtual bool | CanDisplayHelp (void) const =0 |
virtual bool | CanExecute (const class IRhRdkPostEffectPipeline &pepl) const =0 |
virtual void | Changed (void)=0 |
virtual ON__UINT32 | CRC (void) const =0 |
virtual bool | DisplayHelp (void) const =0 |
virtual bool | EndChange (void)=0 |
virtual void * | EVF (const wchar_t *wszFunc, void *pvData)=0 |
virtual bool | Execute (IRhRdkPostEffectPipeline &pepl, const ON_4iRect &rect) const =0 |
virtual int | ExecuteWhileRenderingDelayMS (void) const =0 |
virtual ExecuteWhileRenderingOptions | GetExecuteWhileRenderingOption (void) const =0 |
virtual bool | GetParameter (const wchar_t *wszName, OUT CRhRdkVariant &vValue) const =0 |
virtual UUID | Id (void) const =0 |
virtual bool | IsActive (void) const =0 |
virtual bool | IsSelected (void) const =0 |
virtual bool | IsVisible (void) const =0 |
virtual const IRhRdkListablePostEffect * | Listable (void) const =0 |
virtual IRhRdkListablePostEffect * | Listable (void)=0 |
virtual ON_wString | LocalName (void) const =0 |
virtual RDK_DEPRECATED bool | ReadFromDocumentDefaults (const CRhinoDoc &doc)=0 |
bool | ReadFromRenderSettings (const ON_3dmRenderSettings &rs) |
virtual bool | ReadState (const IState &state)=0 |
virtual void | RequiredChannels (OUT ON_SimpleArray< UUID > &aChan) const =0 |
virtual void | ResetToFactoryDefaults (void)=0 |
virtual void | SetManager (class CRhRdkPostEffectManager &)=0 |
virtual bool | SetParameter (const wchar_t *wszName, const CRhRdkVariant &vValue)=0 |
virtual Types | Type (void) const =0 |
virtual bool | WriteState (IState &state) const =0 |
virtual RDK_DEPRECATED bool | WriteToDocumentDefaults (CRhinoDoc &doc) const =0 |
bool | WriteToRenderSettings (ON_3dmRenderSettings &rs) const |
This is the new post effect interface. It is implemented by both the RDK for built-in post effects and (partly) by 3rd-party plug-ins for custom post effects.
In the new system, post effects consist of:
Post effects can be implemented to run on the CPU or the GPU at the discretion of the implementer.
The post-processing runs in a 'pipeline' as follows:
Old system (V5, V6) New system (V7+)
anonymous enum : unsigned int |
|
strong |
|
strong |
|
inlinevirtual |
|
pure virtual |
Create each of your UI sections using 'new' and then call ui.AddSection() on them. RDK takes ownership of the sections. If your post effect does not need a UI, then your implementation of this method can be a no-op.
|
pure virtual |
Call this method to get a non-const object upon which you can call non-const methods. Calls to this method are counted; you must call EndChange() once for every call to BeginChange(). Please do not use const_cast or any other means of circumventing this requirement.
Implemented in CRhRdkPostEffect.
|
pure virtual |
Flags describing when the post effect executes and its attributes. See enum above.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Called when the state of the post effect is changed. If your post effect subclass implements a member variable that affects rendering and/or appears in the post effect's user interface, then you should call this method from your Set... method when the Set... method detects a change to the value of the member.
Implemented in CRhRdkPostEffect.
|
pure virtual |
Implemented in CRhRdkPostEffect.
|
pure virtual |
Displays the post effect's help page, if any.
|
pure virtual |
Call this method after finishing a batch of changes. You must call EndChange() once for every call to BeginChange().
Implemented in CRhRdkPostEffect.
|
pure virtual |
Emergency virtual function for future expansion.
Implemented in CRhRdkPostEffect.
|
pure virtual |
Execute the post effect.
pepl | provides access to the post-effect pipeline. |
rect | is the pixel area to process. |
|
pure virtual |
If GetExecuteWhileRenderingOption() returns UseDelay then this method returns the delay in milliseconds before the post effect should execute for the first time. After the first time, the post effect will execute every time the dib is updated during rendering.
Implemented in CRhRdkPostEffect.
|
pure virtual |
As rendering proceeds, in order for progress to be seen on the screen, small areas of the frame buffer that have been rendered are post-processed and written to an area of the dib which is then shown on the screen. Some post effects will not be able to support this as they need the whole frame buffer in order to operate. This method allows a post effect to report whether or not it is able to support execution during rendering, and if so, when it should be done.
|
pure virtual |
Get a parameter.
wszName | is the name of the parameter to get. |
vValue | accepts the parameter value. |
|
pure virtual |
|
pure virtual |
Implemented in CRhRdkPostEffect.
|
pure virtual |
Implemented in CRhRdkPostEffect.
|
pure virtual |
Implemented in CRhRdkPostEffect.
|
pure virtual |
Get the listable interface (const version). Returns null if the post effect is not listable. Therefore, it only returns an object if it's an early or late post effect.
Implemented in CRhRdkPostEffect.
|
pure virtual |
Get the listable interface. Returns null if the post effect is not listable. Therefore, it only returns an object if it's an early or late post effect.
Implemented in CRhRdkPostEffect.
|
pure virtual |
|
pure virtual |
Because post effects are now in the render settings, this function can no longer be called. ReadFromRenderSettings() is called instead.
Implemented in CRhRdkPostEffect.
bool IRhRdkPostEffect::ReadFromRenderSettings | ( | const ON_3dmRenderSettings & | rs | ) |
|
pure virtual |
Read the state. If your post effect has no state, you must still return true for success.
|
pure virtual |
The RDK calls this method to determine which channels a post effect requires. If a required channel is not available, the RDK will hide the post effect's UI and display explanatory text instead.
aChan | accepts the channels. The post effect should add all channels used by its implementation to this array. The post effect should not clear the array as other post effects may have previously added their channels to it. |
Implemented in CRhRdkPostEffect.
|
pure virtual |
Reset the state to factory defaults.
|
pure virtual |
Implemented in CRhRdkPostEffect.
|
pure virtual |
Set a parameter.
wszName | is the name of the parameter to get. |
vValue | specifies the type and value to set. |
|
pure virtual |
Implemented in CRhRdkPostEffect.
|
pure virtual |
Write the state. If your post effect has no state, you must still return true for success.
|
pure virtual |
Because post effects are now in the render settings, this function can no longer be called. WriteToRenderSettings() is called instead.
Implemented in CRhRdkPostEffect.
bool IRhRdkPostEffect::WriteToRenderSettings | ( | ON_3dmRenderSettings & | rs | ) | const |