Rhino C++ API  8.11
Public Member Functions | Protected Member Functions | Friends | List of all members
CRhinoInstanceObject Class Reference

#include <rhinoSdkInstance.h>

Inheritance diagram for CRhinoInstanceObject:
CRhinoObject ON_Object

Public Member Functions

 CRhinoInstanceObject ()
 
 CRhinoInstanceObject (const CRhinoInstanceObject &)
 
 ~CRhinoInstanceObject ()
 
ON_BoundingBox BoundingBox () const override
 
bool ContainsHiddenObjects () const
 
int CreateMeshes (ON::mesh_type, const ON_MeshParameters &, bool bIgnoreCustom=false) override
 
void DestroyMeshes (ON::mesh_type mesh_type, bool bDeleteMeshes=true) override
 
void DestroyRuntimeCache (bool bDelete=true) override
 
void Draw (CRhinoDisplayPipeline &dp) const override
 Draws object based on pipeline display attributes... More...
 
void DrawHighlightedSubObjects (CRhinoDisplayPipeline &) const override
 
void DrawSubObject (CRhinoDisplayPipeline &, ON_COMPONENT_INDEX) const override
 Draws wireframe representation of a sub object. More...
 
void EnableGrips (bool bGripsOn) override
 Grips support. More...
 
int Explode (ON_ClassArray< CRhinoInstanceObjectPiece > &piece_list, bool bExplodeNestedReferences=true) const
 
int Explode (ON_ClassArray< CRhinoInstanceObjectPiece > &piece_list, bool bSkipHiddenPieces, bool bExplodeNestedReferences) const
 
int Explode (ON_ClassArray< CRhinoInstanceObjectPiece > &piece_list, bool bSkipHiddenPieces, ON_UUID viewport_id, bool bExplodeNestedReferences) const
 
bool GetFrame (ON_Plane &plane) const override
 
int GetHighlightedSubObjects (ON_SimpleArray< ON_COMPONENT_INDEX > &component_indices) const override
 
int GetSelectedSubObjects (ON_SimpleArray< ON_COMPONENT_INDEX > &component_indices) const override
 
int GetSubObjects (ON_SimpleArray< CRhinoObject * > &subObjects, const CRhinoViewport *pViewport=nullptr) const override
 
bool GetTightBoundingBox (ON_BoundingBox &tight_bbox, bool bGrowBox=false, const ON_Xform *xform=nullptr) const override
 
int GetWireframeCurves (ON_SimpleArray< ON_Curve * > &curve_list) const override
 
bool HighlightRequiresRedraw () const override
 
bool HighlightSubObject (ON_COMPONENT_INDEX component_index, bool bHighlight=true) const override
 
ON_Plane InitialObjectFrame (const CRhinoDoc &) const
 
const CRhinoInstanceDefinitionInstanceDefinition () const
 
class CRhInstanceDisplayInstanceDisplay () const
 
const ON_XformInstanceXform () const
 
const ON_InstanceRefIRef () const
 
bool IsMeshable (ON::mesh_type) const override
 Returns true if the object is capable of having a mesh of the specified type. More...
 
bool IsSolid () const override
 
bool IsSubObjectHighlighted (ON_COMPONENT_INDEX component_index) const override
 true if specified component is highlighted More...
 
bool IsSubObjectSelected (ON_COMPONENT_INDEX component_index) const override
 
bool IsValid (ON_TextLog *text_log=nullptr) const override
 
void MemoryRelocate () override
 virtual ON_Object::MemoryRelocate override More...
 
int MeshCount (ON::mesh_type mesh_type, const ON_MeshParameters *mp=nullptr) const override
 
ON::object_type ObjectType () const override
 
ON_wString OnDoubleClick (const CRhinoDoubleClickContext &) const override
 
CRhinoInstanceObjectoperator= (const CRhinoInstanceObject &)
 
int Pick (const CRhinoPickContext &, CRhinoObjRefArray &) const override
 
bool PickFilter (const CRhinoGetObject &, bool) const override
 
bool PromotePreviewMeshes (ON::mesh_type) override
 
int SelectSubObject (ON_COMPONENT_INDEX component_index, bool bSelect=true, bool bSynchHighlight=true, bool bPersistentSelect=false) const override
 
bool SetInstanceDefinition (const CRhinoInstanceDefinition *idef)
 
bool SetInstanceTransform (const ON_Xform &xform)
 
bool SetTextureCoordinatesFromPlugIn (const ON_UUID &plugin_id, int mapping_channel_id) const override
 
const wchar_t * ShortDescription (bool bPlural) const override
 
bool SnapTo (const CRhinoSnapContext &snap_context, CRhinoSnapEvent &snap_event) const override
 
const CRhinoObjectSubObjectFromComponentIndex (const ON_COMPONENT_INDEX &ci) const
 
bool TransformInstance (ON_Xform xform)
 
