Rhino C++ API  8.14
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
CRhinoObject Class Referenceabstract

Base class for all runtime Rhino objects. More...

#include <rhinoSdkObject.h>

Inheritance diagram for CRhinoObject:
ON_Object CRhinoAnnotation CRhinoBrepObject CRhinoClippingPlaneObject CRhinoCurveObject CRhinoDetailViewObject CRhinoExtrusionObject CRhinoGroupObject CRhinoHatch CRhinoInstanceObject CRhinoLight CRhinoMeshObject CRhinoNamedViewCameraIcon CRhinoPhantomObject CRhinoPointCloudObject CRhinoPointObject CRhinoProxyObject CRhinoSubDObject CRhinoTextDot CRhinoWidget CRhinoWireframeObject

Public Types

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
}
 

Public Member Functions

 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
 
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
 
virtual int CreateMeshes (ON::mesh_type mesh_type, const ON_MeshParameters &mp, bool bIgnoreCustom=false)
 
BOOL32 DeleteAttributeUserData (ON_UUID userdata_uuid)
 
void DeleteDynamicTransform ()
 
virtual void DeleteFromDocNotification ()
 
bool DeleteGeometryUserData (ON_UUID userdata_uuid)
 
void DestroyMeshes (ON::mesh_type mesh_type)
 
virtual void DestroyMeshes (ON::mesh_type mesh_type, bool bDeleteMeshes)
 
void DestroyRuntimeCache (bool bDelete=true) override
 virtual ON_Object override More...
 
class CRhinoDocDocument () const
 
unsigned int DocumentRuntimeSerialNumber () const
 
virtual void Draw (class CRhinoDisplayPipeline &) const
 Draws object based on pipeline display attributes... More...
 
void Draw (CRhinoViewport &) const
 
virtual void DrawGrips (class CRhinoDisplayPipeline &) const
 
virtual void DrawHighlightedSubObjects (class CRhinoDisplayPipeline &) const
 
virtual void DrawSubObject (class CRhinoDisplayPipeline &, ON_COMPONENT_INDEX) const
 Draws wireframe representation of a sub object. More...
 
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 EnableGrips (bool bGripsOn)
 
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
 
virtual bool GetFrame (ON_Plane &plane) const
 
ON_UserDataGetGeometryUserData (ON_UUID userdata_uuid) const
 
virtual int GetGrips (ON_SimpleArray< class CRhinoGripObject * > &grip_list) const
 
virtual int GetHighlightedSubObjects (ON_SimpleArray< ON_COMPONENT_INDEX > &component_indices) 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 GetSelectedSubObjects (ON_SimpleArray< ON_COMPONENT_INDEX > &component_indices) 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
 
virtual bool GetTightBoundingBox (ON_BoundingBox &tight_bbox, bool bGrowBox=false, const ON_Xform *xform=nullptr) const
 
virtual int GetWireframeCurves (ON_SimpleArray< ON_Curve * > &curve_list) 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
 
virtual bool HighlightRequiresRedraw () const
 
