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