Rhino C++ API  8.13
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CRhinoSubDObject Class Reference

#include <RhinoSdkSubD.h>

Inheritance diagram for CRhinoSubDObject:
CRhinoObject ON_Object

Public Member Functions

 CRhinoSubDObject ()
 assigns a new object UUID More...
 
 CRhinoSubDObject (const CRhinoSubDObject &)
 copies source object UUID More...
 
 CRhinoSubDObject (const ON_3dmObjectAttributes &)
 assigns a new object UUID More...
 
 ~CRhinoSubDObject ()
 
ON_BoundingBox BoundingBox () const override
 virtual CRhinoObject::BoundingBox override More...
 
ON_BoundingBox BoundingBox (const class CRhinoViewport *pViewport) const override
 virtual CRhinoObject::BoundingBox override More...
 
void ClearDynamicDisplayForExperts () const
 
void ClearStaticDisplayForExperts () const
 
int CreateMeshes (ON::mesh_type, const ON_MeshParameters &, bool bIgnoreCustom=false) override
 virtual CRhinoObject::CreateMeshes override More...
 
void DeleteFromDocNotification () override
 
void DestroyMeshes (ON::mesh_type meshType, bool deleteMeshes=true) override
 virtual CRhinoObject::DestroyMeshes override More...
 
void DestroyRuntimeCache (bool bDelete=true) override
 virtual ON_Object override More...
 
void Draw (CRhinoDisplayPipeline &dp) const override
 virtual CRhinoObject::Draw override More...
 
void DrawHighlightedSubObjects (CRhinoDisplayPipeline &dp) const override
 virtual CRhinoObject::DrawHighlightedSubObjects override More...
 
void DrawSubObject (CRhinoDisplayPipeline &dp, ON_COMPONENT_INDEX component_index) const override
 virtual CRhinoObject::DrawSubObject override More...
 
bool DynamicDisplayAvailable () const
 
unsigned int DynamicDisplayContentSerialNumber () const
 
void EnableGrips (bool gripsOn) override
 bool GetFrame(ON_Plane& plane) const override; More...
 
int GetHighlightedSubObjects (ON_SimpleArray< ON_COMPONENT_INDEX > &componentIndices) const override
 
std::vector< std::shared_ptr< const ON_Mesh > > GetMeshes (ON::mesh_type mesh_type) const
 Servicing the fake-virtual function in CRhinoObject. More...
 
int GetMeshes (ON::mesh_type, ON_SimpleArray< const ON_Mesh * > &) const override
 virtual CRhinoObject::GetMeshes override More...
 
int GetSelectedSubObjects (ON_SimpleArray< ON_COMPONENT_INDEX > &componentIndices) const override
 
int GetSubObjects (ON_SimpleArray< CRhinoObject * > &subObjects, const class CRhinoViewport *pViewport=NULL) const override
 virtual CRhinoObject::GetSubObjects override More...
 
bool GetTightBoundingBox (ON_BoundingBox &tight_bbox, bool bGrowBox=false, const ON_Xform *xform=nullptr) const override
 virtual CRhinoObject::GetTightBoundingBox override More...
 
int GetWireframeCurves (ON_SimpleArray< ON_Curve * > &curveList) const override
 virtual CRhinoObject::GetWireframeCurves override More...
 
bool HighlightRequiresRedraw () const override
 
bool HighlightSubObject (ON_COMPONENT_INDEX componentIndex, bool highlight=true) const override
 
ON_Plane InitialObjectFrame (const CRhinoDoc &) const
 
bool IsMeshable (ON::mesh_type) const override
 virtual CRhinoObject::IsMeshable override More...
 
bool IsSolid () const override
 virtual CRhinoObject::IsSolid override More...
 
bool IsSubObjectHighlighted (ON_COMPONENT_INDEX componentIndex) const override
 true if specified component is highlighted More...
 
bool IsSubObjectSelected (ON_COMPONENT_INDEX componentIndex) const override
 
int MeshCount (ON::mesh_type meshType, const ON_MeshParameters *mp=0) const override
 virtual CRhinoObject::MeshCount override More...
 
const class CDisplayPipelineAttributesMeshDisplayAttributes (int meshIndex, const ON_Mesh &mesh, const class CDisplayPipelineAttributes &displayAttrs) const override
 virtual CRhinoObject::MeshDisplayAttributes override More...
 
ON_MeshRef MeshRef (ON::mesh_type mesh_type) const
 
ON_MeshRef MeshRef (ON::mesh_type mesh_type, unsigned int adaptive_display_density, bool bCreateIfMissing, const ON_MeshParameters *mp)
 
