17 #if !defined(OPENNURBS_3DM_SETTINGS_INC_) 18 #define OPENNURBS_3DM_SETTINGS_INC_ 46 bool TolerancesAreValid()
const;
65 unsigned int SetInvalidTolerancesToDefaultValues();
74 double Scale( ON::LengthUnitSystem )
const;
78 double m_absolute_tolerance = 0.001;
79 double m_angle_tolerance = ON_PI/180.0;
80 double m_relative_tolerance = 0.01;
82 ON::OBSOLETE_DistanceDisplayMode m_distance_display_mode = ON::OBSOLETE_DistanceDisplayMode::Decimal;
83 int m_distance_display_precision = 3;
125 double m_dimscale = 1.0;
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;
137 double WorldViewTextScale()
const;
144 void SetWorldViewTextScale(
double world_view_text_scale );
150 double WorldViewHatchScale()
const;
157 void SetWorldViewHatchScale(
double world_view_hatch_scale );
164 bool Is_V5_AnnotationScalingEnabled()
const;
171 void Enable_V5_AnnotationScaling(
bool bEnable);
178 void EnableModelSpaceAnnotationScaling(
bool bEnable);
184 bool IsModelSpaceAnnotationScalingEnabled()
const;
191 void EnableLayoutSpaceAnnotationScaling(
bool bEnable);
197 bool IsLayoutSpaceAnnotationScalingEnabled()
const;
203 bool IsHatchScalingEnabled()
const;
210 void EnableHatchScaling(
bool bEnable );
225 float m_world_view_text_scale = 1.0f;
226 float m_world_view_hatch_scale = 1.0f;
251 unsigned char m_b_V5_EnableAnnotationScaling = 1;
254 unsigned char m_bEnableModelSpaceAnnotationScaling = 1;
255 unsigned char m_bEnableLayoutSpaceAnnotationScaling = 1;
257 unsigned char m_bEnableHatchScaling = 1;
260 ON__UINT32 m_reserved1 = 0;
261 ON__UINT8 m_reserved2 = 0;
262 ON__UINT8 m_reserved3 = 0;
263 ON__UINT8 m_reserved4 = 0;
266 ON::LengthUnitSystem m_dimunits = ON::LengthUnitSystem::None;
268 int m_angularunits = 0;
269 int m_lengthformat = 0;
270 int m_angleformat = 0;
275 int m_resolution = 0;
301 double m_grid_spacing = 1.0;
302 double m_snap_spacing = 1.0;
305 int m_grid_line_count = 70;
306 int m_grid_thick_frequency = 5;
311 bool m_bShowGrid =
true;
312 bool m_bShowGridAxes =
true;
313 bool m_bShowWorldAxes =
true;
342 double m_grid_spacing;
343 double m_snap_spacing;
346 int m_grid_line_count;
347 int m_grid_thick_frequency;
358 #if defined(ON_DLL_TEMPLATE) 394 unsigned char m_floating_viewport;
397 unsigned char m_reserved_1;
398 unsigned char m_reserved_2;
399 unsigned char m_reserved_3;
466 bool IsValid(
ON_TextLog* text_log = 0 )
const;
477 double m_left_margin_mm;
478 double m_right_margin_mm;
479 double m_top_margin_mm;
480 double m_bottom_margin_mm;
491 static const ON_UUID Wireframe;
495 static const ON_UUID XrayShade;
496 static const ON_UUID RenderedShadows;
497 static const ON_UUID Technical;
500 static const ON_UUID AmbientOcclusion;
501 static const ON_UUID Raytraced;
509 static bool IsStandardDisplayModeId(
520 static ON::v3_display_mode ToV3DisplayMode(
531 static ON_UUID FromV3DisplayMode(
532 ON::v3_display_mode dm
542 enum class ON_FocalBlurModes :
unsigned int 567 bool IsValid(
ON_TextLog* text_log = 0 )
const;
580 bool m_bLockedProjection;
633 ON::view_type m_view_type;
663 bool m_bShowConstructionGrid;
664 bool m_bShowConstructionAxes;
665 bool m_bShowConstructionZAxis;
668 bool m_bShowWorldAxes;
678 double FocalBlurDistance(
void)
const;
679 void SetFocalBlurDistance(
double d);
681 double FocalBlurAperture(
void)
const;
682 void SetFocalBlurAperture(
double d);
684 double FocalBlurJitter(
void)
const;
685 void SetFocalBlurJitter(
double d);
687 unsigned int FocalBlurSampleCount(
void)
const;
688 void SetFocalBlurSampleCount(
unsigned int count);
690 ON_FocalBlurModes FocalBlurMode(
void)
const;
691 void SetFocalBlurMode(ON_FocalBlurModes m);
694 void SetRenderingSize(
const ON_2iSize& size);
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;
706 ON__INT_PTR reserved = 0;
709 #if defined(ON_DLL_TEMPLATE) 732 void Dump(
ON_TextLog& text_log )
const override;
769 bool ScaleBackgroundToFit()
const;
770 void SetScaleBackgroundToFit(
bool bScaleBackgroundToFit );
773 unsigned short m_reserved1 = 0;
784 bool m_bForceViewportAspectRatio =
false;
793 bool m_bCustomImageSize =
false;
794 int m_image_width = 800;
795 int m_image_height = 600;
798 unsigned int m_reserved3 = 0;
804 double m_image_dpi = 72.0;
809 ON::LengthUnitSystem m_image_us = ON::LengthUnitSystem::Inches;
813 int m_background_style = 0;
825 ON_UUID m_embedded_image_file_id = ON_nil_uuid;
827 bool m_bUseHiddenLights =
false;
829 bool m_bDepthCue =
false;
830 bool m_bFlatShade =
false;
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;
842 unsigned char m_reserved4 = 0;
843 unsigned int m_reserved5 = 0;
846 int m_antialias_style = 1;
848 int m_shadowmap_style = 1;
849 int m_shadowmap_width= 1000;
850 int m_shadowmap_height = 1000;
851 double m_shadowmap_offset = 0.75;
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;
871 unsigned char m_reserved6 = 0;
872 unsigned short m_reserved7 = 0;
873 unsigned short m_reserved8 = 0;
876 ON__INT_PTR m_reserved9 = 0;
906 int CompareEarthLocation(
912 int CompareModelDirection(
918 int CompareIdentification(
930 bool EarthLocationIsSet()
const;
936 bool ModelLocationIsSet()
const;
943 void SetEarthLocation(
944 ON::EarthCoordinateSystem earth_coordinate_system,
946 double latitude_degrees,
947 double longitude_degrees,
951 void SetEarthLocation(
952 ON::EarthCoordinateSystem earth_coordinate_system,
953 ON::LengthUnitSystem elevation_unit_system,
954 double latitude_degrees,
955 double longitude_degrees,
959 void SetLatitudeAndLongitude(
960 double latitude_degrees,
961 double longitude_degrees
987 double Latitude()
const;
997 double unset_latitude
1001 double latitude_degrees
1008 double Longitude()
const;
1018 double unset_longitude
1022 double longitude_degrees
1028 ON::EarthCoordinateSystem EarthCoordinateSystem()
const;
1033 void SetEarthCoordinateSystem(
1034 ON::EarthCoordinateSystem earth_coordinate_system
1037 double ElevationInMeters()
const;
1061 ON::LengthUnitSystem elevation_unit_system
1073 double unset_elevation
1084 ON::LengthUnitSystem elevation_unit_system,
1085 double unset_elevation
1099 ON::LengthUnitSystem elevation_unit_system,
1119 void SetModelLocation(
1130 double m_earth_latitude = ON_UNSET_VALUE;
1131 double m_earth_longitude = ON_UNSET_VALUE;
1132 double m_earth_elevation_meters = 0.0;
1134 ON::EarthCoordinateSystem m_earth_coordinate_system = ON::EarthCoordinateSystem::Unset;
1137 unsigned char m_reserved1 = 0;
1138 unsigned char m_reserved2 = 0;
1139 unsigned char m_reserved3 = 0;
1140 ON__UINT32 m_reserved4 = 0;
1165 bool GetModelCompass(
1202 bool GetModelToEarthXform(
1224 bool m_bSaveTextureBitmapsInFile =
false;
1230 int m_idef_link_update = 1;
1310 ON_UUID m_active_view_id = ON_nil_uuid;
1316 void SetCurrentLayerId(
1319 void SetV5CurrentLayerIndex(
1320 int V5_current_layer_index
1322 int CurrentLayerIndex()
const;
1323 ON_UUID CurrentLayerId()
const;
1326 int m_V5_current_layer_index = ON_UNSET_INT_INDEX;
1327 ON_UUID m_current_layer_id = ON_nil_uuid;
1330 void SetCurrentMaterialId(
1333 int CurrentMaterialIndex()
const;
1334 ON_UUID CurrentMaterialId()
const;
1337 int m_V5_current_render_material_index = ON_UNSET_INT_INDEX;
1338 ON_UUID m_current_render_material_id = ON_nil_uuid;
1341 ON::object_material_source m_current_material_source = ON::material_from_layer;
1344 ON::object_color_source m_current_color_source = ON::color_from_layer;
1347 ON::plot_color_source m_current_plot_color_source = ON::plot_color_from_layer;
1350 void SetCurrentLinePatternId(
1353 int CurrentLinePatternIndex()
const;
1357 int m_V5_current_line_pattern_index = ON_UNSET_INT_INDEX;
1358 ON_UUID m_current_line_pattern_id = ON_nil_uuid;
1361 ON::object_linetype_source m_current_linetype_source = ON::linetype_from_layer;
1364 void SetCurrentTextStyleId(
1367 int CurrentTextStyleIndex()
const;
1368 ON_UUID CurrentTextStyleId()
const;
1371 int m_V5_current_text_style_index = ON_UNSET_INT_INDEX;
1372 ON_UUID m_current_text_style_id = ON_nil_uuid;
1375 void SetCurrentDimensionStyleId(
1378 int CurrentDimensionStyleIndex()
const;
1379 ON_UUID CurrentDimensionStyleId()
const;
1382 int m_V5_current_dimension_style_index = ON_UNSET_INT_INDEX;
1383 ON_UUID m_current_dimension_style_id = ON_nil_uuid;
1386 void SetCurrentHatchPatternId(
1389 ON_UUID CurrentHatchPatternId()
const;
1391 ON_UUID m_current_hatch_pattern_id = ON_nil_uuid;
1400 int m_current_wire_density = 1;
1410 double m_linetype_display_scale = 1.0;
Definition: opennurbs_3dm_settings.h:386
static const ON_EarthAnchorPoint Unset
Latitude, longitude, and elevation are ON_UNSET_VALUE.
Definition: opennurbs_3dm_settings.h:869
Definition: opennurbs_3dm_settings.h:266
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
static const ON_3dVector YAxis
Definition: opennurbs_point.h:1167
static const ON_3dmConstructionPlaneGridDefaults Default
Definition: opennurbs_3dm_settings.h:274
Definition: opennurbs_ipoint.h:236
Definition: opennurbs_3dm_settings.h:523
Definition: opennurbs_3dm_settings.h:1184
MESH_STYLE
Definition: opennurbs_mesh.h:36
Definition: opennurbs_string.h:2020
static const ON_3dVector XAxis
Definition: opennurbs_point.h:1166
static const ON_Color UnsetColor
Definition: opennurbs_color.h:32
Definition: opennurbs_3dm_settings.h:468
Definition: opennurbs_color.h:24
Definition: opennurbs_3dm_settings.h:691
Definition: opennurbs_3dm_settings.h:110
Definition: opennurbs_3dm_settings.h:346
Definition: opennurbs_3dm_settings.h:440
Definition: opennurbs_3dm_settings.h:416
Definition: opennurbs_mesh.h:24
static const ON_3dPoint Origin
Definition: opennurbs_point.h:473
Definition: opennurbs_3dm_settings.h:1152
static const ON_MeshParameters DefaultMesh
Mesh creationg parameters to create the default render mesh.
Definition: opennurbs_mesh.h:131
static const ON_UnitSystem Millimeters
unit system = ON::LengthUnitSystem::Millimeters and meters/unit = 0.001 exactly
Definition: opennurbs_string.h:3782
static const ON_3dmRenderSettings Default
Definition: opennurbs_3dm_settings.h:701
Definition: opennurbs_3dm_settings.h:26
static const ON_3dmIOSettings Default
Definition: opennurbs_3dm_settings.h:1160
static const ON_Color Gray160
Definition: opennurbs_color.h:42
Definition: opennurbs_3dm_settings.h:860
static const ON_Color White
Definition: opennurbs_color.h:34
Pure virtual base class for all classes that must provide runtime class id or support object level 3D...
Definition: opennurbs_object.h:460
Definition: opennurbs_string.h:3739
Definition: opennurbs_textlog.h:20
Definition: opennurbs_archive.h:1783
static const ON_wString EmptyString
Definition: opennurbs_string.h:2026
Definition: opennurbs_viewport.h:31
RenderingSources
Definition: opennurbs_3dm_settings.h:715
Definition: opennurbs_point.h:460
static const ON_3dmUnitsAndTolerances Millimeters
Definition: opennurbs_3dm_settings.h:99
Definition: opennurbs_plane.h:20
Definition: opennurbs_3dm_settings.h:300
Definition: opennurbs_point.h:1152
Definition: opennurbs_file_utilities.h:1125
static const ON_Color Black
Definition: opennurbs_color.h:33
static const ON_MeshParameters DefaultAnalysisMesh
Mesh creationg parameters to create the default analysis mesh.
Definition: opennurbs_mesh.h:151