int UnhighlightAllSubObjects () override
 returns number of changed subobjects More...
 
int UnselectAllSubObjects () override
 returns number of unselected subobjects More...
 
int UsesDefinition (int idef_index) const
 
- Public Member Functions inherited from CRhinoObject
 CRhinoObject ()
 assigns a new object UUID More...
 
 CRhinoObject (const CRhinoObject &)
 copies source object UUID More...
 
 CRhinoObject (const ON_3dmObjectAttributes &)
 
virtual ~CRhinoObject ()
 
virtual void AddToDocNotification ()
 
BOOL32 AttachAttributeUserData (ON_UserData *pUserData)
 
bool AttachGeometryUserData (ON_UserData *pUserData)
 
CRhinoObjectAttributesAttributes ()
 
virtual const CRhinoObjectAttributesAttributes () const
 
virtual void BeginTransform (CRhinoDoc &doc, bool bDeleteOriginal, bool bAddNewObjectToDoc, bool bAddTransformHistory)
 
virtual ON_BoundingBox BoundingBox (const class CRhinoViewport *pViewport) const
 
unsigned int BrepReferenceCount () const
 
class CRhObjectReferenceCounter * BrepReferenceCounter (void) const
 
void BrepReferenceCounter_DestroyRuntimeCache (bool bDelete) const
 
bool BrepReferenceCounterExists () const
 
bool CopyHistoryOnReplace () const
 
BOOL32 DeleteAttributeUserData (ON_UUID userdata_uuid)
 
void DeleteDynamicTransform ()
 
virtual void DeleteFromDocNotification ()
 
bool DeleteGeometryUserData (ON_UUID userdata_uuid)
 
void DestroyMeshes (ON::mesh_type mesh_type)
 
void DestroyRuntimeCache (bool bDelete=true) override
 virtual ON_Object override More...
 
class CRhinoDocDocument () const
 
unsigned int DocumentRuntimeSerialNumber () const
 
void Draw (CRhinoViewport &) const
 
virtual void DrawGrips (class CRhinoDisplayPipeline &) const
 
virtual void DrawV6 (class CRhinoObjectDrawContext *draw_context) const RHINO_NOEXCEPT
 
virtual CRhinoObjectDuplicateRhinoObject () const
 
*enum ANALYSIS_MODE **bool EnableAnalysisMode (ON_UUID am_id, bool bEnable=true) const
 new way (not virtual) More...
 
virtual bool EnableCustomGrips (class CRhinoObjectGrips *custom_grips)
 
virtual void EndTransform (CRhinoDoc &doc, bool bDeleteOriginal, bool bAddNewObjectToDoc, bool bAddTransformHistory)
 
const ON_GeometryGeometry () const
 returns a pointer to the object's geometry More...
 
ON_UserDataGetAttributeUserData (ON_UUID userdata_uuid) const
 
bool GetDynamicTransform (ON_Xform &dynamic_xform) const
 
ON_UserDataGetGeometryUserData (ON_UUID userdata_uuid) const
 
virtual int GetGrips (ON_SimpleArray< class CRhinoGripObject * > &grip_list) const
 
std::vector< std::shared_ptr< const ON_Mesh > > GetMeshes (ON::mesh_type mesh_type) const
 
virtual int GetMeshes (ON::mesh_type mesh_type, ON_SimpleArray< const ON_Mesh * > &meshes) const
 
void GetRenderMeshParameters (ON_MeshParameters &mp) const
 
virtual int GetSubobjectMaterialComponents (ON_SimpleArray< ON_COMPONENT_INDEX > &components_with_subobject_materials) const
 
virtual int GetSubObjects (ON_SimpleArray< CRhinoObject * > &subObjects, const class CRhinoViewport *pViewport=NULL) const
 
const class CRhinoGripsEnablerGripsEnabler () const
 
int GripsOn () const
 
bool GripsSelected () const
 
bool HasCustomRenderMeshes (ON::mesh_type mt, const ON_Viewport *vp=nullptr, ON__UINT32 *flags=nullptr, const class CRhinoPlugIn *requestingPlugIn=nullptr, const class CDisplayPipelineAttributes *pAttributes=nullptr) const
 Determine if custom render meshes will be supplied for a particular object. More...
 
bool HasDynamicTransform () const
 
virtual bool HasSubobjectMaterials (void) const
 
bool Highlight (bool bHighlight=true) const
 
const CRhinoHistoryRecordHistoryRecord () const
 
const ON_UUID Id () const
 
bool InAnalysisMode () const
 
bool InAnalysisMode (const ON_UUID &am_id) const
 bool AnalysisMode( ANALYSIS_MODE am ) const; ///< old way More...
 
ON_Plane InitialObjectFrame (const CRhinoDoc &) const
 
const class CRhinoVisualAnalysisModeInShadedAnalysisMode () const
 
