0024814: Avoid using explicit names of Handle classes
[occt.git] / src / Bnd / Bnd_B3x.cdl
1 -- Created on: 2005-09-08
2 -- Created by: Alexander GRIGORIEV
3 -- Copyright (c) 2005-2014 OPEN CASCADE SAS
4 --
5 -- This file is part of Open CASCADE Technology software library.
6 --
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
12 --
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
15
16 generic class B3x from Bnd (RealType as any)
17
18 uses    XYZ     from gp,
19         Pnt     from gp,
20         Ax1     from gp,
21         Ax3     from gp,
22         Trsf    from gp
23
24 is
25
26     Create returns B3x from Bnd;
27     ---Purpose: Empty constructor.
28     ---C++: inline
29
30     Create      (theCenter: XYZ from gp; theHSize : XYZ from gp)
31         returns B3x from Bnd;
32     ---Purpose: Constructor.
33     ---C++: inline
34
35     IsVoid      (me)
36         returns Boolean from Standard;
37     ---Purpose: Returns True if the box is void (non-initialized).
38     ---C++: inline
39
40     Clear       (me:in out);
41     ---Purpose: Reset the box data.
42     ---C++: inline
43
44     Add         (me:in out; thePnt: XYZ from gp);
45     ---Purpose: Update the box by a point.
46
47     Add         (me: in out; thePnt: Pnt from gp);
48     ---Purpose: Update the box by a point.
49     ---C++: inline
50
51     Add         (me:in out; theBox: B3x from Bnd);
52     ---Purpose: Update the box by another box.
53     ---C++: inline
54
55     CornerMin   (me)
56         returns XYZ from gp;
57     ---Purpose: Query the lower corner: (Center - HSize). You must make sure that
58     --          the box is NOT VOID (see IsVoid()), otherwise the method returns
59     --          irrelevant result.
60     ---C++: inline
61
62     CornerMax   (me)
63         returns XYZ from gp;
64     ---Purpose: Query the upper corner: (Center + HSize). You must make sure that
65     --          the box is NOT VOID (see IsVoid()), otherwise the method returns
66     --          irrelevant result.
67     ---C++: inline
68
69     SquareExtent(me)
70         returns Real from Standard;
71     ---Purpose: Query the square diagonal. If the box is VOID (see method IsVoid())
72     --          then a very big real value is returned.
73     ---C++: inline
74
75     Enlarge     (me:in out; theDiff: Real from Standard);
76     ---Purpose: Extend the Box by the absolute value of theDiff.
77     ---C++: inline
78
79     Limit       (me:in out; theOtherBox: B3x from Bnd)
80         returns Boolean from Standard;
81     ---Purpose: Limit the Box by the internals of theOtherBox.
82     --          Returns True if the limitation takes place, otherwise False
83     --          indicating that the boxes do not intersect. 
84
85     Transformed (me; theTrsf: Trsf from gp)
86         returns B3x from Bnd;
87     ---Purpose: Transform the bounding box with the given transformation.
88     --          The resulting box will be larger if theTrsf contains rotation.
89
90     IsOut       (me; thePnt: XYZ from gp)
91         returns Boolean from Standard;
92     ---Purpose: Check the given point for the inclusion in the Box.
93     --          Returns True if the point is outside.
94     ---C++: inline
95
96     IsOut       (me; theCenter     : XYZ from gp;
97                      theRadius     : Real from Standard;
98                      isSphereHollow: Boolean from Standard = Standard_False)
99         returns Boolean from Standard;
100     ---Purpose: Check a sphere for the intersection with the current box.
101     --          Returns True if there is no intersection between boxes. If the
102     --          parameter 'IsSphereHollow' is True, then the intersection is not
103     --          reported for a box that is completely inside the sphere (otherwise
104     --          this method would report an intersection).
105
106     IsOut       (me; theOtherBox: B3x from Bnd)
107         returns Boolean from Standard;
108     ---Purpose: Check the given box for the intersection with the current box.
109     --          Returns True if there is no intersection between boxes.
110     ---C++: inline
111
112     IsOut       (me; theOtherBox: B3x from Bnd; theTrsf: Trsf from gp)
113         returns Boolean from Standard;
114     ---Purpose: Check the given box oriented by the given transformation
115     --          for the intersection with the current box.
116     --          Returns True if there is no intersection between boxes.
117
118     IsOut       (me; theLine          : Ax1 from gp;
119                      isRay            : Boolean from Standard = Standard_False;
120                      theOverthickness : Real from Standard = 0.0)
121         returns Boolean from Standard;
122     ---Purpose: Check the given Line for the intersection with the current box.
123     --          Returns True if there is no intersection.
124     --          isRay==True means intersection check with the positive half-line
125     --          theOverthickness is the addition to the size of the current box
126     --          (may be negative). If positive, it can be treated as the thickness
127     --          of the line 'theLine' or the radius of the cylinder along 'theLine'
128
129     IsOut       (me; thePlane: Ax3 from gp)
130         returns Boolean from Standard;
131     ---Purpose: Check the given Plane for the intersection with the current box.
132     --          Returns True if there is no intersection.
133
134     IsIn        (me; theBox: B3x from Bnd)
135         returns Boolean from Standard;
136     ---Purpose: Check that the box 'this' is inside the given box 'theBox'. Returns
137     --          True if 'this' box is fully inside 'theBox'.
138     ---C++: inline
139
140     IsIn        (me; theBox: B3x from Bnd; theTrsf: Trsf from gp)
141         returns Boolean from Standard;
142     ---Purpose: Check that the box 'this' is inside the given box 'theBox'
143     --          transformed by 'theTrsf'. Returns True if 'this' box is fully
144     --          inside the transformed 'theBox'.
145
146     SetCenter   (me: in out; theCenter: XYZ from gp);
147     ---Purpose: Set the Center coordinates
148     ---C++: inline
149
150     SetHSize    (me: in out; theHSize: XYZ from gp);
151     ---Purpose: Set the HSize (half-diagonal) coordinates.
152     --          All components of theHSize must be non-negative.
153     ---C++: inline
154   
155 fields
156
157     myCenter :  RealType[3]     is protected;
158     myHSize  :  RealType[3]     is protected;
159
160 end B3x from Bnd;