Rhino C++ API
8.10
|
#include <RhRdkPlugIn.h>
Classes | |
class | CRhRdkRenderOutputType |
class | RENDER_ARCTIC_OPTIONS |
Public Types | |
enum | PreviewRenderTypes : int { PreviewRenderTypes::None = 0, PreviewRenderTypes::ThreeSeparateImages = 1, PreviewRenderTypes::SingleImage = 2, PreviewRenderTypes::Progressive = 3 } |
enum | QuickPreviewReason : unsigned int { QuickPreviewReason::ContentChanged = 0, QuickPreviewReason::ViewChanged = 1, QuickPreviewReason::RefreshDisplay = 2, QuickPreviewReason::UpdateBitmap = 3, QuickPreviewReason::Other = 99 } |
![]() | |
enum | ePlugInType { rdkPlugIn = 0, rdkRenderPlugIn = 1, force32bit_pit = 0xFFFFFFFF } |
Public Member Functions | |
virtual | ~CRhRdkRenderPlugIn () |
virtual void | AbortRender (void)=0 |
virtual void | AddCustomRenderSettingsSections (RhRdkUiModalities m, ON_SimpleArray< IRhinoUiSection * > &aSections) const |
virtual void | AddCustomSunSections (RhRdkUiModalities m, ON_SimpleArray< IRhinoUiSection * > &aSections) const |
virtual bool | AllowChooseContent (const CRhRdkContent &content) const |
virtual RDK_DEPRECATED HBITMAP | CreatePreview (const class CSize &sizeImage, const CRhRdkTexture &texture) |
virtual RDK_DEPRECATED HBITMAP | CreatePreview (const class CSize &sizeImage, eRhRdkRenderQuality quality, const IRhRdkPreviewSceneServer *pSceneServer) |
virtual bool | CreatePreview (const ON_2iSize &sizeImage, const CRhRdkTexture &texture, CRhinoDib &dibOut) |
virtual bool | CreatePreview (const ON_2iSize &sizeImage, RhRdkPreviewQuality qual, const IRhRdkPreviewSceneServer *pSceneServer, IRhRdkPreviewCallbacks *pNotify, CRhinoDib &dibOut) |
virtual bool | CreateQuickPreview (const ON_2iSize &size, const IRhRdkPreviewSceneServer &ss, QuickPreviewReason reason, CRhinoDib &dibOut) |
ON_wString | CustomChannelName (const UUID &uuidChan) const |
virtual const IRhRdkDecalSupport * | DecalSupport (void) const |
virtual bool | DisableAutoUpdatePreview (void) const |
virtual bool | DisplaysUniversalContent (void) const |
virtual void * | EVF (const wchar_t *wszFunc, void *pvData) override |
const IRhRdkContentChoosingInfo * | GetContentChoosingInfo (UINT_PTR uReserved=0) const |
virtual void | GetCustomRenderSaveFileTypes (ON_ClassArray< CRhRdkFileType > &aFileType) const |
ON_UUID | InitialChannelToDisplay (void) const |
virtual bool | Initialize (void) override |
bool | IsTextureSupported (const CRhRdkTexture &texture) const |
virtual void | OutputTypes (ON_ClassArray< CRhRdkRenderOutputType > &outputTypes) const |
virtual ePlugInType | PlugInType (void) const override |
virtual bool | PreferBasicContent (void) const |
virtual PreviewRenderTypes | PreviewRenderType (void) const |
virtual CRhinoCommand::result | RenderArctic (const CRhinoCommandContext &rrc, const RENDER_ARCTIC_OPTIONS &) const |
virtual void | RenderSettingsSections (OUT ON_SimpleArray< UUID > &aSections) const |
void | RenderWindowTabsToRemove (ON_SimpleArray< ON_UUID > &a) const |
virtual bool | SaveCustomRenderFile (const wchar_t *wszFilename, CRhRdkFileType &type, const UUID &uuidRenderSession, bool bSaveAlpha) const |
void | SupportedChannels (OUT ON_SimpleArray< UUID > &aChan) const |
virtual bool | SupportsFeature (const UUID &uuidFeature) const |
virtual void | UiContentTypes (OUT ON_SimpleArray< UUID > &aTypes) const |
![]() | |
virtual | ~CRhRdkPlugIn () |
virtual RDK_DEPRECATED void | AddCustomEditorActions (IRhRdkActions &, const IRhRdkContentEditor &) const |
virtual RDK_DEPRECATED void | AddCustomEditorMenu (IRhRdkMenu &, const IRhRdkContentEditor &) const |
virtual RDK_DEPRECATED void | AddCustomEditorToolButtons (IRhRdkToolbar &, const IRhRdkContentEditor &) const |
virtual RDK_DEPRECATED bool | AddCustomPlugIn (IRhRdkCustomPlugIn *pPlugIn) const |
void | AddCustomUISections (IRhRdkExpandableContentUI &ui) const |
virtual bool | AddExtension (CRhRdkExtension *pExtension) const |
virtual void | ChangeContentInstanceId (IRhRdkPlugInUsedContentNotifier &ucn) |
virtual RDK_DEPRECATED void | EnableNonModalWindows (bool) const |
virtual UUID | GetLicenseCode (const UUID &uuidRequestCode) const |
virtual CRhRdkVariant | GetParameter (const wchar_t *wszName) const |
virtual bool | Icon (CRhinoDib &dibOut) const |
virtual bool | OnAssignMaterial (HWND hwndParent, ON_Material &material) |
virtual bool | OnEditMaterial (HWND hwndParent, ON_Material &material) |
virtual bool | OverrideSunViewportDisplay (void) const |
virtual UUID | PlugInId (void) const =0 |
virtual RDK_DEPRECATED void | PlugInRdkVersion (int &iMajorVersion, int &iMinorVersion, int &iBetaRelease) const |
virtual RDK_DEPRECATED void | RegisterCompoundContentImplementors (IRhRdkCompoundContentImplementors &ccis) const |
virtual RDK_DEPRECATED void | RegisterContent (IRhRdkContentFactories &) const |
virtual RDK_DEPRECATED void | RegisterContentIOPlugIns (IRhRdkContentIOPlugIns &ciop) const |
virtual RDK_DEPRECATED void | RegisterCustomPlugIns (void) const |
virtual RDK_DEPRECATED void | RegisterCustomRenderMeshProviders (IRhRdkCustomRenderMeshManager &crmm) const |
virtual void | RegisterExtensions (void) const |
virtual RDK_DEPRECATED void | RegisterPostEffectPlugIns (IRhRdkPostEffectPlugInFactories &pepf) const |
bool | RemoveExtension (CRhRdkExtension *pExtension) const |
virtual void | ReportUsedContent (IRhRdkPlugInUsedContentNotifier &ucn) |
virtual CRhinoPlugIn & | RhinoPlugIn (void) const =0 |
virtual bool | SetParameter (const wchar_t *wszName, const CRhRdkVariant &vValue) |
virtual bool | SupportsCustomPlugIn (const UUID &uuidInterfaceId) const |
virtual void | Uninitialize (void) |
virtual RDK_DEPRECATED void | UpdateCustomEditorActions (IRhRdkActions &, const IRhRdkContentEditor &) const |
![]() | |
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) |
Protected Member Functions | |
CRhRdkRenderPlugIn () | |
virtual void | CreateDefaultContent (CRhinoDoc *pDoc=RhinoApp().ObsoleteActiveDoc()) const |
virtual void | EnsureDefaultContent (CRhinoDoc *pDoc=RhinoApp().ObsoleteActiveDoc()) const override |
![]() | |
CRhRdkPlugIn () | |
Additional Inherited Members | |
![]() | |
static UINT | QueryFocusMessageNumber (void) |
![]() | |
static void | CheckMemory (void) |
static void | PopulateDebuggingInfo (void) |
Use this base class if your RDK plug-in is a Rhino render plug-in. This is the main connection between your renderer and RDK. You must create a subclass and implement the pure virtual functions so that RDK can communicate with your renderer.
|
strong |
Preview renderer type.
Enumerator | |
---|---|
None | |
ThreeSeparateImages | |
SingleImage | |
Progressive |
|
strong |
|
virtual |
|
protected |
|
pure virtual |
You must implement this function to abort rendering (if possible).
|
virtual |
You can optionally override this method to add custom sections to the Render Settings dialog. You should add new instances of your sections to the array as follows:
m | is the modality of the Render Settings dialog. See note above. |
aSections | is the array to append your custom dialogs to. |
|
virtual |
You can optionally override this method to add custom sections to the Sun dialog. You should add new instances of your sections to the array as follows:
m | is the modality of the Sun dialog. See note above. |
aSections | is the array to append your custom dialogs to. |
|
virtual |
Override this function and return false if you don't want to allow a certain content type to be picked from the content browser by the user during, for example, 'Create New...', etc. while your render engine is current.
|
protectedvirtual |
You can optionally override this method to create extra default content for your renderer in addition to any content in the default content folder. If you override this method, please be sure to call the base class.
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
This method is deprecated in favor of the one below.
|
virtual |
Implement this method to create the preview bitmap that will appear in the content editor's thumbnail display when previewing textures.
dibOut | accepts the new bitmap if the function returns true. |
|
virtual |
Implement this method to create the preview image that will appear in the content editor's thumbnail display when previewing materials and environments.
pNotify | points to an interface for updating the preview midway through a progressive rendering. The implementer gets to decide how many intermediate images to deliver. The final image should still be returned when the function returns. This parameter is only valid when PreviewRenderType() returns 'Progressive'. Otherwise it will be null. |
sizeImage | is the size of the image to create, in pixels. |
qual | is the required preview quality. |
pSceneServer | is a pointer to an object describing the scene to show in the preview. Note that this pointer might be null in exceptional circumstances and you must check for null before using it. |
dibOut | accepts the preview image if the function returns true. |
|
virtual |
Optionally implement this method to change the way quick content previews are generated. By default, this is handled by the internal RDK OpenGL renderer and is based on the simulation of the content. If you want to implement an instant render based on the actual content parameters, or if you just think you can do a better job, override this method.
size | is the size of the required preview, in pixels. |
ss | is the scene server that defines the preview scene. |
reason | is the reason for the call. |
dibOut | accepts the preview imagery if the method returns true. |
ON_wString CRhRdkRenderPlugIn::CustomChannelName | ( | const UUID & | uuidChan | ) | const |
Helper function. Calls EVF(L"CustomChannelName"). Override EVF() to implement this. Return the localized name of your custom channel.
|
virtual |
You can optionally override this method to return a pointer to an implementation of IRhRdkDecalSupport. The default returns nullptr (not implemented).
|
virtual |
Override this method and return true to prevent RDK from automatically updating thumbnail previews.
|
virtual |
|
overrideprotectedvirtual |
Reimplemented from CRhRdkPlugIn.
|
overridevirtual |
Emergency virtual function for future expansion.
Reimplemented from CRhRdkPlugIn.
const IRhRdkContentChoosingInfo* CRhRdkRenderPlugIn::GetContentChoosingInfo | ( | UINT_PTR | uReserved = 0 | ) | const |
Get extra information about content choosing. Can be called from AllowChooseContent() to determine, for example, if content is being chosen as top-level or as a child.
|
virtual |
You can optionally override this method to add custom 'render save' file types to an array. These file types are used by the render window when the user chooses Save As. They will then be provided as additional file types after the default types such as BMP and JPEG.
aFileType | is the array to which you should add your custom file types. |
ON_UUID CRhRdkRenderPlugIn::InitialChannelToDisplay | ( | void | ) | const |
Helper function. Calls EVF(L"InitialChannelToDisplay"). Override EVF() to implement this. Return the initial channel to display in the render window. By default, IRhRdkRenderWíndow::chanRGBA. (pvData = UUID*)
|
overridevirtual |
Initializes the plug-in. Override this method to perform additional initialization. please be sure to call the base class.
Reimplemented from CRhRdkPlugIn.
bool CRhRdkRenderPlugIn::IsTextureSupported | ( | const CRhRdkTexture & | texture | ) | const |
Helper function. Calls EVF(L"IsTextureSupported"). Override EVF() to implement this. Returns true if this renderer can render the texture natively without needing it to be baked into a bitmap, false otherwise. By default, returns false for all textures.
|
virtual |
Implement this function to return a list of output types which your renderer can write. The default implementation returns the list supported by CRhinoDib - bmp, jpg, png, tif, tga.
|
inlineoverridevirtual |
Reimplemented from CRhRdkPlugIn.
|
virtual |
|
virtual |
Override this method to specify a different type of preview rendering. The default is ThreeSeparateImages, and this will work for most cases, including no preview support if you follow the comments for CreatePreview() below. This function is really meant to give a hint to the framework, and may be used to facilitate different preview systems later on. If you don't know what to return here, just don't override the method.
|
virtual |
Override this function to implement a custom version of RenderArctic for your engine.
|
virtual |
Override this method to provide the UUIDs of all sections that should be displayed in the Render Settings tab when this is the current renderer. The default implementation adds all the RDK's built-in Render Settings sections. These UUIDs start with the prefix 'uuidRenderSettingsSection'. They can be found in RhRdkUuids.h
aSections | accepts the UUIDs of the desired render settings sections. |
void CRhRdkRenderPlugIn::RenderWindowTabsToRemove | ( | ON_SimpleArray< ON_UUID > & | a | ) | const |
Implement this method to specify other tabs that you would like to remove from view. You can remove any of the three built-in post effect tabs. If you don't want to remove any tabs, just implement this method as a no-op stub. If you want to remove all other built-in tabs, add ON_nil_uuid to the array.
|
virtual |
You can optionally override this method to save your custom 'render save' file types. This method is called when the user does Save As from a render window and chooses one of the custom file types that was added by GetCustomRenderSaveFileTypes().
wszFilename | is the full path to the file to save to. |
type | is the file type of the file being saved. |
uuidRenderSession | is the render session id of the render window. |
bSaveAlpha | is true if the 'Save alpha channel' check box is checked on the save file dialog. |
void CRhRdkRenderPlugIn::SupportedChannels | ( | OUT ON_SimpleArray< UUID > & | aChan | ) | const |
Helper function. Calls EVF(L"SupportedChannels"). Override EVF() to implement this. Return a list of channels your renderer supports. Custom channels are allowed.
|
virtual |
|
virtual |
Override this method to provide the UUIDs of all content types that should be presented to the user in the types combo box or the [+] button types menu when this is the current renderer. The default implementation adds only RDK's built-in types. RDK automatically adds types in the most efficient way to minimize list length. If you override this method, you may call the base class first to add the built-in types, then add a separator followed by your own types. Or you may omit the base class call and add only chosen types yourself, followed by a separator and your own types. A 'More Types...' item is automatically added when needed by the RDK. Specify a separator by adding uuidUiContentType_Separator.
aTypes | accepts the types (optionally including uuidUiContentType_Separator). |