913a4c4a |
1 | // Created on: 2011-11-15 |
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 | // |
09711f37 |
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 |
913a4c4a |
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_DISPLAYMODEFILTER_H |
17 | #define IVtkTOOLS_DISPLAYMODEFILTER_H |
18 | |
19 | #include <IVtkTools.hxx> |
20 | #include <IVtkTools_SubPolyDataFilter.hxx> |
21 | #include <IVtk_Types.hxx> |
22 | #include <NCollection_DataMap.hxx> |
23 | |
24 | //! @class IVtkTools_DisplayModeFilter |
25 | //! @brief Cells filter according to the selected display mode by mesh parts types. |
26 | //! This filter is used to get parts of a shape according to different |
27 | //! display modes. |
28 | class Standard_EXPORT IVtkTools_DisplayModeFilter : public IVtkTools_SubPolyDataFilter |
29 | { |
30 | public: |
68858c7d |
31 | vtkTypeMacro(IVtkTools_DisplayModeFilter,IVtkTools_SubPolyDataFilter) |
32 | |
913a4c4a |
33 | static IVtkTools_DisplayModeFilter *New(); |
34 | void PrintSelf (std::ostream& os, vtkIndent indent); |
35 | |
36 | //! Set display mode to define cells types to be passed through this filter. |
37 | void SetDisplayMode (const IVtk_DisplayMode aMode); |
38 | |
39 | //! Display or not shared vertices. |
40 | void SetDisplaySharedVertices (const bool doDisplay); |
41 | |
42 | //! Get current display mode. |
c7854818 |
43 | IVtk_DisplayMode GetDisplayMode() const; |
913a4c4a |
44 | |
45 | protected: |
46 | //! Filter cells according to the given set of ids. |
47 | virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *); |
48 | |
49 | IVtkTools_DisplayModeFilter(); |
50 | ~IVtkTools_DisplayModeFilter(); |
51 | |
52 | protected: |
53 | //! Display mode defining mesh types to pass through this filter. |
54 | IVtk_DisplayMode myDisplayMode; |
55 | NCollection_DataMap<IVtk_DisplayMode, IVtk_IdTypeMap> myModesDefinition; |
56 | bool myDoDisplaySharedVertices; |
57 | }; |
58 | |
59 | #endif // IVtkTOOLS_DISPLAYMODEFILTER_H |
60 | |