@ringozz/godot 4.7.2-583 → 4.7.2-592

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +19 -1
  2. package/gen/classes/ArrayOccluder3D.ts +1 -1
  3. package/gen/classes/CPUParticles2D.ts +3 -3
  4. package/gen/classes/CPUParticles3D.ts +3 -3
  5. package/gen/classes/CSGPolygon3D.ts +1 -1
  6. package/gen/classes/CollisionPolygon2D.ts +1 -1
  7. package/gen/classes/CollisionPolygon3D.ts +1 -1
  8. package/gen/classes/ColorPalette.ts +1 -1
  9. package/gen/classes/ConcavePolygonShape2D.ts +1 -1
  10. package/gen/classes/ConcavePolygonShape3D.ts +1 -1
  11. package/gen/classes/ConvexPolygonShape2D.ts +1 -1
  12. package/gen/classes/ConvexPolygonShape3D.ts +1 -1
  13. package/gen/classes/FontVariation.ts +1 -1
  14. package/gen/classes/Gradient.ts +1 -1
  15. package/gen/classes/Line2D.ts +1 -1
  16. package/gen/classes/MultiMesh.ts +4 -4
  17. package/gen/classes/NavigationMesh.ts +1 -1
  18. package/gen/classes/NavigationObstacle2D.ts +1 -1
  19. package/gen/classes/NavigationObstacle3D.ts +1 -1
  20. package/gen/classes/NavigationPathQueryResult2D.ts +1 -1
  21. package/gen/classes/NavigationPathQueryResult3D.ts +1 -1
  22. package/gen/classes/NavigationPolygon.ts +1 -1
  23. package/gen/classes/OccluderPolygon2D.ts +1 -1
  24. package/gen/classes/Polygon2D.ts +3 -3
  25. package/gen/classes/PolygonOccluder3D.ts +1 -1
  26. package/gen/classes/Window.ts +1 -1
  27. package/gen/index.ts +0 -3
  28. package/gen/utility-functions.ts +114 -114
  29. package/gen/value-types/AABB.ts +267 -277
  30. package/gen/value-types/Basis.ts +313 -264
  31. package/gen/value-types/Color.ts +398 -268
  32. package/gen/value-types/Plane.ts +121 -125
  33. package/gen/value-types/Projection.ts +178 -126
  34. package/gen/value-types/Quaternion.ts +180 -179
  35. package/gen/value-types/Rect2.ts +169 -171
  36. package/gen/value-types/Rect2i.ts +148 -150
  37. package/gen/value-types/Transform2D.ts +192 -194
  38. package/gen/value-types/Transform3D.ts +133 -126
  39. package/gen/value-types/Vector2.ts +370 -354
  40. package/gen/value-types/Vector2i.ts +192 -191
  41. package/gen/value-types/Vector3.ts +354 -354
  42. package/gen/value-types/Vector3i.ts +187 -192
  43. package/gen/value-types/Vector4.ts +263 -274
  44. package/gen/value-types/Vector4i.ts +187 -198
  45. package/gen/value-types/index.ts +16 -16
  46. package/package.json +20 -4
  47. package/src/debug.ts +30 -27
  48. package/src/index.ts +0 -2
  49. package/src/runtime.ts +16 -7
@@ -1,9 +1,9 @@
1
1
  // Auto-generated from extension_api.json - DO NOT EDIT
2
2
  // Generated by dev/codegen.ts
3
3
 
4
- import { GodotVar, _C, _R, _get, _set } from '../../src/runtime.ts';
4
+ import { _V } from '../../src/runtime.ts';
5
5
  import type { GodotArray, GodotDictionary, Variant } from '../heap-types/index.ts';
6
- import type { Plane, Transform3D, Vector3 } from '../value-types/index.ts';
6
+ import type { Plane, Transform3D, Vector3 } from './index.ts';
7
7
 
