blob: a497e0ca7afcf7642b774bfe6df35f49b3b41f12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
-- File: Bnd_B2x.cdl
-- Created: Thu Sep 8 17:39:16 2005
-- Author: Alexander GRIGORIEV
-- <agv@opencascade.com>
---Copyright: Open Cascade 2005
generic class B2x from Bnd (RealType as any)
uses XY from gp,
Ax2d from gp,
Pnt2d from gp,
Trsf2d from gp
is
Create returns B2x from Bnd;
---Purpose: Empty constructor.
---C++: inline
Create (theCenter: XY from gp; theHSize : XY from gp)
returns B2x from Bnd;
---Purpose: Constructor.
---C++: inline
IsVoid (me)
returns Boolean from Standard;
---Purpose: Returns True if the box is void (non-initialized).
---C++: inline
Clear (me:in out);
---Purpose: Reset the box data.
---C++: inline
Add (me:in out; thePnt: XY from gp);
---Purpose: Update the box by a point.
Add (me:in out; thePnt: Pnt2d from gp);
---Purpose: Update the box by a point.
Add (me:in out; theBox: B2x from Bnd);
---Purpose: Update the box by another box.
---C++: inline
CornerMin (me)
returns XY from gp;
---Purpose: Query a box corner: (Center - HSize). You must make sure that
-- the box is NOT VOID (see IsVoid()), otherwise the method returns
-- irrelevant result.
---C++: inline
CornerMax (me)
returns XY from gp;
---Purpose: Query a box corner: (Center + HSize). You must make sure that
-- the box is NOT VOID (see IsVoid()), otherwise the method returns
-- irrelevant result.
---C++: inline
SquareExtent(me)
returns Real from Standard;
---Purpose: Query the square diagonal. If the box is VOID (see method IsVoid())
-- then a very big real value is returned.
---C++: inline
Enlarge (me:in out; theDiff: Real from Standard);
---Purpose: Extend the Box by the absolute value of theDiff.
---C++: inline
Limit (me:in out; theOtherBox: B2x from Bnd)
returns Boolean from Standard;
---Purpose: Limit the Box by the internals of theOtherBox.
-- Returns True if the limitation takes place, otherwise False
-- indicating that the boxes do not intersect.
Transformed (me; theTrsf: Trsf2d from gp)
returns B2x from Bnd;
---Purpose: Transform the bounding box with the given transformation.
-- The resulting box will be larger if theTrsf contains rotation.
IsOut (me; thePnt: XY from gp)
returns Boolean from Standard;
---Purpose: Check the given point for the inclusion in the Box.
-- Returns True if the point is outside.
---C++: inline
IsOut (me; theCenter : XY from gp;
theRadius : Real from Standard;
isCircleHollow: Boolean from Standard = Standard_False)
returns Boolean from Standard;
---Purpose: Check a circle for the intersection with the current box.
-- Returns True if there is no intersection between boxes.
IsOut (me; theOtherBox: B2x from Bnd)
returns Boolean from Standard;
---Purpose: Check the given box for the intersection with the current box.
-- Returns True if there is no intersection between boxes.
---C++: inline
IsOut (me; theOtherBox: B2x from Bnd; theTrsf: Trsf2d from gp)
returns Boolean from Standard;
---Purpose: Check the given box oriented by the given transformation
-- for the intersection with the current box.
-- Returns True if there is no intersection between boxes.
IsOut (me; theLine: Ax2d from gp)
returns Boolean from Standard;
---Purpose: Check the given Line for the intersection with the current box.
-- Returns True if there is no intersection.
IsOut (me; theP0, theP1: XY from gp)
returns Boolean from Standard;
---Purpose: Check the Segment defined by the couple of input points
-- for the intersection with the current box.
-- Returns True if there is no intersection.
IsIn (me; theBox: B2x from Bnd)
returns Boolean from Standard;
---Purpose: Check that the box 'this' is inside the given box 'theBox'. Returns
-- True if 'this' box is fully inside 'theBox'.
---C++: inline
IsIn (me; theBox: B2x from Bnd; theTrsf: Trsf2d from gp)
returns Boolean from Standard;
---Purpose: Check that the box 'this' is inside the given box 'theBox'
-- transformed by 'theTrsf'. Returns True if 'this' box is fully
-- inside the transformed 'theBox'.
SetCenter (me: in out; theCenter: XY from gp);
---Purpose: Set the Center coordinates
---C++: inline
SetHSize (me: in out; theHSize: XY from gp);
---Purpose: Set the HSize (half-diagonal) coordinates.
-- All components of theHSize must be non-negative.
---C++: inline
fields
myCenter : RealType[2] is protected;
myHSize : RealType[2] is protected;
end B2x from Bnd;
|