virtual const CRhinoMaterialObjectMaterial () const override
 
virtual const CRhinoMaterialObjectMaterial (const ON_COMPONENT_INDEX &ci, const ON_UUID &plugin_id, const ON_3dmObjectAttributes *attrs) const override
 This is now the preferred version of the function. This should be used to get materials component-wise in all cases. More...
 
ON::object_type ObjectType () const override
 
CRhinoSubDObjectoperator= (const CRhinoSubDObject &)
 copies source object UUID More...
 
int Pick (const CRhinoPickContext &pickContext, CRhinoObjRefArray &objRefs) const override
 virtual CRhinoObject::Pick override More...
 
bool PickFilter (const CRhinoGetObject &go, bool) const override
 virtual CRhinoObject::PickFilter override More...
 
bool PromotePreviewMeshes (ON::mesh_type) override
 
int SelectSubDComponent (ON_SubDComponentPtr component_ptr, bool bSelect=true, bool bSynchHighlight=true, bool bPersistentSelect=false) const
 
int SelectSubObject (ON_COMPONENT_INDEX component_index, bool bSelect=true, bool bSynchHighlight=true, bool bPersistentSelect=false) const override
 
bool SetDisplayAppearanceForExperts (ON_SubDComponentLocation subd_appearance) const
 
void SetDynamicDisplayAppearanceForExperts (ON_SubDComponentLocation subd_appearance) const
 
void SetDynamicDisplayForExperts (ON_SubDRef dynamic_display_subd_ref) const
 
bool SetRenderMeshParameters (const ON_MeshParameters &mp) override
 virtual CRhinoObject::SetRenderMeshParameters override More...
 
void SetStaticDisplayAppearanceForExperts (ON_SubDComponentLocation subd_appearance) const
 
void SetStaticDisplayForExperts (ON_SubDRef static_display_subd_ref) const
 
bool SetSubD (const ON_SubD &src_subd)
 
bool SetSubD (ON_SubDRef subd_ref)
 
bool SetSubDForExperts (ON_SubD *subd)
 
bool SetTextureCoordinates (const ON_TextureMapping &mapping, const ON_Xform *objectXform, bool lazy=true) const override
 virtual CRhinoObject::SetTextureCoordinates override More...
 
const wchar_t * ShortDescription (bool plural) const override
 
unsigned int SizeOf () const override
 virtual CRhinoObject::SizeOf override More...
 
bool SnapTo (const CRhinoSnapContext &snapContext, CRhinoSnapEvent &snapEvent) const override
 virtual CRhinoObject::SnapTo override More...
 
unsigned int StaticDisplayContentSerialNumber () const
 
const ON_SubDSubD () const
 
ON_SubDComponentLocation SubDAppearance () const
 
CRhinoSubDDisplay SubDDisplay (bool bDynamicDisplay) const
 
CRhinoSubDDisplayAttributes SubDDisplayAttributes (const class CRhinoDisplayPipeline *display_pipeline, bool bIgnoreObjectState) const
 
ON_SubDRef SubDRef () const
 
bool SupportsBrepProxyReferenceCounting () const override
 virtual CRhinoObject::SupportsBrepProxyReferenceCounting override More...
 
int UnhighlightAllSubObjects () override
 returns number of changed subobjects More...
 
int UnselectAllSubObjects () override
 returns number of unselected subobjects More...
 
- 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)
 
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 ()
 
bool DeleteGeometryUserData (ON_UUID userdata_uuid)
 
void DestroyMeshes (ON::mesh_type mesh_type)
 
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
 
virtual bool GetFrame (ON_Plane &plane) 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
 
void GetRenderMeshParameters (ON_MeshParameters &mp) 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
 
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...
 
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 ON_3dmObjectAttributes &attrs) const
 
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_wString OnDoubleClick (const CRhinoDoubleClickContext &double_click_context) 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 SetTextureCoordinatesFromPlugIn (const ON_UUID &plugin_id, int mapping_channel_id) const
 
ON::active_space Space () const
 
virtual ON_ComponentStatus SubObjectStatus () 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
 

Static Public Member Functions

static unsigned int AddToDocument (ON_SubDRef subd_ref, const ON_3dmObjectAttributes &subd_attributes, unsigned int rhino_doc_sn)
 
static unsigned int AddToDocument (ON_SubDRef subd_ref, const ON_3dmObjectAttributes *subd_attributes, CRhinoHistory *pHistory, bool bReference, unsigned int rhino_doc_sn)
 
