Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
19
20 #ifndef SALOME_ExtractGeometry_H
21 #define SALOME_ExtractGeometry_H
22
23 #include "VTKViewer.h"
24
25 #include <vtkExtractGeometry.h>
26 #include <vtkSmartPointer.h>
27
28 #include <vector>
29
30 class vtkImplicitBoolean;
31
32 class SALOME_ExtractGeometry : public vtkExtractGeometry
33 {
34 public:
35   vtkTypeMacro(SALOME_ExtractGeometry,vtkExtractGeometry);
36
37   static SALOME_ExtractGeometry *New();
38
39   virtual
40   void
41   SetImplicitFunction(vtkImplicitFunction* theImplicitFunction); 
42
43   virtual
44   unsigned long int
45   GetMTime();
46
47   vtkImplicitBoolean* 
48   GetImplicitBoolean();
49
50   bool 
51   GetStoreMapping() const;
52   void
53   SetStoreMapping(bool theStoreMapping);
54
55   virtual 
56   vtkIdType 
57   GetNodeObjId(vtkIdType theID);
58
59   virtual
60   vtkIdType
61   GetElemObjId(vtkIdType theID);
62
63   virtual
64   vtkIdType
65   GetNodeVTKId(vtkIdType theID);
66
67   virtual
68   vtkIdType
69   GetElemVTKId(vtkIdType theID);
70
71 protected:
72   SALOME_ExtractGeometry();
73   ~SALOME_ExtractGeometry();
74
75   virtual void Execute();
76   void Execute2();
77
78 private:
79   bool myStoreMapping;
80   bool myIsDoneShallowCopy;
81   typedef std::vector<vtkIdType> TVectorId;
82   TVectorId myElemVTK2ObjIds;
83   TVectorId myNodeVTK2ObjIds;
84
85   vtkSmartPointer<vtkImplicitBoolean> myImplicitBoolean;
86
87   SALOME_ExtractGeometry(const SALOME_ExtractGeometry&);  // Not implemented.
88   void operator=(const SALOME_ExtractGeometry&);  // Not implemented.
89 };
90
91 #endif