raylib-bindings 0.5.8pre1-x64-mingw

Sign up to get free protection for your applications and to get access to all the features.
data/lib/raymath.rb ADDED
@@ -0,0 +1,845 @@
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+ #
5
+ # [NOTICE] Autogenerated. Do not edit.
6
+
7
+ require 'ffi'
8
+
9
+ module Raylib
10
+ extend FFI::Library
11
+
12
+ # Define/Macro
13
+
14
+ EPSILON = 0.000001
15
+
16
+ # Typedef
17
+
18
+
19
+ # Struct
20
+
21
+ # NOTE: Helper types to be used instead of array return types for *ToFloat functions
22
+ class Float3 < FFI::Struct
23
+ layout(
24
+ :v, [:float, 3],
25
+ )
26
+ def v = self[:v]
27
+ def v=(v) self[:v] = v end
28
+ end
29
+
30
+ class Float16 < FFI::Struct
31
+ layout(
32
+ :v, [:float, 16],
33
+ )
34
+ def v = self[:v]
35
+ def v=(v) self[:v] = v end
36
+ end
37
+
38
+
39
+ # Function
40
+
41
+ def self.setup_raymath_symbols
42
+ entries = [
43
+
44
+ # @!method Clamp(value, min, max)
45
+ # Clamp
46
+ # @param value [float]
47
+ # @param min [float]
48
+ # @param max [float]
49
+ # @return [float]
50
+ [:Clamp, :Clamp, [:float, :float, :float], :float],
51
+
52
+ # @!method Lerp(start, end, amount)
53
+ # Lerp
54
+ # @param start [float]
55
+ # @param end [float]
56
+ # @param amount [float]
57
+ # @return [float]
58
+ [:Lerp, :Lerp, [:float, :float, :float], :float],
59
+
60
+ # @!method Normalize(value, start, end)
61
+ # Normalize
62
+ # @param value [float]
63
+ # @param start [float]
64
+ # @param end [float]
65
+ # @return [float]
66
+ [:Normalize, :Normalize, [:float, :float, :float], :float],
67
+
68
+ # @!method Remap(value, inputStart, inputEnd, outputStart, outputEnd)
69
+ # Remap
70
+ # @param value [float]
71
+ # @param inputStart [float]
72
+ # @param inputEnd [float]
73
+ # @param outputStart [float]
74
+ # @param outputEnd [float]
75
+ # @return [float]
76
+ [:Remap, :Remap, [:float, :float, :float, :float, :float], :float],
77
+
78
+ # @!method Wrap(value, min, max)
79
+ # Wrap
80
+ # @param value [float]
81
+ # @param min [float]
82
+ # @param max [float]
83
+ # @return [float]
84
+ [:Wrap, :Wrap, [:float, :float, :float], :float],
85
+
86
+ # @!method FloatEquals(x, y)
87
+ # FloatEquals
88
+ # @param x [float]
89
+ # @param y [float]
90
+ # @return [int]
91
+ [:FloatEquals, :FloatEquals, [:float, :float], :int],
92
+
93
+ # @!method Vector2Zero()
94
+ # Vector2Zero
95
+ # @return [Vector2]
96
+ [:Vector2Zero, :Vector2Zero, [], Vector2.by_value],
97
+
98
+ # @!method Vector2One()
99
+ # Vector2One
100
+ # @return [Vector2]
101
+ [:Vector2One, :Vector2One, [], Vector2.by_value],
102
+
103
+ # @!method Vector2Add(v1, v2)
104
+ # Vector2Add
105
+ # @param v1 [Vector2]
106
+ # @param v2 [Vector2]
107
+ # @return [Vector2]
108
+ [:Vector2Add, :Vector2Add, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
109
+
110
+ # @!method Vector2AddValue(v, add)
111
+ # Vector2AddValue
112
+ # @param v [Vector2]
113
+ # @param add [float]
114
+ # @return [Vector2]
115
+ [:Vector2AddValue, :Vector2AddValue, [Vector2.by_value, :float], Vector2.by_value],
116
+
117
+ # @!method Vector2Subtract(v1, v2)
118
+ # Vector2Subtract
119
+ # @param v1 [Vector2]
120
+ # @param v2 [Vector2]
121
+ # @return [Vector2]
122
+ [:Vector2Subtract, :Vector2Subtract, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
123
+
124
+ # @!method Vector2SubtractValue(v, sub)
125
+ # Vector2SubtractValue
126
+ # @param v [Vector2]
127
+ # @param sub [float]
128
+ # @return [Vector2]
129
+ [:Vector2SubtractValue, :Vector2SubtractValue, [Vector2.by_value, :float], Vector2.by_value],
130
+
131
+ # @!method Vector2Length(v)
132
+ # Vector2Length
133
+ # @param v [Vector2]
134
+ # @return [float]
135
+ [:Vector2Length, :Vector2Length, [Vector2.by_value], :float],
136
+
137
+ # @!method Vector2LengthSqr(v)
138
+ # Vector2LengthSqr
139
+ # @param v [Vector2]
140
+ # @return [float]
141
+ [:Vector2LengthSqr, :Vector2LengthSqr, [Vector2.by_value], :float],
142
+
143
+ # @!method Vector2DotProduct(v1, v2)
144
+ # Vector2DotProduct
145
+ # @param v1 [Vector2]
146
+ # @param v2 [Vector2]
147
+ # @return [float]
148
+ [:Vector2DotProduct, :Vector2DotProduct, [Vector2.by_value, Vector2.by_value], :float],
149
+
150
+ # @!method Vector2Distance(v1, v2)
151
+ # Vector2Distance
152
+ # @param v1 [Vector2]
153
+ # @param v2 [Vector2]
154
+ # @return [float]
155
+ [:Vector2Distance, :Vector2Distance, [Vector2.by_value, Vector2.by_value], :float],
156
+
157
+ # @!method Vector2DistanceSqr(v1, v2)
158
+ # Vector2DistanceSqr
159
+ # @param v1 [Vector2]
160
+ # @param v2 [Vector2]
161
+ # @return [float]
162
+ [:Vector2DistanceSqr, :Vector2DistanceSqr, [Vector2.by_value, Vector2.by_value], :float],
163
+
164
+ # @!method Vector2Angle(v1, v2)
165
+ # Vector2Angle
166
+ # @param v1 [Vector2]
167
+ # @param v2 [Vector2]
168
+ # @return [float]
169
+ [:Vector2Angle, :Vector2Angle, [Vector2.by_value, Vector2.by_value], :float],
170
+
171
+ # @!method Vector2LineAngle(start, end)
172
+ # Vector2LineAngle
173
+ # @param start [Vector2]
174
+ # @param end [Vector2]
175
+ # @return [float]
176
+ [:Vector2LineAngle, :Vector2LineAngle, [Vector2.by_value, Vector2.by_value], :float],
177
+
178
+ # @!method Vector2Scale(v, scale)
179
+ # Vector2Scale
180
+ # @param v [Vector2]
181
+ # @param scale [float]
182
+ # @return [Vector2]
183
+ [:Vector2Scale, :Vector2Scale, [Vector2.by_value, :float], Vector2.by_value],
184
+
185
+ # @!method Vector2Multiply(v1, v2)
186
+ # Vector2Multiply
187
+ # @param v1 [Vector2]
188
+ # @param v2 [Vector2]
189
+ # @return [Vector2]
190
+ [:Vector2Multiply, :Vector2Multiply, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
191
+
192
+ # @!method Vector2Negate(v)
193
+ # Vector2Negate
194
+ # @param v [Vector2]
195
+ # @return [Vector2]
196
+ [:Vector2Negate, :Vector2Negate, [Vector2.by_value], Vector2.by_value],
197
+
198
+ # @!method Vector2Divide(v1, v2)
199
+ # Vector2Divide
200
+ # @param v1 [Vector2]
201
+ # @param v2 [Vector2]
202
+ # @return [Vector2]
203
+ [:Vector2Divide, :Vector2Divide, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
204
+
205
+ # @!method Vector2Normalize(v)
206
+ # Vector2Normalize
207
+ # @param v [Vector2]
208
+ # @return [Vector2]
209
+ [:Vector2Normalize, :Vector2Normalize, [Vector2.by_value], Vector2.by_value],
210
+
211
+ # @!method Vector2Transform(v, mat)
212
+ # Vector2Transform
213
+ # @param v [Vector2]
214
+ # @param mat [Matrix]
215
+ # @return [Vector2]
216
+ [:Vector2Transform, :Vector2Transform, [Vector2.by_value, Matrix.by_value], Vector2.by_value],
217
+
218
+ # @!method Vector2Lerp(v1, v2, amount)
219
+ # Vector2Lerp
220
+ # @param v1 [Vector2]
221
+ # @param v2 [Vector2]
222
+ # @param amount [float]
223
+ # @return [Vector2]
224
+ [:Vector2Lerp, :Vector2Lerp, [Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
225
+
226
+ # @!method Vector2Reflect(v, normal)
227
+ # Vector2Reflect
228
+ # @param v [Vector2]
229
+ # @param normal [Vector2]
230
+ # @return [Vector2]
231
+ [:Vector2Reflect, :Vector2Reflect, [Vector2.by_value, Vector2.by_value], Vector2.by_value],
232
+
233
+ # @!method Vector2Rotate(v, angle)
234
+ # Vector2Rotate
235
+ # @param v [Vector2]
236
+ # @param angle [float]
237
+ # @return [Vector2]
238
+ [:Vector2Rotate, :Vector2Rotate, [Vector2.by_value, :float], Vector2.by_value],
239
+
240
+ # @!method Vector2MoveTowards(v, target, maxDistance)
241
+ # Vector2MoveTowards
242
+ # @param v [Vector2]
243
+ # @param target [Vector2]
244
+ # @param maxDistance [float]
245
+ # @return [Vector2]
246
+ [:Vector2MoveTowards, :Vector2MoveTowards, [Vector2.by_value, Vector2.by_value, :float], Vector2.by_value],
247
+
248
+ # @!method Vector2Invert(v)
249
+ # Vector2Invert
250
+ # @param v [Vector2]
251
+ # @return [Vector2]
252
+ [:Vector2Invert, :Vector2Invert, [Vector2.by_value], Vector2.by_value],
253
+
254
+ # @!method Vector2Clamp(v, min, max)
255
+ # Vector2Clamp
256
+ # @param v [Vector2]
257
+ # @param min [Vector2]
258
+ # @param max [Vector2]
259
+ # @return [Vector2]
260
+ [:Vector2Clamp, :Vector2Clamp, [Vector2.by_value, Vector2.by_value, Vector2.by_value], Vector2.by_value],
261
+
262
+ # @!method Vector2ClampValue(v, min, max)
263
+ # Vector2ClampValue
264
+ # @param v [Vector2]
265
+ # @param min [float]
266
+ # @param max [float]
267
+ # @return [Vector2]
268
+ [:Vector2ClampValue, :Vector2ClampValue, [Vector2.by_value, :float, :float], Vector2.by_value],
269
+
270
+ # @!method Vector2Equals(p, q)
271
+ # Vector2Equals
272
+ # @param p [Vector2]
273
+ # @param q [Vector2]
274
+ # @return [int]
275
+ [:Vector2Equals, :Vector2Equals, [Vector2.by_value, Vector2.by_value], :int],
276
+
277
+ # @!method Vector3Zero()
278
+ # Vector3Zero
279
+ # @return [Vector3]
280
+ [:Vector3Zero, :Vector3Zero, [], Vector3.by_value],
281
+
282
+ # @!method Vector3One()
283
+ # Vector3One
284
+ # @return [Vector3]
285
+ [:Vector3One, :Vector3One, [], Vector3.by_value],
286
+
287
+ # @!method Vector3Add(v1, v2)
288
+ # Vector3Add
289
+ # @param v1 [Vector3]
290
+ # @param v2 [Vector3]
291
+ # @return [Vector3]
292
+ [:Vector3Add, :Vector3Add, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
293
+
294
+ # @!method Vector3AddValue(v, add)
295
+ # Vector3AddValue
296
+ # @param v [Vector3]
297
+ # @param add [float]
298
+ # @return [Vector3]
299
+ [:Vector3AddValue, :Vector3AddValue, [Vector3.by_value, :float], Vector3.by_value],
300
+
301
+ # @!method Vector3Subtract(v1, v2)
302
+ # Vector3Subtract
303
+ # @param v1 [Vector3]
304
+ # @param v2 [Vector3]
305
+ # @return [Vector3]
306
+ [:Vector3Subtract, :Vector3Subtract, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
307
+
308
+ # @!method Vector3SubtractValue(v, sub)
309
+ # Vector3SubtractValue
310
+ # @param v [Vector3]
311
+ # @param sub [float]
312
+ # @return [Vector3]
313
+ [:Vector3SubtractValue, :Vector3SubtractValue, [Vector3.by_value, :float], Vector3.by_value],
314
+
315
+ # @!method Vector3Scale(v, scalar)
316
+ # Vector3Scale
317
+ # @param v [Vector3]
318
+ # @param scalar [float]
319
+ # @return [Vector3]
320
+ [:Vector3Scale, :Vector3Scale, [Vector3.by_value, :float], Vector3.by_value],
321
+
322
+ # @!method Vector3Multiply(v1, v2)
323
+ # Vector3Multiply
324
+ # @param v1 [Vector3]
325
+ # @param v2 [Vector3]
326
+ # @return [Vector3]
327
+ [:Vector3Multiply, :Vector3Multiply, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
328
+
329
+ # @!method Vector3CrossProduct(v1, v2)
330
+ # Vector3CrossProduct
331
+ # @param v1 [Vector3]
332
+ # @param v2 [Vector3]
333
+ # @return [Vector3]
334
+ [:Vector3CrossProduct, :Vector3CrossProduct, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
335
+
336
+ # @!method Vector3Perpendicular(v)
337
+ # Vector3Perpendicular
338
+ # @param v [Vector3]
339
+ # @return [Vector3]
340
+ [:Vector3Perpendicular, :Vector3Perpendicular, [Vector3.by_value], Vector3.by_value],
341
+
342
+ # @!method Vector3Length(v)
343
+ # Vector3Length
344
+ # @param v [const Vector3]
345
+ # @return [float]
346
+ [:Vector3Length, :Vector3Length, [Vector3.by_value], :float],
347
+
348
+ # @!method Vector3LengthSqr(v)
349
+ # Vector3LengthSqr
350
+ # @param v [const Vector3]
351
+ # @return [float]
352
+ [:Vector3LengthSqr, :Vector3LengthSqr, [Vector3.by_value], :float],
353
+
354
+ # @!method Vector3DotProduct(v1, v2)
355
+ # Vector3DotProduct
356
+ # @param v1 [Vector3]
357
+ # @param v2 [Vector3]
358
+ # @return [float]
359
+ [:Vector3DotProduct, :Vector3DotProduct, [Vector3.by_value, Vector3.by_value], :float],
360
+
361
+ # @!method Vector3Distance(v1, v2)
362
+ # Vector3Distance
363
+ # @param v1 [Vector3]
364
+ # @param v2 [Vector3]
365
+ # @return [float]
366
+ [:Vector3Distance, :Vector3Distance, [Vector3.by_value, Vector3.by_value], :float],
367
+
368
+ # @!method Vector3DistanceSqr(v1, v2)
369
+ # Vector3DistanceSqr
370
+ # @param v1 [Vector3]
371
+ # @param v2 [Vector3]
372
+ # @return [float]
373
+ [:Vector3DistanceSqr, :Vector3DistanceSqr, [Vector3.by_value, Vector3.by_value], :float],
374
+
375
+ # @!method Vector3Angle(v1, v2)
376
+ # Vector3Angle
377
+ # @param v1 [Vector3]
378
+ # @param v2 [Vector3]
379
+ # @return [float]
380
+ [:Vector3Angle, :Vector3Angle, [Vector3.by_value, Vector3.by_value], :float],
381
+
382
+ # @!method Vector3Negate(v)
383
+ # Vector3Negate
384
+ # @param v [Vector3]
385
+ # @return [Vector3]
386
+ [:Vector3Negate, :Vector3Negate, [Vector3.by_value], Vector3.by_value],
387
+
388
+ # @!method Vector3Divide(v1, v2)
389
+ # Vector3Divide
390
+ # @param v1 [Vector3]
391
+ # @param v2 [Vector3]
392
+ # @return [Vector3]
393
+ [:Vector3Divide, :Vector3Divide, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
394
+
395
+ # @!method Vector3Normalize(v)
396
+ # Vector3Normalize
397
+ # @param v [Vector3]
398
+ # @return [Vector3]
399
+ [:Vector3Normalize, :Vector3Normalize, [Vector3.by_value], Vector3.by_value],
400
+
401
+ # @!method Vector3Project(v1, v2)
402
+ # Vector3Project
403
+ # @param v1 [Vector3]
404
+ # @param v2 [Vector3]
405
+ # @return [Vector3]
406
+ [:Vector3Project, :Vector3Project, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
407
+
408
+ # @!method Vector3Reject(v1, v2)
409
+ # Vector3Reject
410
+ # @param v1 [Vector3]
411
+ # @param v2 [Vector3]
412
+ # @return [Vector3]
413
+ [:Vector3Reject, :Vector3Reject, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
414
+
415
+ # @!method Vector3OrthoNormalize(v1, v2)
416
+ # Vector3OrthoNormalize
417
+ # @param v1 [Vector3 *]
418
+ # @param v2 [Vector3 *]
419
+ # @return [void]
420
+ [:Vector3OrthoNormalize, :Vector3OrthoNormalize, [:pointer, :pointer], :void],
421
+
422
+ # @!method Vector3Transform(v, mat)
423
+ # Vector3Transform
424
+ # @param v [Vector3]
425
+ # @param mat [Matrix]
426
+ # @return [Vector3]
427
+ [:Vector3Transform, :Vector3Transform, [Vector3.by_value, Matrix.by_value], Vector3.by_value],
428
+
429
+ # @!method Vector3RotateByQuaternion(v, q)
430
+ # Vector3RotateByQuaternion
431
+ # @param v [Vector3]
432
+ # @param q [Quaternion]
433
+ # @return [Vector3]
434
+ [:Vector3RotateByQuaternion, :Vector3RotateByQuaternion, [Vector3.by_value, Quaternion.by_value], Vector3.by_value],
435
+
436
+ # @!method Vector3RotateByAxisAngle(v, axis, angle)
437
+ # Vector3RotateByAxisAngle
438
+ # @param v [Vector3]
439
+ # @param axis [Vector3]
440
+ # @param angle [float]
441
+ # @return [Vector3]
442
+ [:Vector3RotateByAxisAngle, :Vector3RotateByAxisAngle, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
443
+
444
+ # @!method Vector3Lerp(v1, v2, amount)
445
+ # Vector3Lerp
446
+ # @param v1 [Vector3]
447
+ # @param v2 [Vector3]
448
+ # @param amount [float]
449
+ # @return [Vector3]
450
+ [:Vector3Lerp, :Vector3Lerp, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
451
+
452
+ # @!method Vector3Reflect(v, normal)
453
+ # Vector3Reflect
454
+ # @param v [Vector3]
455
+ # @param normal [Vector3]
456
+ # @return [Vector3]
457
+ [:Vector3Reflect, :Vector3Reflect, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
458
+
459
+ # @!method Vector3Min(v1, v2)
460
+ # Vector3Min
461
+ # @param v1 [Vector3]
462
+ # @param v2 [Vector3]
463
+ # @return [Vector3]
464
+ [:Vector3Min, :Vector3Min, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
465
+
466
+ # @!method Vector3Max(v1, v2)
467
+ # Vector3Max
468
+ # @param v1 [Vector3]
469
+ # @param v2 [Vector3]
470
+ # @return [Vector3]
471
+ [:Vector3Max, :Vector3Max, [Vector3.by_value, Vector3.by_value], Vector3.by_value],
472
+
473
+ # @!method Vector3Barycenter(p, a, b, c)
474
+ # Vector3Barycenter
475
+ # @param p [Vector3]
476
+ # @param a [Vector3]
477
+ # @param b [Vector3]
478
+ # @param c [Vector3]
479
+ # @return [Vector3]
480
+ [:Vector3Barycenter, :Vector3Barycenter, [Vector3.by_value, Vector3.by_value, Vector3.by_value, Vector3.by_value], Vector3.by_value],
481
+
482
+ # @!method Vector3Unproject(source, projection, view)
483
+ # Vector3Unproject
484
+ # @param source [Vector3]
485
+ # @param projection [Matrix]
486
+ # @param view [Matrix]
487
+ # @return [Vector3]
488
+ [:Vector3Unproject, :Vector3Unproject, [Vector3.by_value, Matrix.by_value, Matrix.by_value], Vector3.by_value],
489
+
490
+ # @!method Vector3ToFloatV(v)
491
+ # Vector3ToFloatV
492
+ # @param v [Vector3]
493
+ # @return [float3]
494
+ [:Vector3ToFloatV, :Vector3ToFloatV, [Vector3.by_value], Float3.by_value],
495
+
496
+ # @!method Vector3Invert(v)
497
+ # Vector3Invert
498
+ # @param v [Vector3]
499
+ # @return [Vector3]
500
+ [:Vector3Invert, :Vector3Invert, [Vector3.by_value], Vector3.by_value],
501
+
502
+ # @!method Vector3Clamp(v, min, max)
503
+ # Vector3Clamp
504
+ # @param v [Vector3]
505
+ # @param min [Vector3]
506
+ # @param max [Vector3]
507
+ # @return [Vector3]
508
+ [:Vector3Clamp, :Vector3Clamp, [Vector3.by_value, Vector3.by_value, Vector3.by_value], Vector3.by_value],
509
+
510
+ # @!method Vector3ClampValue(v, min, max)
511
+ # Vector3ClampValue
512
+ # @param v [Vector3]
513
+ # @param min [float]
514
+ # @param max [float]
515
+ # @return [Vector3]
516
+ [:Vector3ClampValue, :Vector3ClampValue, [Vector3.by_value, :float, :float], Vector3.by_value],
517
+
518
+ # @!method Vector3Equals(p, q)
519
+ # Vector3Equals
520
+ # @param p [Vector3]
521
+ # @param q [Vector3]
522
+ # @return [int]
523
+ [:Vector3Equals, :Vector3Equals, [Vector3.by_value, Vector3.by_value], :int],
524
+
525
+ # @!method Vector3Refract(v, n, r)
526
+ # Vector3Refract
527
+ # @param v [Vector3]
528
+ # @param n [Vector3]
529
+ # @param r [float]
530
+ # @return [Vector3]
531
+ [:Vector3Refract, :Vector3Refract, [Vector3.by_value, Vector3.by_value, :float], Vector3.by_value],
532
+
533
+ # @!method MatrixDeterminant(mat)
534
+ # MatrixDeterminant
535
+ # @param mat [Matrix]
536
+ # @return [float]
537
+ [:MatrixDeterminant, :MatrixDeterminant, [Matrix.by_value], :float],
538
+
539
+ # @!method MatrixTrace(mat)
540
+ # MatrixTrace
541
+ # @param mat [Matrix]
542
+ # @return [float]
543
+ [:MatrixTrace, :MatrixTrace, [Matrix.by_value], :float],
544
+
545
+ # @!method MatrixTranspose(mat)
546
+ # MatrixTranspose
547
+ # @param mat [Matrix]
548
+ # @return [Matrix]
549
+ [:MatrixTranspose, :MatrixTranspose, [Matrix.by_value], Matrix.by_value],
550
+
551
+ # @!method MatrixInvert(mat)
552
+ # MatrixInvert
553
+ # @param mat [Matrix]
554
+ # @return [Matrix]
555
+ [:MatrixInvert, :MatrixInvert, [Matrix.by_value], Matrix.by_value],
556
+
557
+ # @!method MatrixIdentity()
558
+ # MatrixIdentity
559
+ # @return [Matrix]
560
+ [:MatrixIdentity, :MatrixIdentity, [], Matrix.by_value],
561
+
562
+ # @!method MatrixAdd(left, right)
563
+ # MatrixAdd
564
+ # @param left [Matrix]
565
+ # @param right [Matrix]
566
+ # @return [Matrix]
567
+ [:MatrixAdd, :MatrixAdd, [Matrix.by_value, Matrix.by_value], Matrix.by_value],
568
+
569
+ # @!method MatrixSubtract(left, right)
570
+ # MatrixSubtract
571
+ # @param left [Matrix]
572
+ # @param right [Matrix]
573
+ # @return [Matrix]
574
+ [:MatrixSubtract, :MatrixSubtract, [Matrix.by_value, Matrix.by_value], Matrix.by_value],
575
+
576
+ # @!method MatrixMultiply(left, right)
577
+ # MatrixMultiply
578
+ # @param left [Matrix]
579
+ # @param right [Matrix]
580
+ # @return [Matrix]
581
+ [:MatrixMultiply, :MatrixMultiply, [Matrix.by_value, Matrix.by_value], Matrix.by_value],
582
+
583
+ # @!method MatrixTranslate(x, y, z)
584
+ # MatrixTranslate
585
+ # @param x [float]
586
+ # @param y [float]
587
+ # @param z [float]
588
+ # @return [Matrix]
589
+ [:MatrixTranslate, :MatrixTranslate, [:float, :float, :float], Matrix.by_value],
590
+
591
+ # @!method MatrixRotate(axis, angle)
592
+ # MatrixRotate
593
+ # @param axis [Vector3]
594
+ # @param angle [float]
595
+ # @return [Matrix]
596
+ [:MatrixRotate, :MatrixRotate, [Vector3.by_value, :float], Matrix.by_value],
597
+
598
+ # @!method MatrixRotateX(angle)
599
+ # MatrixRotateX
600
+ # @param angle [float]
601
+ # @return [Matrix]
602
+ [:MatrixRotateX, :MatrixRotateX, [:float], Matrix.by_value],
603
+
604
+ # @!method MatrixRotateY(angle)
605
+ # MatrixRotateY
606
+ # @param angle [float]
607
+ # @return [Matrix]
608
+ [:MatrixRotateY, :MatrixRotateY, [:float], Matrix.by_value],
609
+
610
+ # @!method MatrixRotateZ(angle)
611
+ # MatrixRotateZ
612
+ # @param angle [float]
613
+ # @return [Matrix]
614
+ [:MatrixRotateZ, :MatrixRotateZ, [:float], Matrix.by_value],
615
+
616
+ # @!method MatrixRotateXYZ(angle)
617
+ # MatrixRotateXYZ
618
+ # @param angle [Vector3]
619
+ # @return [Matrix]
620
+ [:MatrixRotateXYZ, :MatrixRotateXYZ, [Vector3.by_value], Matrix.by_value],
621
+
622
+ # @!method MatrixRotateZYX(angle)
623
+ # MatrixRotateZYX
624
+ # @param angle [Vector3]
625
+ # @return [Matrix]
626
+ [:MatrixRotateZYX, :MatrixRotateZYX, [Vector3.by_value], Matrix.by_value],
627
+
628
+ # @!method MatrixScale(x, y, z)
629
+ # MatrixScale
630
+ # @param x [float]
631
+ # @param y [float]
632
+ # @param z [float]
633
+ # @return [Matrix]
634
+ [:MatrixScale, :MatrixScale, [:float, :float, :float], Matrix.by_value],
635
+
636
+ # @!method MatrixFrustum(left, right, bottom, top, near, far)
637
+ # MatrixFrustum
638
+ # @param left [double]
639
+ # @param right [double]
640
+ # @param bottom [double]
641
+ # @param top [double]
642
+ # @param near [double]
643
+ # @param far [double]
644
+ # @return [Matrix]
645
+ [:MatrixFrustum, :MatrixFrustum, [:double, :double, :double, :double, :double, :double], Matrix.by_value],
646
+
647
+ # @!method MatrixPerspective(fovY, aspect, nearPlane, farPlane)
648
+ # MatrixPerspective
649
+ # @param fovY [double]
650
+ # @param aspect [double]
651
+ # @param nearPlane [double]
652
+ # @param farPlane [double]
653
+ # @return [Matrix]
654
+ [:MatrixPerspective, :MatrixPerspective, [:double, :double, :double, :double], Matrix.by_value],
655
+
656
+ # @!method MatrixOrtho(left, right, bottom, top, nearPlane, farPlane)
657
+ # MatrixOrtho
658
+ # @param left [double]
659
+ # @param right [double]
660
+ # @param bottom [double]
661
+ # @param top [double]
662
+ # @param nearPlane [double]
663
+ # @param farPlane [double]
664
+ # @return [Matrix]
665
+ [:MatrixOrtho, :MatrixOrtho, [:double, :double, :double, :double, :double, :double], Matrix.by_value],
666
+
667
+ # @!method MatrixLookAt(eye, target, up)
668
+ # MatrixLookAt
669
+ # @param eye [Vector3]
670
+ # @param target [Vector3]
671
+ # @param up [Vector3]
672
+ # @return [Matrix]
673
+ [:MatrixLookAt, :MatrixLookAt, [Vector3.by_value, Vector3.by_value, Vector3.by_value], Matrix.by_value],
674
+
675
+ # @!method MatrixToFloatV(mat)
676
+ # MatrixToFloatV
677
+ # @param mat [Matrix]
678
+ # @return [float16]
679
+ [:MatrixToFloatV, :MatrixToFloatV, [Matrix.by_value], Float16.by_value],
680
+
681
+ # @!method QuaternionAdd(q1, q2)
682
+ # QuaternionAdd
683
+ # @param q1 [Quaternion]
684
+ # @param q2 [Quaternion]
685
+ # @return [Quaternion]
686
+ [:QuaternionAdd, :QuaternionAdd, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
687
+
688
+ # @!method QuaternionAddValue(q, add)
689
+ # QuaternionAddValue
690
+ # @param q [Quaternion]
691
+ # @param add [float]
692
+ # @return [Quaternion]
693
+ [:QuaternionAddValue, :QuaternionAddValue, [Quaternion.by_value, :float], Quaternion.by_value],
694
+
695
+ # @!method QuaternionSubtract(q1, q2)
696
+ # QuaternionSubtract
697
+ # @param q1 [Quaternion]
698
+ # @param q2 [Quaternion]
699
+ # @return [Quaternion]
700
+ [:QuaternionSubtract, :QuaternionSubtract, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
701
+
702
+ # @!method QuaternionSubtractValue(q, sub)
703
+ # QuaternionSubtractValue
704
+ # @param q [Quaternion]
705
+ # @param sub [float]
706
+ # @return [Quaternion]
707
+ [:QuaternionSubtractValue, :QuaternionSubtractValue, [Quaternion.by_value, :float], Quaternion.by_value],
708
+
709
+ # @!method QuaternionIdentity()
710
+ # QuaternionIdentity
711
+ # @return [Quaternion]
712
+ [:QuaternionIdentity, :QuaternionIdentity, [], Quaternion.by_value],
713
+
714
+ # @!method QuaternionLength(q)
715
+ # QuaternionLength
716
+ # @param q [Quaternion]
717
+ # @return [float]
718
+ [:QuaternionLength, :QuaternionLength, [Quaternion.by_value], :float],
719
+
720
+ # @!method QuaternionNormalize(q)
721
+ # QuaternionNormalize
722
+ # @param q [Quaternion]
723
+ # @return [Quaternion]
724
+ [:QuaternionNormalize, :QuaternionNormalize, [Quaternion.by_value], Quaternion.by_value],
725
+
726
+ # @!method QuaternionInvert(q)
727
+ # QuaternionInvert
728
+ # @param q [Quaternion]
729
+ # @return [Quaternion]
730
+ [:QuaternionInvert, :QuaternionInvert, [Quaternion.by_value], Quaternion.by_value],
731
+
732
+ # @!method QuaternionMultiply(q1, q2)
733
+ # QuaternionMultiply
734
+ # @param q1 [Quaternion]
735
+ # @param q2 [Quaternion]
736
+ # @return [Quaternion]
737
+ [:QuaternionMultiply, :QuaternionMultiply, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
738
+
739
+ # @!method QuaternionScale(q, mul)
740
+ # QuaternionScale
741
+ # @param q [Quaternion]
742
+ # @param mul [float]
743
+ # @return [Quaternion]
744
+ [:QuaternionScale, :QuaternionScale, [Quaternion.by_value, :float], Quaternion.by_value],
745
+
746
+ # @!method QuaternionDivide(q1, q2)
747
+ # QuaternionDivide
748
+ # @param q1 [Quaternion]
749
+ # @param q2 [Quaternion]
750
+ # @return [Quaternion]
751
+ [:QuaternionDivide, :QuaternionDivide, [Quaternion.by_value, Quaternion.by_value], Quaternion.by_value],
752
+
753
+ # @!method QuaternionLerp(q1, q2, amount)
754
+ # QuaternionLerp
755
+ # @param q1 [Quaternion]
756
+ # @param q2 [Quaternion]
757
+ # @param amount [float]
758
+ # @return [Quaternion]
759
+ [:QuaternionLerp, :QuaternionLerp, [Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
760
+
761
+ # @!method QuaternionNlerp(q1, q2, amount)
762
+ # QuaternionNlerp
763
+ # @param q1 [Quaternion]
764
+ # @param q2 [Quaternion]
765
+ # @param amount [float]
766
+ # @return [Quaternion]
767
+ [:QuaternionNlerp, :QuaternionNlerp, [Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
768
+
769
+ # @!method QuaternionSlerp(q1, q2, amount)
770
+ # QuaternionSlerp
771
+ # @param q1 [Quaternion]
772
+ # @param q2 [Quaternion]
773
+ # @param amount [float]
774
+ # @return [Quaternion]
775
+ [:QuaternionSlerp, :QuaternionSlerp, [Quaternion.by_value, Quaternion.by_value, :float], Quaternion.by_value],
776
+
777
+ # @!method QuaternionFromVector3ToVector3(from, to)
778
+ # QuaternionFromVector3ToVector3
779
+ # @param from [Vector3]
780
+ # @param to [Vector3]
781
+ # @return [Quaternion]
782
+ [:QuaternionFromVector3ToVector3, :QuaternionFromVector3ToVector3, [Vector3.by_value, Vector3.by_value], Quaternion.by_value],
783
+
784
+ # @!method QuaternionFromMatrix(mat)
785
+ # QuaternionFromMatrix
786
+ # @param mat [Matrix]
787
+ # @return [Quaternion]
788
+ [:QuaternionFromMatrix, :QuaternionFromMatrix, [Matrix.by_value], Quaternion.by_value],
789
+
790
+ # @!method QuaternionToMatrix(q)
791
+ # QuaternionToMatrix
792
+ # @param q [Quaternion]
793
+ # @return [Matrix]
794
+ [:QuaternionToMatrix, :QuaternionToMatrix, [Quaternion.by_value], Matrix.by_value],
795
+
796
+ # @!method QuaternionFromAxisAngle(axis, angle)
797
+ # QuaternionFromAxisAngle
798
+ # @param axis [Vector3]
799
+ # @param angle [float]
800
+ # @return [Quaternion]
801
+ [:QuaternionFromAxisAngle, :QuaternionFromAxisAngle, [Vector3.by_value, :float], Quaternion.by_value],
802
+
803
+ # @!method QuaternionToAxisAngle(q, outAxis, outAngle)
804
+ # QuaternionToAxisAngle
805
+ # @param q [Quaternion]
806
+ # @param outAxis [Vector3 *]
807
+ # @param outAngle [float *]
808
+ # @return [void]
809
+ [:QuaternionToAxisAngle, :QuaternionToAxisAngle, [Quaternion.by_value, :pointer, :pointer], :void],
810
+
811
+ # @!method QuaternionFromEuler(pitch, yaw, roll)
812
+ # QuaternionFromEuler
813
+ # @param pitch [float]
814
+ # @param yaw [float]
815
+ # @param roll [float]
816
+ # @return [Quaternion]
817
+ [:QuaternionFromEuler, :QuaternionFromEuler, [:float, :float, :float], Quaternion.by_value],
818
+
819
+ # @!method QuaternionToEuler(q)
820
+ # QuaternionToEuler
821
+ # @param q [Quaternion]
822
+ # @return [Vector3]
823
+ [:QuaternionToEuler, :QuaternionToEuler, [Quaternion.by_value], Vector3.by_value],
824
+
825
+ # @!method QuaternionTransform(q, mat)
826
+ # QuaternionTransform
827
+ # @param q [Quaternion]
828
+ # @param mat [Matrix]
829
+ # @return [Quaternion]
830
+ [:QuaternionTransform, :QuaternionTransform, [Quaternion.by_value, Matrix.by_value], Quaternion.by_value],
831
+
832
+ # @!method QuaternionEquals(p, q)
833
+ # QuaternionEquals
834
+ # @param p [Quaternion]
835
+ # @param q [Quaternion]
836
+ # @return [int]
837
+ [:QuaternionEquals, :QuaternionEquals, [Quaternion.by_value, Quaternion.by_value], :int],
838
+ ]
839
+ entries.each do |entry|
840
+ attach_function entry[0], entry[1], entry[2], entry[3]
841
+ rescue FFI::NotFoundError => e
842
+ warn "[Warning] Failed to import #{entry[0]} (#{e})."
843
+ end
844
+ end
845
+ end