Rhino C++ API  8.14
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ON_3dmObjectAttributes Class Reference

#include <opennurbs_3dm_attributes.h>

Inheritance diagram for ON_3dmObjectAttributes:
ON_Object CRhinoObjectAttributes

Public Member Functions

 ON_3dmObjectAttributes ()
 attributes of geometry and dimension table objects More...
 
 ON_3dmObjectAttributes (const ON_3dmObjectAttributes &)
 
 ~ON_3dmObjectAttributes ()
 
ON_DecalAddDecal (void)
 
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 ()
 
int DisplayMaterialRefCount () const
 
void Dump (ON_TextLog &) const override
 
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_SimpleArray< ON_Decal * > & GetDecalArray (void) const
 Decals. More...
 
int GetGroupList (ON_SimpleArray< int > &) const
 
int GroupCount () const
 group interface More...
 
const int * GroupList () const
 
ON_Color HatchBackgroundFillColor () const
 
bool HatchBoundaryVisible () const
 
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
 
ON::object_material_source MaterialSource () const
 
class 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
 
void RemoveAllDecals (void)
 
void RemoveAllDisplayMaterialRefs ()
 
void RemoveCustomLinetype ()
 
void RemoveCustomSectionStyle ()
 
bool RemoveDecal (ON_Decal &decal)
 
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...
 
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 SetHatchBackgroundFillColor (const ON_Color &color)
 
void SetHatchBoundaryVisible (bool on)
 
void SetLinetypePatternScale (double scale)
 
void SetLinetypeSource (ON::object_linetype_source)
 See LinetypeSource(). More...
 
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 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
 
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 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_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
 

Public Attributes

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

static const ON_3dmObjectAttributes DefaultAttributes
 
static const ON_3dmObjectAttributes Unset
 

Additional Inherited Members

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

Detailed Description

Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete openNURBS copyright information see http://www.opennurbs.org. Description: Top level OpenNURBS objects have geometry and attributes. The geometry is stored in some class derived from ON_Geometry and the attributes are stored in an ON_3dmObjectAttributes class. Examples of attributes are object name, object id, display attributes, group membership, layer membership, and so on.

Constructor & Destructor Documentation

◆ ON_3dmObjectAttributes() [1/2]

ON_3dmObjectAttributes::ON_3dmObjectAttributes ( )

attributes of geometry and dimension table objects

◆ ~ON_3dmObjectAttributes()

ON_3dmObjectAttributes::~ON_3dmObjectAttributes ( )

◆ ON_3dmObjectAttributes() [2/2]

ON_3dmObjectAttributes::ON_3dmObjectAttributes ( const ON_3dmObjectAttributes )

Member Function Documentation

◆ AddDecal()

ON_Decal* ON_3dmObjectAttributes::AddDecal ( void  )

Description: Add a new decal to this attributes object. The returned pointer points to an object that is owned by the attributes. Do not store or delete it.

◆ AddDisplayMaterialRef()

bool ON_3dmObjectAttributes::AddDisplayMaterialRef ( ON_DisplayMaterialRef  display_material)

Description: Add a display material reference to the attributes. If there is an existing entry with a matching viewport id, the existing entry is replaced. Parameters: display_material - [in] Returns: True if input is valid (material id != nil) See Also: ON_3dmObjectAttributes::FindDisplayMaterialRef ON_3dmObjectAttributes::RemoveDisplayMaterialRef

◆ AddToGroup()

void ON_3dmObjectAttributes::AddToGroup ( int  )

Adds object to the group with specified index by appending index to group list (If the object is already in group, nothing is changed.)

◆ ApplyParentalControl() [1/2]

unsigned int ON_3dmObjectAttributes::ApplyParentalControl ( const ON_3dmObjectAttributes parent_attributes,
const ON_Layer parent_layer,
const ON_UUID viewport_id,
unsigned int  control_limits = 0xFFFFFFFF 
)

◆ ApplyParentalControl() [2/2]

