Salome HOME
abff74f3579f23240fe984fc4c0500d917525318
[modules/gui.git] / src / VTKViewer / VTKViewer_GeometryFilter.h
1 #ifndef VTKVIEWER_GEOMETRYFILTER_H
2 #define VTKVIEWER_GEOMETRYFILTER_H
3
4 #include "VTKViewer.h"
5
6 #include <vtkGeometryFilter.h>
7
8 #include <vector>
9 /*! \brief This class used same as vtkGeometryFilter. See documentation on VTK for more information.
10  */
11 class VTKVIEWER_EXPORT VTKViewer_GeometryFilter : public vtkGeometryFilter 
12 {
13 public:
14   /*! \fn static VTKViewer_GeometryFilter *New()
15    */
16   static VTKViewer_GeometryFilter *New();
17   
18   /*! \fn vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter)
19    *  \brief VTK type revision macros.
20    */
21   vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter);
22   /*! \fn void SetInside(int theShowInside)
23    * \brief Sets \a myShowInside flag. \a myShowInside is changed, call this->Modified().
24    * \param theShowInside - used for changing value of \a myShowInside variable.
25    */
26   void SetInside(int theShowInside);
27   /*! \fn int GetInside()
28    * \brief Return value of \a myShowInside
29    * \retval myShowInside
30    */
31   int GetInside();
32   /*! \fn void SetStoreMapping(int theStoreMapping);
33    * \brief Sets \a myStoreMapping flag and call this->Modified()
34    * \param theStoreMapping - used for changing value of \a myStoreMapping variable.
35    */
36   void SetStoreMapping(int theStoreMapping);
37   /*! \fn int GetStoreMapping()
38    * \brief Return value of \a myStoreMapping
39    * \retval myStoreMapping
40    */
41   int GetStoreMapping(){ return myStoreMapping;}
42   /*! \fn virtual vtkIdType GetNodeObjId(int theVtkID)
43    * \brief Return input value theVtkID
44    * \retval theVtkID
45    */
46   virtual vtkIdType GetNodeObjId(int theVtkID) { return theVtkID;}
47   /*! \fn virtual vtkIdType GetElemObjId(int theVtkID);
48    * \brief Return object ID by VTK ID cell 
49    * \retval myVTK2ObjIds[theVtkID]
50    */
51   virtual vtkIdType GetElemObjId(int theVtkID);
52
53 protected:
54   /*! \fn VTKViewer_GeometryFilter();
55    * \brief Constructor which sets \a myShowInside = 0 and \a myStoreMapping = 0
56    */
57   VTKViewer_GeometryFilter();
58   /*! \fn ~VTKViewer_GeometryFilter();
59    * \brief Destructor.
60    */
61   ~VTKViewer_GeometryFilter();
62   /*! \fn void Execute();
63    * \brief Filter culculation method.
64    */
65   void Execute();
66   /*! \fn void UnstructuredGridExecute();
67    * \brief Filter culculation method for data object type is VTK_UNSTRUCTURED_GRID.
68    */
69   void UnstructuredGridExecute();
70     
71 private:
72   typedef std::vector<vtkIdType> TVectorId;
73
74 private:
75   TVectorId myVTK2ObjIds;
76   int       myShowInside;
77   int       myStoreMapping;
78 };
79
80 #endif