Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/gui.git] / src / VTKViewer / VTKViewer_AppendFilter.h
1 #ifndef VTKVIEWER_APPENDFILTER_H
2 #define VTKVIEWER_APPENDFILTER_H
3
4 #include "VTKViewer.h"
5
6 #include <vtkAppendFilter.h>
7 #include <vtkSmartPointer.h>
8
9 #include <vector>
10 #include <map>
11
12 class vtkPoints;
13
14 /*! \brief This class used same as vtkAppendFilter. See documentation on VTK for more information.
15  */
16 class VTKVIEWER_EXPORT VTKViewer_AppendFilter : public vtkAppendFilter 
17 {
18 public:
19   /*! \fn static VTKViewer_AppendFilter *New()
20    */
21   static VTKViewer_AppendFilter *New();
22   
23   /*! \fn vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter)
24    *  \brief VTK type revision macros.
25    */
26   vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter);
27
28   void SetDoMappingFlag(const bool theFlag);
29
30   bool DoMappingFlag() const;
31
32   void
33   SetPoints(vtkPoints* thePoints);
34
35   vtkPoints*
36   GetPoints();
37
38   vtkIdType
39   GetPointOutputID(vtkIdType theInputID,
40                    vtkIdType theInputDataSetID);
41
42   vtkIdType
43   GetCellOutputID(vtkIdType theInputID,
44                   vtkIdType theInputDataSetID);
45
46   void 
47   GetPointInputID(vtkIdType theOutputID,
48                  vtkIdType& theInputID,
49                  vtkIdType& theStartID,
50                  vtkIdType& theInputDataSetID);
51
52   void
53   GetCellInputID(vtkIdType theOutputID,
54                  vtkIdType& theInputID,
55                  vtkIdType& theStartID,
56                  vtkIdType& theInputDataSetID);
57
58   typedef std::vector<vtkIdType> TVectorIds;
59
60 protected:
61   /*! \fn VTKViewer_AppendFilter();
62    * \brief Constructor
63    */
64   VTKViewer_AppendFilter();
65   /*! \fn ~VTKViewer_AppendFilter();
66    * \brief Destructor.
67    */
68   ~VTKViewer_AppendFilter();
69   /*! \fn void Execute();
70    * \brief Filter culculation method.
71    */
72   virtual void Execute();
73   //
74   void DoMapping();
75
76   void Reset();
77
78   void MakeOutput();
79
80   bool myDoMappingFlag;
81   TVectorIds myNodeRanges;
82   TVectorIds myCellRanges;
83   vtkSmartPointer<vtkPoints> myPoints;
84 };
85
86 #endif