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_B3d_HeaderFile
18 #define _Bnd_B3d_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>
44 Bnd_B3d(const gp_XYZ& theCenter, const gp_XYZ& theHSize);
46 Standard_Boolean IsVoid() const;
50 Standard_EXPORT void Add (const gp_XYZ& thePnt);
52 void Add (const gp_Pnt& thePnt);
54 void Add (const Bnd_B3d& theBox);
56 gp_XYZ CornerMin() const;
58 gp_XYZ CornerMax() const;
60 Standard_Real SquareExtent() const;
62 void Enlarge (const Standard_Real theDiff);
64 Standard_EXPORT Standard_Boolean Limit (const Bnd_B3d& theOtherBox);
66 Standard_EXPORT Bnd_B3d Transformed (const gp_Trsf& theTrsf) const;
68 Standard_Boolean IsOut (const gp_XYZ& thePnt) const;
70 Standard_EXPORT Standard_Boolean IsOut (const gp_XYZ& theCenter, const Standard_Real theRadius, const Standard_Boolean isSphereHollow = Standard_False) const;
72 Standard_Boolean IsOut (const Bnd_B3d& theOtherBox) const;
74 Standard_EXPORT Standard_Boolean IsOut (const Bnd_B3d& theOtherBox, const gp_Trsf& theTrsf) const;
76 Standard_EXPORT Standard_Boolean IsOut (const gp_Ax1& theLine, const Standard_Boolean isRay = Standard_False, const Standard_Real theOverthickness = 0.0) const;
78 Standard_EXPORT Standard_Boolean IsOut (const gp_Ax3& thePlane) const;
80 Standard_Boolean IsIn (const Bnd_B3d& theBox) const;
82 Standard_EXPORT Standard_Boolean IsIn (const Bnd_B3d& theBox, const gp_Trsf& theTrsf) const;
84 void SetCenter (const gp_XYZ& theCenter);
86 void SetHSize (const gp_XYZ& theHSize);
95 Standard_Real myCenter[3];
96 Standard_Real myHSize[3];
107 #define RealType Standard_Real
108 #define RealType_hxx <Standard_Real.hxx>
109 #define Bnd_B3x Bnd_B3d
110 #define Bnd_B3x_hxx <Bnd_B3d.hxx>
112 #include <Bnd_B3x.lxx>
122 #endif // _Bnd_B3d_HeaderFile