0023024: Update headers of OCCT files
[occt.git] / src / Bnd / Bnd_B2x.cdl
CommitLineData
b311480e 1-- Created on: 2005-09-08
2-- Created by: Alexander GRIGORIEV
3-- Copyright (c) 2005-2012 OPEN CASCADE SAS
4--
5-- The content of this file is subject to the Open CASCADE Technology Public
6-- License Version 6.5 (the "License"). You may not use the content of this file
7-- except in compliance with the License. Please obtain a copy of the License
8-- at http://www.opencascade.org and read it completely before using this file.
9--
10-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12--
13-- The Original Code and all software distributed under the License is
14-- distributed on an "AS IS" basis, without warranty of any kind, and the
15-- Initial Developer hereby disclaims all such warranties, including without
16-- limitation, any warranties of merchantability, fitness for a particular
17-- purpose or non-infringement. Please see the License for the specific terms
18-- and conditions governing the rights and limitations under the License.
19
7fd59977 20
21generic class B2x from Bnd (RealType as any)
22
23uses XY from gp,
24 Ax2d from gp,
25 Pnt2d from gp,
26 Trsf2d from gp
27
28is
29
30 Create returns B2x from Bnd;
31 ---Purpose: Empty constructor.
32 ---C++: inline
33
34 Create (theCenter: XY from gp; theHSize : XY from gp)
35 returns B2x from Bnd;
36 ---Purpose: Constructor.
37 ---C++: inline
38
39 IsVoid (me)
40 returns Boolean from Standard;
41 ---Purpose: Returns True if the box is void (non-initialized).
42 ---C++: inline
43
44 Clear (me:in out);
45 ---Purpose: Reset the box data.
46 ---C++: inline
47
48 Add (me:in out; thePnt: XY from gp);
49 ---Purpose: Update the box by a point.
50
51 Add (me:in out; thePnt: Pnt2d from gp);
52 ---Purpose: Update the box by a point.
53
54 Add (me:in out; theBox: B2x from Bnd);
55 ---Purpose: Update the box by another box.
56 ---C++: inline
57
58 CornerMin (me)
59 returns XY from gp;
60 ---Purpose: Query a box corner: (Center - HSize). You must make sure that
61 -- the box is NOT VOID (see IsVoid()), otherwise the method returns
62 -- irrelevant result.
63 ---C++: inline
64
65 CornerMax (me)
66 returns XY from gp;
67 ---Purpose: Query a box corner: (Center + HSize). You must make sure that
68 -- the box is NOT VOID (see IsVoid()), otherwise the method returns
69 -- irrelevant result.
70 ---C++: inline
71
72 SquareExtent(me)
73 returns Real from Standard;
74 ---Purpose: Query the square diagonal. If the box is VOID (see method IsVoid())
75 -- then a very big real value is returned.
76 ---C++: inline
77
78 Enlarge (me:in out; theDiff: Real from Standard);
79 ---Purpose: Extend the Box by the absolute value of theDiff.
80 ---C++: inline
81
82 Limit (me:in out; theOtherBox: B2x from Bnd)
83 returns Boolean from Standard;
84 ---Purpose: Limit the Box by the internals of theOtherBox.
85 -- Returns True if the limitation takes place, otherwise False
86 -- indicating that the boxes do not intersect.
87
88 Transformed (me; theTrsf: Trsf2d from gp)
89 returns B2x from Bnd;
90 ---Purpose: Transform the bounding box with the given transformation.
91 -- The resulting box will be larger if theTrsf contains rotation.
92
93 IsOut (me; thePnt: XY from gp)
94 returns Boolean from Standard;
95 ---Purpose: Check the given point for the inclusion in the Box.
96 -- Returns True if the point is outside.
97 ---C++: inline
98
99 IsOut (me; theCenter : XY from gp;
100 theRadius : Real from Standard;
101 isCircleHollow: Boolean from Standard = Standard_False)
102 returns Boolean from Standard;
103 ---Purpose: Check a circle for the intersection with the current box.
104 -- Returns True if there is no intersection between boxes.
105
106 IsOut (me; theOtherBox: B2x 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: B2x from Bnd; theTrsf: Trsf2d 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: Ax2d from gp)
119 returns Boolean from Standard;
120 ---Purpose: Check the given Line for the intersection with the current box.
121 -- Returns True if there is no intersection.
122
123 IsOut (me; theP0, theP1: XY from gp)
124 returns Boolean from Standard;
125 ---Purpose: Check the Segment defined by the couple of input points
126 -- for the intersection with the current box.
127 -- Returns True if there is no intersection.
128
129 IsIn (me; theBox: B2x from Bnd)
130 returns Boolean from Standard;
131 ---Purpose: Check that the box 'this' is inside the given box 'theBox'. Returns
132 -- True if 'this' box is fully inside 'theBox'.
133 ---C++: inline
134
135 IsIn (me; theBox: B2x from Bnd; theTrsf: Trsf2d from gp)
136 returns Boolean from Standard;
137 ---Purpose: Check that the box 'this' is inside the given box 'theBox'
138 -- transformed by 'theTrsf'. Returns True if 'this' box is fully
139 -- inside the transformed 'theBox'.
140
141 SetCenter (me: in out; theCenter: XY from gp);
142 ---Purpose: Set the Center coordinates
143 ---C++: inline
144
145 SetHSize (me: in out; theHSize: XY from gp);
146 ---Purpose: Set the HSize (half-diagonal) coordinates.
147 -- All components of theHSize must be non-negative.
148 ---C++: inline
149
150
151fields
152
153 myCenter : RealType[2] is protected;
154 myHSize : RealType[2] is protected;
155
156end B2x from Bnd;