913a4c4a |
1 | // Created on: 2011-10-27 |
2 | // Created by: Roman KOZLOV |
3 | // Copyright (c) 2011-2014 OPEN CASCADE SAS |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | #ifndef IVtkTOOLS_SUBPOLYDATAFILTER_H |
17 | #define IVtkTOOLS_SUBPOLYDATAFILTER_H |
18 | |
19 | #include <IVtkTools.hxx> |
20 | |
21 | #include "vtkPolyDataAlgorithm.h" |
913a4c4a |
22 | |
23 | //! @class IVtkTools_SubPolyDataFilter |
24 | //! @brief Cells filter according to the given set of cells ids. |
25 | class IVtkTools_EXPORT IVtkTools_SubPolyDataFilter : public vtkPolyDataAlgorithm |
26 | { |
27 | public: |
68858c7d |
28 | vtkTypeMacro(IVtkTools_SubPolyDataFilter,vtkPolyDataAlgorithm) |
29 | |
913a4c4a |
30 | static IVtkTools_SubPolyDataFilter *New(); |
31 | void PrintSelf (std::ostream& theOs, vtkIndent theIndent); |
32 | |
33 | //! Set ids to be passed through this filter. |
34 | void SetData(const IVtk_IdTypeMap theSet); |
35 | |
36 | //! Add ids to be passed through this filter. |
37 | void AddData(const IVtk_IdTypeMap theSet); |
38 | |
39 | //! Set ids to be passed through this filter. |
40 | void SetData(const IVtk_ShapeIdList theIds); |
41 | |
42 | //! Add ids to be passed through this filter. |
43 | void AddData(const IVtk_ShapeIdList theIds); |
44 | |
45 | //! Clear ids set to be passed through this filter. |
46 | void Clear(); |
47 | |
48 | //! Set ids array name. |
49 | void SetIdsArrayName(const char* theArrayName); |
50 | |
51 | void SetDoFiltering (const bool theDoFiltering); |
52 | |
53 | protected: |
54 | //! @brief Filter cells according to the given set of ids. |
55 | //! Note: Data arrays are not passed through if filtering is turned on. |
56 | virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); |
57 | |
58 | IVtkTools_SubPolyDataFilter(); |
a2f76b15 |
59 | virtual ~IVtkTools_SubPolyDataFilter(); |
913a4c4a |
60 | |
61 | protected: |
62 | //! Set of ids to be passed through this filter. |
63 | IVtk_IdTypeMap myIdsSet; |
64 | const char* myIdsArrayName; |
65 | bool myDoFiltering; |
66 | }; |
67 | |
68 | #endif // IVtkTOOLS_SUBPOLYDATAFILTER_H |