static unsigned int AddToDocument (ON_SubDRef subd_ref, ON_UUID rhino_object_id, bool bUseNewSubDComponentSelectionState, unsigned int rhino_doc_sn)
 Replace an existing Rhino object with a new Rhino subd object. More...
 
static unsigned int AddToDocument (ON_SubDRef subd_ref, unsigned int rhino_doc_sn)
 
static unsigned int LabelSubDNet (unsigned int rhino_doc_sn, int layer_index, const ON_SubD *subd, bool bVertexLabels, bool bEdgeLabels, bool bFaceLabels, bool bFacePackIdLabels, bool bFacePackIdColors, bool bSectorCoefficients, bool bNetAsLines)
 Debugging tools. More...
 
static unsigned int LabelSubDNet (unsigned int rhino_doc_sn, int layer_index, const ON_SubD *subd, bool bVertexLabels, bool bEdgeLabels, bool bFaceLabels, bool bFacePackIdLabels, bool bFacePackIdColors, bool bSymmetryMotifLabels, bool bSymmetryMotifColors, bool bSectorCoefficients, bool bEdgeSharpnesses, bool bAllEdgesSharpnesses, bool bNetAsLines)
 
static unsigned int LabelSubDNet (unsigned int rhino_doc_sn, int layer_index, const ON_SubD *subd, bool bVertexLabels, bool bEdgeLabels, bool bFaceLabels, bool bFacePackIdLabels, bool bFacePackIdColors, bool bSymmetryMotifLabels, bool bSymmetryMotifColors, bool bSectorCoefficients, bool bNetAsLines)
 
static unsigned int PrintSubDTopology (const ON_SubD *subd, bool bUseRhinoTextOutTool)
 
static bool SubDIsVisible ()
 
- 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 ()
 

Protected Member Functions

int GetSubobjectMaterialComponents (ON_SimpleArray< ON_COMPONENT_INDEX > &componentsWithSubobjectMaterials) const override
 
bool HasSubobjectMaterials (void) const override
 
int SubObjectsAreHighlighted () const override
 returns number of highlighted subobjects More...
 
int SubObjectsAreSelected () const override
 virtual overrides to support subobject selection 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...
 

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
}
 
- 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

◆ CRhinoSubDObject() [1/3]

CRhinoSubDObject::CRhinoSubDObject ( )

assigns a new object UUID

C++ construction, etc.

◆ CRhinoSubDObject() [2/3]

CRhinoSubDObject::CRhinoSubDObject ( const ON_3dmObjectAttributes )

assigns a new object UUID

◆ ~CRhinoSubDObject()

CRhinoSubDObject::~CRhinoSubDObject ( )

◆ CRhinoSubDObject() [3/3]

CRhinoSubDObject::CRhinoSubDObject ( const CRhinoSubDObject )

copies source object UUID

Member Function Documentation

◆ AddToDocument() [1/4]

static unsigned int CRhinoSubDObject::AddToDocument ( ON_SubDRef  subd_ref,
const ON_3dmObjectAttributes subd_attributes,
unsigned int  rhino_doc_sn 
)
static

Description: This is the best way to add a Sub-D object with custom object attributes to a Rhino document.

Parameters: subd_ref - [in] subd_attributes - [in] rhino_doc_sn - [in]

Returns: 0: The input was not valid and the subd object was not added to the document. != 0: The runtime object serial number of the new CRhinoSubDObject.

◆ AddToDocument() [2/4]

static unsigned int CRhinoSubDObject::AddToDocument ( ON_SubDRef  subd_ref,
const ON_3dmObjectAttributes subd_attributes,
CRhinoHistory pHistory,
bool  bReference,
unsigned int  rhino_doc_sn 
)
static

Description: This is the best way to add a Sub-D object with custom object attributes to a Rhino document.

Parameters: subd_ref - [in] subd_attributes - [in] rhino_doc_sn - [in]

Returns: 0: The input was not valid and the subd object was not added to the document. != 0: The runtime object serial number of the new CRhinoSubDObject.

◆ AddToDocument() [3/4]

static unsigned int CRhinoSubDObject::AddToDocument ( ON_SubDRef  subd_ref,
ON_UUID  rhino_object_id,
bool  bUseNewSubDComponentSelectionState,
unsigned int  rhino_doc_sn 
)
static

Replace an existing Rhino object with a new Rhino subd object.

Parameters
subd_ref
rhino_object_idId of the object to replace. If null, the SubD is added as a new Rhino document object.
bPreserveNwComponentSelectionStateIf true, the compononent selection states in new_subd are used for the new object. If false, the compononent selection states of the object being replaced are used to set the component selection states of the new SubD object.
rhino_doc_sn
Returns
The runtime Rhino document object serial number of the updated CRhinoSubDObject.

