PartSettings.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: UnstructGrid
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, 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 
17 #include "CeeCore/RefCountedObject.h"
18 #include "CeeCore/Color3f.h"
19 
20 namespace cee {
21 class Image;
22 
23 namespace ug {
24 class PartSettingsTexture;
25 
26 //==================================================================================================
27 //
28 //
29 //
30 //==================================================================================================
31 class CEE_UG_EXPORT PartSettings : public RefCountedObject
32 {
33 public:
35  enum DrawStyle
36  {
44  NONE
45  };
46 
49  {
50  LESS,
51  LEQUAL
52  };
53 
54 public:
55  virtual ~PartSettings();
56 
57  int geometryIndex() const;
58  int partId() const;
59 
60  bool visible() const;
61  void setVisible(bool visible);
62  bool highlight() const;
63  void setHighlight(bool showHighlighted);
64 
65  float eyeLiftFactor() const;
66  void setEyeLiftFactor(float factor);
67 
68  bool lighting() const;
69  void setLighting(bool enable);
70 
71  DrawStyle drawStyle() const;
72  void setDrawStyle(DrawStyle drawStyle);
73  bool smoothShading() const;
74  void setSmoothShading(bool enable);
75  Color3f color() const;
76  void setColor(const Color3f& color);
77  Color3f backColor() const;
78  void setFrontAndBackColor(const Color3f& frontColor, const Color3f& backColor);
79  float opacity() const;
80  void setOpacity(float opacity);
81  float specularIntensity() const;
82  void setSpecularIntensity(float intensity);
83 
84  unsigned int lineWidth() const;
85  void setLineWidth(unsigned int lineWidth);
86  unsigned int pointSize() const;
87  void setPointSize(unsigned int pointSize);
88  unsigned int meshLineWidth() const;
89  void setMeshLineWidth(unsigned int lineWidth);
90 
91  bool fringesVisible() const;
92  void setFringesVisible(bool visible);
93  bool contourLinesVisible() const;
94  void setContourLinesVisible(bool visible);
95  bool vectorsVisible() const;
96  void setVectorsVisible(bool visible);
97  bool displacementVisible() const;
98  void setDisplacementVisible(bool visible);
99 
100  bool elementSetFilteringEnabled() const;
101  void setElementSetFilteringEnabled(bool enable);
102 
103  void setIntersectable(bool intersectable);
104  bool intersectable() const;
105 
106  bool alwaysUsePolygonOffset() const;
107  void setAlwaysUsePolygonOffset(bool alwaysUse);
108 
109  void setPriority(int drawOrderPriority);
110  int priority() const;
111  void setDepthTestFunction(DepthTestFunc depthTestFunction);
112  DepthTestFunc depthTestFunction() const;
113 
114  const PartSettingsTexture& textureSettings() const;
115  PartSettingsTexture& textureSettings();
116 
117 private:
118  PartSettings();
119  CEE_PRIVATE_F(UnstructGridModel);
120  CEE_PRIVATE_IMPL(PartSettings);
121  CEE_DISALLOW_COPY_AND_ASSIGN(PartSettings);
122 };
123 
124 } // namespace ug
125 } // namespace cee
126 
Draw as points.
Definition: PartSettings.h:41
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Draw as surface mesh.
Definition: PartSettings.h:38
Passes if the incoming depth value is less than the stored depth value. This is the default...
Definition: PartSettings.h:50
Draw as outline mesh.
Definition: PartSettings.h:39
Draw as outline.
Definition: PartSettings.h:42
DepthTestFunc
Depth test functions.
Definition: PartSettings.h:48
Draw as lines (wireframe)
Definition: PartSettings.h:40
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Class for storing an RGB color triplet.
Definition: Color3f.h:25
UnstructGridModel is a subclass of Model which adds specific model structure and functionality for re...
Definition: UnstructGridModel.h:72
Settings for a specific part.
Definition: PartSettings.h:31
Draw as surface.
Definition: PartSettings.h:37
Texture part settings.
Definition: PartSettingsTexture.h:29
Draw hidden lines but remove lines that are obscured by the part itself or other parts.
Definition: PartSettings.h:43
DrawStyle
Part draw styles.
Definition: PartSettings.h:35