MeshLib C++ Docs
Loading...
Searching...
No Matches
MRSceneColors.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#include "MRColor.h"
4
5#include <array>
6
7namespace MR
8{
9
12struct SceneColors
13{
14 enum Type
15 {
16 SelectedObjectMesh,
17 UnselectedObjectMesh,
18 SelectedObjectPoints,
19 UnselectedObjectPoints,
20 SelectedObjectLines,
21 UnselectedObjectLines,
22 SelectedObjectVoxels,
23 UnselectedObjectVoxels,
24 SelectedObjectDistanceMap,
25 UnselectedObjectDistanceMap,
26 BackFaces,
27 Labels,
28 LabelsGood, // Typically green.
29 LabelsBad, // Typically red.
30 Edges,
31 Points,
32 SelectedFaces,
33 SelectedEdges,
34 SelectedPoints,
35 SelectedFeatures,
36 UnselectedFeatures,
37 FeatureBackFaces,
38 SelectedFeatureDecorations,
39 UnselectedFeatureDecorations,
40 SelectedMeasurements,
41 UnselectedMeasurements,
42 UnselectedMeasurementsX,
43 UnselectedMeasurementsY,
44 UnselectedMeasurementsZ,
45 SelectedTemporaryMeasurements,
46 UnselectedTemporaryMeasurements,
47 Count [[maybe_unused]],
48 };
49
50 MRMESH_API static const Color& get( Type type );
51 MRMESH_API static void set( Type type, const Color& color );
52
53 MRMESH_API static const char* getName( Type type );
54
55private:
56 SceneColors();
57 SceneColors( const SceneColors& ) = delete;
58 SceneColors( SceneColors&& ) = delete;
59 ~SceneColors() = default;
60
61 static SceneColors& instance_();
62
63 std::array<Color, size_t( Count )> colors_;
64};
65
66}
#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MRCameraOrientationPlugin.h:8