]> SALOME platform Git repositories - modules/visu.git/blob - src/PIPELINE/VISU_DataSetMapperHolder.hxx
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / PIPELINE / VISU_DataSetMapperHolder.hxx
1 //  VISU OBJECT : interactive object for VISU entities implementation
2 //
3 //  Copyright (C) 2003  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 // File:    VISU_DataSetMapperHolder.hxx
24 // Author:  Alexey PETROV
25 // Module : VISU
26
27 #ifndef VISU_DataSetMapperHolder_HeaderFile
28 #define VISU_DataSetMapperHolder_HeaderFile
29
30 #include "VISU_MapperHolder.hxx"
31
32 class vtkDataSetMapper;
33 class vtkUnstructuredGrid;
34 class SALOME_ExtractGeometry;
35
36
37 //----------------------------------------------------------------------------
38 class VISU_DataSetMapperHolder : public VISU_MapperHolder
39 {
40 public:
41   vtkTypeMacro(VISU_DataSetMapperHolder, VISU_MapperHolder);
42
43   static 
44   VISU_DataSetMapperHolder* 
45   New();
46
47   //----------------------------------------------------------------------------
48   virtual
49   void
50   ShallowCopy(VISU_MapperHolder *theMapperHolder,
51               bool theIsCopyInput);
52
53   //! Gets memory size used by the instance (bytes).
54   virtual
55   unsigned long int
56   GetMemorySize();
57
58   //----------------------------------------------------------------------------
59   void 
60   SetUnstructuredGridIDMapper(const VISU::PUnstructuredGridIDMapper& theIDMapper);
61
62   const VISU::PUnstructuredGridIDMapper&
63   GetUnstructuredGridIDMapper();
64
65   virtual
66   vtkUnstructuredGrid* 
67   GetUnstructuredGridInput();
68
69   virtual 
70   vtkDataSetMapper* 
71   GetDataSetMapper();
72
73   //----------------------------------------------------------------------------
74   virtual
75   vtkIdType
76   GetNodeObjID(vtkIdType theID);
77
78   virtual
79   vtkIdType
80   GetNodeVTKID(vtkIdType theID);
81
82   virtual
83   vtkFloatingPointType* 
84   GetNodeCoord(vtkIdType theObjID);
85
86   virtual
87   vtkIdType
88   GetElemObjID(vtkIdType theID);
89
90   virtual
91   vtkIdType
92   GetElemVTKID(vtkIdType theID);
93
94   virtual
95   vtkCell*
96   GetElemCell(vtkIdType theObjID);
97
98   //----------------------------------------------------------------------------
99   virtual
100   void
101   SetImplicitFunction(vtkImplicitFunction *theFunction);
102
103   virtual
104   vtkImplicitFunction* 
105   GetImplicitFunction();
106
107   virtual
108   void
109   SetExtractInside(bool theMode);
110
111   virtual
112   void
113   SetExtractBoundaryCells(bool theMode);
114
115   //----------------------------------------------------------------------------
116   // Clipping planes
117   virtual
118   void 
119   RemoveAllClippingPlanes();
120
121   virtual
122   vtkIdType
123   GetNumberOfClippingPlanes();
124
125   virtual
126   bool
127   AddClippingPlane(vtkPlane* thePlane);
128
129   virtual
130   vtkPlane* 
131   GetClippingPlane(vtkIdType theID);
132
133 protected:
134   //----------------------------------------------------------------------------
135   VISU_DataSetMapperHolder();
136   VISU_DataSetMapperHolder(const VISU_DataSetMapperHolder&);
137
138   virtual
139   ~VISU_DataSetMapperHolder();
140
141   //----------------------------------------------------------------------------
142   virtual
143   void
144   OnCreateMapper();
145
146   void 
147   SetDataSetMapper(vtkDataSetMapper* theMapper);
148
149   //----------------------------------------------------------------------------
150   virtual
151   void
152   SetLookupTable(VISU_LookupTable* theLookupTable);
153
154   virtual
155   vtkPointSet* 
156   GetClippedInput();
157
158 private:
159   //----------------------------------------------------------------------------
160   VISU::PUnstructuredGridIDMapper myUnstructuredGridIDMapper;
161   vtkSmartPointer<vtkDataSetMapper> myDataSetMapper;
162   vtkSmartPointer<SALOME_ExtractGeometry> myExtractGeometry; //!< Clipping
163 };
164
165 #endif