Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[modules/smesh.git] / src / OBJECT / SMESH_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_HeaderFile
21 #define SALOME_ExtractGeometry_HeaderFile
22
23 #include <vtkExtractGeometry.h>
24 #include <vector>
25
26 #include "VTKViewer.h"
27
28 class SMESH_ExtractGeometry : public vtkExtractGeometry
29 {
30 public:
31   vtkTypeMacro(SMESH_ExtractGeometry,vtkExtractGeometry);
32
33   static SMESH_ExtractGeometry *New();
34
35   void SetStoreMapping(bool theStoreMapping){
36     myStoreMapping = theStoreMapping;
37     Modified();
38   }
39   bool GetStoreMapping(){ return myStoreMapping;}
40
41   virtual vtkIdType GetNodeObjId(int theVtkID);
42   virtual vtkIdType GetElemObjId(int theVtkID);
43
44 protected:
45   SMESH_ExtractGeometry();
46   ~SMESH_ExtractGeometry();
47
48   void Execute();
49
50 private:
51   bool myStoreMapping;   
52   typedef std::vector<vtkIdType> TVectorId;
53   TVectorId myElemVTK2ObjIds;
54   TVectorId myNodeVTK2ObjIds;
55
56   SMESH_ExtractGeometry(const SMESH_ExtractGeometry&);  // Not implemented.
57   void operator=(const SMESH_ExtractGeometry&);  // Not implemented.
58 };
59
60
61 #endif
62
63