1 // Created on: 1991-01-08
2 // Created by: Didier Piffault
3 // Copyright (c) 1991-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Bnd_B2d_HeaderFile
18 #define _Bnd_B2d_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Real.hxx>
25 #include <Standard_Boolean.hxx>
43 Bnd_B2d(const gp_XY& theCenter, const gp_XY& theHSize);
45 Standard_Boolean IsVoid() const;
49 Standard_EXPORT void Add (const gp_XY& thePnt);
51 Standard_EXPORT void Add (const gp_Pnt2d& thePnt);
53 void Add (const Bnd_B2d& theBox);
55 gp_XY CornerMin() const;
57 gp_XY CornerMax() const;
59 Standard_Real SquareExtent() const;
61 void Enlarge (const Standard_Real theDiff);
63 Standard_EXPORT Standard_Boolean Limit (const Bnd_B2d& theOtherBox);
65 Standard_EXPORT Bnd_B2d Transformed (const gp_Trsf2d& theTrsf) const;
67 Standard_Boolean IsOut (const gp_XY& thePnt) const;
69 Standard_EXPORT Standard_Boolean IsOut (const gp_XY& theCenter, const Standard_Real theRadius, const Standard_Boolean isCircleHollow = Standard_False) const;
71 Standard_Boolean IsOut (const Bnd_B2d& theOtherBox) const;
73 Standard_EXPORT Standard_Boolean IsOut (const Bnd_B2d& theOtherBox, const gp_Trsf2d& theTrsf) const;
75 Standard_EXPORT Standard_Boolean IsOut (const gp_Ax2d& theLine) const;
77 Standard_EXPORT Standard_Boolean IsOut (const gp_XY& theP0, const gp_XY& theP1) const;
79 Standard_Boolean IsIn (const Bnd_B2d& theBox) const;
81 Standard_EXPORT Standard_Boolean IsIn (const Bnd_B2d& theBox, const gp_Trsf2d& theTrsf) const;
83 void SetCenter (const gp_XY& theCenter);
85 void SetHSize (const gp_XY& theHSize);
94 Standard_Real myCenter[2];
95 Standard_Real myHSize[2];
106 #define RealType Standard_Real
107 #define RealType_hxx <Standard_Real.hxx>
108 #define Bnd_B2x Bnd_B2d
109 #define Bnd_B2x_hxx <Bnd_B2d.hxx>
111 #include <Bnd_B2x.lxx>
121 #endif // _Bnd_B2d_HeaderFile