Rhino C++ API  8.14
Public Member Functions | List of all members
CRhinoRenderPlugIn Class Referenceabstract

#include <rhinoSdkRenderPlugIn.h>

Inheritance diagram for CRhinoRenderPlugIn:
CRhinoPlugIn ON_Object

Public Member Functions

 CRhinoRenderPlugIn ()
 
 ~CRhinoRenderPlugIn ()
 
virtual BOOL32 CloseRenderWindow ()
 
virtual BOOL32 EnableAssignMaterialButton () const
 
virtual BOOL32 EnableCreateMaterialButton () const
 
virtual BOOL32 EnableEditMaterialButton (ON_Material &material, CRhinoDoc &doc) const
 
virtual BOOL32 OnAssignMaterial (HWND hwndParent, ON_Material &material, CRhinoDoc &doc)
 Optional overrides. More...
 
virtual BOOL32 OnCreateMaterial (HWND hwndParent, ON_Material &material, CRhinoDoc &doc)
 
virtual BOOL32 OnEditMaterial (HWND hwndParent, ON_Material &material, CRhinoDoc &doc)
 
virtual void OnSetCurrentRenderPlugIn (BOOL32 bCurrent)
 
plugin_type PlugInType () const override
 
virtual CRhinoCommand::result Render (const CRhinoCommandContext &context, bool render_preview)=0
 
virtual class IRhinoOptionsPageRenderDialogPage (CRhinoDoc &, HWND)
 
virtual LRESULT RenderPlugInProc (UINT message, WPARAM wParam, LPARAM lParam)
 This will be used to extend this class without breaking the SDK. More...
 
virtual CRhinoCommand::result RenderWindow (const CRhinoCommandContext &context, bool render_preview, CRhinoView *view, const LPRECT rect, bool bInWindow, bool bBlowUp)
 
virtual BOOL32 SaveRenderedImage (ON_wString wFileName)
 Message sent from script to save file. More...
 
- Public Member Functions inherited from CRhinoPlugIn
 CRhinoPlugIn ()
 
virtual ~CRhinoPlugIn ()
 
virtual void AddPagesToDocumentPropertiesDialog (CRhinoOptionsPageCollection &collection)
 
virtual void AddPagesToObjectPropertiesDialog (CRhinoPropertiesPanelPageCollection &collection)
 
virtual void AddPagesToOptionsDialog (CRhinoOptionsPageCollection &collection)
 
virtual BOOL32 AddToPlugInHelpMenu () const
 
virtual BOOL32 CallWriteDocument (const CRhinoFileWriteOptions &options)
 
const ON_SimpleArray< CRhinoCommand * > & CommandList () const
 
bool DisplayPlugInErrorDialog (const wchar_t *message) const
 
const ON_UUID GetLicenseId ()
 
virtual void GetMenuMessageString (HMENU hMenu, UINT nID, ON_wString &wMessage) const
 
BOOL32 GetPlugInFileName (ON_wString &result) const
 
BOOL32 GetPlugInFolder (ON_wString &result) const
 
virtual LPUNKNOWN GetPlugInObjectInterface (const ON_UUID &iid)
 
BOOL32 GetPlugInRegistryKey (ON_wString &result) const
 
class CRhPlugInPrivate * GetPrivateData ()
 Get extended data from plug-in. More...
 
BOOL32 InsertPlugInItemToRhinoMenu (HMENU hTargetMenu, UINT index, MENUITEMINFO *pMi)
 
BOOL32 InsertPlugInMenuToRhinoMenu (HMENU hmenu, int index)
 
BOOL32 InsertPlugInMenuToRhinoMenu (HMENU hmenu, LPCTSTR title)
 
bool IsRhinoCommonPlugIn () const
 
virtual void LoadProfile (LPCTSTR lpszSection, CRhinoProfileContext &pc)
 
virtual const wchar_t * LocalPlugInDescription () const
 
virtual const wchar_t * LocalPlugInName () const
 
virtual BOOL32 OnDisplayPlugInHelp (HWND hWnd) const
 