8
8
  /**
9
9
  * The {@link AABB} built-in {@link Variant} type represents an axis-aligned bounding box in a 3D space. It is defined by its {@link position} and {@link size}, which are {@link Vector3}. It is frequently used for fast overlap tests (see {@link intersects}). Although {@link AABB} itself is axis-aligned, it can be combined with {@link Transform3D} to represent a rotated or skewed bounding box.
@@ -11,278 +11,268 @@ import type { Plane, Transform3D, Vector3 } from '../value-types/index.ts';
11
11
  * **Note:** Negative values for {@link size} are not supported. With negative size, most {@link AABB} methods do not work correctly. Use {@link abs} to get an equivalent {@link AABB} with a non-negative size.
12
12
  * **Note:** In a boolean context, an {@link AABB} evaluates to `false` if both {@link position} and {@link size} are zero (equal to {@link Vector3.ZERO}). Otherwise, it always evaluates to `true`.
13
13
  */
14
- export class AABB extends GodotVar {
15
- /**
16
- * The origin point. This is usually the corner on the bottom-left and forward of the bounding box.
17
- */
18
- get position(): Vector3 { return _get(this, 9504) as Vector3; }
19
- set position(v: Vector3) { _set(this, 9504, v); }
20
-
21
- /**
22
- * The bounding box's width, height, and depth starting from {@link position}. Setting this value also affects the {@link end} point.
23
- * **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the {@link position} is the bottom-left-forward corner, and the {@link end} is the top-right-back corner. To get an equivalent bounding box with non-negative size, use {@link abs}.
24
- */
25
- get size(): Vector3 { return _get(this, 13608) as Vector3; }
26
- set size(v: Vector3) { _set(this, 13608, v); }
27
-
28
- /**
29
- * The ending point. This is usually the corner on the top-right and back of the bounding box, and is equivalent to `position + size`. Setting this point affects the {@link size}.
30
- */
31
- get end(): Vector3 { return _get(this, 3093) as Vector3; }
32
- set end(v: Vector3) { _set(this, 3093, v); }
33
-
34
- constructor();
35
- constructor(from: AABB);
36
- constructor(position: Vector3, size: Vector3);
37
- constructor(...args: any[]) { super(16, ...args); }
38
-
39
- /**
40
- * Returns an {@link AABB} equivalent to this bounding box, with its width, height, and depth modified to be non-negative values.
41
- *
42
- *
43
- * ```gdscript
44
- *
45
- * var box = AABB(Vector3(5, 0, 5), Vector3(-20, -10, -5))
46
- * var absolute = box.abs()
47
- * print(absolute.position) # Prints (-15.0, -10.0, 0.0)
48
- * print(absolute.size) # Prints (20.0, 10.0, 5.0)
49
- *
50
- * ```
51
- *
52
- *
53
- *
54
- * **Note:** It's recommended to use this method when {@link size} is negative, as most other methods in Godot assume that the {@link size}'s components are greater than `0`.
55
- */
56
- abs(): AABB { return _C(this, 1053) as AABB; }
57
-
58
- /**
59
- * Returns the center point of the bounding box. This is the same as `position + (size / 2.0)`.
60
- */
61
- getCenter(): Vector3 { return _C(this, 4121) as Vector3; }
62
-
63
- /**
64
- * Returns the bounding box's volume. This is equivalent to `size.x * size.y * size.z`. See also {@link hasVolume}.
65
- */
66
- getVolume(): number { return _C(this, 7120) as number; }
67
-
68
- /**
69
- * Returns `true` if this bounding box's width, height, and depth are all positive. See also {@link getVolume}.
70
- */
71
- hasVolume(): boolean { return _C(this, 7485) as boolean; }
72
-
73
- /**
74
- * Returns `true` if this bounding box has a surface or a length, that is, at least one component of {@link size} is greater than `0`. Otherwise, returns `false`.
75
- */
76
- hasSurface(): boolean { return _C(this, 7455) as boolean; }
77
-
78
- /**
79
- * Returns `true` if the bounding box contains the given `point`. By convention, points exactly on the right, top, and front sides are **not** included.
80
- * **Note:** This method is not reliable for {@link AABB} with a *negative* {@link size}. Use {@link abs} first to get a valid bounding box.
81
- */
82
- hasPoint(point: Vector3): boolean { return _C(this, 7430, point) as boolean; }
83
-
84
- /**
85
- * Returns `true` if this bounding box and `aabb` are approximately equal, by calling {@link Vector3.isEqualApprox} on the {@link position} and the {@link size}.
86
- */
87
- isEqualApprox(aabb: AABB): boolean { return _C(this, 7938, aabb) as boolean; }
88
-
89
- /**
90
- * Returns `true` if this bounding box's values are finite, by calling {@link Vector3.isFinite} on the {@link position} and the {@link size}.
91
- */
92
- isFinite(): boolean { return _C(this, 7951) as boolean; }
93
-
94
- /**
95
- * Returns `true` if this bounding box overlaps with the box `with`. The edges of both boxes are *always* excluded.
96
- */
97
- intersects(_with: AABB): boolean { return _C(this, 7707, _with) as boolean; }
98
-
99
- /**
100
- * Returns `true` if this bounding box *completely* encloses the `with` box. The edges of both boxes are included.
101
- *
102
- *
103
- * ```gdscript
104
- *
105
- * var a = AABB(Vector3(0, 0, 0), Vector3(4, 4, 4))
106
- * var b = AABB(Vector3(1, 1, 1), Vector3(3, 3, 3))
107
- * var c = AABB(Vector3(2, 2, 2), Vector3(8, 8, 8))
108
- *
109
- * print(a.encloses(a)) # Prints true
110
- * print(a.encloses(b)) # Prints true
111
- * print(a.encloses(c)) # Prints false
112
- *
113
- * ```
114
- */
115
- encloses(_with: AABB): boolean { return _C(this, 3077, _with) as boolean; }
116
-
117
- /**
118
- * Returns `true` if this bounding box is on both sides of the given `plane`.
119
- */
120
- intersectsPlane(plane: Plane): boolean { return _C(this, 7708, plane) as boolean; }
121
-
122
- /**
123
- * Returns the intersection between this bounding box and `with`. If the boxes do not intersect, returns an empty {@link AABB}. If the boxes intersect at the edge, returns a flat {@link AABB} with no volume (see {@link hasSurface} and {@link hasVolume}).
124
- *
125
- *
126
- * ```gdscript
127
- *
128
- * var box1 = AABB(Vector3(0, 0, 0), Vector3(5, 2, 8))
129
- * var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4))
130
- *
131
- * var intersection = box1.intersection(box2)
132
- * print(intersection.position) # Prints (2.0, 0.0, 2.0)
133
- * print(intersection.size) # Prints (3.0, 2.0, 4.0)
134
- *
135
- * ```
136
- *
137
- *
138
- *
139
- * **Note:** If you only need to know whether two bounding boxes are intersecting, use {@link intersects}, instead.
140
- */
141
- intersection(_with: AABB): AABB { return _C(this, 7705, _with) as AABB; }
142
-
143
- /**
144
- * Returns an {@link AABB} that encloses both this bounding box and `with` around the edges. See also {@link encloses}.
145
- */
146
- merge(_with: AABB): AABB { return _C(this, 8850, _with) as AABB; }
147
-
148
- /**
149
- * Returns a copy of this bounding box expanded to align the edges with the given `toPoint`, if necessary.
150
- *
151
- *
152
- * ```gdscript
153
- *
154
- * var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5))
155
- *
156
- * box = box.expand(Vector3(10, 0, 0))
157
- * print(box.position) # Prints (0.0, 0.0, 0.0)
158
- * print(box.size) # Prints (10.0, 2.0, 5.0)
159
- *
160
- * box = box.expand(Vector3(-5, 0, 5))
161
- * print(box.position) # Prints (-5.0, 0.0, 0.0)
162
- * print(box.size) # Prints (15.0, 2.0, 5.0)
163
- *
164
- * ```
165
- */
166
- expand(toPoint: Vector3): AABB { return _C(this, 3187, toPoint) as AABB; }
167
-
168
- /**
169
- * Returns a copy of this bounding box extended on all sides by the given amount `by`. A negative amount shrinks the box instead.
170
- *
171
- *
172
- * ```gdscript
173
- *
174
- * var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4)
175
- * print(a.position) # Prints (0.0, 0.0, 0.0)
176
- * print(a.size) # Prints (16.0, 16.0, 16.0)
177
- *
178
- * var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2)
179
- * print(b.position) # Prints (-2.0, -2.0, -2.0)
180
- * print(b.size) # Prints (12.0, 8.0, 6.0)
181
- *
182
- * ```
183
- */
184
- grow(by: number): AABB { return _C(this, 7304, by) as AABB; }
185
-
186
- /**
187
- * Returns the vertex's position of this bounding box that's the farthest in the given direction. This point is commonly known as the support point in collision detection algorithms.
188
- */
189
- getSupport(direction: Vector3): Vector3 { return _C(this, 6612, direction) as Vector3; }
190
-
191
- /**
192
- * Returns the longest normalized axis of this bounding box's {@link size}, as a {@link Vector3} ({@link Vector3.RIGHT}, {@link Vector3.UP}, or {@link Vector3.BACK}).
193
- *
194
- *
195
- * ```gdscript
196
- *
197
- * var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
198
- *
199
- * print(box.get_longest_axis()) # Prints (0.0, 0.0, 1.0)
200
- * print(box.get_longest_axis_index()) # Prints 2
201
- * print(box.get_longest_axis_size()) # Prints 8.0
202
- *
203
- * ```
204
- *
205
- *
206
- *
207
- * See also {@link getLongestAxisIndex} and {@link getLongestAxisSize}.
208
- */
209
- getLongestAxis(): Vector3 { return _C(this, 5413) as Vector3; }
210
-
211
- /**
212
- * Returns the index to the longest axis of this bounding box's {@link size} (see {@link Vector3.AXIS_X}, {@link Vector3.AXIS_Y}, and {@link Vector3.AXIS_Z}).
213
- * For an example, see {@link getLongestAxis}.
214
- */
215
- getLongestAxisIndex(): number { return _C(this, 5414) as number; }
216
-
217
- /**
218
- * Returns the longest dimension of this bounding box's {@link size}.
219
- * For an example, see {@link getLongestAxis}.
220
- */
221
- getLongestAxisSize(): number { return _C(this, 5415) as number; }
222
-
223
- /**
224
- * Returns the shortest normalized axis of this bounding box's {@link size}, as a {@link Vector3} ({@link Vector3.RIGHT}, {@link Vector3.UP}, or {@link Vector3.BACK}).
225
- *
226
- *
227
- * ```gdscript
228
- *
229
- * var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
230
- *
231
- * print(box.get_shortest_axis()) # Prints (1.0, 0.0, 0.0)
232
- * print(box.get_shortest_axis_index()) # Prints 0
233
- * print(box.get_shortest_axis_size()) # Prints 2.0
234
- *
235
- * ```
236
- *
237
- *
238
- *
239
- * See also {@link getShortestAxisIndex} and {@link getShortestAxisSize}.
240
- */
241
- getShortestAxis(): Vector3 { return _C(this, 6379) as Vector3; }
242
-
243
- /**
244
- * Returns the index to the shortest axis of this bounding box's {@link size} (see {@link Vector3.AXIS_X}, {@link Vector3.AXIS_Y}, and {@link Vector3.AXIS_Z}).
245
- * For an example, see {@link getShortestAxis}.
246
- */
247
- getShortestAxisIndex(): number { return _C(this, 6380) as number; }
248
-
249
- /**
250
- * Returns the shortest dimension of this bounding box's {@link size}.
251
- * For an example, see {@link getShortestAxis}.
252
- */
253
- getShortestAxisSize(): number { return _C(this, 6381) as number; }
254
-
255
- /**
256
- * Returns the position of one of the 8 vertices that compose this bounding box. With an `idx` of `0` this is the same as {@link position}, and an `idx` of `7` is the same as {@link end}.
257
- */
258
- getEndpoint(idx: number): Vector3 { return _C(this, 4667, idx) as Vector3; }
259
-
260
- /**
261
- * Returns the first point where this bounding box and the given segment intersect, as a {@link Vector3}. If no intersection occurs, returns `null`.
262
- * The segment begins at `from` and ends at `to`.
263
- */
264
- intersectsSegment(from: Vector3, to: Vector3): Variant { return _C(this, 7710, from, to) as Variant; }
265
-
266
- /**
267
- * Returns the first point where this bounding box and the given ray intersect, as a {@link Vector3}. If no intersection occurs, returns `null`.
268
- * The ray begin at `from`, faces `dir` and extends towards infinity.
269
- */
270
- intersectsRay(from: Vector3, dir: Vector3): Variant { return _C(this, 7709, from, dir) as Variant; }
271
-
272
- equals(other: Variant | AABB): boolean { return _C(this, -1, other) as boolean; }
273
-
274
- notEquals(other: Variant | AABB): boolean { return _C(this, -2, other) as boolean; }
275
-
276
- not(): boolean { return _C(this, -24, undefined) as boolean; }
277
-
278
- /**
279
- * Inversely transforms (multiplies) the {@link AABB} by the given {@link Transform3D} transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
280
- * `aabb * transform` is equivalent to `transform.inverse() * aabb`. See {@link Transform3D.inverse}.
281
- * For transforming by inverse of an affine transformation (e.g. with scaling) `transform.affine_inverse() * aabb` can be used instead. See {@link Transform3D.affineInverse}.
282
- */
283
- mul(other: Transform3D): AABB { return _C(this, -9, other) as AABB; }
284
-
285
- contains(other: GodotDictionary | GodotArray): boolean { return _C(this, -25, other) as boolean; }
286
-
287
- static readonly name = _R(16, AABB);
288
- }
14
+ export type AABB = [position: Vector3, size: Vector3];
15
+
16
+ /**
17
+ * Returns an {@link AABB} equivalent to this bounding box, with its width, height, and depth modified to be non-negative values.
18
+ *
19
+ *
20
+ * ```gdscript
21
+ *
22
+ * var box = AABB(Vector3(5, 0, 5), Vector3(-20, -10, -5))
23
+ * var absolute = box.abs()
24
+ * print(absolute.position) # Prints (-15.0, -10.0, 0.0)
25
+ * print(absolute.size) # Prints (20.0, 10.0, 5.0)
26
+ *
27
+ * ```
28
+ *
29
+ *
30
+ *
31
+ * **Note:** It's recommended to use this method when {@link size} is negative, as most other methods in Godot assume that the {@link size}'s components are greater than `0`.
32
+ */
33
+ export function abs(self: AABB): AABB { return _V(16, 1053, self) as AABB; }
34
+
35
+ /**
36
+ * Returns the center point of the bounding box. This is the same as `position + (size / 2.0)`.
37
+ */
38
+ export function getCenter(self: AABB): Vector3 { return _V(16, 4121, self) as Vector3; }
39
+
40
+ /**
41
+ * Returns the bounding box's volume. This is equivalent to `size.x * size.y * size.z`. See also {@link hasVolume}.
42
+ */
43
+ export function getVolume(self: AABB): number { return _V(16, 7120, self) as number; }
44
+
45
+ /**
46
+ * Returns `true` if this bounding box's width, height, and depth are all positive. See also {@link getVolume}.
47
+ */
48
+ export function hasVolume(self: AABB): boolean { return _V(16, 7485, self) as boolean; }
49
+
50
+ /**
51
+ * Returns `true` if this bounding box has a surface or a length, that is, at least one component of {@link size} is greater than `0`. Otherwise, returns `false`.
52
+ */
53
+ export function hasSurface(self: AABB): boolean { return _V(16, 7455, self) as boolean; }
54
+
55
+ /**
56
+ * Returns `true` if the bounding box contains the given `point`. By convention, points exactly on the right, top, and front sides are **not** included.
57
+ * **Note:** This method is not reliable for {@link AABB} with a *negative* {@link size}. Use {@link abs} first to get a valid bounding box.
58
+ */
59
+ export function hasPoint(self: AABB, point: Vector3): boolean { return _V(16, 7430, self, point) as boolean; }
60
+
61
+ /**
62
+ * Returns `true` if this bounding box and `aabb` are approximately equal, by calling {@link Vector3.isEqualApprox} on the {@link position} and the {@link size}.
63
+ */
64
+ export function isEqualApprox(self: AABB, aabb: AABB): boolean { return _V(16, 7938, self, aabb) as boolean; }
65
+
66
+ /**
67
+ * Returns `true` if this bounding box's values are finite, by calling {@link Vector3.isFinite} on the {@link position} and the {@link size}.
68
+ */
69
+ export function isFinite(self: AABB): boolean { return _V(16, 7951, self) as boolean; }
70
+
71
+ /**
72
+ * Returns `true` if this bounding box overlaps with the box `with`. The edges of both boxes are *always* excluded.
73
+ */
74
+ export function intersects(self: AABB, _with: AABB): boolean { return _V(16, 7707, self, _with) as boolean; }
75
+
76
+ /**
77
+ * Returns `true` if this bounding box *completely* encloses the `with` box. The edges of both boxes are included.
78
+ *
79
+ *
80
+ * ```gdscript
81
+ *
82
+ * var a = AABB(Vector3(0, 0, 0), Vector3(4, 4, 4))
83
+ * var b = AABB(Vector3(1, 1, 1), Vector3(3, 3, 3))
84
+ * var c = AABB(Vector3(2, 2, 2), Vector3(8, 8, 8))
85
+ *
86
+ * print(a.encloses(a)) # Prints true
87
+ * print(a.encloses(b)) # Prints true
88
+ * print(a.encloses(c)) # Prints false
89
+ *
90
+ * ```
91
+ */
92
+ export function encloses(self: AABB, _with: AABB): boolean { return _V(16, 3077, self, _with) as boolean; }
93
+
94
+ /**
95
+ * Returns `true` if this bounding box is on both sides of the given `plane`.
96
+ */
97
+ export function intersectsPlane(self: AABB, plane: Plane): boolean { return _V(16, 7708, self, plane) as boolean; }
98
+
99
+ /**
100
+ * Returns the intersection between this bounding box and `with`. If the boxes do not intersect, returns an empty {@link AABB}. If the boxes intersect at the edge, returns a flat {@link AABB} with no volume (see {@link hasSurface} and {@link hasVolume}).
101
+ *
102
+ *
103
+ * ```gdscript
104
+ *
105
+ * var box1 = AABB(Vector3(0, 0, 0), Vector3(5, 2, 8))
106
+ * var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4))
107
+ *
108
+ * var intersection = box1.intersection(box2)
109
+ * print(intersection.position) # Prints (2.0, 0.0, 2.0)
110
+ * print(intersection.size) # Prints (3.0, 2.0, 4.0)
111
+ *
112
+ * ```
113
+ *
114
+ *
115
+ *
116
+ * **Note:** If you only need to know whether two bounding boxes are intersecting, use {@link intersects}, instead.
117
+ */
118
+ export function intersection(self: AABB, _with: AABB): AABB { return _V(16, 7705, self, _with) as AABB; }
119
+
120
+ /**
121
+ * Returns an {@link AABB} that encloses both this bounding box and `with` around the edges. See also {@link encloses}.
122
+ */
123
+ export function merge(self: AABB, _with: AABB): AABB { return _V(16, 8850, self, _with) as AABB; }
124
+
125
+ /**
126
+ * Returns a copy of this bounding box expanded to align the edges with the given `toPoint`, if necessary.
127
+ *
128
+ *
129
+ * ```gdscript
130
+ *
131
+ * var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5))
132
+ *
133
+ * box = box.expand(Vector3(10, 0, 0))
134
+ * print(box.position) # Prints (0.0, 0.0, 0.0)
135
+ * print(box.size) # Prints (10.0, 2.0, 5.0)
136
+ *
137
+ * box = box.expand(Vector3(-5, 0, 5))
138
+ * print(box.position) # Prints (-5.0, 0.0, 0.0)
139
+ * print(box.size) # Prints (15.0, 2.0, 5.0)
140
+ *
141
+ * ```
142
+ */
143
+ export function expand(self: AABB, toPoint: Vector3): AABB { return _V(16, 3187, self, toPoint) as AABB; }
144
+
145
+ /**
146
+ * Returns a copy of this bounding box extended on all sides by the given amount `by`. A negative amount shrinks the box instead.
147
+ *
148
+ *
149
+ * ```gdscript
150
+ *
151
+ * var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4)
152
+ * print(a.position) # Prints (0.0, 0.0, 0.0)
153
+ * print(a.size) # Prints (16.0, 16.0, 16.0)
154
+ *
155
+ * var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2)
156
+ * print(b.position) # Prints (-2.0, -2.0, -2.0)
157
+ * print(b.size) # Prints (12.0, 8.0, 6.0)
158
+ *
159
+ * ```
160
+ */
161
+ export function grow(self: AABB, by: number): AABB { return _V(16, 7304, self, by) as AABB; }
162
+
163
+ /**
164
+ * Returns the vertex's position of this bounding box that's the farthest in the given direction. This point is commonly known as the support point in collision detection algorithms.
165
+ */
166
+ export function getSupport(self: AABB, direction: Vector3): Vector3 { return _V(16, 6612, self, direction) as Vector3; }
167
+
168
+ /**
169
+ * Returns the longest normalized axis of this bounding box's {@link size}, as a {@link Vector3} ({@link Vector3.RIGHT}, {@link Vector3.UP}, or {@link Vector3.BACK}).
170
+ *
171
+ *
172
+ * ```gdscript
173
+ *
174
+ * var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
175
+ *
176
+ * print(box.get_longest_axis()) # Prints (0.0, 0.0, 1.0)
177
+ * print(box.get_longest_axis_index()) # Prints 2
178
+ * print(box.get_longest_axis_size()) # Prints 8.0
179
+ *
180
+ * ```
181
+ *
182
+ *
183
+ *
184
+ * See also {@link getLongestAxisIndex} and {@link getLongestAxisSize}.
185
+ */
186
+ export function getLongestAxis(self: AABB): Vector3 { return _V(16, 5413, self) as Vector3; }
187
+
188
+ /**
189
+ * Returns the index to the longest axis of this bounding box's {@link size} (see {@link Vector3.AXIS_X}, {@link Vector3.AXIS_Y}, and {@link Vector3.AXIS_Z}).
190
+ * For an example, see {@link getLongestAxis}.
191
+ */
192
+ export function getLongestAxisIndex(self: AABB): number { return _V(16, 5414, self) as number; }
193
+
194
+ /**
195
+ * Returns the longest dimension of this bounding box's {@link size}.
196
+ * For an example, see {@link getLongestAxis}.
197
+ */
198
+ export function getLongestAxisSize(self: AABB): number { return _V(16, 5415, self) as number; }
199
+
200
+ /**
201
+ * Returns the shortest normalized axis of this bounding box's {@link size}, as a {@link Vector3} ({@link Vector3.RIGHT}, {@link Vector3.UP}, or {@link Vector3.BACK}).
202
+ *
203
+ *
204
+ * ```gdscript
205
+ *
206
+ * var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
207
+ *
208
+ * print(box.get_shortest_axis()) # Prints (1.0, 0.0, 0.0)
209
+ * print(box.get_shortest_axis_index()) # Prints 0
210
+ * print(box.get_shortest_axis_size()) # Prints 2.0
211
+ *
212
+ * ```
213
+ *
214
+ *
215
+ *
216
+ * See also {@link getShortestAxisIndex} and {@link getShortestAxisSize}.
217
+ */
218
+ export function getShortestAxis(self: AABB): Vector3 { return _V(16, 6379, self) as Vector3; }
219
+
220
+ /**
221
+ * Returns the index to the shortest axis of this bounding box's {@link size} (see {@link Vector3.AXIS_X}, {@link Vector3.AXIS_Y}, and {@link Vector3.AXIS_Z}).
222
+ * For an example, see {@link getShortestAxis}.
223
+ */
224
+ export function getShortestAxisIndex(self: AABB): number { return _V(16, 6380, self) as number; }
225
+
226
+ /**
227
+ * Returns the shortest dimension of this bounding box's {@link size}.
228
+ * For an example, see {@link getShortestAxis}.
229
+ */
230
+ export function getShortestAxisSize(self: AABB): number { return _V(16, 6381, self) as number; }
231
+
232
+ /**
233
+ * Returns the position of one of the 8 vertices that compose this bounding box. With an `idx` of `0` this is the same as {@link position}, and an `idx` of `7` is the same as {@link end}.
234
+ */
235
+ export function getEndpoint(self: AABB, idx: number): Vector3 { return _V(16, 4667, self, idx) as Vector3; }
236
+
237
+ /**
238
+ * Returns the first point where this bounding box and the given segment intersect, as a {@link Vector3}. If no intersection occurs, returns `null`.
239
+ * The segment begins at `from` and ends at `to`.
240
+ */
241
+ export function intersectsSegment(self: AABB, from: Vector3, to: Vector3): Variant { return _V(16, 7710, self, from, to) as Variant; }
242
+
243
+ /**
244
+ * Returns the first point where this bounding box and the given ray intersect, as a {@link Vector3}. If no intersection occurs, returns `null`.
245
+ * The ray begin at `from`, faces `dir` and extends towards infinity.
246
+ */
247
+ export function intersectsRay(self: AABB, from: Vector3, dir: Vector3): Variant { return _V(16, 7709, self, from, dir) as Variant; }
248
+
249
+ export function equals(a: AABB, b: Variant | AABB): boolean { return _V(16, -1, a, b) as boolean; }
250
+
251
+ export function notEquals(a: AABB, b: Variant | AABB): boolean { return _V(16, -2, a, b) as boolean; }
252
+
253
+ export function not(self: AABB): boolean { return _V(16, -24, self, undefined) as boolean; }
254
+
255
+ /**
256
+ * Inversely transforms (multiplies) the {@link AABB} by the given {@link Transform3D} transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
257
+ * `aabb * transform` is equivalent to `transform.inverse() * aabb`. See {@link Transform3D.inverse}.
258
+ * For transforming by inverse of an affine transformation (e.g. with scaling) `transform.affine_inverse() * aabb` can be used instead. See {@link Transform3D.affineInverse}.
259
+ */
260
+ export function mul(a: AABB, b: Transform3D): AABB { return _V(16, -9, a, b) as AABB; }
261
+
262
+ export function contains(a: AABB, b: GodotDictionary | GodotArray): boolean { return _V(16, -25, a, b) as boolean; }
263
+
264
+ /**
265
+ * Constructs an {@link AABB} with its {@link position} and {@link size} set to {@link Vector3.ZERO}.
266
+ */
267
+ export function create(): AABB { return _V(16, -4096, 0) as AABB; }
268
+
269
+ /**
270
+ * Constructs an {@link AABB} as a copy of the given {@link AABB}.
271
+ */
272
+ export function fromAABB(from: AABB): AABB { return _V(16, -4096, 1, from) as AABB; }
273
+
274
+ /**
275
+ * Constructs an {@link AABB} by `position` and `size`.
276
+ */
277
+ export function fromPositionSize(position: Vector3, size: Vector3): AABB { return _V(16, -4096, 2, position, size) as AABB; }
278
+