Isovolume.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/Vec3d.h"
19 #include "CeeCore/Color3f.h"
20 
21 namespace cee {
22 class Image;
23 
24 namespace ug {
25 
26 class IsovolumeData;
27 
28 //==================================================================================================
29 //
30 //
31 //
32 //==================================================================================================
33 class CEE_UG_EXPORT Isovolume : public RefCountedObject
34 {
35 public:
37  enum DrawStyle
38  {
42  LINE,
43  OUTLINE
44  };
45 
46 public:
47  Isovolume();
48  virtual ~Isovolume();
49 
50  bool visible() const;
51  void setVisible(bool visible);
52  bool highlight() const;
53  void setHighlight(bool showHighlighted);
54 
55  bool volumeGeometryVisible() const;
56  void setVolumeGeometryVisible(bool show);
57  DrawStyle drawStyle() const;
58  void setDrawStyle(DrawStyle drawStyle);
59  Color3f volumeColor() const;
60  void setVolumeColor(const Color3f& color);
61  float opacity() const;
62  void setOpacity(float opacity);
63  float specularIntensity() const;
64  void setSpecularIntensity(float intensity);
65 
66  double minimumIsoValue() const;
67  void setMinimumIsoValue(double value);
68  double maximumIsoValue() const;
69  void setMaximumIsoValue(double value);
70  int isoScalarResultId() const;
71  void setIsoScalarResultId(int resultId);
72  bool computeFromVisibleParts() const;
73  void setComputeFromVisibleParts(bool visiblePartsOnly);
74 
75  int mapScalarResultId() const;
76  void setMapScalarResultId(int resultId);
77  int mapVectorResultId() const;
78  void setMapVectorResultId(int resultId);
79 
80  Image* textureImage() const;
81  void setTextureImage(Image* image);
82  bool textureEnvironmentMapping() const;
83  void setTextureEnvironmentMapping(bool useEnvironmentMapping);
84 
85  bool isPrecomputed() const;
86 
87  double sampleScalarValue(int stateId, const Vec3d& samplePosition, size_t triangleIndex = cee::UNDEFINED_SIZE_T) const;
88  Vec3d sampleVector(int stateId, const Vec3d& samplePosition, size_t triangleIndex = cee::UNDEFINED_SIZE_T) const;
89 
90  void data(int stateId, IsovolumeData* data) const;
91 
92 private:
93  CEE_PRIVATE_F(UnstructGridModel);
94  CEE_PRIVATE_IMPL(Isovolume);
95  CEE_DISALLOW_COPY_AND_ASSIGN(Isovolume);
96 };
97 
98 } // namespace ug
99 } // namespace cee
100 
Draw as outline mesh.
Definition: Isovolume.h:41
Stores an RGBA image with 8 bits per pixel.
Definition: Image.h:25
Draw as surface mesh.
Definition: Isovolume.h:40
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Draw as surface.
Definition: Isovolume.h:39
Draw as lines.
Definition: Isovolume.h:42
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
Configuration of an isovolume.
Definition: Isovolume.h:33
const size_t UNDEFINED_SIZE_T
Undefined value for size_t.
Definition: Base.h:92
Vector class for a 3D double vector.
Definition: Vec3d.h:26
DrawStyle
Isovolume surface draw styles
Definition: Isovolume.h:37
UnstructGridModel is a subclass of Model which adds specific model structure and functionality for re...
Definition: UnstructGridModel.h:72
Returns raw node coordinates and result values for an isovolume.
Definition: IsovolumeData.h:30