OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PropertiesVis2D3D.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3#include <map>
4
5class _declspec(dllexport) PropertiesVis2D3D
6{
7public:
8 enum class VisualizationType
9 {
10 Arrows, Contour, UNKNOWN
11 };
12 enum class VisualizationComponent
13 {
14 X,Y,Z,Abs, UNKNOWN
15 };
16
17 const std::string GetNameVisType(void) { return nameVisType; }
18 const std::string GetNameVisComponent(void) { return nameVisComponent; }
19 const std::string GetNamePhase(void) { return namePhase; }
20 const std::string GetNameTime(void) { return nameTime; }
21 const std::string GetNamePlotDownSampling(void) { return namePlotDownSampling; }
22
23 const std::string GetValueArrows(void) { return valueArrows; }
24 const std::string GetValueContour(void) { return valueContour; }
25 const std::string GetValueComponentX(void) { return valueComponentX; }
26 const std::string GetValueComponentY(void) { return valueComponentY; }
27 const std::string GetValueComponentZ(void) { return valueComponentZ; }
28 const std::string GetValueAbsolute(void) { return valueAbsolute; }
29
30 const VisualizationType GetVisualizationType(const std::string type) const
31 {
32 VisualizationType returnVal;
33 visualizationTypeMapping.find(type) == visualizationTypeMapping.end() ? returnVal = VisualizationType::UNKNOWN : returnVal = visualizationTypeMapping.at(type);
34 return returnVal;
35 }
36
37 const VisualizationComponent GetVisualizationComponent(const std::string component)
38 {
39 VisualizationComponent returnVal;
40 visualizationComponentMapping.find(component) == visualizationComponentMapping.end() ? returnVal = VisualizationComponent::UNKNOWN : returnVal = visualizationComponentMapping.at(component);
41 return returnVal;
42 }
43
44private:
45 const std::string nameVisType = "Type";
46 const std::string nameVisComponent = "Component";
47 const std::string namePhase = "Phase";
48 const std::string nameTime = "Time";
49 const std::string namePlotDownSampling = "Down Sampling";
50
51 const std::string valueArrows = "Arrows";
52 const std::string valueContour = "Contour";
53
54 const std::string valueComponentX = "X";
55 const std::string valueComponentY = "Y";
56 const std::string valueComponentZ = "Z";
57 const std::string valueAbsolute = "Abs";
58
59 //Not supported yet
60 const std::string valueCarpet = "Carpet";
61 const std::string valueIsolines = "Isolines";
62
63 std::map<std::string, VisualizationType> visualizationTypeMapping { {valueArrows,VisualizationType::Arrows},{valueContour,VisualizationType::Contour} };
64 std::map < std::string, VisualizationComponent> visualizationComponentMapping{ {valueComponentX,VisualizationComponent::X},{valueComponentY,VisualizationComponent::Y}, {valueComponentZ,VisualizationComponent::Z},{valueAbsolute,VisualizationComponent::Abs} };
65};
#define X
Definition TriangleBoxOverlapTest.h:49
#define Z
Definition TriangleBoxOverlapTest.h:51
#define Y
Definition TriangleBoxOverlapTest.h:50