Rhino C++ API  9.0
Public Member Functions | List of all members
CRhinoObjectAttributes Class Reference

#include <rhinoSdkObjectAttributes.h>

Inheritance diagram for CRhinoObjectAttributes:
ON_3dmObjectAttributes ON_Object

Public Member Functions

 CRhinoObjectAttributes ()
 
 CRhinoObjectAttributes (const CRhinoObjectAttributes &)
 
 CRhinoObjectAttributes (const ON_3dmObjectAttributes &)
 
 ~CRhinoObjectAttributes ()
 
ON_Color ComputedHatchBoundaryColor (const CRhinoDoc *doc, const ON_UUID &viewportId, bool print) const
 
ON_SectionStyle ComputedSectionStyle (const CRhinoDoc *doc, const CRhinoObjectAttributes *sectionerAttributes, bool computeColors) const
 
ON_SectionStyle ComputedSectionStyle (const CRhinoDoc *doc, const CRhinoObjectAttributes *sectionerAttributes, bool computeColors, const ON_UUID &viewport_id) const
 
ON_Color DrawColor (const CRhinoDoc *=NULL) const
 
ON_Color DrawColor (const CRhinoDoc *doc, const ON_UUID &viewport_id) const
 
void Dump (ON_TextLog &) const
 prints localized summary of attributes More...
 
int EffectiveLinetypeIndex (const CRhinoDoc *doc=nullptr) const
 
CRhinoObjectAttributesoperator= (const CRhinoObjectAttributes &)
 
CRhinoObjectAttributesoperator= (const ON_3dmObjectAttributes &)
 
ON_Color PlotColor (const CRhinoDoc *=NULL) const
 
ON_Color PlotColor (const CRhinoDoc *doc, const ON_UUID &viewport_id) const
 
double PlotWeight (const CRhinoDoc *=NULL) const
 
double PlotWeight (const CRhinoDoc *doc, const ON_UUID &viewport_id) const
 
- Public Member Functions inherited from ON_3dmObjectAttributes
 ON_3dmObjectAttributes ()
 attributes of geometry and dimension table objects More...
 
 ON_3dmObjectAttributes (const ON_3dmObjectAttributes &)
 
 ~ON_3dmObjectAttributes ()
 
bool AddActiveInViewportOverride (const ON_UUID &viewportId, bool active)
 Adds the specified activity override to the specified viewport. More...
 
ON_DEPRECATED ON_DecalAddDecal (void)
 This method is deprecated in favor of AddDecalEx(). More...
 
const std::shared_ptr< ON_DecalAddDecalEx (void)
 Note const here is a mistake. [SDK_UNFREEZE]. More...
 
bool AddDisplayMaterialRef (ON_DisplayMaterialRef display_material)
 
void AddToGroup (int)
 
unsigned int ApplyParentalControl (const ON_3dmObjectAttributes &parent_attributes, const ON_Layer &parent_layer, const ON_UUID &viewport_id, unsigned int control_limits=0xFFFFFFFF)
 
unsigned int ApplyParentalControl (const ON_3dmObjectAttributes &parent_attributes, const ON_Layer &parent_layer, unsigned int control_limits=0xFFFFFFFF)
 
ON::SectionLabelStyle ClippingPlaneLabelStyle () const
 
ON::object_color_source ColorSource () const
 
const ON_LinetypeCustomLinetype () const
 
const ON_MeshParametersCustomRenderMeshParameters () const
 
const ON_SectionStyleCustomSectionStyle (ON_SectionStyle *sectionStyle=nullptr) const
 
void Default ()
 Initializes all attributes to the default values. More...
 
void DeleteCustomRenderMeshParameters ()
 
bool DetailBackgroundVisible () const
 
int DisplayMaterialRefCount () const
 
bool EnableCustomRenderMeshParameters (bool bEnable)
 
bool FindDisplayMaterialId (const ON_UUID &viewport_id, ON_UUID *display_material_id=nullptr) const
 
bool FindDisplayMaterialRef (const ON_DisplayMaterialRef &search_material, ON_DisplayMaterialRef *found_material=nullptr) const
 Display material references. More...
 
