openNURBS SDK Help  6.0
opennurbs_3dm_settings.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_3DM_SETTINGS_INC_)
18 #define OPENNURBS_3DM_SETTINGS_INC_
19 
20 
21 ///////////////////////////////////////////////////////////////////////
22 //
23 // units and tolerances
24 //
25 
27 {
28 public:
29  // The default constructor set units to millimeters and tolerance = 0.001mm
30  ON_3dmUnitsAndTolerances() = default;
31  ~ON_3dmUnitsAndTolerances() = default;
32 
34  ON_3dmUnitsAndTolerances& operator=(const ON_3dmUnitsAndTolerances&) = default;
35 
36  bool Read( ON_BinaryArchive& );
37  bool Write( ON_BinaryArchive& ) const;
38 
39  void Dump( ON_TextLog& ) const;
40 
41  /*
42  Returns:
43  True if tolerances (m_absolute_tolerance, m_angle_tolerance, m_relative_tolerance)
44  are set to valid values.
45  */
46  bool TolerancesAreValid() const;
47 
48  /*
49  Description:
50  If m_absolute_tolerance is not set to a valid value, it is set
51  to ON_3dmUnitsAndTolerances::DefaultValue.m_absolute_tolerance.
52  If m_angle_tolerance is not set to a valid value, it is set
53  to ON_3dmUnitsAndTolerances::DefaultValue.m_angle_tolerance.
54  If m_relative_tolerance is not set to a valid value, it is set
55  to ON_3dmUnitsAndTolerances::DefaultValue.m_relative_tolerance.
56  Returns:
57  0: all tolerances were valid
58  0 != (rc & 1):
59  m_absolute_tolerance was invalid and set to the default value
60  0 != (rc & 2):
61  m_angle_tolerance was invalid and set to the default value
62  0 != (rc & 4):
63  m_relative_tolerance was invalid and set to the default value
64  */
65  unsigned int SetInvalidTolerancesToDefaultValues();
66 
67  //////////
68  // Returns scale factor that needs to be applied to change from
69  // the argument's unit system to m_unit_system.
70  // When m_unit_system is not ON::LengthUnitSystem::CustomUnits,
71  // Scale(us) = ON::UnitScale(us,m_unit_system). When Scale(us)
72  // When m_unit_system is ON::LengthUnitSystem::CustomUnits,
73  // Scale(us) = ON::UnitScale(us,ON::LengthUnitSystem::Meters)*m_custom_unit_scale.
74  double Scale( ON::LengthUnitSystem ) const;
75 
77 
78  double m_absolute_tolerance = 0.001; // in units > 0.0
79  double m_angle_tolerance = ON_PI/180.0; // in radians > 0.0 and <= ON_PI
80  double m_relative_tolerance = 0.01; // fraction > 0.0 and < 1.0
81 
82  ON::OBSOLETE_DistanceDisplayMode m_distance_display_mode = ON::OBSOLETE_DistanceDisplayMode::Decimal; // decimal or fractional
83  int m_distance_display_precision = 3; // decimal mode: number of decimal places
84  // fractional modes:
85  // denominator = (1/2)^m_distance_display_precision
86 
87 public:
88  /*
89  DefaultValue
90  m_unit_system ON::LengthUnitSystem::Millimeters
91  m_absolute_tolerance 0.001
92  m_angle_tolerance pi/180 = 1 degree
93  m_relative_tolerance 0.01 = 1%
94  m_distance_display_mode ON::OBSOLETE_DistanceDisplayMode::Decimal
95  m_distance_display_precision 3
96  */
98 };
99 
100 ///////////////////////////////////////////////////////////////////////
101 //
102 // Model settings
103 // render mesh defaults
104 // viewports
105 // construction planes
106 //
107 
109 {
110 public:
111  ON_3dmAnnotationSettings() = default;
112  ~ON_3dmAnnotationSettings() = default;
114  ON_3dmAnnotationSettings& operator=(const ON_3dmAnnotationSettings&) = default;
115 
117 
118  bool Read( ON_BinaryArchive& );
119  bool Write( ON_BinaryArchive& ) const;
120 
121  void Dump( ON_TextLog& text_log ) const;
122 
123  // these are the running defaults for making dimensions
124  // they are also the things written to the 3dm file as dimension settings
125  double m_dimscale = 1.0; // model size / plotted size
126  double m_textheight = 1.0;
127  double m_dimexe = 1.0;
128  double m_dimexo = 1.0;
129  double m_arrowlength = 1.0;
130  double m_arrowwidth = 1.0;
131  double m_centermark = 1.0;
132 
133  /*
134  Returns:
135  Value of m_world_view_text_scale;
136  */
137  double WorldViewTextScale() const;
138 
139  /*
140  Parameters:
141  world_view_text_scale - [in]
142  Sets value of m_world_view_text_scale.
143  */
144  void SetWorldViewTextScale(double world_view_text_scale );
145 
146  /*
147  Returns:
148  Value of m_world_view_hatch_scale;
149  */
150  double WorldViewHatchScale() const;
151 
152  /*
153  Parameters:
154  world_view_hatch_scale - [in]
155  Sets value of m_world_view_hatch_scale.
156  */
157  void SetWorldViewHatchScale(double world_view_hatch_scale );
158 
159 
160  /*
161  Returns:
162  Value of m_b_V5_EnableAnnotationScaling;
163  */
164  bool Is_V5_AnnotationScalingEnabled() const;
165 
166  /*
167  Parameters:
168  bEnable - [in]
169  Sets value of m_b_V5_EnableAnnotationScaling.
170  */
171  void Enable_V5_AnnotationScaling(bool bEnable);
172 
173  /*
174  Parameters:
175  bEnable - [in]
176  Sets value of m_bEnableModelSpaceAnnotationScaling.
177  */
178  void EnableModelSpaceAnnotationScaling(bool bEnable);
179 
180  /*
181  Returns:
182  Value of m_bEnableModelSpaceAnnotationScaling;
183  */
184  bool IsModelSpaceAnnotationScalingEnabled() const;
185 
186  /*
187  Parameters:
188  bEnable - [in]
189  Sets value of m_bEnableLayoutSpaceAnnotationScaling.
190  */
191  void EnableLayoutSpaceAnnotationScaling(bool bEnable);
192 
193  /*
194  Returns:
195  Value of m_bEnableLayoutSpaceAnnotationScaling;
196  */
197  bool IsLayoutSpaceAnnotationScalingEnabled() const;
198 
199  /*
200  Returns:
201  Value of m_bEnableHatchScaling;
202  */
203  bool IsHatchScalingEnabled() const;
204 
205  /*
206  Parameters:
207  bEnable - [in]
208  Sets value of m_bEnableHatchScaling.
209  */
210  void EnableHatchScaling( bool bEnable );
211 
212  // Present but not used in V4 or V5 - removed 5 August 2010 to make room
213  // for m_world_view_text_scale and m_bEnableAnnotationScaling
214  //// added 12/28/05 LW
215  //double m_dimdle;
216  //double m_dimgap;
217 private:
218  // If m_bEnableAnnotationScaling is true,
219  // and ON_OBSOLETE_V5_Annotation::m_annotative_scale is true,
220  // and ON_OBSOLETE_V5_Annotation::m_type == ON::dtTextBlock,
221  // and the text object is being displayed in a world
222  // view (not a detail view and not a page view),
223  // then the text will be scaled by m_world_view_text_scale.
224  // The default is 1.0. Values <= 0.0 are not valid.
225  float m_world_view_text_scale = 1.0f;
226  float m_world_view_hatch_scale = 1.0f;
227 
228 private:
229  // If m_bEnableAnnotationScaling is false:
230  // * m_world_view_text_scale is ignored.
231  // * text is not scaled.
232  // * ON_DimStyle::DimScale() determines the scale
233  // applied to all other annotation objects in all
234  // types of views.
235  // * The value of ON_DetailView::m_page_per_model_ratio
236  // is applied to all objects (annotation and geometry)
237  // in the detail view.
238  //
239  // If m_bEnableAnnotationScaling is true:
240  // * m_world_view_text_scale is used as described above.
241  // * ON_DimStyle::DimScale() determines the scale
242  // applied to all non text annotation objects in
243  // world views.
244  // * ON_DimStyle::DimScale() is ignored in page and
245  // detail views.
246  // * ON_DetailView::m_page_per_model_ratio is ingored
247  // for annotation objects in detail views, other
248  // geometry is scaled.
249  //
250  // Default is true.
251  unsigned char m_b_V5_EnableAnnotationScaling = 1;
252 
253  // [Lowell 3-28-2013] New fields for V6
254  unsigned char m_bEnableModelSpaceAnnotationScaling = 1;
255  unsigned char m_bEnableLayoutSpaceAnnotationScaling = 1;
256 
257  unsigned char m_bEnableHatchScaling = 1;
258 
259 private:
260  ON__UINT32 m_reserved1 = 0;
261  ON__UINT8 m_reserved2 = 0;
262  ON__UINT8 m_reserved3 = 0;
263  ON__UINT8 m_reserved4 = 0;
264 
265 public:
266  ON::LengthUnitSystem m_dimunits = ON::LengthUnitSystem::None; // units used to measure the dimension
267  int m_arrowtype = 0; // 0: filled narrow triangular arrow (= ((ON_Arrowhead::arrow_type enum value as int ) - 2))
268  int m_angularunits = 0; // 0: degrees, 1: radians
269  int m_lengthformat = 0; // 2 = ON_DimStyle::LengthDisplay::FeetAndInches, treat everything else as ON_DimStyle::LengthDisplay::ModelUnits
270  int m_angleformat = 0; // 0: decimal degrees, ... ( ON_DimStyle::angle_format enum as int )
271 
272  //ON_INTERNAL_OBSOLETE::V5_TextDisplayMode m_settings_textalign; // In V2 files - 0: above line, 1: in line, 2: horizontal
273  // // After V2 files - 0: normal (converts to above_line), 1: horizontal, 2: above_line, 3: in_line
274 
275  int m_resolution = 0; // depends on m_lengthformat
276  // for decimal, digits past the decimal point
277 
278  ON_wString m_facename; // [LF_FACESIZE] // windows font name
279 };
280 
281 //////////////////////////////////////////////////////////////////////////////////////////
282 //
283 // ON_3dmConstructionPlaneGridDefaults
284 //
285 // Default settings used for construction plane grids
287 {
288 public:
293 
295 
296  bool Write( ON_BinaryArchive& ) const;
297  bool Read( ON_BinaryArchive& );
298 
299  void Dump( ON_TextLog& text_log ) const;
300 
301  double m_grid_spacing = 1.0; // distance between grid lines
302  double m_snap_spacing = 1.0; // when "grid snap" is enabled, the
303  // distance between snap points. Typically
304  // this is the same distance as grid spacing.
305  int m_grid_line_count = 70; // number of grid lines in each direction
306  int m_grid_thick_frequency = 5; // thick line frequency
307  // 0: none,
308  // 1: all lines are thick,
309  // 2: every other is thick, ...
310 
311  bool m_bShowGrid = true;
312  bool m_bShowGridAxes = true;
313  bool m_bShowWorldAxes = true;
314 };
315 
316 //////////////////////////////////////////////////////////////////////////////////////////
317 //
318 // ON_3dmConstructionPlane
319 //
321 {
322 public:
325 
326  ON_3dmConstructionPlane(const ON_Plane& plane);
327 
328  // default copy constructor and operator= work fine
329  //ON_3dmConstructionPlane(const ON_3dmConstructionPlane&);
330  //ON_3dmConstructionPlane& operator=(const ON_3dmConstructionPlane&);
331 
332  void Default();
333 
334  bool Write( ON_BinaryArchive& ) const;
335  bool Read( ON_BinaryArchive& );
336 
337  void Dump( ON_TextLog& text_log ) const;
338 
340 
341  // construction grid appearance
342  double m_grid_spacing; // distance between grid lines
343  double m_snap_spacing; // when "grid snap" is enabled, the
344  // distance between snap points. Typically
345  // this is the same distance as grid spacing.
346  int m_grid_line_count; // number of grid lines in each direction
347  int m_grid_thick_frequency; // thick line frequency
348  // 0: none,
349  // 1: all lines are thick,
350  // 2: every other is thick, ...
351  bool m_bDepthBuffer; // false=grid is always drawn behind 3d geometry
352  // true=grid is drawn at its depth as a 3d plane
353  // and grid lines obscure things behind the grid.
354 
356 };
357 
358 #if defined(ON_DLL_TEMPLATE)
359 ON_DLL_TEMPLATE template class ON_CLASS ON_ClassArray<ON_3dmConstructionPlane>;
360 #endif
361 
362 //////////////////////////////////////////////////////////////////////////////////////////
363 //
364 // ON_3dmViewPosition
365 //
366 class ON_CLASS ON_3dmViewPosition
367 {
368 public:
369  // view window relative position and state in parent frame
373  ON_3dmViewPosition& operator=(const ON_3dmViewPosition&);
374 
375  void Default();
376 
377  bool Write( ON_BinaryArchive& ) const;
378  bool Read( ON_BinaryArchive& );
379 
380  // relative position of view window in main frame
381  // if m_floating_viewport>0, this is relative position of the view window
382  // on the virtual screen (union of potentially multiple monitors)
383  double m_wnd_left; // 0.0 to 1.0
384  double m_wnd_right;
385  double m_wnd_top;
386  double m_wnd_bottom;
387 
388  bool m_bMaximized; // true if view window is maximized
389 
390  // m_floating_viewport is used to track floating viewport information.
391  // 0 = the view is docked in the main application window.
392  // >0 = the view is floating. When floating, this corresponds to the
393  // number of monitors on on the user's computer when the file was saved
394  unsigned char m_floating_viewport;
395 private:
396  // reserved for future use
397  unsigned char m_reserved_1;
398  unsigned char m_reserved_2;
399  unsigned char m_reserved_3;
400 };
401 
402 //////////////////////////////////////////////////////////////////////////////////////////
403 //
404 // ON_3dmViewTraceImage
405 //
406 class ON_CLASS ON_3dmViewTraceImage
407 {
408 public:
411  bool operator==( const ON_3dmViewTraceImage& ) const;
412  bool operator!=( const ON_3dmViewTraceImage& ) const;
413 
414  void Default();
415 
416  bool Write( ON_BinaryArchive& ) const;
417  bool Read( ON_BinaryArchive& );
418 
419  // view window relative position and state in parent frame
421  double m_width;
422  double m_height;
423 
425 
426  bool m_bGrayScale; // true if image should be black and white
427  bool m_bHidden; // true if image is currently hidden from view
428  bool m_bFiltered; // true if image should be filtered (bilinear) before displayed.
429 };
430 
431 
432 //////////////////////////////////////////////////////////////////////////////////////////
433 //
434 // ON_3dmViewTraceImage
435 //
436 class ON_CLASS ON_3dmWallpaperImage
437 {
438 public:
441  bool operator==( const ON_3dmWallpaperImage& ) const;
442  bool operator!=( const ON_3dmWallpaperImage& ) const;
443 
444  void Default();
445 
446  bool Write( ON_BinaryArchive& ) const;
447  bool Read( ON_BinaryArchive& );
448 
450 
451  bool m_bGrayScale; // true if image should be black and white
452  bool m_bHidden; // true if image is currently hidden from view
453 };
454 
455 //////////////////////////////////////////////////////////////////////////////////////////
456 //
457 // ON_3dmView
458 //
459 
460 class ON_CLASS ON_3dmPageSettings
461 {
462 public:
465 
466  bool IsValid( ON_TextLog* text_log = 0 ) const;
467 
468  void Default();
469 
471 
472  // Overall size of the page in millimeters
473  double m_width_mm;
474  double m_height_mm;
475 
476  // Page margins in millimeters
481 
483 
484  bool Write(ON_BinaryArchive& archive) const;
485  bool Read(ON_BinaryArchive& archive);
486 };
487 
489 {
490 public:
491  static const ON_UUID Wireframe; // {1311ADCB-D89E-4051-A3F0-F64441FB8EC6}
492  static const ON_UUID Shaded; // {8BC8DEBE-C83B-4c47-B13C-9DB074510CAC}
493  static const ON_UUID Rendered; // {CAE60BAE-2D51-4299-ABF7-A339FCA86F3B}
494  static const ON_UUID Ghosted; // {FF608B97-81D3-4186-831C-41F7DC140881}
495  static const ON_UUID XrayShade; // {B5C19D5D-0AEC-4ff7-A10E-E052E660263A}
496  static const ON_UUID RenderedShadows; // {A5545314-9D87-428d-95AE-91052EEAD0FA}
497  static const ON_UUID Technical; // {63612C72-778F-4afd-B81B-17426FDFE8A6}
498  static const ON_UUID Artistic; // {B46AB226-05A0-4568-B454-4B1AB721C675}
499  static const ON_UUID Pen; // {F4616FA5-A831-4620-A97E-9B807D5EC376}
500  static const ON_UUID AmbientOcclusion; // {C32B72C3-41BD-4ADC-82A8-B7AEF4456A37}
501  static const ON_UUID Raytraced; // {69E0C7A5-1C6A-46C8-B98B-8779686CD181}
502 
503  /*
504  Parameters:
505  id - [in]
506  Returns:
507  True if id is one of the standard display modes listed above.
508  */
509  static bool IsStandardDisplayModeId(
510  ON_UUID id
511  );
512 
513  /*
514  Parameters:
515  id - [in]
516  Returns:
517  The legacy V3 display mode enum that is the closest match to
518  the display mode id.
519  */
520  static ON::v3_display_mode ToV3DisplayMode(
521  ON_UUID id
522  );
523 
524  /*
525  Parameters:
526  dm - [in]
527  v3 display mode enum value
528  Returns:
529  display mode id that corresponds to the enum value.
530  */
531  static ON_UUID FromV3DisplayMode(
532  ON::v3_display_mode dm
533  );
534 
535 
536 private:
537  // prohibit instantiation
538  ON_StandardDisplayModeId(); // no implementation
539  ~ON_StandardDisplayModeId(); // no implementation
540 };
541 
542 enum class ON_FocalBlurModes : unsigned int
543 {
544  None, // No focal blur.
545  Automatic, // Autofocus on selected objects.
546  Manual, // Fully manual focus.
547 };
548 
549 class ON_CLASS ON_3dmView
550 {
551 public:
552  ON_3dmView();
553  ~ON_3dmView();
554 
555  // The C++ default copy constructor and operator= work fine.
556  // Do not provide customized versions.
557  // NO // ON_3dmView(const ON_3dmView&);
558  // NO // ON_3dmView& operator=(const ON_3dmView&);
559 
560  void Default();
561 
562  bool Write( ON_BinaryArchive& ) const;
563  bool Read( ON_BinaryArchive& );
564 
565  void Dump( ON_TextLog& text_log ) const;
566 
567  bool IsValid( ON_TextLog* text_log = 0 ) const;
568 
569  // view projection information
571 
572  // clipping planes
573  // Prior to Dec 14, 2010 m_clipping_planes was not saved with the view.
574  // After Dec 14, 2010 m_clipping_planes is saved.
576 
577  // If true, the the camera location, camera direction,
578  // and lens angle should not be changed.
579  // It is ok to adjust clipping planes.
581 
582  ///////////////////////////////////////////////////////////////////////
583  //
584  // target point
585  //
586 
587  /*
588  Returns:
589  Target point. This point is saved on m_vp.m_target_point.
590  The default constructor sets the target point to
591  ON_3dPoint::UnsetPoint. You must explicitly set the target
592  point if you want to use it.
593  Remarks:
594  The target point is stored on m_vp.m_target_point. The
595  value ON_3dmView.m_target is obsolete. This function always
596  returns the value of m_vp.m_target_point.
597 
598  */
599  ON_3dPoint TargetPoint() const;
600 
601  /*
602  Description:
603  Sets the viewport target point.
604  Parameters:
605  target_point - [in]
606  When in doubt, the point m_vp.FrustumCenterPoint(ON_UNSET_VALUE)
607  is a good choice.
608  Remarks:
609  This point is saved on m_vp.m_target_point.
610  */
611  bool SetTargetPoint(ON_3dPoint target_point);
612 
613  //
614  ///////////////////////////////////////////////////////////////////////
615 
616  ON_wString m_name; // name on window
617 
618  // The value of m_display_mode_id can be one of the "standard" ids
619  // from ON_StandardDisplayModeId, nil, or a custom display mode
620  // settings on a particular computer. If you encounter a nil id
621  // or any other id that is not one of the "standard" display mode
622  // ids, then your application should use a default display mode,
623  // typically either wireframe or shaded, that is appropriate for
624  // general model viewing. The function ON::RhinoV3DisplayMode(id)
625  // will convert a display mode id into a legacy Rhino V3 display
626  // mode enum value.
628 
629  // position of view in parent window
630  // (relative display device coordinates)
632 
633  ON::view_type m_view_type; // model, page, or nested
634 
635  // If m_view_type == ON::page_view_type, then the m_page_settings
636  // records the page size. Otherwise, m_page_settings should
637  // be ignored.
639 
640  ///////////////////////////////////////////////////////////////////////
641  //
642  // Named view information
643  //
644  // If this view was created from a named view, then m_named_view_id
645  // identifies the named view.
646  //
647  // The named views are ON_3dmView classes saved in ON_3dmSettings.m_named_views[].
648  // A named view's id is the value returned by ON_3dmView.m_vp.ViewportId()
649  // A named view's name is the value returned by ON_3dmView.m_name
650  //
651  // If this view is a named view, then m_named_view_id should be equal to
652  // m_vp.m_viewport_id.
653  //
654  // If this view is not a named view and not created from a named view,
655  // then m_named_view_id is equal to ON_nil_uuid.
657 
658  ///////////////////////////////////////////////////////////////////////
659  //
660  // Construction plane
661  //
666 
667  // world axes icon
669 
670  // tracing image
672 
673  // wallpaper image
675 
676 public:
677 
678  double FocalBlurDistance(void) const;
679  void SetFocalBlurDistance(double d);
680 
681  double FocalBlurAperture(void) const;
682  void SetFocalBlurAperture(double d);
683 
684  double FocalBlurJitter(void) const;
685  void SetFocalBlurJitter(double d);
686 
687  unsigned int FocalBlurSampleCount(void) const;
688  void SetFocalBlurSampleCount(unsigned int count);
689 
690  ON_FocalBlurModes FocalBlurMode(void) const;
691  void SetFocalBlurMode(ON_FocalBlurModes m);
692 
693  ON_2iSize RenderingSize() const;
694  void SetRenderingSize(const ON_2iSize& size);
695 
696  //Focal blur settings - per view for renderers.
697 private:
698  double m_dFocalBlurDistance = 100.0;
699  double m_dFocalBlurAperture = 64.0;
700  double m_dFocalBlurJitter = 0.1;
701  unsigned int m_uFocalBlurSampleCount = 10;
702  ON_FocalBlurModes m_FocalBlurMode = ON_FocalBlurModes::None;
703  ON_2iSize m_sizeRendering = ON_2iSize(640, 480);
704 
705 private:
706  ON__INT_PTR reserved = 0;
707 };
708 
709 #if defined(ON_DLL_TEMPLATE)
710 ON_DLL_TEMPLATE template class ON_CLASS ON_ClassArray<ON_3dmView>;
711 #endif
712 
713 //////////////////////////////////////////////////////////////////////////////////////////
714 //
715 // ON_3dmRenderSettings
716 //
717 
718 class ON_CLASS ON_3dmRenderSettings : public ON_Object
719 {
720  ON_OBJECT_DECLARE(ON_3dmRenderSettings);
721 
722 public:
723  ON_3dmRenderSettings() = default;
724  ~ON_3dmRenderSettings() = default;
725  ON_3dmRenderSettings(const ON_3dmRenderSettings&) = default;
726  ON_3dmRenderSettings& operator=(const ON_3dmRenderSettings&) = default;
727 
729 
730  bool Write( ON_BinaryArchive& ) const override;
731  bool Read( ON_BinaryArchive& ) override;
732  void Dump( ON_TextLog& text_log ) const override;
733 
734 private:
735  static bool UseV5ReadWrite(const ON_BinaryArchive&);
736  bool WriteV5( ON_BinaryArchive& ) const;
737  bool ReadV5( ON_BinaryArchive& );
738 
739 public:
740  //New for V6, rendering source (render directly from a NamedView or Snapshot)
741  //https://mcneel.myjetbrains.com/youtrack/issue/RH-39593
742  enum class RenderingSources : unsigned int
743  {
744  ActiveViewport, // Get the rendering view from the currently active viewport (as in all previous versions of Rhino)
745  SpecificViewport, // Get the rendering view from the named viewport (see NamedViewport below)
746  NamedView, // Get the rendering view from a specific named view (see NamedView below)
747  SnapShot, // Before rendering, restore the Snapshot specified in Snapshot below, then render.
748  };
749 
750  RenderingSources RenderingSource(void) const;
751  void SetRenderingSource(RenderingSources);
752 
753  ON_wString SpecificViewport(void) const;
754  void SetSpecificViewport(const ON_wString&);
755 
756  ON_wString NamedView(void) const;
757  void SetNamedView(const ON_wString&);
758 
759  ON_wString Snapshot(void) const;
760  void SetSnapshot(const ON_wString&);
761 
762 private:
763  RenderingSources m_rendering_source = RenderingSources::ActiveViewport;
764  ON_wString m_specific_viewport;
765  ON_wString m_named_view;
766  ON_wString m_snapshot;
767 
768 public:
769  bool ScaleBackgroundToFit() const;
770  void SetScaleBackgroundToFit( bool bScaleBackgroundToFit );
771 
772 private:
773  unsigned short m_reserved1 = 0;
774 
775 public:
776  //////////////////////////////////////////////////////////////
777  //
778  // Force viewport aspect ratio:
779  // If m_bCustomImageSize is true and m_bForceViewportAspectRatio is true
780  // then the image height should be calculated by multiplying the m_image_width
781  // by the viewport aspect ratio. Note that this might be affected by m_rendering_source
782  // In this case, m_image_height should not be used.
783  //
784  bool m_bForceViewportAspectRatio = false;
785  //////////////////////////////////////////////////////////////
786  //
787  // Custom image size:
788  // If m_bCustomImageSize is true, then the image pixel size
789  // is m_image_width X m_image_height pixels.
790  // If m_bCustomImageSize is false, then the image pixel size
791  // is the size of the viewport being rendered.
792  //
793  bool m_bCustomImageSize = false;
794  int m_image_width = 800; // image width in pixels
795  int m_image_height = 600; // image height in pixels
796 
797 private:
798  unsigned int m_reserved3 = 0;
799 public:
800 
801  ////////
802  // Number of dots/inch (dots=pixels) to use when printing and
803  // saving bitmaps. The default is 72.0 dots/inch.
804  double m_image_dpi = 72.0;
805 
806  //////////
807  // unit system to use when converting image pixel size and dpi
808  // information into a print size. Default = inches
809  ON::LengthUnitSystem m_image_us = ON::LengthUnitSystem::Inches;
810 
811  ON_Color m_ambient_light = ON_Color::Black;
812 
813  int m_background_style = 0; // 0 = solid color, 1 = "wallpaper" image, 2 = Gradient, 3 = Environment
814 
815  // m_background_color was changed from ON_Color::Gray160 to ON_Color::White for "white studio" look.
816  // m_background_color = Top color of gradient...
817  ON_Color m_background_color = ON_Color::White;
818  ON_Color m_background_bottom_color = ON_Color::Gray160;
819 
820 
822  // If m_background_bitmap_filename is not empty, the file cannot be found,
823  // and m_embedded_file_id identifes an embedded image file in the model,
824  // then that file will be used as the background bitmap.
825  ON_UUID m_embedded_image_file_id = ON_nil_uuid;
826 
827  bool m_bUseHiddenLights = false;
828 
829  bool m_bDepthCue = false;
830  bool m_bFlatShade = false;
831 
832  bool m_bRenderBackfaces = true;
833  bool m_bRenderPoints = false;
834  bool m_bRenderCurves = false;
835  bool m_bRenderIsoparams = false;
836  bool m_bRenderMeshEdges = false;
837  bool m_bRenderAnnotation = false;
838  bool m_bScaleBackgroundToFit = false;
839  bool m_bTransparentBackground = false;
840 
841 private:
842  unsigned char m_reserved4 = 0;
843  unsigned int m_reserved5 = 0;
844 public:
845 
846  int m_antialias_style = 1; // 0 = none, 1 = normal, 2 = medium, 3 = best
847 
848  int m_shadowmap_style = 1; // 0 = none, 1 = normal, 2 = best
849  int m_shadowmap_width= 1000;
850  int m_shadowmap_height = 1000;
851  double m_shadowmap_offset = 0.75;
852 
853 
854  // Flags that are used to determine which render settings a render
855  // plugin uses, and which ones the display pipeline should use.
856  // Note: Render plugins set these, and they don't need to persist
857  // in the document...Also, when set, they turn OFF their
858  // corresponding setting in the Display Attributes Manager's
859  // UI pages for "Rendered" mode.
860  bool m_bUsesAmbientAttr = true;
861  bool m_bUsesBackgroundAttr = true;
862  bool m_bUsesBackfaceAttr = false;
863  bool m_bUsesPointsAttr = false;
864  bool m_bUsesCurvesAttr = true;
865  bool m_bUsesIsoparmsAttr = true;
866  bool m_bUsesMeshEdgesAttr = false;
867  bool m_bUsesAnnotationAttr = true;
868  bool m_bUsesHiddenLightsAttr = true;
869 
870 private:
871  unsigned char m_reserved6 = 0;
872  unsigned short m_reserved7 = 0;
873  unsigned short m_reserved8 = 0;
874 
875 private:
876  ON__INT_PTR m_reserved9 = 0;
877 };
878 
879 
880 //////////////////////////////////////////////////////////////////////////////////////////
881 //
882 // ON_EarthAnchorPoint
883 //
884 
885 class ON_CLASS ON_EarthAnchorPoint
886 {
887 public:
888  ON_EarthAnchorPoint() = default;
889  ~ON_EarthAnchorPoint() = default;
890  ON_EarthAnchorPoint(const ON_EarthAnchorPoint&) = default;
891  ON_EarthAnchorPoint& operator=(const ON_EarthAnchorPoint&) = default;
892 
893  // Latitude, longitude, and elevation are ON_UNSET_VALUE.
895 
896  // Latitude, longitude, and elevation are the Seattle Space Needle.
898 
899  static
900  int Compare(
901  const ON_EarthAnchorPoint*,
902  const ON_EarthAnchorPoint*
903  );
904 
905  static
906  int CompareEarthLocation(
907  const ON_EarthAnchorPoint*,
908  const ON_EarthAnchorPoint*
909  );
910 
911  static
912  int CompareModelDirection(
913  const ON_EarthAnchorPoint*,
914  const ON_EarthAnchorPoint*
915  );
916 
917  static
918  int CompareIdentification(
919  const ON_EarthAnchorPoint*,
920  const ON_EarthAnchorPoint*
921  );
922 
923  bool Read( ON_BinaryArchive& );
924  bool Write( ON_BinaryArchive& ) const;
925 
926  /*
927  Returns:
928  True if the latitude, longitude, and elevation are set.
929  */
930  bool EarthLocationIsSet() const;
931 
932  /*
933  Returns:
934  True if model basepoint, north and east are set.
935  */
936  bool ModelLocationIsSet() const;
937 
938  /*
939  Parameters:
940  elevation_unit_system - [in]
941  elevation - [in]
942  */
943  void SetEarthLocation(
944  ON::EarthCoordinateSystem earth_coordinate_system,
945  const class ON_UnitSystem& elevation_unit_system,
946  double latitude_degrees,
947  double longitude_degrees,
948  double elevation
949  );
950 
951  void SetEarthLocation(
952  ON::EarthCoordinateSystem earth_coordinate_system,
953  ON::LengthUnitSystem elevation_unit_system,
954  double latitude_degrees,
955  double longitude_degrees,
956  double elevation
957  );
958 
959  void SetLatitudeAndLongitude(
960  double latitude_degrees,
961  double longitude_degrees
962  );
963 
964  /*
965  Returns:
966  A 3d point with coordinates (latitude in degrees, longitude in degrees, elevation in meters).
967  Remarks:
968  Some coordinates may be ON_UNSET_VALUE.
969  */
970  ON_3dPoint EarthLocation() const;
971 
972  /*
973  Parameters:
974  unset_location - [in]
975  Location to return if EarlocationIsSet() is false.
976  Returns:
977  A 3d point with coordinates (latitude, longitude, elevation).
978  */
979  ON_3dPoint EarthLocation(
980  ON_3dPoint unset_location
981  ) const;
982 
983  /*
984  Returns:
985  Earth location latitude in degrees. Can be ON_UNSET_VALUE
986  */
987  double Latitude() const;
988 
989  /*
990  Parameters:
991  unset_latitude - [in]
992  Value to return if the Earth location latitude is not set.
993  Returns:
994  Earth location latitude in degrees.
995  */
996  double Latitude(
997  double unset_latitude
998  ) const;
999 
1000  void SetLatitude(
1001  double latitude_degrees
1002  );
1003 
1004  /*
1005  Returns:
1006  Earth location longitude in degrees. Can be ON_UNSET_VALUE
1007  */
1008  double Longitude() const;
1009 
1010  /*
1011  Parameters:
1012  unset_longitude - [in]
1013  Value to return if the Earth location latitude is not set.
1014  Returns:
1015  Earth location longitude in degrees.
1016  */
1017  double Longitude(
1018  double unset_longitude
1019  ) const;
1020 
1021  void SetLongitude(
1022  double longitude_degrees
1023  );
1024 
1025  /*
1026  System used to define latiude, longitude and elevation.
1027  */
1028  ON::EarthCoordinateSystem EarthCoordinateSystem() const;
1029 
1030  /*
1031  System used to define Earth latiude, longitude, and elevation coordinates.
1032  */
1033  void SetEarthCoordinateSystem(
1034  ON::EarthCoordinateSystem earth_coordinate_system
1035  );
1036 
1037  double ElevationInMeters() const;
1038 
1039 
1040  /*
1041  Parameters:
1042  elevation_unit_system - [in]
1043  length unit system for returned value.
1044  Returns:
1045  Earth location elevation in in elevation_unit_system.
1046  The value is with
1047  Can be ON_UNSET_VALUE
1048  */
1049  double Elevation(
1050  const class ON_UnitSystem& elevation_unit_system
1051  ) const;
1052 
1053  /*
1054  Parameters:
1055  elevation_unit_system - [in]
1056  length unit system for returned value.
1057  Returns:
1058  Earth location elevation in degrees. Can be ON_UNSET_VALUE
1059  */
1060  double Elevation(
1061  ON::LengthUnitSystem elevation_unit_system
1062  ) const;
1063 
1064  /*
1065  Parameters:
1066  elevation_unit_system - [in]
1067  length unit system for returned value.
1068  unset_elevation - [in]
1069  Value to return if the Earth location elevation is not set.
1070  */
1071  double Elevation(
1072  const class ON_UnitSystem& elevation_unit_system,
1073  double unset_elevation
1074  ) const;
1075 
1076  /*
1077  Parameters:
1078  elevation_unit_system - [in]
1079  length unit system for returned value.
1080  unset_elevation - [in]
1081  Value to return if the Earth location elevation is not set.
1082  */
1083  double Elevation(
1084  ON::LengthUnitSystem elevation_unit_system,
1085  double unset_elevation
1086  ) const;
1087 
1088  /*
1089  Parameters:
1090  elevation_unit_system - [in]
1091  elevation - [in]
1092  */
1093  void SetElevation(
1094  const ON_UnitSystem& elevation_unit_system,
1095  double elevation
1096  );
1097 
1098  void SetElevation(
1099  ON::LengthUnitSystem elevation_unit_system,
1100  double elevation
1101  );
1102 
1103  const ON_3dPoint& ModelPoint() const;
1104  const ON_3dVector& ModelNorth() const;
1105  const ON_3dVector& ModelEast() const;
1106 
1107  void SetModelPoint(
1108  ON_3dPoint model_point
1109  );
1110 
1111  void SetModelNorth(
1112  ON_3dVector model_north
1113  );
1114 
1115  void SetModelEast(
1116  ON_3dVector model_east
1117  );
1118 
1119  void SetModelLocation(
1120  ON_3dPoint model_point,
1121  ON_3dVector model_north,
1122  ON_3dVector model_east
1123  );
1124 
1125 private:
1126  // Point on the Earth
1127  // Latitude (degrees): +90 = north pole, 0 = equator, -90 = south pole
1128  // Longitude (degrees): 0 = prime meridian (Greenwich meridian)
1129  // Elevation (meters):
1130  double m_earth_latitude = ON_UNSET_VALUE; // in decimal degrees
1131  double m_earth_longitude = ON_UNSET_VALUE; // in decimal degrees
1132  double m_earth_elevation_meters = 0.0;
1133 
1134  ON::EarthCoordinateSystem m_earth_coordinate_system = ON::EarthCoordinateSystem::Unset;
1135 
1136 private:
1137  unsigned char m_reserved1 = 0;
1138  unsigned char m_reserved2 = 0;
1139  unsigned char m_reserved3 = 0;
1140  ON__UINT32 m_reserved4 = 0;
1141 
1142 private:
1143  // Corresponding model point in model coordinates.
1144  ON_3dPoint m_model_point = ON_3dPoint::Origin; // in model coordinates
1145 
1146  // Earth directions in model coordinates
1147  ON_3dVector m_model_north = ON_3dVector::YAxis; // in model coordinates
1148  ON_3dVector m_model_east = ON_3dVector::XAxis; // in model coordinates
1149 
1150 public:
1151  // Identification information about this location
1152  ON_UUID m_id = ON_nil_uuid; // unique id for this anchor point
1156  ON_wString m_url_tag; // UI link text for m_url
1157 
1158  /*
1159  Parameters:
1160  model_compass - [out]
1161  A plane in model coordinates whose xaxis points East,
1162  yaxis points North and zaxis points up. The origin
1163  is set to m_model_basepoint.
1164  */
1165  bool GetModelCompass(
1166  ON_Plane& model_compass
1167  ) const;
1168 
1169  /*
1170  Description:
1171  Get a transformation from model coordinates to earth coordinates.
1172  This transformation assumes the model is small enough that
1173  the curvature of the earth can be ignored.
1174  Parameters:
1175  model_unit_system - [in]
1176  model_to_earth - [out]
1177  Transformation from model coordinates to earth locations
1178  (degrees latitude,degrees longitude,elevation in meters)
1179  Remarks:
1180  If M is a point in model coordinates and E = model_to_earth*M,
1181  then
1182  E.x = latitude in decimal degrees
1183  E.y = longitude in decimal degrees
1184  E.z = elevation in meters above mean sea level
1185 
1186  Because the earth is not flat, there is a small amount of error
1187  when using a linear transformation to calculate oblate spherical
1188  coordinates. This error is small. If the distance from P to M
1189  is d meters, then the approximation error is
1190 
1191  latitude error <=
1192  longitude error <=
1193  elevation error <= 6379000*((1 + (d/6356000)^2)-1) meters
1194 
1195  In particular, if every point in the model is within 1000 meters of
1196  the m_model_basepoint, then the maximum approximation errors are
1197 
1198  latitude error <=
1199  longitude error <=
1200  elevation error <= 8 centimeters
1201  */
1202  bool GetModelToEarthXform(
1203  const ON_UnitSystem& model_unit_system,
1204  ON_Xform& model_to_earth
1205  ) const;
1206 };
1207 
1208 
1209 
1210 class ON_CLASS ON_3dmIOSettings
1211 {
1212 public:
1213  ON_3dmIOSettings() = default;
1214  ~ON_3dmIOSettings() = default;
1215  ON_3dmIOSettings(const ON_3dmIOSettings&) = default;
1216  ON_3dmIOSettings& operator=(const ON_3dmIOSettings&) = default;
1217 
1219 
1220  bool Read(ON_BinaryArchive&);
1221  bool Write(ON_BinaryArchive&) const;
1222 
1223  // bitmaps associated with rendering materials
1224  bool m_bSaveTextureBitmapsInFile = false;
1225 
1226  // As of 7 February 2012, the m_idef_link_update setting
1227  // controls if, when and how linked and linked_and_embedded
1228  // instance defintions are updated when the source archive
1229  // that was used to create the idef has changed.
1230  int m_idef_link_update = 1;
1231  // 1 = prompt - ask the user if the idef should be updated.
1232  // 2 = always update - no prompting
1233  // 3 = never update - no prompting
1234  // Any value not equal to 1,2 or 3 shall be treated as 1.
1235 };
1236 
1237 //////////////////////////////////////////////////////////////////////////////////////////
1238 //
1239 // ON_3dmSettings
1240 //
1241 
1242 class ON_CLASS ON_3dmSettings
1243 {
1244 public:
1245  ON_3dmSettings() = default;
1246  ~ON_3dmSettings() = default;
1247 
1248  ON_3dmSettings(const ON_3dmSettings&) = default;
1249  ON_3dmSettings& operator=(const ON_3dmSettings&) = default;
1250 
1251  static const ON_3dmSettings Default;
1252 
1253  bool Read(ON_BinaryArchive&);
1254  bool Write(ON_BinaryArchive&) const;
1255 
1256  void Dump( ON_TextLog& ) const;
1257 
1258  // model URL (can be empty)
1260 
1261  // Model basepoint is used when the file is read as
1262  // an instance definition and is the point that is
1263  // mapped to the origin in the instance definition.
1264  ON_3dPoint m_model_basepoint = ON_3dPoint::Origin;
1265 
1266  // If set, this is the model's location on the earth.
1267  // This information is used when the model is used
1268  // with GIS information.
1270 
1271  // Model space tolerances and unit system
1273 
1274  // Page space (printing/paper) tolerances and unit system
1276 
1277  // settings used for automatically created rendering meshes
1279 
1280  // saved custom settings
1282 
1283  /*
1284  Returns:
1285  ON_MeshParameters::render_mesh_fast
1286  m_RenderMeshSettings and ON_MeshParameters::FastRenderMesh have
1287  the same mesh geometry parameter settings.
1288  ON_MeshParameters::render_mesh_quality
1289  m_RenderMeshSettings and ON_MeshParameters::QualityRenderMesh have
1290  the same mesh geometry parameter settings.
1291  ON_MeshParameters::render_mesh_custom
1292  m_RenderMeshSettings and m_CustomRenderMeshSettings have
1293  the same mesh geometry parameter settings.
1294  no_match_found_result
1295  otherwise
1296  */
1297  ON_MeshParameters::MESH_STYLE RenderMeshStyle(
1298  ON_MeshParameters::MESH_STYLE no_match_found_result
1299  ) const;
1300 
1301  // settings used for automatically created analysis meshes
1303 
1304  // settings used when annotation objects are created
1306 
1309  ON_ClassArray<ON_3dmView> m_views; // current viewports
1310  ON_UUID m_active_view_id = ON_nil_uuid; // id of "active" viewport
1311 
1312  // These fields determine what layer, material, color, line style, and
1313  // wire density are used for new objects.
1314 
1315 public:
1316  void SetCurrentLayerId(
1317  ON_UUID layer_id
1318  );
1319  void SetV5CurrentLayerIndex(
1320  int V5_current_layer_index
1321  );
1322  int CurrentLayerIndex() const;
1323  ON_UUID CurrentLayerId() const;
1324 private:
1325  // The index is for reading V5 and earlier files.
1326  int m_V5_current_layer_index = ON_UNSET_INT_INDEX;
1327  ON_UUID m_current_layer_id = ON_nil_uuid;
1328 
1329 public:
1330  void SetCurrentMaterialId(
1331  ON_UUID material_id
1332  );
1333  int CurrentMaterialIndex() const;
1334  ON_UUID CurrentMaterialId() const;
1335 private:
1336  // The index is for reading V5 and earlier files.
1337  int m_V5_current_render_material_index = ON_UNSET_INT_INDEX;
1338  ON_UUID m_current_render_material_id = ON_nil_uuid;
1339 
1340 public:
1341  ON::object_material_source m_current_material_source = ON::material_from_layer;
1342 
1343  ON_Color m_current_color = ON_Color::Black;
1344  ON::object_color_source m_current_color_source = ON::color_from_layer;
1345 
1346  ON_Color m_current_plot_color = ON_Color::UnsetColor;
1347  ON::plot_color_source m_current_plot_color_source = ON::plot_color_from_layer;
1348 
1349 public:
1350  void SetCurrentLinePatternId(
1351  ON_UUID line_pattern_id
1352  );
1353  int CurrentLinePatternIndex() const;
1354  ON_UUID CurrentLinePatternId() const;
1355 private:
1356  // The index is for reading V5 and earlier files.
1357  int m_V5_current_line_pattern_index = ON_UNSET_INT_INDEX;
1358  ON_UUID m_current_line_pattern_id = ON_nil_uuid;
1359 
1360 public:
1361  ON::object_linetype_source m_current_linetype_source = ON::linetype_from_layer;
1362 
1363 public:
1364  void SetCurrentTextStyleId(
1365  ON_UUID text_style_id
1366  );
1367  int CurrentTextStyleIndex() const;
1368  ON_UUID CurrentTextStyleId() const;
1369 private:
1370  // The index is for reading V5 and earlier files.
1371  int m_V5_current_text_style_index = ON_UNSET_INT_INDEX;
1372  ON_UUID m_current_text_style_id = ON_nil_uuid;
1373 
1374 public:
1375  void SetCurrentDimensionStyleId(
1376  ON_UUID dimension_style_id
1377  );
1378  int CurrentDimensionStyleIndex() const;
1379  ON_UUID CurrentDimensionStyleId() const;
1380 private:
1381  // The index is for reading V5 and earlier files.
1382  int m_V5_current_dimension_style_index = ON_UNSET_INT_INDEX;
1383  ON_UUID m_current_dimension_style_id = ON_nil_uuid;
1384 
1385 public:
1386  void SetCurrentHatchPatternId(
1387  ON_UUID hatch_pattern_id
1388  );
1389  ON_UUID CurrentHatchPatternId() const;
1390 private:
1391  ON_UUID m_current_hatch_pattern_id = ON_nil_uuid;
1392 
1393 public:
1394  // Surface wireframe density
1395  //
1396  // @untitled table
1397  // 0 boundary + "knot" wires
1398  // 1 boundary + "knot" wires + 1 interior wire if no interior "knots"
1399  // N>=2 boundry + "knot" wires + (N-1) interior wires
1400  int m_current_wire_density = 1;
1401 
1403 
1404  // default settings for construction plane grids
1406 
1407  // World scale factor to apply to non-solid linetypes
1408  // for model display. For plotting, the linetype settings
1409  // are used without scaling.
1410  double m_linetype_display_scale = 1.0;
1411 
1412  // Plugins that were loaded when the file was saved.
1414 
1416 private:
1417  bool Read_v1(ON_BinaryArchive&);
1418  bool Read_v2(ON_BinaryArchive&);
1419  bool Write_v1(ON_BinaryArchive&) const;
1420  bool Write_v2(ON_BinaryArchive&) const;
1421 };
1422 
1423 #endif
double m_width
Definition: opennurbs_3dm_settings.h:421
ON_wString m_url
Definition: opennurbs_3dm_settings.h:1155
Definition: opennurbs_3dm_settings.h:406
static const ON_EarthAnchorPoint Unset
Latitude, longitude, and elevation are ON_UNSET_VALUE.
Definition: opennurbs_3dm_settings.h:894
ON_wString m_facename
for decimal, digits past the decimal point
Definition: opennurbs_3dm_settings.h:278
static const ON_UUID Technical
{63612C72-778F-4afd-B81B-17426FDFE8A6}
Definition: opennurbs_3dm_settings.h:497
Definition: opennurbs_3dm_settings.h:286
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
static const ON_3dVector YAxis
(0.0,1.0,0.0)
Definition: opennurbs_point.h:1197
static const ON_3dmConstructionPlaneGridDefaults Default
Definition: opennurbs_3dm_settings.h:294
static const ON_UUID RenderedShadows
{A5545314-9D87-428d-95AE-91052EEAD0FA}
Definition: opennurbs_3dm_settings.h:496
bool m_bShowConstructionGrid
Definition: opennurbs_3dm_settings.h:663
static const ON_UUID Shaded
{8BC8DEBE-C83B-4c47-B13C-9DB074510CAC}
Definition: opennurbs_3dm_settings.h:492
ON_3dmConstructionPlane m_cplane
Definition: opennurbs_3dm_settings.h:662
double m_wnd_right
Definition: opennurbs_3dm_settings.h:384
ON_3dmWallpaperImage m_wallpaper_image
wallpaper image
Definition: opennurbs_3dm_settings.h:674
Definition: opennurbs_ipoint.h:246
bool m_bGrayScale
true if image should be black and white
Definition: opennurbs_3dm_settings.h:426
bool m_bMaximized
true if view window is maximized
Definition: opennurbs_3dm_settings.h:388
ON_wString m_url_tag
UI link text for m_url.
Definition: opennurbs_3dm_settings.h:1156
Definition: opennurbs_3dm_settings.h:549
static const ON_UUID Raytraced
{69E0C7A5-1C6A-46C8-B98B-8779686CD181}
Definition: opennurbs_3dm_settings.h:501
ON_wString m_name
Definition: opennurbs_3dm_settings.h:355
ON_ClassArray< ON_3dmConstructionPlane > m_named_cplanes
Definition: opennurbs_3dm_settings.h:1307
Definition: opennurbs_3dm_settings.h:1242
ON_Plane m_plane
view window relative position and state in parent frame
Definition: opennurbs_3dm_settings.h:420
MESH_STYLE
Definition: opennurbs_mesh.h:36
double m_wnd_top
Definition: opennurbs_3dm_settings.h:385
ON_3dmAnnotationSettings m_AnnotationSettings
settings used when annotation objects are created
Definition: opennurbs_3dm_settings.h:1305
Definition: opennurbs_string.h:2089
double m_height
Definition: opennurbs_3dm_settings.h:422
double m_top_margin_mm
Definition: opennurbs_3dm_settings.h:479
int m_page_number
Definition: opennurbs_3dm_settings.h:470
ON_3dmViewTraceImage m_trace_image
tracing image
Definition: opennurbs_3dm_settings.h:671
ON_ClassArray< ON_PlugInRef > m_plugin_list
Plugins that were loaded when the file was saved.
Definition: opennurbs_3dm_settings.h:1413
static const ON_3dVector XAxis
(1.0,0.0,0.0)
Definition: opennurbs_point.h:1196
ON_3dmViewPosition m_position
Definition: opennurbs_3dm_settings.h:631
static const ON_Color UnsetColor
0xFFFFFFFFu
Definition: opennurbs_color.h:32
Definition: opennurbs_3dm_settings.h:488
Definition: opennurbs_color.h:24
static const ON_UUID Rendered
{CAE60BAE-2D51-4299-ABF7-A339FCA86F3B}
Definition: opennurbs_3dm_settings.h:493
Definition: opennurbs_3dm_settings.h:718
bool m_bShowConstructionAxes
Definition: opennurbs_3dm_settings.h:664
Definition: opennurbs_3dm_settings.h:108
ON_UUID m_display_mode_id
Definition: opennurbs_3dm_settings.h:627
ON_ClassArray< ON_3dmView > m_views
current viewports
Definition: opennurbs_3dm_settings.h:1309
ON_wString m_background_bitmap_filename
Definition: opennurbs_3dm_settings.h:821
ON_Viewport m_vp
view projection information
Definition: opennurbs_3dm_settings.h:570
static const ON_3dmAnnotationSettings Default
Definition: opennurbs_3dm_settings.h:116
double m_wnd_bottom
Definition: opennurbs_3dm_settings.h:386
Definition: opennurbs_3dm_settings.h:366
double m_bottom_margin_mm
Definition: opennurbs_3dm_settings.h:480
static const ON_UUID AmbientOcclusion
{C32B72C3-41BD-4ADC-82A8-B7AEF4456A37}
Definition: opennurbs_3dm_settings.h:500
Definition: opennurbs_3dm_settings.h:460
double m_height_mm
Definition: opennurbs_3dm_settings.h:474
bool m_bShowWorldAxes
world axes icon
Definition: opennurbs_3dm_settings.h:668
Definition: opennurbs_3dm_settings.h:436
Definition: opennurbs_mesh.h:24
static const ON_3dPoint Origin
(0.0,0.0,0.0)
Definition: opennurbs_point.h:493
static const ON_UUID Ghosted
{FF608B97-81D3-4186-831C-41F7DC140881}
Definition: opennurbs_3dm_settings.h:494
Definition: opennurbs_xform.h:28
ON_UUID m_named_view_id
Definition: opennurbs_3dm_settings.h:656
Definition: opennurbs_3dm_settings.h:1210
static const ON_MeshParameters DefaultMesh
Definition: opennurbs_mesh.h:132
static const ON_3dmSettings Default
Definition: opennurbs_3dm_settings.h:1251
static const ON_UnitSystem Millimeters
unit system = ON::LengthUnitSystem::Millimeters and meters/unit = 0.001 exactly
Definition: opennurbs_string.h:3937
static const ON_3dmRenderSettings Default
Definition: opennurbs_3dm_settings.h:728
Definition: opennurbs_3dm_settings.h:26
ON_wString m_printer_name
Definition: opennurbs_3dm_settings.h:482
static const ON_3dmIOSettings Default
Definition: opennurbs_3dm_settings.h:1218
double m_left_margin_mm
Page margins in millimeters.
Definition: opennurbs_3dm_settings.h:477
static const ON_Color Gray160
R = G = B = 160 (medium light)
Definition: opennurbs_color.h:42
Definition: opennurbs_3dm_settings.h:885
static const ON_Color White
0x00FFFFFFu on little endan, 0xFFFFFF00u on big endian
Definition: opennurbs_color.h:34
unsigned char m_floating_viewport
Definition: opennurbs_3dm_settings.h:394
ON_ClassArray< ON_3dmView > m_named_views
Definition: opennurbs_3dm_settings.h:1308
double m_right_margin_mm
Definition: opennurbs_3dm_settings.h:478
ON_wString m_name
Definition: opennurbs_3dm_settings.h:616
int m_grid_thick_frequency
Definition: opennurbs_3dm_settings.h:347
static const ON_UUID Pen
{F4616FA5-A831-4620-A97E-9B807D5EC376}
Definition: opennurbs_3dm_settings.h:499
Definition: opennurbs_object.h:433
static const ON_UUID Wireframe
{1311ADCB-D89E-4051-A3F0-F64441FB8EC6}
Definition: opennurbs_3dm_settings.h:491
double m_wnd_left
0.0 to 1.0
Definition: opennurbs_3dm_settings.h:383
Definition: opennurbs_string.h:3894
ON_FileReference m_image_file_reference
Definition: opennurbs_3dm_settings.h:424
double m_snap_spacing
Definition: opennurbs_3dm_settings.h:343
ON::view_type m_view_type
model, page, or nested
Definition: opennurbs_3dm_settings.h:633
Definition: opennurbs_textlog.h:20
ON_Plane m_plane
Definition: opennurbs_3dm_settings.h:339
bool m_bGrayScale
true if image should be black and white
Definition: opennurbs_3dm_settings.h:451
< use for generic serialization of binary data
Definition: opennurbs_archive.h:1866
double m_width_mm
Overall size of the page in millimeters.
Definition: opennurbs_3dm_settings.h:473
ON_FileReference m_image_file_reference
Definition: opennurbs_3dm_settings.h:449
static const ON_wString EmptyString
Definition: opennurbs_string.h:2095
Definition: opennurbs_viewport.h:31
bool m_bHidden
true if image is currently hidden from view
Definition: opennurbs_3dm_settings.h:427
RenderingSources
Definition: opennurbs_3dm_settings.h:742
Definition: opennurbs_point.h:480
static const ON_3dmUnitsAndTolerances Millimeters
Definition: opennurbs_3dm_settings.h:97
ON_wString m_name
Definition: opennurbs_3dm_settings.h:1153
static const ON_UUID Artistic
{B46AB226-05A0-4568-B454-4B1AB721C675}
Definition: opennurbs_3dm_settings.h:498
bool m_bHidden
true if image is currently hidden from view
Definition: opennurbs_3dm_settings.h:452
bool m_bShowConstructionZAxis
Definition: opennurbs_3dm_settings.h:665
Definition: opennurbs_plane.h:20
Definition: opennurbs_3dm_settings.h:320
ON_3dmPageSettings m_page_settings
Definition: opennurbs_3dm_settings.h:638
ON_SimpleArray< ON_ClippingPlaneInfo > m_clipping_planes
Definition: opennurbs_3dm_settings.h:575
bool m_bLockedProjection
Definition: opennurbs_3dm_settings.h:580
int m_grid_line_count
number of grid lines in each direction
Definition: opennurbs_3dm_settings.h:346
ON_wString m_description
Definition: opennurbs_3dm_settings.h:1154
bool m_bFiltered
true if image should be filtered (bilinear) before displayed.
Definition: opennurbs_3dm_settings.h:428
static const ON_UUID XrayShade
{B5C19D5D-0AEC-4ff7-A10E-E052E660263A}
Definition: opennurbs_3dm_settings.h:495
static const ON_EarthAnchorPoint SeattleSpaceNeedle
Latitude, longitude, and elevation are the Seattle Space Needle.
Definition: opennurbs_3dm_settings.h:897
Definition: opennurbs_point.h:1182
Definition: opennurbs_file_utilities.h:1187
static const ON_Color Black
0x00000000u
Definition: opennurbs_color.h:33
double m_grid_spacing
construction grid appearance
Definition: opennurbs_3dm_settings.h:342
bool m_bDepthBuffer
Definition: opennurbs_3dm_settings.h:351
static const ON_MeshParameters DefaultAnalysisMesh
Definition: opennurbs_mesh.h:155