unsigned int ON_3dmObjectAttributes::ApplyParentalControl ( const ON_3dmObjectAttributes parent_attributes,
const ON_Layer parent_layer,
unsigned int  control_limits = 0xFFFFFFFF 
)

Description: If "this" has attributes (color, plot weight, ...) with "by parent" sources, then the values of those attributes on parent_attributes are copied. Parameters: parent_attributes - [in] parent_layer - [in] control_limits - [in] The bits in control_limits determine which attributes may may be copied. 1: visibility 2: color 4: render material 8: plot color 0x10: plot weight 0x20: linetype 0x40: display order 0x80: clip participation Returns: The bits in the returned integer indicate which attributes were actually modified.

       1: visibility
       2: color
       4: render material
       8: plot color
    0x10: plot weight
    0x20: linetype
    0x40: display order
    0x80: clip participation
   0x100: section style

◆ ClippingPlaneLabelStyle()

ON::SectionLabelStyle ON_3dmObjectAttributes::ClippingPlaneLabelStyle ( ) const

◆ ColorSource()

ON::object_color_source ON_3dmObjectAttributes::ColorSource ( ) const

The color used to display an OpenNURBS object is specified in one of three ways. If ColorSource() is ON::color_from_layer, then the object's layer ON_Layer::Color() is used. If ColorSource() is ON::color_from_object, then value of m_color is used. If ColorSource() is ON::color_from_material, then the diffuse color of the object's render material is used. See ON_3dmObjectAttributes::MaterialSource() to determine where to get the definition of the object's render material.

◆ CustomLinetype()

const ON_Linetype* ON_3dmObjectAttributes::CustomLinetype ( ) const

Description: Attributes can have optional custom linetypes associated with them. This function returns the custom linetype if one exists. If a custom linetype is not attached to this attribute, then nullptr is returned

◆ CustomRenderMeshParameters()

const ON_MeshParameters* ON_3dmObjectAttributes::CustomRenderMeshParameters ( ) const

Returns: Null or a pointer to fragile mesh parameters. If a non-null pointer is returned, copy it and use the copy. DO NOT SAVE THIS POINTER FOR LATER USE. A call to DeleteMeshParameters() will delete the class. DO NOT const_cast the returned pointer and change its settings. You must use either SetMeshParameters() or EnableMeshParameters() to change settings. Remarks: If the value of ON_MeshParameters::m_bCustomSettingsDisabled is true, then do no use these parameters to make a render mesh.

◆ CustomSectionStyle()

const ON_SectionStyle* ON_3dmObjectAttributes::CustomSectionStyle ( ON_SectionStyle sectionStyle = nullptr) const

Description: Attributes can have optional custom section styles associated with them. This function returns the custom section style if one exists. Parameters: sectionStyle [out] - if not nullptr and a custom section style exists, the data in the custom section style is copied to sectionStyle

◆ Default()

void ON_3dmObjectAttributes::Default ( )

Initializes all attributes to the default values.

◆ DeleteCustomRenderMeshParameters()

void ON_3dmObjectAttributes::DeleteCustomRenderMeshParameters ( )

Description: Deletes any per object mesh parameters.

◆ DisplayMaterialRefCount()

int ON_3dmObjectAttributes::DisplayMaterialRefCount ( ) const

Returns: Number of display material references.

◆ Dump()

void ON_3dmObjectAttributes::Dump ( ON_TextLog ) const
overridevirtual

Description: Creates a text dump of the object. Remarks: Dump() is intended for debugging and is not suitable for creating high quality text descriptions of an object.

The default implementations of this virtual function prints the class's name.

Reimplemented from ON_Object.

Reimplemented in CRhinoObjectAttributes.

◆ EnableCustomRenderMeshParameters()

bool ON_3dmObjectAttributes::EnableCustomRenderMeshParameters ( bool  bEnable)