const ON_UuidListGetActiveInViewportOverrides (bool &active) const
 Get list of specific viewports set for this object's activity. More...
 
void GetDecalArray (std::vector< std::shared_ptr< ON_Decal >> &array_out) const
 
const ON_DEPRECATED ON_SimpleArray< ON_Decal * > & GetDecalArray (void) const
 Decals. More...
 
bool GetEnableCustomRenderMeshParameters () const
 
int GetGroupList (ON_SimpleArray< int > &) const
 
int GroupCount () const
 group interface More...
 
const int * GroupList () const
 
bool HasActiveInViewportOverride (const ON_UUID &viewportId, bool &active) const
 Checks if the specified viewport has an activity override. More...
 
ON_Color HatchBackgroundFillColor () const
 
ON_Color HatchBackgroundFillColor (bool print) const
 
ON_Color HatchBoundaryColor (bool print) const
 
ON::item_color_source HatchBoundaryColorSource (bool print) const
 
double HatchBoundaryPlotWeightMillimeters () const
 
bool HatchBoundaryVisible () const
 
bool IsActiveInAllModelViewports () const
 Returns true if the object "exists" in all viewports. More...
 
bool IsActiveInModelSpace () const
 Returns true if the object "exists" in model space. More...
 
bool IsActiveInViewport (const ON_UUID &viewportId) const
 Returns true if the object "exists" in a certain viewport. More...
 
bool IsInGroup (int) const
 Returns true if object is in group with the specified index. More...
 
bool IsInGroups (const ON_SimpleArray< int > &) const
 Returns true if object is in any of the groups in the list. More...
 
bool IsInGroups (int, const int *) const
 Returns true if the object is in any of the groups in the list. More...
 
bool IsInstanceDefinitionObject () const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 ON_Object virtual interface. See ON_Object for details. More...
 
bool IsVisible () const
 
double LinetypePatternScale () const
 Per object linetype scale. More...
 
ON::object_linetype_source LinetypeSource () const
 
const ON_UUIDMarkupId () const
 
ON::object_material_source MaterialSource () const
 
ON_MeshModifiersMeshModifiers (void)
 
const ON_MeshModifiersMeshModifiers (void) const
 Mesh Modifiers. More...
 
ON::object_mode Mode () const
 Interface ////////////////////////////////////////////////////////. More...
 
const ON_wString Name () const
 
ON_Plane ObjectFrame (const ON_COMPONENT_INDEX &ci) const
 
bool operator!= (const ON_3dmObjectAttributes &) const
 
ON_3dmObjectAttributesoperator= (const ON_3dmObjectAttributes &)
 
bool operator== (const ON_3dmObjectAttributes &) const
 
ON::plot_color_source PlotColorSource () const
 
ON::plot_weight_source PlotWeightSource () const
 
bool Read (ON_BinaryArchive &) override
 
bool RemoveActiveInViewportOverride (const ON_UUID &viewportId, bool active)
 Removes the specified activity override to the specified viewport. More...
 
void RemoveAllDecals (void)
 
void RemoveAllDisplayMaterialRefs ()
 
void RemoveCustomLinetype ()
 
void RemoveCustomSectionStyle ()
 
ON_DEPRECATED bool RemoveDecal (ON_Decal &decal)
 
bool RemoveDecal (ON_DECAL_CRC decal_crc)
 
bool RemoveDisplayMaterialRef (ON_UUID viewport_id, ON_UUID display_material_id=ON_nil_uuid)
 
void RemoveFromAllGroups ()
 Removes object from all groups. More...
 
void RemoveFromGroup (int)
 
void RemoveFromTopGroup ()
 Removes the object from the last group in the group list. More...
 
ON::SectionAttributesSource SectionAttributesSource () const
 Source for all section related attributes. More...
 
int SectionStyleIndex () const
 
bool SetActiveInAllModelViewports ()
 Specify that an object "exists" in all viewports. More...
 
bool SetActiveInViewportOverrides (const ON_UuidList &viewportIds, bool active)
 Specify that an object "exists" only in a specified set of viewports. More...
 