◆ AddToDocument() [4/4]

static unsigned int CRhinoSubDObject::AddToDocument ( ON_SubDRef  subd_ref,
unsigned int  rhino_doc_sn 
)
static

◆ BoundingBox() [1/2]

ON_BoundingBox CRhinoSubDObject::BoundingBox ( ) const
overridevirtual

virtual CRhinoObject::BoundingBox override

Reimplemented from CRhinoObject.

◆ BoundingBox() [2/2]

ON_BoundingBox CRhinoSubDObject::BoundingBox ( const class CRhinoViewport pViewport) const
overridevirtual

virtual CRhinoObject::BoundingBox override

Reimplemented from CRhinoObject.

◆ ClearDynamicDisplayForExperts()

void CRhinoSubDObject::ClearDynamicDisplayForExperts ( ) const

Description: For expert users who are finished with a dynamic editing display.

Remarks: NOTE WELL: When using the CRhinoSubDObject expert display functions like SetDisplayAppearanceForExperts ...DynamicDisplayForExperts ...StaticDisplayForExperts you must use CRhinoDoc::Regen() to update the views. (CRhinoDoc::Redraw() is not powerful enough to consistently force display buffers to update.)

◆ ClearStaticDisplayForExperts()

void CRhinoSubDObject::ClearStaticDisplayForExperts ( ) const

Remarks: NOTE WELL: When using the CRhinoSubDObject expert display functions like SetDisplayAppearanceForExperts ...DynamicDisplayForExperts ...StaticDisplayForExperts you must use CRhinoDoc::Regen() to update the views. (CRhinoDoc::Redraw() is not powerful enough to consistently force display buffers to update.)

◆ CreateMeshes()

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

virtual CRhinoObject::CreateMeshes override

Reimplemented from CRhinoObject.

◆ DeleteFromDocNotification()

void CRhinoSubDObject::DeleteFromDocNotification ( )
overridevirtual

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 from CRhinoObject.

◆ DestroyMeshes()

void CRhinoSubDObject::DestroyMeshes ( ON::mesh_type  meshType,
bool  deleteMeshes = true 
)
overridevirtual

virtual CRhinoObject::DestroyMeshes override

Reimplemented from CRhinoObject.

◆ DestroyRuntimeCache()

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

virtual ON_Object override

Reimplemented from CRhinoObject.

◆ Draw()

void CRhinoSubDObject::Draw ( CRhinoDisplayPipeline dp) const
overridevirtual

virtual CRhinoObject::Draw override

virtual CRhinoObject::DrawV6 override void DrawV6( class CRhinoObjectDrawContext* drawContext ) const RHINO_NOEXCEPT override;

Reimplemented from CRhinoObject.

◆ DrawHighlightedSubObjects()

void CRhinoSubDObject::DrawHighlightedSubObjects ( CRhinoDisplayPipeline dp) const
overridevirtual

virtual CRhinoObject::DrawHighlightedSubObjects override

Reimplemented from CRhinoObject.

◆ DrawSubObject()

void CRhinoSubDObject::DrawSubObject ( CRhinoDisplayPipeline dp,
ON_COMPONENT_INDEX  component_index 
) const
overridevirtual

virtual CRhinoObject::DrawSubObject override

Reimplemented from CRhinoObject.

◆ DynamicDisplayAvailable()

bool CRhinoSubDObject::DynamicDisplayAvailable ( ) const

Returns: True if the dynamic display from this->SubDisplay(true) is different than the static display from this->SubDDisplay(false).

◆ DynamicDisplayContentSerialNumber()

unsigned int CRhinoSubDObject::DynamicDisplayContentSerialNumber ( ) const
Deprecated:
OBSOLETE: Always returns 0.

◆ EnableGrips()

void CRhinoSubDObject::EnableGrips ( bool  gripsOn)
overridevirtual

bool GetFrame(ON_Plane& plane) const override;

virtual CRhinoObject::EnableGrips override

Reimplemented from CRhinoObject.

◆ GetHighlightedSubObjects()

int CRhinoSubDObject::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.

◆ GetMeshes() [1/2]

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

Servicing the fake-virtual function in CRhinoObject.

◆ GetMeshes() [2/2]

int CRhinoSubDObject::GetMeshes ( ON::mesh_type  ,
ON_SimpleArray< const ON_Mesh * > &   
) const
overridevirtual

virtual CRhinoObject::GetMeshes override

Reimplemented from CRhinoObject.

◆ GetSelectedSubObjects()

int CRhinoSubDObject::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.