Parameters: bEnable - [in] true to enable use of the per object mesh parameters. false to disable use of the per object mesh parameters. Returns: False if the object doe not have per object mesh parameters and bEnable was true. Use SetMeshParameters() to set per object mesh parameters. Remarks: Sets the value of ON_MeshParameters::m_bCustomSettingsDisabled to !bEnable

◆ FindDisplayMaterialId()

bool ON_3dmObjectAttributes::FindDisplayMaterialId ( const ON_UUID viewport_id,
ON_UUID display_material_id = nullptr 
) const

Description: Quick way to see if a viewport has a special material. Parameters: viewport_id - [in] display_material_id - [out] Returns: True if a material_id is assigned.

◆ FindDisplayMaterialRef()

bool ON_3dmObjectAttributes::FindDisplayMaterialRef ( const ON_DisplayMaterialRef search_material,
ON_DisplayMaterialRef found_material = nullptr 
) const

Display material references.

Description: Searches for a matching display material. For a given viewport id, there is at most one display material. For a given display material id, there can be multiple viewports. If there is a display reference in the list with a nil viewport id, then the display material will be used in all viewports that are not explicitly referenced in other ON_DisplayMaterialRefs.

Parameters: search_material - [in] found_material - [out]

If FindDisplayMaterialRef(), the input value of search_material is never changed. If FindDisplayMaterialRef() returns true, the chart shows the output value of display_material. When there are multiple possibilities for a match, the matches at the top of the chart have higher priority.

search_material found_material input value output value

(nil,nil) (nil,did) if (nil,did) is in the list. (nil,did) (vid,did) if (vid,did) is in the list. (nil,did) (nil,did) if (nil,did) is in the list. (vid,nil) (vid,did) if (vid,did) is in the list (vid,nil) (vid,did) if (nil,did) is in the list (vid,did) (vid,did) if (vid,did) is in the list.

Example: ON_UUID display_material_id = ON_nil_uuid; ON_Viewport vp = ...; ON_DisplayMaterialRef search_dm; search_dm.m_viewport_id = vp.ViewportId(); ON_DisplayMaterialRef found_dm; if ( attributes.FindDisplayMaterial(search_dm, &found_dm) ) { display_material_id = found_dm.m_display_material_id; }

Returns: True if a matching display material is found. See Also: ON_3dmObjectAttributes::AddDisplayMaterialRef ON_3dmObjectAttributes::RemoveDisplayMaterialRef

◆ GetDecalArray()

const ON_SimpleArray<ON_Decal*>& ON_3dmObjectAttributes::GetDecalArray ( void  ) const

Decals.

Description: Get an array of decals that are stored on this attributes object. Do not store or delete pointers from the array.

◆ GetGroupList()

int ON_3dmObjectAttributes::GetGroupList ( ON_SimpleArray< int > &  ) const

Returns GroupCount() and puts a list of zero based group indices into the array.

◆ GroupCount()

int ON_3dmObjectAttributes::GroupCount ( ) const

group interface

returns number of groups object belongs to

◆ GroupList()

const int* ON_3dmObjectAttributes::GroupList ( ) const

Returns and array an array of GroupCount() zero based group indices. If GroupCount() is zero, then GroupList() returns nullptr.

◆ HatchBackgroundFillColor()

ON_Color ON_3dmObjectAttributes::HatchBackgroundFillColor ( ) const

◆ HatchBoundaryVisible()

bool ON_3dmObjectAttributes::HatchBoundaryVisible ( ) const

◆ IsInGroup()

bool ON_3dmObjectAttributes::IsInGroup ( int  ) const

Returns true if object is in group with the specified index.

◆ IsInGroups() [1/2]

bool ON_3dmObjectAttributes::IsInGroups ( const ON_SimpleArray< int > &  ) const

Returns true if object is in any of the groups in the list.

◆ IsInGroups() [2/2]

bool ON_3dmObjectAttributes::IsInGroups ( int  ,
const int *   
) const

Returns true if the object is in any of the groups in the list.

◆ IsInstanceDefinitionObject()

