Salome HOME
Porting to VTK 6.
[modules/visu.git] / src / PIPELINE / VISU_DeformationPL.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 //  File   : VISU_DeformationPL.hxx
21 //  Author : 
22 //  Module : SALOME
23 //
24 #ifndef VISU_DeformationPL_HeaderFile
25 #define VISU_DeformationPL_HeaderFile
26
27 #include "VISUPipeline.hxx"
28 #include "VISU_MapperHolder.hxx"
29 #include <vtkSmartPointer.h>
30
31 class vtkDataSet;
32 class VISU_MergeFilter;
33 class vtkPassThroughFilter;
34 class vtkWarpVector;
35 class VISU_CellDataToPointData;
36
37 class VISU_PIPELINE_EXPORT VISU_DeformationPL {
38   
39 public:
40   VISU_DeformationPL();
41   virtual ~VISU_DeformationPL();
42
43   //-----------------------------------------------------------
44   virtual void SetScale(double theScaleFactor);
45   virtual void SetMapScale(double theMapScaleFactor);
46   virtual double GetScale();
47
48   //-----------------------------------------------------------
49   virtual void SetVectorialField(VISU::PUnstructuredGridIDMapper theIdMapper) = 0;
50   virtual VISU::PUnstructuredGridIDMapper getVectorialField() = 0;
51
52
53   //-----------------------------------------------------------
54   virtual 
55   unsigned 
56   long int
57   GetMTime();
58
59   static double GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine);
60
61   void SetWarpVectorInput(vtkDataSet *theInput);
62   vtkDataSet* GetWarpVectorOutput();
63   vtkAlgorithmOutput* GetWarpVectorOutputPort();
64
65   //-----------------------------------------------------------
66   void SetMergeFilterInput(vtkDataSet* ScalarInput,
67                            vtkDataSet* VectorialInput);
68
69   vtkDataSet* GetMergeFilterOutput();
70
71 protected:
72
73   VISU::PUnstructuredGridIDMapper myVectorialField;
74   vtkWarpVector *myWarpVector;
75   vtkSmartPointer<VISU_MergeFilter> myVectorMergeFilter;
76   vtkPassThroughFilter *myInputPassFilter;
77   vtkPassThroughFilter *myOutputPassFiler;
78   VISU_CellDataToPointData *myCellDataToPointData;
79
80 private:
81   double myScaleFactor;
82   double myMapScaleFactor;
83
84 };
85
86 #endif