Salome HOME
Merge from V5_1_main 10/06/2010
[modules/visu.git] / src / PIPELINE / VISU_DeformationPL.hxx
1 //  Copyright (C) 2007-2010  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 vtkCellDataToPointData;
36
37 class VISU_PIPELINE_EXPORT VISU_DeformationPL {
38   
39 public:
40   VISU_DeformationPL();
41   virtual ~VISU_DeformationPL();
42
43   //-----------------------------------------------------------
44   virtual void SetScale(vtkFloatingPointType theScaleFactor);
45   virtual void SetMapScale(vtkFloatingPointType theMapScaleFactor);
46   virtual vtkFloatingPointType 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 vtkFloatingPointType GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine);
60
61   void SetWarpVectorInput(vtkDataSet *theInput);
62   vtkDataSet* GetWarpVectorOutput();
63
64   //-----------------------------------------------------------
65   void SetMergeFilterInput(vtkDataSet* ScalarInput,
66                            vtkDataSet* VectorialInput);
67
68   vtkDataSet* GetMergeFilterOutput();
69
70 protected:
71
72   VISU::PUnstructuredGridIDMapper myVectorialField;
73   vtkWarpVector *myWarpVector;
74   vtkSmartPointer<VISU_MergeFilter> myVectorMergeFilter;
75   vtkPassThroughFilter *myInputPassFilter;
76   vtkPassThroughFilter *myOutputPassFiler;
77   vtkCellDataToPointData *myCellDataToPointData;
78
79 private:
80   vtkFloatingPointType myScaleFactor;
81   vtkFloatingPointType myMapScaleFactor;
82
83 };
84
85 #endif