virtual void OnInitPlugInMenuPopups (WPARAM wparam, LPARAM lparam)
 
virtual int OnLoadPlugIn ()
 
virtual bool OnLoadPlugInErrorString (ON_wString &msg)
 
virtual BOOL32 OnPlugInMenuCommand (WPARAM wparam)
 
virtual void OnRegisterPlugIn (bool bDone)
 
virtual void OnSaveAllSettings ()
 
virtual void OnUnloadPlugIn ()
 
virtual const wchar_t * PlugInDescription () const
 
const wchar_t * PlugInFileName () const
 
virtual HICON PlugInIcon (const ON_2iSize &size)
 
virtual GUID PlugInID () const =0
 
HINSTANCE PlugInInstance () const
 
virtual plugin_load_time PlugInLoadTime ()
 
AFX_MODULE_STATE * PlugInModuleState () const
 
virtual const wchar_t * PlugInName () const =0
 
virtual LRESULT PlugInProc (UINT message, WPARAM wParam, LPARAM lParam)
 This will be used to extend this class without breaking the SDK. More...
 
void PlugInTypeString (ON_wString &wResult) const
 
virtual const wchar_t * PlugInVersion () const =0
 
virtual BOOL32 ReadDocument (CRhinoDoc &doc, ON_BinaryArchive &archive, const CRhinoFileReadOptions &options)
 
virtual void RemoveDocumentPropertiesDialogTabs (CRhinoDocumentPropertiesTabs &tab_manager)
 
BOOL32 RemovePlugInMenuFromRhino (HMENU hTargetMenu)
 
virtual void ResetMessageBoxes ()
 
virtual bool SaveAsV3 (const CRhinoFileWriteOptions &options)
 
virtual void SaveProfile (LPCTSTR lpszSection, CRhinoProfileContext &pc)
 
void SaveSettings ()
 
CRhinoSettingsSettings ()
 
virtual BOOL32 WriteDocument (CRhinoDoc &doc, ON_BinaryArchive &archive, const CRhinoFileWriteOptions &options)
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
void CopyUserData (const ON_Object &source_object)
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
virtual ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
virtual void DestroyRuntimeCache (bool bDelete=true)
 
bool DetachUserData (class ON_UserData *pUserData)
 
virtual void Dump (ON_TextLog &) const
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
virtual ON_UUID ModelObjectId () const
 
void MoveUserData (ON_Object &source_object)
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
virtual ON::object_type ObjectType () const
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
virtual bool Read (ON_BinaryArchive &binary_archive)
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 
virtual unsigned int SizeOf () const
 
bool ThisIsNullptr (bool bSilentError) const
 
void TransformUserData (const class ON_Xform &xform)
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 
int UserStringCount () const
 
virtual bool Write (ON_BinaryArchive &binary_archive) const
 

Additional Inherited Members

- Public Types inherited from CRhinoPlugIn
enum  license_capabilities {
  no_capabilities = 0x0, can_be_purchased = 0x1, can_be_specified = 0x2, can_be_evaluated = 0x4,
  evaluation_is_expired = 0x8, supports_rhino_accounts = 0x10, supports_standalone = 0x20, supports_zoo_per_user = 0x40,
  supports_zoo_per_core = 0x80, supports_license_discovery = 0x100, license_dialog_buttons_force_32bit = 0xFFFFFFFF
}
 
enum  plug_in_proc_message_id { plug_in_force_32bit = 0xFFFFFFFF }
 
enum  plugin_load_time {
  load_plugin_disabled = 0, load_plugin_when_needed = 2, load_plugin_at_startup = 1, load_plugin_when_needed_ignore_docked = 6,
  load_plugin_when_needed_or_optionsdlg = 10, load_plugin_when_needed_or_tabbed_dockbar = 18, plugin_load_time_force_32bit = 0xFFFFFFFF
}
 
enum  plugin_type : unsigned int {
  unknown_plugin_type = 0, render_plugin = 0x01, file_export_plugin = 0x02, file_import_plugin = 0x04,
  digitizer_plugin = 0x08, utility_plugin = 0x10, display_pipeline_plugin = 0x20, display_engine_plugin = 0x40
}
 
- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 
- Static Public Member Functions inherited from CRhinoPlugIn
static class CRhinoPlugInRecordGetLoadedPlugIn (ON_UUID uuid)
 
static class CRhinoPlugInRecordGetPlugIn (const wchar_t *lpsFileName)
 
static class CRhinoPlugInRecordGetPlugIn (int nIndex)
 
static class CRhinoPlugInRecordGetPlugIn (ON_UUID uuid)
 
static bool GetPlugInList (class ON_ClassArray< CRhinoPlugInRecord > &result, int nPlugInTypes=0xFFFFFFFF)
 
static int LoadPlugIn (const ON_UUID &uuid, bool bQuietly, bool ignore_load_failed)
 
static bool PlugInConstructionPermitted ()
 
static int PlugInCount ()
 
static const wchar_t * PlugInTypeString (int type)
 
static bool SaveLoadProtectionToRegistry (ON_UUID plugin_uuid, int load_protection)
 
- Protected Member Functions inherited from CRhinoPlugIn
bool GetLicense ()
 
bool GetLicense (unsigned int capabilities, const wchar_t *text_mask)
 
bool GetLicenseOwner (ON_wString &registeredOwner, ON_wString &registeredOrganization)
 
bool IsValid (ON_TextLog *text_log=nullptr) const override
 
bool ReturnLicense ()
 
void SetLicenseCapabilities (const wchar_t *format_string, CRhinoPlugIn::license_capabilities capabilities, ON_UUID licenseId)
 
- Protected Attributes inherited from CRhinoPlugIn
bool m_is_rhino_common_plug_in
 

Detailed Description

Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete Rhino SDK copyright information see http://www.rhino3d.com/developer. class CRhinoRenderPlugIn

Description: Control class usesd when creating Render plug-ins. Render plug-ins have the ability to replace the Rhino render command and object properties render property page.

Constructor & Destructor Documentation

◆ CRhinoRenderPlugIn()

CRhinoRenderPlugIn::CRhinoRenderPlugIn ( )

◆ ~CRhinoRenderPlugIn()

CRhinoRenderPlugIn::~CRhinoRenderPlugIn ( )

Member Function Documentation

◆ CloseRenderWindow()

virtual BOOL32 CRhinoRenderPlugIn::CloseRenderWindow ( )
virtual

Close render window notification, called when rendering is done and render window is no longer modal. (When RenderCommand returns if you leave the window up)

◆ EnableAssignMaterialButton()

virtual BOOL32 CRhinoRenderPlugIn::EnableAssignMaterialButton ( ) const
virtual

Called to enable/disable the "Material" button located on the "Material" tab in the Properties and Layer dialog boxes. The default return value is false which will disable the button. If the button is disabled then the OnAssignMaterial function is never called.

◆ EnableCreateMaterialButton()

virtual BOOL32 CRhinoRenderPlugIn::EnableCreateMaterialButton ( ) const
virtual

Called to enable/disable the "New" button located on the "Material" in the Properties and Layer dialog boxes. The default return value is false which will disable the button. If the button is disabled then the OnEditMaterial function is never called.

◆ EnableEditMaterialButton()

virtual BOOL32 CRhinoRenderPlugIn::EnableEditMaterialButton ( ON_Material material,
CRhinoDoc doc 
) const
virtual

Called to enable/disable the "Edit" button located on the "Material" in the Properties and Layer dialog boxes. The default return value is false which will disable the button. If the button is disabled then the OnEditMaterial function is never called.

◆ OnAssignMaterial()

virtual BOOL32 CRhinoRenderPlugIn::OnAssignMaterial ( HWND  hwndParent,
ON_Material material,
CRhinoDoc doc 
)
virtual

Optional overrides.

This function is called by the Object Properties and Layer Control dialogs when the "Material" button is pressed in the "Render" tab. This is only called if AppType returns RhinoApp::Render and EnableAssignMaterialButton return Rhino::rhTrue.

◆ OnCreateMaterial()