unsigned int IsActiveInDocument () const
 
virtual bool IsActiveInViewport (const class CRhinoViewport &) const
 
virtual bool IsDeletable () const
 
bool IsDeleted () const
 
virtual bool IsGroupObject () const
 
bool IsHidden () const
 
int IsHighlighted (BOOL32 bCheckSubObjects=false) const
 highlighted state (almost always = IsSelected() except in one or two commands) More...
 
bool IsInstanceDefinitionGeometry () const
 
int IsInstanceDefinitionGeometryEx () const
 
bool IsLocked () const
 
int IsMarked () const
 
bool IsModelObject () const
 
bool IsNormal () const
 
bool IsPageObject () const
 
int IsProxy () const
 
bool IsReference () const
 
bool IsSelectable (bool bIgnoreSelectionState, bool bIgnoreGripsState, bool bIgnoreLocking, bool bIgnoreVisibility) const
 
bool IsSelectable (bool bIgnoreSelectionState=false, bool bIgnoreGripsState=false) const
 
int IsSelected (bool bCheckSubObjects=false) const
 
bool IsSubObjectSelectable (ON_COMPONENT_INDEX component_index, bool bIgnoreSelectionState=false) const
 
bool IsValid (ON_TextLog *text_log=nullptr) const override
 
bool IsVisible () const
 
unsigned int LinkedInstanceDefinitionSerialNumber () const
 
void Mark (int)
 
void MemoryRelocate () override
 virtual ON_Object override More...
 
virtual const class CDisplayPipelineAttributesMeshDisplayAttributes (int mesh_index, const ON_Mesh &mesh, const class CDisplayPipelineAttributes &display_attrs) const
 
const ON_ModelComponentModelComponent () const
 
ON_UUID ModelObjectId () const override
 
virtual bool ModifyAttributes (const ON_3dmObjectAttributes &new_attributes, bool bEnableUndo=true, bool bQuiet=false)
 
const ON_wString Name () const
 
ON_Color ObjectDrawColor (bool bIgnoreObjectState=false) const
 
ON_Color ObjectDrawColor (const CRhinoObjectAttributes &attributes, bool bIgnoreObjectState=false) const
 
ON_Color ObjectDrawColor (const CRhinoObjectAttributes &attributes, const ON_UUID &viewport_id, bool bIgnoreObjectState) const
 
ON_Plane ObjectFrame (const ON_COMPONENT_INDEX &ci, unsigned int objectframe_flags) const
 
const class CRhinoLayerObjectLayer () const
 
const class CRhinoLayerObjectLayerPtr () const
 
const CRhinoLinetypeObjectLinetype () const
 
const CRhinoLinetypeObjectLinetypePtr () const
 
virtual const CRhinoMaterialObjectMaterial () const
 
virtual const CRhinoMaterialObjectMaterial (const ON_3dmObjectAttributes &attrs) const
 
virtual const CRhinoMaterialObjectMaterial (const ON_COMPONENT_INDEX &ci, const ON_UUID &plugin_id=RhinoDefaultRendererId(), const ON_3dmObjectAttributes *attrs=NULL) const
 This is now the preferred version of the function. This should be used to get materials component-wise in all cases. More...
 
virtual const CRhinoMaterialObjectMaterial (const ON_UUID &plugin_id) const
 
virtual const CRhRdkMaterialObjectRdkMaterial (const ON_COMPONENT_INDEX &ci, const ON_UUID &plugin_id=RhinoDefaultRendererId(), const ON_3dmObjectAttributes *attrs=NULL) const
 
CRhinoObjectoperator= (const CRhinoObject &)
 copies source object UUID More...
 
bool PerViewportIsVisible (ON_UUID viewport_id) const
 
virtual bool PickFilter (const class CRhinoGetObject &, bool) const
 
virtual void PreDrawUpdate (CRhinoDisplayPipeline &dp) const
 
virtual bool PrepareToWrite (int archive_3dm_version)
 
std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshesRenderMeshes (ON::mesh_type mt, bool recursive, const ON_Viewport *vp=nullptr, const class CRhRdkObjectAncestry *ancestry_only_for_by_parent_attributes=nullptr, const CRhinoPlugIn *requestingPlugIn=nullptr, const CDisplayPipelineAttributes *pAttributes=nullptr, std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshes > optional_initial_primitives=nullptr) const
 Returns a complete set of custom render meshes (primitives) for the object. Simple version with no need for flags. More...
 
std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshesRenderMeshes (ON::mesh_type mt, const ON_Viewport *vp=nullptr, const class CRhRdkObjectAncestry *ancestry_only_for_by_parent_attributes=nullptr, ON__UINT32 *flags=nullptr, const CRhinoPlugIn *requestingPlugIn=nullptr, const CDisplayPipelineAttributes *pAttributes=nullptr, std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshes > optional_initial_primitives=nullptr) const
 Returns a complete set of custom render meshes (primitives) for the object. More...
 