bool ON_3dmObjectAttributes::IsInstanceDefinitionObject ( ) const

Description: Use this query to determine if an object is part of an instance definition. Returns: True if the object is part of an instance definition.

◆ IsValid()

bool ON_3dmObjectAttributes::IsValid ( class ON_TextLog text_log = nullptr) const
overridevirtual

ON_Object virtual interface. See ON_Object for details.

Reimplemented from ON_Object.

◆ IsVisible()

bool ON_3dmObjectAttributes::IsVisible ( ) const

Returns: Returns true if object is visible. See Also: ON_3dmObjectAttributes::SetVisible

◆ LinetypePatternScale()

double ON_3dmObjectAttributes::LinetypePatternScale ( ) const

Per object linetype scale.

◆ LinetypeSource()

ON::object_linetype_source ON_3dmObjectAttributes::LinetypeSource ( ) const

The Linetype used to display an OpenNURBS object is specified in one of two ways. If LinetypeSource() is ON::linetype_from_layer, then the object's layer ON_Layer::Linetype() is used. If LinetypeSource() is ON::linetype_from_object, then value of m_linetype is used.

◆ MaterialSource()

ON::object_material_source ON_3dmObjectAttributes::MaterialSource ( ) const

END: Per object mesh parameter support Description: Determine if the simple material should come from the object or from it's layer. High quality rendering plug-ins should use m_rendering_attributes. Returns: Where to get material information if you do are too lazy to look in m_rendering_attributes.m_materials[].

◆ MeshModifiers()

class ON_MeshModifiers& ON_3dmObjectAttributes::MeshModifiers ( void  ) const

Mesh Modifiers.

Description: Get the mesh modifiers that are stored on this attributes object.

◆ Mode()

ON::object_mode ON_3dmObjectAttributes::Mode ( ) const

Interface ////////////////////////////////////////////////////////.

An OpenNURBS object must be in one of three modes: normal, locked or hidden. If an object is in normal mode, then the object's layer controls visibility and selectability. If an object is locked, then the object's layer controls visibility by the object cannot be selected. If the object is hidden, it is not visible and it cannot be selected.

◆ Name()

const ON_wString ON_3dmObjectAttributes::Name ( ) const

◆ ObjectFrame()

ON_Plane ON_3dmObjectAttributes::ObjectFrame ( const ON_COMPONENT_INDEX ci) const

◆ operator!=()

bool ON_3dmObjectAttributes::operator!= ( const ON_3dmObjectAttributes ) const

◆ operator=()

ON_3dmObjectAttributes& ON_3dmObjectAttributes::operator= ( const ON_3dmObjectAttributes )

◆ operator==()

bool ON_3dmObjectAttributes::operator== ( const ON_3dmObjectAttributes ) const

◆ PlotColorSource()

ON::plot_color_source ON_3dmObjectAttributes::PlotColorSource ( ) const

The color used to plot an OpenNURBS object on paper is specified in one of three ways. If PlotColorSource() is ON::plot_color_from_layer, then the object's layer ON_Layer::PlotColor() is used. If PlotColorSource() is ON::plot_color_from_object, then value of PlotColor() is used.

◆ PlotWeightSource()

ON::plot_weight_source ON_3dmObjectAttributes::PlotWeightSource ( ) const

◆ Read()

bool ON_3dmObjectAttributes::Read ( ON_BinaryArchive binary_archive)
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

◆ RemoveAllDecals()

void ON_3dmObjectAttributes::RemoveAllDecals ( void  )

Description: Remove all decals from this attributes object.

◆ RemoveAllDisplayMaterialRefs()

void ON_3dmObjectAttributes::RemoveAllDisplayMaterialRefs ( )

Description: Remove the entire display material reference list.

◆ RemoveCustomLinetype()

void ON_3dmObjectAttributes::RemoveCustomLinetype ( )

Description: Remove any custom linetype associated with this attribute

◆ RemoveCustomSectionStyle()

void ON_3dmObjectAttributes::RemoveCustomSectionStyle ( )

