src/PIPELINE/SALOME_ExtractGeometry.h

Go to the documentation of this file.
00001 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00003 //
00004 //  This library is free software; you can redistribute it and/or
00005 //  modify it under the terms of the GNU Lesser General Public
00006 //  License as published by the Free Software Foundation; either
00007 //  version 2.1 of the License.
00008 //
00009 //  This library is distributed in the hope that it will be useful,
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 //  Lesser General Public License for more details.
00013 //
00014 //  You should have received a copy of the GNU Lesser General Public
00015 //  License along with this library; if not, write to the Free Software
00016 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00017 //
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 
00020 #ifndef SALOME_ExtractGeometry_H
00021 #define SALOME_ExtractGeometry_H
00022 
00023 #include "VTKViewer.h"
00024 
00025 #include <vtkExtractGeometry.h>
00026 #include <vtkSmartPointer.h>
00027 
00028 #include <vector>
00029 
00030 class vtkImplicitBoolean;
00031 
00032 class SALOME_ExtractGeometry : public vtkExtractGeometry
00033 {
00034 public:
00035   vtkTypeMacro(SALOME_ExtractGeometry,vtkExtractGeometry);
00036 
00037   static SALOME_ExtractGeometry *New();
00038 
00039   virtual
00040   void
00041   SetImplicitFunction(vtkImplicitFunction* theImplicitFunction); 
00042 
00043   virtual
00044   unsigned long int
00045   GetMTime();
00046 
00047   vtkImplicitBoolean* 
00048   GetImplicitBoolean();
00049 
00050   bool 
00051   GetStoreMapping() const;
00052   void
00053   SetStoreMapping(bool theStoreMapping);
00054 
00055   virtual 
00056   vtkIdType 
00057   GetNodeObjId(vtkIdType theID);
00058 
00059   virtual
00060   vtkIdType
00061   GetElemObjId(vtkIdType theID);
00062 
00063   virtual
00064   vtkIdType
00065   GetNodeVTKId(vtkIdType theID);
00066 
00067   virtual
00068   vtkIdType
00069   GetElemVTKId(vtkIdType theID);
00070 
00071 protected:
00072   SALOME_ExtractGeometry();
00073   ~SALOME_ExtractGeometry();
00074 
00075   virtual void Execute();
00076   void Execute2();
00077 
00078 private:
00079   bool myStoreMapping;
00080   bool myIsDoneShallowCopy;
00081   typedef std::vector<vtkIdType> TVectorId;
00082   TVectorId myElemVTK2ObjIds;
00083   TVectorId myNodeVTK2ObjIds;
00084 
00085   vtkSmartPointer<vtkImplicitBoolean> myImplicitBoolean;
00086 
00087   SALOME_ExtractGeometry(const SALOME_ExtractGeometry&);  // Not implemented.
00088   void operator=(const SALOME_ExtractGeometry&);  // Not implemented.
00089 };
00090 
00091 #endif