◆ GetSubobjectMaterialComponents()

int CRhinoSubDObject::GetSubobjectMaterialComponents ( ON_SimpleArray< ON_COMPONENT_INDEX > &  componentsWithSubobjectMaterials) const
overrideprotectedvirtual

Reimplemented from CRhinoObject.

◆ GetSubObjects()

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

virtual CRhinoObject::GetSubObjects override

Reimplemented from CRhinoObject.

◆ GetTightBoundingBox()

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

virtual CRhinoObject::GetTightBoundingBox override

Reimplemented from CRhinoObject.

◆ GetWireframeCurves()

int CRhinoSubDObject::GetWireframeCurves ( ON_SimpleArray< ON_Curve * > &  curveList) const
overridevirtual

virtual CRhinoObject::GetWireframeCurves override

Reimplemented from CRhinoObject.

◆ HasSubobjectMaterials()

bool CRhinoSubDObject::HasSubobjectMaterials ( void  ) const
overrideprotectedvirtual

Reimplemented from CRhinoObject.

◆ HighlightRequiresRedraw()

bool CRhinoSubDObject::HighlightRequiresRedraw ( ) const
overridevirtual

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

Reimplemented from CRhinoObject.

◆ HighlightSubObject()

bool CRhinoSubDObject::HighlightSubObject ( ON_COMPONENT_INDEX  componentIndex,
bool  highlight = true 
) const
overridevirtual

Reimplemented from CRhinoObject.

◆ InitialObjectFrame()

ON_Plane CRhinoSubDObject::InitialObjectFrame ( const CRhinoDoc ) const

◆ IsMeshable()

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

virtual CRhinoObject::IsMeshable override

Reimplemented from CRhinoObject.

◆ IsSolid()

bool CRhinoSubDObject::IsSolid ( ) const
overridevirtual

virtual CRhinoObject::IsSolid override

Reimplemented from CRhinoObject.

◆ IsSubObjectHighlighted()

bool CRhinoSubDObject::IsSubObjectHighlighted ( ON_COMPONENT_INDEX  component_index) const
overridevirtual

true if specified component is highlighted

Reimplemented from CRhinoObject.

◆ IsSubObjectSelected()

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

◆ LabelSubDNet() [1/3]

static unsigned int CRhinoSubDObject::LabelSubDNet ( unsigned int  rhino_doc_sn,
int  layer_index,
const ON_SubD subd,
bool  bVertexLabels,
bool  bEdgeLabels,
bool  bFaceLabels,
bool  bFacePackIdLabels,
bool  bFacePackIdColors,
bool  bSectorCoefficients,
bool  bNetAsLines 
)
static

Debugging tools.

Description: This tool will create text dots and a mesh object that can be used to debug the current state of a subd. Parameters: rhino_doc_sn - [in] destination document layer_index - [in] index of destination layer (-1) to use default layer. subd - [in] subd to label bVertexLabels - [in] true to label vertex locations bEdgeLabels - [in] true to label edges near the midpoint bFaceLabels - [in] true to label faces with their id near their centroid bFacePackIdLabels - [in] true to include face pack id near the face centroids bFacePackIdColors- [in] true to show face pack groups using per face colors. bSectorCoefficients - [in] true to label sector coefficients bEdgeSharpnesses - [in] true to label edge sharpnesses for sharp edges bAllEdgesSharpnesses - [in] true to label edge sharpnesses for all edges bNetAsLines - [in] true to add a rhino line curve object for each edge. Returns: Number of objects added to the document.

◆ LabelSubDNet() [2/3]

static unsigned int CRhinoSubDObject::LabelSubDNet ( unsigned int  rhino_doc_sn,
int  layer_index,
const ON_SubD subd,
bool  bVertexLabels,
bool  bEdgeLabels,
bool  bFaceLabels,
bool  bFacePackIdLabels,
bool  bFacePackIdColors,
bool  bSymmetryMotifLabels,
bool  bSymmetryMotifColors,
bool  bSectorCoefficients,
bool  bEdgeSharpnesses,
bool  bAllEdgesSharpnesses,
bool  bNetAsLines 
)
static

◆ LabelSubDNet() [3/3]

static unsigned int CRhinoSubDObject::LabelSubDNet ( unsigned int  rhino_doc_sn,
int  layer_index,
const ON_SubD subd,
bool  bVertexLabels,
bool  bEdgeLabels,
bool  bFaceLabels,
bool  bFacePackIdLabels,
bool  bFacePackIdColors,
bool  bSymmetryMotifLabels,
bool  bSymmetryMotifColors,
bool  bSectorCoefficients,
bool  bNetAsLines 
)
static

◆ MeshCount()

int CRhinoSubDObject::MeshCount ( ON::mesh_type  meshType,
const ON_MeshParameters mp = 0 
) const
overridevirtual

virtual CRhinoObject::MeshCount override

Reimplemented from CRhinoObject.

◆ MeshDisplayAttributes()

const class CDisplayPipelineAttributes* CRhinoSubDObject::MeshDisplayAttributes ( int  meshIndex,
const ON_Mesh mesh,
const class CDisplayPipelineAttributes displayAttrs 
) const
overridevirtual

virtual CRhinoObject::MeshDisplayAttributes override

Reimplemented from CRhinoObject.

◆ MeshRef() [1/2]

ON_MeshRef CRhinoSubDObject::MeshRef ( ON::mesh_type  mesh_type) const

Returns: Current render/analysis/preview mesh.

◆ MeshRef() [2/2]

ON_MeshRef CRhinoSubDObject::MeshRef ( ON::mesh_type  mesh_type,
unsigned int  adaptive_display_density,
bool  bCreateIfMissing,
const ON_MeshParameters mp 
)

Parameters: adaptive_display_density - [in] When in doubt, pass ON_SubDDisplayParameters::DefaultDensity. Valid adaptive_display_density values are >= ON_SubDDisplayParameters::MinimumDensity and <= ON_SubDDisplayParameters::MaximumDensity. See details under bCreateIfMissing for more information.

bCreateIfMissing - [in]

If a valid adaptive_display_density is passed: If the existing mesh has the requested density, then it is returned. If bCreateIfMissing is true, the a mesh with the requested density is created and returned. If bCreateIfMissing is false, and empty mesh ref is returned.

If an invalid display_density is passed: If any mesh exists, then it is returned. If bCreateIfMissing is true, the a mesh with ON_SubDDisplayParameters::DefaultDensity is created and returned. If bCreateIfMissing is false, and empty mesh ref is returned.

mp - [in] If bCreateIfMissing is true and a mesh is created, these will be set as the meshes creation parameters.

Returns: A render mesh with the specified properties. When bCreateIfMissing, this mesh may be empty.

◆ ObjectMaterial() [1/2]

virtual const CRhinoMaterial& CRhinoSubDObject::ObjectMaterial ( ) const
overridevirtual

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 from CRhinoObject.

◆ ObjectMaterial() [2/2]

virtual const CRhinoMaterial& CRhinoSubDObject::ObjectMaterial ( const ON_COMPONENT_INDEX ci,
const ON_UUID plugin_id,
const ON_3dmObjectAttributes attrs 
) const
overridevirtual

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

Reimplemented from CRhinoObject.

◆ ObjectType()

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

CRhinoObject overrides Returns: ON::subd_object

Implements CRhinoObject.

◆ operator=()

CRhinoSubDObject& CRhinoSubDObject::operator= ( const CRhinoSubDObject )

copies source object UUID

◆ Pick()

int CRhinoSubDObject::Pick ( const CRhinoPickContext pickContext,
CRhinoObjRefArray objRefs 
) const
overridevirtual

virtual CRhinoObject::Pick override

Reimplemented from CRhinoObject.

◆ PickFilter()

bool CRhinoSubDObject::PickFilter ( const CRhinoGetObject go,
bool   
) const
override

virtual CRhinoObject::PickFilter override

◆ PrintSubDTopology()

static unsigned int CRhinoSubDObject::PrintSubDTopology ( const ON_SubD subd,
bool  bUseRhinoTextOutTool 
)
static

Parameters: text_log - [in] If nullptr, then the output appears in a Rhino text output dialog and can be easily copied to the clipboard.

◆ PromotePreviewMeshes()

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

Reimplemented from CRhinoObject.

◆ SelectSubDComponent()

int CRhinoSubDObject::SelectSubDComponent ( ON_SubDComponentPtr  component_ptr,
bool  bSelect = true,
bool  bSynchHighlight = true,
bool  bPersistentSelect = false 
) const

◆ SelectSubObject()

int CRhinoSubDObject::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.

◆ SetDisplayAppearanceForExperts()

bool CRhinoSubDObject::SetDisplayAppearanceForExperts ( ON_SubDComponentLocation  subd_appearance) const