Description: Remove any custom section style associated with this attribute

◆ RemoveDecal()

bool ON_3dmObjectAttributes::RemoveDecal ( ON_Decal decal)

Description: Remove a decal from this attributes object. Returns true if successful, else false.

◆ RemoveDisplayMaterialRef()

bool ON_3dmObjectAttributes::RemoveDisplayMaterialRef ( ON_UUID  viewport_id,
ON_UUID  display_material_id = ON_nil_uuid 
)

Description: Remove a display material reference from the list. Parameters: viewport_id - [in] Any display material references with this viewport id will be removed. If nil, then viewport_id is ignored. display_material_id - [in] Any display material references that match the viewport_id and have this display_material_id will be removed. If nil, then display_material_id is ignored. Returns: True if a display material reference was removed. See Also: ON_3dmObjectAttributes::FindDisplayMaterialRef ON_3dmObjectAttributes::AddDisplayMaterialRef

◆ RemoveFromAllGroups()

void ON_3dmObjectAttributes::RemoveFromAllGroups ( )

Removes object from all groups.

◆ RemoveFromGroup()

void ON_3dmObjectAttributes::RemoveFromGroup ( int  )

Removes object from the group with specified index. If the object is not in the group, nothing is changed.

◆ RemoveFromTopGroup()

void ON_3dmObjectAttributes::RemoveFromTopGroup ( )

Removes the object from the last group in the group list.

◆ SectionAttributesSource()

ON::SectionAttributesSource ON_3dmObjectAttributes::SectionAttributesSource ( ) const

Source for all section related attributes.

Sections are the product of intersecting a plane with an object. For surface type geometry (ON_Brep, ON_Extrusion, ON_SubD, ON_Mesh) this intersection can result in curves as well as hatches for the closed curves generated

◆ SetClippingPlaneLabelStyle()

void ON_3dmObjectAttributes::SetClippingPlaneLabelStyle ( ON::SectionLabelStyle  style)

◆ SetColorSource()

void ON_3dmObjectAttributes::SetColorSource ( ON::object_color_source  )

◆ SetCustomLinetype()

void ON_3dmObjectAttributes::SetCustomLinetype ( const ON_Linetype linetype)

Description: Attributes can have optional custom linetypes associated with them. When a custom linetype is attached to an attribute, this linetype is used for an attribute instead of the linetype referenced by the linetype index. This function adds a custom linetype for this attribute.

◆ SetCustomRenderMeshParameters()

bool ON_3dmObjectAttributes::SetCustomRenderMeshParameters ( const class ON_MeshParameters mp)

BEGIN: Per object mesh parameter support Parameters: mp - [in] per object mesh parameters Returns: True if successful.

◆ SetCustomSectionStyle()

void ON_3dmObjectAttributes::SetCustomSectionStyle ( const ON_SectionStyle sectionStyle)

Description: Attributes can have optional custom section style associated with them. This function adds a custom section style for this attribute.

◆ SetHatchBackgroundFillColor()

void ON_3dmObjectAttributes::SetHatchBackgroundFillColor ( const ON_Color color)

◆ SetHatchBoundaryVisible()

void ON_3dmObjectAttributes::SetHatchBoundaryVisible ( bool  on)

◆ SetLinetypePatternScale()

void ON_3dmObjectAttributes::SetLinetypePatternScale ( double  scale)

◆ SetLinetypeSource()

void ON_3dmObjectAttributes::SetLinetypeSource ( ON::object_linetype_source  )

◆ SetMaterialSource()

void ON_3dmObjectAttributes::SetMaterialSource ( ON::object_material_source  ms)

Description: Specifies if the simple material should be the one indicated by the material index or the one indicated by the object's layer. Parameters: ms - [in]

◆ SetMode()

void ON_3dmObjectAttributes::SetMode ( ON::object_mode  )

See Mode().

◆ SetName()

bool ON_3dmObjectAttributes::SetName ( const wchar_t *  name,
bool  bFixInvalidName 
)