bool SetActiveInViewportOverrides (ON_UuidList &&viewportIds, bool active)
 
void SetClippingPlaneLabelStyle (ON::SectionLabelStyle style)
 
void SetColorSource (ON::object_color_source)
 See ColorSource(). More...
 
void SetCustomLinetype (const ON_Linetype &linetype)
 
bool SetCustomRenderMeshParameters (const class ON_MeshParameters &mp)
 
void SetCustomSectionStyle (const ON_SectionStyle &sectionStyle)
 
void SetDetailBackgroundVisible (bool visible)
 
void SetHatchBackgroundFillColor (const ON_Color &color)
 
void SetHatchBackgroundFillColor (const ON_Color &color, bool print)
 
void SetHatchBoundaryColor (const ON_Color &color, bool print)
 
void SetHatchBoundaryColorSource (ON::item_color_source source, bool print)
 
void SetHatchBoundaryPlotWeightMillimeters (double weight)
 
void SetHatchBoundaryVisible (bool on)
 
void SetLinetypePatternScale (double scale)
 
void SetLinetypeSource (ON::object_linetype_source)
 See LinetypeSource(). More...
 
void SetMarkupId (const ON_UUID &markupId)
 
void SetMaterialSource (ON::object_material_source ms)
 
void SetMode (ON::object_mode)
 See Mode(). More...
 
bool SetName (const wchar_t *name, bool bFixInvalidName)
 
void SetObjectFrame (const ON_COMPONENT_INDEX &ci, const ON_Plane &plane)
 
void SetObjectFrame (const ON_COMPONENT_INDEX &ci, const ON_Xform &wcs_to_ocs)
 
void SetPlotColorSource (ON::plot_color_source)
 See PlotColorSource(). More...
 
void SetPlotWeightSource (ON::plot_weight_source)
 
void SetSectionAttributesSource (ON::SectionAttributesSource source)
 
void SetSectionStyleIndex (int index)
 
void SetVisible (bool bVisible)
 
unsigned int SizeOf () const override
 
int TopGroup () const
 
bool Transform (const ON_Geometry *pOriginalGeometry, const ON_Xform &xform)
 
bool Transform (const ON_Xform &xform)
 
bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map) override
 
void UserDataChanged (UserDataType type)
 
bool Write (ON_BinaryArchive &) const override
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
void CopyUserData (const ON_Object &source_object)
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
virtual ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
virtual void DestroyRuntimeCache (bool bDelete=true)
 
bool DetachUserData (class ON_UserData *pUserData)
 
void DumpUserData (const wchar_t *description, ON_TextLog &text_log) const
 Go through the linked list of ON_UserData attached to this and call the virtual Dump(text_log) function on each instance. More...
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
virtual ON_UUID ModelObjectId () const
 
void MoveUserData (ON_Object &source_object)
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
virtual ON::object_type ObjectType () const
 
ON_wString ObjectTypeStr () const
 virtual More...
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
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)
 
int UserStringCount () const
 

Additional Inherited Members

- Public Types inherited from ON_3dmObjectAttributes
enum  UserDataType { UserDataType::Decals }
 
- 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 ON_3dmObjectAttributes
ON_Color m_color
 
int m_display_order = 0
 
ON_SimpleArray< ON_DisplayMaterialRefm_dmref
 
int m_layer_index = 0
 
int m_linetype_index = -1
 
int m_material_index = -1
 
ON_wString m_name
 
ON::object_decoration m_object_decoration = ON::no_object_decoration
 Used to indicate an object has a decoration (like an arrowhead on a curve) More...
 
ON_Color m_plot_color
 
double m_plot_weight_mm = 0
 
ON_ObjectRenderingAttributes m_rendering_attributes
 
ON::active_space m_space = ON::model_space
 
ON_wString m_url
 
ON_UUID m_uuid = ON_nil_uuid
 
ON_UUID m_viewport_id = ON_nil_uuid
 
int m_wire_density = 1
 
- Static Public Attributes inherited from ON_3dmObjectAttributes
static const ON_3dmObjectAttributes DefaultAttributes
 
static const ON_3dmObjectAttributes Unset
 

