Salome HOME
Update copyright information
[modules/visu.git] / src / PIPELINE / VISU_FieldTransform.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  VISU OBJECT : interactive object for VISU entities implementation
24 //  File   : VISU_FieldTransform.hxx
25 //  Author : Alexey PETROV
26 //  Module : VISU
27 //
28 #ifndef VISU_FieldTransform_HeaderFile
29 #define VISU_FieldTransform_HeaderFile
30
31 #include <vtkDataSetAlgorithm.h>
32
33 #include "VISUPipeline.hxx"
34
35 class VTKViewer_Transform;
36
37 class VISU_PIPELINE_EXPORT VISU_FieldTransform : public vtkDataSetAlgorithm
38 {
39 public:
40   vtkTypeMacro(VISU_FieldTransform, vtkDataSetAlgorithm);
41
42   static 
43   VISU_FieldTransform
44   *New();
45
46   virtual
47   unsigned long 
48   GetMTime();
49   
50   static
51   double
52   Ident(double theArg);
53
54   static
55   double
56   Log10(double theArg);
57
58   typedef double (*TTransformFun)(double);
59
60   void
61   SetScalarTransform(TTransformFun theFunction);
62
63   TTransformFun
64   GetScalarTransform() 
65   {
66     return myFunction;
67   }
68
69   void
70   SetSpaceTransform(VTKViewer_Transform* theTransform);
71
72   VTKViewer_Transform* 
73   GetSpaceTransform() 
74   {
75     return myTransform;
76   }
77
78   vtkFloatingPointType* 
79   GetScalarRange()
80   {
81     return myScalarRange; 
82   }
83   
84   void
85   SetScalarRange(vtkFloatingPointType theScalarRange[2]);
86
87   void
88   SetScalarMin(vtkFloatingPointType theValue);
89
90   void
91   SetScalarMax(vtkFloatingPointType theValue);
92
93 protected:
94   VISU_FieldTransform();
95
96   virtual
97   ~VISU_FieldTransform();
98
99   virtual
100   int
101   RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
102
103   VTKViewer_Transform *myTransform;
104   TTransformFun myFunction;
105   vtkFloatingPointType myScalarRange[2];
106   
107 private:
108   VISU_FieldTransform(const VISU_FieldTransform&);
109   void operator=(const VISU_FieldTransform&);
110 };
111
112 #endif