Rhino C++ API
8.17
|
#include <RhRdkLightManagerSupport.h>
Public Member Functions | |
CRhRdkLightManagerSupport () | |
virtual | ~CRhRdkLightManagerSupport () |
virtual bool | DeleteLight (CRhinoDoc &doc, const ON_Light &light, bool bUndelete=false) const |
virtual void * | EVF (const wchar_t *, void *) override |
virtual void | GetLights (const CRhinoDoc &doc, ON_ObjectArray< ON_Light > &lights) const |
virtual bool | GetLightSolo (CRhinoDoc &doc, const ON_UUID &id) const |
virtual void | GroupLights (CRhinoDoc &doc, ON_ObjectArray< ON_Light > &lights) const |
virtual UUID | InterfaceId (void) const override |
bool | IsActive (void) const |
virtual bool | IsInSoloStorage (const CRhinoDoc &doc, const ON_UUID &lightId) const |
virtual ON_wString | LightDescription (const CRhinoDoc &doc, const ON_Light &light) const |
virtual bool | LightFromId (const CRhinoDoc &doc, const ON_UUID &uuid, ON_Light &light) const |
virtual bool | LightFromObject (const CRhinoObject &object, ON_Light &light) const |
virtual int | LightsInSoloStorage (const CRhinoDoc &doc) const |
virtual void | ModifyLight (CRhinoDoc &doc, const ON_Light &light) const |
virtual unsigned int | ObjectSerialNumberFromLight (const CRhinoDoc &doc, const ON_Light &light) const |
virtual void | OnCustomLightEvent (const CRhinoDoc &doc, CRhinoEventWatcher::light_event, const ON_Light &light) const |
virtual bool | OnEditLight (CRhinoDoc &doc, ON_ObjectArray< ON_Light > &light) const |
virtual UUID | RenderEngineId (void) const =0 |
virtual bool | RestoreFromSolo (CRhinoDoc &doc, const ON_UUID &lightId) const |
virtual bool | SaveToSoloStorage (CRhinoDoc &doc, const ON_UUID &lightId) const |
virtual bool | SetLightSolo (CRhinoDoc &doc, const ON_UUID &id, bool bSolo) const |
virtual void | UnGroup (CRhinoDoc &doc, ON_ObjectArray< ON_Light > &lights) const |
![]() | |
CRhRdkExtension () | |
virtual | ~CRhRdkExtension () |
virtual UUID | PlugInId (void) const =0 |
bool | Unregister (void) |
![]() | |
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) |
![]() | |
CRhinoEventWatcher () | |
CRhinoEventWatcher (bool headlessDocAware, bool headlessAppAware) | |
virtual | ~CRhinoEventWatcher () |
virtual void | AliasTableEvent (CRhinoEventWatcher::alias_event event, const CRhinoAppAliasList &alias_table, int alias_index, const CRhinoCommandAlias *old_settings) |
virtual int | DeleteLayerCheck (CRhinoDoc &doc, ON_SimpleArray< int > &layer_index_list, bool bQuiet) |
virtual void | DimStyleTableEvent (CRhinoEventWatcher::dimstyle_event event, const CRhinoDimStyleTable &dimstyle_table, int dimstyle_index, const ON_DimStyle *old_settings) |
void | Enable (BOOL32 b=TRUE) |
virtual void | Event (event_id id, unsigned int iParam1, int iParam2, const void *ptrParam1, const void *ptrParam2) |
OBSOLETE - NEVER USE THIS. More... | |
virtual void | GroupTableEvent (CRhinoEventWatcher::group_event event, const CRhinoGroupTable &group_table, int group_index, const ON_Group *old_settings) |
virtual void | HatchPatternTableEvent (CRhinoEventWatcher::hatchpattern_event event, const CRhinoHatchPatternTable &hatchpattern_table, int hatchpattern_index, const ON_HatchPattern *old_settings) |
virtual void | InstanceDefinitionTableEvent (CRhinoEventWatcher::idef_event event, const CRhinoInstanceDefinitionTable &idef_table, int idef_index, const ON_InstanceDefinition *old_settings) |
bool | IsEnabled () const |
bool | IsHeadlessAppAware () const |
bool | IsHeadlessDocAware () const |
virtual void | LayerTableEvent (CRhinoEventWatcher::layer_event event, const CRhinoLayerTable &layer_table, int layer_index, const ON_Layer *old_settings) |
virtual void | LinetypeTableEvent (CRhinoEventWatcher::linetype_event event, const CRhinoLinetypeTable &linetype_table, int linetype_index, const ON_Linetype *old_settings) |
virtual void | MaterialTableEvent (CRhinoEventWatcher::material_event event, const CRhinoMaterialTable &material_table, int material_index, const ON_Material *old_settings) |
virtual void | OnActiveDocumentChanged (CRhinoDoc *doc) |
virtual void | OnAppSettingsChanged (const CRhinoAppSettings &new_app_settings) |
virtual void | OnBeginCommand (const CRhinoCommand &command, const CRhinoCommandContext &context) |
virtual void | OnBeginOpenDocument (CRhinoDoc &doc, const wchar_t *filename, BOOL32 bMerge, BOOL32 bReference) |
virtual void | OnBeginSaveDocument (CRhinoDoc &doc, const wchar_t *filename, BOOL32 bExportSelected) |
virtual void | OnCloseDocument (CRhinoDoc &doc) |
virtual void | OnCloseRhino (class CRhinoApp &app) |
virtual void | OnCreateView (CRhinoView *rhino_view) |
virtual void | OnDeselectAllObjects (CRhinoDoc &doc, int count) |
virtual void | OnDeselectObject (CRhinoDoc &doc, const CRhinoObject &object) |
virtual void | OnDeselectObjects (CRhinoDoc &doc, const ON_SimpleArray< const CRhinoObject * > &objects) |
virtual void | OnDestroyView (CRhinoView *rhino_view) |
virtual void | OnDocumentPropertiesChanged (CRhinoDoc &doc) |
virtual void | OnEnableEventWatcher (BOOL32 b) |
virtual void | OnEndCommand (const CRhinoCommand &command, const CRhinoCommandContext &context, CRhinoCommand::result rc) |
virtual void | OnEndOpenDocument (CRhinoDoc &doc, const wchar_t *filename, BOOL32 bMerge, BOOL32 bReference) |
virtual void | OnEndSaveDocument (CRhinoDoc &doc, const wchar_t *filename, BOOL32 bExportSelected) |
virtual void | OnInitRhino (class CRhinoApp &app) |
virtual void | OnNewDocument (CRhinoDoc &doc) |
virtual void | OnPurgeObject (CRhinoDoc &doc, CRhinoObject &object) |
virtual void | OnRenameView (CRhinoView *rhino_view) |
virtual void | OnSelectObject (CRhinoDoc &doc, const CRhinoObject &object) |
virtual void | OnSelectObjects (CRhinoDoc &doc, const ON_SimpleArray< const CRhinoObject * > &objects) |
virtual void | OnSetActiveView (CRhinoView *rhino_view) |
virtual void | OnUnitsChangedWithScaling (CRhinoDoc &doc, double scale) |
virtual void | OnUpdateObjectMesh (CRhinoDoc &doc, CRhinoObject &object, ON::mesh_type mesh_type) |
void | Register () |
unsigned int | SerialNumber () const |
virtual void | TextureMappingTableEvent (CRhinoEventWatcher::texture_mapping_event event, const CRhinoTextureMappingTable &texture_mapping_table, int texture_mapping_index, const ON_TextureMapping *old_settings) |
virtual void | UndoEvent (CRhinoEventWatcher::undo_event event, unsigned int undo_record_serialnumber, const CRhinoCommand *cmd) |
void | UnRegister () |
Protected Member Functions | |
virtual void | LightTableEvent (CRhinoEventWatcher::light_event event, const CRhinoLightTable &light_table, int light_index, const ON_Light *old_settings) override |
virtual const CRhinoObject * | ObjectFromLight (const CRhinoDoc &doc, const ON_Light &light) const |
virtual void | OnAddObject (CRhinoDoc &doc, CRhinoObject &object) override |
virtual void | OnDeleteObject (CRhinoDoc &doc, CRhinoObject &object) override |
virtual void | OnModifyObjectAttributes (CRhinoDoc &doc, CRhinoObject &object, const CRhinoObjectAttributes &old_attributes) override |
virtual void | OnObjectReplaced (unsigned int rhino_doc_serial_number, unsigned int deleted_object_sn, unsigned int added_object_sn) override |
virtual void | OnReplaceObject (CRhinoDoc &doc, CRhinoObject &old_object, CRhinoObject &new_object) override |
virtual void | OnUnDeleteObject (CRhinoDoc &doc, CRhinoObject &object) override |
CRhRdkLightManagerSupport::CRhRdkLightManagerSupport | ( | ) |
|
virtual |
|
virtual |
|
overridevirtual |
Emergency virtual function for future expansion.
Reimplemented from CRhRdkObject.
|
virtual |
Return the light list - default behaviour is to retrieve the lights from CRhinoDoc::m_light_table. Custom lights should have unique m_light_id.
|
virtual |
|
virtual |
|
overridevirtual |
Returns the unique interface id of this extension.
Implements CRhRdkExtension.
bool CRhRdkLightManagerSupport::IsActive | ( | void | ) | const |
|
virtual |
|
virtual |
|
virtual |
Default implementation searches the CRhinoDoc::m_light_table
|
virtual |
The default implementation is to check if the object is a CRhinoLight, and if it is, return the ON_Light.
|
virtual |
|
overrideprotectedvirtual |
/ Description: / LightTableEvent() is called whenever the light table is changed. / / Parameters: / event - [in] type of event / light_table - [in] light table / light_index - [in] light of light / If the event is light_sorted, then light_index is 0. / old_settings - [in] If the event is light_modified, / then the old light definition is / passed here. Otherwise, this parameter is NULL. / WARNING: Never modify the Rhino document in a LightTableEvent() override. If you need to change the Rhino document or post update messages to controls, then your LightTableEvent() override should record what happened in an efficient way and then make any changes that are required in a CRhinoIsIdle.Notify() override.
Reimplemented from CRhinoEventWatcher.
|
virtual |
|
protectedvirtual |
|
virtual |
Default implementation searchs the CRhinoDoc::m_light_table and compares ON_Light::m_light_id
|
overrideprotectedvirtual |
Object events / Description: / Called if a new object is added to the document. / / Parameters: / doc - [in] object's document / object - [in] new object WARNING: Never modify the Rhino document in a OnAddObject() override. If you need to change the Rhino document or post update messages to controls, then your OnAddObject() override should record what happened in an efficient way and then make any changes that are required in a CRhinoIsIdle.Notify() override.
Reimplemented from CRhinoEventWatcher.
|
virtual |
|
overrideprotectedvirtual |
/ Description: / Called if an object is deleted. At some later point / the object can be un-deleted. / / Parameters: / doc - [in] object's document / object - [in] object that was deleted. WARNING: Never modify the Rhino document in a OnDeleteObject() override. If you need to change the Rhino document or post update messages to controls, then your OnDeleteObject() override should record what happened in an efficient way and then make any changes that are required in a CRhinoIsIdle.Notify() override.
Reimplemented from CRhinoEventWatcher.
|
virtual |
|
overrideprotectedvirtual |
/ Description: / Called if an object's attributes change. / / Parameters: / doc - [in] object's document / object - [in] object whose attributes were changed. The new / attributes are object.Attributes(). / old_attributes - [in] attributes before the change. WARNING: Never modify the Rhino document in a OnModifyObjectAttributes() override. If you need to change the Rhino document or post update messages to controls, then your OnModifyObjectAttributes() override should record what happened in an efficient way and then make any changes that are required in a CRhinoIsIdle.Notify() override.
Reimplemented from CRhinoEventWatcher.
|
overrideprotectedvirtual |
Description: When an object is replaced by calling CRhinoDoc::ReplaceObject(), the following CRhinoEventWatcher event notifications are sent:
CRhinoEventWatcher::OnReplaceObject(doc,objA,objB)
If the object being replace is selected, then a CRhinoEventWatcher::OnDeselectObject(objA) notification occurs.
CRhinoEventWatcher::OnDeleteObject(objA)
If a new object is being added, then a CRhinoEventWatcher::OnAddObject objB) notification occurs. If a previous relace object is being undone, then a CRhinoEventWatcher::OnUndeleteObject (objB) occurs.
If the object being replace is selected, then a CRhinoEventWatcher::OnSelectObject(objB) notification occurs
CRhinoEventWatcher::OnObjectReplaced(doc,objA,objB)
Parameters: rhino_doc_serial_number - [in] Serial number of the document. Use CRhinoDoc::FromRuntimeSerialNumber(rhino_doc_serial_number) to get a pointer to the document. Always check for nullptr before dereferencing the returned value. Never modify the document in the callback.
deleted_object_sn - [in] The value of the deleted object's CRhinoObject.RuntimeSerialNumber(). Depending on Rhino application state and settings, this object may no longer exist or may continue to exist for an undetermined duration to permit a possible future undo operation. Use CRhinoObjec::FromRuntimeSerialNumber( rhino_doc_serial_number, deleted_object_sn ) to get a pointer to the object. Always check for nullptr before dereferencing the returned value. Never modify this object.
added_object_sn - [in] The value of the new object's CRhinoObject.RuntimeSerialNumber() Use CRhinoObjec::FromRuntimeSerialNumber( rhino_doc_serial_number, added_object_sn ) to get a pointer to the object. Always check for nullptr before dereferencing the returned value. Never modify this object.
static const CRhinoObject* FromRuntimeSerialNumber( unsigned int rhino_doc_runtime_serial_number, unsigned int rhino_object_runtime_serial_number );
WARNING: Never modify any object or other Rhino document values in a OnObjectReplaced() override. If you need to change the Rhino document or post update messages to controls, then your OnObjectReplaced() override should record what happened in an efficient way and then make any changes that are required in a CRhinoIsIdle.Notify() override.
Reimplemented from CRhinoEventWatcher.
|
overrideprotectedvirtual |
Description: Called if an object is about to be replaced.
Parameters: doc - [in] object's document old_object - [in] existing object - about to be deleted. At the time OnReplaceObject() is called, old_object has not been deleted. new_object - [in] new object - about to be added. At the time OnReplaceObject() is called, new_object has not been added to doc.
Remarks: If both CRhinoDoc::UndoActive() or CRhinoDoc::RedoActive() are false, then immediatedly after OnReplaceObject(doc,old_object,new_object) is called there will be a call to OnDeleteObject(doc,old_object) and then a call to OnAddObject(doc,new_object).
If either CRhinoDoc::UndoActive() and CRhinoDoc::RedoActive() are true, then immediatedly after OnReplaceObject(doc,old_object,new_object) is called there will be a call to OnDeleteObject(doc,old_object) and then a call to OnUnDeleteObject(doc,new_object).
WARNING: Never modify the Rhino document in a OnReplaceObject() override. If you need to change the Rhino document or post update messages to controls, then your OnReplaceObject() override should record what happened in an efficient way and then make any changes that are required in a CRhinoIsIdle.Notify() override.
Reimplemented from CRhinoEventWatcher.
|
overrideprotectedvirtual |
/ Description: / Called if an object is un-deleted. / / Parameters: / doc - [in] object's document / object - [in] object tha was deleted and is now active. WARNING: Never modify the Rhino document in a OnUnDeleteObject() override. If you need to change the Rhino document or post update messages to controls, then your OnUnDeleteObject() override should record what happened in an efficient way and then make any changes that are required in a CRhinoIsIdle.Notify() override.
Reimplemented from CRhinoEventWatcher.
|
pure virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |