|
1 | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
2 | | -<class name="AABB" version="3.3"> |
| 2 | +<class name="AABB" version="3.4"> |
3 | 3 | <brief_description> |
4 | 4 | Axis-Aligned Bounding Box. |
5 | 5 | </brief_description> |
|
9 | 9 | [b]Note:[/b] Unlike [Rect2], [AABB] does not have a variant that uses integer coordinates. |
10 | 10 | </description> |
11 | 11 | <tutorials> |
12 | | - <link title="Math tutorial index">https://docs.godotengine.org/en/3.3/tutorials/math/index.html</link> |
13 | | - <link title="Vector math">https://docs.godotengine.org/en/3.3/tutorials/math/vector_math.html</link> |
14 | | - <link title="Advanced vector math">https://docs.godotengine.org/en/3.3/tutorials/math/vectors_advanced.html</link> |
| 12 | + <link title="Math tutorial index">https://docs.godotengine.org/en/3.4/tutorials/math/index.html</link> |
| 13 | + <link title="Vector math">https://docs.godotengine.org/en/3.4/tutorials/math/vector_math.html</link> |
| 14 | + <link title="Advanced vector math">https://docs.godotengine.org/en/3.4/tutorials/math/vectors_advanced.html</link> |
15 | 15 | </tutorials> |
16 | 16 | <methods> |
17 | 17 | <method name="AABB"> |
18 | | - <return type="AABB"> |
19 | | - </return> |
20 | | - <argument index="0" name="position" type="Vector3"> |
21 | | - </argument> |
22 | | - <argument index="1" name="size" type="Vector3"> |
23 | | - </argument> |
| 18 | + <return type="AABB" /> |
| 19 | + <argument index="0" name="position" type="Vector3" /> |
| 20 | + <argument index="1" name="size" type="Vector3" /> |
24 | 21 | <description> |
25 | 22 | Constructs an [AABB] from a position and size. |
26 | 23 | </description> |
27 | 24 | </method> |
28 | 25 | <method name="abs"> |
29 | | - <return type="AABB"> |
30 | | - </return> |
| 26 | + <return type="AABB" /> |
31 | 27 | <description> |
32 | 28 | Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive. |
33 | 29 | </description> |
34 | 30 | </method> |
35 | 31 | <method name="encloses"> |
36 | | - <return type="bool"> |
37 | | - </return> |
38 | | - <argument index="0" name="with" type="AABB"> |
39 | | - </argument> |
| 32 | + <return type="bool" /> |
| 33 | + <argument index="0" name="with" type="AABB" /> |
40 | 34 | <description> |
41 | 35 | Returns [code]true[/code] if this [AABB] completely encloses another one. |
42 | 36 | </description> |
43 | 37 | </method> |
44 | 38 | <method name="expand"> |
45 | | - <return type="AABB"> |
46 | | - </return> |
47 | | - <argument index="0" name="to_point" type="Vector3"> |
48 | | - </argument> |
| 39 | + <return type="AABB" /> |
| 40 | + <argument index="0" name="to_point" type="Vector3" /> |
49 | 41 | <description> |
50 | 42 | Returns this [AABB] expanded to include a given point. |
51 | 43 | </description> |
52 | 44 | </method> |
53 | 45 | <method name="get_area"> |
54 | | - <return type="float"> |
55 | | - </return> |
| 46 | + <return type="float" /> |
56 | 47 | <description> |
57 | 48 | Returns the volume of the [AABB]. |
58 | 49 | </description> |
59 | 50 | </method> |
60 | 51 | <method name="get_endpoint"> |
61 | | - <return type="Vector3"> |
62 | | - </return> |
63 | | - <argument index="0" name="idx" type="int"> |
64 | | - </argument> |
| 52 | + <return type="Vector3" /> |
| 53 | + <argument index="0" name="idx" type="int" /> |
65 | 54 | <description> |
66 | 55 | Gets the position of the 8 endpoints of the [AABB] in space. |
67 | 56 | </description> |
68 | 57 | </method> |
69 | 58 | <method name="get_longest_axis"> |
70 | | - <return type="Vector3"> |
71 | | - </return> |
| 59 | + <return type="Vector3" /> |
72 | 60 | <description> |
73 | 61 | Returns the normalized longest axis of the [AABB]. |
74 | 62 | </description> |
75 | 63 | </method> |
76 | 64 | <method name="get_longest_axis_index"> |
77 | | - <return type="int"> |
78 | | - </return> |
| 65 | + <return type="int" /> |
79 | 66 | <description> |
80 | 67 | Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants). |
81 | 68 | </description> |
82 | 69 | </method> |
83 | 70 | <method name="get_longest_axis_size"> |
84 | | - <return type="float"> |
85 | | - </return> |
| 71 | + <return type="float" /> |
86 | 72 | <description> |
87 | 73 | Returns the scalar length of the longest axis of the [AABB]. |
88 | 74 | </description> |
89 | 75 | </method> |
90 | 76 | <method name="get_shortest_axis"> |
91 | | - <return type="Vector3"> |
92 | | - </return> |
| 77 | + <return type="Vector3" /> |
93 | 78 | <description> |
94 | 79 | Returns the normalized shortest axis of the [AABB]. |
95 | 80 | </description> |
96 | 81 | </method> |
97 | 82 | <method name="get_shortest_axis_index"> |
98 | | - <return type="int"> |
99 | | - </return> |
| 83 | + <return type="int" /> |
100 | 84 | <description> |
101 | 85 | Returns the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum). |
102 | 86 | </description> |
103 | 87 | </method> |
104 | 88 | <method name="get_shortest_axis_size"> |
105 | | - <return type="float"> |
106 | | - </return> |
| 89 | + <return type="float" /> |
107 | 90 | <description> |
108 | 91 | Returns the scalar length of the shortest axis of the [AABB]. |
109 | 92 | </description> |
110 | 93 | </method> |
111 | 94 | <method name="get_support"> |
112 | | - <return type="Vector3"> |
113 | | - </return> |
114 | | - <argument index="0" name="dir" type="Vector3"> |
115 | | - </argument> |
| 95 | + <return type="Vector3" /> |
| 96 | + <argument index="0" name="dir" type="Vector3" /> |
116 | 97 | <description> |
117 | 98 | Returns the support point in a given direction. This is useful for collision detection algorithms. |
118 | 99 | </description> |
119 | 100 | </method> |
120 | 101 | <method name="grow"> |
121 | | - <return type="AABB"> |
122 | | - </return> |
123 | | - <argument index="0" name="by" type="float"> |
124 | | - </argument> |
| 102 | + <return type="AABB" /> |
| 103 | + <argument index="0" name="by" type="float" /> |
125 | 104 | <description> |
126 | 105 | Returns a copy of the [AABB] grown a given amount of units towards all the sides. |
127 | 106 | </description> |
128 | 107 | </method> |
129 | 108 | <method name="has_no_area"> |
130 | | - <return type="bool"> |
131 | | - </return> |
| 109 | + <return type="bool" /> |
132 | 110 | <description> |
133 | 111 | Returns [code]true[/code] if the [AABB] is flat or empty. |
134 | 112 | </description> |
135 | 113 | </method> |
136 | 114 | <method name="has_no_surface"> |
137 | | - <return type="bool"> |
138 | | - </return> |
| 115 | + <return type="bool" /> |
139 | 116 | <description> |
140 | 117 | Returns [code]true[/code] if the [AABB] is empty. |
141 | 118 | </description> |
142 | 119 | </method> |
143 | 120 | <method name="has_point"> |
144 | | - <return type="bool"> |
145 | | - </return> |
146 | | - <argument index="0" name="point" type="Vector3"> |
147 | | - </argument> |
| 121 | + <return type="bool" /> |
| 122 | + <argument index="0" name="point" type="Vector3" /> |
148 | 123 | <description> |
149 | 124 | Returns [code]true[/code] if the [AABB] contains a point. |
150 | 125 | </description> |
151 | 126 | </method> |
152 | 127 | <method name="intersection"> |
153 | | - <return type="AABB"> |
154 | | - </return> |
155 | | - <argument index="0" name="with" type="AABB"> |
156 | | - </argument> |
| 128 | + <return type="AABB" /> |
| 129 | + <argument index="0" name="with" type="AABB" /> |
157 | 130 | <description> |
158 | 131 | Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure. |
159 | 132 | </description> |
160 | 133 | </method> |
161 | 134 | <method name="intersects"> |
162 | | - <return type="bool"> |
163 | | - </return> |
164 | | - <argument index="0" name="with" type="AABB"> |
165 | | - </argument> |
| 135 | + <return type="bool" /> |
| 136 | + <argument index="0" name="with" type="AABB" /> |
166 | 137 | <description> |
167 | 138 | Returns [code]true[/code] if the [AABB] overlaps with another. |
168 | 139 | </description> |
169 | 140 | </method> |
170 | 141 | <method name="intersects_plane"> |
171 | | - <return type="bool"> |
172 | | - </return> |
173 | | - <argument index="0" name="plane" type="Plane"> |
174 | | - </argument> |
| 142 | + <return type="bool" /> |
| 143 | + <argument index="0" name="plane" type="Plane" /> |
175 | 144 | <description> |
176 | 145 | Returns [code]true[/code] if the [AABB] is on both sides of a plane. |
177 | 146 | </description> |
178 | 147 | </method> |
179 | 148 | <method name="intersects_segment"> |
180 | | - <return type="bool"> |
181 | | - </return> |
182 | | - <argument index="0" name="from" type="Vector3"> |
183 | | - </argument> |
184 | | - <argument index="1" name="to" type="Vector3"> |
185 | | - </argument> |
| 149 | + <return type="bool" /> |
| 150 | + <argument index="0" name="from" type="Vector3" /> |
| 151 | + <argument index="1" name="to" type="Vector3" /> |
186 | 152 | <description> |
187 | 153 | Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code]. |
188 | 154 | </description> |
189 | 155 | </method> |
190 | 156 | <method name="is_equal_approx"> |
191 | | - <return type="bool"> |
192 | | - </return> |
193 | | - <argument index="0" name="aabb" type="AABB"> |
194 | | - </argument> |
| 157 | + <return type="bool" /> |
| 158 | + <argument index="0" name="aabb" type="AABB" /> |
195 | 159 | <description> |
196 | 160 | Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component. |
197 | 161 | </description> |
198 | 162 | </method> |
199 | 163 | <method name="merge"> |
200 | | - <return type="AABB"> |
201 | | - </return> |
202 | | - <argument index="0" name="with" type="AABB"> |
203 | | - </argument> |
| 164 | + <return type="AABB" /> |
| 165 | + <argument index="0" name="with" type="AABB" /> |
204 | 166 | <description> |
205 | 167 | Returns a larger [AABB] that contains both this [AABB] and [code]with[/code]. |
206 | 168 | </description> |
|
0 commit comments