◆ SetObjectFrame() [1/2]

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

◆ SetObjectFrame() [2/2]

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

◆ SetPlotColorSource()

void ON_3dmObjectAttributes::SetPlotColorSource ( ON::plot_color_source  )

◆ SetPlotWeightSource()

void ON_3dmObjectAttributes::SetPlotWeightSource ( ON::plot_weight_source  )

◆ SetSectionAttributesSource()

void ON_3dmObjectAttributes::SetSectionAttributesSource ( ON::SectionAttributesSource  source)

◆ SetVisible()

void ON_3dmObjectAttributes::SetVisible ( bool  bVisible)

Description: Controls object visibility Parameters: bVisible - [in] true to make object visible, false to make object invisible See Also: ON_3dmObjectAttributes::IsVisible

◆ SizeOf()

unsigned int ON_3dmObjectAttributes::SizeOf ( ) const
overridevirtual

Returns: An estimate of the amount of memory the class uses in bytes.

Reimplemented from ON_Object.

◆ TopGroup()

int ON_3dmObjectAttributes::TopGroup ( ) const

Returns the index of the last group in the group list or -1 if the object is not in any groups

◆ Transform() [1/2]

bool ON_3dmObjectAttributes::Transform ( const ON_Geometry pOriginalGeometry,
const ON_Xform xform 
)

◆ Transform() [2/2]

bool ON_3dmObjectAttributes::Transform ( const ON_Xform xform)

