17 #if !defined(OPENNURBS_LAYER_INC_) 18 #define OPENNURBS_LAYER_INC_ 44 static const ON_Layer* FromModelComponentRef(
81 per_viewport_none = 0,
84 per_viewport_color = 2,
85 per_viewport_plot_color = 4,
86 per_viewport_plot_weight = 8,
87 per_viewport_visible = 16,
88 per_viewport_persistent_visibility = 32,
90 per_viewport_all_settings = 0xFFFFFFFF
111 bool HasPerViewportSettings(
113 unsigned int settings_mask
125 bool HasPerViewportSettings(
142 bool CopyPerViewportSettings(
144 ON_UUID destination_viewport_id
167 bool CopyPerViewportSettings(
170 unsigned int settings_mask
182 void DeletePerViewportSettings(
195 void CullPerViewportSettings(
196 int viewport_id_count,
197 const ON_UUID* viewport_id_list
205 ON__UINT32 PerViewportSettingsCRC()
const;
218 void SetColor(
ON_Color layer_color );
271 void DeletePerViewportColor(
const ON_UUID& viewport_id );
284 void SetPlotColor(
ON_Color plot_color );
286 void SetPerViewportPlotColor(
ON_UUID viewport_id,
ON_Color plot_color );
322 void DeletePerViewportPlotColor(
const ON_UUID& viewport_id );
332 bool SetLinetypeIndex(
int linetype_index );
339 int LinetypeIndex()
const;
349 bool IsVisible()
const;
363 void SetVisible(
bool bVisible );
390 bool PersistentVisibility()
const;
405 void SetPersistentVisibility(
bool bPersistentVisibility );
419 void UnsetPersistentVisibility();
431 bool PerViewportIsVisible(
ON_UUID viewport_id )
const;
447 void SetPerViewportVisible(
477 bool PerViewportPersistentVisibility(
ON_UUID viewport_id )
const;
492 void SetPerViewportPersistentVisibility(
ON_UUID viewport_id,
bool bPersistentVisibility );
494 void UnsetPerViewportPersistentVisibility(
ON_UUID viewport_id );
506 void DeletePerViewportVisible(
const ON_UUID& viewport_id );
522 void GetPerViewportVisibilityViewportIds(
535 void SetLocked(
bool bLocked );
561 bool PersistentLocking()
const;
576 void SetPersistentLocking(
bool bPersistentLocking);
589 void UnsetPersistentLocking();
595 bool IsVisibleAndNotLocked()
const;
601 bool IsVisibleAndLocked()
const;
609 bool SetRenderMaterialIndex(
int );
610 int RenderMaterialIndex()
const;
612 bool SetIgesLevel(
int );
613 int IgesLevel()
const;
623 double PlotWeight()
const;
625 double PerViewportPlotWeight(
ON_UUID viewport_id )
const;
638 void SetPlotWeight(
double plot_weight_mm);
648 void SetPerViewportPlotWeight(
ON_UUID viewport_id,
double plot_weight_mm);
663 void DeletePerViewportPlotWeight(
const ON_UUID& viewport_id );
673 int UpdateViewportIds(
686 void SetParentLayerId(
690 int m_iges_level = -1;
706 int m_material_index = -1;
709 int m_linetype_index = -1;
721 ON_UUID m_display_material_id = ON_nil_uuid;
726 double m_plot_weight_mm = 0.0;
730 bool m_bExpanded =
true;
759 ON__UINT8 m_extension_bits = 0;
760 ON__UINT16 m_reserved = 0;
763 ON__UINT_PTR m_reserved_ptr = 0;
766 #if defined(ON_DLL_TEMPLATE) ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
The ON_ModelComponent class is a base class for all components in a model and manages the index...
Definition: opennurbs_model_component.h:24
virtual bool UpdateReferencedComponents(const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
Uses the destination_manifest to update references to other components. This is typically done when a...
void Dump(ON_TextLog &) const override
Creates a text dump of the object.
ON_ManifestIdentificationMap is used to record a map from a source manifest to a destination manifest...
Definition: opennurbs_archive.h:1464
static const ON_Layer Default
Definition: opennurbs_layer.h:32
bool IsValid(class ON_TextLog *text_log=nullptr) const override
Tests an object to see if its data members are correctly initialized.
ON_Object array is used to store lists of classes that are derived from ON_Object. It differs from ON_ClassArray in that the virtual ON_Object::MemoryRelocate function is called when growing the dynamic array requires changing the location of the memory buffer used to store the elements in the array.
Definition: opennurbs_array.h:725
virtual ON::object_type ObjectType() const
Useful for switch statements that need to differentiate between basic object types like points...
static const ON_Color UnsetColor
Definition: opennurbs_color.h:32
Definition: opennurbs_color.h:24
Definition: opennurbs_layer.h:20
Definition: opennurbs_rendering.h:21
static const ON_Layer Unset
Definition: opennurbs_layer.h:31
PER_VIEWPORT_SETTINGS
Definition: opennurbs_layer.h:77
Definition: opennurbs_archive.h:478
Definition: opennurbs_textlog.h:20
Definition: opennurbs_archive.h:1783
The ON_UuidPairList class provides a tool to efficiently maintain a list of uuid pairs and determine ...
Definition: opennurbs_array.h:1214
ON_ModelComponent & operator=(const ON_ModelComponent &source)
virtual bool Read(ON_BinaryArchive &binary_archive)
Low level archive writing tool used by ON_BinaryArchive::ReadObject().
Definition: opennurbs_model_component.h:1622
virtual bool Write(ON_BinaryArchive &binary_archive) const
Low level archive writing tool used by ON_BinaryArchive::WriteObject().
static const ON_Color Black
Definition: opennurbs_color.h:33