xray16 1.3.2 → 1.4.0

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 (85) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +112 -106
  3. package/package.json +45 -42
  4. package/plugins/built_at_info.d.ts +1 -1
  5. package/plugins/from_cast_utils.d.ts +1 -1
  6. package/plugins/global_declarations_transform.d.ts +1 -1
  7. package/plugins/inject_file_meta.d.ts +1 -1
  8. package/plugins/inject_tracy_zones.d.ts +1 -1
  9. package/plugins/inject_tracy_zones.js +4 -4
  10. package/plugins/strip_lua_logger.d.ts +1 -1
  11. package/plugins/strip_lua_logger.js +1 -1
  12. package/plugins/transform_luabind_class/plugin.d.ts +1 -1
  13. package/plugins/transform_luabind_class/transformation/class_declaration.d.ts +3 -3
  14. package/plugins/transform_luabind_class/transformation/decorators.d.ts +5 -2
  15. package/plugins/transform_luabind_class/transformation/decorators.js +3 -0
  16. package/plugins/transform_luabind_class/transformation/members/accessors.d.ts +1 -1
  17. package/plugins/transform_luabind_class/transformation/members/constructor.d.ts +2 -2
  18. package/plugins/transform_luabind_class/transformation/members/constructor.js +2 -2
  19. package/plugins/transform_luabind_class/transformation/members/fields.d.ts +5 -2
  20. package/plugins/transform_luabind_class/transformation/members/fields.js +5 -2
  21. package/plugins/transform_luabind_class/transformation/members/method.d.ts +6 -3
  22. package/plugins/transform_luabind_class/transformation/members/method.js +4 -1
  23. package/plugins/transform_luabind_class/transformation/new.d.ts +7 -3
  24. package/plugins/transform_luabind_class/transformation/new.js +5 -1
  25. package/plugins/transform_luabind_class/transformation/setup.d.ts +9 -3
  26. package/plugins/transform_luabind_class/transformation/setup.js +22 -6
  27. package/plugins/transform_luabind_class/transformation/super.d.ts +19 -3
  28. package/plugins/transform_luabind_class/transformation/super.js +17 -1
  29. package/plugins/transform_luabind_class/transformation/utils.d.ts +27 -4
  30. package/plugins/transform_luabind_class/transformation/utils.js +25 -2
  31. package/plugins/utils/ast.d.ts +1 -1
  32. package/plugins/utils/diagnostics.d.ts +9 -5
  33. package/plugins/utils/diagnostics.js +5 -1
  34. package/plugins/utils/tracy.d.ts +2 -2
  35. package/plugins/utils/tracy.js +2 -5
  36. package/types/index.d.ts +55 -55
  37. package/types/xr_ai/xr_action.d.ts +510 -510
  38. package/types/xr_ai/xr_alife.d.ts +566 -566
  39. package/types/xr_ai/xr_enemy_evaluation.d.ts +41 -41
  40. package/types/xr_ai/xr_goap.d.ts +669 -668
  41. package/types/xr_ai/xr_graph.d.ts +47 -47
  42. package/types/xr_ai/xr_memory.d.ts +148 -148
  43. package/types/xr_lib/xr_animation.d.ts +81 -81
  44. package/types/xr_lib/xr_bitwise.d.ts +32 -21
  45. package/types/xr_lib/xr_color.d.ts +45 -40
  46. package/types/xr_lib/xr_debug.d.ts +83 -77
  47. package/types/xr_lib/xr_dialog.d.ts +40 -40
  48. package/types/xr_lib/xr_flags.d.ts +529 -148
  49. package/types/xr_lib/xr_fs.d.ts +149 -148
  50. package/types/xr_lib/xr_game.d.ts +261 -158
  51. package/types/xr_lib/xr_hit.d.ts +41 -41
  52. package/types/xr_lib/xr_ini.d.ts +415 -188
  53. package/types/xr_lib/xr_level.d.ts +652 -225
  54. package/types/xr_lib/xr_luabind.d.ts +64 -59
  55. package/types/xr_lib/xr_map.d.ts +61 -61
  56. package/types/xr_lib/xr_math.d.ts +815 -233
  57. package/types/xr_lib/xr_multiplayer.d.ts +351 -351
  58. package/types/xr_lib/xr_profile.d.ts +192 -160
  59. package/types/xr_lib/xr_properties.d.ts +455 -166
  60. package/types/xr_lib/xr_relation.d.ts +84 -84
  61. package/types/xr_lib/xr_render.d.ts +71 -69
  62. package/types/xr_lib/xr_save.d.ts +727 -223
  63. package/types/xr_lib/xr_sound.d.ts +151 -151
  64. package/types/xr_lib/xr_stats.ts +20 -20
  65. package/types/xr_lib/xr_task.d.ts +111 -111
  66. package/types/xr_lib/xr_time.d.ts +166 -61
  67. package/types/xr_lib/xr_type.d.ts +75 -75
  68. package/types/xr_object/client/xr_anomaly.d.ts +50 -50
  69. package/types/xr_object/client/xr_artefact.d.ts +98 -98
  70. package/types/xr_object/client/xr_client_object.d.ts +76 -76
  71. package/types/xr_object/client/xr_creature.d.ts +164 -164
  72. package/types/xr_object/client/xr_item.d.ts +264 -264
  73. package/types/xr_object/client/xr_level.d.ts +285 -285
  74. package/types/xr_object/client/xr_physic.d.ts +214 -214
  75. package/types/xr_object/client/xr_zone.d.ts +47 -47
  76. package/types/xr_object/script/xr_script_interface.d.ts +584 -584
  77. package/types/xr_object/script/xr_script_object.d.ts +2408 -1390
  78. package/types/xr_object/script/xr_script_trade.d.ts +41 -26
  79. package/types/xr_object/server/xr_server_object.d.ts +794 -792
  80. package/types/xr_ui/xr_ui_asset.d.ts +129 -123
  81. package/types/xr_ui/xr_ui_core.d.ts +106 -97
  82. package/types/xr_ui/xr_ui_event.d.ts +383 -381
  83. package/types/xr_ui/xr_ui_interface.d.ts +901 -903
  84. package/types/xr_ui/xr_ui_menu.d.ts +142 -142
  85. package/types/xrf_plugin.d.ts +59 -51
