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" |
22 | #include <IVtk_Types.hxx> |
23 | |
24 | //! @class IVtkTools_SubPolyDataFilter |
25 | //! @brief Cells filter according to the given set of cells ids. |
26 | class IVtkTools_EXPORT IVtkTools_SubPolyDataFilter : public vtkPolyDataAlgorithm |
27 | { |
28 | public: |
68858c7d |
29 | vtkTypeMacro(IVtkTools_SubPolyDataFilter,vtkPolyDataAlgorithm) |
30 | |
913a4c4a |
31 | static IVtkTools_SubPolyDataFilter *New(); |
32 | void PrintSelf (std::ostream& theOs, vtkIndent theIndent); |
33 | |
34 | //! Set ids to be passed through this filter. |
35 | void SetData(const IVtk_IdTypeMap theSet); |
36 | |
37 | //! Add ids to be passed through this filter. |
38 | void AddData(const IVtk_IdTypeMap theSet); |
39 | |
40 | //! Set ids to be passed through this filter. |
41 | void SetData(const IVtk_ShapeIdList theIds); |
42 | |
43 | //! Add ids to be passed through this filter. |
44 | void AddData(const IVtk_ShapeIdList theIds); |
45 | |
46 | //! Clear ids set to be passed through this filter. |
47 | void Clear(); |
48 | |
49 | //! Set ids array name. |
50 | void SetIdsArrayName(const char* theArrayName); |
51 | |
52 | void SetDoFiltering (const bool theDoFiltering); |
53 | |
54 | protected: |
55 | //! @brief Filter cells according to the given set of ids. |
56 | //! Note: Data arrays are not passed through if filtering is turned on. |
57 | virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); |
58 | |
59 | IVtkTools_SubPolyDataFilter(); |
60 | ~IVtkTools_SubPolyDataFilter(); |
61 | |
62 | protected: |
63 | //! Set of ids to be passed through this filter. |
64 | IVtk_IdTypeMap myIdsSet; |
65 | const char* myIdsArrayName; |
66 | bool myDoFiltering; |
67 | }; |
68 | |
69 | #endif // IVtkTOOLS_SUBPOLYDATAFILTER_H |