1 // File: ModuleBase_ViewerFilters.h
2 // Created: 07 Okt 2014
3 // Author: Vitaly SMETANNIKOV
6 #ifndef ModuleBase_ViewerFilters_H
7 #define ModuleBase_ViewerFilters_H
11 #include <SelectMgr_Filter.hxx>
12 #include <SelectMgr_EntityOwner.hxx>
16 class ModuleBase_IWorkshop;
20 * A filter which provides filtering of selection in 3d viewer.
21 * Installing of this filter lets to select objects which belong to
22 * currently active document or to global document
24 DEFINE_STANDARD_HANDLE(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter);
25 class ModuleBase_ShapeDocumentFilter: public SelectMgr_Filter
28 Standard_EXPORT ModuleBase_ShapeDocumentFilter(ModuleBase_IWorkshop* theWorkshop): SelectMgr_Filter(),
29 myWorkshop(theWorkshop) {}
31 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
33 DEFINE_STANDARD_RTTI(ModuleBase_ShapeDocumentFilter)
36 ModuleBase_IWorkshop* myWorkshop;
40 * A filter which provides filtering of selection in 3d viewer.
41 * Installing of this filter lets to select of Vertexes and Edges which belongs to the given plane
43 DEFINE_STANDARD_HANDLE(ModuleBase_ShapeInPlaneFilter, SelectMgr_Filter);
44 class ModuleBase_ShapeInPlaneFilter: public SelectMgr_Filter
47 Standard_EXPORT ModuleBase_ShapeInPlaneFilter(): SelectMgr_Filter() {}
49 void setPlane(const gp_Pln& thePane) { myPlane = thePane; }
50 gp_Pln plane() const { return myPlane; }
52 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
54 DEFINE_STANDARD_RTTI(ModuleBase_ShapeInPlaneFilter)
61 * A filter which provides filtering of selection in 3d viewer.
62 * Installing of this filter lets to select only object of requested type
64 DEFINE_STANDARD_HANDLE(ModuleBase_ObjectTypesFilter, SelectMgr_Filter);
65 class ModuleBase_ObjectTypesFilter: public ModuleBase_ShapeDocumentFilter
68 Standard_EXPORT ModuleBase_ObjectTypesFilter(ModuleBase_IWorkshop* theWorkshop, const QStringList& theTypes):
69 ModuleBase_ShapeDocumentFilter(theWorkshop), myTypes(theTypes) {}
71 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
73 DEFINE_STANDARD_RTTI(ModuleBase_ObjectTypesFilter)