Salome HOME
Update copyright information
[modules/visu.git] / src / PIPELINE / VISU_DeformedShapeAndScalarMapPL.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  VISU OBJECT : interactive object for VISU entities implementation
21 // File:    VISU_DeformedShapeAndScalarMapPL.hxx
22 // Author:  Eugeny Nikolaev
23 // Module : VISU
24 //
25 #ifndef VISU_DeformedShapeAndScalarMapPL_HeaderFile
26 #define VISU_DeformedShapeAndScalarMapPL_HeaderFile
27
28 #include "VISUPipeline.hxx"
29 #include "VISU_ScalarMapPL.hxx"
30
31 class VISU_MergeFilter;
32 class vtkWarpVector;
33 class vtkUnstructuredGrid;
34 class VISU_CellDataToPointData;
35 class vtkPointDataToCellData;
36 class VISU_ElnoDisassembleFilter;
37 class SALOME_ExtractGeometry;
38 class vtkImplicitFunction;
39
40
41 //----------------------------------------------------------------------------
42 class VISU_PIPELINE_EXPORT VISU_DeformedShapeAndScalarMapPL : public VISU_ScalarMapPL
43 {
44 public:
45   vtkTypeMacro(VISU_DeformedShapeAndScalarMapPL, VISU_ScalarMapPL);
46
47   static 
48   VISU_DeformedShapeAndScalarMapPL* 
49   New();
50
51   virtual
52   void
53   SetScale(vtkFloatingPointType theScale);
54
55   virtual
56   vtkFloatingPointType
57   GetScale();
58
59   virtual
60   int
61   GetScalarMode();
62
63   virtual
64   void
65   SetScalarMode(int theScalarMode = 0);
66
67   virtual
68   void
69   SetScaling(int theScaling);
70   
71   virtual
72   void
73   SetScalarRange(vtkFloatingPointType theRange[2]);
74
75   virtual
76   vtkFloatingPointType* 
77   GetScalarRange();
78
79   virtual
80   void
81   GetSourceRange(vtkFloatingPointType theRange[2]);
82
83   virtual
84   void
85   SetGaussMetric(VISU::TGaussMetric theGaussMetric);
86   
87   virtual
88   VISU::TGaussMetric
89   GetGaussMetric();
90
91   virtual
92   void
93   SetScalars(vtkDataSet *theScalars);
94
95   virtual
96   vtkDataSet* 
97   GetScalars();
98
99   virtual
100   void 
101   RemoveAllClippingPlanes();
102
103   virtual
104   void
105   RemoveClippingPlane(vtkIdType theID);
106
107   virtual
108   bool
109   AddClippingPlane(vtkPlane* thePlane);
110
111   virtual
112   void
113   SetImplicitFunction(vtkImplicitFunction *theFunction);
114
115   virtual
116   vtkImplicitFunction* 
117   GetImplicitFunction();
118
119 public:
120   //! Redefined method for initialization of the pipeline.
121   virtual
122   void
123   Init();
124
125   //! Redefined method for building the pipeline.
126   virtual
127   void
128   Build();
129
130   //! Redefined method for updating the pipeline.
131   virtual
132   void
133   Update();
134
135   //! Gets memory size used by the instance (bytes).
136   virtual
137   unsigned long int
138   GetMemorySize();
139
140   //! Update scalars.
141   void
142   UpdateScalars();
143   
144   virtual
145   void
146   SetMapScale(vtkFloatingPointType theMapScale = 1.0);
147   
148 protected:
149   VISU_DeformedShapeAndScalarMapPL();
150   
151   virtual
152   ~VISU_DeformedShapeAndScalarMapPL();
153   
154   virtual
155   vtkDataSet* 
156   InsertCustomPL();
157
158   virtual
159   void
160   DoShallowCopy(VISU_PipeLine *thePipeLine,
161                 bool theIsCopyInput);
162
163 private:
164   VISU_DeformedShapeAndScalarMapPL(const VISU_DeformedShapeAndScalarMapPL&);
165
166   vtkFloatingPointType myScaleFactor;
167   vtkFloatingPointType myMapScaleFactor;
168   vtkWarpVector  *myWarpVector;
169   VISU_MergeFilter *myScalarsMergeFilter;
170   vtkSmartPointer<vtkUnstructuredGrid> myScalars;
171   VISU_CellDataToPointData* myCellDataToPointData;
172   VISU_FieldTransform* myScalarsFieldTransform;
173   VISU_Extractor* myScalarsExtractor;
174   VISU_ElnoDisassembleFilter* myScalarsElnoDisassembleFilter;
175   SALOME_ExtractGeometry* myExtractGeometry;
176 };
177
178 #endif