opennurbs_layer.h
1 /* $NoKeywords: $ */
2 /*
3 //
4 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
5 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
6 // McNeel & Associates.
7 //
8 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
9 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
10 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
11 //
12 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
13 //
14 ////////////////////////////////////////////////////////////////
15 */
16 
17 #if !defined(OPENNURBS_LAYER_INC_)
18 #define OPENNURBS_LAYER_INC_
19 
20 class ON_CLASS ON_Layer : public ON_ModelComponent
21 {
22  ON_OBJECT_DECLARE(ON_Layer);
23 
24 public:
25 
26  ON_Layer() ON_NOEXCEPT;
27  ~ON_Layer() = default;
28  ON_Layer(const ON_Layer&);
29  ON_Layer& operator=(const ON_Layer&) = default;
30 
31  static const ON_Layer Unset; // index = ON_UNSET_INT_INDEX, id = nil
32  static const ON_Layer Default; // index = -1, id set, unique and persistent
33 
34  /*
35  Parameters:
36  model_component_reference - [in]
37  none_return_value - [in]
38  value to return if ON_Layer::Cast(model_component_ref.ModelComponent())
39  is nullptr
40  Returns:
41  If ON_Layer::Cast(model_component_ref.ModelComponent()) is not nullptr,
42  that pointer is returned. Otherwise, none_return_value is returned.
43  */
44  static const ON_Layer* FromModelComponentRef(
45  const class ON_ModelComponentReference& model_component_reference,
46  const ON_Layer* none_return_value
47  );
48 
50  const class ON_ComponentManifest& source_manifest,
51  const class ON_ComponentManifest& destination_manifest,
52  const class ON_ManifestMap& manifest_map
53  ) override;
54 
55  //////////////////////////////////////////////////////////////////////
56  //
57  // ON_Object overrides
58  bool IsValid( class ON_TextLog* text_log = nullptr ) const override;
59 
60  void Dump( ON_TextLog& ) const override; // for debugging
61 
62  bool Write(
63  ON_BinaryArchive& // serialize definition to binary archive
64  ) const override;
65 
66  bool Read(
67  ON_BinaryArchive& // restore definition from binary archive
68  ) override;
69 
70  ON::object_type ObjectType() const override;
71 
72  //////////////////////////////////////////////////////////////////////
73  //
74  // Interface
75 
76  // The PER_VIEWPORT_SETTINGS enum defines
77  // the bits used to set masks in functions used
78  // to specify and query per viewport layer settings.
79  enum PER_VIEWPORT_SETTINGS : unsigned int
80  {
81  per_viewport_none = 0,
82 
83  per_viewport_id = 1,
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,
89 
90  per_viewport_all_settings = 0xFFFFFFFF
91  // (Developers: these values are used in file IO and must not be changed.)
92  };
93 
94  /*
95  Parameters:
96  viewport_id - [in]
97  If viewport_id is not nil, then checks for per viewport
98  settings for that specific viewport.
99  If viewport_id is nil, then checks for per viewport settings
100  in any viewport.
101  settings_mask - [in]
102  settings_mask is a bitfield that specifies which settings
103  to check for. The bits are defined in the
104  ON_Layer::PER_VIEWPORT_PROPERTIES enum. If you want to
105  determine if the layer has any per viewport settings,
106  then pass 0xFFFFFFFF.
107  Returns:
108  True if the layer has per viewport override for the specified
109  settings.
110  */
111  bool HasPerViewportSettings(
112  ON_UUID viewport_id,
113  unsigned int settings_mask
114  ) const;
115 
116  /*
117  Parameters:
118  viewport_id - [in]
119  If viewport_id is not nil, then checks for setting for
120  that specific viewport.
121  If viewport_id is nil, then checks for any viewport settings.
122  Returns:
123  True if the layer has per viewport settings.
124  */
125  bool HasPerViewportSettings(
126  const ON_UUID& viewport_id
127  ) const;
128 
129 
130  /*
131  Description:
132  Copies all per viewport settings for the source_viewport_id
133  Parameters:
134  source_viewport_id - [in]
135  viewport id to copy all per viewport settings from
136  destination_viewport_id - [in]
137  viewport od to copy all per viewport settings to
138  Returns:
139  True if the settings could be copied, False if no per-viewport
140  settings exist for the source viewport id
141  */
142  bool CopyPerViewportSettings(
143  ON_UUID source_viewport_id,
144  ON_UUID destination_viewport_id
145  );
146 
147 
148  /*
149  Description:
150  Copies specified per viewport settings from a source layer to this
151  layer.
152  Parameters:
153  source_layer - [in]
154  layer to copy settings from
155  viewport_id - [in]
156  viewport id to copy all per viewport settings from.
157  If viewport_id is nil, then the per viewport settings
158  for all viewports will be copied.
159  settings_mask - [in]
160  bits indicate which settings to copy
161  Use the ON_Layer PER_VIEWPORT_SETTINGS enum to
162  set the bits.
163  Returns:
164  True if the settings were copied, False if no per-viewport
165  settings exist for the specified viewport_id.
166  */
167  bool CopyPerViewportSettings(
168  const ON_Layer& source_layer,
169  ON_UUID viewport_id,
170  unsigned int settings_mask
171  );
172 
173  /*
174  Description:
175  Delete per viewport layer settings.
176  Parameters:
177  viewport_id - [in]
178  If viewport_id is not nil, then the settings for that
179  viewport are deleted. If viewport_id is nil, then all
180  per viewport settings are deleted.
181  */
182  void DeletePerViewportSettings(
183  const ON_UUID& viewport_id
184  ) const;
185 
186  /*
187  Description:
188  Cull unused per viewport layer settings.
189  Parameters:
190  viewport_id_count - [in]
191  viewport_id_list - [in]
192  Settings for any viewports NOT in the viewport_id_list[]
193  are culled.
194  */
195  void CullPerViewportSettings(
196  int viewport_id_count,
197  const ON_UUID* viewport_id_list
198  );
199 
200  /*
201  Description:
202  The PerViewportSettingsCRC() can be used to determine
203  when layers have different per viewport settings.
204  */
205  ON__UINT32 PerViewportSettingsCRC() const;
206 
207  /*
208  Description:
209  Set the color used by objects on this layer that do
210  not have a per object color set
211  Parameters:
212  layer_color - [in]
213  Passing ON_UNSET_COLOR will clear the settings.
214  viewport_id - [in]
215  If viewport_id is not nil, then the setting applies only
216  to the viewport with the specified id.
217  */
218  void SetColor( ON_Color layer_color ); // layer display color
219 
220  /*
221  Description:
222  Set the color used by objects on this layer that do
223  not have a per object color set
224  Parameters:
225  viewport_id - [in]
226  If viewport_id is not nil, then the setting applies only
227  to the viewport with the specified id.
228  layer_color - [in]
229  Passing ON_UNSET_COLOR will clear the settings.
230  */
231  void SetPerViewportColor( ON_UUID viewport_id, ON_Color layer_color );
232 
233  // /* use ON_Layer::SetPerViewportColor */
234  //ON_DEPRECATED void SetColor( ON_Color, const ON_UUID& );
235 
236  /*
237  Parameters:
238  viewport_id - [in]
239  If viewport_id is not nil, then the setting to use
240  for a specific viewport is returned.
241  Returns:
242  The color used by objects on this layer that do
243  not have a per object color set.
244  */
245  ON_Color Color() const;
246 
247  /*
248  Parameters:
249  viewport_id - [in]
250  If viewport_id is not nil, then the setting to use
251  for a specific viewport is returned.
252  Returns:
253  The color used by objects in the specified viewport and
254  on this layer that do not have a per object color set.
255  */
256  ON_Color PerViewportColor( ON_UUID viewport_id ) const;
257 
258  // /* use ON_Layer::PerViewportColor */
259  //ON_DEPRECATED ON_Color Color( const ON_UUID& ) const;
260 
261  /*
262  Description:
263  Remove any per viewport layer color setting so the
264  layer's overall setting will be used for all viewports.
265  Parameters:
266  viewport_id - [in]
267  If viewport_id is not nil, then the setting for this
268  viewport will be deleted. If viewport_id is nil,
269  the all per viewport layer color settings will be removed.
270  */
271  void DeletePerViewportColor( const ON_UUID& viewport_id );
272 
273  /*
274  Description:
275  Set the plotting color used by objects on this layer that do
276  not have a per object plotting color set
277  Parameters:
278  plot_color - [in]
279  Passing ON_UNSET_COLOR will clear the settings.
280  viewport_id - [in]
281  If viewport_id is not nil, then the setting applies only
282  to the viewport with the specified id.
283  */
284  void SetPlotColor( ON_Color plot_color ); // plotting color
285 
286  void SetPerViewportPlotColor( ON_UUID viewport_id, ON_Color plot_color );
287 
288  // /* use ON_Layer::SetPerViewportPlotColor */
289  //ON_DEPRECATED void SetPlotColor( ON_Color, const ON_UUID& );
290 
291  /*
292  Returns:
293  The plotting color used by objects on this layer that do
294  not have a per object color set.
295  */
296  ON_Color PlotColor() const;
297 
298  /*
299  Parameters:
300  viewport_id - [in]
301  If viewport_id is not nil, then the setting to use
302  for a specific viewport is returned.
303  Returns:
304  The plotting color used by objects on this layer that do
305  not have a per object color set.
306  */
307  ON_Color PerViewportPlotColor( ON_UUID viewport_id ) const;
308 
309  // /* use ON_Layer::PerViewportPlotColor */
310  //ON_DEPRECATED ON_Color PlotColor( const ON_UUID& ) const;
311 
312  /*
313  Description:
314  Remove any per viewport plot color setting so the
315  layer's overall setting will be used for all viewports.
316  Parameters:
317  viewport_id - [in]
318  If viewport_id is not nil, then the setting for this
319  viewport will be deleted. If viewport_id is nil,
320  the all per viewport plot color settings will be removed.
321  */
322  void DeletePerViewportPlotColor( const ON_UUID& viewport_id );
323 
324  /*
325  Description:
326  Set the index of the linetype used by objects on this layer that do
327  not have a per object lintypes
328  Parameters:
329  linetype_index - [in]
330  Passing -1 will clear the setting.
331  */
332  bool SetLinetypeIndex( int linetype_index );
333 
334  /*
335  Returns:
336  The index of the linetype used by objects on this layer that do
337  not have a per object linetype set.
338  */
339  int LinetypeIndex() const;
340 
341  /*
342  Returns:
343  Returns true if objects on layer are visible.
344  Remarks:
345  Does not inspect per viewport settings.
346  See Also:
347  ON_Layer::SetVisible
348  */
349  bool IsVisible() const;
350 
351  /*
352  Description:
353  Controls layer visibility
354  Parameters:
355  bVisible - [in] true to make layer visible,
356  false to make layer invisible
357  viewport_id - [in]
358  If viewport_id is not nil, then the setting applies only
359  to the viewport with the specified id.
360  See Also:
361  ON_Layer::IsVisible
362  */
363  void SetVisible( bool bVisible );
364 
365  /*
366  Description:
367  The persistent visbility setting is used for layers whose
368  visibilty can be changed by a "parent" object. A common case
369  is when a layer is a child layer (ON_Layer.m_parent_id is
370  not nil). In this case, when a parent layer is turned off,
371  then child layers are also turned off. The persistent
372  visibility setting determines what happens when the parent
373  is turned on again.
374  Returns:
375  true:
376  If this layer's visibility is controlled by a parent object
377  and the parent is turned on (after being off), then this
378  layer will also be turned on.
379  false:
380  If this layer's visibility is controlled by a parent object
381  and the parent layer is turned on (after being off), then
382  this layer will continue to be off.
383  Remarks:
384  When the persistent visbility is not explicitly set, this
385  function returns the current value of IsVisible().
386  See Also:
387  ON_Layer::SetPersistentVisibility
388  ON_Layer::UnsetPersistentVisibility
389  */
390  bool PersistentVisibility() const;
391 
392  /*
393  Description:
394  Set the persistent visibility setting for this layer.
395  Parameters:
396  bPersistentVisibility - [in]
397  persistent visibility setting for this layer.
398  Remarks:
399  See ON_Layer::PersistentVisibility for a detailed description
400  of persistent visibility.
401  See Also:
402  ON_Layer::PersistentVisibility
403  ON_Layer::UnsetPersistentVisibility
404  */
405  void SetPersistentVisibility( bool bPersistentVisibility );
406 
407  /*
408  Description:
409  Remove any explicit persistent visibility setting from this
410  layer. When persistent visibility is not explictly set,
411  the value of ON_Layer::IsVisible() is used.
412  Remarks:
413  See ON_Layer::PersistentVisibility for a detailed description
414  of persistent visibility.
415  See Also:
416  ON_Layer::PersistentVisibility
417  ON_Layer::SetPersistentVisibility
418  */
419  void UnsetPersistentVisibility();
420 
421  /*
422  Parameters:
423  viewport_id - [in]
424  If viewport_id is not nil, then the visibility setting
425  for that viewport is returned.
426 
427  If viewport_id is nil, the ON_Layer::IsVisible() is returned.
428  Returns:
429  Returns true if objects on layer are visible.
430  */
431  bool PerViewportIsVisible( ON_UUID viewport_id ) const;
432 
433  /*
434  Description:
435  Controls layer visibility in specific viewports.
436  Parameters:
437  viewport_id - [in]
438  If viewport_id is not nil, then the setting applies only
439  to the viewport with the specified id. If viewport_id
440  is nil, then the setting applies to all viewports with
441  per viewport layer settings.
442  bVisible - [in] true to make layer visible,
443  false to make layer invisible
444  See Also:
445  ON_Layer::IsVisibleInViewport()
446  */
447  void SetPerViewportVisible(
448  ON_UUID viewport_id,
449  bool bVisible
450  );
451 
452  // /* use ON_Layer::SetPerViewportVisible */
453  // ON_DEPRECATED void SetVisible( bool, const ON_UUID& );
454 
455  /*
456  Parameters:
457  viewport_id - [in]
458  id of a viewport. If viewport_id is nil, then
459  ON_Layer::PersistentVisibility() is returned.
460  Returns:
461  true:
462  If this layer's visibility in the specified viewport is
463  controlled by a parent object and the parent is turned on
464  (after being off), then this layer will also be turned on
465  in the specified viewport.
466  false:
467  If this layer's visibility in the specified viewport is
468  controlled by a parent object and the parent layer is
469  turned on (after being off), then this layer will continue
470  to be off in the specified viewport.
471  Remarks:
472  See ON_Layer::SetPersistentVisibility
473  for a description of persistent visibility.
474  See Also:
475  ON_Layer::SetPerViewportPersistentVisibility
476  */
477  bool PerViewportPersistentVisibility( ON_UUID viewport_id ) const;
478 
479  /*
480  Description:
481  This function allows per viewport setting the
482  child visibility property.
483  Parameters
484  viewport_id - [in]
485  bPersistentVisibility - [in]
486  Remarks:
487  See ON_Layer::SetPersistentVisibility
488  for a description of the child visibility property.
489  See Also:
490  ON_Layer::SetPersistentVisibility
491  */
492  void SetPerViewportPersistentVisibility( ON_UUID viewport_id, bool bPersistentVisibility );
493 
494  void UnsetPerViewportPersistentVisibility( ON_UUID viewport_id );
495 
496  /*
497  Description:
498  Remove any per viewport visibility setting so the
499  layer's overall setting will be used for all viewports.
500  Parameters:
501  viewport_id - [in]
502  If viewport_id is not nil, then the setting for this
503  viewport will be deleted. If viewport_id is nil,
504  the all per viewport visibility settings will be removed.
505  */
506  void DeletePerViewportVisible( const ON_UUID& viewport_id );
507 
508  /*
509  Description:
510  Get a list of the viewport ids of viewports that
511  that have per viewport visibility settings that
512  override the default layer visibility setting
513  ON_Layer::m_bVisible.
514  Parameters:
515  viewport_id_list - [out]
516  List of viewport id's that have a per viewport visibility
517  setting. If the returned list is empty, then there
518  are no per viewport visibility settings.
519  Returns:
520  Number of ids added to the list.
521  */
522  void GetPerViewportVisibilityViewportIds(
523  ON_SimpleArray<ON_UUID>& viewport_id_list
524  ) const;
525 
526  /*
527  Description:
528  Controls layer locked
529  Parameters:
530  bLocked - [in] True to lock layer
531  False to unlock layer
532  See Also:
533  ON_Layer::IsLocked
534  */
535  void SetLocked( bool bLocked );
536 
537  /*
538  Description:
539  The persistent locking setting is used for layers that can
540  be locked by a "parent" object. A common case is when a layer
541  is a child layer (ON_Layer.m_parent_id is not nil). In this
542  case, when a parent layer is locked, then child layers are
543  also locked. The persistent locking setting determines what
544  happens when the parent is unlocked again.
545  Returns:
546  true:
547  If this layer's locking is controlled by a parent object
548  and the parent is unlocked (after being locked), then this
549  layer will also be unlocked.
550  false:
551  If this layer's locking is controlled by a parent object
552  and the parent layer is unlocked (after being locked), then
553  this layer will continue to be locked.
554  Remarks:
555  When the persistent locking is not explicitly set, this
556  function returns the current value of IsLocked().
557  See Also:
558  ON_Layer::SetPersistentLocking
559  ON_Layer::UnsetPersistentLocking
560  */
561  bool PersistentLocking() const;
562 
563  /*
564  Description:
565  Set the persistent locking setting for this layer.
566  Parameters:
567  bPersistentLocking - [in]
568  persistent locking for this layer.
569  Remarks:
570  See ON_Layer::PersistentLocking for a detailed description of
571  persistent locking.
572  See Also:
573  ON_Layer::PersistentLocking
574  ON_Layer::UnsetPersistentLocking
575  */
576  void SetPersistentLocking(bool bPersistentLocking);
577 
578  /*
579  Description:
580  Remove any explicity persistent locking settings from this
581  layer.
582  Remarks:
583  See ON_Layer::PersistentLocking for a detailed description of
584  persistent locking.
585  See Also:
586  ON_Layer::PersistentLocking
587  ON_Layer::SetPersistentLocking
588  */
589  void UnsetPersistentLocking();
590 
591  /*
592  Returns:
593  Value of (IsVisible() && !IsLocked()).
594  */
595  bool IsVisibleAndNotLocked() const;
596 
597  /*
598  Returns:
599  Value of (IsVisible() && IsLocked()).
600  */
601  bool IsVisibleAndLocked() const;
602 
603  //////////
604  // Index of render material for objects on this layer that have
605  // MaterialSource() == ON::material_from_layer.
606  // A material index of -1 indicates no material has been assigned
607  // and the material created by the default ON_Material constructor
608  // should be used.
609  bool SetRenderMaterialIndex( int ); // index of layer's rendering material
610  int RenderMaterialIndex() const;
611 
612  bool SetIgesLevel( int ); // IGES level for this layer
613  int IgesLevel() const;
614 
615  /*
616  Description:
617  Get the weight (thickness) of the plotting pen.
618  Returns:
619  Thickness of the plotting pen in millimeters.
620  A thickness of 0.0 indicates the "default" pen weight should be used.
621  A thickness of -1.0 indicates the layer should not be printed.
622  */
623  double PlotWeight() const;
624 
625  double PerViewportPlotWeight( ON_UUID viewport_id ) const;
626 
627  // /* use ON_Layer::PerViewportPlotWeight */
628  // ON_DEPRECATED double PlotWeight( const ON_UUID& ) const;
629 
630  /*
631  Description:
632  Set the weight of the plotting pen.
633  Parameters:
634  plot_weight_mm - [in] Set the thickness of the plotting pen in millimeters.
635  0.0 means use the default pen width which is a Rhino app setting.
636  -1.0 means layer does not print (still displays on the screen)
637  */
638  void SetPlotWeight(double plot_weight_mm);
639 
640  /*
641  Description:
642  Set the weight of the plotting pen.
643  Parameters:
644  plot_weight_mm - [in] Set the thickness of the plotting pen in millimeters.
645  0.0 means use the default pen width which is a Rhino app setting.
646  -1.0 means layer does not print (still displays on the screen)
647  */
648  void SetPerViewportPlotWeight(ON_UUID viewport_id, double plot_weight_mm);
650  // /* use ON_Layer::SetPerViewportPlotWeight */
651  // ON_DEPRECATED void SetPlotWeight(double, const ON_UUID& );
653  /*
654  Description:
655  Remove any per viewport plot weight setting so the
656  layer's overall setting will be used for all viewports.
657  Parameters:
658  viewport_id - [in]
659  If viewport_id is not nil, then the setting for this
660  viewport will be deleted. If viewport_id is nil,
661  the all per viewport plot weight settings will be removed.
662  */
663  void DeletePerViewportPlotWeight( const ON_UUID& viewport_id );
665  /*
666  Description:
667  Use UpdateViewportIds() to change viewport ids in situations
668  like merging when a viewport id conflict requires the viewport
669  ids in a file to be changed.
670  Returns:
671  Number of viewport ids that were updated.
672  */
673  int UpdateViewportIds(
674  const ON_UuidPairList& viewport_id_map
675  );
676 
677 public:
678 
679  // Layers are origanized in a hierarchical
680  // structure (like file folders).
681  // If a layer is in a parent layer,
682  // then m_parent_layer_id is the id of
683  // the parent layer.
684  ON_UUID ParentLayerId() const;
685 
686  void SetParentLayerId(
687  ON_UUID parent_layer_id
688  );
689 
690  int m_iges_level = -1; // IGES level number if this layer was made during IGES import
691 
692  // Rendering material:
693  // If you want something simple and fast, set
694  // m_material_index to the index of your rendering material
695  // and ignore m_rendering_attributes.
696  // If you are developing a fancy plug-in renderer, and a user is
697  // assigning one of your fabulous rendering materials to this
698  // layer, then add rendering material information to the
699  // m_rendering_attributes.m_materials[] array.
700  //
701  // Developers:
702  // As soon as m_rendering_attributes.m_materials[] is not empty,
703  // rendering material queries slow down. Do not populate
704  // m_rendering_attributes.m_materials[] when setting
705  // m_material_index will take care of your needs.
706  int m_material_index = -1;
707  ON_RenderingAttributes m_rendering_attributes;
708 
709  int m_linetype_index = -1; // index of linetype
710 
711  // Layer display attributes.
712  // If m_display_material_id is nil, then m_color is the layer color
713  // and defaults are used for all other display attributes.
714  // If m_display_material_id is not nil, then some complicated
715  // scheme is used to decide what objects on this layer look like.
716  // In all cases, m_color is a good choice if you don't want to
717  // deal with m_display_material_id. In Rhino, m_display_material_id
718  // is used to identify a registry entry that contains user specific
719  // display preferences.
720  ON_Color m_color = ON_Color::Black;
721  ON_UUID m_display_material_id = ON_nil_uuid;
722 
723  // Layer printing (plotting) attributes.
724  ON_Color m_plot_color = ON_Color::UnsetColor; // printing color
725  // ON_UNSET_COLOR means use layer color
726  double m_plot_weight_mm = 0.0; // printing pen thickness in mm
727  // 0.0 means use the default width (a Rhino app setting)
728  // -1.0 means layer does not print (still visible on screen)
729 
730  bool m_bExpanded = true; // If true, when the layer table is displayed in
731  // a tree control then the list of child layers is
732  // shown in the control.
733 
734 private:
735  // The following information may not be accurate and is subject
736  // to change at any time.
737  //
738  // m_extension_bits & 0x01:
739  // The value of ( m_extension_bits & 0x01) is used to speed
740  // common per viewport visiblity and color queries.
741  // 0x00 = there may be per viewport settings on this layer.
742  // 0x01 = there are no per viewport settings on this layer.
743  //
744  // m_extension_bits & 0x06:
745  // The value of ( m_extension_bits & 0x06) is the persistent
746  // visibility setting for this layer.
747  // 0x00 = no persistent visibility setting
748  // 0x02 = persistent visibility = true
749  // 0x04 = persistent visibility = false
750  // 0x06 = invalid value - treated as 0x00
751  //
752  // m_extension_bits & 0x18:
753  // The value of ( m_extension_bits & 0x18) is the persistent
754  // locking setting for this layer.
755  // 0x00 = no persistent locking setting
756  // 0x08 = persistent locking = true
757  // 0x10 = persistent locking = false
758  // 0x18 = invalid value - treated as 0x00
759  ON__UINT8 m_extension_bits = 0;
760  ON__UINT16 m_reserved = 0;
761 
762 private:
763  ON__UINT_PTR m_reserved_ptr = 0;
764 };
765 
766 #if defined(ON_DLL_TEMPLATE)
767 ON_DLL_TEMPLATE template class ON_CLASS ON_SimpleArray<ON_Layer*>;
768 ON_DLL_TEMPLATE template class ON_CLASS ON_ObjectArray<ON_Layer>;
769 #endif
770 
771 #endif
772 
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