Salome HOME
Copyrights update
[modules/gui.git] / src / VTKViewer / VTKViewer_GeometryFilter.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/
18 //
19 #ifndef VTKVIEWER_GEOMETRYFILTER_H
20 #define VTKVIEWER_GEOMETRYFILTER_H
21
22 #include "VTKViewer.h"
23
24 #include <vtkGeometryFilter.h>
25
26 #include <vector>
27 /*! \brief This class used same as vtkGeometryFilter. See documentation on VTK for more information.
28  */
29 class VTKVIEWER_EXPORT VTKViewer_GeometryFilter : public vtkGeometryFilter 
30 {
31 public:
32   /*! \fn static VTKViewer_GeometryFilter *New()
33    */
34   static VTKViewer_GeometryFilter *New();
35   
36   /*! \fn vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter)
37    *  \brief VTK type revision macros.
38    */
39   vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter);
40   /*! \fn void SetInside(int theShowInside)
41    * \brief Sets \a myShowInside flag. \a myShowInside is changed, call this->Modified().
42    * \param theShowInside - used for changing value of \a myShowInside variable.
43    */
44   void SetInside(int theShowInside);
45   /*! \fn int GetInside()
46    * \brief Return value of \a myShowInside
47    * \retval myShowInside
48    */
49   int GetInside();
50   /*! \fn void SetStoreMapping(int theStoreMapping);
51    * \brief Sets \a myStoreMapping flag and call this->Modified()
52    * \param theStoreMapping - used for changing value of \a myStoreMapping variable.
53    */
54   void SetStoreMapping(int theStoreMapping);
55   /*! \fn int GetStoreMapping()
56    * \brief Return value of \a myStoreMapping
57    * \retval myStoreMapping
58    */
59   int GetStoreMapping(){ return myStoreMapping;}
60   /*! \fn virtual vtkIdType GetNodeObjId(int theVtkID)
61    * \brief Return input value theVtkID
62    * \retval theVtkID
63    */
64   virtual vtkIdType GetNodeObjId(int theVtkID) { return theVtkID;}
65   /*! \fn virtual vtkIdType GetElemObjId(int theVtkID);
66    * \brief Return object ID by VTK ID cell 
67    * \retval myVTK2ObjIds[theVtkID]
68    */
69   virtual vtkIdType GetElemObjId(int theVtkID);
70
71 protected:
72   /*! \fn VTKViewer_GeometryFilter();
73    * \brief Constructor which sets \a myShowInside = 0 and \a myStoreMapping = 0
74    */
75   VTKViewer_GeometryFilter();
76   /*! \fn ~VTKViewer_GeometryFilter();
77    * \brief Destructor.
78    */
79   ~VTKViewer_GeometryFilter();
80   /*! \fn void Execute();
81    * \brief Filter culculation method.
82    */
83   void Execute();
84   /*! \fn void UnstructuredGridExecute();
85    * \brief Filter culculation method for data object type is VTK_UNSTRUCTURED_GRID.
86    */
87   void UnstructuredGridExecute();
88     
89 private:
90   typedef std::vector<vtkIdType> TVectorId;
91
92 private:
93   TVectorId myVTK2ObjIds;
94   int       myShowInside;
95   int       myStoreMapping;
96 };
97
98 #endif