Salome HOME
ea975bc73f175fb6d41d594d6e87d1efca2829f5
[modules/visu.git] / src / PIPELINE / VISU_ScalarMapPL.hxx
1 //  Copyright (C) 2007-2008  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 //  VISU OBJECT : interactive object for VISU entities implementation
23 // File:    VISU_ScalarMapPL.hxx
24 // Author:  Alexey PETROV
25 // Module : VISU
26 //
27 #ifndef VISU_ScalarMapPL_HeaderFile
28 #define VISU_ScalarMapPL_HeaderFile
29
30 #include "VISUPipeline.hxx"
31 #include "VISU_MergedPL.hxx"
32 #include "VISU_ColoredPL.hxx"
33 #include "VISU_UnstructuredGridPL.hxx"
34
35 class VISU_DataSetMapperHolder;
36 class VISU_ElnoAssembleFilter;
37 class VISU_AppendFilter;
38 class VISU_MergeFilter;
39
40
41 //----------------------------------------------------------------------------
42 class VISU_PIPELINE_EXPORT VISU_ScalarMapPL : public VISU_MergedPL,
43                                               public VISU_ColoredPL,
44                                               public VISU_UnstructuredGridPL
45 {
46 public:
47   vtkTypeMacro(VISU_ScalarMapPL, VISU_ColoredPL);
48
49   static 
50   VISU_ScalarMapPL* 
51   New();
52
53   virtual
54   unsigned long int 
55   GetMTime();
56
57   //----------------------------------------------------------------------------
58   virtual
59   void
60   Update();
61
62   virtual
63   void
64   SetSourceGeometry();
65
66   virtual
67   int
68   AddGeometry(vtkDataSet* theGeometry, const VISU::TName& theGeomName);
69
70   virtual
71   vtkDataSet*
72   GetGeometry(int theGeomNumber, VISU::TName& theGeomName);
73
74   virtual
75   int
76   GetNumberOfGeometry();
77
78   bool 
79   IsExternalGeometryUsed();
80
81   virtual
82   void
83   ClearGeometry();
84
85   virtual
86   void
87   GetSourceRange(vtkFloatingPointType theRange[2]);
88
89   virtual
90   void
91   SetGaussMetric(VISU::TGaussMetric theGaussMetric);
92   
93   virtual
94   VISU::TGaussMetric
95   GetGaussMetric();
96
97   //----------------------------------------------------------------------------
98   virtual 
99   vtkPointSet* 
100   GetMergedInput();
101
102 protected:
103   //----------------------------------------------------------------------------
104   VISU_ScalarMapPL();
105   
106   virtual
107   ~VISU_ScalarMapPL();
108
109   virtual
110   void
111   OnCreateMapperHolder();
112
113   virtual
114   vtkDataSet* 
115   InsertCustomPL();
116
117   virtual
118   void
119   Build();
120
121   virtual
122   void
123   DoShallowCopy(VISU_PipeLine *thePipeLine,
124                 bool theIsCopyInput);
125
126   void
127   SetElnoDisassembleState( bool theIsShrunk );
128
129 private:
130   VISU_ScalarMapPL(const VISU_ScalarMapPL&);  // Not implemented.
131   void operator=(const VISU_ScalarMapPL&);  // Not implemented.
132
133   vtkSmartPointer< VISU_ElnoAssembleFilter > myElnoAssembleFilter;
134   vtkSmartPointer< VISU_AppendFilter > myAppendFilter;
135   vtkSmartPointer< VISU_MergeFilter > myMergeFilter;
136 };
137   
138 #endif