unsigned int RuntimeSerialNumber () const
 
int Select (bool bSelect, bool bSynchHighlight, bool bPersistentSelect, bool bIgnoreGripsState, bool bIgnoreLayerLocking, bool bIgnoreLayerVisibility) const
 
int Select (bool bSelect=true, bool bSynchHighlight=true, bool bPersistentSelect=true, bool bIgnoreGripsState=false) const
 
bool SetCachedTextureCoordinates (const ON_TextureMapping &mapping, const ON_Xform *object_xform, bool bLazy=true) const
 
bool SetCachedTextureCoordinatesFromPlugIn (const ON_UUID &plugin_id) const
 
bool SetCachedTextureCoordinatesFromPlugIn (const ON_UUID &plugin_id, const ON_SimpleArray< ON_TextureMapping::TYPE > &mappings_to_cache) const
 
void SetCopyHistoryOnReplace (bool bCopy) const
 
bool SetDynamicTransform (const ON_Xform &dynamic_xform)
 
bool SetHistory (class CRhinoHistory &history)
 
void SetObjectFrame (const ON_COMPONENT_INDEX &ci, const ON_Plane &plane)
 
void SetObjectFrame (const ON_COMPONENT_INDEX &ci, const ON_Xform &wcs_to_ocs)
 
virtual bool SetRenderMeshParameters (const ON_MeshParameters &mp)
 
virtual bool SetTextureCoordinates (const ON_TextureMapping &mapping, const ON_Xform *object_xform, bool bLazy=true) const
 
virtual unsigned int SizeOf () const override
 returns number of bytes used by this particular instance More...
 
ON::active_space Space () const
 
virtual ON_ComponentStatus SubObjectStatus () const
 
virtual bool SupportsBrepProxyReferenceCounting () const
 
bool UndoModifyAttributes (unsigned int ur_sn=0)
 
void UpdateBoundingBox ()
 
virtual bool VetoTransformObject (CRhinoDoc &doc, bool bDeleteOriginal, bool bAddNewObjectToDoc, bool bAddTransformHistory) const
 
unsigned int WorksessionReferenceModelSerialNumber () const
 
- 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)
 
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
 
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)
 
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)
 
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
 

Protected Member Functions

int SubObjectsAreHighlighted () const override
 returns number of highlighted subobjects More...
 
int SubObjectsAreSelected () const override
 returns number of selected subobjects More...
 
- Protected Member Functions inherited from CRhinoObject
void Destroy ()
 
virtual bool InternalVirtual_IsSelectable (bool bIgnoreSelectionState, bool bIgnoreGripsState, bool bIgnoreLocking, bool bIgnoreVisibility) const
 
virtual bool IsSelectableWithGripsOn () const
 true if can be selected while grips are on More...
 
virtual void SynchAttributes ()
 light objects are special because they are not in the geometry lists More...
 

Friends

class CRhinoDoc
 
class CRhinoInstanceDefinition
 
class CRhinoInstanceDefinitionTable
 
class CRhinoRead3dmHelper
 
class CRhInstanceDisplay
 
class CRhInstanceGrip
 

Additional Inherited Members

- Public Types inherited from CRhinoObject
enum  GEOMETRY_TYPE {
  unknown_object_type = ON::object_type::unknown_object_type, point_object = ON::object_type::point_object, pointset_object = ON::object_type::pointset_object, curve_object = ON::object_type::curve_object,
  surface_object = ON::object_type::surface_object, polysrf_object = ON::object_type::polysrf_filter, edge_object = ON::object_type::edge_filter, polyedge_object = ON::object_type::polyedge_filter,
  loop_object = ON::object_type::loop_object, brepvertex_filter = ON::object_type::brepvertex_filter, mesh_object = ON::object_type::mesh_object, annotation_object = ON::object_type::annotation_object,
  light_object = ON::object_type::light_object, instance_reference = ON::object_type::instance_reference, grip_object = ON::object_type::grip_object, morph_control_object = ON::object_type::morph_control_object,
  subd_object = ON::object_type::subd_object, meshvertex_filter = ON::object_type::meshvertex_filter, meshedge_filter = ON::object_type::meshedge_filter, meshface_filter = ON::object_type::meshface_filter,
  meshcomponent_reference = ON::object_type::meshcomponent_reference, cage_object = ON::object_type::cage_object, hatch_object = ON::object_type::hatch_object, phantom_object = ON::object_type::phantom_object,
  extrusion_object = ON::object_type::extrusion_object, any_object = ON::object_type::any_object
}
 
enum  objectframe_flags : unsigned int { objectframe_standard = 0, objectframe_include_scale_transforms = 1, objectframe_return_unset = 2 }
 
- 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 CRhinoObject
static const CRhinoObjectFromId (unsigned int rhino_doc_runtime_serial_number, ON_UUID rhino_object_id)
 