Description: Controls the appearance of all possible SubD displays (this object's SubD(), the dynamic display SubD, and the the static display SubD()). Returns: True if some display appearance changed.

Remarks: NOTE WELL: When using the CRhinoSubDObject expert display functions like SetDisplayAppearanceForExperts ...DynamicDisplayForExperts ...StaticDisplayForExperts
you must use CRhinoDoc::Regen() to update the views. (CRhinoDoc::Redraw() is not powerful enough to consistently force display buffers to update.)

◆ SetDynamicDisplayAppearanceForExperts()

void CRhinoSubDObject::SetDynamicDisplayAppearanceForExperts ( ON_SubDComponentLocation  subd_appearance) const

Description: Controls the appearance of the dynamic display.

Remarks: NOTE WELL: When using the CRhinoSubDObject expert display functions like SetDisplayAppearanceForExperts ...DynamicDisplayForExperts ...StaticDisplayForExperts you must use CRhinoDoc::Regen() to update the views. (CRhinoDoc::Redraw() is not powerful enough to consistently force display buffers to update.)

◆ SetDynamicDisplayForExperts()

void CRhinoSubDObject::SetDynamicDisplayForExperts ( ON_SubDRef  dynamic_display_subd_ref) const

Description: For expert users who need to temporarily modify the display. For example, when the SubD object is being dynamically edited.

Remarks: NOTE WELL: When using the CRhinoSubDObject expert display functions like SetDisplayAppearanceForExperts ...DynamicDisplayForExperts ...StaticDisplayForExperts you must use CRhinoDoc::Regen() to update the views. (CRhinoDoc::Redraw() is not powerful enough to consistently force display buffers to update.)

◆ SetRenderMeshParameters()

bool CRhinoSubDObject::SetRenderMeshParameters ( const ON_MeshParameters mp)
overridevirtual

virtual CRhinoObject::SetRenderMeshParameters override

Reimplemented from CRhinoObject.

◆ SetStaticDisplayAppearanceForExperts()

void CRhinoSubDObject::SetStaticDisplayAppearanceForExperts ( ON_SubDComponentLocation  subd_appearance) const

Description: Controls the appearance of the static display.

Remarks: NOTE WELL: When using the CRhinoSubDObject expert display functions like SetDisplayAppearanceForExperts ...DynamicDisplayForExperts ...StaticDisplayForExperts you must use CRhinoDoc::Regen() to update the views. (CRhinoDoc::Redraw() is not powerful enough to consistently force display buffers to update.)

◆ SetStaticDisplayForExperts()

void CRhinoSubDObject::SetStaticDisplayForExperts ( ON_SubDRef  static_display_subd_ref) const

Description: For expert users who need to temporarily modify the display. For example, when the SubD object is being dynamically edited.

Remarks: NOTE WELL: When using the CRhinoSubDObject expert display functions like SetDisplayAppearanceForExperts ...DynamicDisplayForExperts ...StaticDisplayForExperts you must use CRhinoDoc::Regen() to update the views. (CRhinoDoc::Redraw() is not powerful enough to consistently force display buffers to update.)

◆ SetSubD() [1/2]

bool CRhinoSubDObject::SetSubD ( const ON_SubD src_subd)

Description: Set the subd this CRhinoSubDObject references to a managed copy of src_subd. Userdata is not copied from src_subd to the managed subd. Remarks: This is a safe and reliable function.

◆ SetSubD() [2/2]

bool CRhinoSubDObject::SetSubD ( ON_SubDRef  subd_ref)

ON_SubD object access Description: This is the best way to set the CRhinoSubDObject's subd.

Remarks: This is a safe and reliable function.

Example: Commands that create ON_SubD objects should do something like the following:

ON_SubDRef subd_ref;

ON_SubD& subd = subd_ref.NewSubD();

/ add information to the subd subd.Add(...)

CRhinoSubDObject* subd_object = new CRhinoSubDObject(); subd_object->SetSubD(subd_ref);

◆ SetSubDForExperts()

bool CRhinoSubDObject::SetSubDForExperts ( ON_SubD subd)

Description: For expert users. Avoid. Parameters: subd - [in] Points to a subd that was created on the default Rhino heap by a call to new ON_Sub(...). If this function returns true, then ~CRhinoSubDObject() will delete subd. Remarks: If subd is on the stack, then Rhino will crash when ~CRhinoSubDObject() deletes the subd. If subd is on the heap, and some other code deletes subd, then Rhino will crash on the second attempt to delete subd. This function is provided so expert users can avoid copying large ON_SubD objects and precisely control the management of userdata attached to the ON_SubD.

◆ SetTextureCoordinates()

bool CRhinoSubDObject::SetTextureCoordinates ( const ON_TextureMapping mapping,
const ON_Xform objectXform,
bool  lazy = true 
) const
overridevirtual

virtual CRhinoObject::SetTextureCoordinates override

Reimplemented from CRhinoObject.

◆ ShortDescription()

const wchar_t* CRhinoSubDObject::ShortDescription ( bool  plural) const
overridevirtual

Returns: "subd"

Implements CRhinoObject.

◆ SizeOf()

unsigned int CRhinoSubDObject::SizeOf ( ) const
overridevirtual

virtual CRhinoObject::SizeOf override

Reimplemented from CRhinoObject.

◆ SnapTo()

bool CRhinoSubDObject::SnapTo ( const CRhinoSnapContext snapContext,
CRhinoSnapEvent snapEvent 
) const
overridevirtual

virtual CRhinoObject::SnapTo override

Reimplemented from CRhinoObject.

◆ StaticDisplayContentSerialNumber()

unsigned int CRhinoSubDObject::StaticDisplayContentSerialNumber ( ) const
Deprecated:
OBSOLETE: Always returns 0.

◆ SubD()

const ON_SubD& CRhinoSubDObject::SubD ( ) const

Description: For expert users. Avoid and use SubDRef() instead. You must insure this CRhinoSubDObject is not deleted while you use the returned reference. It better to use an ON_SubDRef. Returns: reference to the ON_SubD this CRhinoSubDObject uses for its geometry.

◆ SubDAppearance()

ON_SubDComponentLocation CRhinoSubDObject::SubDAppearance ( ) const

Description: Get the SubD appearance (surface or control net); Returns: ON_SubDComponentLocation::Surface (creamy/smooth) or ON_SubDComponentLocation::ControlNet (cruncy/box).

◆ SubDDisplay()

CRhinoSubDDisplay CRhinoSubDObject::SubDDisplay ( bool  bDynamicDisplay) const

Parameters: bDynamicDisplay - [in] If bEnableDynamicDisplay is true and a dynamic display is available, then it is returned. Otherwise the static display is returned.

◆ SubDDisplayAttributes()

CRhinoSubDDisplayAttributes CRhinoSubDObject::SubDDisplayAttributes ( const class CRhinoDisplayPipeline display_pipeline,
bool  bIgnoreObjectState 
) const

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.

◆ SubDIsVisible()

static bool CRhinoSubDObject::SubDIsVisible ( )
static

Add a SubD object to a Rhino document Description: This is the best way to add a Sub-D object with default object attributes to a Rhino document.

Parameters: subd_ref - [in] rhino_doc_sn - [in]

Returns: 0: The input was not valid and the subd object was not added to the document. != 0: The runtime object serial number of the new CRhinoSubDObject.

Example:

  ON_SubDRef subd_ref;
  ON_SubD& subd = subd_ref.NewSubD();

/ fill in subd ...

unsigned int rhino_doc_sn = ...; unsigned int rhino_subd_object_sn = CRhinoSubDObject::AddToDocument(subd_ref,rhino_doc_sn); Return: true if SubD is visible. false in commercial Rhino 6, unless test commands have been turned on with the "T_E_S_T" command.

◆ SubDRef()

ON_SubDRef CRhinoSubDObject::SubDRef ( ) const

Description: When you need to reference the ON_SubD geometry, the best way is to save an ON_SubDRef for the scope of your use. Returns: An ON_SubDRef you can use to reference the ON_SubD geometry. As long as an ON_SubDRef exists, you can be assured the referenced ON_SubD exists. Example: ON_SubDRef subd_ref = subd_object->SubDRef(); ... ... anything can happen including delete subd_object. ... subd_ref.SubD().WhatEver() reliably exists and is safe to use.

◆ SubObjectsAreHighlighted()

int CRhinoSubDObject::SubObjectsAreHighlighted ( ) const
overrideprotectedvirtual

returns number of highlighted subobjects

Reimplemented from CRhinoObject.

◆ SubObjectsAreSelected()

int CRhinoSubDObject::SubObjectsAreSelected ( ) const
overrideprotectedvirtual

virtual overrides to support subobject selection

Reimplemented from CRhinoObject.

◆ SupportsBrepProxyReferenceCounting()

bool CRhinoSubDObject::SupportsBrepProxyReferenceCounting ( ) const
overridevirtual

virtual CRhinoObject::SupportsBrepProxyReferenceCounting override

Reimplemented from CRhinoObject.

◆ UnhighlightAllSubObjects()

int CRhinoSubDObject::UnhighlightAllSubObjects ( )
overridevirtual

returns number of changed subobjects

Reimplemented from CRhinoObject.

◆ UnselectAllSubObjects()

int CRhinoSubDObject::UnselectAllSubObjects ( )
overridevirtual

returns number of unselected subobjects

Reimplemented from CRhinoObject.