Returns: True if successful. (xform is invertable or didn't need to be).

Deprecated:
Prefer the version that takes a const ON_Geometry* - for object frame support.

◆ UpdateReferencedComponents()

bool ON_3dmObjectAttributes::UpdateReferencedComponents ( const class ON_ComponentManifest source_manifest,
const class ON_ComponentManifest destination_manifest,
const class ON_ManifestMap manifest_map 
)
overridevirtual

Description: Uses the destination_manifest to update references to other components. This is typically done when a component's references came from a "source" context and are being updated to the "destination" context. For example, inserting one model into another when index, id, and name conflicts need to be resolved at the time of insertion. Parameters: source_manifest - [in] A manifest of the source context with indices and ids corresponding to the current component references. If this manifest is not available, pass ON_ComponentManifest::Empty. destination_manifest - [in] A manifest of the destination context with indices and ids corresponding to the desired component references. If this manifest is not available, pass ON_ComponentManifest::Empty. manifest_map - [in] A map from the source (current) referenced component index/id values to the destination (desired) component index/id values. Returns: True if successful. False indicates a referenced component was not found in the manifest and the reference was changed to a default value. Example: If this object is an ON_Layer, the line pattern and render material references are updated. If this object is an ON_DimStyle, the text style reference is updated. If this object is an ON_3dmObjectAttributes, the layer, material, line pattern, and group references are updated.

Reimplemented from ON_Object.

◆ Write()

bool ON_3dmObjectAttributes::Write ( ON_BinaryArchive binary_archive) const
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

Member Data Documentation

◆ DefaultAttributes

const ON_3dmObjectAttributes ON_3dmObjectAttributes::DefaultAttributes
static

◆ m_color

ON_Color ON_3dmObjectAttributes::m_color

If ON::color_from_object == ColorSource(), then m_color is the object's display color.

◆ m_display_order

int ON_3dmObjectAttributes::m_display_order = 0

Display order used to force objects to be drawn on top or behind each other 0 = draw object in standard depth buffered order <0 = draw object behind "normal" draw order objects >0 = draw object on top of "normal" draw order objects Larger number draws on top of smaller number.

◆ m_dmref

ON_SimpleArray<ON_DisplayMaterialRef> ON_3dmObjectAttributes::m_dmref

◆ m_layer_index

int ON_3dmObjectAttributes::m_layer_index = 0

Layer definitions in an OpenNURBS model are stored in a layer table. The layer table is conceptually an array of ON_Layer classes. Every OpenNURBS object in a model is on some layer. The object's layer is specified by zero based indices into the ON_Layer array.

◆ m_linetype_index

int ON_3dmObjectAttributes::m_linetype_index = -1

Linetype definitions in an OpenNURBS model are stored in a linetype table. The linetype table is conceptually an array of ON_Linetype classes. Every OpenNURBS object in a model references some linetype. The object's linetype is specified by zero based indices into the ON_Linetype array. index 0 is reserved for continuous linetype (no pattern)

◆ m_material_index

int ON_3dmObjectAttributes::m_material_index = -1

Rendering material: If you want something simple and fast, set m_material_index to the index of the rendering material and ignore m_rendering_attributes. If you are developing a high quality plug-in renderer, and a user is assigning one of your fabulous rendering materials to this object, then add rendering material information to the m_rendering_attributes.m_materials[] array.

Developers: As soon as m_rendering_attributes.m_materials[] is not empty, rendering material queries slow down. Do not populate m_rendering_attributes.m_materials[] when setting m_material_index will take care of your needs.

◆ m_name

ON_wString ON_3dmObjectAttributes::m_name

The m_name member is public to avoid breaking the SDK. Use SetName() and Name() for proper validation. OpenNURBS object have optional text names. More than one object in a model can have the same name and some objects may have no name. ON_ModelComponent::IsValidComponentName(m_name) should be true.

◆ m_object_decoration

ON::object_decoration ON_3dmObjectAttributes::m_object_decoration = ON::no_object_decoration

Used to indicate an object has a decoration (like an arrowhead on a curve)

◆ m_plot_color

ON_Color ON_3dmObjectAttributes::m_plot_color

If ON::plot_color_from_object == PlotColorSource(), then m_color is the object's display color.

◆ m_plot_weight_mm

double ON_3dmObjectAttributes::m_plot_weight_mm = 0

Plot weight in millimeters. =0.0 means use the default width <0.0 means don't plot (visible for screen display, but does not show on plot)

◆ m_rendering_attributes

ON_ObjectRenderingAttributes ON_3dmObjectAttributes::m_rendering_attributes

◆ m_space

ON::active_space ON_3dmObjectAttributes::m_space = ON::model_space

Starting with V4, objects can be in either model space or page space. If an object is in page space, then m_viewport_id is not nil and identifies the page it is on.

◆ m_url

ON_wString ON_3dmObjectAttributes::m_url

OpenNURBS objects may have an URL. There are no restrictions on what value this URL may have. As an example, if the object came from a commercial part library, the URL might point to the definition of that part.

◆ m_uuid

ON_UUID ON_3dmObjectAttributes::m_uuid = ON_nil_uuid

Every OpenNURBS object has a UUID (universally unique identifier). When an OpenNURBS object is added to a model, the value is checked. If the value is ON_nil_uuid, a new UUID is created. If the value is not ON_nil_uuid but it is already used by another object in the model, a new UUID is created. If the value is not ON_nil_uuid and it is not used by another object in the model, then that value persists. When an object is updated, by a move for example, the value of m_uuid persists.

◆ m_viewport_id

ON_UUID ON_3dmObjectAttributes::m_viewport_id = ON_nil_uuid

If m_viewport_id is ON_nil_uuid, the object is active in all viewports. If m_viewport_id is not ON_nil_uuid, then this object is only active in a specific view. This field is primarily used to assign page space objects to a specific page, but it can also be used to restrict model space to a specific view.

◆ m_wire_density

int ON_3dmObjectAttributes::m_wire_density = 1

When a surface object is displayed in wireframe, m_wire_density controls how many isoparametric wires are used.

@table value number of isoparametric wires -1 boundary wires 0 boundary and knot wires 1 boundary and knot wires and, if there are no interior knots, a single interior wire. N>=2 boundary and knot wires and (N-1) interior wires

◆ Unset

const ON_3dmObjectAttributes ON_3dmObjectAttributes::Unset
static