raylib-spinel 0.1.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.
- checksums.yaml +7 -0
- data/LICENSE.md +16 -0
- data/README.md +135 -0
- data/lib/physac.h +1987 -0
- data/lib/physac_compat.rb +43 -0
- data/lib/physac_ffi.rb +128 -0
- data/lib/raygui.h +6479 -0
- data/lib/raygui_compat.rb +116 -0
- data/lib/raygui_ffi.rb +714 -0
- data/lib/raylib_audio_fields.rb +115 -0
- data/lib/raylib_camera_fields.rb +16 -0
- data/lib/raylib_compat.rb +72 -0
- data/lib/raylib_ffi.rb +4093 -0
- data/lib/raylib_field_index.rb +593 -0
- data/lib/raylib_handles.rb +427 -0
- data/lib/raylib_handles_ffi.rb +255 -0
- data/lib/raylib_include.rb +2414 -0
- data/lib/raylib_model_ref.rb +99 -0
- data/lib/raylib_pointer_fields.rb +153 -0
- data/lib/raylib_ruby.rb +614 -0
- data/lib/raylib_sizes.rb +128 -0
- data/lib/raylib_struct_fields.rb +102 -0
- data/lib/raylib_structs.rb +174 -0
- data/lib/raymath_ffi.rb +1014 -0
- data/lib/rcamera_ffi.rb +113 -0
- data/lib/rl_handle_views.h +83 -0
- data/lib/rlgl_constants.rb +382 -0
- data/lib/rlgl_ffi.rb +1016 -0
- data/raylib-spinel/physac.rb +13 -0
- data/raylib-spinel/raygui.rb +14 -0
- data/raylib-spinel/raymath.rb +15 -0
- data/raylib-spinel/rcamera.rb +15 -0
- data/raylib-spinel/rlgl.rb +13 -0
- data/raylib-spinel.rb +56 -0
- data/raylib.rb +37 -0
- data/spin.toml +21 -0
- metadata +97 -0
data/lib/raymath_ffi.rb
ADDED
|
@@ -0,0 +1,1014 @@
|
|
|
1
|
+
# raymath_ffi.rb — demo-scoped raymath bindings for Spinel AOT.
|
|
2
|
+
#
|
|
3
|
+
# Loaded only by `require "raylib-spinel/raymath"` under Spinel (see
|
|
4
|
+
# raylib-spinel/raymath.rb). Under MRI that require is a no-op because the
|
|
5
|
+
# raylib-bindings gem already defines every raymath function on Raylib
|
|
6
|
+
# (Vector2Add, Vector2Scale, ...), so game code is identical on both backends.
|
|
7
|
+
#
|
|
8
|
+
# raymath's Vector2 functions pass/return the struct by value; Spinel's FFI
|
|
9
|
+
# cannot, so each one is a `rl_*` pointer shim declared here and implemented
|
|
10
|
+
# in raylib_adapter.c (linked into every scene). The Ruby wrapper allocates the
|
|
11
|
+
# out-param (a native Vector2) and returns it. Only the functions the demo
|
|
12
|
+
# exercises are bound; extend this file (and raylib_adapter.c) as needed.
|
|
13
|
+
|
|
14
|
+
module Raylib
|
|
15
|
+
ffi_lib "raylib"
|
|
16
|
+
# No flags of our own: this TU includes no raylib-family header, and the
|
|
17
|
+
# carried C gets its include paths from [native] pkg_config in spin.toml.
|
|
18
|
+
# The (empty) line stays because the generators anchor their splice on a
|
|
19
|
+
# `ffi_cflags "..."` line being present (tools/generate_raymath.py).
|
|
20
|
+
ffi_cflags ""
|
|
21
|
+
|
|
22
|
+
# ====== generated: complete raymath API surface ======
|
|
23
|
+
ffi_func :rl_Vector2Zero, [:ptr], :void
|
|
24
|
+
ffi_func :rl_Vector2One, [:ptr], :void
|
|
25
|
+
ffi_func :rl_Vector2AddValue, [:ptr, :float, :ptr], :void
|
|
26
|
+
ffi_func :rl_Vector2Subtract, [:ptr, :ptr, :ptr], :void
|
|
27
|
+
ffi_func :rl_Vector2SubtractValue, [:ptr, :float, :ptr], :void
|
|
28
|
+
ffi_func :rl_Vector2LengthSqr, [:ptr], :float
|
|
29
|
+
ffi_func :rl_Vector2DotProduct, [:ptr, :ptr], :float
|
|
30
|
+
ffi_func :rl_Vector2CrossProduct, [:ptr, :ptr], :float
|
|
31
|
+
ffi_func :rl_Vector2Distance, [:ptr, :ptr], :float
|
|
32
|
+
ffi_func :rl_Vector2DistanceSqr, [:ptr, :ptr], :float
|
|
33
|
+
ffi_func :rl_Vector2LineAngle, [:ptr, :ptr], :float
|
|
34
|
+
ffi_func :rl_Vector2Multiply, [:ptr, :ptr, :ptr], :void
|
|
35
|
+
ffi_func :rl_Vector2Negate, [:ptr, :ptr], :void
|
|
36
|
+
ffi_func :rl_Vector2Divide, [:ptr, :ptr, :ptr], :void
|
|
37
|
+
ffi_func :rl_Vector2Transform, [:ptr, :ptr, :ptr], :void
|
|
38
|
+
ffi_func :rl_Vector2Reflect, [:ptr, :ptr, :ptr], :void
|
|
39
|
+
ffi_func :rl_Vector2Min, [:ptr, :ptr, :ptr], :void
|
|
40
|
+
ffi_func :rl_Vector2Max, [:ptr, :ptr, :ptr], :void
|
|
41
|
+
ffi_func :rl_Vector2MoveTowards, [:ptr, :ptr, :float, :ptr], :void
|
|
42
|
+
ffi_func :rl_Vector2Invert, [:ptr, :ptr], :void
|
|
43
|
+
ffi_func :rl_Vector2Clamp, [:ptr, :ptr, :ptr, :ptr], :void
|
|
44
|
+
ffi_func :rl_Vector2ClampValue, [:ptr, :float, :float, :ptr], :void
|
|
45
|
+
ffi_func :rl_Vector2Equals, [:ptr, :ptr], :int
|
|
46
|
+
ffi_func :rl_Vector2Refract, [:ptr, :ptr, :float, :ptr], :void
|
|
47
|
+
ffi_func :rl_Vector3One, [:ptr], :void
|
|
48
|
+
ffi_func :rl_Vector3SubtractValue, [:ptr, :float, :ptr], :void
|
|
49
|
+
ffi_func :rl_Vector3Multiply, [:ptr, :ptr, :ptr], :void
|
|
50
|
+
ffi_func :rl_Vector3CrossProduct, [:ptr, :ptr, :ptr], :void
|
|
51
|
+
ffi_func :rl_Vector3Perpendicular, [:ptr, :ptr], :void
|
|
52
|
+
ffi_func :rl_Vector3Length, [:ptr], :float
|
|
53
|
+
ffi_func :rl_Vector3Distance, [:ptr, :ptr], :float
|
|
54
|
+
ffi_func :rl_Vector3DistanceSqr, [:ptr, :ptr], :float
|
|
55
|
+
ffi_func :rl_Vector3Angle, [:ptr, :ptr], :float
|
|
56
|
+
ffi_func :rl_Vector3Negate, [:ptr, :ptr], :void
|
|
57
|
+
ffi_func :rl_Vector3Divide, [:ptr, :ptr, :ptr], :void
|
|
58
|
+
ffi_func :rl_Vector3Normalize, [:ptr, :ptr], :void
|
|
59
|
+
ffi_func :rl_Vector3Project, [:ptr, :ptr, :ptr], :void
|
|
60
|
+
ffi_func :rl_Vector3Reject, [:ptr, :ptr, :ptr], :void
|
|
61
|
+
ffi_func :rl_Vector3OrthoNormalize, [:ptr, :ptr], :void
|
|
62
|
+
ffi_func :rl_Vector3Transform, [:ptr, :ptr, :ptr], :void
|
|
63
|
+
ffi_func :rl_Vector3RotateByQuaternion, [:ptr, :ptr, :ptr], :void
|
|
64
|
+
ffi_func :rl_Vector3RotateByAxisAngle, [:ptr, :ptr, :float, :ptr], :void
|
|
65
|
+
ffi_func :rl_Vector3MoveTowards, [:ptr, :ptr, :float, :ptr], :void
|
|
66
|
+
ffi_func :rl_Vector3Lerp, [:ptr, :ptr, :float, :ptr], :void
|
|
67
|
+
ffi_func :rl_Vector3CubicHermite, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
|
|
68
|
+
ffi_func :rl_Vector3Reflect, [:ptr, :ptr, :ptr], :void
|
|
69
|
+
ffi_func :rl_Vector3Min, [:ptr, :ptr, :ptr], :void
|
|
70
|
+
ffi_func :rl_Vector3Max, [:ptr, :ptr, :ptr], :void
|
|
71
|
+
ffi_func :rl_Vector3Barycenter, [:ptr, :ptr, :ptr, :ptr, :ptr], :void
|
|
72
|
+
ffi_func :rl_Vector3Unproject, [:ptr, :ptr, :ptr, :ptr], :void
|
|
73
|
+
ffi_func :rl_Vector3ToFloatV, [:ptr, :float], :ptr
|
|
74
|
+
ffi_func :rl_Vector3Invert, [:ptr, :ptr], :void
|
|
75
|
+
ffi_func :rl_Vector3Clamp, [:ptr, :ptr, :ptr, :ptr], :void
|
|
76
|
+
ffi_func :rl_Vector3Equals, [:ptr, :ptr], :int
|
|
77
|
+
ffi_func :rl_Vector3Refract, [:ptr, :ptr, :float, :ptr], :void
|
|
78
|
+
ffi_func :rl_Vector4Zero, [:ptr], :void
|
|
79
|
+
ffi_func :rl_Vector4One, [:ptr], :void
|
|
80
|
+
ffi_func :rl_Vector4Add, [:ptr, :ptr, :ptr], :void
|
|
81
|
+
ffi_func :rl_Vector4AddValue, [:ptr, :float, :ptr], :void
|
|
82
|
+
ffi_func :rl_Vector4Subtract, [:ptr, :ptr, :ptr], :void
|
|
83
|
+
ffi_func :rl_Vector4SubtractValue, [:ptr, :float, :ptr], :void
|
|
84
|
+
ffi_func :rl_Vector4Length, [:ptr], :float
|
|
85
|
+
ffi_func :rl_Vector4LengthSqr, [:ptr], :float
|
|
86
|
+
ffi_func :rl_Vector4DotProduct, [:ptr, :ptr], :float
|
|
87
|
+
ffi_func :rl_Vector4Distance, [:ptr, :ptr], :float
|
|
88
|
+
ffi_func :rl_Vector4DistanceSqr, [:ptr, :ptr], :float
|
|
89
|
+
ffi_func :rl_Vector4Scale, [:ptr, :float, :ptr], :void
|
|
90
|
+
ffi_func :rl_Vector4Multiply, [:ptr, :ptr, :ptr], :void
|
|
91
|
+
ffi_func :rl_Vector4Negate, [:ptr, :ptr], :void
|
|
92
|
+
ffi_func :rl_Vector4Divide, [:ptr, :ptr, :ptr], :void
|
|
93
|
+
ffi_func :rl_Vector4Normalize, [:ptr, :ptr], :void
|
|
94
|
+
ffi_func :rl_Vector4Min, [:ptr, :ptr, :ptr], :void
|
|
95
|
+
ffi_func :rl_Vector4Max, [:ptr, :ptr, :ptr], :void
|
|
96
|
+
ffi_func :rl_Vector4Lerp, [:ptr, :ptr, :float, :ptr], :void
|
|
97
|
+
ffi_func :rl_Vector4MoveTowards, [:ptr, :ptr, :float, :ptr], :void
|
|
98
|
+
ffi_func :rl_Vector4Invert, [:ptr, :ptr], :void
|
|
99
|
+
ffi_func :rl_Vector4Equals, [:ptr, :ptr], :int
|
|
100
|
+
ffi_func :rl_MatrixDeterminant, [:ptr], :float
|
|
101
|
+
ffi_func :rl_MatrixTrace, [:ptr], :float
|
|
102
|
+
ffi_func :rl_MatrixTranspose, [:ptr, :ptr], :void
|
|
103
|
+
ffi_func :rl_MatrixInvert, [:ptr, :ptr], :void
|
|
104
|
+
ffi_func :rl_MatrixAdd, [:ptr, :ptr, :ptr], :void
|
|
105
|
+
ffi_func :rl_MatrixSubtract, [:ptr, :ptr, :ptr], :void
|
|
106
|
+
ffi_func :rl_MatrixMultiply, [:ptr, :ptr, :ptr], :void
|
|
107
|
+
ffi_func :rl_MatrixMultiplyValue, [:ptr, :float, :ptr], :void
|
|
108
|
+
ffi_func :rl_MatrixTranslate, [:float, :float, :float, :ptr], :void
|
|
109
|
+
ffi_func :rl_MatrixRotate, [:ptr, :float, :ptr], :void
|
|
110
|
+
ffi_func :rl_MatrixRotateX, [:float, :ptr], :void
|
|
111
|
+
ffi_func :rl_MatrixRotateY, [:float, :ptr], :void
|
|
112
|
+
ffi_func :rl_MatrixRotateZ, [:float, :ptr], :void
|
|
113
|
+
ffi_func :rl_MatrixRotateXYZ, [:ptr, :ptr], :void
|
|
114
|
+
ffi_func :rl_MatrixRotateZYX, [:ptr, :ptr], :void
|
|
115
|
+
ffi_func :rl_MatrixScale, [:float, :float, :float, :ptr], :void
|
|
116
|
+
ffi_func :rl_MatrixFrustum, [:double, :double, :double, :double, :double, :double, :ptr], :void
|
|
117
|
+
ffi_func :rl_MatrixPerspective, [:double, :double, :double, :double, :ptr], :void
|
|
118
|
+
ffi_func :rl_MatrixOrtho, [:double, :double, :double, :double, :double, :double, :ptr], :void
|
|
119
|
+
ffi_func :rl_MatrixLookAt, [:ptr, :ptr, :ptr, :ptr], :void
|
|
120
|
+
ffi_func :rl_QuaternionAdd, [:ptr, :ptr, :ptr], :void
|
|
121
|
+
ffi_func :rl_QuaternionAddValue, [:ptr, :float, :ptr], :void
|
|
122
|
+
ffi_func :rl_QuaternionSubtract, [:ptr, :ptr, :ptr], :void
|
|
123
|
+
ffi_func :rl_QuaternionSubtractValue, [:ptr, :float, :ptr], :void
|
|
124
|
+
ffi_func :rl_QuaternionIdentity, [:ptr], :void
|
|
125
|
+
ffi_func :rl_QuaternionLength, [:ptr], :float
|
|
126
|
+
ffi_func :rl_QuaternionNormalize, [:ptr, :ptr], :void
|
|
127
|
+
ffi_func :rl_QuaternionInvert, [:ptr, :ptr], :void
|
|
128
|
+
ffi_func :rl_QuaternionMultiply, [:ptr, :ptr, :ptr], :void
|
|
129
|
+
ffi_func :rl_QuaternionScale, [:ptr, :float, :ptr], :void
|
|
130
|
+
ffi_func :rl_QuaternionDivide, [:ptr, :ptr, :ptr], :void
|
|
131
|
+
ffi_func :rl_QuaternionLerp, [:ptr, :ptr, :float, :ptr], :void
|
|
132
|
+
ffi_func :rl_QuaternionNlerp, [:ptr, :ptr, :float, :ptr], :void
|
|
133
|
+
ffi_func :rl_QuaternionSlerp, [:ptr, :ptr, :float, :ptr], :void
|
|
134
|
+
ffi_func :rl_QuaternionCubicHermiteSpline, [:ptr, :ptr, :ptr, :ptr, :float, :ptr], :void
|
|
135
|
+
ffi_func :rl_QuaternionFromMatrix, [:ptr, :ptr], :void
|
|
136
|
+
ffi_func :rl_QuaternionFromAxisAngle, [:ptr, :float, :ptr], :void
|
|
137
|
+
ffi_func :rl_QuaternionToAxisAngle, [:ptr, :ptr, :ptr], :void
|
|
138
|
+
ffi_func :rl_QuaternionFromEuler, [:float, :float, :float, :ptr], :void
|
|
139
|
+
ffi_func :rl_QuaternionToEuler, [:ptr, :ptr], :void
|
|
140
|
+
ffi_func :rl_QuaternionTransform, [:ptr, :ptr, :ptr], :void
|
|
141
|
+
ffi_func :rl_QuaternionEquals, [:ptr, :ptr], :int
|
|
142
|
+
ffi_func :rl_MatrixCompose, [:ptr, :ptr, :ptr, :ptr], :void
|
|
143
|
+
ffi_func :rl_MatrixDecompose, [:ptr, :ptr, :ptr, :ptr], :void
|
|
144
|
+
native_struct "Quaternion", "rl_Quaternion"
|
|
145
|
+
native_new [], "rl_Quaternion_new"
|
|
146
|
+
native_method :x, [], :float, "rl_Quaternion_x"
|
|
147
|
+
native_method :x=, [:float], :float, "rl_Quaternion_set_x"
|
|
148
|
+
native_method :y, [], :float, "rl_Quaternion_y"
|
|
149
|
+
native_method :y=, [:float], :float, "rl_Quaternion_set_y"
|
|
150
|
+
native_method :z, [], :float, "rl_Quaternion_z"
|
|
151
|
+
native_method :z=, [:float], :float, "rl_Quaternion_set_z"
|
|
152
|
+
native_method :w, [], :float, "rl_Quaternion_w"
|
|
153
|
+
native_method :w=, [:float], :float, "rl_Quaternion_set_w"
|
|
154
|
+
|
|
155
|
+
# ====== generated: complete raymath API surface ======
|
|
156
|
+
ffi_func :Clamp, [:float, :float, :float], :float
|
|
157
|
+
ffi_func :Lerp, [:float, :float, :float], :float
|
|
158
|
+
ffi_func :Normalize, [:float, :float, :float], :float
|
|
159
|
+
ffi_func :Remap, [:float, :float, :float, :float, :float], :float
|
|
160
|
+
ffi_func :Wrap, [:float, :float, :float], :float
|
|
161
|
+
ffi_func :FloatEquals, [:float, :float], :int
|
|
162
|
+
|
|
163
|
+
ffi_func :rl_Vector2Add, %i[ptr ptr ptr], :void
|
|
164
|
+
ffi_func :rl_Vector2Scale, %i[ptr float ptr], :void
|
|
165
|
+
ffi_func :rl_Vector2Rotate, %i[ptr float ptr], :void
|
|
166
|
+
ffi_func :rl_Vector2Normalize, %i[ptr ptr], :void
|
|
167
|
+
ffi_func :rl_Vector2Length, [:ptr], :float
|
|
168
|
+
ffi_func :rl_Vector2Lerp, %i[ptr ptr float ptr], :void
|
|
169
|
+
ffi_func :rl_Vector2Angle, %i[ptr ptr], :float
|
|
170
|
+
ffi_func :rl_Vector3Zero, %i[ptr], :void
|
|
171
|
+
ffi_func :rl_Vector3Add, %i[ptr ptr ptr], :void
|
|
172
|
+
ffi_func :rl_Vector3AddValue, %i[ptr float ptr], :void
|
|
173
|
+
ffi_func :rl_Vector3Subtract, %i[ptr ptr ptr], :void
|
|
174
|
+
ffi_func :rl_Vector3Scale, %i[ptr float ptr], :void
|
|
175
|
+
ffi_func :rl_Vector3LengthSqr, %i[ptr], :float
|
|
176
|
+
ffi_func :rl_Vector3DotProduct, %i[ptr ptr], :float
|
|
177
|
+
ffi_func :rl_Vector3ClampValue, %i[ptr float float ptr], :void
|
|
178
|
+
ffi_func :rl_MatrixIdentity, %i[ptr], :void
|
|
179
|
+
ffi_func :rl_MatrixToFloatV, [:ptr], :ptr
|
|
180
|
+
ffi_func :rl_QuaternionFromVector3ToVector3, %i[ptr ptr ptr], :void
|
|
181
|
+
ffi_func :rl_QuaternionToMatrix, %i[ptr ptr], :void
|
|
182
|
+
ffi_func :rl_QuaternionToMatrix3, %i[ptr ptr], :void
|
|
183
|
+
ffi_func :rl_rlMultMatrixfFloats, %i[ptr int], :void
|
|
184
|
+
ffi_func :rl_rlMultMatrixfForDir, %i[ptr], :void
|
|
185
|
+
|
|
186
|
+
def self.Vector3Zero
|
|
187
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
188
|
+
Raylib.rl_Vector3Zero(_out)
|
|
189
|
+
_out
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
def self.Vector3Add(v1, v2)
|
|
193
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
194
|
+
Raylib.rl_Vector3Add(v1, v2, _out)
|
|
195
|
+
_out
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
def self.Vector3AddValue(v, add)
|
|
199
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
200
|
+
Raylib.rl_Vector3AddValue(v, add, _out)
|
|
201
|
+
_out
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
def self.Vector3Subtract(v1, v2)
|
|
205
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
206
|
+
Raylib.rl_Vector3Subtract(v1, v2, _out)
|
|
207
|
+
_out
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
def self.Vector3Scale(v, scalar)
|
|
211
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
212
|
+
Raylib.rl_Vector3Scale(v, scalar, _out)
|
|
213
|
+
_out
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
def self.Vector3LengthSqr(v)
|
|
217
|
+
Raylib.rl_Vector3LengthSqr(v)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
def self.Vector3DotProduct(v1, v2)
|
|
221
|
+
Raylib.rl_Vector3DotProduct(v1, v2)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
def self.Vector3ClampValue(v, min, max)
|
|
225
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
226
|
+
Raylib.rl_Vector3ClampValue(v, min, max, _out)
|
|
227
|
+
_out
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
def self.MatrixIdentity
|
|
231
|
+
_out = Matrix.new
|
|
232
|
+
Raylib.rl_MatrixIdentity(_out)
|
|
233
|
+
_out
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Fills *out[0..15] with the 16 floats of the rotation matrix that maps the
|
|
237
|
+
# +z axis onto dir (used by the boids scene for rlMultMatrixf).
|
|
238
|
+
def self.rlMultMatrixfForDir(dir)
|
|
239
|
+
Raylib.rl_rlMultMatrixfForDir(dir)
|
|
240
|
+
end
|
|
241
|
+
def self.Vector2Add(v1, v2)
|
|
242
|
+
_out = Vector2.new
|
|
243
|
+
Raylib.rl_Vector2Add(v1, v2, _out)
|
|
244
|
+
_out
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
def self.Vector2Scale(v, scale)
|
|
248
|
+
_out = Vector2.new
|
|
249
|
+
Raylib.rl_Vector2Scale(v, scale, _out)
|
|
250
|
+
_out
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
def self.Vector2Rotate(v, angle)
|
|
254
|
+
_out = Vector2.new
|
|
255
|
+
Raylib.rl_Vector2Rotate(v, angle, _out)
|
|
256
|
+
_out
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
def self.Vector2Normalize(v)
|
|
260
|
+
_out = Vector2.new
|
|
261
|
+
Raylib.rl_Vector2Normalize(v, _out)
|
|
262
|
+
_out
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
def self.Vector2Length(v)
|
|
266
|
+
Raylib.rl_Vector2Length(v)
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
def self.Vector2Lerp(v1, v2, amount)
|
|
270
|
+
_out = Vector2.new
|
|
271
|
+
Raylib.rl_Vector2Lerp(v1, v2, amount, _out)
|
|
272
|
+
_out
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
def self.Vector2Angle(v1, v2)
|
|
276
|
+
Raylib.rl_Vector2Angle(v1, v2)
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# ====== generated: wrappers + constants ======
|
|
280
|
+
PI = 3.141592653589793
|
|
281
|
+
EPSILON = 1e-06
|
|
282
|
+
|
|
283
|
+
# ====== generated: wrappers + constants ======
|
|
284
|
+
def self.Vector2Zero()
|
|
285
|
+
_out = Vector2.new
|
|
286
|
+
Raylib.rl_Vector2Zero(_out)
|
|
287
|
+
_out
|
|
288
|
+
end
|
|
289
|
+
def self.Vector2One()
|
|
290
|
+
_out = Vector2.new
|
|
291
|
+
Raylib.rl_Vector2One(_out)
|
|
292
|
+
_out
|
|
293
|
+
end
|
|
294
|
+
def self.Vector2AddValue(v, add)
|
|
295
|
+
_out = Vector2.new
|
|
296
|
+
Raylib.rl_Vector2AddValue(v, add, _out)
|
|
297
|
+
_out
|
|
298
|
+
end
|
|
299
|
+
def self.Vector2Subtract(v1, v2)
|
|
300
|
+
_out = Vector2.new
|
|
301
|
+
Raylib.rl_Vector2Subtract(v1, v2, _out)
|
|
302
|
+
_out
|
|
303
|
+
end
|
|
304
|
+
def self.Vector2SubtractValue(v, sub)
|
|
305
|
+
_out = Vector2.new
|
|
306
|
+
Raylib.rl_Vector2SubtractValue(v, sub, _out)
|
|
307
|
+
_out
|
|
308
|
+
end
|
|
309
|
+
def self.Vector2LengthSqr(v)
|
|
310
|
+
Raylib.rl_Vector2LengthSqr(v)
|
|
311
|
+
end
|
|
312
|
+
def self.Vector2DotProduct(v1, v2)
|
|
313
|
+
Raylib.rl_Vector2DotProduct(v1, v2)
|
|
314
|
+
end
|
|
315
|
+
def self.Vector2CrossProduct(v1, v2)
|
|
316
|
+
Raylib.rl_Vector2CrossProduct(v1, v2)
|
|
317
|
+
end
|
|
318
|
+
def self.Vector2Distance(v1, v2)
|
|
319
|
+
Raylib.rl_Vector2Distance(v1, v2)
|
|
320
|
+
end
|
|
321
|
+
def self.Vector2DistanceSqr(v1, v2)
|
|
322
|
+
Raylib.rl_Vector2DistanceSqr(v1, v2)
|
|
323
|
+
end
|
|
324
|
+
def self.Vector2LineAngle(start, kw_end)
|
|
325
|
+
Raylib.rl_Vector2LineAngle(start, kw_end)
|
|
326
|
+
end
|
|
327
|
+
def self.Vector2Multiply(v1, v2)
|
|
328
|
+
_out = Vector2.new
|
|
329
|
+
Raylib.rl_Vector2Multiply(v1, v2, _out)
|
|
330
|
+
_out
|
|
331
|
+
end
|
|
332
|
+
def self.Vector2Negate(v)
|
|
333
|
+
_out = Vector2.new
|
|
334
|
+
Raylib.rl_Vector2Negate(v, _out)
|
|
335
|
+
_out
|
|
336
|
+
end
|
|
337
|
+
def self.Vector2Divide(v1, v2)
|
|
338
|
+
_out = Vector2.new
|
|
339
|
+
Raylib.rl_Vector2Divide(v1, v2, _out)
|
|
340
|
+
_out
|
|
341
|
+
end
|
|
342
|
+
def self.Vector2Transform(v, mat)
|
|
343
|
+
_out = Vector2.new
|
|
344
|
+
Raylib.rl_Vector2Transform(v, mat, _out)
|
|
345
|
+
_out
|
|
346
|
+
end
|
|
347
|
+
def self.Vector2Reflect(v, normal)
|
|
348
|
+
_out = Vector2.new
|
|
349
|
+
Raylib.rl_Vector2Reflect(v, normal, _out)
|
|
350
|
+
_out
|
|
351
|
+
end
|
|
352
|
+
def self.Vector2Min(v1, v2)
|
|
353
|
+
_out = Vector2.new
|
|
354
|
+
Raylib.rl_Vector2Min(v1, v2, _out)
|
|
355
|
+
_out
|
|
356
|
+
end
|
|
357
|
+
def self.Vector2Max(v1, v2)
|
|
358
|
+
_out = Vector2.new
|
|
359
|
+
Raylib.rl_Vector2Max(v1, v2, _out)
|
|
360
|
+
_out
|
|
361
|
+
end
|
|
362
|
+
def self.Vector2MoveTowards(v, target, maxDistance)
|
|
363
|
+
_out = Vector2.new
|
|
364
|
+
Raylib.rl_Vector2MoveTowards(v, target, maxDistance, _out)
|
|
365
|
+
_out
|
|
366
|
+
end
|
|
367
|
+
def self.Vector2Invert(v)
|
|
368
|
+
_out = Vector2.new
|
|
369
|
+
Raylib.rl_Vector2Invert(v, _out)
|
|
370
|
+
_out
|
|
371
|
+
end
|
|
372
|
+
def self.Vector2Clamp(v, min, max)
|
|
373
|
+
_out = Vector2.new
|
|
374
|
+
Raylib.rl_Vector2Clamp(v, min, max, _out)
|
|
375
|
+
_out
|
|
376
|
+
end
|
|
377
|
+
def self.Vector2ClampValue(v, min, max)
|
|
378
|
+
_out = Vector2.new
|
|
379
|
+
Raylib.rl_Vector2ClampValue(v, min, max, _out)
|
|
380
|
+
_out
|
|
381
|
+
end
|
|
382
|
+
def self.Vector2Equals(p, q)
|
|
383
|
+
Raylib.rl_Vector2Equals(p, q)
|
|
384
|
+
end
|
|
385
|
+
def self.Vector2Refract(v, n, r)
|
|
386
|
+
_out = Vector2.new
|
|
387
|
+
Raylib.rl_Vector2Refract(v, n, r, _out)
|
|
388
|
+
_out
|
|
389
|
+
end
|
|
390
|
+
def self.Vector3One()
|
|
391
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
392
|
+
Raylib.rl_Vector3One(_out)
|
|
393
|
+
_out
|
|
394
|
+
end
|
|
395
|
+
def self.Vector3SubtractValue(v, sub)
|
|
396
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
397
|
+
Raylib.rl_Vector3SubtractValue(v, sub, _out)
|
|
398
|
+
_out
|
|
399
|
+
end
|
|
400
|
+
def self.Vector3Multiply(v1, v2)
|
|
401
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
402
|
+
Raylib.rl_Vector3Multiply(v1, v2, _out)
|
|
403
|
+
_out
|
|
404
|
+
end
|
|
405
|
+
def self.Vector3CrossProduct(v1, v2)
|
|
406
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
407
|
+
Raylib.rl_Vector3CrossProduct(v1, v2, _out)
|
|
408
|
+
_out
|
|
409
|
+
end
|
|
410
|
+
def self.Vector3Perpendicular(v)
|
|
411
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
412
|
+
Raylib.rl_Vector3Perpendicular(v, _out)
|
|
413
|
+
_out
|
|
414
|
+
end
|
|
415
|
+
def self.Vector3Length(v)
|
|
416
|
+
Raylib.rl_Vector3Length(v)
|
|
417
|
+
end
|
|
418
|
+
def self.Vector3Distance(v1, v2)
|
|
419
|
+
Raylib.rl_Vector3Distance(v1, v2)
|
|
420
|
+
end
|
|
421
|
+
def self.Vector3DistanceSqr(v1, v2)
|
|
422
|
+
Raylib.rl_Vector3DistanceSqr(v1, v2)
|
|
423
|
+
end
|
|
424
|
+
def self.Vector3Angle(v1, v2)
|
|
425
|
+
Raylib.rl_Vector3Angle(v1, v2)
|
|
426
|
+
end
|
|
427
|
+
def self.Vector3Negate(v)
|
|
428
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
429
|
+
Raylib.rl_Vector3Negate(v, _out)
|
|
430
|
+
_out
|
|
431
|
+
end
|
|
432
|
+
def self.Vector3Divide(v1, v2)
|
|
433
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
434
|
+
Raylib.rl_Vector3Divide(v1, v2, _out)
|
|
435
|
+
_out
|
|
436
|
+
end
|
|
437
|
+
def self.Vector3Normalize(v)
|
|
438
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
439
|
+
Raylib.rl_Vector3Normalize(v, _out)
|
|
440
|
+
_out
|
|
441
|
+
end
|
|
442
|
+
def self.Vector3Project(v1, v2)
|
|
443
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
444
|
+
Raylib.rl_Vector3Project(v1, v2, _out)
|
|
445
|
+
_out
|
|
446
|
+
end
|
|
447
|
+
def self.Vector3Reject(v1, v2)
|
|
448
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
449
|
+
Raylib.rl_Vector3Reject(v1, v2, _out)
|
|
450
|
+
_out
|
|
451
|
+
end
|
|
452
|
+
def self.Vector3OrthoNormalize(v1, v2)
|
|
453
|
+
Raylib.rl_Vector3OrthoNormalize(v1, v2)
|
|
454
|
+
end
|
|
455
|
+
def self.Vector3Transform(v, mat)
|
|
456
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
457
|
+
Raylib.rl_Vector3Transform(v, mat, _out)
|
|
458
|
+
_out
|
|
459
|
+
end
|
|
460
|
+
def self.Vector3RotateByQuaternion(v, q)
|
|
461
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
462
|
+
Raylib.rl_Vector3RotateByQuaternion(v, q, _out)
|
|
463
|
+
_out
|
|
464
|
+
end
|
|
465
|
+
def self.Vector3RotateByAxisAngle(v, axis, angle)
|
|
466
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
467
|
+
Raylib.rl_Vector3RotateByAxisAngle(v, axis, angle, _out)
|
|
468
|
+
_out
|
|
469
|
+
end
|
|
470
|
+
def self.Vector3MoveTowards(v, target, maxDistance)
|
|
471
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
472
|
+
Raylib.rl_Vector3MoveTowards(v, target, maxDistance, _out)
|
|
473
|
+
_out
|
|
474
|
+
end
|
|
475
|
+
def self.Vector3Lerp(v1, v2, amount)
|
|
476
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
477
|
+
Raylib.rl_Vector3Lerp(v1, v2, amount, _out)
|
|
478
|
+
_out
|
|
479
|
+
end
|
|
480
|
+
def self.Vector3CubicHermite(v1, tangent1, v2, tangent2, amount)
|
|
481
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
482
|
+
Raylib.rl_Vector3CubicHermite(v1, tangent1, v2, tangent2, amount, _out)
|
|
483
|
+
_out
|
|
484
|
+
end
|
|
485
|
+
def self.Vector3Reflect(v, normal)
|
|
486
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
487
|
+
Raylib.rl_Vector3Reflect(v, normal, _out)
|
|
488
|
+
_out
|
|
489
|
+
end
|
|
490
|
+
def self.Vector3Min(v1, v2)
|
|
491
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
492
|
+
Raylib.rl_Vector3Min(v1, v2, _out)
|
|
493
|
+
_out
|
|
494
|
+
end
|
|
495
|
+
def self.Vector3Max(v1, v2)
|
|
496
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
497
|
+
Raylib.rl_Vector3Max(v1, v2, _out)
|
|
498
|
+
_out
|
|
499
|
+
end
|
|
500
|
+
def self.Vector3Barycenter(p, a, b, c)
|
|
501
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
502
|
+
Raylib.rl_Vector3Barycenter(p, a, b, c, _out)
|
|
503
|
+
_out
|
|
504
|
+
end
|
|
505
|
+
def self.Vector3Unproject(source, projection, view)
|
|
506
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
507
|
+
Raylib.rl_Vector3Unproject(source, projection, view, _out)
|
|
508
|
+
_out
|
|
509
|
+
end
|
|
510
|
+
def self.Vector3ToFloatV(v)
|
|
511
|
+
Raylib.rl_Vector3ToFloatV(v)
|
|
512
|
+
end
|
|
513
|
+
def self.Vector3Invert(v)
|
|
514
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
515
|
+
Raylib.rl_Vector3Invert(v, _out)
|
|
516
|
+
_out
|
|
517
|
+
end
|
|
518
|
+
def self.Vector3Clamp(v, min, max)
|
|
519
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
520
|
+
Raylib.rl_Vector3Clamp(v, min, max, _out)
|
|
521
|
+
_out
|
|
522
|
+
end
|
|
523
|
+
def self.Vector3Equals(p, q)
|
|
524
|
+
Raylib.rl_Vector3Equals(p, q)
|
|
525
|
+
end
|
|
526
|
+
def self.Vector3Refract(v, n, r)
|
|
527
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
528
|
+
Raylib.rl_Vector3Refract(v, n, r, _out)
|
|
529
|
+
_out
|
|
530
|
+
end
|
|
531
|
+
def self.Vector4Zero()
|
|
532
|
+
_out = Vector4.new
|
|
533
|
+
Raylib.rl_Vector4Zero(_out)
|
|
534
|
+
_out
|
|
535
|
+
end
|
|
536
|
+
def self.Vector4One()
|
|
537
|
+
_out = Vector4.new
|
|
538
|
+
Raylib.rl_Vector4One(_out)
|
|
539
|
+
_out
|
|
540
|
+
end
|
|
541
|
+
def self.Vector4Add(v1, v2)
|
|
542
|
+
_out = Vector4.new
|
|
543
|
+
Raylib.rl_Vector4Add(v1, v2, _out)
|
|
544
|
+
_out
|
|
545
|
+
end
|
|
546
|
+
def self.Vector4AddValue(v, add)
|
|
547
|
+
_out = Vector4.new
|
|
548
|
+
Raylib.rl_Vector4AddValue(v, add, _out)
|
|
549
|
+
_out
|
|
550
|
+
end
|
|
551
|
+
def self.Vector4Subtract(v1, v2)
|
|
552
|
+
_out = Vector4.new
|
|
553
|
+
Raylib.rl_Vector4Subtract(v1, v2, _out)
|
|
554
|
+
_out
|
|
555
|
+
end
|
|
556
|
+
def self.Vector4SubtractValue(v, add)
|
|
557
|
+
_out = Vector4.new
|
|
558
|
+
Raylib.rl_Vector4SubtractValue(v, add, _out)
|
|
559
|
+
_out
|
|
560
|
+
end
|
|
561
|
+
def self.Vector4Length(v)
|
|
562
|
+
Raylib.rl_Vector4Length(v)
|
|
563
|
+
end
|
|
564
|
+
def self.Vector4LengthSqr(v)
|
|
565
|
+
Raylib.rl_Vector4LengthSqr(v)
|
|
566
|
+
end
|
|
567
|
+
def self.Vector4DotProduct(v1, v2)
|
|
568
|
+
Raylib.rl_Vector4DotProduct(v1, v2)
|
|
569
|
+
end
|
|
570
|
+
def self.Vector4Distance(v1, v2)
|
|
571
|
+
Raylib.rl_Vector4Distance(v1, v2)
|
|
572
|
+
end
|
|
573
|
+
def self.Vector4DistanceSqr(v1, v2)
|
|
574
|
+
Raylib.rl_Vector4DistanceSqr(v1, v2)
|
|
575
|
+
end
|
|
576
|
+
def self.Vector4Scale(v, scale)
|
|
577
|
+
_out = Vector4.new
|
|
578
|
+
Raylib.rl_Vector4Scale(v, scale, _out)
|
|
579
|
+
_out
|
|
580
|
+
end
|
|
581
|
+
def self.Vector4Multiply(v1, v2)
|
|
582
|
+
_out = Vector4.new
|
|
583
|
+
Raylib.rl_Vector4Multiply(v1, v2, _out)
|
|
584
|
+
_out
|
|
585
|
+
end
|
|
586
|
+
def self.Vector4Negate(v)
|
|
587
|
+
_out = Vector4.new
|
|
588
|
+
Raylib.rl_Vector4Negate(v, _out)
|
|
589
|
+
_out
|
|
590
|
+
end
|
|
591
|
+
def self.Vector4Divide(v1, v2)
|
|
592
|
+
_out = Vector4.new
|
|
593
|
+
Raylib.rl_Vector4Divide(v1, v2, _out)
|
|
594
|
+
_out
|
|
595
|
+
end
|
|
596
|
+
def self.Vector4Normalize(v)
|
|
597
|
+
_out = Vector4.new
|
|
598
|
+
Raylib.rl_Vector4Normalize(v, _out)
|
|
599
|
+
_out
|
|
600
|
+
end
|
|
601
|
+
def self.Vector4Min(v1, v2)
|
|
602
|
+
_out = Vector4.new
|
|
603
|
+
Raylib.rl_Vector4Min(v1, v2, _out)
|
|
604
|
+
_out
|
|
605
|
+
end
|
|
606
|
+
def self.Vector4Max(v1, v2)
|
|
607
|
+
_out = Vector4.new
|
|
608
|
+
Raylib.rl_Vector4Max(v1, v2, _out)
|
|
609
|
+
_out
|
|
610
|
+
end
|
|
611
|
+
def self.Vector4Lerp(v1, v2, amount)
|
|
612
|
+
_out = Vector4.new
|
|
613
|
+
Raylib.rl_Vector4Lerp(v1, v2, amount, _out)
|
|
614
|
+
_out
|
|
615
|
+
end
|
|
616
|
+
def self.Vector4MoveTowards(v, target, maxDistance)
|
|
617
|
+
_out = Vector4.new
|
|
618
|
+
Raylib.rl_Vector4MoveTowards(v, target, maxDistance, _out)
|
|
619
|
+
_out
|
|
620
|
+
end
|
|
621
|
+
def self.Vector4Invert(v)
|
|
622
|
+
_out = Vector4.new
|
|
623
|
+
Raylib.rl_Vector4Invert(v, _out)
|
|
624
|
+
_out
|
|
625
|
+
end
|
|
626
|
+
def self.Vector4Equals(p, q)
|
|
627
|
+
Raylib.rl_Vector4Equals(p, q)
|
|
628
|
+
end
|
|
629
|
+
def self.MatrixDeterminant(mat)
|
|
630
|
+
Raylib.rl_MatrixDeterminant(mat)
|
|
631
|
+
end
|
|
632
|
+
def self.MatrixTrace(mat)
|
|
633
|
+
Raylib.rl_MatrixTrace(mat)
|
|
634
|
+
end
|
|
635
|
+
def self.MatrixTranspose(mat)
|
|
636
|
+
_out = Matrix.new
|
|
637
|
+
Raylib.rl_MatrixTranspose(mat, _out)
|
|
638
|
+
_out
|
|
639
|
+
end
|
|
640
|
+
def self.MatrixInvert(mat)
|
|
641
|
+
_out = Matrix.new
|
|
642
|
+
Raylib.rl_MatrixInvert(mat, _out)
|
|
643
|
+
_out
|
|
644
|
+
end
|
|
645
|
+
def self.MatrixAdd(left, right)
|
|
646
|
+
_out = Matrix.new
|
|
647
|
+
Raylib.rl_MatrixAdd(left, right, _out)
|
|
648
|
+
_out
|
|
649
|
+
end
|
|
650
|
+
def self.MatrixSubtract(left, right)
|
|
651
|
+
_out = Matrix.new
|
|
652
|
+
Raylib.rl_MatrixSubtract(left, right, _out)
|
|
653
|
+
_out
|
|
654
|
+
end
|
|
655
|
+
def self.MatrixMultiply(left, right)
|
|
656
|
+
_out = Matrix.new
|
|
657
|
+
Raylib.rl_MatrixMultiply(left, right, _out)
|
|
658
|
+
_out
|
|
659
|
+
end
|
|
660
|
+
def self.MatrixMultiplyValue(left, value)
|
|
661
|
+
_out = Matrix.new
|
|
662
|
+
Raylib.rl_MatrixMultiplyValue(left, value, _out)
|
|
663
|
+
_out
|
|
664
|
+
end
|
|
665
|
+
def self.MatrixTranslate(x, y, z)
|
|
666
|
+
_out = Matrix.new
|
|
667
|
+
Raylib.rl_MatrixTranslate(x, y, z, _out)
|
|
668
|
+
_out
|
|
669
|
+
end
|
|
670
|
+
def self.MatrixRotate(axis, angle)
|
|
671
|
+
_out = Matrix.new
|
|
672
|
+
Raylib.rl_MatrixRotate(axis, angle, _out)
|
|
673
|
+
_out
|
|
674
|
+
end
|
|
675
|
+
def self.MatrixRotateX(angle)
|
|
676
|
+
_out = Matrix.new
|
|
677
|
+
Raylib.rl_MatrixRotateX(angle, _out)
|
|
678
|
+
_out
|
|
679
|
+
end
|
|
680
|
+
def self.MatrixRotateY(angle)
|
|
681
|
+
_out = Matrix.new
|
|
682
|
+
Raylib.rl_MatrixRotateY(angle, _out)
|
|
683
|
+
_out
|
|
684
|
+
end
|
|
685
|
+
def self.MatrixRotateZ(angle)
|
|
686
|
+
_out = Matrix.new
|
|
687
|
+
Raylib.rl_MatrixRotateZ(angle, _out)
|
|
688
|
+
_out
|
|
689
|
+
end
|
|
690
|
+
def self.MatrixRotateXYZ(angle)
|
|
691
|
+
_out = Matrix.new
|
|
692
|
+
Raylib.rl_MatrixRotateXYZ(angle, _out)
|
|
693
|
+
_out
|
|
694
|
+
end
|
|
695
|
+
def self.MatrixRotateZYX(angle)
|
|
696
|
+
_out = Matrix.new
|
|
697
|
+
Raylib.rl_MatrixRotateZYX(angle, _out)
|
|
698
|
+
_out
|
|
699
|
+
end
|
|
700
|
+
def self.MatrixScale(x, y, z)
|
|
701
|
+
_out = Matrix.new
|
|
702
|
+
Raylib.rl_MatrixScale(x, y, z, _out)
|
|
703
|
+
_out
|
|
704
|
+
end
|
|
705
|
+
def self.MatrixFrustum(left, right, bottom, top, nearPlane, farPlane)
|
|
706
|
+
_out = Matrix.new
|
|
707
|
+
Raylib.rl_MatrixFrustum(left, right, bottom, top, nearPlane, farPlane, _out)
|
|
708
|
+
_out
|
|
709
|
+
end
|
|
710
|
+
def self.MatrixPerspective(fovY, aspect, nearPlane, farPlane)
|
|
711
|
+
_out = Matrix.new
|
|
712
|
+
Raylib.rl_MatrixPerspective(fovY, aspect, nearPlane, farPlane, _out)
|
|
713
|
+
_out
|
|
714
|
+
end
|
|
715
|
+
def self.MatrixOrtho(left, right, bottom, top, nearPlane, farPlane)
|
|
716
|
+
_out = Matrix.new
|
|
717
|
+
Raylib.rl_MatrixOrtho(left, right, bottom, top, nearPlane, farPlane, _out)
|
|
718
|
+
_out
|
|
719
|
+
end
|
|
720
|
+
def self.MatrixLookAt(eye, target, up)
|
|
721
|
+
_out = Matrix.new
|
|
722
|
+
Raylib.rl_MatrixLookAt(eye, target, up, _out)
|
|
723
|
+
_out
|
|
724
|
+
end
|
|
725
|
+
def self.MatrixToFloatV(mat)
|
|
726
|
+
Raylib.rl_MatrixToFloatV(mat)
|
|
727
|
+
end
|
|
728
|
+
def self.QuaternionFromVector3ToVector3(from, to)
|
|
729
|
+
_out = Quaternion.new
|
|
730
|
+
Raylib.rl_QuaternionFromVector3ToVector3(from, to, _out)
|
|
731
|
+
_out
|
|
732
|
+
end
|
|
733
|
+
def self.QuaternionToMatrix(q)
|
|
734
|
+
_out = Matrix.new
|
|
735
|
+
Raylib.rl_QuaternionToMatrix(q, _out)
|
|
736
|
+
_out
|
|
737
|
+
end
|
|
738
|
+
def self.QuaternionAdd(q1, q2)
|
|
739
|
+
_out = Quaternion.new
|
|
740
|
+
Raylib.rl_QuaternionAdd(q1, q2, _out)
|
|
741
|
+
_out
|
|
742
|
+
end
|
|
743
|
+
def self.QuaternionAddValue(q, add)
|
|
744
|
+
_out = Quaternion.new
|
|
745
|
+
Raylib.rl_QuaternionAddValue(q, add, _out)
|
|
746
|
+
_out
|
|
747
|
+
end
|
|
748
|
+
def self.QuaternionSubtract(q1, q2)
|
|
749
|
+
_out = Quaternion.new
|
|
750
|
+
Raylib.rl_QuaternionSubtract(q1, q2, _out)
|
|
751
|
+
_out
|
|
752
|
+
end
|
|
753
|
+
def self.QuaternionSubtractValue(q, sub)
|
|
754
|
+
_out = Quaternion.new
|
|
755
|
+
Raylib.rl_QuaternionSubtractValue(q, sub, _out)
|
|
756
|
+
_out
|
|
757
|
+
end
|
|
758
|
+
def self.QuaternionIdentity()
|
|
759
|
+
_out = Quaternion.new
|
|
760
|
+
Raylib.rl_QuaternionIdentity(_out)
|
|
761
|
+
_out
|
|
762
|
+
end
|
|
763
|
+
def self.QuaternionLength(q)
|
|
764
|
+
Raylib.rl_QuaternionLength(q)
|
|
765
|
+
end
|
|
766
|
+
def self.QuaternionNormalize(q)
|
|
767
|
+
_out = Quaternion.new
|
|
768
|
+
Raylib.rl_QuaternionNormalize(q, _out)
|
|
769
|
+
_out
|
|
770
|
+
end
|
|
771
|
+
def self.QuaternionInvert(q)
|
|
772
|
+
_out = Quaternion.new
|
|
773
|
+
Raylib.rl_QuaternionInvert(q, _out)
|
|
774
|
+
_out
|
|
775
|
+
end
|
|
776
|
+
def self.QuaternionMultiply(q1, q2)
|
|
777
|
+
_out = Quaternion.new
|
|
778
|
+
Raylib.rl_QuaternionMultiply(q1, q2, _out)
|
|
779
|
+
_out
|
|
780
|
+
end
|
|
781
|
+
def self.QuaternionScale(q, mul)
|
|
782
|
+
_out = Quaternion.new
|
|
783
|
+
Raylib.rl_QuaternionScale(q, mul, _out)
|
|
784
|
+
_out
|
|
785
|
+
end
|
|
786
|
+
def self.QuaternionDivide(q1, q2)
|
|
787
|
+
_out = Quaternion.new
|
|
788
|
+
Raylib.rl_QuaternionDivide(q1, q2, _out)
|
|
789
|
+
_out
|
|
790
|
+
end
|
|
791
|
+
def self.QuaternionLerp(q1, q2, amount)
|
|
792
|
+
_out = Quaternion.new
|
|
793
|
+
Raylib.rl_QuaternionLerp(q1, q2, amount, _out)
|
|
794
|
+
_out
|
|
795
|
+
end
|
|
796
|
+
def self.QuaternionNlerp(q1, q2, amount)
|
|
797
|
+
_out = Quaternion.new
|
|
798
|
+
Raylib.rl_QuaternionNlerp(q1, q2, amount, _out)
|
|
799
|
+
_out
|
|
800
|
+
end
|
|
801
|
+
def self.QuaternionSlerp(q1, q2, amount)
|
|
802
|
+
_out = Quaternion.new
|
|
803
|
+
Raylib.rl_QuaternionSlerp(q1, q2, amount, _out)
|
|
804
|
+
_out
|
|
805
|
+
end
|
|
806
|
+
def self.QuaternionCubicHermiteSpline(q1, outTangent1, q2, inTangent2, t)
|
|
807
|
+
_out = Quaternion.new
|
|
808
|
+
Raylib.rl_QuaternionCubicHermiteSpline(q1, outTangent1, q2, inTangent2, t, _out)
|
|
809
|
+
_out
|
|
810
|
+
end
|
|
811
|
+
def self.QuaternionFromMatrix(mat)
|
|
812
|
+
_out = Quaternion.new
|
|
813
|
+
Raylib.rl_QuaternionFromMatrix(mat, _out)
|
|
814
|
+
_out
|
|
815
|
+
end
|
|
816
|
+
def self.QuaternionFromAxisAngle(axis, angle)
|
|
817
|
+
_out = Quaternion.new
|
|
818
|
+
Raylib.rl_QuaternionFromAxisAngle(axis, angle, _out)
|
|
819
|
+
_out
|
|
820
|
+
end
|
|
821
|
+
def self.QuaternionToAxisAngle(q, outAxis, outAngle)
|
|
822
|
+
Raylib.rl_QuaternionToAxisAngle(q, outAxis, outAngle)
|
|
823
|
+
end
|
|
824
|
+
def self.QuaternionFromEuler(pitch, yaw, roll)
|
|
825
|
+
_out = Quaternion.new
|
|
826
|
+
Raylib.rl_QuaternionFromEuler(pitch, yaw, roll, _out)
|
|
827
|
+
_out
|
|
828
|
+
end
|
|
829
|
+
def self.QuaternionToEuler(q)
|
|
830
|
+
_out = Vector3.new(0.0, 0.0, 0.0)
|
|
831
|
+
Raylib.rl_QuaternionToEuler(q, _out)
|
|
832
|
+
_out
|
|
833
|
+
end
|
|
834
|
+
def self.QuaternionTransform(q, mat)
|
|
835
|
+
_out = Quaternion.new
|
|
836
|
+
Raylib.rl_QuaternionTransform(q, mat, _out)
|
|
837
|
+
_out
|
|
838
|
+
end
|
|
839
|
+
def self.QuaternionEquals(p, q)
|
|
840
|
+
Raylib.rl_QuaternionEquals(p, q)
|
|
841
|
+
end
|
|
842
|
+
def self.MatrixCompose(translation, rotation, scale)
|
|
843
|
+
_out = Matrix.new
|
|
844
|
+
Raylib.rl_MatrixCompose(translation, rotation, scale, _out)
|
|
845
|
+
_out
|
|
846
|
+
end
|
|
847
|
+
def self.MatrixDecompose(mat, translation, rotation, scale)
|
|
848
|
+
Raylib.rl_MatrixDecompose(mat, translation, rotation, scale)
|
|
849
|
+
end
|
|
850
|
+
|
|
851
|
+
# ====== generated: wrappers + constants ======
|
|
852
|
+
|
|
853
|
+
# ====== generated: snake_case aliases (MRI gem naming) ======
|
|
854
|
+
def self.clamp(p0, p1, p2)
|
|
855
|
+
Raylib.Clamp(p0, p1, p2)
|
|
856
|
+
end
|
|
857
|
+
def self.lerp(p0, p1, p2)
|
|
858
|
+
Raylib.Lerp(p0, p1, p2)
|
|
859
|
+
end
|
|
860
|
+
def self.normalize(p0, p1, p2)
|
|
861
|
+
Raylib.Normalize(p0, p1, p2)
|
|
862
|
+
end
|
|
863
|
+
def self.remap(p0, p1, p2, p3, p4)
|
|
864
|
+
Raylib.Remap(p0, p1, p2, p3, p4)
|
|
865
|
+
end
|
|
866
|
+
def self.wrap(p0, p1, p2)
|
|
867
|
+
Raylib.Wrap(p0, p1, p2)
|
|
868
|
+
end
|
|
869
|
+
def self.float_equals(p0, p1)
|
|
870
|
+
Raylib.FloatEquals(p0, p1)
|
|
871
|
+
end
|
|
872
|
+
class << self
|
|
873
|
+
alias_method :matrix_to_float_v, :MatrixToFloatV
|
|
874
|
+
alias_method :quaternion_from_vector3_to_vector3, :QuaternionFromVector3ToVector3
|
|
875
|
+
alias_method :quaternion_to_matrix, :QuaternionToMatrix
|
|
876
|
+
alias_method :vector2_zero, :Vector2Zero
|
|
877
|
+
alias_method :vector2_one, :Vector2One
|
|
878
|
+
alias_method :vector2_add, :Vector2Add
|
|
879
|
+
alias_method :vector2_add_value, :Vector2AddValue
|
|
880
|
+
alias_method :vector2_subtract, :Vector2Subtract
|
|
881
|
+
alias_method :vector2_subtract_value, :Vector2SubtractValue
|
|
882
|
+
alias_method :vector2_length, :Vector2Length
|
|
883
|
+
alias_method :vector2_length_sqr, :Vector2LengthSqr
|
|
884
|
+
alias_method :vector2_dot_product, :Vector2DotProduct
|
|
885
|
+
alias_method :vector2_cross_product, :Vector2CrossProduct
|
|
886
|
+
alias_method :vector2_distance, :Vector2Distance
|
|
887
|
+
alias_method :vector2_distance_sqr, :Vector2DistanceSqr
|
|
888
|
+
alias_method :vector2_angle, :Vector2Angle
|
|
889
|
+
alias_method :vector2_line_angle, :Vector2LineAngle
|
|
890
|
+
alias_method :vector2_scale, :Vector2Scale
|
|
891
|
+
alias_method :vector2_multiply, :Vector2Multiply
|
|
892
|
+
alias_method :vector2_negate, :Vector2Negate
|
|
893
|
+
alias_method :vector2_divide, :Vector2Divide
|
|
894
|
+
alias_method :vector2_normalize, :Vector2Normalize
|
|
895
|
+
alias_method :vector2_transform, :Vector2Transform
|
|
896
|
+
alias_method :vector2_lerp, :Vector2Lerp
|
|
897
|
+
alias_method :vector2_reflect, :Vector2Reflect
|
|
898
|
+
alias_method :vector2_min, :Vector2Min
|
|
899
|
+
alias_method :vector2_max, :Vector2Max
|
|
900
|
+
alias_method :vector2_rotate, :Vector2Rotate
|
|
901
|
+
alias_method :vector2_move_towards, :Vector2MoveTowards
|
|
902
|
+
alias_method :vector2_invert, :Vector2Invert
|
|
903
|
+
alias_method :vector2_clamp, :Vector2Clamp
|
|
904
|
+
alias_method :vector2_clamp_value, :Vector2ClampValue
|
|
905
|
+
alias_method :vector2_equals, :Vector2Equals
|
|
906
|
+
alias_method :vector2_refract, :Vector2Refract
|
|
907
|
+
alias_method :vector3_zero, :Vector3Zero
|
|
908
|
+
alias_method :vector3_one, :Vector3One
|
|
909
|
+
alias_method :vector3_add, :Vector3Add
|
|
910
|
+
alias_method :vector3_add_value, :Vector3AddValue
|
|
911
|
+
alias_method :vector3_subtract, :Vector3Subtract
|
|
912
|
+
alias_method :vector3_subtract_value, :Vector3SubtractValue
|
|
913
|
+
alias_method :vector3_scale, :Vector3Scale
|
|
914
|
+
alias_method :vector3_multiply, :Vector3Multiply
|
|
915
|
+
alias_method :vector3_cross_product, :Vector3CrossProduct
|
|
916
|
+
alias_method :vector3_perpendicular, :Vector3Perpendicular
|
|
917
|
+
alias_method :vector3_length, :Vector3Length
|
|
918
|
+
alias_method :vector3_length_sqr, :Vector3LengthSqr
|
|
919
|
+
alias_method :vector3_dot_product, :Vector3DotProduct
|
|
920
|
+
alias_method :vector3_distance, :Vector3Distance
|
|
921
|
+
alias_method :vector3_distance_sqr, :Vector3DistanceSqr
|
|
922
|
+
alias_method :vector3_angle, :Vector3Angle
|
|
923
|
+
alias_method :vector3_negate, :Vector3Negate
|
|
924
|
+
alias_method :vector3_divide, :Vector3Divide
|
|
925
|
+
alias_method :vector3_normalize, :Vector3Normalize
|
|
926
|
+
alias_method :vector3_project, :Vector3Project
|
|
927
|
+
alias_method :vector3_reject, :Vector3Reject
|
|
928
|
+
alias_method :vector3_ortho_normalize, :Vector3OrthoNormalize
|
|
929
|
+
alias_method :vector3_transform, :Vector3Transform
|
|
930
|
+
alias_method :vector3_rotate_by_quaternion, :Vector3RotateByQuaternion
|
|
931
|
+
alias_method :vector3_rotate_by_axis_angle, :Vector3RotateByAxisAngle
|
|
932
|
+
alias_method :vector3_move_towards, :Vector3MoveTowards
|
|
933
|
+
alias_method :vector3_lerp, :Vector3Lerp
|
|
934
|
+
alias_method :vector3_cubic_hermite, :Vector3CubicHermite
|
|
935
|
+
alias_method :vector3_reflect, :Vector3Reflect
|
|
936
|
+
alias_method :vector3_min, :Vector3Min
|
|
937
|
+
alias_method :vector3_max, :Vector3Max
|
|
938
|
+
alias_method :vector3_barycenter, :Vector3Barycenter
|
|
939
|
+
alias_method :vector3_unproject, :Vector3Unproject
|
|
940
|
+
alias_method :vector3_to_float_v, :Vector3ToFloatV
|
|
941
|
+
alias_method :vector3_invert, :Vector3Invert
|
|
942
|
+
alias_method :vector3_clamp, :Vector3Clamp
|
|
943
|
+
alias_method :vector3_clamp_value, :Vector3ClampValue
|
|
944
|
+
alias_method :vector3_equals, :Vector3Equals
|
|
945
|
+
alias_method :vector3_refract, :Vector3Refract
|
|
946
|
+
alias_method :vector_4zero, :Vector4Zero
|
|
947
|
+
alias_method :vector_4one, :Vector4One
|
|
948
|
+
alias_method :vector_4add, :Vector4Add
|
|
949
|
+
alias_method :vector_4add_value, :Vector4AddValue
|
|
950
|
+
alias_method :vector_4subtract, :Vector4Subtract
|
|
951
|
+
alias_method :vector_4subtract_value, :Vector4SubtractValue
|
|
952
|
+
alias_method :vector_4length, :Vector4Length
|
|
953
|
+
alias_method :vector_4length_sqr, :Vector4LengthSqr
|
|
954
|
+
alias_method :vector_4dot_product, :Vector4DotProduct
|
|
955
|
+
alias_method :vector_4distance, :Vector4Distance
|
|
956
|
+
alias_method :vector_4distance_sqr, :Vector4DistanceSqr
|
|
957
|
+
alias_method :vector_4scale, :Vector4Scale
|
|
958
|
+
alias_method :vector_4multiply, :Vector4Multiply
|
|
959
|
+
alias_method :vector_4negate, :Vector4Negate
|
|
960
|
+
alias_method :vector_4divide, :Vector4Divide
|
|
961
|
+
alias_method :vector_4normalize, :Vector4Normalize
|
|
962
|
+
alias_method :vector_4min, :Vector4Min
|
|
963
|
+
alias_method :vector_4max, :Vector4Max
|
|
964
|
+
alias_method :vector_4lerp, :Vector4Lerp
|
|
965
|
+
alias_method :vector_4move_towards, :Vector4MoveTowards
|
|
966
|
+
alias_method :vector_4invert, :Vector4Invert
|
|
967
|
+
alias_method :vector_4equals, :Vector4Equals
|
|
968
|
+
alias_method :matrix_determinant, :MatrixDeterminant
|
|
969
|
+
alias_method :matrix_trace, :MatrixTrace
|
|
970
|
+
alias_method :matrix_transpose, :MatrixTranspose
|
|
971
|
+
alias_method :matrix_invert, :MatrixInvert
|
|
972
|
+
alias_method :matrix_identity, :MatrixIdentity
|
|
973
|
+
alias_method :matrix_add, :MatrixAdd
|
|
974
|
+
alias_method :matrix_subtract, :MatrixSubtract
|
|
975
|
+
alias_method :matrix_multiply, :MatrixMultiply
|
|
976
|
+
alias_method :matrix_multiply_value, :MatrixMultiplyValue
|
|
977
|
+
alias_method :matrix_translate, :MatrixTranslate
|
|
978
|
+
alias_method :matrix_rotate, :MatrixRotate
|
|
979
|
+
alias_method :matrix_rotate_x, :MatrixRotateX
|
|
980
|
+
alias_method :matrix_rotate_y, :MatrixRotateY
|
|
981
|
+
alias_method :matrix_rotate_z, :MatrixRotateZ
|
|
982
|
+
alias_method :matrix_rotate_xyz, :MatrixRotateXYZ
|
|
983
|
+
alias_method :matrix_rotate_zyx, :MatrixRotateZYX
|
|
984
|
+
alias_method :matrix_scale, :MatrixScale
|
|
985
|
+
alias_method :matrix_frustum, :MatrixFrustum
|
|
986
|
+
alias_method :matrix_perspective, :MatrixPerspective
|
|
987
|
+
alias_method :matrix_ortho, :MatrixOrtho
|
|
988
|
+
alias_method :matrix_look_at, :MatrixLookAt
|
|
989
|
+
alias_method :quaternion_add, :QuaternionAdd
|
|
990
|
+
alias_method :quaternion_add_value, :QuaternionAddValue
|
|
991
|
+
alias_method :quaternion_subtract, :QuaternionSubtract
|
|
992
|
+
alias_method :quaternion_subtract_value, :QuaternionSubtractValue
|
|
993
|
+
alias_method :quaternion_identity, :QuaternionIdentity
|
|
994
|
+
alias_method :quaternion_length, :QuaternionLength
|
|
995
|
+
alias_method :quaternion_normalize, :QuaternionNormalize
|
|
996
|
+
alias_method :quaternion_invert, :QuaternionInvert
|
|
997
|
+
alias_method :quaternion_multiply, :QuaternionMultiply
|
|
998
|
+
alias_method :quaternion_scale, :QuaternionScale
|
|
999
|
+
alias_method :quaternion_divide, :QuaternionDivide
|
|
1000
|
+
alias_method :quaternion_lerp, :QuaternionLerp
|
|
1001
|
+
alias_method :quaternion_nlerp, :QuaternionNlerp
|
|
1002
|
+
alias_method :quaternion_slerp, :QuaternionSlerp
|
|
1003
|
+
alias_method :quaternion_cubic_hermite_spline, :QuaternionCubicHermiteSpline
|
|
1004
|
+
alias_method :quaternion_from_matrix, :QuaternionFromMatrix
|
|
1005
|
+
alias_method :quaternion_from_axis_angle, :QuaternionFromAxisAngle
|
|
1006
|
+
alias_method :quaternion_to_axis_angle, :QuaternionToAxisAngle
|
|
1007
|
+
alias_method :quaternion_from_euler, :QuaternionFromEuler
|
|
1008
|
+
alias_method :quaternion_to_euler, :QuaternionToEuler
|
|
1009
|
+
alias_method :quaternion_transform, :QuaternionTransform
|
|
1010
|
+
alias_method :quaternion_equals, :QuaternionEquals
|
|
1011
|
+
alias_method :matrix_compose, :MatrixCompose
|
|
1012
|
+
alias_method :matrix_decompose, :MatrixDecompose
|
|
1013
|
+
end
|
|
1014
|
+
end
|