static const CRhinoObjectFromRuntimeSerialNumber (unsigned int rhino_doc_runtime_serial_number, unsigned int rhino_object_runtime_serial_number)
 
static unsigned int NextRuntimeObjectSerialNumber ()
 
- Public Attributes inherited from CRhinoObject
class CRhObjectSdkExtensionm__object_sdk_extension
 
const class CRhinoObjectVisualAnalysisModem_analysis_mode_list
 list of enabled analysis modes More...
 
CRhinoCacheHandle m_cache
 
class CRhinoObjectGripsm_grips
 managed by derived objects More...
 
unsigned char m_use_preview_mesh
 
- Static Public Attributes inherited from CRhinoObject
static int m_no_show_mark
 
- Protected Attributes inherited from CRhinoObject
ON_BoundingBox m_bbox
 world coordinate bounding box More...
 
unsigned char m_geomem_type
 
ON_Geometrym_geometry
 
const CRhinoHistoryRecordm_history_record
 

Constructor & Destructor Documentation

◆ CRhinoInstanceObject() [1/2]

CRhinoInstanceObject::CRhinoInstanceObject ( )

◆ CRhinoInstanceObject() [2/2]

CRhinoInstanceObject::CRhinoInstanceObject ( const CRhinoInstanceObject )

◆ ~CRhinoInstanceObject()

CRhinoInstanceObject::~CRhinoInstanceObject ( )

Member Function Documentation

◆ BoundingBox()

ON_BoundingBox CRhinoInstanceObject::BoundingBox ( ) const
overridevirtual

Description: Gets 3d axis aligned bounding box that contains the object.

Returns: 3d bounding box

Remarks: The default implementation uses m_geometry->BoundingBox(), lazy evaluation, and caches the result in m_bbox.
If you override this function, then you must set m_bbox.

Reimplemented from CRhinoObject.

◆ ContainsHiddenObjects()

bool CRhinoInstanceObject::ContainsHiddenObjects ( ) const

Description: Returns true if this object or any "piece" of this instance is hidden. An Instance object can be visible, but have hidden pieces because they are on hidden layers.

◆ CreateMeshes()

int CRhinoInstanceObject::CreateMeshes ( ON::mesh_type  mesh_type,
const ON_MeshParameters mp,
bool  bIgnoreCustom = false 
)
overridevirtual

Description: Create meshes used to render and analyze surface and polysurface objects. Parameters: mesh_type - [in] type of meshes to create mp - [in] in parameters that control the quality of the meshes that are created. mapping - [in] If not NULL, the texture coordinates are calculated using the call ON_Mesh::SetTextureCoordinates(*mapping,mapping,true) mapping_xform - [in] See mapping parameter description. See Also: CRhinoObject::GetMeshes CRhinoObject::MeshCount CRhinoObject::IsMeshable

Reimplemented from CRhinoObject.

◆ DestroyMeshes()

void CRhinoInstanceObject::DestroyMeshes ( ON::mesh_type  mesh_type,
bool  bDeleteMeshes = true 
)
overridevirtual

Description: Destroy meshes used to render and analyze surface and polysurface objects. Parameters: mesh_type - [in] type of mesh to destroy bDeleteMeshes - [in] if true, cached meshes are deleted. If false, pointers to cached meshes are just set to NULL. See Also: CRhinoObject::GetMeshes CRhinoObject::MeshCount CRhinoObject::IsMeshable

Deprecated:
bDeleteMeshes = false is no longer supported - override this function if you are implementing CRhinoObject, but ignore the bDeleteMeshes parameter. Call the function below.

Reimplemented from CRhinoObject.

◆ DestroyRuntimeCache()

void CRhinoInstanceObject::DestroyRuntimeCache ( bool  bDelete = true)
overridevirtual

Expert interface Description: Expert user function. If you are using openNURBS in its default configuration to read and write 3dm archives, you never need to call this function. Many objects employ lazy creation of (runtime) caches that save information to help speed geometric calculations. This function will destroy all runtime information. Parameters: bDelete - [in] if true, any cached information is properly deleted. If false, any cached information is simply discarded. This is useful when the cached information may be in alternate memory pools that are managed in nonstandard ways.

Reimplemented from ON_Object.

◆ Draw()

void CRhinoInstanceObject::Draw ( CRhinoDisplayPipeline ) const
overridevirtual

Draws object based on pipeline display attributes...

Reimplemented from CRhinoObject.

◆ DrawHighlightedSubObjects()

void CRhinoInstanceObject::DrawHighlightedSubObjects ( CRhinoDisplayPipeline ) const
overridevirtual

Draws wireframe representation of highlighted sub objects. objects that support subobject highlighting must override this function

Reimplemented from CRhinoObject.

◆ DrawSubObject()

