OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PropertiesVisUnstructuredVector.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3#include <map>
4
5class _declspec(dllexport) PropertiesVisUnstructuredVector
6{
7public:
8 enum class VisualizationType
9 {
10 Arrows3D, Arrows2D, Contour2D, UNKNOWN
11 };
12 enum class VisualizationComponent
13 {
14 X,Y,Z,Abs, UNKNOWN
15 };
16 enum class VisualizationArrowType
17 {
18 ARROW_FLAT, ARROW_SHADED, HEDGHEHOG, UNKNOWN
19 };
20
21 const std::string GetNameVisType(void) { return nameVisType; }
22 const std::string GetNameVisComponent(void) { return nameVisComponent; }
23 const std::string GetNamePhase(void) { return namePhase; }
24 const std::string GetNameTime(void) { return nameTime; }
25 const std::string GetNameMaxArrows(void) { return nameMaxArrows; }
26 const std::string GetNameArrowType(void) { return nameArrowType; }
27 const std::string GetNameArrowScale(void) { return nameArrowScale; }
28 const std::string GetNameShow2DMesh(void) { return nameShow2dMesh; }
29 const std::string GetName2DMeshColor(void) { return name2dMeshColor; }
30 const std::string GetNameShow2DIsolines(void) { return nameShow2dIsolines; }
31 const std::string GetName2DIsolineColor(void) { return name2dIsolineColor; }
32
33 const std::string GetValueArrows3D(void) { return valueArrows3D; }
34 const std::string GetValueArrows2D(void) { return valueArrows2D; }
35 const std::string GetValueContour2D(void) { return valueContour2D; }
36 const std::string GetValueComponentX(void) { return valueComponentX; }
37 const std::string GetValueComponentY(void) { return valueComponentY; }
38 const std::string GetValueComponentZ(void) { return valueComponentZ; }
39 const std::string GetValueAbsolute(void) { return valueAbsolute; }
40 const std::string GetValueArrowTypeFlat(void) { return arrowTypeFlat; }
41 const std::string GetValueArrowTypeShaded(void) { return arrowTypeShaded; }
42 const std::string GetValueArrowTypeHedgehog(void) { return arrowTypeHedgehog; }
43
44 const VisualizationType GetVisualizationType(const std::string type) const
45 {
46 VisualizationType returnVal;
47 visualizationTypeMapping.find(type) == visualizationTypeMapping.end() ? returnVal = VisualizationType::UNKNOWN : returnVal = visualizationTypeMapping.at(type);
48 return returnVal;
49 }
50
51 const VisualizationComponent GetVisualizationComponent(const std::string component)
52 {
53 VisualizationComponent returnVal;
54 visualizationComponentMapping.find(component) == visualizationComponentMapping.end() ? returnVal = VisualizationComponent::UNKNOWN : returnVal = visualizationComponentMapping.at(component);
55 return returnVal;
56 }
57
58 const VisualizationArrowType GetArrowType(const std::string type)
59 {
60 VisualizationArrowType returnVal;
61 arrowTypeMapping.find(type) == arrowTypeMapping.end() ? returnVal = VisualizationArrowType::UNKNOWN : returnVal = arrowTypeMapping.at(type);
62 return returnVal;
63 }
64
65private:
66 const std::string nameVisType = "Type";
67 const std::string nameVisComponent = "Component";
68 const std::string namePhase = "Phase";
69 const std::string nameTime = "Time";
70 const std::string nameMaxArrows = "Max. Arrows";
71 const std::string nameArrowType = "Arrow Type";
72 const std::string nameArrowScale = "Arrow Scale";
73
74 const std::string valueArrows3D = "3D Arrows";
75 const std::string valueArrows2D = "2D Arrows";
76 const std::string valueContour2D = "2D Contour";
77
78 const std::string valueComponentX = "X";
79 const std::string valueComponentY = "Y";
80 const std::string valueComponentZ = "Z";
81 const std::string valueAbsolute = "Abs";
82
83 const std::string arrowTypeFlat = "3D Flat";
84 const std::string arrowTypeShaded = "3D Shaded";
85 const std::string arrowTypeHedgehog = "Hedgehog";
86
87 const std::string nameShow2dMesh = "Show 2D Mesh";
88 const std::string name2dMeshColor = "2D Mesh Color";
89 const std::string nameShow2dIsolines = "Show Isolines";
90 const std::string name2dIsolineColor = "Isoline Color";
91
92 //Not supported yet
93 const std::string valueCarpet = "Carpet";
94 const std::string valueIsolines = "Isolines";
95
96 std::map<std::string, VisualizationType> visualizationTypeMapping { {valueArrows3D,VisualizationType::Arrows3D},{valueArrows2D,VisualizationType::Arrows2D},{valueContour2D,VisualizationType::Contour2D} };
97 std::map < std::string, VisualizationComponent> visualizationComponentMapping{ {valueComponentX,VisualizationComponent::X},{valueComponentY,VisualizationComponent::Y}, {valueComponentZ,VisualizationComponent::Z},{valueAbsolute,VisualizationComponent::Abs} };
98 std::map < std::string, VisualizationArrowType> arrowTypeMapping{ {arrowTypeFlat,VisualizationArrowType::ARROW_FLAT},{arrowTypeShaded,VisualizationArrowType::ARROW_SHADED}, {arrowTypeHedgehog,VisualizationArrowType::HEDGHEHOG} };
99};
#define X
Definition TriangleBoxOverlapTest.h:49
#define Z
Definition TriangleBoxOverlapTest.h:51
#define Y
Definition TriangleBoxOverlapTest.h:50