box2d-ruby 1.0.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.txt +21 -0
- data/README.md +336 -0
- data/examples/contact_events.rb +22 -0
- data/examples/debug_draw.rb +15 -0
- data/examples/falling_ball.rb +19 -0
- data/examples/rugl_debug_draw.rb +68 -0
- data/examples/stagecraft_debug_draw.rb +64 -0
- data/examples/support/box2d_debug_lines.rb +125 -0
- data/ext/box2d/CMakeLists.txt +35 -0
- data/ext/box2d/extconf.rb +42 -0
- data/ext/box2d/native.c +9 -0
- data/ext/box2d/vendor/box2d/LICENSE +21 -0
- data/ext/box2d/vendor/box2d/VERSION +1 -0
- data/ext/box2d/vendor/box2d/include/box2d/base.h +131 -0
- data/ext/box2d/vendor/box2d/include/box2d/box2d.h +1222 -0
- data/ext/box2d/vendor/box2d/include/box2d/collision.h +830 -0
- data/ext/box2d/vendor/box2d/include/box2d/id.h +144 -0
- data/ext/box2d/vendor/box2d/include/box2d/math_functions.h +761 -0
- data/ext/box2d/vendor/box2d/include/box2d/types.h +1457 -0
- data/ext/box2d/vendor/box2d/src/CMakeLists.txt +223 -0
- data/ext/box2d/vendor/box2d/src/aabb.c +132 -0
- data/ext/box2d/vendor/box2d/src/aabb.h +56 -0
- data/ext/box2d/vendor/box2d/src/arena_allocator.c +112 -0
- data/ext/box2d/vendor/box2d/src/arena_allocator.h +48 -0
- data/ext/box2d/vendor/box2d/src/array.c +8 -0
- data/ext/box2d/vendor/box2d/src/array.h +179 -0
- data/ext/box2d/vendor/box2d/src/atomic.h +79 -0
- data/ext/box2d/vendor/box2d/src/bitset.c +67 -0
- data/ext/box2d/vendor/box2d/src/bitset.h +65 -0
- data/ext/box2d/vendor/box2d/src/body.c +1884 -0
- data/ext/box2d/vendor/box2d/src/body.h +194 -0
- data/ext/box2d/vendor/box2d/src/box2d.natvis +41 -0
- data/ext/box2d/vendor/box2d/src/broad_phase.c +524 -0
- data/ext/box2d/vendor/box2d/src/broad_phase.h +83 -0
- data/ext/box2d/vendor/box2d/src/constants.h +54 -0
- data/ext/box2d/vendor/box2d/src/constraint_graph.c +322 -0
- data/ext/box2d/vendor/box2d/src/constraint_graph.h +58 -0
- data/ext/box2d/vendor/box2d/src/contact.c +650 -0
- data/ext/box2d/vendor/box2d/src/contact.h +148 -0
- data/ext/box2d/vendor/box2d/src/contact_solver.c +2120 -0
- data/ext/box2d/vendor/box2d/src/contact_solver.h +54 -0
- data/ext/box2d/vendor/box2d/src/core.c +178 -0
- data/ext/box2d/vendor/box2d/src/core.h +149 -0
- data/ext/box2d/vendor/box2d/src/ctz.h +112 -0
- data/ext/box2d/vendor/box2d/src/distance.c +1415 -0
- data/ext/box2d/vendor/box2d/src/distance_joint.c +556 -0
- data/ext/box2d/vendor/box2d/src/dynamic_tree.c +1989 -0
- data/ext/box2d/vendor/box2d/src/geometry.c +1028 -0
- data/ext/box2d/vendor/box2d/src/hull.c +328 -0
- data/ext/box2d/vendor/box2d/src/id_pool.c +79 -0
- data/ext/box2d/vendor/box2d/src/id_pool.h +35 -0
- data/ext/box2d/vendor/box2d/src/island.c +977 -0
- data/ext/box2d/vendor/box2d/src/island.h +89 -0
- data/ext/box2d/vendor/box2d/src/joint.c +1272 -0
- data/ext/box2d/vendor/box2d/src/joint.h +335 -0
- data/ext/box2d/vendor/box2d/src/manifold.c +1726 -0
- data/ext/box2d/vendor/box2d/src/math_functions.c +159 -0
- data/ext/box2d/vendor/box2d/src/motor_joint.c +283 -0
- data/ext/box2d/vendor/box2d/src/mouse_joint.c +214 -0
- data/ext/box2d/vendor/box2d/src/mover.c +73 -0
- data/ext/box2d/vendor/box2d/src/prismatic_joint.c +656 -0
- data/ext/box2d/vendor/box2d/src/revolute_joint.c +534 -0
- data/ext/box2d/vendor/box2d/src/sensor.c +389 -0
- data/ext/box2d/vendor/box2d/src/sensor.h +36 -0
- data/ext/box2d/vendor/box2d/src/shape.c +1714 -0
- data/ext/box2d/vendor/box2d/src/shape.h +123 -0
- data/ext/box2d/vendor/box2d/src/solver.c +2038 -0
- data/ext/box2d/vendor/box2d/src/solver.h +155 -0
- data/ext/box2d/vendor/box2d/src/solver_set.c +613 -0
- data/ext/box2d/vendor/box2d/src/solver_set.h +57 -0
- data/ext/box2d/vendor/box2d/src/table.c +238 -0
- data/ext/box2d/vendor/box2d/src/table.h +37 -0
- data/ext/box2d/vendor/box2d/src/timer.c +185 -0
- data/ext/box2d/vendor/box2d/src/types.c +151 -0
- data/ext/box2d/vendor/box2d/src/weld_joint.c +310 -0
- data/ext/box2d/vendor/box2d/src/wheel_joint.c +551 -0
- data/ext/box2d/vendor/box2d/src/world.c +3301 -0
- data/ext/box2d/vendor/box2d/src/world.h +192 -0
- data/generator/generate.rb +316 -0
- data/generator/layout_probe.c +507 -0
- data/generator/verify_layouts.rb +32 -0
- data/lib/box2d/body.rb +172 -0
- data/lib/box2d/body_definition.rb +38 -0
- data/lib/box2d/body_shapes.rb +135 -0
- data/lib/box2d/chain.rb +61 -0
- data/lib/box2d/debug_draw.rb +118 -0
- data/lib/box2d/events.rb +103 -0
- data/lib/box2d/fixed_stepper.rb +39 -0
- data/lib/box2d/handle.rb +46 -0
- data/lib/box2d/hit.rb +5 -0
- data/lib/box2d/joint.rb +197 -0
- data/lib/box2d/native.rb +1462 -0
- data/lib/box2d/native_loader.rb +45 -0
- data/lib/box2d/pixel_scale.rb +29 -0
- data/lib/box2d/shape.rb +109 -0
- data/lib/box2d/shape_definition.rb +44 -0
- data/lib/box2d/value_conversion.rb +80 -0
- data/lib/box2d/version.rb +7 -0
- data/lib/box2d/world.rb +135 -0
- data/lib/box2d/world_joints.rb +156 -0
- data/lib/box2d/world_queries.rb +122 -0
- data/lib/box2d/world_registry.rb +95 -0
- data/lib/box2d.rb +31 -0
- data/script/build_platform_gem.rb +24 -0
- data/script/deterministic_scene.rb +56 -0
- data/script/update_deterministic_snapshot.rb +11 -0
- data/script/verify_platform_gem.rb +24 -0
- metadata +164 -0
data/lib/box2d/native.rb
ADDED
|
@@ -0,0 +1,1462 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated by generator/generate.rb from Box2D 3.1.0 headers.
|
|
4
|
+
# Do not edit this file directly.
|
|
5
|
+
|
|
6
|
+
require "ffi"
|
|
7
|
+
require_relative "native_loader"
|
|
8
|
+
|
|
9
|
+
module Box2D
|
|
10
|
+
module Native
|
|
11
|
+
extend FFI::Library
|
|
12
|
+
|
|
13
|
+
ffi_lib NativeLoader.library_path
|
|
14
|
+
|
|
15
|
+
module TOIState
|
|
16
|
+
TOI_STATE_UNKNOWN = 0
|
|
17
|
+
TOI_STATE_FAILED = 1
|
|
18
|
+
TOI_STATE_OVERLAPPED = 2
|
|
19
|
+
TOI_STATE_HIT = 3
|
|
20
|
+
TOI_STATE_SEPARATED = 4
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
module BodyType
|
|
24
|
+
STATIC_BODY = 0
|
|
25
|
+
KINEMATIC_BODY = 1
|
|
26
|
+
DYNAMIC_BODY = 2
|
|
27
|
+
BODY_TYPE_COUNT = 3
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
module ShapeType
|
|
31
|
+
CIRCLE_SHAPE = 0
|
|
32
|
+
CAPSULE_SHAPE = 1
|
|
33
|
+
SEGMENT_SHAPE = 2
|
|
34
|
+
POLYGON_SHAPE = 3
|
|
35
|
+
CHAIN_SEGMENT_SHAPE = 4
|
|
36
|
+
SHAPE_TYPE_COUNT = 5
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
module JointType
|
|
40
|
+
DISTANCE_JOINT = 0
|
|
41
|
+
FILTER_JOINT = 1
|
|
42
|
+
MOTOR_JOINT = 2
|
|
43
|
+
MOUSE_JOINT = 3
|
|
44
|
+
PRISMATIC_JOINT = 4
|
|
45
|
+
REVOLUTE_JOINT = 5
|
|
46
|
+
WELD_JOINT = 6
|
|
47
|
+
WHEEL_JOINT = 7
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
module HexColor
|
|
51
|
+
COLOR_ALICE_BLUE = 15792383
|
|
52
|
+
COLOR_ANTIQUE_WHITE = 16444375
|
|
53
|
+
COLOR_AQUA = 65535
|
|
54
|
+
COLOR_AQUAMARINE = 8388564
|
|
55
|
+
COLOR_AZURE = 15794175
|
|
56
|
+
COLOR_BEIGE = 16119260
|
|
57
|
+
COLOR_BISQUE = 16770244
|
|
58
|
+
COLOR_BLACK = 0
|
|
59
|
+
COLOR_BLANCHED_ALMOND = 16772045
|
|
60
|
+
COLOR_BLUE = 255
|
|
61
|
+
COLOR_BLUE_VIOLET = 9055202
|
|
62
|
+
COLOR_BROWN = 10824234
|
|
63
|
+
COLOR_BURLYWOOD = 14596231
|
|
64
|
+
COLOR_CADET_BLUE = 6266528
|
|
65
|
+
COLOR_CHARTREUSE = 8388352
|
|
66
|
+
COLOR_CHOCOLATE = 13789470
|
|
67
|
+
COLOR_CORAL = 16744272
|
|
68
|
+
COLOR_CORNFLOWER_BLUE = 6591981
|
|
69
|
+
COLOR_CORNSILK = 16775388
|
|
70
|
+
COLOR_CRIMSON = 14423100
|
|
71
|
+
COLOR_CYAN = 65535
|
|
72
|
+
COLOR_DARK_BLUE = 139
|
|
73
|
+
COLOR_DARK_CYAN = 35723
|
|
74
|
+
COLOR_DARK_GOLDEN_ROD = 12092939
|
|
75
|
+
COLOR_DARK_GRAY = 11119017
|
|
76
|
+
COLOR_DARK_GREEN = 25600
|
|
77
|
+
COLOR_DARK_KHAKI = 12433259
|
|
78
|
+
COLOR_DARK_MAGENTA = 9109643
|
|
79
|
+
COLOR_DARK_OLIVE_GREEN = 5597999
|
|
80
|
+
COLOR_DARK_ORANGE = 16747520
|
|
81
|
+
COLOR_DARK_ORCHID = 10040012
|
|
82
|
+
COLOR_DARK_RED = 9109504
|
|
83
|
+
COLOR_DARK_SALMON = 15308410
|
|
84
|
+
COLOR_DARK_SEA_GREEN = 9419919
|
|
85
|
+
COLOR_DARK_SLATE_BLUE = 4734347
|
|
86
|
+
COLOR_DARK_SLATE_GRAY = 3100495
|
|
87
|
+
COLOR_DARK_TURQUOISE = 52945
|
|
88
|
+
COLOR_DARK_VIOLET = 9699539
|
|
89
|
+
COLOR_DEEP_PINK = 16716947
|
|
90
|
+
COLOR_DEEP_SKY_BLUE = 49151
|
|
91
|
+
COLOR_DIM_GRAY = 6908265
|
|
92
|
+
COLOR_DODGER_BLUE = 2003199
|
|
93
|
+
COLOR_FIRE_BRICK = 11674146
|
|
94
|
+
COLOR_FLORAL_WHITE = 16775920
|
|
95
|
+
COLOR_FOREST_GREEN = 2263842
|
|
96
|
+
COLOR_FUCHSIA = 16711935
|
|
97
|
+
COLOR_GAINSBORO = 14474460
|
|
98
|
+
COLOR_GHOST_WHITE = 16316671
|
|
99
|
+
COLOR_GOLD = 16766720
|
|
100
|
+
COLOR_GOLDEN_ROD = 14329120
|
|
101
|
+
COLOR_GRAY = 8421504
|
|
102
|
+
COLOR_GREEN = 32768
|
|
103
|
+
COLOR_GREEN_YELLOW = 11403055
|
|
104
|
+
COLOR_HONEY_DEW = 15794160
|
|
105
|
+
COLOR_HOT_PINK = 16738740
|
|
106
|
+
COLOR_INDIAN_RED = 13458524
|
|
107
|
+
COLOR_INDIGO = 4915330
|
|
108
|
+
COLOR_IVORY = 16777200
|
|
109
|
+
COLOR_KHAKI = 15787660
|
|
110
|
+
COLOR_LAVENDER = 15132410
|
|
111
|
+
COLOR_LAVENDER_BLUSH = 16773365
|
|
112
|
+
COLOR_LAWN_GREEN = 8190976
|
|
113
|
+
COLOR_LEMON_CHIFFON = 16775885
|
|
114
|
+
COLOR_LIGHT_BLUE = 11393254
|
|
115
|
+
COLOR_LIGHT_CORAL = 15761536
|
|
116
|
+
COLOR_LIGHT_CYAN = 14745599
|
|
117
|
+
COLOR_LIGHT_GOLDEN_ROD_YELLOW = 16448210
|
|
118
|
+
COLOR_LIGHT_GRAY = 13882323
|
|
119
|
+
COLOR_LIGHT_GREEN = 9498256
|
|
120
|
+
COLOR_LIGHT_PINK = 16758465
|
|
121
|
+
COLOR_LIGHT_SALMON = 16752762
|
|
122
|
+
COLOR_LIGHT_SEA_GREEN = 2142890
|
|
123
|
+
COLOR_LIGHT_SKY_BLUE = 8900346
|
|
124
|
+
COLOR_LIGHT_SLATE_GRAY = 7833753
|
|
125
|
+
COLOR_LIGHT_STEEL_BLUE = 11584734
|
|
126
|
+
COLOR_LIGHT_YELLOW = 16777184
|
|
127
|
+
COLOR_LIME = 65280
|
|
128
|
+
COLOR_LIME_GREEN = 3329330
|
|
129
|
+
COLOR_LINEN = 16445670
|
|
130
|
+
COLOR_MAGENTA = 16711935
|
|
131
|
+
COLOR_MAROON = 8388608
|
|
132
|
+
COLOR_MEDIUM_AQUA_MARINE = 6737322
|
|
133
|
+
COLOR_MEDIUM_BLUE = 205
|
|
134
|
+
COLOR_MEDIUM_ORCHID = 12211667
|
|
135
|
+
COLOR_MEDIUM_PURPLE = 9662683
|
|
136
|
+
COLOR_MEDIUM_SEA_GREEN = 3978097
|
|
137
|
+
COLOR_MEDIUM_SLATE_BLUE = 8087790
|
|
138
|
+
COLOR_MEDIUM_SPRING_GREEN = 64154
|
|
139
|
+
COLOR_MEDIUM_TURQUOISE = 4772300
|
|
140
|
+
COLOR_MEDIUM_VIOLET_RED = 13047173
|
|
141
|
+
COLOR_MIDNIGHT_BLUE = 1644912
|
|
142
|
+
COLOR_MINT_CREAM = 16121850
|
|
143
|
+
COLOR_MISTY_ROSE = 16770273
|
|
144
|
+
COLOR_MOCCASIN = 16770229
|
|
145
|
+
COLOR_NAVAJO_WHITE = 16768685
|
|
146
|
+
COLOR_NAVY = 128
|
|
147
|
+
COLOR_OLD_LACE = 16643558
|
|
148
|
+
COLOR_OLIVE = 8421376
|
|
149
|
+
COLOR_OLIVE_DRAB = 7048739
|
|
150
|
+
COLOR_ORANGE = 16753920
|
|
151
|
+
COLOR_ORANGE_RED = 16729344
|
|
152
|
+
COLOR_ORCHID = 14315734
|
|
153
|
+
COLOR_PALE_GOLDEN_ROD = 15657130
|
|
154
|
+
COLOR_PALE_GREEN = 10025880
|
|
155
|
+
COLOR_PALE_TURQUOISE = 11529966
|
|
156
|
+
COLOR_PALE_VIOLET_RED = 14381203
|
|
157
|
+
COLOR_PAPAYA_WHIP = 16773077
|
|
158
|
+
COLOR_PEACH_PUFF = 16767673
|
|
159
|
+
COLOR_PERU = 13468991
|
|
160
|
+
COLOR_PINK = 16761035
|
|
161
|
+
COLOR_PLUM = 14524637
|
|
162
|
+
COLOR_POWDER_BLUE = 11591910
|
|
163
|
+
COLOR_PURPLE = 8388736
|
|
164
|
+
COLOR_REBECCA_PURPLE = 6697881
|
|
165
|
+
COLOR_RED = 16711680
|
|
166
|
+
COLOR_ROSY_BROWN = 12357519
|
|
167
|
+
COLOR_ROYAL_BLUE = 4286945
|
|
168
|
+
COLOR_SADDLE_BROWN = 9127187
|
|
169
|
+
COLOR_SALMON = 16416882
|
|
170
|
+
COLOR_SANDY_BROWN = 16032864
|
|
171
|
+
COLOR_SEA_GREEN = 3050327
|
|
172
|
+
COLOR_SEA_SHELL = 16774638
|
|
173
|
+
COLOR_SIENNA = 10506797
|
|
174
|
+
COLOR_SILVER = 12632256
|
|
175
|
+
COLOR_SKY_BLUE = 8900331
|
|
176
|
+
COLOR_SLATE_BLUE = 6970061
|
|
177
|
+
COLOR_SLATE_GRAY = 7372944
|
|
178
|
+
COLOR_SNOW = 16775930
|
|
179
|
+
COLOR_SPRING_GREEN = 65407
|
|
180
|
+
COLOR_STEEL_BLUE = 4620980
|
|
181
|
+
COLOR_TAN = 13808780
|
|
182
|
+
COLOR_TEAL = 32896
|
|
183
|
+
COLOR_THISTLE = 14204888
|
|
184
|
+
COLOR_TOMATO = 16737095
|
|
185
|
+
COLOR_TURQUOISE = 4251856
|
|
186
|
+
COLOR_VIOLET = 15631086
|
|
187
|
+
COLOR_WHEAT = 16113331
|
|
188
|
+
COLOR_WHITE = 16777215
|
|
189
|
+
COLOR_WHITE_SMOKE = 16119285
|
|
190
|
+
COLOR_YELLOW = 16776960
|
|
191
|
+
COLOR_YELLOW_GREEN = 10145074
|
|
192
|
+
COLOR_BOX2_DRED = 14430514
|
|
193
|
+
COLOR_BOX2_DBLUE = 3190463
|
|
194
|
+
COLOR_BOX2_DGREEN = 9226532
|
|
195
|
+
COLOR_BOX2_DYELLOW = 16772748
|
|
196
|
+
end
|
|
197
|
+
class Version < FFI::Struct
|
|
198
|
+
layout(
|
|
199
|
+
:major, :int,
|
|
200
|
+
:minor, :int,
|
|
201
|
+
:revision, :int
|
|
202
|
+
)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
class Vec2 < FFI::Struct
|
|
206
|
+
layout(
|
|
207
|
+
:x, :float,
|
|
208
|
+
:y, :float
|
|
209
|
+
)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
class CosSin < FFI::Struct
|
|
213
|
+
layout(
|
|
214
|
+
:cosine, :float,
|
|
215
|
+
:sine, :float
|
|
216
|
+
)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
class Rot < FFI::Struct
|
|
220
|
+
layout(
|
|
221
|
+
:c, :float,
|
|
222
|
+
:s, :float
|
|
223
|
+
)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
class Transform < FFI::Struct
|
|
227
|
+
layout(
|
|
228
|
+
:p, Vec2.by_value,
|
|
229
|
+
:q, Rot.by_value
|
|
230
|
+
)
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
class Mat22 < FFI::Struct
|
|
234
|
+
layout(
|
|
235
|
+
:cx, Vec2.by_value,
|
|
236
|
+
:cy, Vec2.by_value
|
|
237
|
+
)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
class AABB < FFI::Struct
|
|
241
|
+
layout(
|
|
242
|
+
:lowerBound, Vec2.by_value,
|
|
243
|
+
:upperBound, Vec2.by_value
|
|
244
|
+
)
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
class Plane < FFI::Struct
|
|
248
|
+
layout(
|
|
249
|
+
:normal, Vec2.by_value,
|
|
250
|
+
:offset, :float
|
|
251
|
+
)
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
class RayCastInput < FFI::Struct
|
|
255
|
+
layout(
|
|
256
|
+
:origin, Vec2.by_value,
|
|
257
|
+
:translation, Vec2.by_value,
|
|
258
|
+
:maxFraction, :float
|
|
259
|
+
)
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
class ShapeProxy < FFI::Struct
|
|
263
|
+
layout(
|
|
264
|
+
:points, [Vec2.by_value, 8],
|
|
265
|
+
:count, :int,
|
|
266
|
+
:radius, :float
|
|
267
|
+
)
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
class ShapeCastInput < FFI::Struct
|
|
271
|
+
layout(
|
|
272
|
+
:proxy, ShapeProxy.by_value,
|
|
273
|
+
:translation, Vec2.by_value,
|
|
274
|
+
:maxFraction, :float,
|
|
275
|
+
:canEncroach, :bool
|
|
276
|
+
)
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
class CastOutput < FFI::Struct
|
|
280
|
+
layout(
|
|
281
|
+
:normal, Vec2.by_value,
|
|
282
|
+
:point, Vec2.by_value,
|
|
283
|
+
:fraction, :float,
|
|
284
|
+
:iterations, :int,
|
|
285
|
+
:hit, :bool
|
|
286
|
+
)
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
class MassData < FFI::Struct
|
|
290
|
+
layout(
|
|
291
|
+
:mass, :float,
|
|
292
|
+
:center, Vec2.by_value,
|
|
293
|
+
:rotationalInertia, :float
|
|
294
|
+
)
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
class Circle < FFI::Struct
|
|
298
|
+
layout(
|
|
299
|
+
:center, Vec2.by_value,
|
|
300
|
+
:radius, :float
|
|
301
|
+
)
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
class Capsule < FFI::Struct
|
|
305
|
+
layout(
|
|
306
|
+
:center1, Vec2.by_value,
|
|
307
|
+
:center2, Vec2.by_value,
|
|
308
|
+
:radius, :float
|
|
309
|
+
)
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
class Polygon < FFI::Struct
|
|
313
|
+
layout(
|
|
314
|
+
:vertices, [Vec2.by_value, 8],
|
|
315
|
+
:normals, [Vec2.by_value, 8],
|
|
316
|
+
:centroid, Vec2.by_value,
|
|
317
|
+
:radius, :float,
|
|
318
|
+
:count, :int
|
|
319
|
+
)
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
class Segment < FFI::Struct
|
|
323
|
+
layout(
|
|
324
|
+
:point1, Vec2.by_value,
|
|
325
|
+
:point2, Vec2.by_value
|
|
326
|
+
)
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
class ChainSegment < FFI::Struct
|
|
330
|
+
layout(
|
|
331
|
+
:ghost1, Vec2.by_value,
|
|
332
|
+
:segment, Segment.by_value,
|
|
333
|
+
:ghost2, Vec2.by_value,
|
|
334
|
+
:chainId, :int
|
|
335
|
+
)
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
class Hull < FFI::Struct
|
|
339
|
+
layout(
|
|
340
|
+
:points, [Vec2.by_value, 8],
|
|
341
|
+
:count, :int
|
|
342
|
+
)
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
class SegmentDistanceResult < FFI::Struct
|
|
346
|
+
layout(
|
|
347
|
+
:closest1, Vec2.by_value,
|
|
348
|
+
:closest2, Vec2.by_value,
|
|
349
|
+
:fraction1, :float,
|
|
350
|
+
:fraction2, :float,
|
|
351
|
+
:distanceSquared, :float
|
|
352
|
+
)
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
class SimplexCache < FFI::Struct
|
|
356
|
+
layout(
|
|
357
|
+
:count, :uint16,
|
|
358
|
+
:indexA, [:uint8, 3],
|
|
359
|
+
:indexB, [:uint8, 3]
|
|
360
|
+
)
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
class DistanceInput < FFI::Struct
|
|
364
|
+
layout(
|
|
365
|
+
:proxyA, ShapeProxy.by_value,
|
|
366
|
+
:proxyB, ShapeProxy.by_value,
|
|
367
|
+
:transformA, Transform.by_value,
|
|
368
|
+
:transformB, Transform.by_value,
|
|
369
|
+
:useRadii, :bool
|
|
370
|
+
)
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
class DistanceOutput < FFI::Struct
|
|
374
|
+
layout(
|
|
375
|
+
:pointA, Vec2.by_value,
|
|
376
|
+
:pointB, Vec2.by_value,
|
|
377
|
+
:normal, Vec2.by_value,
|
|
378
|
+
:distance, :float,
|
|
379
|
+
:iterations, :int,
|
|
380
|
+
:simplexCount, :int
|
|
381
|
+
)
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
class SimplexVertex < FFI::Struct
|
|
385
|
+
layout(
|
|
386
|
+
:wA, Vec2.by_value,
|
|
387
|
+
:wB, Vec2.by_value,
|
|
388
|
+
:w, Vec2.by_value,
|
|
389
|
+
:a, :float,
|
|
390
|
+
:indexA, :int,
|
|
391
|
+
:indexB, :int
|
|
392
|
+
)
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
class Simplex < FFI::Struct
|
|
396
|
+
layout(
|
|
397
|
+
:v1, SimplexVertex.by_value,
|
|
398
|
+
:v2, SimplexVertex.by_value,
|
|
399
|
+
:v3, SimplexVertex.by_value,
|
|
400
|
+
:count, :int
|
|
401
|
+
)
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
class ShapeCastPairInput < FFI::Struct
|
|
405
|
+
layout(
|
|
406
|
+
:proxyA, ShapeProxy.by_value,
|
|
407
|
+
:proxyB, ShapeProxy.by_value,
|
|
408
|
+
:transformA, Transform.by_value,
|
|
409
|
+
:transformB, Transform.by_value,
|
|
410
|
+
:translationB, Vec2.by_value,
|
|
411
|
+
:maxFraction, :float,
|
|
412
|
+
:canEncroach, :bool
|
|
413
|
+
)
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
class Sweep < FFI::Struct
|
|
417
|
+
layout(
|
|
418
|
+
:localCenter, Vec2.by_value,
|
|
419
|
+
:c1, Vec2.by_value,
|
|
420
|
+
:c2, Vec2.by_value,
|
|
421
|
+
:q1, Rot.by_value,
|
|
422
|
+
:q2, Rot.by_value
|
|
423
|
+
)
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
class TOIInput < FFI::Struct
|
|
427
|
+
layout(
|
|
428
|
+
:proxyA, ShapeProxy.by_value,
|
|
429
|
+
:proxyB, ShapeProxy.by_value,
|
|
430
|
+
:sweepA, Sweep.by_value,
|
|
431
|
+
:sweepB, Sweep.by_value,
|
|
432
|
+
:maxFraction, :float
|
|
433
|
+
)
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
class TOIOutput < FFI::Struct
|
|
437
|
+
layout(
|
|
438
|
+
:state, :int,
|
|
439
|
+
:fraction, :float
|
|
440
|
+
)
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
class ManifoldPoint < FFI::Struct
|
|
444
|
+
layout(
|
|
445
|
+
:point, Vec2.by_value,
|
|
446
|
+
:anchorA, Vec2.by_value,
|
|
447
|
+
:anchorB, Vec2.by_value,
|
|
448
|
+
:separation, :float,
|
|
449
|
+
:normalImpulse, :float,
|
|
450
|
+
:tangentImpulse, :float,
|
|
451
|
+
:totalNormalImpulse, :float,
|
|
452
|
+
:normalVelocity, :float,
|
|
453
|
+
:id, :uint16,
|
|
454
|
+
:persisted, :bool
|
|
455
|
+
)
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
class Manifold < FFI::Struct
|
|
459
|
+
layout(
|
|
460
|
+
:normal, Vec2.by_value,
|
|
461
|
+
:rollingImpulse, :float,
|
|
462
|
+
:points, [ManifoldPoint.by_value, 2],
|
|
463
|
+
:pointCount, :int
|
|
464
|
+
)
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
class DynamicTree < FFI::Struct
|
|
468
|
+
layout(
|
|
469
|
+
:nodes, :pointer,
|
|
470
|
+
:root, :int,
|
|
471
|
+
:nodeCount, :int,
|
|
472
|
+
:nodeCapacity, :int,
|
|
473
|
+
:freeList, :int,
|
|
474
|
+
:proxyCount, :int,
|
|
475
|
+
:leafIndices, :pointer,
|
|
476
|
+
:leafBoxes, :pointer,
|
|
477
|
+
:leafCenters, :pointer,
|
|
478
|
+
:binIndices, :pointer,
|
|
479
|
+
:rebuildCapacity, :int
|
|
480
|
+
)
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
class TreeStats < FFI::Struct
|
|
484
|
+
layout(
|
|
485
|
+
:nodeVisits, :int,
|
|
486
|
+
:leafVisits, :int
|
|
487
|
+
)
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
class PlaneResult < FFI::Struct
|
|
491
|
+
layout(
|
|
492
|
+
:plane, Plane.by_value,
|
|
493
|
+
:hit, :bool
|
|
494
|
+
)
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
class CollisionPlane < FFI::Struct
|
|
498
|
+
layout(
|
|
499
|
+
:plane, Plane.by_value,
|
|
500
|
+
:pushLimit, :float,
|
|
501
|
+
:push, :float,
|
|
502
|
+
:clipVelocity, :bool
|
|
503
|
+
)
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
class PlaneSolverResult < FFI::Struct
|
|
507
|
+
layout(
|
|
508
|
+
:position, Vec2.by_value,
|
|
509
|
+
:iterationCount, :int
|
|
510
|
+
)
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
class WorldId < FFI::Struct
|
|
514
|
+
layout(
|
|
515
|
+
:index1, :uint16,
|
|
516
|
+
:generation, :uint16
|
|
517
|
+
)
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
class BodyId < FFI::Struct
|
|
521
|
+
layout(
|
|
522
|
+
:index1, :int32,
|
|
523
|
+
:world0, :uint16,
|
|
524
|
+
:generation, :uint16
|
|
525
|
+
)
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
class ShapeId < FFI::Struct
|
|
529
|
+
layout(
|
|
530
|
+
:index1, :int32,
|
|
531
|
+
:world0, :uint16,
|
|
532
|
+
:generation, :uint16
|
|
533
|
+
)
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
class ChainId < FFI::Struct
|
|
537
|
+
layout(
|
|
538
|
+
:index1, :int32,
|
|
539
|
+
:world0, :uint16,
|
|
540
|
+
:generation, :uint16
|
|
541
|
+
)
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
class JointId < FFI::Struct
|
|
545
|
+
layout(
|
|
546
|
+
:index1, :int32,
|
|
547
|
+
:world0, :uint16,
|
|
548
|
+
:generation, :uint16
|
|
549
|
+
)
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
class RayResult < FFI::Struct
|
|
553
|
+
layout(
|
|
554
|
+
:shapeId, ShapeId.by_value,
|
|
555
|
+
:point, Vec2.by_value,
|
|
556
|
+
:normal, Vec2.by_value,
|
|
557
|
+
:fraction, :float,
|
|
558
|
+
:nodeVisits, :int,
|
|
559
|
+
:leafVisits, :int,
|
|
560
|
+
:hit, :bool
|
|
561
|
+
)
|
|
562
|
+
end
|
|
563
|
+
|
|
564
|
+
class WorldDef < FFI::Struct
|
|
565
|
+
layout(
|
|
566
|
+
:gravity, Vec2.by_value,
|
|
567
|
+
:restitutionThreshold, :float,
|
|
568
|
+
:hitEventThreshold, :float,
|
|
569
|
+
:contactHertz, :float,
|
|
570
|
+
:contactDampingRatio, :float,
|
|
571
|
+
:maxContactPushSpeed, :float,
|
|
572
|
+
:jointHertz, :float,
|
|
573
|
+
:jointDampingRatio, :float,
|
|
574
|
+
:maximumLinearSpeed, :float,
|
|
575
|
+
:frictionCallback, :pointer,
|
|
576
|
+
:restitutionCallback, :pointer,
|
|
577
|
+
:enableSleep, :bool,
|
|
578
|
+
:enableContinuous, :bool,
|
|
579
|
+
:workerCount, :int,
|
|
580
|
+
:enqueueTask, :pointer,
|
|
581
|
+
:finishTask, :pointer,
|
|
582
|
+
:userTaskContext, :pointer,
|
|
583
|
+
:userData, :pointer,
|
|
584
|
+
:internalValue, :int
|
|
585
|
+
)
|
|
586
|
+
end
|
|
587
|
+
|
|
588
|
+
class BodyDef < FFI::Struct
|
|
589
|
+
layout(
|
|
590
|
+
:type, :int,
|
|
591
|
+
:position, Vec2.by_value,
|
|
592
|
+
:rotation, Rot.by_value,
|
|
593
|
+
:linearVelocity, Vec2.by_value,
|
|
594
|
+
:angularVelocity, :float,
|
|
595
|
+
:linearDamping, :float,
|
|
596
|
+
:angularDamping, :float,
|
|
597
|
+
:gravityScale, :float,
|
|
598
|
+
:sleepThreshold, :float,
|
|
599
|
+
:name, :pointer,
|
|
600
|
+
:userData, :pointer,
|
|
601
|
+
:enableSleep, :bool,
|
|
602
|
+
:isAwake, :bool,
|
|
603
|
+
:fixedRotation, :bool,
|
|
604
|
+
:isBullet, :bool,
|
|
605
|
+
:isEnabled, :bool,
|
|
606
|
+
:allowFastRotation, :bool,
|
|
607
|
+
:internalValue, :int
|
|
608
|
+
)
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
class Filter < FFI::Struct
|
|
612
|
+
layout(
|
|
613
|
+
:categoryBits, :uint64,
|
|
614
|
+
:maskBits, :uint64,
|
|
615
|
+
:groupIndex, :int
|
|
616
|
+
)
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
class QueryFilter < FFI::Struct
|
|
620
|
+
layout(
|
|
621
|
+
:categoryBits, :uint64,
|
|
622
|
+
:maskBits, :uint64
|
|
623
|
+
)
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
class SurfaceMaterial < FFI::Struct
|
|
627
|
+
layout(
|
|
628
|
+
:friction, :float,
|
|
629
|
+
:restitution, :float,
|
|
630
|
+
:rollingResistance, :float,
|
|
631
|
+
:tangentSpeed, :float,
|
|
632
|
+
:userMaterialId, :int,
|
|
633
|
+
:customColor, :uint32
|
|
634
|
+
)
|
|
635
|
+
end
|
|
636
|
+
|
|
637
|
+
class ShapeDef < FFI::Struct
|
|
638
|
+
layout(
|
|
639
|
+
:userData, :pointer,
|
|
640
|
+
:material, SurfaceMaterial.by_value,
|
|
641
|
+
:density, :float,
|
|
642
|
+
:filter, Filter.by_value,
|
|
643
|
+
:isSensor, :bool,
|
|
644
|
+
:enableSensorEvents, :bool,
|
|
645
|
+
:enableContactEvents, :bool,
|
|
646
|
+
:enableHitEvents, :bool,
|
|
647
|
+
:enablePreSolveEvents, :bool,
|
|
648
|
+
:invokeContactCreation, :bool,
|
|
649
|
+
:updateBodyMass, :bool,
|
|
650
|
+
:internalValue, :int
|
|
651
|
+
)
|
|
652
|
+
end
|
|
653
|
+
|
|
654
|
+
class ChainDef < FFI::Struct
|
|
655
|
+
layout(
|
|
656
|
+
:userData, :pointer,
|
|
657
|
+
:points, :pointer,
|
|
658
|
+
:count, :int,
|
|
659
|
+
:materials, :pointer,
|
|
660
|
+
:materialCount, :int,
|
|
661
|
+
:filter, Filter.by_value,
|
|
662
|
+
:isLoop, :bool,
|
|
663
|
+
:enableSensorEvents, :bool,
|
|
664
|
+
:internalValue, :int
|
|
665
|
+
)
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
class Profile < FFI::Struct
|
|
669
|
+
layout(
|
|
670
|
+
:step, :float,
|
|
671
|
+
:pairs, :float,
|
|
672
|
+
:collide, :float,
|
|
673
|
+
:solve, :float,
|
|
674
|
+
:mergeIslands, :float,
|
|
675
|
+
:prepareStages, :float,
|
|
676
|
+
:solveConstraints, :float,
|
|
677
|
+
:prepareConstraints, :float,
|
|
678
|
+
:integrateVelocities, :float,
|
|
679
|
+
:warmStart, :float,
|
|
680
|
+
:solveImpulses, :float,
|
|
681
|
+
:integratePositions, :float,
|
|
682
|
+
:relaxImpulses, :float,
|
|
683
|
+
:applyRestitution, :float,
|
|
684
|
+
:storeImpulses, :float,
|
|
685
|
+
:splitIslands, :float,
|
|
686
|
+
:transforms, :float,
|
|
687
|
+
:hitEvents, :float,
|
|
688
|
+
:refit, :float,
|
|
689
|
+
:bullets, :float,
|
|
690
|
+
:sleepIslands, :float,
|
|
691
|
+
:sensors, :float
|
|
692
|
+
)
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
class Counters < FFI::Struct
|
|
696
|
+
layout(
|
|
697
|
+
:bodyCount, :int,
|
|
698
|
+
:shapeCount, :int,
|
|
699
|
+
:contactCount, :int,
|
|
700
|
+
:jointCount, :int,
|
|
701
|
+
:islandCount, :int,
|
|
702
|
+
:stackUsed, :int,
|
|
703
|
+
:staticTreeHeight, :int,
|
|
704
|
+
:treeHeight, :int,
|
|
705
|
+
:byteCount, :int,
|
|
706
|
+
:taskCount, :int,
|
|
707
|
+
:colorCounts, [:int, 12]
|
|
708
|
+
)
|
|
709
|
+
end
|
|
710
|
+
|
|
711
|
+
class DistanceJointDef < FFI::Struct
|
|
712
|
+
layout(
|
|
713
|
+
:bodyIdA, BodyId.by_value,
|
|
714
|
+
:bodyIdB, BodyId.by_value,
|
|
715
|
+
:localAnchorA, Vec2.by_value,
|
|
716
|
+
:localAnchorB, Vec2.by_value,
|
|
717
|
+
:length, :float,
|
|
718
|
+
:enableSpring, :bool,
|
|
719
|
+
:hertz, :float,
|
|
720
|
+
:dampingRatio, :float,
|
|
721
|
+
:enableLimit, :bool,
|
|
722
|
+
:minLength, :float,
|
|
723
|
+
:maxLength, :float,
|
|
724
|
+
:enableMotor, :bool,
|
|
725
|
+
:maxMotorForce, :float,
|
|
726
|
+
:motorSpeed, :float,
|
|
727
|
+
:collideConnected, :bool,
|
|
728
|
+
:userData, :pointer,
|
|
729
|
+
:internalValue, :int
|
|
730
|
+
)
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
class MotorJointDef < FFI::Struct
|
|
734
|
+
layout(
|
|
735
|
+
:bodyIdA, BodyId.by_value,
|
|
736
|
+
:bodyIdB, BodyId.by_value,
|
|
737
|
+
:linearOffset, Vec2.by_value,
|
|
738
|
+
:angularOffset, :float,
|
|
739
|
+
:maxForce, :float,
|
|
740
|
+
:maxTorque, :float,
|
|
741
|
+
:correctionFactor, :float,
|
|
742
|
+
:collideConnected, :bool,
|
|
743
|
+
:userData, :pointer,
|
|
744
|
+
:internalValue, :int
|
|
745
|
+
)
|
|
746
|
+
end
|
|
747
|
+
|
|
748
|
+
class MouseJointDef < FFI::Struct
|
|
749
|
+
layout(
|
|
750
|
+
:bodyIdA, BodyId.by_value,
|
|
751
|
+
:bodyIdB, BodyId.by_value,
|
|
752
|
+
:target, Vec2.by_value,
|
|
753
|
+
:hertz, :float,
|
|
754
|
+
:dampingRatio, :float,
|
|
755
|
+
:maxForce, :float,
|
|
756
|
+
:collideConnected, :bool,
|
|
757
|
+
:userData, :pointer,
|
|
758
|
+
:internalValue, :int
|
|
759
|
+
)
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
class FilterJointDef < FFI::Struct
|
|
763
|
+
layout(
|
|
764
|
+
:bodyIdA, BodyId.by_value,
|
|
765
|
+
:bodyIdB, BodyId.by_value,
|
|
766
|
+
:userData, :pointer,
|
|
767
|
+
:internalValue, :int
|
|
768
|
+
)
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
class PrismaticJointDef < FFI::Struct
|
|
772
|
+
layout(
|
|
773
|
+
:bodyIdA, BodyId.by_value,
|
|
774
|
+
:bodyIdB, BodyId.by_value,
|
|
775
|
+
:localAnchorA, Vec2.by_value,
|
|
776
|
+
:localAnchorB, Vec2.by_value,
|
|
777
|
+
:localAxisA, Vec2.by_value,
|
|
778
|
+
:referenceAngle, :float,
|
|
779
|
+
:enableSpring, :bool,
|
|
780
|
+
:hertz, :float,
|
|
781
|
+
:dampingRatio, :float,
|
|
782
|
+
:enableLimit, :bool,
|
|
783
|
+
:lowerTranslation, :float,
|
|
784
|
+
:upperTranslation, :float,
|
|
785
|
+
:enableMotor, :bool,
|
|
786
|
+
:maxMotorForce, :float,
|
|
787
|
+
:motorSpeed, :float,
|
|
788
|
+
:collideConnected, :bool,
|
|
789
|
+
:userData, :pointer,
|
|
790
|
+
:internalValue, :int
|
|
791
|
+
)
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
class RevoluteJointDef < FFI::Struct
|
|
795
|
+
layout(
|
|
796
|
+
:bodyIdA, BodyId.by_value,
|
|
797
|
+
:bodyIdB, BodyId.by_value,
|
|
798
|
+
:localAnchorA, Vec2.by_value,
|
|
799
|
+
:localAnchorB, Vec2.by_value,
|
|
800
|
+
:referenceAngle, :float,
|
|
801
|
+
:enableSpring, :bool,
|
|
802
|
+
:hertz, :float,
|
|
803
|
+
:dampingRatio, :float,
|
|
804
|
+
:enableLimit, :bool,
|
|
805
|
+
:lowerAngle, :float,
|
|
806
|
+
:upperAngle, :float,
|
|
807
|
+
:enableMotor, :bool,
|
|
808
|
+
:maxMotorTorque, :float,
|
|
809
|
+
:motorSpeed, :float,
|
|
810
|
+
:drawSize, :float,
|
|
811
|
+
:collideConnected, :bool,
|
|
812
|
+
:userData, :pointer,
|
|
813
|
+
:internalValue, :int
|
|
814
|
+
)
|
|
815
|
+
end
|
|
816
|
+
|
|
817
|
+
class WeldJointDef < FFI::Struct
|
|
818
|
+
layout(
|
|
819
|
+
:bodyIdA, BodyId.by_value,
|
|
820
|
+
:bodyIdB, BodyId.by_value,
|
|
821
|
+
:localAnchorA, Vec2.by_value,
|
|
822
|
+
:localAnchorB, Vec2.by_value,
|
|
823
|
+
:referenceAngle, :float,
|
|
824
|
+
:linearHertz, :float,
|
|
825
|
+
:angularHertz, :float,
|
|
826
|
+
:linearDampingRatio, :float,
|
|
827
|
+
:angularDampingRatio, :float,
|
|
828
|
+
:collideConnected, :bool,
|
|
829
|
+
:userData, :pointer,
|
|
830
|
+
:internalValue, :int
|
|
831
|
+
)
|
|
832
|
+
end
|
|
833
|
+
|
|
834
|
+
class WheelJointDef < FFI::Struct
|
|
835
|
+
layout(
|
|
836
|
+
:bodyIdA, BodyId.by_value,
|
|
837
|
+
:bodyIdB, BodyId.by_value,
|
|
838
|
+
:localAnchorA, Vec2.by_value,
|
|
839
|
+
:localAnchorB, Vec2.by_value,
|
|
840
|
+
:localAxisA, Vec2.by_value,
|
|
841
|
+
:enableSpring, :bool,
|
|
842
|
+
:hertz, :float,
|
|
843
|
+
:dampingRatio, :float,
|
|
844
|
+
:enableLimit, :bool,
|
|
845
|
+
:lowerTranslation, :float,
|
|
846
|
+
:upperTranslation, :float,
|
|
847
|
+
:enableMotor, :bool,
|
|
848
|
+
:maxMotorTorque, :float,
|
|
849
|
+
:motorSpeed, :float,
|
|
850
|
+
:collideConnected, :bool,
|
|
851
|
+
:userData, :pointer,
|
|
852
|
+
:internalValue, :int
|
|
853
|
+
)
|
|
854
|
+
end
|
|
855
|
+
|
|
856
|
+
class ExplosionDef < FFI::Struct
|
|
857
|
+
layout(
|
|
858
|
+
:maskBits, :uint64,
|
|
859
|
+
:position, Vec2.by_value,
|
|
860
|
+
:radius, :float,
|
|
861
|
+
:falloff, :float,
|
|
862
|
+
:impulsePerLength, :float
|
|
863
|
+
)
|
|
864
|
+
end
|
|
865
|
+
|
|
866
|
+
class SensorBeginTouchEvent < FFI::Struct
|
|
867
|
+
layout(
|
|
868
|
+
:sensorShapeId, ShapeId.by_value,
|
|
869
|
+
:visitorShapeId, ShapeId.by_value
|
|
870
|
+
)
|
|
871
|
+
end
|
|
872
|
+
|
|
873
|
+
class SensorEndTouchEvent < FFI::Struct
|
|
874
|
+
layout(
|
|
875
|
+
:sensorShapeId, ShapeId.by_value,
|
|
876
|
+
:visitorShapeId, ShapeId.by_value
|
|
877
|
+
)
|
|
878
|
+
end
|
|
879
|
+
|
|
880
|
+
class SensorEvents < FFI::Struct
|
|
881
|
+
layout(
|
|
882
|
+
:beginEvents, :pointer,
|
|
883
|
+
:endEvents, :pointer,
|
|
884
|
+
:beginCount, :int,
|
|
885
|
+
:endCount, :int
|
|
886
|
+
)
|
|
887
|
+
end
|
|
888
|
+
|
|
889
|
+
class ContactBeginTouchEvent < FFI::Struct
|
|
890
|
+
layout(
|
|
891
|
+
:shapeIdA, ShapeId.by_value,
|
|
892
|
+
:shapeIdB, ShapeId.by_value,
|
|
893
|
+
:manifold, Manifold.by_value
|
|
894
|
+
)
|
|
895
|
+
end
|
|
896
|
+
|
|
897
|
+
class ContactEndTouchEvent < FFI::Struct
|
|
898
|
+
layout(
|
|
899
|
+
:shapeIdA, ShapeId.by_value,
|
|
900
|
+
:shapeIdB, ShapeId.by_value
|
|
901
|
+
)
|
|
902
|
+
end
|
|
903
|
+
|
|
904
|
+
class ContactHitEvent < FFI::Struct
|
|
905
|
+
layout(
|
|
906
|
+
:shapeIdA, ShapeId.by_value,
|
|
907
|
+
:shapeIdB, ShapeId.by_value,
|
|
908
|
+
:point, Vec2.by_value,
|
|
909
|
+
:normal, Vec2.by_value,
|
|
910
|
+
:approachSpeed, :float
|
|
911
|
+
)
|
|
912
|
+
end
|
|
913
|
+
|
|
914
|
+
class ContactEvents < FFI::Struct
|
|
915
|
+
layout(
|
|
916
|
+
:beginEvents, :pointer,
|
|
917
|
+
:endEvents, :pointer,
|
|
918
|
+
:hitEvents, :pointer,
|
|
919
|
+
:beginCount, :int,
|
|
920
|
+
:endCount, :int,
|
|
921
|
+
:hitCount, :int
|
|
922
|
+
)
|
|
923
|
+
end
|
|
924
|
+
|
|
925
|
+
class BodyMoveEvent < FFI::Struct
|
|
926
|
+
layout(
|
|
927
|
+
:transform, Transform.by_value,
|
|
928
|
+
:bodyId, BodyId.by_value,
|
|
929
|
+
:userData, :pointer,
|
|
930
|
+
:fellAsleep, :bool
|
|
931
|
+
)
|
|
932
|
+
end
|
|
933
|
+
|
|
934
|
+
class BodyEvents < FFI::Struct
|
|
935
|
+
layout(
|
|
936
|
+
:moveEvents, :pointer,
|
|
937
|
+
:moveCount, :int
|
|
938
|
+
)
|
|
939
|
+
end
|
|
940
|
+
|
|
941
|
+
class ContactData < FFI::Struct
|
|
942
|
+
layout(
|
|
943
|
+
:shapeIdA, ShapeId.by_value,
|
|
944
|
+
:shapeIdB, ShapeId.by_value,
|
|
945
|
+
:manifold, Manifold.by_value
|
|
946
|
+
)
|
|
947
|
+
end
|
|
948
|
+
|
|
949
|
+
class DebugDraw < FFI::Struct
|
|
950
|
+
layout(
|
|
951
|
+
:DrawPolygonFcn, :pointer,
|
|
952
|
+
:DrawSolidPolygonFcn, :pointer,
|
|
953
|
+
:DrawCircleFcn, :pointer,
|
|
954
|
+
:DrawSolidCircleFcn, :pointer,
|
|
955
|
+
:DrawSolidCapsuleFcn, :pointer,
|
|
956
|
+
:DrawSegmentFcn, :pointer,
|
|
957
|
+
:DrawTransformFcn, :pointer,
|
|
958
|
+
:DrawPointFcn, :pointer,
|
|
959
|
+
:DrawStringFcn, :pointer,
|
|
960
|
+
:drawingBounds, AABB.by_value,
|
|
961
|
+
:useDrawingBounds, :bool,
|
|
962
|
+
:drawShapes, :bool,
|
|
963
|
+
:drawJoints, :bool,
|
|
964
|
+
:drawJointExtras, :bool,
|
|
965
|
+
:drawBounds, :bool,
|
|
966
|
+
:drawMass, :bool,
|
|
967
|
+
:drawBodyNames, :bool,
|
|
968
|
+
:drawContacts, :bool,
|
|
969
|
+
:drawGraphColors, :bool,
|
|
970
|
+
:drawContactNormals, :bool,
|
|
971
|
+
:drawContactImpulses, :bool,
|
|
972
|
+
:drawContactFeatures, :bool,
|
|
973
|
+
:drawFrictionImpulses, :bool,
|
|
974
|
+
:drawIslands, :bool,
|
|
975
|
+
:context, :pointer
|
|
976
|
+
)
|
|
977
|
+
end
|
|
978
|
+
ABI_LAYOUTS = {
|
|
979
|
+
"Version" => {size: 12, alignment: 4, offsets: {major: 0, minor: 4, revision: 8}},
|
|
980
|
+
"Vec2" => {size: 8, alignment: 4, offsets: {x: 0, y: 4}},
|
|
981
|
+
"CosSin" => {size: 8, alignment: 4, offsets: {cosine: 0, sine: 4}},
|
|
982
|
+
"Rot" => {size: 8, alignment: 4, offsets: {c: 0, s: 4}},
|
|
983
|
+
"Transform" => {size: 16, alignment: 4, offsets: {p: 0, q: 8}},
|
|
984
|
+
"Mat22" => {size: 16, alignment: 4, offsets: {cx: 0, cy: 8}},
|
|
985
|
+
"AABB" => {size: 16, alignment: 4, offsets: {lowerBound: 0, upperBound: 8}},
|
|
986
|
+
"Plane" => {size: 12, alignment: 4, offsets: {normal: 0, offset: 8}},
|
|
987
|
+
"RayCastInput" => {size: 20, alignment: 4, offsets: {origin: 0, translation: 8, maxFraction: 16}},
|
|
988
|
+
"ShapeProxy" => {size: 72, alignment: 4, offsets: {points: 0, count: 64, radius: 68}},
|
|
989
|
+
"ShapeCastInput" => {size: 88, alignment: 4, offsets: {proxy: 0, translation: 72, maxFraction: 80, canEncroach: 84}},
|
|
990
|
+
"CastOutput" => {size: 28, alignment: 4, offsets: {normal: 0, point: 8, fraction: 16, iterations: 20, hit: 24}},
|
|
991
|
+
"MassData" => {size: 16, alignment: 4, offsets: {mass: 0, center: 4, rotationalInertia: 12}},
|
|
992
|
+
"Circle" => {size: 12, alignment: 4, offsets: {center: 0, radius: 8}},
|
|
993
|
+
"Capsule" => {size: 20, alignment: 4, offsets: {center1: 0, center2: 8, radius: 16}},
|
|
994
|
+
"Polygon" => {size: 144, alignment: 4, offsets: {vertices: 0, normals: 64, centroid: 128, radius: 136, count: 140}},
|
|
995
|
+
"Segment" => {size: 16, alignment: 4, offsets: {point1: 0, point2: 8}},
|
|
996
|
+
"ChainSegment" => {size: 36, alignment: 4, offsets: {ghost1: 0, segment: 8, ghost2: 24, chainId: 32}},
|
|
997
|
+
"Hull" => {size: 68, alignment: 4, offsets: {points: 0, count: 64}},
|
|
998
|
+
"SegmentDistanceResult" => {size: 28, alignment: 4, offsets: {closest1: 0, closest2: 8, fraction1: 16, fraction2: 20, distanceSquared: 24}},
|
|
999
|
+
"SimplexCache" => {size: 8, alignment: 2, offsets: {count: 0, indexA: 2, indexB: 5}},
|
|
1000
|
+
"DistanceInput" => {size: 180, alignment: 4, offsets: {proxyA: 0, proxyB: 72, transformA: 144, transformB: 160, useRadii: 176}},
|
|
1001
|
+
"DistanceOutput" => {size: 36, alignment: 4, offsets: {pointA: 0, pointB: 8, normal: 16, distance: 24, iterations: 28, simplexCount: 32}},
|
|
1002
|
+
"SimplexVertex" => {size: 36, alignment: 4, offsets: {wA: 0, wB: 8, w: 16, a: 24, indexA: 28, indexB: 32}},
|
|
1003
|
+
"Simplex" => {size: 112, alignment: 4, offsets: {v1: 0, v2: 36, v3: 72, count: 108}},
|
|
1004
|
+
"ShapeCastPairInput" => {size: 192, alignment: 4, offsets: {proxyA: 0, proxyB: 72, transformA: 144, transformB: 160, translationB: 176, maxFraction: 184, canEncroach: 188}},
|
|
1005
|
+
"Sweep" => {size: 40, alignment: 4, offsets: {localCenter: 0, c1: 8, c2: 16, q1: 24, q2: 32}},
|
|
1006
|
+
"TOIInput" => {size: 228, alignment: 4, offsets: {proxyA: 0, proxyB: 72, sweepA: 144, sweepB: 184, maxFraction: 224}},
|
|
1007
|
+
"TOIOutput" => {size: 8, alignment: 4, offsets: {state: 0, fraction: 4}},
|
|
1008
|
+
"ManifoldPoint" => {size: 48, alignment: 4, offsets: {point: 0, anchorA: 8, anchorB: 16, separation: 24, normalImpulse: 28, tangentImpulse: 32, totalNormalImpulse: 36, normalVelocity: 40, id: 44, persisted: 46}},
|
|
1009
|
+
"Manifold" => {size: 112, alignment: 4, offsets: {normal: 0, rollingImpulse: 8, points: 12, pointCount: 108}},
|
|
1010
|
+
"DynamicTree" => {size: 72, alignment: 8, offsets: {nodes: 0, root: 8, nodeCount: 12, nodeCapacity: 16, freeList: 20, proxyCount: 24, leafIndices: 32, leafBoxes: 40, leafCenters: 48, binIndices: 56, rebuildCapacity: 64}},
|
|
1011
|
+
"TreeStats" => {size: 8, alignment: 4, offsets: {nodeVisits: 0, leafVisits: 4}},
|
|
1012
|
+
"PlaneResult" => {size: 16, alignment: 4, offsets: {plane: 0, hit: 12}},
|
|
1013
|
+
"CollisionPlane" => {size: 24, alignment: 4, offsets: {plane: 0, pushLimit: 12, push: 16, clipVelocity: 20}},
|
|
1014
|
+
"PlaneSolverResult" => {size: 12, alignment: 4, offsets: {position: 0, iterationCount: 8}},
|
|
1015
|
+
"WorldId" => {size: 4, alignment: 2, offsets: {index1: 0, generation: 2}},
|
|
1016
|
+
"BodyId" => {size: 8, alignment: 4, offsets: {index1: 0, world0: 4, generation: 6}},
|
|
1017
|
+
"ShapeId" => {size: 8, alignment: 4, offsets: {index1: 0, world0: 4, generation: 6}},
|
|
1018
|
+
"ChainId" => {size: 8, alignment: 4, offsets: {index1: 0, world0: 4, generation: 6}},
|
|
1019
|
+
"JointId" => {size: 8, alignment: 4, offsets: {index1: 0, world0: 4, generation: 6}},
|
|
1020
|
+
"RayResult" => {size: 40, alignment: 4, offsets: {shapeId: 0, point: 8, normal: 16, fraction: 24, nodeVisits: 28, leafVisits: 32, hit: 36}},
|
|
1021
|
+
"WorldDef" => {size: 104, alignment: 8, offsets: {gravity: 0, restitutionThreshold: 8, hitEventThreshold: 12, contactHertz: 16, contactDampingRatio: 20, maxContactPushSpeed: 24, jointHertz: 28, jointDampingRatio: 32, maximumLinearSpeed: 36, frictionCallback: 40, restitutionCallback: 48, enableSleep: 56, enableContinuous: 57, workerCount: 60, enqueueTask: 64, finishTask: 72, userTaskContext: 80, userData: 88, internalValue: 96}},
|
|
1022
|
+
"BodyDef" => {size: 80, alignment: 8, offsets: {type: 0, position: 4, rotation: 12, linearVelocity: 20, angularVelocity: 28, linearDamping: 32, angularDamping: 36, gravityScale: 40, sleepThreshold: 44, name: 48, userData: 56, enableSleep: 64, isAwake: 65, fixedRotation: 66, isBullet: 67, isEnabled: 68, allowFastRotation: 69, internalValue: 72}},
|
|
1023
|
+
"Filter" => {size: 24, alignment: 8, offsets: {categoryBits: 0, maskBits: 8, groupIndex: 16}},
|
|
1024
|
+
"QueryFilter" => {size: 16, alignment: 8, offsets: {categoryBits: 0, maskBits: 8}},
|
|
1025
|
+
"SurfaceMaterial" => {size: 24, alignment: 4, offsets: {friction: 0, restitution: 4, rollingResistance: 8, tangentSpeed: 12, userMaterialId: 16, customColor: 20}},
|
|
1026
|
+
"ShapeDef" => {size: 80, alignment: 8, offsets: {userData: 0, material: 8, density: 32, filter: 40, isSensor: 64, enableSensorEvents: 65, enableContactEvents: 66, enableHitEvents: 67, enablePreSolveEvents: 68, invokeContactCreation: 69, updateBodyMass: 70, internalValue: 72}},
|
|
1027
|
+
"ChainDef" => {size: 72, alignment: 8, offsets: {userData: 0, points: 8, count: 16, materials: 24, materialCount: 32, filter: 40, isLoop: 64, enableSensorEvents: 65, internalValue: 68}},
|
|
1028
|
+
"Profile" => {size: 88, alignment: 4, offsets: {step: 0, pairs: 4, collide: 8, solve: 12, mergeIslands: 16, prepareStages: 20, solveConstraints: 24, prepareConstraints: 28, integrateVelocities: 32, warmStart: 36, solveImpulses: 40, integratePositions: 44, relaxImpulses: 48, applyRestitution: 52, storeImpulses: 56, splitIslands: 60, transforms: 64, hitEvents: 68, refit: 72, bullets: 76, sleepIslands: 80, sensors: 84}},
|
|
1029
|
+
"Counters" => {size: 88, alignment: 4, offsets: {bodyCount: 0, shapeCount: 4, contactCount: 8, jointCount: 12, islandCount: 16, stackUsed: 20, staticTreeHeight: 24, treeHeight: 28, byteCount: 32, taskCount: 36, colorCounts: 40}},
|
|
1030
|
+
"DistanceJointDef" => {size: 96, alignment: 8, offsets: {bodyIdA: 0, bodyIdB: 8, localAnchorA: 16, localAnchorB: 24, length: 32, enableSpring: 36, hertz: 40, dampingRatio: 44, enableLimit: 48, minLength: 52, maxLength: 56, enableMotor: 60, maxMotorForce: 64, motorSpeed: 68, collideConnected: 72, userData: 80, internalValue: 88}},
|
|
1031
|
+
"MotorJointDef" => {size: 64, alignment: 8, offsets: {bodyIdA: 0, bodyIdB: 8, linearOffset: 16, angularOffset: 24, maxForce: 28, maxTorque: 32, correctionFactor: 36, collideConnected: 40, userData: 48, internalValue: 56}},
|
|
1032
|
+
"MouseJointDef" => {size: 56, alignment: 8, offsets: {bodyIdA: 0, bodyIdB: 8, target: 16, hertz: 24, dampingRatio: 28, maxForce: 32, collideConnected: 36, userData: 40, internalValue: 48}},
|
|
1033
|
+
"FilterJointDef" => {size: 32, alignment: 8, offsets: {bodyIdA: 0, bodyIdB: 8, userData: 16, internalValue: 24}},
|
|
1034
|
+
"PrismaticJointDef" => {size: 104, alignment: 8, offsets: {bodyIdA: 0, bodyIdB: 8, localAnchorA: 16, localAnchorB: 24, localAxisA: 32, referenceAngle: 40, enableSpring: 44, hertz: 48, dampingRatio: 52, enableLimit: 56, lowerTranslation: 60, upperTranslation: 64, enableMotor: 68, maxMotorForce: 72, motorSpeed: 76, collideConnected: 80, userData: 88, internalValue: 96}},
|
|
1035
|
+
"RevoluteJointDef" => {size: 96, alignment: 8, offsets: {bodyIdA: 0, bodyIdB: 8, localAnchorA: 16, localAnchorB: 24, referenceAngle: 32, enableSpring: 36, hertz: 40, dampingRatio: 44, enableLimit: 48, lowerAngle: 52, upperAngle: 56, enableMotor: 60, maxMotorTorque: 64, motorSpeed: 68, drawSize: 72, collideConnected: 76, userData: 80, internalValue: 88}},
|
|
1036
|
+
"WeldJointDef" => {size: 72, alignment: 8, offsets: {bodyIdA: 0, bodyIdB: 8, localAnchorA: 16, localAnchorB: 24, referenceAngle: 32, linearHertz: 36, angularHertz: 40, linearDampingRatio: 44, angularDampingRatio: 48, collideConnected: 52, userData: 56, internalValue: 64}},
|
|
1037
|
+
"WheelJointDef" => {size: 96, alignment: 8, offsets: {bodyIdA: 0, bodyIdB: 8, localAnchorA: 16, localAnchorB: 24, localAxisA: 32, enableSpring: 40, hertz: 44, dampingRatio: 48, enableLimit: 52, lowerTranslation: 56, upperTranslation: 60, enableMotor: 64, maxMotorTorque: 68, motorSpeed: 72, collideConnected: 76, userData: 80, internalValue: 88}},
|
|
1038
|
+
"ExplosionDef" => {size: 32, alignment: 8, offsets: {maskBits: 0, position: 8, radius: 16, falloff: 20, impulsePerLength: 24}},
|
|
1039
|
+
"SensorBeginTouchEvent" => {size: 16, alignment: 4, offsets: {sensorShapeId: 0, visitorShapeId: 8}},
|
|
1040
|
+
"SensorEndTouchEvent" => {size: 16, alignment: 4, offsets: {sensorShapeId: 0, visitorShapeId: 8}},
|
|
1041
|
+
"SensorEvents" => {size: 24, alignment: 8, offsets: {beginEvents: 0, endEvents: 8, beginCount: 16, endCount: 20}},
|
|
1042
|
+
"ContactBeginTouchEvent" => {size: 128, alignment: 4, offsets: {shapeIdA: 0, shapeIdB: 8, manifold: 16}},
|
|
1043
|
+
"ContactEndTouchEvent" => {size: 16, alignment: 4, offsets: {shapeIdA: 0, shapeIdB: 8}},
|
|
1044
|
+
"ContactHitEvent" => {size: 36, alignment: 4, offsets: {shapeIdA: 0, shapeIdB: 8, point: 16, normal: 24, approachSpeed: 32}},
|
|
1045
|
+
"ContactEvents" => {size: 40, alignment: 8, offsets: {beginEvents: 0, endEvents: 8, hitEvents: 16, beginCount: 24, endCount: 28, hitCount: 32}},
|
|
1046
|
+
"BodyMoveEvent" => {size: 40, alignment: 8, offsets: {transform: 0, bodyId: 16, userData: 24, fellAsleep: 32}},
|
|
1047
|
+
"BodyEvents" => {size: 16, alignment: 8, offsets: {moveEvents: 0, moveCount: 8}},
|
|
1048
|
+
"ContactData" => {size: 128, alignment: 4, offsets: {shapeIdA: 0, shapeIdB: 8, manifold: 16}},
|
|
1049
|
+
"DebugDraw" => {size: 112, alignment: 8, offsets: {DrawPolygonFcn: 0, DrawSolidPolygonFcn: 8, DrawCircleFcn: 16, DrawSolidCircleFcn: 24, DrawSolidCapsuleFcn: 32, DrawSegmentFcn: 40, DrawTransformFcn: 48, DrawPointFcn: 56, DrawStringFcn: 64, drawingBounds: 72, useDrawingBounds: 88, drawShapes: 89, drawJoints: 90, drawJointExtras: 91, drawBounds: 92, drawMass: 93, drawBodyNames: 94, drawContacts: 95, drawGraphColors: 96, drawContactNormals: 97, drawContactImpulses: 98, drawContactFeatures: 99, drawFrictionImpulses: 100, drawIslands: 101, context: 104}}
|
|
1050
|
+
}.freeze
|
|
1051
|
+
|
|
1052
|
+
attach_function :b2SetAllocator, [:pointer, :pointer], :void
|
|
1053
|
+
attach_function :b2GetByteCount, [], :int
|
|
1054
|
+
attach_function :b2SetAssertFcn, [:pointer], :void
|
|
1055
|
+
attach_function :b2GetVersion, [], Version.by_value
|
|
1056
|
+
attach_function :b2InternalAssertFcn, [:pointer, :pointer, :int], :int
|
|
1057
|
+
attach_function :b2GetTicks, [], :uint64
|
|
1058
|
+
attach_function :b2GetMilliseconds, [:uint64], :float
|
|
1059
|
+
attach_function :b2GetMillisecondsAndReset, [:pointer], :float
|
|
1060
|
+
attach_function :b2Yield, [], :void
|
|
1061
|
+
attach_function :b2Hash, [:uint32, :pointer, :int], :uint32
|
|
1062
|
+
attach_function :b2Atan2, [:float, :float], :float
|
|
1063
|
+
attach_function :b2ComputeCosSin, [:float], CosSin.by_value
|
|
1064
|
+
attach_function :b2ComputeRotationBetweenUnitVectors, [Vec2.by_value, Vec2.by_value], Rot.by_value
|
|
1065
|
+
attach_function :b2IsValidFloat, [:float], :bool
|
|
1066
|
+
attach_function :b2IsValidVec2, [Vec2.by_value], :bool
|
|
1067
|
+
attach_function :b2IsValidRotation, [Rot.by_value], :bool
|
|
1068
|
+
attach_function :b2IsValidAABB, [AABB.by_value], :bool
|
|
1069
|
+
attach_function :b2IsValidPlane, [Plane.by_value], :bool
|
|
1070
|
+
attach_function :b2SetLengthUnitsPerMeter, [:float], :void
|
|
1071
|
+
attach_function :b2GetLengthUnitsPerMeter, [], :float
|
|
1072
|
+
attach_function :b2IsValidRay, [:pointer], :bool
|
|
1073
|
+
attach_function :b2MakePolygon, [:pointer, :float], Polygon.by_value
|
|
1074
|
+
attach_function :b2MakeOffsetPolygon, [:pointer, Vec2.by_value, Rot.by_value], Polygon.by_value
|
|
1075
|
+
attach_function :b2MakeOffsetRoundedPolygon, [:pointer, Vec2.by_value, Rot.by_value, :float], Polygon.by_value
|
|
1076
|
+
attach_function :b2MakeSquare, [:float], Polygon.by_value
|
|
1077
|
+
attach_function :b2MakeBox, [:float, :float], Polygon.by_value
|
|
1078
|
+
attach_function :b2MakeRoundedBox, [:float, :float, :float], Polygon.by_value
|
|
1079
|
+
attach_function :b2MakeOffsetBox, [:float, :float, Vec2.by_value, Rot.by_value], Polygon.by_value
|
|
1080
|
+
attach_function :b2MakeOffsetRoundedBox, [:float, :float, Vec2.by_value, Rot.by_value, :float], Polygon.by_value
|
|
1081
|
+
attach_function :b2TransformPolygon, [Transform.by_value, :pointer], Polygon.by_value
|
|
1082
|
+
attach_function :b2ComputeCircleMass, [:pointer, :float], MassData.by_value
|
|
1083
|
+
attach_function :b2ComputeCapsuleMass, [:pointer, :float], MassData.by_value
|
|
1084
|
+
attach_function :b2ComputePolygonMass, [:pointer, :float], MassData.by_value
|
|
1085
|
+
attach_function :b2ComputeCircleAABB, [:pointer, Transform.by_value], AABB.by_value
|
|
1086
|
+
attach_function :b2ComputeCapsuleAABB, [:pointer, Transform.by_value], AABB.by_value
|
|
1087
|
+
attach_function :b2ComputePolygonAABB, [:pointer, Transform.by_value], AABB.by_value
|
|
1088
|
+
attach_function :b2ComputeSegmentAABB, [:pointer, Transform.by_value], AABB.by_value
|
|
1089
|
+
attach_function :b2PointInCircle, [Vec2.by_value, :pointer], :bool
|
|
1090
|
+
attach_function :b2PointInCapsule, [Vec2.by_value, :pointer], :bool
|
|
1091
|
+
attach_function :b2PointInPolygon, [Vec2.by_value, :pointer], :bool
|
|
1092
|
+
attach_function :b2RayCastCircle, [:pointer, :pointer], CastOutput.by_value
|
|
1093
|
+
attach_function :b2RayCastCapsule, [:pointer, :pointer], CastOutput.by_value
|
|
1094
|
+
attach_function :b2RayCastSegment, [:pointer, :pointer, :bool], CastOutput.by_value
|
|
1095
|
+
attach_function :b2RayCastPolygon, [:pointer, :pointer], CastOutput.by_value
|
|
1096
|
+
attach_function :b2ShapeCastCircle, [:pointer, :pointer], CastOutput.by_value
|
|
1097
|
+
attach_function :b2ShapeCastCapsule, [:pointer, :pointer], CastOutput.by_value
|
|
1098
|
+
attach_function :b2ShapeCastSegment, [:pointer, :pointer], CastOutput.by_value
|
|
1099
|
+
attach_function :b2ShapeCastPolygon, [:pointer, :pointer], CastOutput.by_value
|
|
1100
|
+
attach_function :b2ComputeHull, [:pointer, :int], Hull.by_value
|
|
1101
|
+
attach_function :b2ValidateHull, [:pointer], :bool
|
|
1102
|
+
attach_function :b2SegmentDistance, [Vec2.by_value, Vec2.by_value, Vec2.by_value, Vec2.by_value], SegmentDistanceResult.by_value
|
|
1103
|
+
attach_function :b2ShapeDistance, [:pointer, :pointer, :pointer, :int], DistanceOutput.by_value
|
|
1104
|
+
attach_function :b2ShapeCast, [:pointer], CastOutput.by_value
|
|
1105
|
+
attach_function :b2MakeProxy, [:pointer, :int, :float], ShapeProxy.by_value
|
|
1106
|
+
attach_function :b2MakeOffsetProxy, [:pointer, :int, :float, Vec2.by_value, Rot.by_value], ShapeProxy.by_value
|
|
1107
|
+
attach_function :b2GetSweepTransform, [:pointer, :float], Transform.by_value
|
|
1108
|
+
attach_function :b2TimeOfImpact, [:pointer], TOIOutput.by_value
|
|
1109
|
+
attach_function :b2CollideCircles, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1110
|
+
attach_function :b2CollideCapsuleAndCircle, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1111
|
+
attach_function :b2CollideSegmentAndCircle, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1112
|
+
attach_function :b2CollidePolygonAndCircle, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1113
|
+
attach_function :b2CollideCapsules, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1114
|
+
attach_function :b2CollideSegmentAndCapsule, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1115
|
+
attach_function :b2CollidePolygonAndCapsule, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1116
|
+
attach_function :b2CollidePolygons, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1117
|
+
attach_function :b2CollideSegmentAndPolygon, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1118
|
+
attach_function :b2CollideChainSegmentAndCircle, [:pointer, Transform.by_value, :pointer, Transform.by_value], Manifold.by_value
|
|
1119
|
+
attach_function :b2CollideChainSegmentAndCapsule, [:pointer, Transform.by_value, :pointer, Transform.by_value, :pointer], Manifold.by_value
|
|
1120
|
+
attach_function :b2CollideChainSegmentAndPolygon, [:pointer, Transform.by_value, :pointer, Transform.by_value, :pointer], Manifold.by_value
|
|
1121
|
+
attach_function :b2DynamicTree_Create, [], DynamicTree.by_value
|
|
1122
|
+
attach_function :b2DynamicTree_Destroy, [:pointer], :void
|
|
1123
|
+
attach_function :b2DynamicTree_CreateProxy, [:pointer, AABB.by_value, :uint64, :uint64], :int
|
|
1124
|
+
attach_function :b2DynamicTree_DestroyProxy, [:pointer, :int], :void
|
|
1125
|
+
attach_function :b2DynamicTree_MoveProxy, [:pointer, :int, AABB.by_value], :void
|
|
1126
|
+
attach_function :b2DynamicTree_EnlargeProxy, [:pointer, :int, AABB.by_value], :void
|
|
1127
|
+
attach_function :b2DynamicTree_SetCategoryBits, [:pointer, :int, :uint64], :void
|
|
1128
|
+
attach_function :b2DynamicTree_GetCategoryBits, [:pointer, :int], :uint64
|
|
1129
|
+
attach_function :b2DynamicTree_Query, [:pointer, AABB.by_value, :uint64, :pointer, :pointer], TreeStats.by_value
|
|
1130
|
+
attach_function :b2DynamicTree_RayCast, [:pointer, :pointer, :uint64, :pointer, :pointer], TreeStats.by_value
|
|
1131
|
+
attach_function :b2DynamicTree_ShapeCast, [:pointer, :pointer, :uint64, :pointer, :pointer], TreeStats.by_value
|
|
1132
|
+
attach_function :b2DynamicTree_GetHeight, [:pointer], :int
|
|
1133
|
+
attach_function :b2DynamicTree_GetAreaRatio, [:pointer], :float
|
|
1134
|
+
attach_function :b2DynamicTree_GetRootBounds, [:pointer], AABB.by_value
|
|
1135
|
+
attach_function :b2DynamicTree_GetProxyCount, [:pointer], :int
|
|
1136
|
+
attach_function :b2DynamicTree_Rebuild, [:pointer, :bool], :int
|
|
1137
|
+
attach_function :b2DynamicTree_GetByteCount, [:pointer], :int
|
|
1138
|
+
attach_function :b2DynamicTree_GetUserData, [:pointer, :int], :uint64
|
|
1139
|
+
attach_function :b2DynamicTree_GetAABB, [:pointer, :int], AABB.by_value
|
|
1140
|
+
attach_function :b2DynamicTree_Validate, [:pointer], :void
|
|
1141
|
+
attach_function :b2DynamicTree_ValidateNoEnlarged, [:pointer], :void
|
|
1142
|
+
attach_function :b2SolvePlanes, [Vec2.by_value, :pointer, :int], PlaneSolverResult.by_value
|
|
1143
|
+
attach_function :b2ClipVector, [Vec2.by_value, :pointer, :int], Vec2.by_value
|
|
1144
|
+
attach_function :b2DefaultWorldDef, [], WorldDef.by_value
|
|
1145
|
+
attach_function :b2DefaultBodyDef, [], BodyDef.by_value
|
|
1146
|
+
attach_function :b2DefaultFilter, [], Filter.by_value
|
|
1147
|
+
attach_function :b2DefaultQueryFilter, [], QueryFilter.by_value
|
|
1148
|
+
attach_function :b2DefaultSurfaceMaterial, [], SurfaceMaterial.by_value
|
|
1149
|
+
attach_function :b2DefaultShapeDef, [], ShapeDef.by_value
|
|
1150
|
+
attach_function :b2DefaultChainDef, [], ChainDef.by_value
|
|
1151
|
+
attach_function :b2DefaultDistanceJointDef, [], DistanceJointDef.by_value
|
|
1152
|
+
attach_function :b2DefaultMotorJointDef, [], MotorJointDef.by_value
|
|
1153
|
+
attach_function :b2DefaultMouseJointDef, [], MouseJointDef.by_value
|
|
1154
|
+
attach_function :b2DefaultFilterJointDef, [], FilterJointDef.by_value
|
|
1155
|
+
attach_function :b2DefaultPrismaticJointDef, [], PrismaticJointDef.by_value
|
|
1156
|
+
attach_function :b2DefaultRevoluteJointDef, [], RevoluteJointDef.by_value
|
|
1157
|
+
attach_function :b2DefaultWeldJointDef, [], WeldJointDef.by_value
|
|
1158
|
+
attach_function :b2DefaultWheelJointDef, [], WheelJointDef.by_value
|
|
1159
|
+
attach_function :b2DefaultExplosionDef, [], ExplosionDef.by_value
|
|
1160
|
+
attach_function :b2DefaultDebugDraw, [], DebugDraw.by_value
|
|
1161
|
+
attach_function :b2CreateWorld, [:pointer], WorldId.by_value
|
|
1162
|
+
attach_function :b2DestroyWorld, [WorldId.by_value], :void
|
|
1163
|
+
attach_function :b2World_IsValid, [WorldId.by_value], :bool
|
|
1164
|
+
attach_function :b2World_Step, [WorldId.by_value, :float, :int], :void, blocking: true
|
|
1165
|
+
attach_function :b2World_Draw, [WorldId.by_value, :pointer], :void
|
|
1166
|
+
attach_function :b2World_GetBodyEvents, [WorldId.by_value], BodyEvents.by_value
|
|
1167
|
+
attach_function :b2World_GetSensorEvents, [WorldId.by_value], SensorEvents.by_value
|
|
1168
|
+
attach_function :b2World_GetContactEvents, [WorldId.by_value], ContactEvents.by_value
|
|
1169
|
+
attach_function :b2World_OverlapAABB, [WorldId.by_value, AABB.by_value, QueryFilter.by_value, :pointer, :pointer], TreeStats.by_value
|
|
1170
|
+
attach_function :b2World_OverlapShape, [WorldId.by_value, :pointer, QueryFilter.by_value, :pointer, :pointer], TreeStats.by_value
|
|
1171
|
+
attach_function :b2World_CastRay, [WorldId.by_value, Vec2.by_value, Vec2.by_value, QueryFilter.by_value, :pointer, :pointer], TreeStats.by_value
|
|
1172
|
+
attach_function :b2World_CastRayClosest, [WorldId.by_value, Vec2.by_value, Vec2.by_value, QueryFilter.by_value], RayResult.by_value
|
|
1173
|
+
attach_function :b2World_CastShape, [WorldId.by_value, :pointer, Vec2.by_value, QueryFilter.by_value, :pointer, :pointer], TreeStats.by_value
|
|
1174
|
+
attach_function :b2World_CastMover, [WorldId.by_value, :pointer, Vec2.by_value, QueryFilter.by_value], :float
|
|
1175
|
+
attach_function :b2World_CollideMover, [WorldId.by_value, :pointer, QueryFilter.by_value, :pointer, :pointer], :void
|
|
1176
|
+
attach_function :b2World_EnableSleeping, [WorldId.by_value, :bool], :void
|
|
1177
|
+
attach_function :b2World_IsSleepingEnabled, [WorldId.by_value], :bool
|
|
1178
|
+
attach_function :b2World_EnableContinuous, [WorldId.by_value, :bool], :void
|
|
1179
|
+
attach_function :b2World_IsContinuousEnabled, [WorldId.by_value], :bool
|
|
1180
|
+
attach_function :b2World_SetRestitutionThreshold, [WorldId.by_value, :float], :void
|
|
1181
|
+
attach_function :b2World_GetRestitutionThreshold, [WorldId.by_value], :float
|
|
1182
|
+
attach_function :b2World_SetHitEventThreshold, [WorldId.by_value, :float], :void
|
|
1183
|
+
attach_function :b2World_GetHitEventThreshold, [WorldId.by_value], :float
|
|
1184
|
+
attach_function :b2World_SetCustomFilterCallback, [WorldId.by_value, :pointer, :pointer], :void
|
|
1185
|
+
attach_function :b2World_SetPreSolveCallback, [WorldId.by_value, :pointer, :pointer], :void
|
|
1186
|
+
attach_function :b2World_SetGravity, [WorldId.by_value, Vec2.by_value], :void
|
|
1187
|
+
attach_function :b2World_GetGravity, [WorldId.by_value], Vec2.by_value
|
|
1188
|
+
attach_function :b2World_Explode, [WorldId.by_value, :pointer], :void
|
|
1189
|
+
attach_function :b2World_SetContactTuning, [WorldId.by_value, :float, :float, :float], :void
|
|
1190
|
+
attach_function :b2World_SetJointTuning, [WorldId.by_value, :float, :float], :void
|
|
1191
|
+
attach_function :b2World_SetMaximumLinearSpeed, [WorldId.by_value, :float], :void
|
|
1192
|
+
attach_function :b2World_GetMaximumLinearSpeed, [WorldId.by_value], :float
|
|
1193
|
+
attach_function :b2World_EnableWarmStarting, [WorldId.by_value, :bool], :void
|
|
1194
|
+
attach_function :b2World_IsWarmStartingEnabled, [WorldId.by_value], :bool
|
|
1195
|
+
attach_function :b2World_GetAwakeBodyCount, [WorldId.by_value], :int
|
|
1196
|
+
attach_function :b2World_GetProfile, [WorldId.by_value], Profile.by_value
|
|
1197
|
+
attach_function :b2World_GetCounters, [WorldId.by_value], Counters.by_value
|
|
1198
|
+
attach_function :b2World_SetUserData, [WorldId.by_value, :pointer], :void
|
|
1199
|
+
attach_function :b2World_GetUserData, [WorldId.by_value], :pointer
|
|
1200
|
+
attach_function :b2World_SetFrictionCallback, [WorldId.by_value, :pointer], :void
|
|
1201
|
+
attach_function :b2World_SetRestitutionCallback, [WorldId.by_value, :pointer], :void
|
|
1202
|
+
attach_function :b2World_DumpMemoryStats, [WorldId.by_value], :void
|
|
1203
|
+
attach_function :b2World_RebuildStaticTree, [WorldId.by_value], :void
|
|
1204
|
+
attach_function :b2World_EnableSpeculative, [WorldId.by_value, :bool], :void
|
|
1205
|
+
attach_function :b2CreateBody, [WorldId.by_value, :pointer], BodyId.by_value
|
|
1206
|
+
attach_function :b2DestroyBody, [BodyId.by_value], :void
|
|
1207
|
+
attach_function :b2Body_IsValid, [BodyId.by_value], :bool
|
|
1208
|
+
attach_function :b2Body_GetType, [BodyId.by_value], :int
|
|
1209
|
+
attach_function :b2Body_SetType, [BodyId.by_value, :int], :void
|
|
1210
|
+
attach_function :b2Body_SetName, [BodyId.by_value, :pointer], :void
|
|
1211
|
+
attach_function :b2Body_GetName, [BodyId.by_value], :pointer
|
|
1212
|
+
attach_function :b2Body_SetUserData, [BodyId.by_value, :pointer], :void
|
|
1213
|
+
attach_function :b2Body_GetUserData, [BodyId.by_value], :pointer
|
|
1214
|
+
attach_function :b2Body_GetPosition, [BodyId.by_value], Vec2.by_value
|
|
1215
|
+
attach_function :b2Body_GetRotation, [BodyId.by_value], Rot.by_value
|
|
1216
|
+
attach_function :b2Body_GetTransform, [BodyId.by_value], Transform.by_value
|
|
1217
|
+
attach_function :b2Body_SetTransform, [BodyId.by_value, Vec2.by_value, Rot.by_value], :void
|
|
1218
|
+
attach_function :b2Body_GetLocalPoint, [BodyId.by_value, Vec2.by_value], Vec2.by_value
|
|
1219
|
+
attach_function :b2Body_GetWorldPoint, [BodyId.by_value, Vec2.by_value], Vec2.by_value
|
|
1220
|
+
attach_function :b2Body_GetLocalVector, [BodyId.by_value, Vec2.by_value], Vec2.by_value
|
|
1221
|
+
attach_function :b2Body_GetWorldVector, [BodyId.by_value, Vec2.by_value], Vec2.by_value
|
|
1222
|
+
attach_function :b2Body_GetLinearVelocity, [BodyId.by_value], Vec2.by_value
|
|
1223
|
+
attach_function :b2Body_GetAngularVelocity, [BodyId.by_value], :float
|
|
1224
|
+
attach_function :b2Body_SetLinearVelocity, [BodyId.by_value, Vec2.by_value], :void
|
|
1225
|
+
attach_function :b2Body_SetAngularVelocity, [BodyId.by_value, :float], :void
|
|
1226
|
+
attach_function :b2Body_SetTargetTransform, [BodyId.by_value, Transform.by_value, :float], :void
|
|
1227
|
+
attach_function :b2Body_GetLocalPointVelocity, [BodyId.by_value, Vec2.by_value], Vec2.by_value
|
|
1228
|
+
attach_function :b2Body_GetWorldPointVelocity, [BodyId.by_value, Vec2.by_value], Vec2.by_value
|
|
1229
|
+
attach_function :b2Body_ApplyForce, [BodyId.by_value, Vec2.by_value, Vec2.by_value, :bool], :void
|
|
1230
|
+
attach_function :b2Body_ApplyForceToCenter, [BodyId.by_value, Vec2.by_value, :bool], :void
|
|
1231
|
+
attach_function :b2Body_ApplyTorque, [BodyId.by_value, :float, :bool], :void
|
|
1232
|
+
attach_function :b2Body_ApplyLinearImpulse, [BodyId.by_value, Vec2.by_value, Vec2.by_value, :bool], :void
|
|
1233
|
+
attach_function :b2Body_ApplyLinearImpulseToCenter, [BodyId.by_value, Vec2.by_value, :bool], :void
|
|
1234
|
+
attach_function :b2Body_ApplyAngularImpulse, [BodyId.by_value, :float, :bool], :void
|
|
1235
|
+
attach_function :b2Body_GetMass, [BodyId.by_value], :float
|
|
1236
|
+
attach_function :b2Body_GetRotationalInertia, [BodyId.by_value], :float
|
|
1237
|
+
attach_function :b2Body_GetLocalCenterOfMass, [BodyId.by_value], Vec2.by_value
|
|
1238
|
+
attach_function :b2Body_GetWorldCenterOfMass, [BodyId.by_value], Vec2.by_value
|
|
1239
|
+
attach_function :b2Body_SetMassData, [BodyId.by_value, MassData.by_value], :void
|
|
1240
|
+
attach_function :b2Body_GetMassData, [BodyId.by_value], MassData.by_value
|
|
1241
|
+
attach_function :b2Body_ApplyMassFromShapes, [BodyId.by_value], :void
|
|
1242
|
+
attach_function :b2Body_SetLinearDamping, [BodyId.by_value, :float], :void
|
|
1243
|
+
attach_function :b2Body_GetLinearDamping, [BodyId.by_value], :float
|
|
1244
|
+
attach_function :b2Body_SetAngularDamping, [BodyId.by_value, :float], :void
|
|
1245
|
+
attach_function :b2Body_GetAngularDamping, [BodyId.by_value], :float
|
|
1246
|
+
attach_function :b2Body_SetGravityScale, [BodyId.by_value, :float], :void
|
|
1247
|
+
attach_function :b2Body_GetGravityScale, [BodyId.by_value], :float
|
|
1248
|
+
attach_function :b2Body_IsAwake, [BodyId.by_value], :bool
|
|
1249
|
+
attach_function :b2Body_SetAwake, [BodyId.by_value, :bool], :void
|
|
1250
|
+
attach_function :b2Body_EnableSleep, [BodyId.by_value, :bool], :void
|
|
1251
|
+
attach_function :b2Body_IsSleepEnabled, [BodyId.by_value], :bool
|
|
1252
|
+
attach_function :b2Body_SetSleepThreshold, [BodyId.by_value, :float], :void
|
|
1253
|
+
attach_function :b2Body_GetSleepThreshold, [BodyId.by_value], :float
|
|
1254
|
+
attach_function :b2Body_IsEnabled, [BodyId.by_value], :bool
|
|
1255
|
+
attach_function :b2Body_Disable, [BodyId.by_value], :void
|
|
1256
|
+
attach_function :b2Body_Enable, [BodyId.by_value], :void
|
|
1257
|
+
attach_function :b2Body_SetFixedRotation, [BodyId.by_value, :bool], :void
|
|
1258
|
+
attach_function :b2Body_IsFixedRotation, [BodyId.by_value], :bool
|
|
1259
|
+
attach_function :b2Body_SetBullet, [BodyId.by_value, :bool], :void
|
|
1260
|
+
attach_function :b2Body_IsBullet, [BodyId.by_value], :bool
|
|
1261
|
+
attach_function :b2Body_EnableContactEvents, [BodyId.by_value, :bool], :void
|
|
1262
|
+
attach_function :b2Body_EnableHitEvents, [BodyId.by_value, :bool], :void
|
|
1263
|
+
attach_function :b2Body_GetWorld, [BodyId.by_value], WorldId.by_value
|
|
1264
|
+
attach_function :b2Body_GetShapeCount, [BodyId.by_value], :int
|
|
1265
|
+
attach_function :b2Body_GetShapes, [BodyId.by_value, :pointer, :int], :int
|
|
1266
|
+
attach_function :b2Body_GetJointCount, [BodyId.by_value], :int
|
|
1267
|
+
attach_function :b2Body_GetJoints, [BodyId.by_value, :pointer, :int], :int
|
|
1268
|
+
attach_function :b2Body_GetContactCapacity, [BodyId.by_value], :int
|
|
1269
|
+
attach_function :b2Body_GetContactData, [BodyId.by_value, :pointer, :int], :int
|
|
1270
|
+
attach_function :b2Body_ComputeAABB, [BodyId.by_value], AABB.by_value
|
|
1271
|
+
attach_function :b2CreateCircleShape, [BodyId.by_value, :pointer, :pointer], ShapeId.by_value
|
|
1272
|
+
attach_function :b2CreateSegmentShape, [BodyId.by_value, :pointer, :pointer], ShapeId.by_value
|
|
1273
|
+
attach_function :b2CreateCapsuleShape, [BodyId.by_value, :pointer, :pointer], ShapeId.by_value
|
|
1274
|
+
attach_function :b2CreatePolygonShape, [BodyId.by_value, :pointer, :pointer], ShapeId.by_value
|
|
1275
|
+
attach_function :b2DestroyShape, [ShapeId.by_value, :bool], :void
|
|
1276
|
+
attach_function :b2Shape_IsValid, [ShapeId.by_value], :bool
|
|
1277
|
+
attach_function :b2Shape_GetType, [ShapeId.by_value], :int
|
|
1278
|
+
attach_function :b2Shape_GetBody, [ShapeId.by_value], BodyId.by_value
|
|
1279
|
+
attach_function :b2Shape_GetWorld, [ShapeId.by_value], WorldId.by_value
|
|
1280
|
+
attach_function :b2Shape_IsSensor, [ShapeId.by_value], :bool
|
|
1281
|
+
attach_function :b2Shape_SetUserData, [ShapeId.by_value, :pointer], :void
|
|
1282
|
+
attach_function :b2Shape_GetUserData, [ShapeId.by_value], :pointer
|
|
1283
|
+
attach_function :b2Shape_SetDensity, [ShapeId.by_value, :float, :bool], :void
|
|
1284
|
+
attach_function :b2Shape_GetDensity, [ShapeId.by_value], :float
|
|
1285
|
+
attach_function :b2Shape_SetFriction, [ShapeId.by_value, :float], :void
|
|
1286
|
+
attach_function :b2Shape_GetFriction, [ShapeId.by_value], :float
|
|
1287
|
+
attach_function :b2Shape_SetRestitution, [ShapeId.by_value, :float], :void
|
|
1288
|
+
attach_function :b2Shape_GetRestitution, [ShapeId.by_value], :float
|
|
1289
|
+
attach_function :b2Shape_SetMaterial, [ShapeId.by_value, :int], :void
|
|
1290
|
+
attach_function :b2Shape_GetMaterial, [ShapeId.by_value], :int
|
|
1291
|
+
attach_function :b2Shape_GetFilter, [ShapeId.by_value], Filter.by_value
|
|
1292
|
+
attach_function :b2Shape_SetFilter, [ShapeId.by_value, Filter.by_value], :void
|
|
1293
|
+
attach_function :b2Shape_EnableSensorEvents, [ShapeId.by_value, :bool], :void
|
|
1294
|
+
attach_function :b2Shape_AreSensorEventsEnabled, [ShapeId.by_value], :bool
|
|
1295
|
+
attach_function :b2Shape_EnableContactEvents, [ShapeId.by_value, :bool], :void
|
|
1296
|
+
attach_function :b2Shape_AreContactEventsEnabled, [ShapeId.by_value], :bool
|
|
1297
|
+
attach_function :b2Shape_EnablePreSolveEvents, [ShapeId.by_value, :bool], :void
|
|
1298
|
+
attach_function :b2Shape_ArePreSolveEventsEnabled, [ShapeId.by_value], :bool
|
|
1299
|
+
attach_function :b2Shape_EnableHitEvents, [ShapeId.by_value, :bool], :void
|
|
1300
|
+
attach_function :b2Shape_AreHitEventsEnabled, [ShapeId.by_value], :bool
|
|
1301
|
+
attach_function :b2Shape_TestPoint, [ShapeId.by_value, Vec2.by_value], :bool
|
|
1302
|
+
attach_function :b2Shape_RayCast, [ShapeId.by_value, :pointer], CastOutput.by_value
|
|
1303
|
+
attach_function :b2Shape_GetCircle, [ShapeId.by_value], Circle.by_value
|
|
1304
|
+
attach_function :b2Shape_GetSegment, [ShapeId.by_value], Segment.by_value
|
|
1305
|
+
attach_function :b2Shape_GetChainSegment, [ShapeId.by_value], ChainSegment.by_value
|
|
1306
|
+
attach_function :b2Shape_GetCapsule, [ShapeId.by_value], Capsule.by_value
|
|
1307
|
+
attach_function :b2Shape_GetPolygon, [ShapeId.by_value], Polygon.by_value
|
|
1308
|
+
attach_function :b2Shape_SetCircle, [ShapeId.by_value, :pointer], :void
|
|
1309
|
+
attach_function :b2Shape_SetCapsule, [ShapeId.by_value, :pointer], :void
|
|
1310
|
+
attach_function :b2Shape_SetSegment, [ShapeId.by_value, :pointer], :void
|
|
1311
|
+
attach_function :b2Shape_SetPolygon, [ShapeId.by_value, :pointer], :void
|
|
1312
|
+
attach_function :b2Shape_GetParentChain, [ShapeId.by_value], ChainId.by_value
|
|
1313
|
+
attach_function :b2Shape_GetContactCapacity, [ShapeId.by_value], :int
|
|
1314
|
+
attach_function :b2Shape_GetContactData, [ShapeId.by_value, :pointer, :int], :int
|
|
1315
|
+
attach_function :b2Shape_GetSensorCapacity, [ShapeId.by_value], :int
|
|
1316
|
+
attach_function :b2Shape_GetSensorOverlaps, [ShapeId.by_value, :pointer, :int], :int
|
|
1317
|
+
attach_function :b2Shape_GetAABB, [ShapeId.by_value], AABB.by_value
|
|
1318
|
+
attach_function :b2Shape_GetMassData, [ShapeId.by_value], MassData.by_value
|
|
1319
|
+
attach_function :b2Shape_GetClosestPoint, [ShapeId.by_value, Vec2.by_value], Vec2.by_value
|
|
1320
|
+
attach_function :b2CreateChain, [BodyId.by_value, :pointer], ChainId.by_value
|
|
1321
|
+
attach_function :b2DestroyChain, [ChainId.by_value], :void
|
|
1322
|
+
attach_function :b2Chain_GetWorld, [ChainId.by_value], WorldId.by_value
|
|
1323
|
+
attach_function :b2Chain_GetSegmentCount, [ChainId.by_value], :int
|
|
1324
|
+
attach_function :b2Chain_GetSegments, [ChainId.by_value, :pointer, :int], :int
|
|
1325
|
+
attach_function :b2Chain_SetFriction, [ChainId.by_value, :float], :void
|
|
1326
|
+
attach_function :b2Chain_GetFriction, [ChainId.by_value], :float
|
|
1327
|
+
attach_function :b2Chain_SetRestitution, [ChainId.by_value, :float], :void
|
|
1328
|
+
attach_function :b2Chain_GetRestitution, [ChainId.by_value], :float
|
|
1329
|
+
attach_function :b2Chain_SetMaterial, [ChainId.by_value, :int], :void
|
|
1330
|
+
attach_function :b2Chain_GetMaterial, [ChainId.by_value], :int
|
|
1331
|
+
attach_function :b2Chain_IsValid, [ChainId.by_value], :bool
|
|
1332
|
+
attach_function :b2DestroyJoint, [JointId.by_value], :void
|
|
1333
|
+
attach_function :b2Joint_IsValid, [JointId.by_value], :bool
|
|
1334
|
+
attach_function :b2Joint_GetType, [JointId.by_value], :int
|
|
1335
|
+
attach_function :b2Joint_GetBodyA, [JointId.by_value], BodyId.by_value
|
|
1336
|
+
attach_function :b2Joint_GetBodyB, [JointId.by_value], BodyId.by_value
|
|
1337
|
+
attach_function :b2Joint_GetWorld, [JointId.by_value], WorldId.by_value
|
|
1338
|
+
attach_function :b2Joint_GetLocalAnchorA, [JointId.by_value], Vec2.by_value
|
|
1339
|
+
attach_function :b2Joint_GetLocalAnchorB, [JointId.by_value], Vec2.by_value
|
|
1340
|
+
attach_function :b2Joint_SetCollideConnected, [JointId.by_value, :bool], :void
|
|
1341
|
+
attach_function :b2Joint_GetCollideConnected, [JointId.by_value], :bool
|
|
1342
|
+
attach_function :b2Joint_SetUserData, [JointId.by_value, :pointer], :void
|
|
1343
|
+
attach_function :b2Joint_GetUserData, [JointId.by_value], :pointer
|
|
1344
|
+
attach_function :b2Joint_WakeBodies, [JointId.by_value], :void
|
|
1345
|
+
attach_function :b2Joint_GetConstraintForce, [JointId.by_value], Vec2.by_value
|
|
1346
|
+
attach_function :b2Joint_GetConstraintTorque, [JointId.by_value], :float
|
|
1347
|
+
attach_function :b2CreateDistanceJoint, [WorldId.by_value, :pointer], JointId.by_value
|
|
1348
|
+
attach_function :b2DistanceJoint_SetLength, [JointId.by_value, :float], :void
|
|
1349
|
+
attach_function :b2DistanceJoint_GetLength, [JointId.by_value], :float
|
|
1350
|
+
attach_function :b2DistanceJoint_EnableSpring, [JointId.by_value, :bool], :void
|
|
1351
|
+
attach_function :b2DistanceJoint_IsSpringEnabled, [JointId.by_value], :bool
|
|
1352
|
+
attach_function :b2DistanceJoint_SetSpringHertz, [JointId.by_value, :float], :void
|
|
1353
|
+
attach_function :b2DistanceJoint_SetSpringDampingRatio, [JointId.by_value, :float], :void
|
|
1354
|
+
attach_function :b2DistanceJoint_GetSpringHertz, [JointId.by_value], :float
|
|
1355
|
+
attach_function :b2DistanceJoint_GetSpringDampingRatio, [JointId.by_value], :float
|
|
1356
|
+
attach_function :b2DistanceJoint_EnableLimit, [JointId.by_value, :bool], :void
|
|
1357
|
+
attach_function :b2DistanceJoint_IsLimitEnabled, [JointId.by_value], :bool
|
|
1358
|
+
attach_function :b2DistanceJoint_SetLengthRange, [JointId.by_value, :float, :float], :void
|
|
1359
|
+
attach_function :b2DistanceJoint_GetMinLength, [JointId.by_value], :float
|
|
1360
|
+
attach_function :b2DistanceJoint_GetMaxLength, [JointId.by_value], :float
|
|
1361
|
+
attach_function :b2DistanceJoint_GetCurrentLength, [JointId.by_value], :float
|
|
1362
|
+
attach_function :b2DistanceJoint_EnableMotor, [JointId.by_value, :bool], :void
|
|
1363
|
+
attach_function :b2DistanceJoint_IsMotorEnabled, [JointId.by_value], :bool
|
|
1364
|
+
attach_function :b2DistanceJoint_SetMotorSpeed, [JointId.by_value, :float], :void
|
|
1365
|
+
attach_function :b2DistanceJoint_GetMotorSpeed, [JointId.by_value], :float
|
|
1366
|
+
attach_function :b2DistanceJoint_SetMaxMotorForce, [JointId.by_value, :float], :void
|
|
1367
|
+
attach_function :b2DistanceJoint_GetMaxMotorForce, [JointId.by_value], :float
|
|
1368
|
+
attach_function :b2DistanceJoint_GetMotorForce, [JointId.by_value], :float
|
|
1369
|
+
attach_function :b2CreateMotorJoint, [WorldId.by_value, :pointer], JointId.by_value
|
|
1370
|
+
attach_function :b2MotorJoint_SetLinearOffset, [JointId.by_value, Vec2.by_value], :void
|
|
1371
|
+
attach_function :b2MotorJoint_GetLinearOffset, [JointId.by_value], Vec2.by_value
|
|
1372
|
+
attach_function :b2MotorJoint_SetAngularOffset, [JointId.by_value, :float], :void
|
|
1373
|
+
attach_function :b2MotorJoint_GetAngularOffset, [JointId.by_value], :float
|
|
1374
|
+
attach_function :b2MotorJoint_SetMaxForce, [JointId.by_value, :float], :void
|
|
1375
|
+
attach_function :b2MotorJoint_GetMaxForce, [JointId.by_value], :float
|
|
1376
|
+
attach_function :b2MotorJoint_SetMaxTorque, [JointId.by_value, :float], :void
|
|
1377
|
+
attach_function :b2MotorJoint_GetMaxTorque, [JointId.by_value], :float
|
|
1378
|
+
attach_function :b2MotorJoint_SetCorrectionFactor, [JointId.by_value, :float], :void
|
|
1379
|
+
attach_function :b2MotorJoint_GetCorrectionFactor, [JointId.by_value], :float
|
|
1380
|
+
attach_function :b2CreateMouseJoint, [WorldId.by_value, :pointer], JointId.by_value
|
|
1381
|
+
attach_function :b2MouseJoint_SetTarget, [JointId.by_value, Vec2.by_value], :void
|
|
1382
|
+
attach_function :b2MouseJoint_GetTarget, [JointId.by_value], Vec2.by_value
|
|
1383
|
+
attach_function :b2MouseJoint_SetSpringHertz, [JointId.by_value, :float], :void
|
|
1384
|
+
attach_function :b2MouseJoint_GetSpringHertz, [JointId.by_value], :float
|
|
1385
|
+
attach_function :b2MouseJoint_SetSpringDampingRatio, [JointId.by_value, :float], :void
|
|
1386
|
+
attach_function :b2MouseJoint_GetSpringDampingRatio, [JointId.by_value], :float
|
|
1387
|
+
attach_function :b2MouseJoint_SetMaxForce, [JointId.by_value, :float], :void
|
|
1388
|
+
attach_function :b2MouseJoint_GetMaxForce, [JointId.by_value], :float
|
|
1389
|
+
attach_function :b2CreateFilterJoint, [WorldId.by_value, :pointer], JointId.by_value
|
|
1390
|
+
attach_function :b2CreatePrismaticJoint, [WorldId.by_value, :pointer], JointId.by_value
|
|
1391
|
+
attach_function :b2PrismaticJoint_EnableSpring, [JointId.by_value, :bool], :void
|
|
1392
|
+
attach_function :b2PrismaticJoint_IsSpringEnabled, [JointId.by_value], :bool
|
|
1393
|
+
attach_function :b2PrismaticJoint_SetSpringHertz, [JointId.by_value, :float], :void
|
|
1394
|
+
attach_function :b2PrismaticJoint_GetSpringHertz, [JointId.by_value], :float
|
|
1395
|
+
attach_function :b2PrismaticJoint_SetSpringDampingRatio, [JointId.by_value, :float], :void
|
|
1396
|
+
attach_function :b2PrismaticJoint_GetSpringDampingRatio, [JointId.by_value], :float
|
|
1397
|
+
attach_function :b2PrismaticJoint_EnableLimit, [JointId.by_value, :bool], :void
|
|
1398
|
+
attach_function :b2PrismaticJoint_IsLimitEnabled, [JointId.by_value], :bool
|
|
1399
|
+
attach_function :b2PrismaticJoint_GetLowerLimit, [JointId.by_value], :float
|
|
1400
|
+
attach_function :b2PrismaticJoint_GetUpperLimit, [JointId.by_value], :float
|
|
1401
|
+
attach_function :b2PrismaticJoint_SetLimits, [JointId.by_value, :float, :float], :void
|
|
1402
|
+
attach_function :b2PrismaticJoint_EnableMotor, [JointId.by_value, :bool], :void
|
|
1403
|
+
attach_function :b2PrismaticJoint_IsMotorEnabled, [JointId.by_value], :bool
|
|
1404
|
+
attach_function :b2PrismaticJoint_SetMotorSpeed, [JointId.by_value, :float], :void
|
|
1405
|
+
attach_function :b2PrismaticJoint_GetMotorSpeed, [JointId.by_value], :float
|
|
1406
|
+
attach_function :b2PrismaticJoint_SetMaxMotorForce, [JointId.by_value, :float], :void
|
|
1407
|
+
attach_function :b2PrismaticJoint_GetMaxMotorForce, [JointId.by_value], :float
|
|
1408
|
+
attach_function :b2PrismaticJoint_GetMotorForce, [JointId.by_value], :float
|
|
1409
|
+
attach_function :b2PrismaticJoint_GetTranslation, [JointId.by_value], :float
|
|
1410
|
+
attach_function :b2PrismaticJoint_GetSpeed, [JointId.by_value], :float
|
|
1411
|
+
attach_function :b2CreateRevoluteJoint, [WorldId.by_value, :pointer], JointId.by_value
|
|
1412
|
+
attach_function :b2RevoluteJoint_EnableSpring, [JointId.by_value, :bool], :void
|
|
1413
|
+
attach_function :b2RevoluteJoint_IsSpringEnabled, [JointId.by_value], :bool
|
|
1414
|
+
attach_function :b2RevoluteJoint_SetSpringHertz, [JointId.by_value, :float], :void
|
|
1415
|
+
attach_function :b2RevoluteJoint_GetSpringHertz, [JointId.by_value], :float
|
|
1416
|
+
attach_function :b2RevoluteJoint_SetSpringDampingRatio, [JointId.by_value, :float], :void
|
|
1417
|
+
attach_function :b2RevoluteJoint_GetSpringDampingRatio, [JointId.by_value], :float
|
|
1418
|
+
attach_function :b2RevoluteJoint_GetAngle, [JointId.by_value], :float
|
|
1419
|
+
attach_function :b2RevoluteJoint_EnableLimit, [JointId.by_value, :bool], :void
|
|
1420
|
+
attach_function :b2RevoluteJoint_IsLimitEnabled, [JointId.by_value], :bool
|
|
1421
|
+
attach_function :b2RevoluteJoint_GetLowerLimit, [JointId.by_value], :float
|
|
1422
|
+
attach_function :b2RevoluteJoint_GetUpperLimit, [JointId.by_value], :float
|
|
1423
|
+
attach_function :b2RevoluteJoint_SetLimits, [JointId.by_value, :float, :float], :void
|
|
1424
|
+
attach_function :b2RevoluteJoint_EnableMotor, [JointId.by_value, :bool], :void
|
|
1425
|
+
attach_function :b2RevoluteJoint_IsMotorEnabled, [JointId.by_value], :bool
|
|
1426
|
+
attach_function :b2RevoluteJoint_SetMotorSpeed, [JointId.by_value, :float], :void
|
|
1427
|
+
attach_function :b2RevoluteJoint_GetMotorSpeed, [JointId.by_value], :float
|
|
1428
|
+
attach_function :b2RevoluteJoint_GetMotorTorque, [JointId.by_value], :float
|
|
1429
|
+
attach_function :b2RevoluteJoint_SetMaxMotorTorque, [JointId.by_value, :float], :void
|
|
1430
|
+
attach_function :b2RevoluteJoint_GetMaxMotorTorque, [JointId.by_value], :float
|
|
1431
|
+
attach_function :b2CreateWeldJoint, [WorldId.by_value, :pointer], JointId.by_value
|
|
1432
|
+
attach_function :b2WeldJoint_GetReferenceAngle, [JointId.by_value], :float
|
|
1433
|
+
attach_function :b2WeldJoint_SetReferenceAngle, [JointId.by_value, :float], :void
|
|
1434
|
+
attach_function :b2WeldJoint_SetLinearHertz, [JointId.by_value, :float], :void
|
|
1435
|
+
attach_function :b2WeldJoint_GetLinearHertz, [JointId.by_value], :float
|
|
1436
|
+
attach_function :b2WeldJoint_SetLinearDampingRatio, [JointId.by_value, :float], :void
|
|
1437
|
+
attach_function :b2WeldJoint_GetLinearDampingRatio, [JointId.by_value], :float
|
|
1438
|
+
attach_function :b2WeldJoint_SetAngularHertz, [JointId.by_value, :float], :void
|
|
1439
|
+
attach_function :b2WeldJoint_GetAngularHertz, [JointId.by_value], :float
|
|
1440
|
+
attach_function :b2WeldJoint_SetAngularDampingRatio, [JointId.by_value, :float], :void
|
|
1441
|
+
attach_function :b2WeldJoint_GetAngularDampingRatio, [JointId.by_value], :float
|
|
1442
|
+
attach_function :b2CreateWheelJoint, [WorldId.by_value, :pointer], JointId.by_value
|
|
1443
|
+
attach_function :b2WheelJoint_EnableSpring, [JointId.by_value, :bool], :void
|
|
1444
|
+
attach_function :b2WheelJoint_IsSpringEnabled, [JointId.by_value], :bool
|
|
1445
|
+
attach_function :b2WheelJoint_SetSpringHertz, [JointId.by_value, :float], :void
|
|
1446
|
+
attach_function :b2WheelJoint_GetSpringHertz, [JointId.by_value], :float
|
|
1447
|
+
attach_function :b2WheelJoint_SetSpringDampingRatio, [JointId.by_value, :float], :void
|
|
1448
|
+
attach_function :b2WheelJoint_GetSpringDampingRatio, [JointId.by_value], :float
|
|
1449
|
+
attach_function :b2WheelJoint_EnableLimit, [JointId.by_value, :bool], :void
|
|
1450
|
+
attach_function :b2WheelJoint_IsLimitEnabled, [JointId.by_value], :bool
|
|
1451
|
+
attach_function :b2WheelJoint_GetLowerLimit, [JointId.by_value], :float
|
|
1452
|
+
attach_function :b2WheelJoint_GetUpperLimit, [JointId.by_value], :float
|
|
1453
|
+
attach_function :b2WheelJoint_SetLimits, [JointId.by_value, :float, :float], :void
|
|
1454
|
+
attach_function :b2WheelJoint_EnableMotor, [JointId.by_value, :bool], :void
|
|
1455
|
+
attach_function :b2WheelJoint_IsMotorEnabled, [JointId.by_value], :bool
|
|
1456
|
+
attach_function :b2WheelJoint_SetMotorSpeed, [JointId.by_value, :float], :void
|
|
1457
|
+
attach_function :b2WheelJoint_GetMotorSpeed, [JointId.by_value], :float
|
|
1458
|
+
attach_function :b2WheelJoint_SetMaxMotorTorque, [JointId.by_value, :float], :void
|
|
1459
|
+
attach_function :b2WheelJoint_GetMaxMotorTorque, [JointId.by_value], :float
|
|
1460
|
+
attach_function :b2WheelJoint_GetMotorTorque, [JointId.by_value], :float
|
|
1461
|
+
end
|
|
1462
|
+
end
|