@@ -1,233 +1,815 @@
1
- declare module "xray16" {
2
- /**
3
- * Frame rectangle.
4
- * Describing x1, y1 top left start point and x2, y2 bottom right end point.
5
- *
6
- * @source C++ class Frect
7
- * @customConstructor Frect
8
- * @group xr_math
9
- */
10
- export class Frect extends EngineBinding {
11
- public lt: vector2;
12
- public rb: vector2;
13
-
14
- public x1: f32;
15
- public x2: f32;
16
- public y1: f32;
17
- public y2: f32;
18
-
19
- public set(x1: f32, y1: f32, x2: f32, y2: f32): Frect;
20
- }
21
-
22
- /**
23
- * @source C++ class Fbox
24
- * @customConstructor Fbox
25
- * @group xr_math
26
- */
27
- export class Fbox {
28
- public max: vector;
29
- public min: vector;
30
-
31
- public constructor();
32
- }
33
-
34
- /**
35
- * @source C++ class rotation
36
- * @customConstructor rotation
37
- * @group xr_math
38
- */
39
- export class rotation {
40
- public yaw: f32;
41
- public pitch: f32;
42
- }
43
-
44
- /**
45
- * @source C++ class vector2
46
- * @customConstructor vector2
47
- * @group xr_math
48
- */
49
- export class vector2 {
50
- public x: f32;
51
- public y: f32;
52
-
53
- public set(x: f32, y: f32): vector2;
54
-
55
- public set(vector: vector2): vector2;
56
- }
57
-
58
- /**
59
- * @source C++ class XR_vector
60
- * @customConstructor vector
61
- * @group xr_math
62
- */
63
- export class vector {
64
- public x: f32;
65
- public y: f32;
66
- public z: f32;
67
-
68
- public abs(vector: Readonly<vector>): vector;
69
-
70
- public add(val: f32): vector;
71
-
72
- public add(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
73
-
74
- public add(vector: Readonly<vector>): vector;
75
-
76
- public add(vector: Readonly<vector>, val: f32): vector;
77
-
78
- public align(): vector;
79
-
80
- public average(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
81
-
82
- public average(vector: Readonly<vector>): vector;
83
-
84
- public clamp(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
85
-
86
- public clamp(vector: Readonly<vector>): vector;
87
-
88
- public crossproduct(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
89
-
90
- public distance_to(vector: Readonly<vector>): f32;
91
-
92
- public distance_to_sqr(vector: Readonly<vector>): f32;
93
-
94
- public distance_to_xz(vector: Readonly<vector>): f32;
95
-
96
- public div(val: f32): vector;
97
-
98
- public div(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
99
-
100
- public div(vector: Readonly<vector>): vector;
101
-
102
- public div(vector: Readonly<vector>, val: f32): vector;
103
-
104
- public dotproduct(vector: Readonly<vector>): f32;
105
-
106
- public getH(): f32;
107
-
108
- public getP(): f32;
109
-
110
- public inertion(vector: Readonly<vector>, val: f32): vector;
111
-
112
- public invert(): vector;
113
-
114
- public invert(vector: Readonly<vector>): vector;
115
-
116
- public lerp(vector1: Readonly<vector>, vector2: Readonly<vector>, val: f32): vector;
117
-
118
- public mad(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
119
-
120
- public mad(vector1: Readonly<vector>, vector2: Readonly<vector>, val: f32): vector;
121
-
122
- public mad(vector1: Readonly<vector>, vector2: Readonly<vector>, vector3: Readonly<vector>): vector;
123
-
124
- public mad(vector: Readonly<vector>, val: f32): vector;
125
-
126
- /**
127
- * @returns 3d vector magnitude value `sqrt(x*x + y*y + z*z)`
128
- */
129
- public magnitude(): f32;
130
-
131
- public max(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
132
-
133
- public max(vector: Readonly<vector>): vector;
134
-
135
- public min(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
136
-
137
- public min(vector: Readonly<vector>): vector;
138
-
139
- public mul(val: f32): vector;
140
-
141
- public mul(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
142
-
143
- public mul(vector: Readonly<vector>): vector;
144
-
145
- public mul(vector: Readonly<vector>, val: f32): vector;
146
-
147
- public normalize(): vector;
148
-
149
- public normalize(vector: Readonly<vector>): vector;
150
-
151
- public normalize_safe(): vector;
152
-
153
- public normalize_safe(vector: Readonly<vector>): vector;
154
-
155
- public reflect(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
156
-
157
- public set(vector: Readonly<vector>): vector;
158
-
159
- public set(x: f32, y: f32, z: f32): vector;
160
-
161
- public setHP(val1: f32, val2: f32): vector;
162
-
163
- public set_length(val: f32): vector;
164
-
165
- public similar(vector: Readonly<vector>, val: f32): boolean;
166
-
167
- public slide(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
168
-
169
- public sub(val: f32): vector;
170
-
171
- public sub(vector1: Readonly<vector>, vector2: Readonly<vector>): vector;
172
-
173
- public sub(vector: Readonly<vector>): vector;
174
-
175
- public sub(vector: Readonly<vector>, val: f32): vector;
176
- }
177
-
178
- /**
179
- * @source C++ class RPoint
180
- * @customConstructor RPoint
181
- * @group xr_math
182
- */
183
- export class RPoint {
184
- public A: vector;
185
- public P: vector;
186
-
187
- public constructor();
188
- }
189
-
190
- /**
191
- * @source C++ class matrix
192
- * @customConstructor matrix
193
- * @group xr_math
194
- */
195
- export class matrix {
196
- public _14_: f32;
197
- public _24_: f32;
198
- public _34_: f32;
199
- public _44_: f32;
200
- public c: vector;
201
- public i: vector;
202
- public j: vector;
203
- public k: vector;
204
-
205
- public constructor();
206
-
207
- public mk_xform(x: unknown /* _quaternion<float> */, vector: vector): matrix;
208
-
209
- public set(matix: matrix): matrix;
210
-
211
- public set(vector1: vector, vector2: vector, vector3: vector, vector4: vector): matrix;
212
-
213
- public div(matix: matrix, number: f32): matrix;
214
-
215
- public div(number: f32): matrix;
216
-
217
- public identity(): matrix;
218
-
219
- public setHPB(number1: f32, number2: f32, number3: f32): matrix;
220
-
221
- public setXYZ(x: f32, y: f32, z: f32): matrix;
222
-
223
- public getHPB(matrix: matrix, number1: f32, number2: f32, number3: f32): matrix;
224
-
225
- public mul(matix1: matrix, matix2: matrix): matrix;
226
-
227
- public mul(matix: matrix, number: f32): matrix;
228
-
229
- public mul(number: f32): matrix;
230
-
231
- public setXYZi(number1: f32, number2: f32, number3: f32): matrix;
232
- }
233
- }
1
+ declare module "xray16" {
2
+ /**
3
+ * Rectangle with top-left and bottom-right points.
4
+ *
5
+ * @source C++ class Frect
6
+ * @customConstructor Frect
7
+ * @group xr_math
8
+ */
9
+ export class Frect extends EngineBinding {
10
+ /**
11
+ * Top-left corner.
12
+ */
13
+ public lt: vector2;
14
+
15
+ /**
16
+ * Bottom-right corner.
17
+ */
18
+ public rb: vector2;
19
+
20
+ /**
21
+ * Left edge.
22
+ */
23
+ public x1: f32;
24
+
25
+ /**
26
+ * Right edge.
27
+ */
28
+ public x2: f32;
29
+
30
+ /**
31
+ * Top edge.
32
+ */
33
+ public y1: f32;
34
+
35
+ /**
36
+ * Bottom edge.
37
+ */
38
+ public y2: f32;
39
+
40
+ /**
41
+ * Create an empty rectangle.
42
+ */
43
+ public constructor();
44
+
45
+ /**
46
+ * Set rectangle edges.
47
+ *
48
+ * @param x1 - Left edge.
49
+ * @param y1 - Top edge.
50
+ * @param x2 - Right edge.
51
+ * @param y2 - Bottom edge.
52
+ * @returns This rectangle.
53
+ */
54
+ public set(x1: f32, y1: f32, x2: f32, y2: f32): Frect;
55
+ }
56
+
57
+ /**
58
+ * Axis-aligned 3D box.
59
+ *
60
+ * @source C++ class Fbox
61
+ * @customConstructor Fbox
62
+ * @group xr_math
63
+ */
64
+ export class Fbox {
65
+ /**
66
+ * Maximum corner.
67
+ */
68
+ public max: vector;
69
+
70
+ /**
71
+ * Minimum corner.
72
+ */
73
+ public min: vector;
74
+
75
+ /**
76
+ * Create an empty box.
77
+ */
78
+ public constructor();
79
+ }
80
+
81
+ /**
82
+ * Heading/pitch rotation pair.
83
+ *
84
+ * @source C++ class rotation
85
+ * @customConstructor rotation
86
+ * @group xr_math
87
+ */
88
+ export class rotation {
89
+ /**
90
+ * Horizontal angle.
91
+ */
92
+ public yaw: f32;
93
+
94
+ /**
95
+ * Vertical angle.
96
+ */
97
+ public pitch: f32;
98
+ }
99
+
100
+ /**
101
+ * Mutable 2D float vector.
102
+ *
103
+ * @source C++ class vector2
104
+ * @customConstructor vector2
105
+ * @group xr_math
106
+ */
107
+ export class vector2 {
108
+ /**
109
+ * X component.
110
+ */
111
+ public x: f32;
112
+
113
+ /**
114
+ * Y component.
115
+ */
116
+ public y: f32;
117
+
118
+ /**
119
+ * Create a zero vector.
120
+ */
121
+ public constructor();
122
+
123
+ /**
124
+ * Set components.
125
+ *
126
+ * @param x - X component.
127
+ * @param y - Y component.
128
+ * @returns This vector.
129
+ */
130
+ public set(x: f32, y: f32): vector2;
131
+
132
+ /**
133
+ * Copy another vector.
134
+ *
135
+ * @param vector - Source vector.
136
+ * @returns This vector.
137
+ */
138
+ public set(vector: vector2): vector2;
139
+ }
140
+
141
+ /**
142
+ * Mutable 3D float vector.
143
+ *
144
+ * Most operations mutate the receiver and return it for chaining.
145
+ *
146
+ * @source C++ class XR_vector
147
+ * @customConstructor vector
148
+ * @group xr_math
149
+ */
150
+ export class vector {
151
+ /**
152
+ * X component.
153
+ */
154
+ public x: f32;
155
+
156
+ /**
157
+ * Y component.
158
+ */
159
+ public y: f32;
160
+
161
+ /**
162
+ * Z component.
163
+ */
164
+ public z: f32;
165
+
166
+ /**
167
+ * Create a zero vector.
168
+ */
169
+ public constructor();
170
+
171
+ /**
172
+ * Set this vector to absolute component values of another vector.
173
+ *
174
+ * @param vector - Source vector.
175
+ * @returns This vector.
176
+ */
177
+ public abs(vector: Readonly<vector>): vector;
178
+
179
+ /**
180
+ * Add a scalar to every component.
181
+ *
182
+ * @param value - Scalar value.
183
+ * @returns This vector.
184
+ */
185
+ public add(value: f32): vector;
186
+
187
+ /**
188
+ * Set this vector to `left + right`.
189
+ *
190
+ * @param left - Left vector.
191
+ * @param right - Right vector.
192
+ * @returns This vector.
193
+ */
194
+ public add(left: Readonly<vector>, right: Readonly<vector>): vector;
195
+
196
+ /**
197
+ * Add another vector.
198
+ *
199
+ * @param vector - Vector to add.
200
+ * @returns This vector.
201
+ */
202
+ public add(vector: Readonly<vector>): vector;
203
+
204
+ /**
205
+ * Set this vector to `vector + value`.
206
+ *
207
+ * @param vector - Source vector.
208
+ * @param value - Scalar value.
209
+ * @returns This vector.
210
+ */
211
+ public add(vector: Readonly<vector>, value: f32): vector;
212
+
213
+ /**
214
+ * Snap components to the engine alignment grid.
215
+ *
216
+ * @returns This vector.
217
+ */
218
+ public align(): vector;
219
+
220
+ /**
221
+ * Set this vector to the midpoint between two vectors.
222
+ *
223
+ * @param left - First vector.
224
+ * @param right - Second vector.
225
+ * @returns This vector.
226
+ */
227
+ public average(left: Readonly<vector>, right: Readonly<vector>): vector;
228
+
229
+ /**
230
+ * Move this vector halfway toward another vector.
231
+ *
232
+ * @param vector - Other vector.
233
+ * @returns This vector.
234
+ */
235
+ public average(vector: Readonly<vector>): vector;
236
+
237
+ /**
238
+ * Clamp this vector between two bounds.
239
+ *
240
+ * @param min - Minimum components.
241
+ * @param max - Maximum components.
242
+ * @returns This vector.
243
+ */
244
+ public clamp(min: Readonly<vector>, max: Readonly<vector>): vector;
245
+
246
+ /**
247
+ * Clamp this vector to symmetric component bounds.
248
+ *
249
+ * @param vector - Bound vector.
250
+ * @returns This vector.
251
+ */
252
+ public clamp(vector: Readonly<vector>): vector;
253
+
254
+ /**
255
+ * Set this vector to a cross product.
256
+ *
257
+ * @param left - Left vector.
258
+ * @param right - Right vector.
259
+ * @returns This vector.
260
+ */
261
+ public crossproduct(left: Readonly<vector>, right: Readonly<vector>): vector;
262
+
263
+ /**
264
+ * Get 3D distance to another vector.
265
+ *
266
+ * @param vector - Target vector.
267
+ * @returns Distance.
268
+ */
269
+ public distance_to(vector: Readonly<vector>): f32;
270
+
271
+ /**
272
+ * Get squared 3D distance to another vector.
273
+ *
274
+ * @param vector - Target vector.
275
+ * @returns Squared distance.
276
+ */
277
+ public distance_to_sqr(vector: Readonly<vector>): f32;
278
+
279
+ /**
280
+ * Get distance to another vector on the XZ plane.
281
+ *
282
+ * @param vector - Target vector.
283
+ * @returns XZ-plane distance.
284
+ */
285
+ public distance_to_xz(vector: Readonly<vector>): f32;
286
+
287
+ /**
288
+ * Divide every component by a scalar.
289
+ *
290
+ * @param value - Scalar divisor.
291
+ * @returns This vector.
292
+ */
293
+ public div(value: f32): vector;
294
+
295
+ /**
296
+ * Set this vector to component-wise `left / right`.
297
+ *
298
+ * @param left - Left vector.
299
+ * @param right - Right vector.
300
+ * @returns This vector.
301
+ */
302
+ public div(left: Readonly<vector>, right: Readonly<vector>): vector;
303
+
304
+ /**
305
+ * Divide this vector component-wise by another vector.
306
+ *
307
+ * @param vector - Divisor vector.
308
+ * @returns This vector.
309
+ */
310
+ public div(vector: Readonly<vector>): vector;
311
+
312
+ /**
313
+ * Set this vector to `vector / value`.
314
+ *
315
+ * @param vector - Source vector.
316
+ * @param value - Scalar divisor.
317
+ * @returns This vector.
318
+ */
319
+ public div(vector: Readonly<vector>, value: f32): vector;
320
+
321
+ /**
322
+ * Get dot product with another vector.
323
+ *
324
+ * @param vector - Other vector.
325
+ * @returns Dot product.
326
+ */
327
+ public dotproduct(vector: Readonly<vector>): f32;
328
+
329
+ /**
330
+ * Get heading angle for this direction vector.
331
+ *
332
+ * @returns Heading angle in radians.
333
+ */
334
+ public getH(): f32;
335
+
336
+ /**
337
+ * Get pitch angle for this direction vector.
338
+ *
339
+ * @returns Pitch angle in radians.
340
+ */
341
+ public getP(): f32;
342
+
343
+ /**
344
+ * Smooth this vector toward another vector.
345
+ *
346
+ * @param vector - Target vector.
347
+ * @param value - Blend factor.
348
+ * @returns This vector.
349
+ */
350
+ public inertion(vector: Readonly<vector>, value: f32): vector;
351
+
352
+ /**
353
+ * Negate this vector.
354
+ *
355
+ * @returns This vector.
356
+ */
357
+ public invert(): vector;
358
+
359
+ /**
360
+ * Set this vector to negated source vector.
361
+ *
362
+ * @param vector - Source vector.
363
+ * @returns This vector.
364
+ */
365
+ public invert(vector: Readonly<vector>): vector;
366
+
367
+ /**
368
+ * Linearly interpolate between two vectors.
369
+ *
370
+ * @param from - Start vector.
371
+ * @param to - End vector.
372
+ * @param factor - Interpolation factor.
373
+ * @returns This vector.
374
+ */
375
+ public lerp(from: Readonly<vector>, to: Readonly<vector>, factor: f32): vector;
376
+
377
+ /**
378
+ * Add two vectors and store the result.
379
+ *
380
+ * @param left - Left vector.
381
+ * @param right - Right vector.
382
+ * @returns This vector.
383
+ */
384
+ public mad(left: Readonly<vector>, right: Readonly<vector>): vector;
385
+
386
+ /**
387
+ * Add a scaled vector and store the result.
388
+ *
389
+ * @param base - Base vector.
390
+ * @param direction - Direction vector.
391
+ * @param scale - Direction scale.
392
+ * @returns This vector.
393
+ */
394
+ public mad(base: Readonly<vector>, direction: Readonly<vector>, scale: f32): vector;
395
+
396
+ /**
397
+ * Add two vectors component-wise and scale by a third vector.
398
+ *
399
+ * @param base - Base vector.
400
+ * @param left - First multiplier vector.
401
+ * @param right - Second multiplier vector.
402
+ * @returns This vector.
403
+ */
404
+ public mad(base: Readonly<vector>, left: Readonly<vector>, right: Readonly<vector>): vector;
405
+
406
+ /**
407
+ * Add a scaled vector to this vector.
408
+ *
409
+ * @param vector - Vector to add.
410
+ * @param scale - Vector scale.
411
+ * @returns This vector.
412
+ */
413
+ public mad(vector: Readonly<vector>, scale: f32): vector;
414
+
415
+ /**
416
+ * Get vector length.
417
+ *
418
+ * @returns 3D vector magnitude.
419
+ */
420
+ public magnitude(): f32;
421
+
422
+ /**
423
+ * Set this vector to component-wise maximum of two vectors.
424
+ *
425
+ * @param left - First vector.
426
+ * @param right - Second vector.
427
+ * @returns This vector.
428
+ */
429
+ public max(left: Readonly<vector>, right: Readonly<vector>): vector;
430
+
431
+ /**
432
+ * Clamp this vector upward by another vector.
433
+ *
434
+ * @param vector - Minimum components.
435
+ * @returns This vector.
436
+ */
437
+ public max(vector: Readonly<vector>): vector;
438
+
439
+ /**
440
+ * Set this vector to component-wise minimum of two vectors.
441
+ *
442
+ * @param left - First vector.
443
+ * @param right - Second vector.
444
+ * @returns This vector.
445
+ */
446
+ public min(left: Readonly<vector>, right: Readonly<vector>): vector;
447
+
448
+ /**
449
+ * Clamp this vector downward by another vector.
450
+ *
451
+ * @param vector - Maximum components.
452
+ * @returns This vector.
453
+ */
454
+ public min(vector: Readonly<vector>): vector;
455
+
456
+ /**
457
+ * Multiply every component by a scalar.
458
+ *
459
+ * @param value - Scalar multiplier.
460
+ * @returns This vector.
461
+ */
462
+ public mul(value: f32): vector;
463
+
464
+ /**
465
+ * Set this vector to component-wise `left * right`.
466
+ *
467
+ * @param left - Left vector.
468
+ * @param right - Right vector.
469
+ * @returns This vector.
470
+ */
471
+ public mul(left: Readonly<vector>, right: Readonly<vector>): vector;
472
+
473
+ /**
474
+ * Multiply this vector component-wise by another vector.
475
+ *
476
+ * @param vector - Multiplier vector.
477
+ * @returns This vector.
478
+ */
479
+ public mul(vector: Readonly<vector>): vector;
480
+
481
+ /**
482
+ * Set this vector to `vector * value`.
483
+ *
484
+ * @param vector - Source vector.
485
+ * @param value - Scalar multiplier.
486
+ * @returns This vector.
487
+ */
488
+ public mul(vector: Readonly<vector>, value: f32): vector;
489
+
490
+ /**
491
+ * Normalize this vector safely.
492
+ *
493
+ * @returns This vector.
494
+ */
495
+ public normalize(): vector;
496
+
497
+ /**
498
+ * Set this vector to normalized source vector safely.
499
+ *
500
+ * @param vector - Source vector.
501
+ * @returns This vector.
502
+ */
503
+ public normalize(vector: Readonly<vector>): vector;
504
+
505
+ /**
506
+ * Normalize this vector safely.
507
+ *
508
+ * @returns This vector.
509
+ */
510
+ public normalize_safe(): vector;
511
+
512
+ /**
513
+ * Set this vector to normalized source vector safely.
514
+ *
515
+ * @param vector - Source vector.
516
+ * @returns This vector.
517
+ */
518
+ public normalize_safe(vector: Readonly<vector>): vector;
519
+
520
+ /**
521
+ * Reflect a direction vector around a normal.
522
+ *
523
+ * @param direction - Incoming direction.
524
+ * @param normal - Surface normal.
525
+ * @returns This vector.
526
+ */
527
+ public reflect(direction: Readonly<vector>, normal: Readonly<vector>): vector;
528
+
529
+ /**
530
+ * Copy another vector.
531
+ *
532
+ * @param vector - Source vector.
533
+ * @returns This vector.
534
+ */
535
+ public set(vector: Readonly<vector>): vector;
536
+
537
+ /**
538
+ * Set components.
539
+ *
540
+ * @param x - X component.
541
+ * @param y - Y component.
542
+ * @param z - Z component.
543
+ * @returns This vector.
544
+ */
545
+ public set(x: f32, y: f32, z: f32): vector;
546
+
547
+ /**
548
+ * Set direction from heading and pitch.
549
+ *
550
+ * @param heading - Heading angle in radians.
551
+ * @param pitch - Pitch angle in radians.
552
+ * @returns This vector.
553
+ */
554
+ public setHP(heading: f32, pitch: f32): vector;
555
+
556
+ /**
557
+ * Change vector length while keeping direction.
558
+ *
559
+ * @param value - New length.
560
+ * @returns This vector.
561
+ */
562
+ public set_length(value: f32): vector;
563
+
564
+ /**
565
+ * Compare vectors with tolerance.
566
+ *
567
+ * @param vector - Vector to compare.
568
+ * @param epsilon - Allowed component difference.
569
+ * @returns Whether vectors are similar.
570
+ */
571
+ public similar(vector: Readonly<vector>, epsilon: f32): boolean;
572
+
573
+ /**
574
+ * Slide a direction along a surface normal.
575
+ *
576
+ * @param direction - Direction vector.
577
+ * @param normal - Surface normal.
578
+ * @returns This vector.
579
+ */
580
+ public slide(direction: Readonly<vector>, normal: Readonly<vector>): vector;
581
+
582
+ /**
583
+ * Subtract a scalar from every component.
584
+ *
585
+ * @param value - Scalar value.
586
+ * @returns This vector.
587
+ */
588
+ public sub(value: f32): vector;
589
+
590
+ /**
591
+ * Set this vector to `left - right`.
592
+ *
593
+ * @param left - Left vector.
594
+ * @param right - Right vector.
595
+ * @returns This vector.
596
+ */
597
+ public sub(left: Readonly<vector>, right: Readonly<vector>): vector;
598
+
599
+ /**
600
+ * Subtract another vector.
601
+ *
602
+ * @param vector - Vector to subtract.
603
+ * @returns This vector.
604
+ */
605
+ public sub(vector: Readonly<vector>): vector;
606
+
607
+ /**
608
+ * Set this vector to `vector - value`.
609
+ *
610
+ * @param vector - Source vector.
611
+ * @param value - Scalar value.
612
+ * @returns This vector.
613
+ */
614
+ public sub(vector: Readonly<vector>, value: f32): vector;
615
+ }
616
+
617
+ /**
618
+ * Patrol graph point with position and angle vectors.
619
+ *
620
+ * @source C++ class RPoint
621
+ * @customConstructor RPoint
622
+ * @group xr_math
623
+ */
624
+ export class RPoint {
625
+ /**
626
+ * Angle vector.
627
+ */
628
+ public A: vector;
629
+
630
+ /**
631
+ * Position vector.
632
+ */
633
+ public P: vector;
634
+
635
+ /**
636
+ * Create an empty patrol point.
637
+ */
638
+ public constructor();
639
+ }
640
+
641
+ /**
642
+ * Mutable 4x4 transform matrix.
643
+ *
644
+ * Basis vectors are exposed as `i`, `j`, `k`; translation is exposed as `c`.
645
+ *
646
+ * @source C++ class matrix
647
+ * @customConstructor matrix
648
+ * @group xr_math
649
+ */
650
+ export class matrix {
651
+ /**
652
+ * First row fourth component.
653
+ */
654
+ public _14_: f32;
655
+
656
+ /**
657
+ * Second row fourth component.
658
+ */
659
+ public _24_: f32;
660
+
661
+ /**
662
+ * Third row fourth component.
663
+ */
664
+ public _34_: f32;
665
+
666
+ /**
667
+ * Fourth row fourth component.
668
+ */
669
+ public _44_: f32;
670
+
671
+ /**
672
+ * Translation vector.
673
+ */
674
+ public c: vector;
675
+
676
+ /**
677
+ * X basis vector.
678
+ */
679
+ public i: vector;
680
+
681
+ /**
682
+ * Y basis vector.
683
+ */
684
+ public j: vector;
685
+
686
+ /**
687
+ * Z basis vector.
688
+ */
689
+ public k: vector;
690
+
691
+ /**
692
+ * Create an empty matrix.
693
+ */
694
+ public constructor();
695
+
696
+ /**
697
+ * Build transform from quaternion and translation.
698
+ *
699
+ * @param rotation - Quaternion value.
700
+ * @param position - Translation vector.
701
+ * @returns This matrix.
702
+ */
703
+ public mk_xform(rotation: unknown /* _quaternion<float> */, position: vector): matrix;
704
+
705
+ /**
706
+ * Copy another matrix.
707
+ *
708
+ * @param value - Source matrix.
709
+ * @returns This matrix.
710
+ */
711
+ public set(value: matrix): matrix;
712
+
713
+ /**
714
+ * Set basis and translation vectors.
715
+ *
716
+ * @param i - X basis vector.
717
+ * @param j - Y basis vector.
718
+ * @param k - Z basis vector.
719
+ * @param c - Translation vector.
720
+ * @returns This matrix.
721
+ */
722
+ public set(i: vector, j: vector, k: vector, c: vector): matrix;
723
+
724
+ /**
725
+ * Set this matrix to `value / divisor`.
726
+ *
727
+ * @param value - Source matrix.
728
+ * @param divisor - Scalar divisor.
729
+ * @returns This matrix.
730
+ */
731
+ public div(value: matrix, divisor: f32): matrix;
732
+
733
+ /**
734
+ * Divide this matrix by a scalar.
735
+ *
736
+ * @param divisor - Scalar divisor.
737
+ * @returns This matrix.
738
+ */
739
+ public div(divisor: f32): matrix;
740
+
741
+ /**
742
+ * Set this matrix to identity.
743
+ *
744
+ * @returns This matrix.
745
+ */
746
+ public identity(): matrix;
747
+
748
+ /**
749
+ * Set rotation from heading, pitch, and bank angles.
750
+ *
751
+ * @param heading - Heading angle in radians.
752
+ * @param pitch - Pitch angle in radians.
753
+ * @param bank - Bank angle in radians.
754
+ * @returns This matrix.
755
+ */
756
+ public setHPB(heading: f32, pitch: f32, bank: f32): matrix;
757
+
758
+ /**
759
+ * Set rotation from XYZ Euler angles.
760
+ *
761
+ * @param x - X rotation in radians.
762
+ * @param y - Y rotation in radians.
763
+ * @param z - Z rotation in radians.
764
+ * @returns This matrix.
765
+ */
766
+ public setXYZ(x: f32, y: f32, z: f32): matrix;
767
+
768
+ /**
769
+ * Get heading, pitch, and bank from this matrix.
770
+ *
771
+ * @param value - Placeholder kept for existing declaration compatibility.
772
+ * @param heading - Heading output placeholder.
773
+ * @param pitch - Pitch output placeholder.
774
+ * @param bank - Bank output placeholder.
775
+ * @returns This matrix.
776
+ */
777
+ public getHPB(value: matrix, heading: f32, pitch: f32, bank: f32): matrix;
778
+
779
+ /**
780
+ * Set this matrix to `left * right`.
781
+ *
782
+ * @param left - Left matrix.
783
+ * @param right - Right matrix.
784
+ * @returns This matrix.
785
+ */
786
+ public mul(left: matrix, right: matrix): matrix;
787
+
788
+ /**
789
+ * Set this matrix to `value * multiplier`.
790
+ *
791
+ * @param value - Source matrix.
792
+ * @param multiplier - Scalar multiplier.
793
+ * @returns This matrix.
794
+ */
795
+ public mul(value: matrix, multiplier: f32): matrix;
796
+
797
+ /**
798
+ * Multiply this matrix by a scalar.
799
+ *
800
+ * @param multiplier - Scalar multiplier.
801
+ * @returns This matrix.
802
+ */
803
+ public mul(multiplier: f32): matrix;
804
+
805
+ /**
806
+ * Set inverse XYZ rotation from Euler angles.
807
+ *
808
+ * @param x - X rotation in radians.
809
+ * @param y - Y rotation in radians.
810
+ * @param z - Z rotation in radians.
811
+ * @returns This matrix.
812
+ */
813
+ public setXYZi(x: f32, y: f32, z: f32): matrix;
814
+ }
815
+ }