void CRhinoInstanceObject::DrawSubObject ( CRhinoDisplayPipeline ,
ON_COMPONENT_INDEX   
) const
overridevirtual

Draws wireframe representation of a sub object.

Reimplemented from CRhinoObject.

◆ EnableGrips()

void CRhinoInstanceObject::EnableGrips ( bool  bGripsOn)
overridevirtual

Grips support.

Reimplemented from CRhinoObject.

◆ Explode() [1/3]

int CRhinoInstanceObject::Explode ( ON_ClassArray< CRhinoInstanceObjectPiece > &  piece_list,
bool  bExplodeNestedReferences = true 
) const

Description: Explodes the instance reference into pieces and add these pieces to piece_list. Parameters: piece_list - [out] pieces of the instance reference are appended to this list. bExplodeNestedReferences - [in] If true, then nested instance references are recursively exploded into until actual geometry is found. If false, an CRhinoInstanceReference is added to piece_list when this CRhinoInstanceObject has nested references. Returns: Number of pieces appended to piece_list.

◆ Explode() [2/3]

int CRhinoInstanceObject::Explode ( ON_ClassArray< CRhinoInstanceObjectPiece > &  piece_list,
bool  bSkipHiddenPieces,
bool  bExplodeNestedReferences 
) const

Description: Overload of Explode that allows for hidden pieces to be completely skipped and not added to the piece_list. Parameters: piece_list - [out] pieces of the instance reference are appended to this list. bSkipHiddenPieces - [in] If true, pieces that are not visible will not be appended to the piece_list viewport_id - [in] If bSkipHiddenPieces is false, then viewport_id is ignored. If bSkipHiddenPieces is true and and viewport_id is not nil, then layer and object per viewport visibility settings are used. If bSkipHiddenPieces is true and and viewport_id is nil, then layer and object global visibility settings are used. bExplodeNestedReferences - [in] If true, then nested instance references are recursively exploded into until actual geometry is found. If false, an CRhinoInstanceReference is added to piece_list when this CRhinoInstanceObject has nested references. Returns: Number of pieces appended to piece_list.

◆ Explode() [3/3]

int CRhinoInstanceObject::Explode ( ON_ClassArray< CRhinoInstanceObjectPiece > &  piece_list,
bool  bSkipHiddenPieces,
ON_UUID  viewport_id,
bool  bExplodeNestedReferences 
) const

◆ GetFrame()

bool CRhinoInstanceObject::GetFrame ( ON_Plane plane) const
overridevirtual

Description: Gets 3d frame for object. Parameters: plane - [out] 3d frame Returns: true if successful

Reimplemented from CRhinoObject.

◆ GetHighlightedSubObjects()

int CRhinoInstanceObject::GetHighlightedSubObjects ( ON_SimpleArray< ON_COMPONENT_INDEX > &  component_indices) const
overridevirtual

Description: Get a list of all highlighted sub-objects Parameters: component_indices - [out] component indices of highlighted sub-objects. Returns: number of highlighted subobjects

Reimplemented from CRhinoObject.

◆ GetSelectedSubObjects()

int CRhinoInstanceObject::GetSelectedSubObjects ( ON_SimpleArray< ON_COMPONENT_INDEX > &  component_indices) const
overridevirtual

Description: Get a list of all selected sub-objects Parameters: component_indices - [out] component indices of selected sub-objects. Returns: number of selected subobjects

Reimplemented from CRhinoObject.

◆ GetSubObjects()

int CRhinoInstanceObject::GetSubObjects ( ON_SimpleArray< CRhinoObject * > &  subObjects,
const CRhinoViewport pViewport = nullptr 
) const
override

◆ GetTightBoundingBox()

bool CRhinoInstanceObject::GetTightBoundingBox ( ON_BoundingBox tight_bbox,
bool  bGrowBox = false,
const ON_Xform xform = nullptr 
) const
overridevirtual

Description: Get tight bounding box of this Rhino object. Parameters: tight_bbox - [in/out] tight bounding box bGrowBox -[in] (default=false)
If true and the input tight_bbox is valid, then returned tight_bbox is the union of the input tight_bbox and the tight bounding box of this Rhino object. xform -[in] (default=NULL) If not NULL, the tight bounding box of the transformed Rhino object is calculated. The Rhino object is not modified. Returns: True if the returned tight_bbox is set to a valid bounding box.

Reimplemented from CRhinoObject.

◆ GetWireframeCurves()

int CRhinoInstanceObject::GetWireframeCurves ( ON_SimpleArray< ON_Curve * > &  curve_list) const
overridevirtual

Description: Get curves that are used to display the object's wireframe. Parameters: curve_list - [in] 3d world space wireframe curves are appended to this list. The caller is responsible for deleting the curves. Returns: Number of curves appended to the list.

Reimplemented from CRhinoObject.

◆ HighlightRequiresRedraw()

