ModelSettings.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: UnstructGrid
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2014, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeUnstructGrid/Base.h"
16 #include "CeeCore/Color3f.h"
17 #include "CeeCore/Str.h"
18 
19 #include "CeeVisualization/Font.h"
20 
21 namespace cee {
22 
23 namespace ug {
24 
25 //==================================================================================================
26 //
27 //
28 //
29 //==================================================================================================
30 class CEE_UG_EXPORT ModelSettings
31 {
32 public:
35  {
37  OUTLINE
38  };
39 
43  {
44  AUTO,
46  BACK_FACE_CULLING
47  };
48 
49 public:
50  virtual ~ModelSettings();
51 
52  Color3f meshColor() const;
53  void setMeshColor(const Color3f& meshColor);
54 
55  Color3f highlightColor() const;
56  void setHighlightColor(const Color3f& color);
57 
58  float ambientIntensity() const;
59  void setAmbientIntensity(float intensity);
60 
61  bool showUndeformedModel() const;
62  void setShowUndeformedModel(bool show);
63 
64  UndeformedDrawStyle undeformedModelDrawStyle() const;
65  void setUndeformedModelDrawStyle(UndeformedDrawStyle drawStyle);
66 
67  Color3f undeformedModelColor() const;
68  void setUndeformedModelColor(Color3f color);
69 
70  bool undeformedModelUsePartColor() const;
71  void setUndeformedModelUsePartColor(bool usePartColor);
72 
73  bool useShaderPrograms() const;
74  bool setUseShaderPrograms(bool useShaderPrograms);
75 
76  bool useVertexBufferObjects() const;
77  void setUseVertexBufferObjects(bool useVBOs);
78 
79  bool useShaderComputedFlatNormals() const;
80  void setUseShaderComputedFlatNormals(bool useShaderComputedNormals);
81 
82  bool useShaderBasedModeShapeAnimation() const;
83  void setUseShaderBasedModeShapeAnimation(bool useShaderBasedAnimation);
84 
85  vis::Font* colorLegendTitleFont();
86  void setColorLegendTitleFont(vis::Font* font);
87 
88  vis::Font* colorLegendDetailsFont();
89  void setColorLegendDetailsFont(vis::Font* font);
90 
91  Str colorLegendNoResultOverrideTickMarksText() const;
92  void setColorLegendNoResultOverrideTickMarksText(const Str& overrideText);
93 
94  bool optimizePartRendering() const;
95  void setOptimizePartRendering(bool optimize);
96 
97  bool removeInternalSurfaces() const;
98  void setRemoveInternalSurfaces(bool removeInternalSurfaces);
99 
100  double outlineMeshCreaseAngleDegrees() const;
101  void setOutlineMeshCreaseAngleDegrees(double creaseAngleDegrees);
102 
103  double maximumOutlineMeshCreaseAngleDegrees() const;
104  void setMaximumOutlineMeshCreaseAngleDegrees(double creaseAngleDegrees);
105 
106  double smoothSurfaceNormalsCreaseAngleDegrees() const;
107  void setSmoothSurfaceNormalsCreaseAngleDegrees(double creaseAngleDegrees);
108 
109  bool mustBeBehindAllCuttingPlanesToClip() const;
110  void setMustBeBehindAllCuttingPlanesToClip(bool mustBeBehindAllToClip);
111 
112  bool isViewClippingIgnored() const;
113  void setIgnoreViewClipping(bool ignore);
114 
115  bool useFirstOrderElementNodesOnly() const;
116  void setUseFirstOrderElementNodesOnly(bool useFirstOrderOnly);
117 
118  SimpleTransparencyCullMode simpleTransparencyCullMode() const;
119  void setSimpleTransparencyCullMode(SimpleTransparencyCullMode mode);
120 
121 private:
122  ModelSettings();
123  CEE_PRIVATE_F(UnstructGridModel);
124  CEE_PRIVATE_IMPL(ModelSettings);
125  CEE_DISALLOW_COPY_AND_ASSIGN(ModelSettings);
126 };
127 
128 } // namespace ug
129 } // namespace cee
SimpleTransparencyCullMode
Specify if transparent triangles seen from the back side should be rendered or not. Note: This applies only to simple TransparencyMode::SIMPLE or when using transparent fringes colors.
Definition: ModelSettings.h:42
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
UndeformedDrawStyle
The draw style to use for the undeformed model.
Definition: ModelSettings.h:34
A general unicode based string class.
Definition: Str.h:28
Various settings for the unstructured grid model.
Definition: ModelSettings.h:30
Show undeformed model as lines.
Definition: ModelSettings.h:36
Class for storing an RGB color triplet.
Definition: Color3f.h:25
Draw all transparent triangles.
Definition: ModelSettings.h:45
Try to detect if the part is a closed volume or not. If it is, back face culling is enabled...
Definition: ModelSettings.h:44
UnstructGridModel is a subclass of Model which adds specific model structure and functionality for re...
Definition: UnstructGridModel.h:72
A font used for text drawing.
Definition: Font.h:30