virtual bool HighlightSubObject (ON_COMPONENT_INDEX component_index, 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
 
virtual bool IsMeshable (ON::mesh_type) const
 Returns true if the object is capable of having a mesh of the specified type. More...
 
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
 
virtual bool IsSolid () const
 
virtual bool IsSubObjectHighlighted (ON_COMPONENT_INDEX component_index) const
 true if specified component is highlighted More...
 
bool IsSubObjectSelectable (ON_COMPONENT_INDEX component_index, bool bIgnoreSelectionState=false) const
 
virtual bool IsSubObjectSelected (ON_COMPONENT_INDEX component_index) 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 int MeshCount (ON::mesh_type mesh_type, const ON_MeshParameters *mp=0) const
 
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
 
virtual ON::object_type ObjectType () const override=0
 
virtual ON_wString OnDoubleClick (const CRhinoDoubleClickContext &double_click_context) const
 
CRhinoObjectoperator= (const CRhinoObject &)
 copies source object UUID More...
 
bool PerViewportIsVisible (ON_UUID viewport_id) const
 
virtual int Pick (const CRhinoPickContext &pick_context, class CRhinoObjRefArray &pick_list) const
 
virtual bool PickFilter (const class CRhinoGetObject &, bool) const
 
virtual void PreDrawUpdate (CRhinoDisplayPipeline &dp) const
 
virtual bool PrepareToWrite (int archive_3dm_version)
 
virtual bool PromotePreviewMeshes (ON::mesh_type)
 
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
 
virtual int SelectSubObject (ON_COMPONENT_INDEX component_index, bool bSelect=true, bool bSynchHighlight=true, bool bPersistentSelect=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 bool SetTextureCoordinatesFromPlugIn (const ON_UUID &plugin_id, int mapping_channel_id) const
 
virtual const wchar_t * ShortDescription (bool bPlural) const =0
 
virtual unsigned int SizeOf () const override
 returns number of bytes used by this particular instance More...
 
virtual bool SnapTo (const CRhinoSnapContext &snap_context, CRhinoSnapEvent &snap_event) const
 
ON::active_space Space () const
 
virtual ON_ComponentStatus SubObjectStatus () const
 
virtual bool SupportsBrepProxyReferenceCounting () const
 
bool UndoModifyAttributes (unsigned int ur_sn=0)
 
virtual int UnhighlightAllSubObjects ()
 returns number of changed subobjects More...
 
virtual int UnselectAllSubObjects ()
 returns number of unselected subobjects More...
 
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
 

Static Public Member Functions

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

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

static int m_no_show_mark
 

Protected Member Functions

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 int SubObjectsAreHighlighted () const
 returns number of highlighted subobjects More...
 
virtual int SubObjectsAreSelected () const
 returns number of selected subobjects More...
 
virtual void SynchAttributes ()
 light objects are special because they are not in the geometry lists More...
 

Protected Attributes

ON_BoundingBox m_bbox
 world coordinate bounding box More...
 
unsigned char m_geomem_type
 
ON_Geometrym_geometry
 
const CRhinoHistoryRecordm_history_record
 

Friends

class CRhCameraIcon
 
class CRhinoDoc
 
class CRhinoGripObject
 
class CRhinoHistoryManager
 
class CRhinoHistoryRecordTable
 
class CRhinoInstanceDefinition
 
class CRhinoInstanceDefinitionTable
 
class CRhinoLight
 
class CRhinoLightTable
 
class CRhinoObjectGrips
 used to determine if geometry is in document More...
 
class CRhinoObjectIterator
 
class CRhinoPhantomObject
 
class CRhinoProxyObject
 
class CRhinoRead3dmHelper
 
class CRhObjectFinder
 
class CRhObjectSdkExtension
 
class CRhRenderPreview
 
class CRhSnapToVisible
 

Detailed Description

Base class for all runtime Rhino objects.

Member Enumeration Documentation

◆ GEOMETRY_TYPE

Geometry types for CRhinoObjRef (same as the ON::object_type) In an ideal world, the CRhinoObject::GEOMETRY_TYPE would be removed and ON::object_type would be used everywhere.

Enumerator
unknown_object_type 
point_object 

single point

pointset_object 

point cloud or point grid

curve_object 

curve (can be 3d edge in a brep)

surface_object 

surface (can be face in a brep)

polysrf_object 

brep with 2 or more faces

edge_object 

brep edge (with an associated ON_BrepTrim)

polyedge_object 

a chain of edges and/or curves

loop_object 

brep loop

brepvertex_filter 

brep vertex

mesh_object 
annotation_object 
light_object 
instance_reference 
grip_object 
morph_control_object 
subd_object 
meshvertex_filter 

mesh vertex as an ON_MeshComponentRef

meshedge_filter 

mesh edge as an ON_MeshComponentRef

meshface_filter 

mesh triangle, quad or ngon as an ON_MeshComponentRef

meshcomponent_reference 

mesh vertex, edge, face, ngon (ON_MeshComponentRef)

cage_object 
hatch_object 
phantom_object 
extrusion_object 
any_object 

◆ objectframe_flags

enum CRhinoObject::objectframe_flags : unsigned int
Enumerator
objectframe_standard 

Never returns unset plane. Will always calculate the plane even if nothing is stored.

objectframe_include_scale_transforms 

By default, the plane is orientation and rotation only. But scale transforms are stored if you need them.

objectframe_return_unset 

The object frame may be stored unset by default. If this is the case, and you want to know if it really is unset, this will tell you.

Constructor & Destructor Documentation

◆ CRhinoObject() [1/3]

CRhinoObject::CRhinoObject ( )

assigns a new object UUID

◆ CRhinoObject() [2/3]

CRhinoObject::CRhinoObject ( const ON_3dmObjectAttributes )

◆ ~CRhinoObject()

virtual CRhinoObject::~CRhinoObject ( )
virtual

◆ CRhinoObject() [3/3]

CRhinoObject::CRhinoObject ( const CRhinoObject )

copies source object UUID

Member Function Documentation

◆ AddToDocNotification()

virtual void CRhinoObject::AddToDocNotification ( )
virtual

Description: This call informs an object it is about to be added to the list of active objects in the document. Some objects, like clipping planes, need to do a little extra cleanup before they are deleted.

Reimplemented in CRhinoWidget, CRhinoClippingPlaneObject, and CRhinoDetailViewObject.

◆ AttachAttributeUserData()

BOOL32 CRhinoObject::AttachAttributeUserData ( ON_UserData pUserData)

Description: Attach user data to the Rhino object's attributes. Parameters: pUserData - [in] user data to attach to object's attributes. The ON_UserData pointer passed to AttachUserData() must be created with new. If successful, the returned value of pUserData is NULL. Returns: If TRUE is returned, then ON_Object will delete the user data when appropriate. If FALSE is returned, then data could not be attached and caller must delete.
Remarks: AttachUserData() will fail if the user data's m_userdata_uuid field is nil or not unique.

◆ AttachGeometryUserData()

bool CRhinoObject::AttachGeometryUserData ( ON_UserData pUserData)

user data Description: Attach user data to the Rhino object's geometry. This user data will persist through file IO if the user data correctly implements file IO support. Parameters: pUserData - [in] user data to attach to object. The ON_UserData pointer passed to AttachUserData() must be created with new. Returns: If TRUE is returned, then ON_Object will delete the user data when appropriate. If FALSE is returned, then data could not be attached and caller must delete it.
Remarks: AttachGeometryUserData() will fail if the user data's m_userdata_uuid field is nil or not unique.

◆ Attributes() [1/2]

CRhinoObjectAttributes& CRhinoObject::Attributes ( )

◆ Attributes() [2/2]

virtual const CRhinoObjectAttributes& CRhinoObject::Attributes ( ) const
virtual

Description: Object attributes include normal/locked/hidden status, name, layer, rendering attributes, display attributes, group membership, and so on.

Returns: Attributes

Remarks: Some attributes like drawing color and rendering material can be specified per object or per layer. The values of the attributes ColorSource() and MaterialSource() determine which definition should be used.

See Also: CRhinoObject::ObjectLayer, CRhinoObject::ObjectMaterial, CRhinoObject::ObjectColor

Reimplemented in CRhinoGripObject.

◆ BeginTransform()

virtual void CRhinoObject::BeginTransform ( CRhinoDoc doc,
bool  bDeleteOriginal,
bool  bAddNewObjectToDoc,
bool  bAddTransformHistory 
)
virtual

Description: Expert user tool Called immediately after duplication of the transformed object, and before changes are made to it.

Reimplemented in CRhinoNamedViewCameraIcon.

◆ BoundingBox() [1/2]

virtual ON_BoundingBox CRhinoObject::BoundingBox ( ) const
virtual

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 in CRhinoNamedViewCameraIcon, CRhinoInstanceObject, CRhinoSubDObject, CRhinoWidget, CRhinoHatch, CRhinoAnnotation, CRhinoTextDot, CRhinoBrepObject, CRhinoClippingPlaneObject, CRhinoCurveObject, and CRhinoLight.

◆ BoundingBox() [2/2]

virtual ON_BoundingBox CRhinoObject::BoundingBox ( const class CRhinoViewport pViewport) const
virtual

Description: Gets 3d axis aligned world coordinate bounding box that contains the geometry used to display the object.
For most objects, this is the same as BoundingBox(). For objects like lights that use an icon, the world coordinate bounding box depends on the view.

Returns: 3d bounding box

Remarks: The default implementation calls BoundingBox().

Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.

◆ BrepReferenceCount()

unsigned int CRhinoObject::BrepReferenceCount ( ) const

◆ BrepReferenceCounter()

class CRhObjectReferenceCounter* CRhinoObject::BrepReferenceCounter ( void  ) const

Description: If you are writing a command or plug-in and and need a brep form of an object type that supports BrepForm, call Geometry()->BrepForm().

The definition of CRhReferenceCountedBrep is not available in the SDK and this function is for use in the core Rhino code. The returned class must be deleted by the caller.

◆ BrepReferenceCounter_DestroyRuntimeCache()

void CRhinoObject::BrepReferenceCounter_DestroyRuntimeCache ( bool  bDelete) const

◆ BrepReferenceCounterExists()

bool CRhinoObject::BrepReferenceCounterExists ( ) const

◆ CopyHistoryOnReplace()

bool CRhinoObject::CopyHistoryOnReplace ( ) const

Description: Returns whether the CopyHistoryOnReplace flag is set. Returns: true if the object has history and the flag is set false if there's no history or the flag is clear

◆ CreateMeshes()

virtual int CRhinoObject::CreateMeshes ( ON::mesh_type  mesh_type,
const ON_MeshParameters mp,
bool  bIgnoreCustom = false 
)
virtual

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 in CRhinoInstanceObject, CRhinoSubDObject, CRhinoExtrusionObject, CRhinoBrepObject, and CRhinoMeshObject.

◆ DeleteAttributeUserData()

BOOL32 CRhinoObject::DeleteAttributeUserData ( ON_UUID  userdata_uuid)

Description: Remove user data from a Rhino object's attributes. Parameters: userdata_uuid - [in] value of the user data's m_userdata_uuid field. Returns: If TRUE is returned, then the user data was attached to this object and it was detached. If FALSE is returned, then the user data was not attached to this object to begin with. In all cases, you can be assured that the user data is no longer attached to "this". Remarks: Call delete pUserData if you want to destroy the user data.

◆ DeleteDynamicTransform()

void CRhinoObject::DeleteDynamicTransform ( )

Description: Delete the dynamic transformation.

◆ DeleteFromDocNotification()

virtual void CRhinoObject::DeleteFromDocNotification ( )
virtual

Description: This call informs an object it is about to be deleted. Some objects, like clipping planes, need to do a little extra cleanup before they are deleted.

Reimplemented in CRhinoNamedViewCameraIcon, CRhinoSubDObject, CRhinoWidget, CRhinoHatch, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoClippingPlaneObject, CRhinoCurveObject, and CRhinoTextDot.

◆ DeleteGeometryUserData()

bool CRhinoObject::DeleteGeometryUserData ( ON_UUID  userdata_uuid)

Description: Remove user data from a Rhino object's geometry. Parameters: pUserData - [in] user data to attach to object. The ON_UserData pointer passed to DetachUserData() must have been previously attached using AttachUserData().
Returns: If TRUE is returned, then the user data was attached to this object and it was detached. If FALSE is returned, then the user data was not attached to this object to begin with. In all cases, you can be assured that the user data is no longer attached to "this". Remarks: Call delete pUserData if you want to destroy the user data.

◆ Destroy()

void CRhinoObject::Destroy ( )
protected

◆ DestroyMeshes() [1/2]

void CRhinoObject::DestroyMeshes ( ON::mesh_type  mesh_type)

virtual

◆ DestroyMeshes() [2/2]

virtual void CRhinoObject::DestroyMeshes ( ON::mesh_type  mesh_type,
bool  bDeleteMeshes 
)
virtual

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 in CRhinoSubDObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoExtrusionObject, and CRhinoMeshObject.

◆ DestroyRuntimeCache()

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

virtual ON_Object override

Reimplemented from ON_Object.

Reimplemented in CRhinoSubDObject, and CRhinoPointCloudObject.

◆ Document()

class CRhinoDoc* CRhinoObject::Document ( ) const

◆ DocumentRuntimeSerialNumber()

unsigned int CRhinoObject::DocumentRuntimeSerialNumber ( ) const

Description: Gets document that owns the object.

Returns: Document that manages object.

Remarks: When an object is created, it does not belong to a document. CRhinoDoc::AddObject() or CRhinoDoc::ReplaceObject() are used to add new objects to a document. After the object is added to a document, it it managed by that document. If the CRhinoObject::Document() returns NULL, then the object is not part of a document.

◆ Draw() [1/2]

virtual void CRhinoObject::Draw ( class CRhinoDisplayPipeline ) const
virtual

◆ Draw() [2/2]

void CRhinoObject::Draw ( CRhinoViewport ) const
Deprecated:
use Draw function that takes a display pipeline

◆ DrawGrips()

virtual void CRhinoObject::DrawGrips ( class CRhinoDisplayPipeline ) const
virtual

Draws the object's grips, control polygon, and dynamic wireframe object. Dynamic shaded objects are drawn in the Draw

◆ DrawHighlightedSubObjects()

virtual void CRhinoObject::DrawHighlightedSubObjects ( class CRhinoDisplayPipeline ) const
virtual

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

Reimplemented in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoMeshObject, and CRhinoExtrusionObject.

◆ DrawSubObject()

virtual void CRhinoObject::DrawSubObject ( class CRhinoDisplayPipeline ,
ON_COMPONENT_INDEX   
) const
virtual

◆ DrawV6()

virtual void CRhinoObject::DrawV6 ( class CRhinoObjectDrawContext draw_context) const
virtual

Rhino V6 object drawing function.

Ideally, DrawV6() will replace all the drawing functions below. The single parameter will indicate what should be drawn, where it is being drawn, and how it should appear. If that happens, then this function will be renamed "Draw".

For now it is called DrawV6() so it is easy to search for it.

The class CRhinoObjectDrawContext is defined in rhinoSdkDraw.h.

For now, you must include rhinoSdkDraw.h by hand. Once the header file rhinoSdkDraw.h is being changed less than once a day, it will be included by rhinoSdk.h.

Reimplemented in CRhinoBrepObject, CRhinoPointCloudObject, CRhinoMeshObject, CRhinoPointObject, CRhinoExtrusionObject, and CRhinoCurveObject.

◆ DuplicateRhinoObject()

virtual CRhinoObject* CRhinoObject::DuplicateRhinoObject ( ) const
virtual

Description: Duplicates the Rhino object. If "this" is a CRhinoProxyObject, the duplicate is a "real" Rhino object. If "this" is an ordinary Rhino object like a CRhinoCurveObject, CRhinoPointObject, and so on, then the duplicate is another rhino object of the same type.
Returns: NULL or a pointer to the duplicate. The new object is not added to the Rhino document.

Reimplemented in CRhinoProxyObject, and CRhinoClippingPlaneObject.

◆ EnableAnalysisMode()

* enum ANALYSIS_MODE* * bool CRhinoObject::EnableAnalysisMode ( ON_UUID  am_id,
bool  bEnable = true 
) const

new way (not virtual)

Description: Used to turn analysis modes on and off. Parameters: am - [in] specifies analysis mode bEnable - [in] true to turn mode on. Remarks: The zebra, Emap, curvature, and draft angle surface analysis modes are mutually exclusive. Turning one on will automatically turn off the other three.
The edge and curvature_graph modes are independent of all other modes. Returns: True if this object supports the analysis mode. virtual bool EnableAnalysisMode( ANALYSIS_MODE am, bool bEnable = true ) const; ///< old way

◆ EnableCustomGrips()

virtual bool CRhinoObject::EnableCustomGrips ( class CRhinoObjectGrips custom_grips)
virtual

Description: Turns on/off the object's editing grips Parameters: grips - [in] This class must be on the heap. The Rhino PointsOff command calls CRhinoObject::EnableGrips(0), which will delete grips. If NULL, grips are turned off. Returns: True if the call succeeded. If you attempt to add custom grips to an object that does not support custom grips, then false is returned and it is your responsibility to delete custom_grips. See Also: CRhinoObject::GripsOn CRhinoObject::GetGrips

◆ EnableGrips()

virtual void CRhinoObject::EnableGrips ( bool  bGripsOn)
virtual

◆ EndTransform()

virtual void CRhinoObject::EndTransform ( CRhinoDoc doc,
bool  bDeleteOriginal,
bool  bAddNewObjectToDoc,
bool  bAddTransformHistory 
)
virtual

Description: Expert user tool Called at the end of the transformation process. Default implementation doesn't do anything

Reimplemented in CRhinoNamedViewCameraIcon.

◆ FromId()

static const CRhinoObject* CRhinoObject::FromId ( unsigned int  rhino_doc_runtime_serial_number,
ON_UUID  rhino_object_id 
)
static

◆ FromRuntimeSerialNumber()

static const CRhinoObject* CRhinoObject::FromRuntimeSerialNumber ( unsigned int  rhino_doc_runtime_serial_number,
unsigned int  rhino_object_runtime_serial_number 
)
static

Description: Get a pointer to a CRhinoObject from a runtime_serial number or id. Parameters: rhino_doc_runtime_serial_number - [in] If you want to search all documents, pass 0. Specifying a document improves performance. rhino_object_runtime_serial_number - [in] rhino_object_id - [in] Returns: The Rhino object with the matching runtime serial number or null if no object exists. Remarks:

  • The version that takes the document runtime serial number is faster and should be used when performance is critical.
  • The runtime serial number does not persist in 3dm archives and is not unique between instance of Rhino.exe.
  • Deleted objects can be found by object_runtime_serial_number.
  • Deleted objects cannot be found by id. See Also: CRhinoObject::RuntimeSerialNumber();

◆ Geometry()

const ON_Geometry* CRhinoObject::Geometry ( ) const

returns a pointer to the object's geometry

◆ GetAttributeUserData()

ON_UserData* CRhinoObject::GetAttributeUserData ( ON_UUID  userdata_uuid) const

Description: Get a pointer to user data on a Rhino object's attributes. Parameters: userdata_uuid - [in] value of the user data's m_userdata_uuid field. Remarks: The returned user data is still attached to the object. Deleting the returned user data will automatically remove the user data from the object.

◆ GetDynamicTransform()

bool CRhinoObject::GetDynamicTransform ( ON_Xform dynamic_xform) const

dynamic transformation commands Description: While an object is being dynamically transformed (dragged, rotated, ...), the current transformation can be retrieved and used for creating dynamic display. Properties: xform - [out] Returns: True if the object is being edited and its transformation is available. False if the object is not being edited, in which case the identity xform is returned.

◆ GetFrame()

virtual bool CRhinoObject::GetFrame ( ON_Plane plane) const
virtual

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

Reimplemented in CRhinoInstanceObject, CRhinoCurveObject, CRhinoPointObject, and CRhinoBrepObject.

◆ GetGeometryUserData()

ON_UserData* CRhinoObject::GetGeometryUserData ( ON_UUID  userdata_uuid) const

Description: Get a pointer to user data on a Rhino object's geometry. Parameters: userdata_uuid - [in] value of the user data's m_userdata_uuid field. Remarks: The returned user data is still attached to the object. Deleting the returned user data will automatically remove the user data from the object.

◆ GetGrips()

virtual int CRhinoObject::GetGrips ( ON_SimpleArray< class CRhinoGripObject * > &  grip_list) const
virtual

Description: If grips are enabled, then GetGrips appends the object's grips to the grip_list[] array. Returns: Number of grips appended to the array. See Also: CRhinoObject::GripsOn CRhinoObject::EnableGrips

◆ GetHighlightedSubObjects()

virtual int CRhinoObject::GetHighlightedSubObjects ( ON_SimpleArray< ON_COMPONENT_INDEX > &  component_indices) const
virtual

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 in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, and CRhinoMeshObject.

◆ GetMeshes() [1/2]

std::vector<std::shared_ptr<const ON_Mesh> > CRhinoObject::GetMeshes ( ON::mesh_type  mesh_type) const

Description: Get existing meshes used to render and analyze surface and polysurface objects. Parameters: ON::mesh_type - [in] type of mesh to get Returns: Shared pointers to const meshes as stored on the objects. See Also: CRhinoObject::DestroyMeshes CRhinoObject::MeshCount CRhinoObject::IsMeshable virtual

◆ GetMeshes() [2/2]

virtual int CRhinoObject::GetMeshes ( ON::mesh_type  mesh_type,
ON_SimpleArray< const ON_Mesh * > &  meshes 
) const
virtual

Description: Get existing meshes used to render and analyze surface and polysurface objects. Parameters: ON::mesh_type - [in] type of mesh to get meshes - [out] meshes are appended to this array. The CRhinoObject owns these meshes so the meshes cannot be modified. Returns: Number of meshes added to meshes array See Also: CRhinoObject::DestroyMeshes CRhinoObject::MeshCount CRhinoObject::IsMeshable

Reimplemented in CRhinoSubDObject, CRhinoBrepObject, CRhinoExtrusionObject, and CRhinoMeshObject.

◆ GetRenderMeshParameters()

void CRhinoObject::GetRenderMeshParameters ( ON_MeshParameters mp) const

◆ GetSelectedSubObjects()

virtual int CRhinoObject::GetSelectedSubObjects ( ON_SimpleArray< ON_COMPONENT_INDEX > &  component_indices) const
virtual

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 in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, and CRhinoMeshObject.

◆ GetSubobjectMaterialComponents()

virtual int CRhinoObject::GetSubobjectMaterialComponents ( ON_SimpleArray< ON_COMPONENT_INDEX > &  components_with_subobject_materials) const
virtual

Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.

◆ GetSubObjects()

virtual int CRhinoObject::GetSubObjects ( ON_SimpleArray< CRhinoObject * > &  subObjects,
const class CRhinoViewport pViewport = NULL 
) const
virtual

Description: Explode this object into subobjects. Parameters: subObjects - [out] subobjects are appended to this list. The returned objects have not been added to the document and it is the caller's responsibility to manage them. pViewport - [in] Some objects' appearance is viewport dependent. If not NULL, the object should be exploded with respect to its appearance in this viewport. Returns: Number of subobjects ( >= 2 ) or 0 if this object cannot be exploded.

Reimplemented in CRhinoBrepObject, and CRhinoSubDObject.

◆ GetTightBoundingBox()

virtual bool CRhinoObject::GetTightBoundingBox ( ON_BoundingBox tight_bbox,
bool  bGrowBox = false,
const ON_Xform xform = nullptr 
) const
virtual

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 in CRhinoPointCloudObject, CRhinoBrepObject, CRhinoCurveObject, CRhinoInstanceObject, CRhinoSubDObject, CRhinoExtrusionObject, CRhinoDetailViewObject, CRhinoClippingPlaneObject, CRhinoMeshObject, CRhinoLight, CRhinoPointObject, CRhinoHatch, and CRhinoAnnotation.

◆ GetWireframeCurves()

virtual int CRhinoObject::GetWireframeCurves ( ON_SimpleArray< ON_Curve * > &  curve_list) const
virtual

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 in CRhinoSubDObject, CRhinoBrepObject, CRhinoCurveObject, CRhinoInstanceObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoWireframeObject.

◆ GripsEnabler()

const class CRhinoGripsEnabler* CRhinoObject::GripsEnabler ( ) const

Returns: If the object has grips on, this returns the enabler to turn on that type of grips. If the object does not have grips on, this returns NULL.

◆ GripsOn()

int CRhinoObject::GripsOn ( ) const

◆ GripsSelected()

bool CRhinoObject::GripsSelected ( ) const

Returns: True if grips are turned on and at least one is selected. See Also: CRhinoObject::GripsOn

◆ HasCustomRenderMeshes()

bool CRhinoObject::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.

OBSOLETE - REMOVE ALL CALLS TO THIS FUNCTION ON_DEPRECATED bool SetTextureMapping() const;

Parameters
vpThe viewport being rendered. If nullptr, no support for view dependent meshes.
flagsSee RhRdk::CustomRenderMeshes::IManager::Flags. If nullptr, assumed to be Flags::None and no support for returning flags.
requestingPlugInThe requesting plug-in - typically the render plug-in requesting the meshes. Can be nullptr.
pAttributesThe display attributes currently being used - nullptr if this is production rendering. Can be nullptr.
Returns
True if CustomMeshes will return a set of primitives, otherwise false. CustomMeshes may still return an empty collection - in case of cancellation something similar.

◆ HasDynamicTransform()

bool CRhinoObject::HasDynamicTransform ( ) const

Returns: True if the object has a dynamic transformation.

◆ HasSubobjectMaterials()

virtual bool CRhinoObject::HasSubobjectMaterials ( void  ) const
virtual

Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.

◆ Highlight()

bool CRhinoObject::Highlight ( bool  bHighlight = true) const

◆ HighlightRequiresRedraw()

virtual bool CRhinoObject::HighlightRequiresRedraw ( ) const
virtual

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

Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoBrepObject.

◆ HighlightSubObject()

virtual bool CRhinoObject::HighlightSubObject ( ON_COMPONENT_INDEX  component_index,
bool  bHighlight = true 
) const
virtual

◆ HistoryRecord()

const CRhinoHistoryRecord* CRhinoObject::HistoryRecord ( ) const

Description: Gets the history record that describes how this object was created. This information is used to update this object when Rhino history is enabled and an input object changes. Returns: NULL or a pointer to the history record for this object.

◆ Id()

const ON_UUID CRhinoObject::Id ( ) const

Code that uses CRhinoObject.Id() now will not need to be modified when m_uuidis removed from ON_3dmObjectAttributes.

◆ InAnalysisMode() [1/2]

bool CRhinoObject::InAnalysisMode ( ) const

Returns: True if any visual analysis mode is active

◆ InAnalysisMode() [2/2]

bool CRhinoObject::InAnalysisMode ( const ON_UUID am_id) const

bool AnalysisMode( ANALYSIS_MODE am ) const; ///< old way

Description: Reports if an analysis mode is currently enabled for an object Parameters: am - [in] Returns: True if the analysis display mode is currently enabled. new way

◆ InitialObjectFrame()

ON_Plane CRhinoObject::InitialObjectFrame ( const CRhinoDoc ) const

Description: Gets a guess at the initial object frame - this used to be the code that guesses the gumball location and orientation from the object geometry.

Returns: A plane defining the object frame.

Remarks: This is a "fake" virtual function - because I can't extend the SDK. The implementation is to switch over the built in types and return a guessed frame. If that doesn't work, it returns a CPlane aligned bounding box center assuming the cplane can be found for the current document view. If that fails, a world plane BB center. virtual

◆ InShadedAnalysisMode()

const class CRhinoVisualAnalysisMode* CRhinoObject::InShadedAnalysisMode ( ) const

Description: An object can have at most one shaded analysis mode active at any time. It is possible to have multiple wireframe modes active. For example, you can have zebra, edge, and curvature hair analysis on at the same time, but you cannot have zebra and draft angle on at the same time. Returns: If the object has a shaded analysis mode on, a pointer to the mode's controller is returned. For any mode, this pointer is always the same and is valid for the entire life of the application.

◆ InternalVirtual_IsSelectable()

virtual bool CRhinoObject::InternalVirtual_IsSelectable ( bool  bIgnoreSelectionState,
bool  bIgnoreGripsState,
bool  bIgnoreLocking,
bool  bIgnoreVisibility 
) const
protectedvirtual

Description: Objects derived from CRhinoObject may override InternalVirtual_IsSelectable() when the default behavior needs to be modified.

◆ IsActiveInDocument()

unsigned int CRhinoObject::IsActiveInDocument ( ) const

Description: Determine if an object is active in a document. This is a required piece of information when deciding if a modification to an object should set the document modified flag. Returns: 0: The object does not belong to a document or it is deleted. != 0: The object is active in a document and the serial number of that document is returned.

◆ IsActiveInViewport()

virtual bool CRhinoObject::IsActiveInViewport ( const class CRhinoViewport ) const
virtual

Description: Query to determine if this object is active in a particular viewport.
Parameters: viewport - [in] Returns: True if the object is active in viewport. Remarks: The default implementation tests for space and viewport id. This handles things like testing if a page space object is visible in a modeling view.

◆ IsDeletable()

virtual bool CRhinoObject::IsDeletable ( ) const
virtual

Description: Some objects cannot be deleted, like grips on lights and annotation objects. Returns: True if object can be deleted.

Reimplemented in CRhinoGripObject, CRhinoWidget, and CRhinoGroupObject.

◆ IsDeleted()

bool CRhinoObject::IsDeleted ( ) const

Description: Returns true if the object is deleted.

Returns: true if object is deleted.

Remarks: Use CRhinoDoc::UndeleteObject() to undelete an object.

◆ IsGroupObject()

virtual bool CRhinoObject::IsGroupObject ( ) const
virtual

Description: Test object to see if it is a proxy CRhinoGroupObject. Returns: true if this is a CRhinoGroupObject.

Reimplemented in CRhinoGroupObject.

◆ IsHidden()

bool CRhinoObject::IsHidden ( ) const

◆ IsHighlighted()

int CRhinoObject::IsHighlighted ( BOOL32  bCheckSubObjects = false) const

highlighted state (almost always = IsSelected() except in one or two commands)

Description: Check highlight state. Parameters: bCheckSubObjects - [in] If true and the entire object is not highlighted, and some subset of the object is highlighted, like some edges of a surface, then 3 is returned. If false and the entire object is not highlighted, then zero is returned. Returns: @untitled table 0 object is not highlighted 1 entire object is highlighted 3 one or more proper sub-objects are highlighted

◆ IsInstanceDefinitionGeometry()

bool CRhinoObject::IsInstanceDefinitionGeometry ( ) const

Description: Returns true if the object is used as part of an instance definition.
Returns: true if object is is used as part of an instance definition.

◆ IsInstanceDefinitionGeometryEx()

int CRhinoObject::IsInstanceDefinitionGeometryEx ( ) const

Description: Returns the value of m_is_idef_geometry.

◆ IsLocked()

bool CRhinoObject::IsLocked ( ) const

◆ IsMarked()

int CRhinoObject::IsMarked ( ) const

marking - no impact on display - not saved or copied Use CRhinoDoc::ClearMarks() to set all marks to zero.

◆ IsMeshable()

virtual bool CRhinoObject::IsMeshable ( ON::mesh_type  ) const
virtual

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

Render and Analysis mesh interface

Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoExtrusionObject, CRhinoBrepObject, and CRhinoMeshObject.

◆ IsModelObject()

bool CRhinoObject::IsModelObject ( ) const

Returns: True if the object is in model space.

◆ IsNormal()

bool CRhinoObject::IsNormal ( ) const

there are 3 mutually exclusive object states

  • normal (visible, can be snapped to, independent of selection state)
  • locked (visible, can be snapped to, cannot be selected)
  • hidden (not visible, cannot be snapped to, cannot be selected)

◆ IsPageObject()

bool CRhinoObject::IsPageObject ( ) const

Returns: True if the object is in page layout space.

◆ IsProxy()

int CRhinoObject::IsProxy ( ) const

◆ IsReference()

bool CRhinoObject::IsReference ( ) const

Description: Determine if an object is a reference object. Returns: True if the object is a reference object. Remarks: An object from a work session reference model is reference a reference object and cannot be modified. An object is a reference object if, and only if, it is on a reference layer.

◆ IsSelectable() [1/2]

bool CRhinoObject::IsSelectable ( bool  bIgnoreSelectionState,
bool  bIgnoreGripsState,
bool  bIgnoreLocking,
bool  bIgnoreVisibility 
) const

Description: Reports if an object can be selected. Parameters: bIgnoreSelectionState - [in] (default=false) If true, then selected objects are selectable. If false, the selected objects are not selectable. bIgnoreGripsState - [in] If true, then objects with grips on can be selected. If false, then the value returned by the object's virtual IsSelectableWithGripsOn() function decides if the object can be selected. bIgnoreLocking - [in] (default=false)
If true, then locked objects and objects on locked layers are selectable. If false, then locked objects and objects on locked layers are not selectable. bIgnoreVisibility - [in] (default=false)
If true, then hidden objects and objects on hidden layers are selectable. If false, then hidden objects and objects on hidden layers are not selectable. Returns: True if object is capable of being selected Remarks: Objects that are locked or hidden cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.

Calls the virtual function InternalVirtual_IsSelectable(bIgnoreSelectionState,bIgnoreGripsState,bIgnoreLocking,bIgnoreVisibility)

◆ IsSelectable() [2/2]

bool CRhinoObject::IsSelectable ( bool  bIgnoreSelectionState = false,
bool  bIgnoreGripsState = false 
) const

Description: Reports if an object can be selected. Parameters: bIgnoreSelectionState - [in] (default=false) If true, then selected objects are selectable. If false, the selected objects are not selectable. bIgnoreGripsState - [in] If true, then objects with grips on can be selected. If false, then the value returned by the object's virtual IsSelectableWithGripsOn() function decides if the object can be selected. 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.

Calls the virtual function InternalVirtual_IsSelectable(bIgnoreSelectionState,bIgnoreGripsState,false,false)

Parameters
bIgnoreSelectionStatetrue if object is capable of being selected

◆ IsSelectableWithGripsOn()

virtual bool CRhinoObject::IsSelectableWithGripsOn ( ) const
protectedvirtual

true if can be selected while grips are on

Reimplemented in CRhinoWidget.

◆ IsSelected()

int CRhinoObject::IsSelected ( bool  bCheckSubObjects = false) const

Description: Check selection state. Parameters: bCheckSubObjects - [in] If true and the entire object is not selected, and some subset of the object is selected, like some edges of a surface, then 3 is returned. If false and the entire object is not selected, then zero is returned. Returns: @untitled table 0 object is not selected 1 object is selected 2 entire object is selected persistently 3 one or more proper sub-objects are selected

◆ IsSolid()

virtual bool CRhinoObject::IsSolid ( ) const
virtual

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

Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoBrepObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoCurveObject.

◆ IsSubObjectHighlighted()

virtual bool CRhinoObject::IsSubObjectHighlighted ( ON_COMPONENT_INDEX  component_index) const
virtual

◆ IsSubObjectSelectable()

bool CRhinoObject::IsSubObjectSelectable ( ON_COMPONENT_INDEX  component_index,
bool  bIgnoreSelectionState = false 
) const

Description: Reports if a subobject can be selected. Parameters: component_index - [in] index of subobject to check bIgnoreSelectionState - [in] (default=false) If true, then selected objects are selectable. If false, the selected objects are not selectable. 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.

◆ IsSubObjectSelected()

virtual bool CRhinoObject::IsSubObjectSelected ( ON_COMPONENT_INDEX  component_index) const
virtual

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 in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, and CRhinoMeshObject.

◆ IsValid()

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

ON_Object overrides

Reimplemented from ON_Object.

◆ IsVisible()

bool CRhinoObject::IsVisible ( ) const

Returns true if an object is visible and is on a layer that is visible.

◆ LinkedInstanceDefinitionSerialNumber()

unsigned int CRhinoObject::LinkedInstanceDefinitionSerialNumber ( ) const

Returns: 0: The object is not part of a linked instance definition 1-1000: These numbers are reserved for future use. >1000: CRhinoDoc::m_instance_defintion_table.FindBySerialNumber() can be used to find the linked instance definition this object is part of. Remarks: The linked instance definition serial number is a runtime value. It is not saved in files and it is generally different the next time a file is read.

◆ Mark()

void CRhinoObject::Mark ( int  )

◆ MemoryRelocate()

void CRhinoObject::MemoryRelocate ( )
overridevirtual

virtual ON_Object override

Reimplemented from ON_Object.

Reimplemented in CRhinoPointCloudObject, and CRhinoPointObject.

◆ MeshCount()

virtual int CRhinoObject::MeshCount ( ON::mesh_type  mesh_type,
const ON_MeshParameters mp = 0 
) const
virtual

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 in CRhinoBrepObject, CRhinoSubDObject, CRhinoInstanceObject, CRhinoExtrusionObject, and CRhinoMeshObject.

◆ MeshDisplayAttributes()

virtual const class CDisplayPipelineAttributes* CRhinoObject::MeshDisplayAttributes ( int  mesh_index,
const ON_Mesh mesh,
const class CDisplayPipelineAttributes display_attrs 
) const
virtual

Description: When Rhino draws the meshes returned by GetMeshes(), it gives you the opportunity to modify the display attributes for that mesh. Parameters: mesh_index - [in] index of the mesh in the meshes[] array returned by the GetMeshes() function. mesh - [in] The mesh in meshes[mesh_index]. display_attrs - [in/out] Display attributes that will be used to draw this mesh. The input values are what Rhino normally uses. You may modify them as needed. See Also: CRhinoObject::GetMeshes

Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.

◆ ModelComponent()

const ON_ModelComponent& CRhinoObject::ModelComponent ( ) const

◆ ModelObjectId()

ON_UUID CRhinoObject::ModelObjectId ( ) const
overridevirtual

Description: All objects in an opennurbs model have an id ( ON_Layer.m_layer_id, ON_Font.m_font_id, ON_Material.m_material_id, ON_3dmObjectAttributes.m_uuid ). Returns: The id used to identify the object in the opennurbs model.

Reimplemented from ON_Object.

◆ ModifyAttributes()

virtual bool CRhinoObject::ModifyAttributes ( const ON_3dmObjectAttributes new_attributes,
bool  bEnableUndo = true,
bool  bQuiet = false 
)
virtual

Description: Used to change object attributes like name, layer, color, rendering material, etc.

Parameters: new_attributes - [in] new object attributes. Values are copied. bEnableUndo - [in] if true, the attribute change can be undone by calling UndoModifyAttributes(). bQuiet - [in] true to run quietly.

Example: Change the layer of an object.

  int new_layer_index = ...;
  CRhinoObject& obj = ...;

/ copy attributes CRhinoObjectAttributes a = obj.Attributes(); / change attribute settings a.SetLayerIndex( new_layer_index ); / modify object's attributes obj.ModifyAttributes( a );

Returns: true if successful. false if the layer index, material index, or any of the group indices are invalid.

Remarks: ModifyAttributes() will not change the object's UUID. If doc.m_layer_table[new_attributes.LayerIndex()].IsDeleted() is true, the layer is automatically undeleted. If doc.m_material_table[new_attributes.RenderMaterialIndex()].IsDeleted() is true, the material is automatically undeleted.

Reimplemented in CRhinoGripObject.

◆ Name()

const ON_wString CRhinoObject::Name ( ) const

Code that uses CRhinoObject.Name() now will not need to be modified when m_name is removed from ON_3dmObjectAttributes.

◆ NextRuntimeObjectSerialNumber()

static unsigned int CRhinoObject::NextRuntimeObjectSerialNumber ( )
static

Description: Get the runtime serial number that will be assigned to the next CRhinoObject that is created. Returns: The runtime serial number that will be assigned to the next CRhinoObject that is created. Example:

    unsigned int s0 = CRhinoObject::NextRuntimeSerialNumber();
    ... do a bunch of stuff
    unsigned int s1 = CRhinoObject::NextRuntimeSerialNumber();
    ...
    const CRhinoObject* pObject = ...;
    if (    s0 <= pObject->RuntimeSerialNumber() 
         && pObject->RuntimeSerialNumber() < s1 )
    {

/ pObject was created during "... do a bunch of stuff" }

See Also: CRhinoObject::RuntimeSerialNumber()

◆ ObjectDrawColor() [1/3]

ON_Color CRhinoObject::ObjectDrawColor ( bool  bIgnoreObjectState = false) const

Description: Examines the attributes and gets the color that should be used to draw a wireframe image of this object.

Parameters: bIgnoreObjectState - [in] Objects can be in one of 4 states: selected, normal, locked, and hidden. locked objects. By default, selected objects are drawn in RhinoApp().AppSettings().SelectedObjectColor(), locked objects are drawn in RhinoApp().AppSettings().LockedObjectColor(), and normal objects are drawn in the color determined by the attributes settings. If you want to ignore the object state and get the color determined by the attributes, the pass true.

Returns: wireframe image drawing color

Remarks: Objects and layers can have colors assigned to them The value of CRhinoObject::Attributes().ColorSource() determines if the object's color or the object's layer color should be used to draw the object in a normal state.

See Also:

◆ ObjectDrawColor() [2/3]

ON_Color CRhinoObject::ObjectDrawColor ( const CRhinoObjectAttributes attributes,
bool  bIgnoreObjectState = false 
) const

Description: Examines the attributes and gets the color that should be used to draw this object.

Parameters: attributes - [in] Source for color information...normally color information is taken from the object's attributes, however, in this case all color info will be determined base on the passed in attributes object. bIgnoreObjectState - [in] Objects can be in one of 4 states: selected, normal, locked, and hidden. locked objects. By default, selected objects are drawn in RhinoApp().AppSettings().SelectedObjectColor(), locked objects are drawn in RhinoApp().AppSettings().LockedObjectColor(), and normal objects are drawn in the color determined by the attributes settings. If you want to ignore the object state and get the color determined by the attributes, the pass true.

Returns: drawing color

Remarks: Objects and layers can have colors assigned to them The value of attributes.ColorSource() determines if the object's color or the object's layer color should be used to draw the object in a normal state.

See Also:

◆ ObjectDrawColor() [3/3]

ON_Color CRhinoObject::ObjectDrawColor ( const CRhinoObjectAttributes attributes,
const ON_UUID viewport_id,
bool  bIgnoreObjectState 
) const

◆ ObjectFrame()

ON_Plane CRhinoObject::ObjectFrame ( const ON_COMPONENT_INDEX ci,
unsigned int  objectframe_flags 
) const

◆ ObjectLayer()

const class CRhinoLayer& CRhinoObject::ObjectLayer ( ) const

Description: All objects are assigned to a layer. Returns: Layer this object is assigned to.

NOTE WELL: This layer reference may become invalid if the layer table is modified in any way. Do not use this pointer as a long term reference to a layer. See Also: CRhinoObject::Attributes

◆ ObjectLayerPtr()

const class CRhinoLayer* CRhinoObject::ObjectLayerPtr ( ) const

◆ ObjectLinetype()

const CRhinoLinetype& CRhinoObject::ObjectLinetype ( ) const

Description: All objects reference a linetype. Returns: Linetype this object is references to. ( -1 == solid/continuous)

NOTE WELL: This linetype reference may become invalid if the linetype table is modified in any way. Do not use this pointer as a long term reference to a linetype. See Also: CRhinoObject::Attributes

◆ ObjectLinetypePtr()

const CRhinoLinetype* CRhinoObject::ObjectLinetypePtr ( ) const

◆ ObjectMaterial() [1/4]

virtual const CRhinoMaterial& CRhinoObject::ObjectMaterial ( ) const
virtual

Description: Gets the material used to render the object's front side. Parameters: plugin_id - [in] (optional) If not present, the plugin_id returned by RhinoApp().GetDefaultRenderApp() is used. Returns: A reference to a rendering material. When no material is explicitly specified, this is the default material RhinoApp().AppSettings().DefaultMaterial().

NOTE WELL: If the material table is modified, this pointer will become invalid. Do not use this pointer for saving long term reference to the material. Use the material index or id instead. See Also CRhinoObjectAttributes::ObjectMaterialRef CRhinoMaterialTable::GetMaterials CRhinoObject::ObjectMaterialRef

Reimplemented in CRhinoSubDObject.

◆ ObjectMaterial() [2/4]

virtual const CRhinoMaterial& CRhinoObject::ObjectMaterial ( const ON_3dmObjectAttributes attrs) const
virtual

◆ ObjectMaterial() [3/4]

virtual const CRhinoMaterial& CRhinoObject::ObjectMaterial ( const ON_COMPONENT_INDEX ci,
const ON_UUID plugin_id = RhinoDefaultRendererId(),
const ON_3dmObjectAttributes attrs = NULL 
) const
virtual

This is now the preferred version of the function. This should be used to get materials component-wise in all cases.

Reimplemented in CRhinoBrepObject, and CRhinoSubDObject.

◆ ObjectMaterial() [4/4]

virtual const CRhinoMaterial& CRhinoObject::ObjectMaterial ( const ON_UUID plugin_id) const
virtual

◆ ObjectRdkMaterial()

virtual const CRhRdkMaterial* CRhinoObject::ObjectRdkMaterial ( const ON_COMPONENT_INDEX ci,
const ON_UUID plugin_id = RhinoDefaultRendererId(),
const ON_3dmObjectAttributes attrs = NULL 
) const
virtual

This version of ObjectMaterial returns the RDK material associated with an object if there is one. It directly corresponds to the function above that returns the material in the document material table.

Reimplemented in CRhinoBrepObject.

◆ ObjectType()

virtual ON::object_type CRhinoObject::ObjectType ( ) const
overridepure virtual

◆ OnDoubleClick()

virtual ON_wString CRhinoObject::OnDoubleClick ( const CRhinoDoubleClickContext double_click_context) const
virtual

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 in CRhinoBrepObject, CRhinoText, CRhinoTextDot, CRhinoDimOrdinate, CRhinoDimLinear, CRhinoDimAngular, CRhinoDimRadial, CRhinoLeader, and CRhinoInstanceObject.

◆ operator=()

CRhinoObject& CRhinoObject::operator= ( const CRhinoObject )

copies source object UUID

◆ PerViewportIsVisible()

bool CRhinoObject::PerViewportIsVisible ( ON_UUID  viewport_id) const

Parameters: viewport_id - [in] If viewport_id is nil or does not identify an existing viewport, then the IsVisible() is returned. Return: true if the object is visible in the viewport.

◆ Pick()

virtual int CRhinoObject::Pick ( const CRhinoPickContext pick_context,
class CRhinoObjRefArray pick_list 
) const
virtual

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 in CRhinoSubDObject, CRhinoBrepObject, CRhinoDimOrdinate, CRhinoCentermark, CRhinoDimLinear, CRhinoDimAngular, CRhinoDimRadial, CRhinoText, CRhinoHatch, CRhinoTextDot, CRhinoLeader, CRhinoWidget, CRhinoNamedViewCameraIcon, CRhinoInstanceObject, CRhinoPointCloudObject, CRhinoExtrusionObject, CRhinoMeshObject, CRhinoPointObject, CRhinoDetailViewObject, CRhinoLight, CRhinoClippingPlaneObject, CRhinoCurveObject, and CRhinoWireframeObject.

◆ PickFilter()

virtual bool CRhinoObject::PickFilter ( const class CRhinoGetObject ,
bool   
) const
virtual

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

◆ PreDrawUpdate()

virtual void CRhinoObject::PreDrawUpdate ( CRhinoDisplayPipeline dp) const
virtual

Reimplemented in CRhinoWidget.

◆ PrepareToWrite()

virtual bool CRhinoObject::PrepareToWrite ( int  archive_3dm_version)
virtual

Description: Called before the object is saved to a 3dm archive so that the object pointed to by m_geometry can prepared for writing. Parameters: archive_3dm_version - [in] Version of the 3dm archive 2 = Rhino2, 3 = Rhino3, 4 = Rhino4. Returns: True if m_geometry should be saved. False otherwise.

Reimplemented in CRhinoDetailViewObject.

◆ PromotePreviewMeshes()

virtual bool CRhinoObject::PromotePreviewMeshes ( ON::mesh_type  )
virtual

◆ RenderMeshes() [1/2]

std::shared_ptr<const RhRdk::CustomRenderMeshes::IRenderMeshes> CRhinoObject::RenderMeshes ( 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.

Parameters
vpThe viewport being rendered. If nullptr, no support for view dependent meshes.
recursiveTrue if block instances should be unpacked. Same as IManager::Flags::Recursive.
ancestry_only_for_by_parent_attributesThe ancestry of the object - ie, block references referring to this definition.
This is only used to handle ByParent attributes, and should not be used to transform geometry. For objects in the document (ie - not block objects), it's fine to pass nullptr.
requestingPlugInThe requesting plug-in - typically the render plug-in requesting the meshes.
pAttributesThe display attributes currently being used - nullptr if this is production rendering.
Returns
Returns a set of custom render meshes (primitives) for a given object.
Parameters
optional_initial_primitivesOptionally a custom set of initial primitives. If this parameter is empty, the standard render meshes for the object will be used, or an empty set of primitives will be used where they are not available. This is typically used in meshing exporters, which produce specific meshes for the output rather than using the render meshes.
Returns
Returns a complete set of custom render meshes (primitives) for a given ObjectId.

◆ RenderMeshes() [2/2]

std::shared_ptr<const RhRdk::CustomRenderMeshes::IRenderMeshes> CRhinoObject::RenderMeshes ( 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.

Parameters
vpThe viewport being rendered. If nullptr, no support for view dependent meshes.
ancestry_only_for_by_parent_attributesThe ancestry of the object - ie, block references referring to this definition.
This is only used to handle ByParent attributes, and should not be used to transform geometry. For objects in the document (ie - not block objects), it's fine to pass nullptr.
flagsSee RhRdk::CustomRenderMeshes::IManager::Flags. If nullptr, assumed to be Flags::None and no support for returning flags.
requestingPlugInThe requesting plug-in - typically the render plug-in requesting the meshes.
pAttributesThe display attributes currently being used - nullptr if this is production rendering.
Returns
Returns a set of custom render meshes (primitives) for a given object.
Parameters
optional_initial_primitivesOptionally a custom set of initial primitives. If this parameter is empty, the standard render meshes for the object will be used, or an empty set of primitives will be used where they are not available. This is typically used in meshing exporters, which produce specific meshes for the output rather than using the render meshes.
Returns
Returns a complete set of custom render meshes (primitives) for a given ObjectId.

◆ RuntimeSerialNumber()

unsigned int CRhinoObject::RuntimeSerialNumber ( ) const

Description: The CRhinoObject runtime serial number is a value >= 1 that and is unique for each instance of a CRhinoObject class in a given instance of the Rhino.exe application. The first CRhinoObject created has serial number 1. The serial number can be used to identify find and identify Rhino objects and is a fast and robust way to specify a rhino object (as opposed to passing around a CRhinoObject pointer or reference). A value of 0 is unset and never identifies an object. See Also: CRhinoObject::FromSerialNumber(); Remarks: The CRhinoObject runtime serial number value is not saved in 3DM archives and is not unique between instances of Rhino.exe.

◆ Select() [1/2]

int CRhinoObject::Select ( bool  bSelect,
bool  bSynchHighlight,
bool  bPersistentSelect,
bool  bIgnoreGripsState,
bool  bIgnoreLayerLocking,
bool  bIgnoreLayerVisibility 
) const

Description: Reports if an object can be selected. Parameters: 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=true) Objects that are persistently selected stay selected when a command terminates. bIgnoreGripsState - [in] If true, then objects with grips on can be selected. If false, then the value returned by the object's virtual IsSelectableWithGripsOn() function decides if the object can be selected when it has grips turned on. bIgnoreLayerLocking - [in] (default=false) If true, then objects on locked layers can be selected. If false, the objects on locked layers cannot be selected. bIgnoreLayerVisibility - [in] (default=false) If true, then objects on hidden layers can be selectable. If false, the objects on hidden layers cannot be selected. 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

◆ Select() [2/2]

int CRhinoObject::Select ( bool  bSelect = true,
bool  bSynchHighlight = true,
bool  bPersistentSelect = true,
bool  bIgnoreGripsState = false 
) const

Description: Reports if an object can be selected. Parameters: 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=true) Objects that are persistently selected stay selected when a command terminates. bIgnoreGripsState - [in] If true, then objects with grips on can be selected. If false, then the value returned by the object's virtual IsSelectableWithGripsOn() function decides if the object can be selected when it has grips turned on. 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

◆ SelectSubObject()

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

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 in CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoSubDObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, and CRhinoMeshObject.

◆ SetCachedTextureCoordinates()

bool CRhinoObject::SetCachedTextureCoordinates ( const ON_TextureMapping mapping,
const ON_Xform object_xform,
bool  bLazy = true 
) const

Description: If the object is a mesh or has existing render meshes, then this call uses mapping to set the cached texture coordinates. Parameters: mapping - [in] Texture mapping function used to calculate the mesh's cached texture coordinates. object_xform - [in] (optional) Pass if the object has been transformed after the mapping was set.
For example, if a mapping M was used to calculate the object's texture coordinates, the object was subsequently transformed by T, and for some reason you needed to use M to recalculate the original texture coordinates, then you would pass the T as object_xform. bLazy - [in] If true, then the calculation is performed only if the current mesh texture coordinates were calculated with a different mapping. Returns: True if the object's cached texture coordinates are set. False if the the cached coordinates cannot be set (the object may not have texture coordinates, like a point, or it may not have render mesh, like a new CRhinoBrepObject, or the mapping calculation may fail.

The CRinoObject::Attributes()::m_rendering_attributes and CRhinoDoc::m_texture_mapping_table has tools to get texture mappings.
See Also: ON_TextureMapping::GetCachedTextureCoordinates ON_Mesh::SetCachedTextureCoordinates CRhinoObject::GetTextureMapping

◆ SetCachedTextureCoordinatesFromPlugIn() [1/2]

bool CRhinoObject::SetCachedTextureCoordinatesFromPlugIn ( const ON_UUID plugin_id) const

Description: Set cached texture coordinates for all mappings that require per vertex texture texture coordinates. Includes mappings referenced by object material and sub-object materials. Parameters: plugin_id - [in] The id of the render plug-in to use to get the mapping ref. Returns: True if the object's cached texture coordinates are set. False if the the cached coordinates cannot be set (the object may not have texture coordinates, like a point, or it may not have render mesh, like a new CRhinoBrepObject, or the mapping calculation may fail. See Also: ON_TextureMapping::GetCachedTextureCoordinates ON_Mesh::SetCachedTextureCoordinates CRhinoObject::GetTextureMapping

◆ SetCachedTextureCoordinatesFromPlugIn() [2/2]

bool CRhinoObject::SetCachedTextureCoordinatesFromPlugIn ( const ON_UUID plugin_id,
const ON_SimpleArray< ON_TextureMapping::TYPE > &  mappings_to_cache 
) const

Description: Set cached texture coordinates for mappings listed in the array 'mappings_to_cache'. Includes mappings referenced by object material and sub-object materials. Parameters: plugin_id - [in] The id of the render plug-in to use to get the mapping ref. mappings_to_cache - [in] An array indicating which types of mappings that should be cached. If the array is empty, all found mappings will be cached. Returns: True if the object's cached texture coordinates are set. False if the the cached coordinates cannot be set (the object may not have texture coordinates, like a point, or it may not have render mesh, like a new CRhinoBrepObject, or the mapping calculation may fail. See Also: ON_TextureMapping::GetCachedTextureCoordinates ON_Mesh::SetCachedTextureCoordinates CRhinoObject::GetTextureMapping

◆ SetCopyHistoryOnReplace()

void CRhinoObject::SetCopyHistoryOnReplace ( bool  bCopy) const

Description: Sets a flag on the object's history record (if one exists) that causes the history record to be copied and the copy applied to the new object when this object is replaced in the document. That allows some changes to be made to objects with history without breaking the history.

◆ SetDynamicTransform()

bool CRhinoObject::SetDynamicTransform ( const ON_Xform dynamic_xform)

Description: Set the transformation currently being used. Properties: xform - [in] Returns: True if the xform is a valid and was set.

◆ SetHistory()

bool CRhinoObject::SetHistory ( class CRhinoHistory history)

◆ SetObjectFrame() [1/2]

void CRhinoObject::SetObjectFrame ( const ON_COMPONENT_INDEX ci,
const ON_Plane plane 
)

◆ SetObjectFrame() [2/2]

void CRhinoObject::SetObjectFrame ( const ON_COMPONENT_INDEX ci,
const ON_Xform wcs_to_ocs 
)

◆ SetRenderMeshParameters()

virtual bool CRhinoObject::SetRenderMeshParameters ( const ON_MeshParameters mp)
virtual

Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.

◆ SetTextureCoordinates()

virtual bool CRhinoObject::SetTextureCoordinates ( const ON_TextureMapping mapping,
const ON_Xform object_xform,
bool  bLazy = true 
) const
virtual

Description: If the object is a mesh or has existing render meshes, then this call uses mapping to set the texture coordinates. Parameters: mapping - [in] Texture mapping function used to calculate the mesh's texture coordinates. object_xform - [in] (optional) Pass if the object has been transformed after the mapping was set.
For example, if a mapping M was used to calculate the object's texture coordinates, the object was subsequently transformed by T, and for some reason you needed to use M to recalculate the original texture coordinates, then you would pass the T as object_xform. bLazy - [in] If true, then the calculation is performed only if the current mesh texture coordinates were calculated with a different mapping. Returns: True if the object's texture coordinates are set. False if the the coordinates cannot be set (the object may not have texture coordinates, like a point, or it may not have render mesh, like a new CRhinoBrepObject, or the mapping calculation may fail.

The CRinoObject::Attributes()::m_rendering_attributes and CRhinoDoc::m_texture_mapping_table has tools to get texture mappings.
See Also: ON_TextureMapping::GetTextureCoordinates ON_Mesh::SetTextureCoordinates CRhinoObject::GetTextureMapping

Reimplemented in CRhinoSubDObject, CRhinoBrepObject, CRhinoExtrusionObject, and CRhinoMeshObject.

◆ SetTextureCoordinatesFromPlugIn()

virtual bool CRhinoObject::SetTextureCoordinatesFromPlugIn ( const ON_UUID plugin_id,
int  mapping_channel_id 
) const
virtual

Reimplemented in CRhinoInstanceObject.

◆ ShortDescription()

virtual const wchar_t* CRhinoObject::ShortDescription ( bool  bPlural) const
pure virtual

◆ SizeOf()

virtual unsigned int CRhinoObject::SizeOf ( ) const
overridevirtual

returns number of bytes used by this particular instance

Reimplemented from ON_Object.

Reimplemented in CRhinoSubDObject.

◆ SnapTo()

virtual bool CRhinoObject::SnapTo ( const CRhinoSnapContext snap_context,
CRhinoSnapEvent snap_event 
) const
virtual

◆ Space()

ON::active_space CRhinoObject::Space ( ) const

Returns: The space this object belongs to.

◆ SubObjectsAreHighlighted()

virtual int CRhinoObject::SubObjectsAreHighlighted ( ) const
protectedvirtual

◆ SubObjectsAreSelected()

virtual int CRhinoObject::SubObjectsAreSelected ( ) const
protectedvirtual

◆ SubObjectStatus()

virtual ON_ComponentStatus CRhinoObject::SubObjectStatus ( ) const
virtual

Description: See if at least one subobject has at least on of the states specified by the status parameter. Parameters: status - [in] Set the states you want to test for.
Returns: If any subobject has a status state set to a non-default value, the corresponding state is set in the returned ON_ComponentStatus. Remarks: For the purpose of this function, ON_ON_ComponentStatus::SELECTED_STATE::selected and ON_ON_ComponentStatus::SELECTED_STATE::selected_persistent are treated as equal states.

◆ SupportsBrepProxyReferenceCounting()

virtual bool CRhinoObject::SupportsBrepProxyReferenceCounting ( ) const
virtual

Reimplemented in CRhinoSubDObject, and CRhinoExtrusionObject.

◆ SynchAttributes()

virtual void CRhinoObject::SynchAttributes ( )
protectedvirtual

light objects are special because they are not in the geometry lists

◆ UndoModifyAttributes()

bool CRhinoObject::UndoModifyAttributes ( unsigned int  ur_sn = 0)

◆ UnhighlightAllSubObjects()

virtual int CRhinoObject::UnhighlightAllSubObjects ( )
virtual

◆ UnselectAllSubObjects()

virtual int CRhinoObject::UnselectAllSubObjects ( )
virtual

◆ UpdateBoundingBox()

void CRhinoObject::UpdateBoundingBox ( )

updates CRhinoObject.m_bbox member. This function calls BoundingBox() with no viewport so it will get the bounding box wrong on annotations

◆ VetoTransformObject()

virtual bool CRhinoObject::VetoTransformObject ( CRhinoDoc doc,
bool  bDeleteOriginal,
bool  bAddNewObjectToDoc,
bool  bAddTransformHistory 
) const
virtual

transformation callbacks Description: Expert user tool Called to determine if the object supports transformation in this case. The default implementation to returns true. MappingWidgets return false.

Reimplemented in CRhinoNamedViewCameraIcon.

◆ WorksessionReferenceModelSerialNumber()

unsigned int CRhinoObject::WorksessionReferenceModelSerialNumber ( ) const

Returns: Worksession reference model id. 0: layer is not in a reference model. 1: layer is in an unidentified worksession reference model. >1000: Serial number of the worksession reference model.
Remarks: The reference model serial number is a runtime value. It is not saved in files and it is generally different the next time a file is read.

Friends And Related Function Documentation

◆ CRhCameraIcon

friend class CRhCameraIcon
friend

◆ CRhinoDoc

friend class CRhinoDoc
friend

◆ CRhinoGripObject

friend class CRhinoGripObject
friend

◆ CRhinoHistoryManager

friend class CRhinoHistoryManager
friend

◆ CRhinoHistoryRecordTable

friend class CRhinoHistoryRecordTable
friend

◆ CRhinoInstanceDefinition

friend class CRhinoInstanceDefinition
friend

◆ CRhinoInstanceDefinitionTable

friend class CRhinoInstanceDefinitionTable
friend

◆ CRhinoLight

friend class CRhinoLight
friend

◆ CRhinoLightTable

friend class CRhinoLightTable
friend

◆ CRhinoObjectGrips

friend class CRhinoObjectGrips
friend

used to determine if geometry is in document

◆ CRhinoObjectIterator

friend class CRhinoObjectIterator
friend

◆ CRhinoPhantomObject

friend class CRhinoPhantomObject
friend

◆ CRhinoProxyObject

friend class CRhinoProxyObject
friend

◆ CRhinoRead3dmHelper

friend class CRhinoRead3dmHelper
friend

◆ CRhObjectFinder

friend class CRhObjectFinder
friend

◆ CRhObjectSdkExtension

friend class CRhObjectSdkExtension
friend

◆ CRhRenderPreview

friend class CRhRenderPreview
friend

◆ CRhSnapToVisible

friend class CRhSnapToVisible
friend

Member Data Documentation

◆ m__object_sdk_extension

class CRhObjectSdkExtension* CRhinoObject::m__object_sdk_extension

◆ m_analysis_mode_list

const class CRhinoObjectVisualAnalysisMode* CRhinoObject::m_analysis_mode_list

list of enabled analysis modes

◆ m_bbox

ON_BoundingBox CRhinoObject::m_bbox
protected

world coordinate bounding box

world coordinate bounding box

◆ m_cache

CRhinoCacheHandle CRhinoObject::m_cache
mutable

◆ m_geomem_type

unsigned char CRhinoObject::m_geomem_type
protected

0 = m_geometry pointer managed with new/delete 1 = m_geometry points to a class member.

◆ m_geometry

ON_Geometry* CRhinoObject::m_geometry
protected

◆ m_grips

class CRhinoObjectGrips* CRhinoObject::m_grips

managed by derived objects

◆ m_history_record

const CRhinoHistoryRecord* CRhinoObject::m_history_record
protected

History record table entry for this object. The CRhinoDoc::m_history_record_table[] manages the history record. It is common for this pointer to be NULL, in which case the object has no construction history.

◆ m_no_show_mark

int CRhinoObject::m_no_show_mark
static

if m_no_show_mark!= 0 and m_no_show_mark == m_mark, then the IsVisible() returns false. This is used when inserting files.

◆ m_use_preview_mesh

unsigned char CRhinoObject::m_use_preview_mesh

When an object like a CRhinoBrepObject is being meshed and the display code should use the preview mesh instead of the render or analysis mesh, then this flag is set to 1. Otherwise it is set to zero.