1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _Select3D_Box2d_HeaderFile
15 #define _Select3D_Box2d_HeaderFile
17 #include<Bnd_Box2d.hxx>
18 #include<Standard_ShortReal.hxx>
19 #include<Select3D_Macro.hxx>
23 Standard_ShortReal xmin, ymin, xmax, ymax;
30 Select3D_Box2d(const Bnd_Box2d& theBox)
35 inline operator Bnd_Box2d() const
40 aBox.Update(xmin, ymin, xmax, ymax);
44 inline Select3D_Box2d operator = ( const Bnd_Box2d& theBox)
50 inline void Update(const gp_Pnt2d& thePnt)
55 aBox.Update(xmin, ymin, xmax, ymax);
61 xmin = ymin = ShortRealLast();
62 xmax = ymax = ShortRealFirst();
65 inline Standard_Boolean IsVoid() const
67 return ( xmin == ShortRealLast() && ymin == ShortRealLast() && xmax == ShortRealFirst() && ymax == ShortRealFirst() );
71 inline void SetField(const Bnd_Box2d& theBox)
76 Standard_Real x, y, x1, y1;
77 theBox.Get(x, y, x1, y1);