1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SMESHGUI_Filter : Filters for VTK viewer
23 // File : SMESHGUI_Filter.h
24 // Author : Sergey LITONIN
27 #ifndef SMESHGUI_Filter_HeaderFile
28 #define SMESHGUI_Filter_HeaderFile
30 #include "SMESH_SMESHGUI.hxx"
32 #include "VTKViewer_Filter.h"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Filter)
39 enum SMESHGUI_FilterType
41 SMESHGUI_UnknownFilter = -1,
42 SMESHGUI_NodeFilter = 0,
43 SMESHGUI_EdgeFilter = 1,
44 SMESHGUI_FaceFilter = 2,
45 SMESHGUI_VolumeFilter = 3,
46 SMESHGUI_AllElementsFilter = 4,
47 SMESHGUI_QuadFilter = 5,
48 SMESHGUI_TriaFilter = 6,
53 Class : SMESHGUI_Filter
54 Description : Base class for SMESH selection filters for VTK viewer.
57 DEFINE_STANDARD_HANDLE(SMESHGUI_Filter, VTKViewer_Filter)
59 class SMESHGUI_Filter : public VTKViewer_Filter
64 virtual bool IsObjValid( const int theObjId ) const = 0;
66 DEFINE_STANDARD_RTTI(SMESHGUI_Filter)
70 Class : SMESHGUI_PredicateFilter
71 Description : Selection filter for VTK viewer. This class aggregate object
72 of SMESH_Predicate class and uses it for verification of criterion
75 DEFINE_STANDARD_HANDLE(SMESHGUI_PredicateFilter, SMESHGUI_Filter)
77 class SMESHGUI_PredicateFilter : public SMESHGUI_Filter
81 SMESHGUI_PredicateFilter();
82 virtual ~SMESHGUI_PredicateFilter();
84 virtual bool IsValid( const int theCellId ) const;
85 virtual bool IsObjValid( const int theObjId ) const;
86 virtual int GetId() const;
87 virtual bool IsNodeFilter() const;
88 void SetPredicate( SMESH::Predicate_ptr );
90 void SetActor( SALOME_Actor* );
94 SMESH::Predicate_var myPred;
97 DEFINE_STANDARD_RTTI(SMESHGUI_PredicateFilter)
101 Class : SMESHGUI_QuadrangleFilter
102 Description : Verify whether selected cell is quadranle
105 DEFINE_STANDARD_HANDLE(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter)
107 class SMESHGUI_QuadrangleFilter : public SMESHGUI_Filter
111 SMESHGUI_QuadrangleFilter();
112 virtual ~SMESHGUI_QuadrangleFilter();
114 virtual bool IsValid( const int theCellId ) const;
115 virtual bool IsObjValid( const int theObjId ) const;
116 virtual int GetId() const;
117 virtual bool IsNodeFilter() const;
120 DEFINE_STANDARD_RTTI(SMESHGUI_QuadrangleFilter)
124 Class : SMESHGUI_TriangleFilter
125 Description : Verify whether selected cell is triangle
128 DEFINE_STANDARD_HANDLE(SMESHGUI_TriangleFilter, SMESHGUI_Filter)
130 class SMESHGUI_TriangleFilter : public SMESHGUI_Filter
134 SMESHGUI_TriangleFilter();
135 virtual ~SMESHGUI_TriangleFilter();
137 virtual bool IsValid( const int theCellId ) const;
138 virtual bool IsObjValid( const int theObjId ) const;
139 virtual int GetId() const;
140 virtual bool IsNodeFilter() const;
143 DEFINE_STANDARD_RTTI(SMESHGUI_TriangleFilter)
147 Class : SMESHGUI_FacesFilter
148 Description : Verify whether selected cell is any face
151 DEFINE_STANDARD_HANDLE(SMESHGUI_FacesFilter, SMESHGUI_Filter)
153 class SMESHGUI_FacesFilter : public SMESHGUI_Filter
157 SMESHGUI_FacesFilter();
158 virtual ~SMESHGUI_FacesFilter();
160 virtual bool IsValid( const int theCellId ) const;
161 virtual bool IsObjValid( const int theObjId ) const;
162 virtual int GetId() const;
163 virtual bool IsNodeFilter() const;
166 DEFINE_STANDARD_RTTI(SMESHGUI_FacesFilter)
170 Class : SMESHGUI_VolumesFilter
171 Description : Verify whether selected cell is any volume
174 DEFINE_STANDARD_HANDLE(SMESHGUI_VolumesFilter, SMESHGUI_Filter)
176 class SMESHGUI_VolumesFilter : public SMESHGUI_Filter
180 SMESHGUI_VolumesFilter();
181 virtual ~SMESHGUI_VolumesFilter();
183 virtual bool IsValid( const int theCellId ) const;
184 virtual bool IsObjValid( const int theObjId ) const;
185 virtual int GetId() const;
186 virtual bool IsNodeFilter() const;
189 DEFINE_STANDARD_RTTI(SMESHGUI_VolumesFilter)