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