42cf5bc1 |
1 | // Created on: 1996-03-08 |
2 | // Created by: Robert COUBLANC |
3 | // Copyright (c) 1996-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _StdSelect_FaceFilter_HeaderFile |
18 | #define _StdSelect_FaceFilter_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <StdSelect_TypeOfFace.hxx> |
24 | #include <SelectMgr_Filter.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <TopAbs_ShapeEnum.hxx> |
27 | class SelectMgr_EntityOwner; |
28 | |
29 | |
30 | class StdSelect_FaceFilter; |
31 | DEFINE_STANDARD_HANDLE(StdSelect_FaceFilter, SelectMgr_Filter) |
32 | |
33 | //! A framework to define a filter to select a specific type of face. |
34 | //! The types available include: |
35 | //! - any face |
36 | //! - a planar face |
37 | //! - a cylindrical face |
38 | //! - a spherical face |
39 | //! - a toroidal face |
40 | //! - a revol face. |
41 | class StdSelect_FaceFilter : public SelectMgr_Filter |
42 | { |
43 | |
44 | public: |
45 | |
46 | |
47 | //! Constructs a face filter object defined by the type of face aTypeOfFace. |
48 | Standard_EXPORT StdSelect_FaceFilter(const StdSelect_TypeOfFace aTypeOfFace); |
49 | |
50 | //! Sets the type of face aNewType. aNewType is to be highlighted in selection. |
51 | Standard_EXPORT void SetType (const StdSelect_TypeOfFace aNewType); |
52 | |
53 | //! Returns the type of face to be highlighted in selection. |
54 | Standard_EXPORT StdSelect_TypeOfFace Type() const; |
55 | |
56 | Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE; |
57 | |
58 | Standard_EXPORT virtual Standard_Boolean ActsOn (const TopAbs_ShapeEnum aStandardMode) const Standard_OVERRIDE; |
59 | |
60 | |
61 | |
62 | |
92efcf78 |
63 | DEFINE_STANDARD_RTTIEXT(StdSelect_FaceFilter,SelectMgr_Filter) |
42cf5bc1 |
64 | |
65 | protected: |
66 | |
67 | |
68 | |
69 | |
70 | private: |
71 | |
72 | |
73 | StdSelect_TypeOfFace mytype; |
74 | |
75 | |
76 | }; |
77 | |
78 | |
79 | |
80 | |
81 | |
82 | |
83 | |
84 | #endif // _StdSelect_FaceFilter_HeaderFile |