Rhino C++ API  8.7
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
CRhRdkPostEffect Class Reference

#include <RhRdkNewPostEffectPlugIn.h>

Inheritance diagram for CRhRdkPostEffect:
CRhRdkObject IRhRdkPostEffect CRhRdkEarlyPostEffect CRhRdkLatePostEffect CRhRdkToneMappingPostEffect

Public Member Functions

 CRhRdkPostEffect (IRhRdkPostEffect::Types type)
 
virtual ~CRhRdkPostEffect ()
 
virtual IRhRdkPostEffectBeginChange (RhRdkChangeContext cc) const override
 
virtual bool CanExecute (const IRhRdkPostEffectPipeline &) const override
 
virtual void Changed (void) override
 
void CopyParamsFrom (const ON_3dmRenderSettings &rs)
 
void CopyParamsTo (ON_3dmRenderSettings &rs) const
 
virtual ON__UINT32 CRC (void) const final override
 
virtual bool EndChange (void) override
 
virtual void * EVF (const wchar_t *wszFunc, void *pvData) override
 
virtual int ExecuteWhileRenderingDelayMS (void) const override
 
virtual bool IsActive (void) const final override
 
virtual bool IsSelected (void) const final override
 
virtual bool IsVisible (void) const override
 
virtual const IRhRdkListablePostEffectListable (void) const override
 
virtual IRhRdkListablePostEffectListable (void) override
 
virtual bool ReadFromDocumentDefaults (const CRhinoDoc &doc) override
 
bool ReadFromRenderSettings (const ON_3dmRenderSettings &rs)
 
virtual void RequiredChannels (OUT ON_SimpleArray< UUID > &aChan) const override
 
virtual void SetManager (class CRhRdkPostEffectManager &man) final override
 
virtual Types Type (void) const final override
 
virtual bool WriteToDocumentDefaults (CRhinoDoc &doc) const override
 
bool WriteToRenderSettings (ON_3dmRenderSettings &rs) const
 
- Public Member Functions inherited from CRhRdkObject
 CRhRdkObject ()
 
virtual ~CRhRdkObject ()
 
void operator delete (void *buf)
 
void operator delete[] (void *buf)
 
void * operator new (size_t size)
 
void * operator new[] (size_t size)
 
- Public Member Functions inherited from IRhRdkPostEffect
virtual ~IRhRdkPostEffect ()
 
virtual void AddUISections (class IRhRdkPostEffectUI &ui)=0
 
virtual unsigned int BitFlags (void) const =0
 
virtual bool CanDisplayHelp (void) const =0
 
virtual bool CanExecute (const class IRhRdkPostEffectPipeline &pepl) const =0
 
virtual bool DisplayHelp (void) const =0
 
virtual bool Execute (IRhRdkPostEffectPipeline &pepl, const ON_4iRect &rect) 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 ON_wString LocalName (void) const =0
 
bool ReadFromRenderSettings (const ON_3dmRenderSettings &rs)
 
virtual bool ReadState (const IState &state)=0
 
virtual void ResetToFactoryDefaults (void)=0
 
virtual bool SetParameter (const wchar_t *wszName, const CRhRdkVariant &vValue)=0
 
virtual bool WriteState (IState &state) const =0
 
bool WriteToRenderSettings (ON_3dmRenderSettings &rs) const
 

Public Attributes

CImpl * m_pImpl
 

Protected Member Functions

CImpl * Impl (void)
 
const CImpl * Impl (void) const
 

Additional Inherited Members

- Public Types inherited from IRhRdkPostEffect
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 }
 
- Static Public Member Functions inherited from CRhRdkObject
static void CheckMemory (void)
 
static void PopulateDebuggingInfo (void)
 

Constructor & Destructor Documentation

◆ CRhRdkPostEffect()

CRhRdkPostEffect::CRhRdkPostEffect ( IRhRdkPostEffect::Types  type)

◆ ~CRhRdkPostEffect()

virtual CRhRdkPostEffect::~CRhRdkPostEffect ( )
virtual

Member Function Documentation

◆ BeginChange()

virtual IRhRdkPostEffect& CRhRdkPostEffect::BeginChange ( RhRdkChangeContext  cc) const
overridevirtual

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.

Implements IRhRdkPostEffect.

◆ CanExecute()

virtual bool CRhRdkPostEffect::CanExecute ( const IRhRdkPostEffectPipeline ) const
overridevirtual

◆ Changed()

virtual void CRhRdkPostEffect::Changed ( void  )
overridevirtual

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.

Implements IRhRdkPostEffect.

