]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx
#3252Select mechanism of boxes
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / GObjectModel.cxx
index e4b77adede5e31ea6d0fe31f81fa6853615a16ac..70c7ed4d892725c7acff9ea0e0d4ea8e581e58f5 100644 (file)
@@ -137,7 +137,6 @@ namespace bbtk
        }
 
        //=========================================================================
-
        bool GObjectModel::isPointInside(double x,double y, double z)//virtual
        {
                if(x>=_xInic && x<=_xFin && y<=_yInic && y>=_yFin)
@@ -150,8 +149,20 @@ namespace bbtk
                }
        }
 
-       //=========================================================================
 
+    //=========================================================================
+    bool GObjectModel::isBoxInsideRectangle(double x1,double y1, double z1,double x2,double y2, double z2)//virtual
+    {
+        if(_xInic>x1 && _xInic<x2 && _xFin>x1 && _xFin<x2 &&
+           _yInic>y1 && _yInic<y2 && _yFin>y1 && _yFin<y2  )
+        {
+            return true;
+        } else  {
+            return false;
+        }
+    }
+
+       //=========================================================================
        void GObjectModel::move(double xx,double yy,double zz)//virtual
        {
                setInicPoint(xx,yy,zz);