]> SALOME platform Git repositories - modules/visu.git/blob - src/PIPELINE/VISU_PolyDataMapperHolder.hxx
Salome HOME
524c49ae78f1fb3bfbe9c1b75b2a5ee7cf5aa14c
[modules/visu.git] / src / PIPELINE / VISU_PolyDataMapperHolder.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_PolyDataMapperHolder.hxx
24 // Author:  Alexey PETROV
25 // Module : VISU
26 //
27 #ifndef VISU_PolyDataMapperHolder_HeaderFile
28 #define VISU_PolyDataMapperHolder_HeaderFile
29
30 #include "VISU_MapperHolder.hxx"
31
32 class vtkPolyDataMapper;
33 class vtkPolyData;
34 class SALOME_ExtractPolyDataGeometry;
35
36
37 //----------------------------------------------------------------------------
38 class VISU_PolyDataMapperHolder : public VISU_MapperHolder
39 {
40 public:
41   vtkTypeMacro(VISU_PolyDataMapperHolder, VISU_MapperHolder);
42
43   static 
44   VISU_PolyDataMapperHolder* 
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   SetPolyDataIDMapper(const VISU::PPolyDataIDMapper& theIDMapper);
61
62   const VISU::PPolyDataIDMapper&
63   GetPolyDataIDMapper();
64
65   virtual
66   vtkPolyData* 
67   GetPolyDataInput();
68
69   virtual 
70   vtkPolyDataMapper* 
71   GetPolyDataMapper();
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   void RemoveClippingPlane(vtkIdType theID);
134
135 protected:
136   //----------------------------------------------------------------------------
137   VISU_PolyDataMapperHolder();
138   VISU_PolyDataMapperHolder(const VISU_PolyDataMapperHolder&);
139
140   virtual
141   ~VISU_PolyDataMapperHolder();
142
143   //----------------------------------------------------------------------------
144   virtual
145   void
146   OnCreateMapper();
147
148   void 
149   SetPolyDataMapper(vtkPolyDataMapper* theMapper);
150
151   //----------------------------------------------------------------------------
152   virtual
153   void
154   SetLookupTable(VISU_LookupTable* theLookupTable);
155
156   virtual
157   vtkPointSet* 
158   GetClippedInput();
159
160 private:
161   //----------------------------------------------------------------------------
162   VISU::PPolyDataIDMapper myPolyDataIDMapper;
163   vtkSmartPointer<vtkPolyDataMapper> myPolyDataMapper;
164
165 protected:
166   vtkSmartPointer<SALOME_ExtractPolyDataGeometry> myExtractPolyDataGeometry; //!< Clipping
167 };
168
169 #endif