Isosurface.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 namespace ug {
23 
24 class IsosurfaceData;
25 
26 //==================================================================================================
27 //
28 //
29 //
30 //==================================================================================================
31 class CEE_UG_EXPORT Isosurface : public RefCountedObject
32 {
33 public:
35  enum DrawStyle
36  {
40  LINE,
41  OUTLINE
42  };
43 
44 public:
45  Isosurface();
46  virtual ~Isosurface();
47 
48  bool visible() const;
49  void setVisible(bool visible);
50  bool highlight() const;
51  void setHighlight(bool showHighlighted);
52 
53  bool surfaceGeometryVisible() const;
54  void setSurfaceGeometryVisible(bool show);
55  DrawStyle drawStyle() const;
56  void setDrawStyle(DrawStyle drawStyle);
57  Color3f surfaceColor() const;
58  void setSurfaceColor(const Color3f& color);
59  float opacity() const;
60  void setOpacity(float opacity);
61  float specularIntensity() const;
62  void setSpecularIntensity(float intensity);
63 
64  double isoValue() const;
65  void setIsoValue(double value);
66  int isoScalarResultId() const;
67  void setIsoScalarResultId(int resultId);
68  bool computeFromVisibleParts() const;
69  void setComputeFromVisibleParts(bool visiblePartsOnly);
70 
71  int mapScalarResultId() const;
72  void setMapScalarResultId(int resultId);
73  int mapVectorResultId() const;
74  void setMapVectorResultId(int resultId);
75  int mapContourLinesResultId() const;
76  void setMapContourLinesResultId(int resultId);
77 
78  bool isPrecomputed() const;
79 
80  double sampleScalarValue(int stateId, const Vec3d& samplePosition, size_t triangleIndex = cee::UNDEFINED_SIZE_T) const;
81  Vec3d sampleVector(int stateId, const Vec3d& samplePosition, size_t triangleIndex = cee::UNDEFINED_SIZE_T) const;
82 
83  void data(int stateId, IsosurfaceData* data) const;
84 
85 private:
86  CEE_PRIVATE_F(UnstructGridModel);
87  CEE_PRIVATE_IMPL(Isosurface);
88  CEE_DISALLOW_COPY_AND_ASSIGN(Isosurface);
89 };
90 
91 } // namespace ug
92 } // namespace cee
93 
Draw as lines.
Definition: Isosurface.h:40
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Draw as surface mesh.
Definition: Isosurface.h:38
Returns raw node coordinates and result values for an isosurface.
Definition: IsosurfaceData.h:30
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Draw as outline mesh.
Definition: Isosurface.h:39
Class for storing an RGB color triplet.
Definition: Color3f.h:25
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
UnstructGridModel is a subclass of Model which adds specific model structure and functionality for re...
Definition: UnstructGridModel.h:72
Draw as surface.
Definition: Isosurface.h:37
Configuration of an isosurface.
Definition: Isosurface.h:31
DrawStyle
Isosurface surface draw styles.
Definition: Isosurface.h:35