◆ CopyParamsFrom()

void CRhRdkPostEffect::CopyParamsFrom ( const ON_3dmRenderSettings rs)

◆ CopyParamsTo()

void CRhRdkPostEffect::CopyParamsTo ( ON_3dmRenderSettings rs) const

◆ CRC()

virtual ON__UINT32 CRhRdkPostEffect::CRC ( void  ) const
finaloverridevirtual
Returns
A CRC of the state of this post effect.

Implements IRhRdkPostEffect.

◆ EndChange()

virtual bool CRhRdkPostEffect::EndChange ( void  )
overridevirtual

Call this method after finishing a batch of changes. You must call EndChange() once for every call to BeginChange().

Returns
true if successful, else false.

Implements IRhRdkPostEffect.

◆ EVF()

virtual void* CRhRdkPostEffect::EVF ( const wchar_t *  wszFunc,
void *  pvData 
)
overridevirtual

Emergency virtual function for future expansion.

Implements IRhRdkPostEffect.

◆ ExecuteWhileRenderingDelayMS()

virtual int CRhRdkPostEffect::ExecuteWhileRenderingDelayMS ( void  ) const
overridevirtual

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.

See also
enum ExecuteWhileRenderingOptions above.

Implements IRhRdkPostEffect.

◆ Impl() [1/2]

CImpl* CRhRdkPostEffect::Impl ( void  )
protected

◆ Impl() [2/2]

const CImpl* CRhRdkPostEffect::Impl ( void  ) const
protected

◆ IsActive()

virtual bool CRhRdkPostEffect::IsActive ( void  ) const
finaloverridevirtual
Returns
true if the post effect is active. For early and late post effects, this is equivalent to 'shown' and 'on'. For tone-mapping post effects, this is equivalent to 'selected'.

Implements IRhRdkPostEffect.

◆ IsSelected()

virtual bool CRhRdkPostEffect::IsSelected ( void  ) const
finaloverridevirtual
Returns
true if the post effect is selected in the user interface.

Implements IRhRdkPostEffect.

◆ IsVisible()

virtual bool CRhRdkPostEffect::IsVisible ( void  ) const
overridevirtual
Returns
true if the post effect is visible to the user. For early and late post effects, this is equivalent to 'shown'. For tone-mapping post effects, this is equivalent to 'selected'.

Implements IRhRdkPostEffect.

◆ Listable() [1/2]

virtual const IRhRdkListablePostEffect* CRhRdkPostEffect::Listable ( void  ) const
overridevirtual

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.

Implements IRhRdkPostEffect.

◆ Listable() [2/2]

virtual IRhRdkListablePostEffect* CRhRdkPostEffect::Listable ( void  )
overridevirtual

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.

Implements IRhRdkPostEffect.

◆ ReadFromDocumentDefaults()

virtual bool CRhRdkPostEffect::ReadFromDocumentDefaults ( const CRhinoDoc doc)
overridevirtual

Because post effects are now in the render settings, this function can no longer be called. ReadFromRenderSettings() is called instead.

Implements IRhRdkPostEffect.

◆ ReadFromRenderSettings()

bool CRhRdkPostEffect::ReadFromRenderSettings ( const ON_3dmRenderSettings rs)

◆ RequiredChannels()

virtual void CRhRdkPostEffect::RequiredChannels ( OUT ON_SimpleArray< UUID > &  aChan) const
overridevirtual

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.

Parameters
aChanaccepts 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.
Note
As a convenience, the default implementation adds IRhRdkRenderWindow::chanRGBA to the output array. Most post effects should be able to use this default with no need to override the method.

Implements IRhRdkPostEffect.

◆ SetManager()

virtual void CRhRdkPostEffect::SetManager ( class CRhRdkPostEffectManager &  man)
finaloverridevirtual

Implements IRhRdkPostEffect.

◆ Type()

virtual Types CRhRdkPostEffect::Type ( void  ) const
finaloverridevirtual
Returns
the Type of this post effect.

Implements IRhRdkPostEffect.

◆ WriteToDocumentDefaults()

virtual bool CRhRdkPostEffect::WriteToDocumentDefaults ( CRhinoDoc doc) const
overridevirtual

Because post effects are now in the render settings, this function can no longer be called. WriteToRenderSettings() is called instead.

Implements IRhRdkPostEffect.

◆ WriteToRenderSettings()

bool CRhRdkPostEffect::WriteToRenderSettings ( ON_3dmRenderSettings rs) const

Member Data Documentation

◆ m_pImpl

CImpl* CRhRdkPostEffect::m_pImpl