MeshLib C++ Docs
Loading...
Searching...
No Matches
MRSceneSettings.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
4#include <array>
5
6namespace MR
7{
10
11
15{
16public:
18 MRMESH_API static void reset();
19
27
49
50 MRMESH_API static bool get( BoolType type );
51 MRMESH_API static float get( FloatType type );
52 MRMESH_API static void set( BoolType type, bool value );
53 MRMESH_API static void set( FloatType type, float value );
54
56 enum class ShadingMode
57 {
59 Smooth,
60 Flat
61 };
62
67 MRMESH_API static void setDefaultShadingMode( ShadingMode mode );
68
69 MRMESH_API static const CNCMachineSettings& getCNCMachineSettings();
70 MRMESH_API static void setCNCMachineSettings( const CNCMachineSettings& settings );
71
72private:
73 MRMESH_API SceneSettings();
74 ~SceneSettings() = default;
75 SceneSettings& operator=( const SceneSettings& other ) = default;
76
77 static SceneSettings& instance_();
78
79 std::array<bool, size_t( BoolType::Count ) > boolSettings_;
80 std::array<float, size_t( FloatType::Count ) > floatSettings_;
81
82 ShadingMode defaultShadingMode_ = ShadingMode::AutoDetect;
83 CNCMachineSettings cncMachineSettings_;
84};
85
86}
class with CNC machine emulation settings
Definition MRCNCMachineSettings.h:19
Definition MRSceneSettings.h:15
BoolType
Definition MRSceneSettings.h:21
static MRMESH_API bool get(BoolType type)
ShadingMode
Mesh faces shading mode.
Definition MRSceneSettings.h:57
static MRMESH_API void set(BoolType type, bool value)
static MRMESH_API void set(FloatType type, float value)
static MRMESH_API float get(FloatType type)
static MRMESH_API void setCNCMachineSettings(const CNCMachineSettings &settings)
static MRMESH_API void reset()
Reset all scene settings to default values.
static MRMESH_API void setDefaultShadingMode(ShadingMode mode)
static MRMESH_API const CNCMachineSettings & getCNCMachineSettings()
FloatType
Definition MRSceneSettings.h:29
static MRMESH_API ShadingMode getDefaultShadingMode()
@ UseDefaultScenePropertiesOnDeserialization
on deserialization replace object properties with default values from SceneSettings and SceneColors
@ other
Angle, normally float. Measure in radians.
@ FeatureSubPointSize
Size of point subfeatures (various centers).
@ FeatureLineWidth
Line width of line features (line, circle, ...).
@ AmbientCoefSelectedObj
Ambient multiplication coefficient for ambientStrength for selected objects.
@ FeaturePointSize
Size of the point feature.
@ FeatureSubLineWidth
Line width of line subfeatures (axes, base circles, ...).
only for bindings generation
Definition MRCameraOrientationPlugin.h:8