]> SALOME platform Git repositories - modules/visu.git/blob - src/PIPELINE/VISU_PolyDataPL.hxx
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / PIPELINE / VISU_PolyDataPL.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_UnstructuredGripPL.hxx
24 // Author:  Alexey PETROV
25 // Module : VISU
26
27 #ifndef VISU_PolyDataPL_HeaderFile
28 #define VISU_PolyDataPL_HeaderFile
29
30 #include "VISU_ColoredPL.hxx"
31
32 class vtkPolyDataMapper;
33 class vtkPolyData;
34 class SALOME_ExtractPolyDataGeometry;
35
36
37 //----------------------------------------------------------------------------
38 class VISU_PolyDataPL : public VISU_ColoredPL
39 {
40 public:
41   vtkTypeMacro(VISU_PolyDataPL, VISU_ColoredPL);
42
43   //----------------------------------------------------------------------------
44   virtual 
45   vtkPolyDataMapper* 
46   GetPolyDataMapper();
47
48   virtual
49   vtkPolyData* 
50   GetPolyDataInput();
51
52   //! Gets memory size used by the instance (bytes).
53   virtual
54   unsigned long int
55   GetMemorySize();
56
57   //----------------------------------------------------------------------------
58   virtual
59   void
60   SetImplicitFunction(vtkImplicitFunction *theFunction);
61
62   virtual
63   vtkImplicitFunction* 
64   GetImplicitFunction();
65
66   virtual
67   SALOME_ExtractPolyDataGeometry*
68   GetExtractPolyDataGeometryFilter();
69
70   //----------------------------------------------------------------------------
71   // Clipping planes
72   virtual
73   void 
74   RemoveAllClippingPlanes();
75
76   virtual
77   vtkIdType
78   GetNumberOfClippingPlanes() const;
79
80   virtual
81   bool
82   AddClippingPlane(vtkPlane* thePlane);
83
84   virtual
85   vtkPlane* 
86   GetClippingPlane(vtkIdType theID) const;
87
88   //----------------------------------------------------------------------------
89   virtual
90   vtkIdType
91   GetNodeObjID(vtkIdType theID);
92
93   virtual
94   vtkIdType
95   GetNodeVTKID(vtkIdType theID);
96
97   virtual
98   vtkFloatingPointType* 
99   GetNodeCoord(vtkIdType theObjID);
100
101   virtual
102   vtkIdType
103   GetElemObjID(vtkIdType theID);
104
105   virtual
106   vtkIdType
107   GetElemVTKID(vtkIdType theID);
108
109   virtual
110   vtkCell*
111   GetElemCell(vtkIdType theObjID);
112
113   //----------------------------------------------------------------------------
114   void 
115   SetPolyDataIDMapper(const VISU::PPolyDataIDMapper& theIDMapper);
116
117   const VISU::PPolyDataIDMapper&
118   GetPolyDataIDMapper() const;
119
120 protected:
121   VISU_PolyDataPL();
122   VISU_PolyDataPL(const VISU_PolyDataPL&);
123
124   virtual
125   ~VISU_PolyDataPL();
126
127   virtual
128   void
129   DoCopyMapper(VISU_PipeLine *thePipeLine,
130                bool theIsCopyInput);
131
132   virtual
133   void
134   OnCreateMapper();
135
136   void 
137   SetPolyDataMapper(vtkPolyDataMapper* theMapper);
138
139   virtual
140   void
141   SetLookupTable(VISU_LookupTable* theLookupTable);
142
143   virtual
144   vtkPointSet* 
145   GetClippedInput() const;
146
147 private:
148   VISU::PPolyDataIDMapper myPolyDataIDMapper;
149   vtkSmartPointer<vtkPolyDataMapper> myPolyDataMapper;
150   vtkSmartPointer<SALOME_ExtractPolyDataGeometry> myExtractPolyDataGeometry; //!< Clipping
151 };
152
153 #endif