Salome HOME
Avoid selection of the same object in extrusion
[modules/shaper.git] / src / ModuleBase / ModuleBase_ViewerFilters.h
index 55ad0b686c153118f905260bb7908ff4f17b3248..d26d3db3ed617f5db6ab13a66eb4b4b47a5e048b 100644 (file)
@@ -8,12 +8,18 @@
 
 #include <SelectMgr_Filter.hxx>
 #include <SelectMgr_EntityOwner.hxx>
+#include <gp_Pln.hxx>
 
 
 class ModuleBase_IWorkshop;
 
-DEFINE_STANDARD_HANDLE(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter);
 
+/**
+* A filter which provides filtering of selection in 3d viewer.
+* Installing of this filter lets to select objects which belong to 
+* currently active document or to global document
+*/
+DEFINE_STANDARD_HANDLE(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter);
 class ModuleBase_ShapeDocumentFilter: public SelectMgr_Filter
 {
 public:
@@ -28,4 +34,22 @@ private:
   ModuleBase_IWorkshop* myWorkshop;
 };
 
+/**
+* A filter which provides filtering of selection in 3d viewer.
+* Installing of this filter lets to select of Vertexes and Edges which belongs to the given plane
+*/
+DEFINE_STANDARD_HANDLE(ModuleBase_ShapeInPlaneFilter, SelectMgr_Filter);
+class ModuleBase_ShapeInPlaneFilter: public SelectMgr_Filter
+{
+public:
+  Standard_EXPORT ModuleBase_ShapeInPlaneFilter(const gp_Pln& thePane): 
+      SelectMgr_Filter(), myPlane(thePane) {}
+
+  Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
+
+  DEFINE_STANDARD_RTTI(ModuleBase_ShapeInPlaneFilter)
+private:
+  gp_Pln myPlane;
+};
+
 #endif
\ No newline at end of file