Salome HOME
ed9c0749e948f8f8f98712142c8955bbff074d1a
[modules/visu.git] / src / PIPELINE / SALOME_ExtractGeometry.h
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 //
4 //  This library is free software; you can redistribute it and/or
5 //  modify it under the terms of the GNU Lesser General Public
6 //  License as published by the Free Software Foundation; either
7 //  version 2.1 of the License.
8 //
9 //  This library is distributed in the hope that it will be useful,
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 //  Lesser General Public License for more details.
13 //
14 //  You should have received a copy of the GNU Lesser General Public
15 //  License along with this library; if not, write to the Free Software
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19
20 #ifndef SALOME_ExtractGeometry_H
21 #define SALOME_ExtractGeometry_H
22
23 #include <vtkExtractGeometry.h>
24 #include <vtkSmartPointer.h>
25
26 #include <vector>
27
28 class vtkImplicitBoolean;
29
30 class SALOME_ExtractGeometry : public vtkExtractGeometry
31 {
32 public:
33   vtkTypeMacro(SALOME_ExtractGeometry, vtkExtractGeometry);
34
35   static 
36   SALOME_ExtractGeometry*
37   New();
38
39   virtual
40   void
41   SetImplicitFunction(vtkImplicitFunction* theImplicitFunction); 
42
43   vtkImplicitBoolean* 
44   GetImplicitBoolean();
45
46   bool 
47   GetStoreMapping() const;
48
49   void
50   SetStoreMapping(bool theStoreMapping);
51
52   virtual 
53   vtkIdType 
54   GetNodeObjId(vtkIdType theID);
55
56   virtual
57   vtkIdType
58   GetElemObjId(vtkIdType theID);
59
60   virtual
61   vtkIdType
62   GetNodeVTKId(vtkIdType theID);
63
64   virtual
65   vtkIdType
66   GetElemVTKId(vtkIdType theID);
67
68 protected:
69   SALOME_ExtractGeometry();
70   ~SALOME_ExtractGeometry();
71
72   // Usual data generation method
73   virtual
74   int
75   RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
76
77   virtual
78   int
79   RequestData2(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
80
81 private:
82   bool myStoreMapping;
83   bool myIsDoneShallowCopy;
84
85   typedef std::vector<vtkIdType> TVectorId;
86   TVectorId myElemVTK2ObjIds;
87   TVectorId myNodeVTK2ObjIds;
88
89   vtkSmartPointer<vtkImplicitBoolean> myImplicitBoolean;
90
91   SALOME_ExtractGeometry(const SALOME_ExtractGeometry&);  // Not implemented.
92   void operator=(const SALOME_ExtractGeometry&);  // Not implemented.
93 };
94
95 #endif