bool CRhinoInstanceObject::HighlightRequiresRedraw ( ) const
overridevirtual

true if pixels used by highlighted object differ from pixels used by highlighted object.

Reimplemented from CRhinoObject.

◆ HighlightSubObject()

bool CRhinoInstanceObject::HighlightSubObject ( ON_COMPONENT_INDEX  component_index,
bool  bHighlight = true 
) const
overridevirtual

Reimplemented from CRhinoObject.

◆ InitialObjectFrame()

ON_Plane CRhinoInstanceObject::InitialObjectFrame ( const CRhinoDoc ) const

◆ InstanceDefinition()

const CRhinoInstanceDefinition* CRhinoInstanceObject::InstanceDefinition ( ) const

◆ InstanceDisplay()

class CRhInstanceDisplay* CRhinoInstanceObject::InstanceDisplay ( ) const

◆ InstanceXform()

const ON_Xform& CRhinoInstanceObject::InstanceXform ( ) const

interface

◆ IRef()

const ON_InstanceRef& CRhinoInstanceObject::IRef ( ) const

◆ IsMeshable()

bool CRhinoInstanceObject::IsMeshable ( ON::mesh_type  ) const
overridevirtual

Returns true if the object is capable of having a mesh of the specified type.

Render and Analysis mesh interface

Reimplemented from CRhinoObject.

◆ IsSolid()

bool CRhinoInstanceObject::IsSolid ( ) const
overridevirtual

Returns true if object is a closed solid otherwise false. GetMeshes may return more than one mesh to represent a solid object.

Reimplemented from CRhinoObject.

◆ IsSubObjectHighlighted()

bool CRhinoInstanceObject::IsSubObjectHighlighted ( ON_COMPONENT_INDEX  component_index) const
overridevirtual

true if specified component is highlighted

Reimplemented from CRhinoObject.

◆ IsSubObjectSelected()

bool CRhinoInstanceObject::IsSubObjectSelected ( ON_COMPONENT_INDEX  component_index) const
overridevirtual

Description: Check sub-object selection state. Parameters: component_index - [in] index of subobject to check Remarks: subobject cannot be persistently selected Returns: @untitled table false sub-object is not selected true sub-object is selected

Reimplemented from CRhinoObject.

◆ IsValid()

bool CRhinoInstanceObject::IsValid ( ON_TextLog text_log = nullptr) const
overridevirtual

Description: Tests an object to see if its data members are correctly initialized. Parameters: text_log - [in] if the object is not valid and text_log is not nullptr, then a brief english description of the reason the object is not valid is appended to the log. The information appended to text_log is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool. Returns: @untitled table true object is valid false object is invalid, uninitialized, etc.

Reimplemented from ON_Object.

◆ MemoryRelocate()

void CRhinoInstanceObject::MemoryRelocate ( )
overridevirtual

virtual ON_Object::MemoryRelocate override

Reimplemented from ON_Object.

◆ MeshCount()

int CRhinoInstanceObject::MeshCount ( ON::mesh_type  mesh_type,
const ON_MeshParameters mp = nullptr 
) const
overridevirtual

Description: CRhinoHeaders can have several different types of meshes and different numbers of meshes. A b-rep can have a render and an analysis mesh on each face. A mesh object has a single render mesh and no analysis mesh. Curve, point, and annotation objects have no meshes. Parameters: mesh_type - [in] type of mesh to count mp - [in] if not NULL and if the object can change its mesh (like a brep), then only meshes that were created with these mesh parameters are counted. Returns: number of meshes.

Reimplemented from CRhinoObject.

◆ ObjectType()

ON::object_type CRhinoInstanceObject::ObjectType ( ) const
overridevirtual

Description: Returns a constant that determines the type of CRhinoObject. Returns: @untitled table ON::point_object CRhinoPointObject ON::pointset_object CRhinoPointCloudObject ON::curve_object CRhinoCurveObject ON::brep_object CRhinoBrepObject ON::mesh_object CRhinoMeshObject ON::annotation_object CRhinoAnnotation ON::light_object CRhinoLight Remarks: A brep object can be a surface or polysurface. An annotation object can be anything derived from CRhinoAnnotation.

Implements CRhinoObject.

◆ OnDoubleClick()

ON_wString CRhinoInstanceObject::OnDoubleClick ( const CRhinoDoubleClickContext double_click_context) const
overridevirtual

Description: Called when a user double clicks on this object. If the function returns a non-empty string, the string is interpreted as a command macro to execute.

Reimplemented from CRhinoObject.

◆ operator=()

CRhinoInstanceObject& CRhinoInstanceObject::operator= ( const CRhinoInstanceObject )

◆ Pick()

int CRhinoInstanceObject::Pick ( const CRhinoPickContext pick_context,
CRhinoObjRefArray pick_list 
) const
overridevirtual

