ModelSpec.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 #include "CeeUnstructGrid/ModeShapeAnimation.h"
17 
18 #include "CeeCore/RefCountedObject.h"
19 
20 #include <vector>
21 #include <map>
22 
23 namespace cee {
24 namespace ug {
25 
26 
27 
28 class UnstructGridModelPrivate;
29 
30 //==================================================================================================
31 //
32 //
33 //
34 //==================================================================================================
35 class CEE_UG_EXPORT ModelSpec
36 {
37 public:
40  {
41  PART,
42  SET,
43  ELEMENT_TYPE
44  };
45 
46 public:
47  virtual ~ModelSpec();
48 
49  std::vector<int> stateIds() const;
50  void setStateIds(const std::vector<int>& stateIds);
51  void setStateId(int stateId);
52 
53  int fringesResultId() const;
54  void setFringesResultId(int fringesId);
55  int effectiveFringesResultId(size_t globalGeometryIndex, int partId) const;
56  std::vector<int> allFringesResultIds() const;
57 
58  int overridePartFringesResultId(size_t globalGeometryIndex, int partId) const;
59  void setOverridePartFringesResultId(size_t globalGeometryIndex, int partId, int fringesId);
60  void removeAllOverridePartFringesResultIds();
61 
62  int contourLinesResultId() const;
63  void setContourLinesResultId(int contourLinesId);
64 
65  std::vector<int> vectorResultIds() const;
66  void setVectorResultIds(const std::vector<int>& vectorIds);
67  void setVectorResultId(int vectorId);
68 
69  int displacementResultId() const;
70  void setDisplacementResultId(int displacementId);
71 
72  bool transformationResult() const;
73  void setTransformationResult(bool useTransformationResult);
74 
75  std::vector<int> visibleSetIds() const;
76  void setVisibleSetIds(const std::vector<int>& setIds);
77  void setVisibleSetId(int setId);
78  bool showComplementOfVisibleSets() const;
79  void setShowComplementOfVisibleSets(bool showComplement);
80 
81  bool visibilityResult() const;
82  void setVisibilityResult(bool useVisibilityResult);
83 
84  ModelColorSource modelColorSource() const;
85  void setModelColorSource(ModelColorSource colorSource);
86 
87  ModeShapeAnimation& modeShapeAnimation();
88  const ModeShapeAnimation& modeShapeAnimation() const;
89 
90  void clear();
91 
92  void setDefaultResults();
93  void removeInvalidSpecifications();
94 
95 public:
96  std::map<std::pair<size_t, int>, int> internal_partFringesResultIdMap() const;
97 
98 private:
99  ModelSpec();
100 
101  CEE_BASE_F(UnstructGridModel);
102  CEE_PRIVATE_F(UnstructGridModel);
103  CEE_PRIVATE_IMPL(ModelSpec);
104  CEE_DISALLOW_COPY_AND_ASSIGN(ModelSpec);
105 };
106 
107 } // namespace ug
108 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Settings for mode shape animation.
Definition: ModeShapeAnimation.h:31
Use set colors.
Definition: ModelSpec.h:42
Use part colors (default)
Definition: ModelSpec.h:41
The model specification.
Definition: ModelSpec.h:35
UnstructGridModel is a subclass of Model which adds specific model structure and functionality for re...
Definition: UnstructGridModel.h:72
ModelColorSource
Model color source. This will determine how to color each face of the model if no fringes results are...
Definition: ModelSpec.h:39