blob: 168fec2b361603bf3fc72bf63a8129749f3fa3bc (
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
143
144
145
146
147
148
149
150
151
|
-- File: Bnd_B3x.cdl
-- Created: Thu Sep 8 18:12:21 2005
-- Author: Alexander GRIGORIEV
-- <agv@opencascade.com>
---Copyright: Open Cascade 2005
generic class B3x from Bnd (RealType as any)
uses XYZ from gp,
Pnt from gp,
Ax1 from gp,
Ax3 from gp,
Trsf from gp
is
Create returns B3x from Bnd;
---Purpose: Empty constructor.
---C++: inline
Create (theCenter: XYZ from gp; theHSize : XYZ from gp)
returns B3x 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: XYZ from gp);
---Purpose: Update the box by a point.
Add (me: in out; thePnt: Pnt from gp);
---Purpose: Update the box by a point.
---C++: inline
Add (me:in out; theBox: B3x from Bnd);
---Purpose: Update the box by another box.
---C++: inline
CornerMin (me)
returns XYZ from gp;
---Purpose: Query the lower 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 XYZ from gp;
---Purpose: Query the upper 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: B3x 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: Trsf from gp)
returns B3x from Bnd;
---Purpose: Transform the bounding box with the given transformation.
-- The resulting box will be larger if theTrsf contains rotation.
IsOut (me; thePnt: XYZ 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 : XYZ from gp;
theRadius : Real from Standard;
isSphereHollow: Boolean from Standard = Standard_False)
returns Boolean from Standard;
---Purpose: Check a sphere for the intersection with the current box.
-- Returns True if there is no intersection between boxes. If the
-- parameter 'IsSphereHollow' is True, then the intersection is not
-- reported for a box that is completely inside the sphere (otherwise
-- this method would report an intersection).
IsOut (me; theOtherBox: B3x 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: B3x from Bnd; theTrsf: Trsf 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 : Ax1 from gp;
isRay : Boolean from Standard = Standard_False;
theOverthickness : Real from Standard = 0.0)
returns Boolean from Standard;
---Purpose: Check the given Line for the intersection with the current box.
-- Returns True if there is no intersection.
-- isRay==True means intersection check with the positive half-line
-- theOverthickness is the addition to the size of the current box
-- (may be negative). If positive, it can be treated as the thickness
-- of the line 'theLine' or the radius of the cylinder along 'theLine'
IsOut (me; thePlane: Ax3 from gp)
returns Boolean from Standard;
---Purpose: Check the given Plane for the intersection with the current box.
-- Returns True if there is no intersection.
IsIn (me; theBox: B3x 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: B3x from Bnd; theTrsf: Trsf 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: XYZ from gp);
---Purpose: Set the Center coordinates
---C++: inline
SetHSize (me: in out; theHSize: XYZ from gp);
---Purpose: Set the HSize (half-diagonal) coordinates.
-- All components of theHSize must be non-negative.
---C++: inline
fields
myCenter : RealType[3] is protected;
myHSize : RealType[3] is protected;
end B3x from Bnd;
|