Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[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/ or email : webmaster.salome@opencascade.com
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 SetWireframeMode(int theIsWireframeMode)
51    * \brief Sets \a myIsWireframeMode flag. \a myIsWireframeMode is changed, call this->Modified().
52    * \param theIsWireframeMode - used for changing value of \a myIsWireframeMode variable.
53    */
54   void SetWireframeMode(int theIsWireframeMode);
55   /*! \fn int GetWireframeMode()
56    * \brief Return value of \a myIsWireframeMode
57    * \retval myIsWireframeMode
58    */
59   int GetWireframeMode();
60   /*! \fn void SetStoreMapping(int theStoreMapping);
61    * \brief Sets \a myStoreMapping flag and call this->Modified()
62    * \param theStoreMapping - used for changing value of \a myStoreMapping variable.
63    */
64   void SetStoreMapping(int theStoreMapping);
65   /*! \fn int GetStoreMapping()
66    * \brief Return value of \a myStoreMapping
67    * \retval myStoreMapping
68    */
69   int GetStoreMapping();
70   /*! \fn virtual vtkIdType GetNodeObjId(int theVtkID)
71    * \brief Return input value theVtkID
72    * \retval theVtkID
73    */
74   virtual vtkIdType GetNodeObjId(int theVtkID) { return theVtkID;}
75   /*! \fn virtual vtkIdType GetElemObjId(int theVtkID);
76    * \brief Return object ID by VTK ID cell 
77    * \retval myVTK2ObjIds[theVtkID]
78    */
79   virtual vtkIdType GetElemObjId(int theVtkID);
80
81 protected:
82   /*! \fn VTKViewer_GeometryFilter();
83    * \brief Constructor which sets \a myShowInside = 0 and \a myStoreMapping = 0
84    */
85   VTKViewer_GeometryFilter();
86   /*! \fn ~VTKViewer_GeometryFilter();
87    * \brief Destructor.
88    */
89   ~VTKViewer_GeometryFilter();
90   /*! \fn void Execute();
91    * \brief Filter culculation method.
92    */
93   void Execute();
94   /*! \fn void UnstructuredGridExecute();
95    * \brief Filter culculation method for data object type is VTK_UNSTRUCTURED_GRID.
96    */
97   void UnstructuredGridExecute();
98     
99 private:
100   typedef std::vector<vtkIdType> TVectorId;
101
102 private:
103   TVectorId myVTK2ObjIds;
104   int       myShowInside;
105   int       myStoreMapping;
106   int       myIsWireframeMode;
107 };
108
109 #endif