Constructor & Destructor Documentation

◆ CRhinoObjectAttributes() [1/3]

CRhinoObjectAttributes::CRhinoObjectAttributes ( )

◆ ~CRhinoObjectAttributes()

CRhinoObjectAttributes::~CRhinoObjectAttributes ( )

◆ CRhinoObjectAttributes() [2/3]

CRhinoObjectAttributes::CRhinoObjectAttributes ( const CRhinoObjectAttributes )

◆ CRhinoObjectAttributes() [3/3]

CRhinoObjectAttributes::CRhinoObjectAttributes ( const ON_3dmObjectAttributes )

Member Function Documentation

◆ ComputedHatchBoundaryColor()

ON_Color CRhinoObjectAttributes::ComputedHatchBoundaryColor ( const CRhinoDoc doc,
const ON_UUID viewportId,
bool  print 
) const

Description: Resolves the effective hatch boundary color for this object by applying HatchBoundaryColorSource(print) to find where the color comes from: color_from_layer - the layer's PerViewportColor (or PerViewportPlotColor when print==true) color_from_object - the object's main attribute color m_color (or m_plot_color when print==true) color_from_parent - currently treated the same as color_from_layer color_custom - the per-item override stored on the attribute (see ON_3dmObjectAttributes::HatchBoundaryColor). If that override is unset, the seed color is used instead. Parameters: doc - [in] document used to resolve the layer color. If null, the active document is used. viewportId - [in] viewport whose per-viewport overrides should be consulted when the source is layer/parent. Pass ON_nil_uuid for the base layer color. print - [in] false for the display variant, true for the print/plot variant.

◆ ComputedSectionStyle() [1/2]

ON_SectionStyle CRhinoObjectAttributes::ComputedSectionStyle ( const CRhinoDoc doc,
const CRhinoObjectAttributes sectionerAttributes,
bool  computeColors 
) const

Description: Get section attributes

◆ ComputedSectionStyle() [2/2]

ON_SectionStyle CRhinoObjectAttributes::ComputedSectionStyle ( const CRhinoDoc doc,
const CRhinoObjectAttributes sectionerAttributes,
bool  computeColors,
const ON_UUID viewport_id 
) const

◆ DrawColor() [1/2]

ON_Color CRhinoObjectAttributes::DrawColor ( const CRhinoDoc = NULL) const

◆ DrawColor() [2/2]

ON_Color CRhinoObjectAttributes::DrawColor ( const CRhinoDoc doc,
const ON_UUID viewport_id 
) const

◆ Dump()

void CRhinoObjectAttributes::Dump ( ON_TextLog ) const
virtual

prints localized summary of attributes

Reimplemented from ON_3dmObjectAttributes.

◆ EffectiveLinetypeIndex()

int CRhinoObjectAttributes::EffectiveLinetypeIndex ( const CRhinoDoc doc = nullptr) const

Description: Returns the effective linetype index to be used to find the linetype definition to draw an object If an object's linetype source is ON::linetype_from_object, the linetype index in the object's attributes is used. If an object's linetype source is ON::linetyper_from_layer, the linetype index from the object's layer is used.

Returns: Zero based linetype table index of the effective linetype.

◆ operator=() [1/2]

CRhinoObjectAttributes& CRhinoObjectAttributes::operator= ( const CRhinoObjectAttributes )

◆ operator=() [2/2]

CRhinoObjectAttributes& CRhinoObjectAttributes::operator= ( const ON_3dmObjectAttributes )

◆ PlotColor() [1/2]

ON_Color CRhinoObjectAttributes::PlotColor ( const CRhinoDoc = NULL) const

◆ PlotColor() [2/2]

ON_Color CRhinoObjectAttributes::PlotColor ( const CRhinoDoc doc,
const ON_UUID viewport_id 
) const

◆ PlotWeight() [1/2]

double CRhinoObjectAttributes::PlotWeight ( const CRhinoDoc = NULL) const

◆ PlotWeight() [2/2]

double CRhinoObjectAttributes::PlotWeight ( const CRhinoDoc doc,
const ON_UUID viewport_id 
) const