Description: Expert level tool. Should not normally be used by Rhino plug-ins. Parameters: pick_list: [in/out] If object should be picked, it is appended to the pick_list Returns: Number of items added to pick_list.

Reimplemented from CRhinoObject.

◆ PickFilter()

bool CRhinoInstanceObject::PickFilter ( const CRhinoGetObject ,
bool   
) const
override

◆ PromotePreviewMeshes()

bool CRhinoInstanceObject::PromotePreviewMeshes ( ON::mesh_type  )
overridevirtual

Reimplemented from CRhinoObject.

◆ SelectSubObject()

int CRhinoInstanceObject::SelectSubObject ( ON_COMPONENT_INDEX  component_index,
bool  bSelect = true,
bool  bSynchHighlight = true,
bool  bPersistentSelect = false 
) const
overridevirtual

Description: Reports if an object can be selected. Parameters: component_index - [in] index of subobject to check bSelect - [in] (default=true) bSynchHighlight - [in] (default=true) If true, then the object is highlighted if it is selected and not highlighted if is is not selected. bPersistentSelect - [in] (default=false) Subobjects that are persistently selected stay selected when a command terminates. Returns: 0: object is not selected 1: object is selected 2: object is selected persistently Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on. See Also: CRhinoDoc::UnselectAll CRhinoView::UnselectAllSubObjects

Reimplemented from CRhinoObject.

◆ SetInstanceDefinition()

bool CRhinoInstanceObject::SetInstanceDefinition ( const CRhinoInstanceDefinition idef)

◆ SetInstanceTransform()

bool CRhinoInstanceObject::SetInstanceTransform ( const ON_Xform xform)

Description: Sets the instance transform to xform. Do not use this if he instance object has already been added to the document. Parameters: xform - [in]

◆ SetTextureCoordinatesFromPlugIn()

bool CRhinoInstanceObject::SetTextureCoordinatesFromPlugIn ( const ON_UUID plugin_id,
int  mapping_channel_id 
) const
overridevirtual

Reimplemented from CRhinoObject.

◆ ShortDescription()

const wchar_t* CRhinoInstanceObject::ShortDescription ( bool  bPlural) const
overridevirtual

Description: Localized short description of object like "curve", "surface", "mesh", etc.). Parameters: bPlural - [in] If true, then a plural, like "curves", "surfaces", etc., is returned. Returns: NULL terminated string.

Implements CRhinoObject.

◆ SnapTo()

bool CRhinoInstanceObject::SnapTo ( const CRhinoSnapContext snap_context,
CRhinoSnapEvent snap_event 
) const
overridevirtual

Description: Low level tool for internal use only. See definition of CRhinoObject::SnapTo for detailed information. Remarks: This function should not be used in Rhino plug-ins.

Reimplemented from CRhinoObject.

◆ SubObjectFromComponentIndex()

const CRhinoObject* CRhinoInstanceObject::SubObjectFromComponentIndex ( const ON_COMPONENT_INDEX ci) const

◆ SubObjectsAreHighlighted()

int CRhinoInstanceObject::SubObjectsAreHighlighted ( ) const
overrideprotectedvirtual

returns number of highlighted subobjects

Reimplemented from CRhinoObject.

◆ SubObjectsAreSelected()

int CRhinoInstanceObject::SubObjectsAreSelected ( ) const
overrideprotectedvirtual

returns number of selected subobjects

Reimplemented from CRhinoObject.

◆ TransformInstance()

bool CRhinoInstanceObject::TransformInstance ( ON_Xform  xform)

Description: Applies the transformtion to the instance. Do not use this if he instance object has already been added to the document. Parameters: xform - [in]

◆ UnhighlightAllSubObjects()

int CRhinoInstanceObject::UnhighlightAllSubObjects ( )
overridevirtual

returns number of changed subobjects

Reimplemented from CRhinoObject.

◆ UnselectAllSubObjects()

int CRhinoInstanceObject::UnselectAllSubObjects ( )
overridevirtual

returns number of unselected subobjects

Reimplemented from CRhinoObject.

◆ UsesDefinition()

int CRhinoInstanceObject::UsesDefinition ( int  idef_index) const

Description: Determine if this reference uses an instance definition. Parameters: idef_index - [in] Returns: @untitled table 0 no >=1 This CRhinoInstanceObject uses the instance definition and the returned value is the nesting depth.

Friends And Related Function Documentation

◆ CRhinoDoc

friend class CRhinoDoc
friend

◆ CRhinoInstanceDefinition

friend class CRhinoInstanceDefinition
friend

◆ CRhinoInstanceDefinitionTable

friend class CRhinoInstanceDefinitionTable
friend

◆ CRhinoRead3dmHelper

friend class CRhinoRead3dmHelper
friend

◆ CRhInstanceDisplay

friend class CRhInstanceDisplay
friend

◆ CRhInstanceGrip

friend class CRhInstanceGrip
friend