virtual BOOL32 CRhinoRenderPlugIn::OnCreateMaterial ( HWND  hwndParent,
ON_Material material,
CRhinoDoc doc 
)
virtual

This function is called by the Object Properties and Layer Control dialogs when the "New" button is pressed in the "Material" tab. This is only called if AppType returns RhinoApp::Render and EnableCreateMaterialButton return Rhino::rhTrue.

◆ OnEditMaterial()

virtual BOOL32 CRhinoRenderPlugIn::OnEditMaterial ( HWND  hwndParent,
ON_Material material,
CRhinoDoc doc 
)
virtual

This function is called by the Object Properties and Layer Control dialogs when the "Edit" button is pressed in the "Material" tab. This is only called if AppType returns RhinoApp::Render and EnableEditMaterialButton return Rhino::rhTrue. A return value of Rhino::rhTrue means the material has been updated.

◆ OnSetCurrentRenderPlugIn()

virtual void CRhinoRenderPlugIn::OnSetCurrentRenderPlugIn ( BOOL32  bCurrent)
virtual

This plug-in (has become)/(is no longer) the current renderer.

If bCurrent then this plug-in has become the current renderer otherwise it was, but is no longer, the current renderer.

◆ PlugInType()

plugin_type CRhinoRenderPlugIn::PlugInType ( ) const
overridevirtual

Description: Identifies the type of plug-in. Returns: Codes described above. Remarks: Rhino will attempt to cast the one and only plug-in derived object when loading a plug-in. If it does not cast correctly then the plug-in will not be allowed to load.

Implements CRhinoPlugIn.

◆ Render()

virtual CRhinoCommand::result CRhinoRenderPlugIn::Render ( const CRhinoCommandContext context,
bool  render_preview 
)
pure virtual

Render plug-in specific

Required overrides

Called by Render and RenderPreview commands if this application is a Render PlugIn and is set as the default render engine.

context [in] Command parameters passed to the render command. render_preview [in] If true, lower quality faster render expected.

◆ RenderDialogPage()

virtual class IRhinoOptionsPage* CRhinoRenderPlugIn::RenderDialogPage ( CRhinoDoc ,
HWND   
)
virtual

Called prior to adding the Rhino render tab to the FileProperites dialog. This is only called when your render plug-in is the current render plug-in. This function should return a pointer to a IRhinoOptionsPage derived object or NULL if you do not wish to replace the render tab. You are responsible for deleting this pointers in your PostNcDestroy() override.

Parameters: CRhinoDoc& [in] - Document to display properties for HWND [in] - Main dialog HWND, parent for this page Note: Make sure you include the following macro prior to calling new: AFX_MANAGE_STATE(AfxGetStaticModuleState()); Please see MFC Technical Notes 33 and 58 for additional details.

◆ RenderPlugInProc()

virtual LRESULT CRhinoRenderPlugIn::RenderPlugInProc ( UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
virtual

This will be used to extend this class without breaking the SDK.

◆ RenderWindow()

virtual CRhinoCommand::result CRhinoRenderPlugIn::RenderWindow ( const CRhinoCommandContext context,
bool  render_preview,
CRhinoView view,
const LPRECT  rect,
bool  bInWindow,
bool  bBlowUp 
)
virtual

Called by RenderWindow and RenderWindowPreview commands if this application is a Render PlugIn and is set as the default render engine.

context [in] Command parameters passed to the render command. render_preview [in] If true, lower quality faster render expected. view [in] View to render. rect [in] Rectangle to render in viewport window coordinates. bInWindow [in] If true the output destination is a standard CRhinoSdkRenderView otherwise output to the current CRhinoView. bBlowUp [in] If true, the output size will be pixel-for-pixel the same as the full output (as if you'd called "Render") but only the window specified. In other words, if you took the image produced by this function and pasted it over an image from the same view, it would perfectly fit into the image without resizing.

◆ SaveRenderedImage()

virtual BOOL32 CRhinoRenderPlugIn::SaveRenderedImage ( ON_wString  wFileName)
virtual

Message sent from script to save file.