mt-lang 0.2.0 → 0.2.1
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 +4 -4
- data/docs/index.html +4 -3
- data/lib/milk_tea/base.rb +1 -1
- data/std/asset_pack.mt +267 -0
- data/std/async/libuv_runtime.mt +539 -0
- data/std/async/mailbox.mt +191 -0
- data/std/async/runtime.mt +87 -0
- data/std/async.mt +87 -0
- data/std/base64.mt +185 -0
- data/std/behavior_tree.mt +396 -0
- data/std/binary.mt +314 -0
- data/std/binary_heap.mt +157 -0
- data/std/bitset.mt +239 -0
- data/std/box2d.mt +535 -0
- data/std/bytes.mt +46 -0
- data/std/c/box2d.mt +1254 -0
- data/std/c/cgltf.mt +647 -0
- data/std/c/cjson.mt +106 -0
- data/std/c/crypto.mt +11 -0
- data/std/c/crypto_support.h +51 -0
- data/std/c/ctype.mt +19 -0
- data/std/c/ctype_bindgen.h +29 -0
- data/std/c/curl.mt +1223 -0
- data/std/c/enet.mt +473 -0
- data/std/c/errno.mt +41 -0
- data/std/c/errno_bindgen.h +53 -0
- data/std/c/flecs.mt +2945 -0
- data/std/c/fs.linux.mt +43 -0
- data/std/c/fs.windows.mt +43 -0
- data/std/c/fs_support.h +954 -0
- data/std/c/gl.mt +2065 -0
- data/std/c/gl_registry_helpers.h +10748 -0
- data/std/c/glfw.mt +499 -0
- data/std/c/libc.mt +167 -0
- data/std/c/libuv.mt +1491 -0
- data/std/c/math.mt +22 -0
- data/std/c/math_bindgen.h +31 -0
- data/std/c/miniaudio.mt +3420 -0
- data/std/c/pcre2.mt +735 -0
- data/std/c/process.mt +58 -0
- data/std/c/process_support.h +1147 -0
- data/std/c/raygui.mt +1602 -0
- data/std/c/raylib.mt +1245 -0
- data/std/c/raymath.mt +163 -0
- data/std/c/rlgl.mt +434 -0
- data/std/c/rpng.mt +60 -0
- data/std/c/rres.mt +187 -0
- data/std/c/sdl3.mt +4132 -0
- data/std/c/sqlite3.mt +951 -0
- data/std/c/stb_image.mt +52 -0
- data/std/c/stb_image_resize2.mt +128 -0
- data/std/c/stb_image_write.mt +19 -0
- data/std/c/stb_rect_pack.mt +38 -0
- data/std/c/stb_truetype.mt +175 -0
- data/std/c/stb_vorbis.mt +31 -0
- data/std/c/stdio.mt +90 -0
- data/std/c/steamworks.h +5769 -0
- data/std/c/steamworks.mt +4771 -0
- data/std/c/string.mt +16 -0
- data/std/c/string_bindgen.h +36 -0
- data/std/c/sync.mt +33 -0
- data/std/c/sync_support.h +219 -0
- data/std/c/terminal.mt +24 -0
- data/std/c/terminal_support.h +408 -0
- data/std/c/time.mt +26 -0
- data/std/c/tls.mt +24 -0
- data/std/c/tls_support.h +626 -0
- data/std/c/tracy.mt +53 -0
- data/std/c/zlib.mt +20 -0
- data/std/c/zlib_support.h +239 -0
- data/std/c/zstd.mt +231 -0
- data/std/cell.mt +60 -0
- data/std/cgltf.mt +115 -0
- data/std/cjson.mt +90 -0
- data/std/cli.mt +768 -0
- data/std/cookie.mt +198 -0
- data/std/counter.mt +160 -0
- data/std/crypto.mt +74 -0
- data/std/cstring.mt +13 -0
- data/std/ctype.mt +52 -0
- data/std/curl/runtime.mt +261 -0
- data/std/curl.mt +38 -0
- data/std/deque.mt +348 -0
- data/std/encoding.mt +93 -0
- data/std/enet.mt +133 -0
- data/std/env.mt +41 -0
- data/std/errno.mt +47 -0
- data/std/flecs.mt +978 -0
- data/std/fmt.mt +271 -0
- data/std/fs.linux.mt +696 -0
- data/std/fs.windows.mt +711 -0
- data/std/fsm.mt +267 -0
- data/std/gl.mt +2062 -0
- data/std/glfw.mt +471 -0
- data/std/goap.mt +342 -0
- data/std/graph.mt +521 -0
- data/std/gzip.mt +77 -0
- data/std/hash.mt +429 -0
- data/std/http/server.mt +810 -0
- data/std/http.mt +1227 -0
- data/std/intern.mt +53 -0
- data/std/jobs.mt +288 -0
- data/std/json.mt +627 -0
- data/std/libc.mt +34 -0
- data/std/libuv.mt +554 -0
- data/std/linear_algebra.mt +243 -0
- data/std/linked_map.mt +372 -0
- data/std/linked_map_view.mt +49 -0
- data/std/linked_set.mt +117 -0
- data/std/log.mt +69 -0
- data/std/map.mt +418 -0
- data/std/math.mt +24 -0
- data/std/mem/arena.mt +137 -0
- data/std/mem/endian.mt +51 -0
- data/std/mem/heap.mt +298 -0
- data/std/mem/pool.mt +164 -0
- data/std/mem/stack.mt +47 -0
- data/std/mem/tracking.mt +119 -0
- data/std/miniaudio.mt +1299 -0
- data/std/multiset.mt +191 -0
- data/std/net/channel.mt +727 -0
- data/std/net/clock.mt +237 -0
- data/std/net/discovery.mt +277 -0
- data/std/net/lobby.mt +813 -0
- data/std/net/manager.mt +539 -0
- data/std/net/mux.mt +839 -0
- data/std/net/nat.mt +122 -0
- data/std/net/packet.mt +219 -0
- data/std/net/punch.mt +162 -0
- data/std/net/rpc.mt +119 -0
- data/std/net/session.mt +1157 -0
- data/std/net/stun.mt +252 -0
- data/std/net/sync.mt +183 -0
- data/std/net/turn.mt +459 -0
- data/std/net.mt +2944 -0
- data/std/oauth2.mt +408 -0
- data/std/option.mt +51 -0
- data/std/ordered_map.mt +497 -0
- data/std/ordered_set.mt +348 -0
- data/std/path.mt +368 -0
- data/std/pcre2/runtime.mt +35 -0
- data/std/pcre2.mt +78 -0
- data/std/priority_queue.mt +55 -0
- data/std/process.mt +837 -0
- data/std/queue.mt +55 -0
- data/std/random.mt +146 -0
- data/std/raygui.mt +99 -0
- data/std/raylib/debug_console.mt +71 -0
- data/std/raylib/easing.mt +388 -0
- data/std/raylib/packed_assets.mt +255 -0
- data/std/raylib/runtime.mt +30 -0
- data/std/raylib/tracy_gpu.mt +37 -0
- data/std/raylib.mt +1510 -0
- data/std/raymath.mt +153 -0
- data/std/result.mt +89 -0
- data/std/rlgl.mt +268 -0
- data/std/rpng.mt +46 -0
- data/std/rres.mt +36 -0
- data/std/sdl3/runtime.mt +54 -0
- data/std/sdl3.mt +1731 -0
- data/std/serialize.mt +68 -0
- data/std/set.mt +124 -0
- data/std/spatial.mt +176 -0
- data/std/sqlite3.mt +151 -0
- data/std/stack.mt +55 -0
- data/std/stb_image.mt +47 -0
- data/std/stb_image_resize2.mt +41 -0
- data/std/stb_image_write.mt +17 -0
- data/std/stb_rect_pack.mt +15 -0
- data/std/stb_truetype.mt +77 -0
- data/std/stb_vorbis.mt +16 -0
- data/std/stdio.mt +88 -0
- data/std/steamworks.mt +1542 -0
- data/std/str.mt +293 -0
- data/std/string.mt +234 -0
- data/std/sync.mt +194 -0
- data/std/tar.mt +704 -0
- data/std/terminal.mt +1002 -0
- data/std/testing.mt +266 -0
- data/std/thread.mt +120 -0
- data/std/time.mt +105 -0
- data/std/tls.mt +616 -0
- data/std/toml.mt +1310 -0
- data/std/tracy.mt +42 -0
- data/std/uri.mt +118 -0
- data/std/url.mt +372 -0
- data/std/vec.mt +433 -0
- data/std/zstd.mt +94 -0
- metadata +187 -2
data/std/c/box2d.mt
ADDED
|
@@ -0,0 +1,1254 @@
|
|
|
1
|
+
# generated by mtc bindgen from /home/teefan/Projects/Ruby/mt-lang/third_party/box2d-upstream/include/box2d/box2d.h
|
|
2
|
+
external
|
|
3
|
+
|
|
4
|
+
link "box2d"
|
|
5
|
+
include "box2d/box2d.h"
|
|
6
|
+
|
|
7
|
+
opaque b2TreeNode = c"struct b2TreeNode"
|
|
8
|
+
|
|
9
|
+
type b2AllocFcn = fn(arg0: uint, arg1: int) -> ptr[void]
|
|
10
|
+
type b2FreeFcn = fn(arg0: ptr[void]) -> void
|
|
11
|
+
type b2AssertFcn = fn(arg0: cstr, arg1: cstr, arg2: int) -> int
|
|
12
|
+
|
|
13
|
+
external function b2SetAllocator(allocFcn: ptr[b2AllocFcn], freeFcn: ptr[b2FreeFcn]) -> void
|
|
14
|
+
external function b2GetByteCount() -> int
|
|
15
|
+
external function b2SetAssertFcn(assertFcn: ptr[b2AssertFcn]) -> void
|
|
16
|
+
|
|
17
|
+
struct b2Version:
|
|
18
|
+
major: int
|
|
19
|
+
minor: int
|
|
20
|
+
revision: int
|
|
21
|
+
|
|
22
|
+
external function b2GetVersion() -> b2Version
|
|
23
|
+
external function b2InternalAssertFcn(condition: cstr, fileName: cstr, lineNumber: int) -> int
|
|
24
|
+
external function b2GetTicks() -> ulong
|
|
25
|
+
external function b2GetMilliseconds(ticks: ptr_uint) -> float
|
|
26
|
+
external function b2GetMillisecondsAndReset(ticks: ptr[ulong]) -> float
|
|
27
|
+
external function b2Yield() -> void
|
|
28
|
+
external function b2Hash(hash: uint, data: const_ptr[ubyte], count: int) -> uint
|
|
29
|
+
|
|
30
|
+
struct b2Vec2:
|
|
31
|
+
x: float
|
|
32
|
+
y: float
|
|
33
|
+
|
|
34
|
+
struct b2CosSin:
|
|
35
|
+
cosine: float
|
|
36
|
+
sine: float
|
|
37
|
+
|
|
38
|
+
struct b2Rot:
|
|
39
|
+
c: float
|
|
40
|
+
s: float
|
|
41
|
+
|
|
42
|
+
struct b2Transform:
|
|
43
|
+
p: b2Vec2
|
|
44
|
+
q: b2Rot
|
|
45
|
+
|
|
46
|
+
struct b2Mat22:
|
|
47
|
+
cx: b2Vec2
|
|
48
|
+
cy: b2Vec2
|
|
49
|
+
|
|
50
|
+
struct b2AABB:
|
|
51
|
+
lowerBound: b2Vec2
|
|
52
|
+
upperBound: b2Vec2
|
|
53
|
+
|
|
54
|
+
struct b2Plane:
|
|
55
|
+
normal: b2Vec2
|
|
56
|
+
offset: float
|
|
57
|
+
|
|
58
|
+
const b2Vec2_zero: b2Vec2 = b2Vec2(x = 0.0, y = 0.0)
|
|
59
|
+
const b2Rot_identity: b2Rot = b2Rot(c = 1.0, s = 0.0)
|
|
60
|
+
const b2Transform_identity: b2Transform = b2Transform(p = b2Vec2(x = 0.0, y = 0.0), q = b2Rot(c = 1.0, s = 0.0))
|
|
61
|
+
const b2Mat22_zero: b2Mat22 = b2Mat22(cx = b2Vec2(x = 0.0, y = 0.0), cy = b2Vec2(x = 0.0, y = 0.0))
|
|
62
|
+
|
|
63
|
+
external function b2IsValidFloat(a: float) -> bool
|
|
64
|
+
external function b2IsValidVec2(v: b2Vec2) -> bool
|
|
65
|
+
external function b2IsValidRotation(q: b2Rot) -> bool
|
|
66
|
+
external function b2IsValidAABB(aabb: b2AABB) -> bool
|
|
67
|
+
external function b2IsValidPlane(a: b2Plane) -> bool
|
|
68
|
+
external function b2Atan2(y: float, x: float) -> float
|
|
69
|
+
external function b2ComputeCosSin(radians: float) -> b2CosSin
|
|
70
|
+
external function b2ComputeRotationBetweenUnitVectors(v1: b2Vec2, v2: b2Vec2) -> b2Rot
|
|
71
|
+
external function b2SetLengthUnitsPerMeter(lengthUnits: float) -> void
|
|
72
|
+
external function b2GetLengthUnitsPerMeter() -> float
|
|
73
|
+
|
|
74
|
+
struct b2RayCastInput:
|
|
75
|
+
origin: b2Vec2
|
|
76
|
+
translation: b2Vec2
|
|
77
|
+
maxFraction: float
|
|
78
|
+
|
|
79
|
+
struct b2ShapeProxy:
|
|
80
|
+
points: array[b2Vec2, 8]
|
|
81
|
+
count: int
|
|
82
|
+
radius: float
|
|
83
|
+
|
|
84
|
+
struct b2ShapeCastInput:
|
|
85
|
+
proxy: b2ShapeProxy
|
|
86
|
+
translation: b2Vec2
|
|
87
|
+
maxFraction: float
|
|
88
|
+
canEncroach: bool
|
|
89
|
+
|
|
90
|
+
struct b2CastOutput:
|
|
91
|
+
normal: b2Vec2
|
|
92
|
+
point: b2Vec2
|
|
93
|
+
fraction: float
|
|
94
|
+
iterations: int
|
|
95
|
+
hit: bool
|
|
96
|
+
|
|
97
|
+
struct b2MassData:
|
|
98
|
+
mass: float
|
|
99
|
+
center: b2Vec2
|
|
100
|
+
rotationalInertia: float
|
|
101
|
+
|
|
102
|
+
struct b2Circle:
|
|
103
|
+
center: b2Vec2
|
|
104
|
+
radius: float
|
|
105
|
+
|
|
106
|
+
struct b2Capsule:
|
|
107
|
+
center1: b2Vec2
|
|
108
|
+
center2: b2Vec2
|
|
109
|
+
radius: float
|
|
110
|
+
|
|
111
|
+
struct b2Polygon:
|
|
112
|
+
vertices: array[b2Vec2, 8]
|
|
113
|
+
normals: array[b2Vec2, 8]
|
|
114
|
+
centroid: b2Vec2
|
|
115
|
+
radius: float
|
|
116
|
+
count: int
|
|
117
|
+
|
|
118
|
+
struct b2Segment:
|
|
119
|
+
point1: b2Vec2
|
|
120
|
+
point2: b2Vec2
|
|
121
|
+
|
|
122
|
+
struct b2ChainSegment:
|
|
123
|
+
ghost1: b2Vec2
|
|
124
|
+
segment: b2Segment
|
|
125
|
+
ghost2: b2Vec2
|
|
126
|
+
chainId: int
|
|
127
|
+
|
|
128
|
+
external function b2IsValidRay(input: const_ptr[b2RayCastInput]) -> bool
|
|
129
|
+
external function b2MakePolygon(hull: const_ptr[b2Hull], radius: float) -> b2Polygon
|
|
130
|
+
external function b2MakeOffsetPolygon(hull: const_ptr[b2Hull], position: b2Vec2, rotation: b2Rot) -> b2Polygon
|
|
131
|
+
external function b2MakeOffsetRoundedPolygon(hull: const_ptr[b2Hull], position: b2Vec2, rotation: b2Rot, radius: float) -> b2Polygon
|
|
132
|
+
external function b2MakeSquare(halfWidth: float) -> b2Polygon
|
|
133
|
+
external function b2MakeBox(halfWidth: float, halfHeight: float) -> b2Polygon
|
|
134
|
+
external function b2MakeRoundedBox(halfWidth: float, halfHeight: float, radius: float) -> b2Polygon
|
|
135
|
+
external function b2MakeOffsetBox(halfWidth: float, halfHeight: float, center: b2Vec2, rotation: b2Rot) -> b2Polygon
|
|
136
|
+
external function b2MakeOffsetRoundedBox(halfWidth: float, halfHeight: float, center: b2Vec2, rotation: b2Rot, radius: float) -> b2Polygon
|
|
137
|
+
external function b2TransformPolygon(transform: b2Transform, polygon: const_ptr[b2Polygon]) -> b2Polygon
|
|
138
|
+
external function b2ComputeCircleMass(shape: const_ptr[b2Circle], density: float) -> b2MassData
|
|
139
|
+
external function b2ComputeCapsuleMass(shape: const_ptr[b2Capsule], density: float) -> b2MassData
|
|
140
|
+
external function b2ComputePolygonMass(shape: const_ptr[b2Polygon], density: float) -> b2MassData
|
|
141
|
+
external function b2ComputeCircleAABB(shape: const_ptr[b2Circle], transform: b2Transform) -> b2AABB
|
|
142
|
+
external function b2ComputeCapsuleAABB(shape: const_ptr[b2Capsule], transform: b2Transform) -> b2AABB
|
|
143
|
+
external function b2ComputePolygonAABB(shape: const_ptr[b2Polygon], transform: b2Transform) -> b2AABB
|
|
144
|
+
external function b2ComputeSegmentAABB(shape: const_ptr[b2Segment], transform: b2Transform) -> b2AABB
|
|
145
|
+
external function b2PointInCircle(point: b2Vec2, shape: const_ptr[b2Circle]) -> bool
|
|
146
|
+
external function b2PointInCapsule(point: b2Vec2, shape: const_ptr[b2Capsule]) -> bool
|
|
147
|
+
external function b2PointInPolygon(point: b2Vec2, shape: const_ptr[b2Polygon]) -> bool
|
|
148
|
+
external function b2RayCastCircle(input: const_ptr[b2RayCastInput], shape: const_ptr[b2Circle]) -> b2CastOutput
|
|
149
|
+
external function b2RayCastCapsule(input: const_ptr[b2RayCastInput], shape: const_ptr[b2Capsule]) -> b2CastOutput
|
|
150
|
+
external function b2RayCastSegment(input: const_ptr[b2RayCastInput], shape: const_ptr[b2Segment], oneSided: bool) -> b2CastOutput
|
|
151
|
+
external function b2RayCastPolygon(input: const_ptr[b2RayCastInput], shape: const_ptr[b2Polygon]) -> b2CastOutput
|
|
152
|
+
external function b2ShapeCastCircle(input: const_ptr[b2ShapeCastInput], shape: const_ptr[b2Circle]) -> b2CastOutput
|
|
153
|
+
external function b2ShapeCastCapsule(input: const_ptr[b2ShapeCastInput], shape: const_ptr[b2Capsule]) -> b2CastOutput
|
|
154
|
+
external function b2ShapeCastSegment(input: const_ptr[b2ShapeCastInput], shape: const_ptr[b2Segment]) -> b2CastOutput
|
|
155
|
+
external function b2ShapeCastPolygon(input: const_ptr[b2ShapeCastInput], shape: const_ptr[b2Polygon]) -> b2CastOutput
|
|
156
|
+
|
|
157
|
+
struct b2Hull:
|
|
158
|
+
points: array[b2Vec2, 8]
|
|
159
|
+
count: int
|
|
160
|
+
|
|
161
|
+
external function b2ComputeHull(points: const_ptr[b2Vec2], count: int) -> b2Hull
|
|
162
|
+
external function b2ValidateHull(hull: const_ptr[b2Hull]) -> bool
|
|
163
|
+
|
|
164
|
+
struct b2SegmentDistanceResult:
|
|
165
|
+
closest1: b2Vec2
|
|
166
|
+
closest2: b2Vec2
|
|
167
|
+
fraction1: float
|
|
168
|
+
fraction2: float
|
|
169
|
+
distanceSquared: float
|
|
170
|
+
|
|
171
|
+
external function b2SegmentDistance(p1: b2Vec2, q1: b2Vec2, p2: b2Vec2, q2: b2Vec2) -> b2SegmentDistanceResult
|
|
172
|
+
|
|
173
|
+
struct b2SimplexCache:
|
|
174
|
+
count: ushort
|
|
175
|
+
indexA: array[ubyte, 3]
|
|
176
|
+
indexB: array[ubyte, 3]
|
|
177
|
+
|
|
178
|
+
const b2_emptySimplexCache: b2SimplexCache = b2SimplexCache(
|
|
179
|
+
count = 0,
|
|
180
|
+
indexA = array[ubyte, 3](0, 0, 0),
|
|
181
|
+
indexB = array[ubyte, 3](0, 0, 0)
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
struct b2DistanceInput:
|
|
185
|
+
proxyA: b2ShapeProxy
|
|
186
|
+
proxyB: b2ShapeProxy
|
|
187
|
+
transformA: b2Transform
|
|
188
|
+
transformB: b2Transform
|
|
189
|
+
useRadii: bool
|
|
190
|
+
|
|
191
|
+
struct b2DistanceOutput:
|
|
192
|
+
pointA: b2Vec2
|
|
193
|
+
pointB: b2Vec2
|
|
194
|
+
normal: b2Vec2
|
|
195
|
+
distance: float
|
|
196
|
+
iterations: int
|
|
197
|
+
simplexCount: int
|
|
198
|
+
|
|
199
|
+
struct b2SimplexVertex:
|
|
200
|
+
wA: b2Vec2
|
|
201
|
+
wB: b2Vec2
|
|
202
|
+
w: b2Vec2
|
|
203
|
+
a: float
|
|
204
|
+
indexA: int
|
|
205
|
+
indexB: int
|
|
206
|
+
|
|
207
|
+
struct b2Simplex:
|
|
208
|
+
v1: b2SimplexVertex
|
|
209
|
+
v2: b2SimplexVertex
|
|
210
|
+
v3: b2SimplexVertex
|
|
211
|
+
count: int
|
|
212
|
+
|
|
213
|
+
external function b2ShapeDistance(input: const_ptr[b2DistanceInput], cache: ptr[b2SimplexCache], simplexes: ptr[b2Simplex], simplexCapacity: int) -> b2DistanceOutput
|
|
214
|
+
|
|
215
|
+
struct b2ShapeCastPairInput:
|
|
216
|
+
proxyA: b2ShapeProxy
|
|
217
|
+
proxyB: b2ShapeProxy
|
|
218
|
+
transformA: b2Transform
|
|
219
|
+
transformB: b2Transform
|
|
220
|
+
translationB: b2Vec2
|
|
221
|
+
maxFraction: float
|
|
222
|
+
canEncroach: bool
|
|
223
|
+
|
|
224
|
+
external function b2ShapeCast(input: const_ptr[b2ShapeCastPairInput]) -> b2CastOutput
|
|
225
|
+
external function b2MakeProxy(points: const_ptr[b2Vec2], count: int, radius: float) -> b2ShapeProxy
|
|
226
|
+
external function b2MakeOffsetProxy(points: const_ptr[b2Vec2], count: int, radius: float, position: b2Vec2, rotation: b2Rot) -> b2ShapeProxy
|
|
227
|
+
|
|
228
|
+
struct b2Sweep:
|
|
229
|
+
localCenter: b2Vec2
|
|
230
|
+
c1: b2Vec2
|
|
231
|
+
c2: b2Vec2
|
|
232
|
+
q1: b2Rot
|
|
233
|
+
q2: b2Rot
|
|
234
|
+
|
|
235
|
+
external function b2GetSweepTransform(sweep: const_ptr[b2Sweep], time: float) -> b2Transform
|
|
236
|
+
|
|
237
|
+
struct b2TOIInput:
|
|
238
|
+
proxyA: b2ShapeProxy
|
|
239
|
+
proxyB: b2ShapeProxy
|
|
240
|
+
sweepA: b2Sweep
|
|
241
|
+
sweepB: b2Sweep
|
|
242
|
+
maxFraction: float
|
|
243
|
+
|
|
244
|
+
enum b2TOIState: int
|
|
245
|
+
b2_toiStateUnknown = 0
|
|
246
|
+
b2_toiStateFailed = 1
|
|
247
|
+
b2_toiStateOverlapped = 2
|
|
248
|
+
b2_toiStateHit = 3
|
|
249
|
+
b2_toiStateSeparated = 4
|
|
250
|
+
|
|
251
|
+
struct b2TOIOutput:
|
|
252
|
+
state: b2TOIState
|
|
253
|
+
fraction: float
|
|
254
|
+
|
|
255
|
+
external function b2TimeOfImpact(input: const_ptr[b2TOIInput]) -> b2TOIOutput
|
|
256
|
+
|
|
257
|
+
struct b2ManifoldPoint:
|
|
258
|
+
point: b2Vec2
|
|
259
|
+
anchorA: b2Vec2
|
|
260
|
+
anchorB: b2Vec2
|
|
261
|
+
separation: float
|
|
262
|
+
normalImpulse: float
|
|
263
|
+
tangentImpulse: float
|
|
264
|
+
totalNormalImpulse: float
|
|
265
|
+
normalVelocity: float
|
|
266
|
+
id: ushort
|
|
267
|
+
persisted: bool
|
|
268
|
+
|
|
269
|
+
struct b2Manifold:
|
|
270
|
+
normal: b2Vec2
|
|
271
|
+
rollingImpulse: float
|
|
272
|
+
points: array[b2ManifoldPoint, 2]
|
|
273
|
+
pointCount: int
|
|
274
|
+
|
|
275
|
+
external function b2CollideCircles(circleA: const_ptr[b2Circle], xfA: b2Transform, circleB: const_ptr[b2Circle], xfB: b2Transform) -> b2Manifold
|
|
276
|
+
external function b2CollideCapsuleAndCircle(capsuleA: const_ptr[b2Capsule], xfA: b2Transform, circleB: const_ptr[b2Circle], xfB: b2Transform) -> b2Manifold
|
|
277
|
+
external function b2CollideSegmentAndCircle(segmentA: const_ptr[b2Segment], xfA: b2Transform, circleB: const_ptr[b2Circle], xfB: b2Transform) -> b2Manifold
|
|
278
|
+
external function b2CollidePolygonAndCircle(polygonA: const_ptr[b2Polygon], xfA: b2Transform, circleB: const_ptr[b2Circle], xfB: b2Transform) -> b2Manifold
|
|
279
|
+
external function b2CollideCapsules(capsuleA: const_ptr[b2Capsule], xfA: b2Transform, capsuleB: const_ptr[b2Capsule], xfB: b2Transform) -> b2Manifold
|
|
280
|
+
external function b2CollideSegmentAndCapsule(segmentA: const_ptr[b2Segment], xfA: b2Transform, capsuleB: const_ptr[b2Capsule], xfB: b2Transform) -> b2Manifold
|
|
281
|
+
external function b2CollidePolygonAndCapsule(polygonA: const_ptr[b2Polygon], xfA: b2Transform, capsuleB: const_ptr[b2Capsule], xfB: b2Transform) -> b2Manifold
|
|
282
|
+
external function b2CollidePolygons(polygonA: const_ptr[b2Polygon], xfA: b2Transform, polygonB: const_ptr[b2Polygon], xfB: b2Transform) -> b2Manifold
|
|
283
|
+
external function b2CollideSegmentAndPolygon(segmentA: const_ptr[b2Segment], xfA: b2Transform, polygonB: const_ptr[b2Polygon], xfB: b2Transform) -> b2Manifold
|
|
284
|
+
external function b2CollideChainSegmentAndCircle(segmentA: const_ptr[b2ChainSegment], xfA: b2Transform, circleB: const_ptr[b2Circle], xfB: b2Transform) -> b2Manifold
|
|
285
|
+
external function b2CollideChainSegmentAndCapsule(segmentA: const_ptr[b2ChainSegment], xfA: b2Transform, capsuleB: const_ptr[b2Capsule], xfB: b2Transform, cache: ptr[b2SimplexCache]) -> b2Manifold
|
|
286
|
+
external function b2CollideChainSegmentAndPolygon(segmentA: const_ptr[b2ChainSegment], xfA: b2Transform, polygonB: const_ptr[b2Polygon], xfB: b2Transform, cache: ptr[b2SimplexCache]) -> b2Manifold
|
|
287
|
+
|
|
288
|
+
struct b2DynamicTree:
|
|
289
|
+
nodes: ptr[b2TreeNode]
|
|
290
|
+
root: int
|
|
291
|
+
nodeCount: int
|
|
292
|
+
nodeCapacity: int
|
|
293
|
+
freeList: int
|
|
294
|
+
proxyCount: int
|
|
295
|
+
leafIndices: ptr[int]
|
|
296
|
+
leafBoxes: ptr[b2AABB]
|
|
297
|
+
leafCenters: ptr[b2Vec2]
|
|
298
|
+
binIndices: ptr[int]
|
|
299
|
+
rebuildCapacity: int
|
|
300
|
+
|
|
301
|
+
struct b2TreeStats:
|
|
302
|
+
nodeVisits: int
|
|
303
|
+
leafVisits: int
|
|
304
|
+
|
|
305
|
+
external function b2DynamicTree_Create() -> b2DynamicTree
|
|
306
|
+
external function b2DynamicTree_Destroy(tree: ptr[b2DynamicTree]) -> void
|
|
307
|
+
external function b2DynamicTree_CreateProxy(tree: ptr[b2DynamicTree], aabb: b2AABB, categoryBits: ptr_uint, userData: ptr_uint) -> int
|
|
308
|
+
external function b2DynamicTree_DestroyProxy(tree: ptr[b2DynamicTree], proxyId: int) -> void
|
|
309
|
+
external function b2DynamicTree_MoveProxy(tree: ptr[b2DynamicTree], proxyId: int, aabb: b2AABB) -> void
|
|
310
|
+
external function b2DynamicTree_EnlargeProxy(tree: ptr[b2DynamicTree], proxyId: int, aabb: b2AABB) -> void
|
|
311
|
+
external function b2DynamicTree_SetCategoryBits(tree: ptr[b2DynamicTree], proxyId: int, categoryBits: ptr_uint) -> void
|
|
312
|
+
external function b2DynamicTree_GetCategoryBits(tree: ptr[b2DynamicTree], proxyId: int) -> ulong
|
|
313
|
+
|
|
314
|
+
type b2TreeQueryCallbackFcn = fn(arg0: int, arg1: ulong, arg2: ptr[void]) -> bool
|
|
315
|
+
|
|
316
|
+
external function b2DynamicTree_Query(tree: const_ptr[b2DynamicTree], aabb: b2AABB, maskBits: ptr_uint, callback: ptr[b2TreeQueryCallbackFcn], context: ptr[void]) -> b2TreeStats
|
|
317
|
+
|
|
318
|
+
type b2TreeRayCastCallbackFcn = fn(arg0: const_ptr[b2RayCastInput], arg1: int, arg2: ulong, arg3: ptr[void]) -> float
|
|
319
|
+
|
|
320
|
+
external function b2DynamicTree_RayCast(tree: const_ptr[b2DynamicTree], input: const_ptr[b2RayCastInput], maskBits: ptr_uint, callback: ptr[b2TreeRayCastCallbackFcn], context: ptr[void]) -> b2TreeStats
|
|
321
|
+
|
|
322
|
+
type b2TreeShapeCastCallbackFcn = fn(arg0: const_ptr[b2ShapeCastInput], arg1: int, arg2: ulong, arg3: ptr[void]) -> float
|
|
323
|
+
|
|
324
|
+
external function b2DynamicTree_ShapeCast(tree: const_ptr[b2DynamicTree], input: const_ptr[b2ShapeCastInput], maskBits: ptr_uint, callback: ptr[b2TreeShapeCastCallbackFcn], context: ptr[void]) -> b2TreeStats
|
|
325
|
+
external function b2DynamicTree_GetHeight(tree: const_ptr[b2DynamicTree]) -> int
|
|
326
|
+
external function b2DynamicTree_GetAreaRatio(tree: const_ptr[b2DynamicTree]) -> float
|
|
327
|
+
external function b2DynamicTree_GetRootBounds(tree: const_ptr[b2DynamicTree]) -> b2AABB
|
|
328
|
+
external function b2DynamicTree_GetProxyCount(tree: const_ptr[b2DynamicTree]) -> int
|
|
329
|
+
external function b2DynamicTree_Rebuild(tree: ptr[b2DynamicTree], fullBuild: bool) -> int
|
|
330
|
+
external function b2DynamicTree_GetByteCount(tree: const_ptr[b2DynamicTree]) -> int
|
|
331
|
+
external function b2DynamicTree_GetUserData(tree: const_ptr[b2DynamicTree], proxyId: int) -> ulong
|
|
332
|
+
external function b2DynamicTree_GetAABB(tree: const_ptr[b2DynamicTree], proxyId: int) -> b2AABB
|
|
333
|
+
external function b2DynamicTree_Validate(tree: const_ptr[b2DynamicTree]) -> void
|
|
334
|
+
external function b2DynamicTree_ValidateNoEnlarged(tree: const_ptr[b2DynamicTree]) -> void
|
|
335
|
+
|
|
336
|
+
struct b2PlaneResult:
|
|
337
|
+
plane: b2Plane
|
|
338
|
+
point: b2Vec2
|
|
339
|
+
hit: bool
|
|
340
|
+
|
|
341
|
+
struct b2CollisionPlane:
|
|
342
|
+
plane: b2Plane
|
|
343
|
+
pushLimit: float
|
|
344
|
+
push: float
|
|
345
|
+
clipVelocity: bool
|
|
346
|
+
|
|
347
|
+
struct b2PlaneSolverResult:
|
|
348
|
+
translation: b2Vec2
|
|
349
|
+
iterationCount: int
|
|
350
|
+
|
|
351
|
+
external function b2SolvePlanes(targetDelta: b2Vec2, planes: ptr[b2CollisionPlane], count: int) -> b2PlaneSolverResult
|
|
352
|
+
external function b2ClipVector(vector: b2Vec2, planes: const_ptr[b2CollisionPlane], count: int) -> b2Vec2
|
|
353
|
+
|
|
354
|
+
struct b2WorldId:
|
|
355
|
+
index1: ushort
|
|
356
|
+
generation: ushort
|
|
357
|
+
|
|
358
|
+
struct b2BodyId:
|
|
359
|
+
index1: int
|
|
360
|
+
world0: ushort
|
|
361
|
+
generation: ushort
|
|
362
|
+
|
|
363
|
+
struct b2ShapeId:
|
|
364
|
+
index1: int
|
|
365
|
+
world0: ushort
|
|
366
|
+
generation: ushort
|
|
367
|
+
|
|
368
|
+
struct b2ChainId:
|
|
369
|
+
index1: int
|
|
370
|
+
world0: ushort
|
|
371
|
+
generation: ushort
|
|
372
|
+
|
|
373
|
+
struct b2JointId:
|
|
374
|
+
index1: int
|
|
375
|
+
world0: ushort
|
|
376
|
+
generation: ushort
|
|
377
|
+
|
|
378
|
+
const b2_nullWorldId: b2WorldId = b2WorldId(index1 = 0, generation = 0)
|
|
379
|
+
const b2_nullBodyId: b2BodyId = b2BodyId(index1 = 0, world0 = 0, generation = 0)
|
|
380
|
+
const b2_nullShapeId: b2ShapeId = b2ShapeId(index1 = 0, world0 = 0, generation = 0)
|
|
381
|
+
const b2_nullChainId: b2ChainId = b2ChainId(index1 = 0, world0 = 0, generation = 0)
|
|
382
|
+
const b2_nullJointId: b2JointId = b2JointId(index1 = 0, world0 = 0, generation = 0)
|
|
383
|
+
|
|
384
|
+
type b2TaskCallback = fn(arg0: int, arg1: int, arg2: uint, arg3: ptr[void]) -> void
|
|
385
|
+
type b2EnqueueTaskCallback = fn(arg0: ptr[b2TaskCallback], arg1: int, arg2: int, arg3: ptr[void], arg4: ptr[void]) -> ptr[void]
|
|
386
|
+
type b2FinishTaskCallback = fn(arg0: ptr[void], arg1: ptr[void]) -> void
|
|
387
|
+
type b2FrictionCallback = fn(arg0: float, arg1: int, arg2: float, arg3: int) -> float
|
|
388
|
+
type b2RestitutionCallback = fn(arg0: float, arg1: int, arg2: float, arg3: int) -> float
|
|
389
|
+
|
|
390
|
+
struct b2RayResult:
|
|
391
|
+
shapeId: b2ShapeId
|
|
392
|
+
point: b2Vec2
|
|
393
|
+
normal: b2Vec2
|
|
394
|
+
fraction: float
|
|
395
|
+
nodeVisits: int
|
|
396
|
+
leafVisits: int
|
|
397
|
+
hit: bool
|
|
398
|
+
|
|
399
|
+
struct b2WorldDef:
|
|
400
|
+
gravity: b2Vec2
|
|
401
|
+
restitutionThreshold: float
|
|
402
|
+
hitEventThreshold: float
|
|
403
|
+
contactHertz: float
|
|
404
|
+
contactDampingRatio: float
|
|
405
|
+
maxContactPushSpeed: float
|
|
406
|
+
maximumLinearSpeed: float
|
|
407
|
+
frictionCallback: ptr[b2FrictionCallback]
|
|
408
|
+
restitutionCallback: ptr[b2RestitutionCallback]
|
|
409
|
+
enableSleep: bool
|
|
410
|
+
enableContinuous: bool
|
|
411
|
+
workerCount: int
|
|
412
|
+
enqueueTask: ptr[b2EnqueueTaskCallback]
|
|
413
|
+
finishTask: ptr[b2FinishTaskCallback]
|
|
414
|
+
userTaskContext: ptr[void]
|
|
415
|
+
userData: ptr[void]
|
|
416
|
+
internalValue: int
|
|
417
|
+
|
|
418
|
+
external function b2DefaultWorldDef() -> b2WorldDef
|
|
419
|
+
|
|
420
|
+
enum b2BodyType: int
|
|
421
|
+
b2_staticBody = 0
|
|
422
|
+
b2_kinematicBody = 1
|
|
423
|
+
b2_dynamicBody = 2
|
|
424
|
+
b2_bodyTypeCount = 3
|
|
425
|
+
|
|
426
|
+
struct b2BodyDef:
|
|
427
|
+
type_: b2BodyType
|
|
428
|
+
position: b2Vec2
|
|
429
|
+
rotation: b2Rot
|
|
430
|
+
linearVelocity: b2Vec2
|
|
431
|
+
angularVelocity: float
|
|
432
|
+
linearDamping: float
|
|
433
|
+
angularDamping: float
|
|
434
|
+
gravityScale: float
|
|
435
|
+
sleepThreshold: float
|
|
436
|
+
name: cstr
|
|
437
|
+
userData: ptr[void]
|
|
438
|
+
enableSleep: bool
|
|
439
|
+
isAwake: bool
|
|
440
|
+
fixedRotation: bool
|
|
441
|
+
isBullet: bool
|
|
442
|
+
isEnabled: bool
|
|
443
|
+
allowFastRotation: bool
|
|
444
|
+
internalValue: int
|
|
445
|
+
|
|
446
|
+
external function b2DefaultBodyDef() -> b2BodyDef
|
|
447
|
+
|
|
448
|
+
struct b2Filter:
|
|
449
|
+
categoryBits: ptr_uint
|
|
450
|
+
maskBits: ptr_uint
|
|
451
|
+
groupIndex: int
|
|
452
|
+
|
|
453
|
+
external function b2DefaultFilter() -> b2Filter
|
|
454
|
+
|
|
455
|
+
struct b2QueryFilter:
|
|
456
|
+
categoryBits: ptr_uint
|
|
457
|
+
maskBits: ptr_uint
|
|
458
|
+
|
|
459
|
+
external function b2DefaultQueryFilter() -> b2QueryFilter
|
|
460
|
+
|
|
461
|
+
enum b2ShapeType: int
|
|
462
|
+
b2_circleShape = 0
|
|
463
|
+
b2_capsuleShape = 1
|
|
464
|
+
b2_segmentShape = 2
|
|
465
|
+
b2_polygonShape = 3
|
|
466
|
+
b2_chainSegmentShape = 4
|
|
467
|
+
b2_shapeTypeCount = 5
|
|
468
|
+
|
|
469
|
+
struct b2SurfaceMaterial:
|
|
470
|
+
friction: float
|
|
471
|
+
restitution: float
|
|
472
|
+
rollingResistance: float
|
|
473
|
+
tangentSpeed: float
|
|
474
|
+
userMaterialId: int
|
|
475
|
+
customColor: uint
|
|
476
|
+
|
|
477
|
+
external function b2DefaultSurfaceMaterial() -> b2SurfaceMaterial
|
|
478
|
+
|
|
479
|
+
struct b2ShapeDef:
|
|
480
|
+
userData: ptr[void]
|
|
481
|
+
material: b2SurfaceMaterial
|
|
482
|
+
density: float
|
|
483
|
+
filter: b2Filter
|
|
484
|
+
isSensor: bool
|
|
485
|
+
enableSensorEvents: bool
|
|
486
|
+
enableContactEvents: bool
|
|
487
|
+
enableHitEvents: bool
|
|
488
|
+
enablePreSolveEvents: bool
|
|
489
|
+
invokeContactCreation: bool
|
|
490
|
+
updateBodyMass: bool
|
|
491
|
+
internalValue: int
|
|
492
|
+
|
|
493
|
+
external function b2DefaultShapeDef() -> b2ShapeDef
|
|
494
|
+
|
|
495
|
+
struct b2ChainDef:
|
|
496
|
+
userData: ptr[void]
|
|
497
|
+
points: const_ptr[b2Vec2]
|
|
498
|
+
count: int
|
|
499
|
+
materials: const_ptr[b2SurfaceMaterial]
|
|
500
|
+
materialCount: int
|
|
501
|
+
filter: b2Filter
|
|
502
|
+
isLoop: bool
|
|
503
|
+
enableSensorEvents: bool
|
|
504
|
+
internalValue: int
|
|
505
|
+
|
|
506
|
+
external function b2DefaultChainDef() -> b2ChainDef
|
|
507
|
+
|
|
508
|
+
struct b2Profile:
|
|
509
|
+
step: float
|
|
510
|
+
pairs: float
|
|
511
|
+
collide: float
|
|
512
|
+
solve: float
|
|
513
|
+
mergeIslands: float
|
|
514
|
+
prepareStages: float
|
|
515
|
+
solveConstraints: float
|
|
516
|
+
prepareConstraints: float
|
|
517
|
+
integrateVelocities: float
|
|
518
|
+
warmStart: float
|
|
519
|
+
solveImpulses: float
|
|
520
|
+
integratePositions: float
|
|
521
|
+
relaxImpulses: float
|
|
522
|
+
applyRestitution: float
|
|
523
|
+
storeImpulses: float
|
|
524
|
+
splitIslands: float
|
|
525
|
+
transforms: float
|
|
526
|
+
hitEvents: float
|
|
527
|
+
refit: float
|
|
528
|
+
bullets: float
|
|
529
|
+
sleepIslands: float
|
|
530
|
+
sensors: float
|
|
531
|
+
|
|
532
|
+
struct b2Counters:
|
|
533
|
+
bodyCount: int
|
|
534
|
+
shapeCount: int
|
|
535
|
+
contactCount: int
|
|
536
|
+
jointCount: int
|
|
537
|
+
islandCount: int
|
|
538
|
+
stackUsed: int
|
|
539
|
+
staticTreeHeight: int
|
|
540
|
+
treeHeight: int
|
|
541
|
+
byteCount: int
|
|
542
|
+
taskCount: int
|
|
543
|
+
colorCounts: array[int, 12]
|
|
544
|
+
|
|
545
|
+
enum b2JointType: int
|
|
546
|
+
b2_distanceJoint = 0
|
|
547
|
+
b2_filterJoint = 1
|
|
548
|
+
b2_motorJoint = 2
|
|
549
|
+
b2_mouseJoint = 3
|
|
550
|
+
b2_prismaticJoint = 4
|
|
551
|
+
b2_revoluteJoint = 5
|
|
552
|
+
b2_weldJoint = 6
|
|
553
|
+
b2_wheelJoint = 7
|
|
554
|
+
|
|
555
|
+
struct b2DistanceJointDef:
|
|
556
|
+
bodyIdA: b2BodyId
|
|
557
|
+
bodyIdB: b2BodyId
|
|
558
|
+
localAnchorA: b2Vec2
|
|
559
|
+
localAnchorB: b2Vec2
|
|
560
|
+
length: float
|
|
561
|
+
enableSpring: bool
|
|
562
|
+
hertz: float
|
|
563
|
+
dampingRatio: float
|
|
564
|
+
enableLimit: bool
|
|
565
|
+
minLength: float
|
|
566
|
+
maxLength: float
|
|
567
|
+
enableMotor: bool
|
|
568
|
+
maxMotorForce: float
|
|
569
|
+
motorSpeed: float
|
|
570
|
+
collideConnected: bool
|
|
571
|
+
userData: ptr[void]
|
|
572
|
+
internalValue: int
|
|
573
|
+
|
|
574
|
+
external function b2DefaultDistanceJointDef() -> b2DistanceJointDef
|
|
575
|
+
|
|
576
|
+
struct b2MotorJointDef:
|
|
577
|
+
bodyIdA: b2BodyId
|
|
578
|
+
bodyIdB: b2BodyId
|
|
579
|
+
linearOffset: b2Vec2
|
|
580
|
+
angularOffset: float
|
|
581
|
+
maxForce: float
|
|
582
|
+
maxTorque: float
|
|
583
|
+
correctionFactor: float
|
|
584
|
+
collideConnected: bool
|
|
585
|
+
userData: ptr[void]
|
|
586
|
+
internalValue: int
|
|
587
|
+
|
|
588
|
+
external function b2DefaultMotorJointDef() -> b2MotorJointDef
|
|
589
|
+
|
|
590
|
+
struct b2MouseJointDef:
|
|
591
|
+
bodyIdA: b2BodyId
|
|
592
|
+
bodyIdB: b2BodyId
|
|
593
|
+
target: b2Vec2
|
|
594
|
+
hertz: float
|
|
595
|
+
dampingRatio: float
|
|
596
|
+
maxForce: float
|
|
597
|
+
collideConnected: bool
|
|
598
|
+
userData: ptr[void]
|
|
599
|
+
internalValue: int
|
|
600
|
+
|
|
601
|
+
external function b2DefaultMouseJointDef() -> b2MouseJointDef
|
|
602
|
+
|
|
603
|
+
struct b2FilterJointDef:
|
|
604
|
+
bodyIdA: b2BodyId
|
|
605
|
+
bodyIdB: b2BodyId
|
|
606
|
+
userData: ptr[void]
|
|
607
|
+
internalValue: int
|
|
608
|
+
|
|
609
|
+
external function b2DefaultFilterJointDef() -> b2FilterJointDef
|
|
610
|
+
|
|
611
|
+
struct b2PrismaticJointDef:
|
|
612
|
+
bodyIdA: b2BodyId
|
|
613
|
+
bodyIdB: b2BodyId
|
|
614
|
+
localAnchorA: b2Vec2
|
|
615
|
+
localAnchorB: b2Vec2
|
|
616
|
+
localAxisA: b2Vec2
|
|
617
|
+
referenceAngle: float
|
|
618
|
+
targetTranslation: float
|
|
619
|
+
enableSpring: bool
|
|
620
|
+
hertz: float
|
|
621
|
+
dampingRatio: float
|
|
622
|
+
enableLimit: bool
|
|
623
|
+
lowerTranslation: float
|
|
624
|
+
upperTranslation: float
|
|
625
|
+
enableMotor: bool
|
|
626
|
+
maxMotorForce: float
|
|
627
|
+
motorSpeed: float
|
|
628
|
+
collideConnected: bool
|
|
629
|
+
userData: ptr[void]
|
|
630
|
+
internalValue: int
|
|
631
|
+
|
|
632
|
+
external function b2DefaultPrismaticJointDef() -> b2PrismaticJointDef
|
|
633
|
+
|
|
634
|
+
struct b2RevoluteJointDef:
|
|
635
|
+
bodyIdA: b2BodyId
|
|
636
|
+
bodyIdB: b2BodyId
|
|
637
|
+
localAnchorA: b2Vec2
|
|
638
|
+
localAnchorB: b2Vec2
|
|
639
|
+
referenceAngle: float
|
|
640
|
+
targetAngle: float
|
|
641
|
+
enableSpring: bool
|
|
642
|
+
hertz: float
|
|
643
|
+
dampingRatio: float
|
|
644
|
+
enableLimit: bool
|
|
645
|
+
lowerAngle: float
|
|
646
|
+
upperAngle: float
|
|
647
|
+
enableMotor: bool
|
|
648
|
+
maxMotorTorque: float
|
|
649
|
+
motorSpeed: float
|
|
650
|
+
drawSize: float
|
|
651
|
+
collideConnected: bool
|
|
652
|
+
userData: ptr[void]
|
|
653
|
+
internalValue: int
|
|
654
|
+
|
|
655
|
+
external function b2DefaultRevoluteJointDef() -> b2RevoluteJointDef
|
|
656
|
+
|
|
657
|
+
struct b2WeldJointDef:
|
|
658
|
+
bodyIdA: b2BodyId
|
|
659
|
+
bodyIdB: b2BodyId
|
|
660
|
+
localAnchorA: b2Vec2
|
|
661
|
+
localAnchorB: b2Vec2
|
|
662
|
+
referenceAngle: float
|
|
663
|
+
linearHertz: float
|
|
664
|
+
angularHertz: float
|
|
665
|
+
linearDampingRatio: float
|
|
666
|
+
angularDampingRatio: float
|
|
667
|
+
collideConnected: bool
|
|
668
|
+
userData: ptr[void]
|
|
669
|
+
internalValue: int
|
|
670
|
+
|
|
671
|
+
external function b2DefaultWeldJointDef() -> b2WeldJointDef
|
|
672
|
+
|
|
673
|
+
struct b2WheelJointDef:
|
|
674
|
+
bodyIdA: b2BodyId
|
|
675
|
+
bodyIdB: b2BodyId
|
|
676
|
+
localAnchorA: b2Vec2
|
|
677
|
+
localAnchorB: b2Vec2
|
|
678
|
+
localAxisA: b2Vec2
|
|
679
|
+
enableSpring: bool
|
|
680
|
+
hertz: float
|
|
681
|
+
dampingRatio: float
|
|
682
|
+
enableLimit: bool
|
|
683
|
+
lowerTranslation: float
|
|
684
|
+
upperTranslation: float
|
|
685
|
+
enableMotor: bool
|
|
686
|
+
maxMotorTorque: float
|
|
687
|
+
motorSpeed: float
|
|
688
|
+
collideConnected: bool
|
|
689
|
+
userData: ptr[void]
|
|
690
|
+
internalValue: int
|
|
691
|
+
|
|
692
|
+
external function b2DefaultWheelJointDef() -> b2WheelJointDef
|
|
693
|
+
|
|
694
|
+
struct b2ExplosionDef:
|
|
695
|
+
maskBits: ptr_uint
|
|
696
|
+
position: b2Vec2
|
|
697
|
+
radius: float
|
|
698
|
+
falloff: float
|
|
699
|
+
impulsePerLength: float
|
|
700
|
+
|
|
701
|
+
external function b2DefaultExplosionDef() -> b2ExplosionDef
|
|
702
|
+
|
|
703
|
+
struct b2SensorBeginTouchEvent:
|
|
704
|
+
sensorShapeId: b2ShapeId
|
|
705
|
+
visitorShapeId: b2ShapeId
|
|
706
|
+
|
|
707
|
+
struct b2SensorEndTouchEvent:
|
|
708
|
+
sensorShapeId: b2ShapeId
|
|
709
|
+
visitorShapeId: b2ShapeId
|
|
710
|
+
|
|
711
|
+
struct b2SensorEvents:
|
|
712
|
+
beginEvents: ptr[b2SensorBeginTouchEvent]
|
|
713
|
+
endEvents: ptr[b2SensorEndTouchEvent]
|
|
714
|
+
beginCount: int
|
|
715
|
+
endCount: int
|
|
716
|
+
|
|
717
|
+
struct b2ContactBeginTouchEvent:
|
|
718
|
+
shapeIdA: b2ShapeId
|
|
719
|
+
shapeIdB: b2ShapeId
|
|
720
|
+
manifold: b2Manifold
|
|
721
|
+
|
|
722
|
+
struct b2ContactEndTouchEvent:
|
|
723
|
+
shapeIdA: b2ShapeId
|
|
724
|
+
shapeIdB: b2ShapeId
|
|
725
|
+
|
|
726
|
+
struct b2ContactHitEvent:
|
|
727
|
+
shapeIdA: b2ShapeId
|
|
728
|
+
shapeIdB: b2ShapeId
|
|
729
|
+
point: b2Vec2
|
|
730
|
+
normal: b2Vec2
|
|
731
|
+
approachSpeed: float
|
|
732
|
+
|
|
733
|
+
struct b2ContactEvents:
|
|
734
|
+
beginEvents: ptr[b2ContactBeginTouchEvent]
|
|
735
|
+
endEvents: ptr[b2ContactEndTouchEvent]
|
|
736
|
+
hitEvents: ptr[b2ContactHitEvent]
|
|
737
|
+
beginCount: int
|
|
738
|
+
endCount: int
|
|
739
|
+
hitCount: int
|
|
740
|
+
|
|
741
|
+
struct b2BodyMoveEvent:
|
|
742
|
+
transform: b2Transform
|
|
743
|
+
bodyId: b2BodyId
|
|
744
|
+
userData: ptr[void]
|
|
745
|
+
fellAsleep: bool
|
|
746
|
+
|
|
747
|
+
struct b2BodyEvents:
|
|
748
|
+
moveEvents: ptr[b2BodyMoveEvent]
|
|
749
|
+
moveCount: int
|
|
750
|
+
|
|
751
|
+
struct b2ContactData:
|
|
752
|
+
shapeIdA: b2ShapeId
|
|
753
|
+
shapeIdB: b2ShapeId
|
|
754
|
+
manifold: b2Manifold
|
|
755
|
+
|
|
756
|
+
type b2CustomFilterFcn = fn(arg0: b2ShapeId, arg1: b2ShapeId, arg2: ptr[void]) -> bool
|
|
757
|
+
type b2PreSolveFcn = fn(arg0: b2ShapeId, arg1: b2ShapeId, arg2: ptr[b2Manifold], arg3: ptr[void]) -> bool
|
|
758
|
+
type b2OverlapResultFcn = fn(arg0: b2ShapeId, arg1: ptr[void]) -> bool
|
|
759
|
+
type b2CastResultFcn = fn(arg0: b2ShapeId, arg1: b2Vec2, arg2: b2Vec2, arg3: float, arg4: ptr[void]) -> float
|
|
760
|
+
type b2PlaneResultFcn = fn(arg0: b2ShapeId, arg1: const_ptr[b2PlaneResult], arg2: ptr[void]) -> bool
|
|
761
|
+
|
|
762
|
+
enum b2HexColor: int
|
|
763
|
+
b2_colorAliceBlue = 15792383
|
|
764
|
+
b2_colorAntiqueWhite = 16444375
|
|
765
|
+
b2_colorAqua = 65535
|
|
766
|
+
b2_colorAquamarine = 8388564
|
|
767
|
+
b2_colorAzure = 15794175
|
|
768
|
+
b2_colorBeige = 16119260
|
|
769
|
+
b2_colorBisque = 16770244
|
|
770
|
+
b2_colorBlack = 0
|
|
771
|
+
b2_colorBlanchedAlmond = 16772045
|
|
772
|
+
b2_colorBlue = 255
|
|
773
|
+
b2_colorBlueViolet = 9055202
|
|
774
|
+
b2_colorBrown = 10824234
|
|
775
|
+
b2_colorBurlywood = 14596231
|
|
776
|
+
b2_colorCadetBlue = 6266528
|
|
777
|
+
b2_colorChartreuse = 8388352
|
|
778
|
+
b2_colorChocolate = 13789470
|
|
779
|
+
b2_colorCoral = 16744272
|
|
780
|
+
b2_colorCornflowerBlue = 6591981
|
|
781
|
+
b2_colorCornsilk = 16775388
|
|
782
|
+
b2_colorCrimson = 14423100
|
|
783
|
+
b2_colorCyan = 65535
|
|
784
|
+
b2_colorDarkBlue = 139
|
|
785
|
+
b2_colorDarkCyan = 35723
|
|
786
|
+
b2_colorDarkGoldenRod = 12092939
|
|
787
|
+
b2_colorDarkGray = 11119017
|
|
788
|
+
b2_colorDarkGreen = 25600
|
|
789
|
+
b2_colorDarkKhaki = 12433259
|
|
790
|
+
b2_colorDarkMagenta = 9109643
|
|
791
|
+
b2_colorDarkOliveGreen = 5597999
|
|
792
|
+
b2_colorDarkOrange = 16747520
|
|
793
|
+
b2_colorDarkOrchid = 10040012
|
|
794
|
+
b2_colorDarkRed = 9109504
|
|
795
|
+
b2_colorDarkSalmon = 15308410
|
|
796
|
+
b2_colorDarkSeaGreen = 9419919
|
|
797
|
+
b2_colorDarkSlateBlue = 4734347
|
|
798
|
+
b2_colorDarkSlateGray = 3100495
|
|
799
|
+
b2_colorDarkTurquoise = 52945
|
|
800
|
+
b2_colorDarkViolet = 9699539
|
|
801
|
+
b2_colorDeepPink = 16716947
|
|
802
|
+
b2_colorDeepSkyBlue = 49151
|
|
803
|
+
b2_colorDimGray = 6908265
|
|
804
|
+
b2_colorDodgerBlue = 2003199
|
|
805
|
+
b2_colorFireBrick = 11674146
|
|
806
|
+
b2_colorFloralWhite = 16775920
|
|
807
|
+
b2_colorForestGreen = 2263842
|
|
808
|
+
b2_colorFuchsia = 16711935
|
|
809
|
+
b2_colorGainsboro = 14474460
|
|
810
|
+
b2_colorGhostWhite = 16316671
|
|
811
|
+
b2_colorGold = 16766720
|
|
812
|
+
b2_colorGoldenRod = 14329120
|
|
813
|
+
b2_colorGray = 8421504
|
|
814
|
+
b2_colorGreen = 32768
|
|
815
|
+
b2_colorGreenYellow = 11403055
|
|
816
|
+
b2_colorHoneyDew = 15794160
|
|
817
|
+
b2_colorHotPink = 16738740
|
|
818
|
+
b2_colorIndianRed = 13458524
|
|
819
|
+
b2_colorIndigo = 4915330
|
|
820
|
+
b2_colorIvory = 16777200
|
|
821
|
+
b2_colorKhaki = 15787660
|
|
822
|
+
b2_colorLavender = 15132410
|
|
823
|
+
b2_colorLavenderBlush = 16773365
|
|
824
|
+
b2_colorLawnGreen = 8190976
|
|
825
|
+
b2_colorLemonChiffon = 16775885
|
|
826
|
+
b2_colorLightBlue = 11393254
|
|
827
|
+
b2_colorLightCoral = 15761536
|
|
828
|
+
b2_colorLightCyan = 14745599
|
|
829
|
+
b2_colorLightGoldenRodYellow = 16448210
|
|
830
|
+
b2_colorLightGray = 13882323
|
|
831
|
+
b2_colorLightGreen = 9498256
|
|
832
|
+
b2_colorLightPink = 16758465
|
|
833
|
+
b2_colorLightSalmon = 16752762
|
|
834
|
+
b2_colorLightSeaGreen = 2142890
|
|
835
|
+
b2_colorLightSkyBlue = 8900346
|
|
836
|
+
b2_colorLightSlateGray = 7833753
|
|
837
|
+
b2_colorLightSteelBlue = 11584734
|
|
838
|
+
b2_colorLightYellow = 16777184
|
|
839
|
+
b2_colorLime = 65280
|
|
840
|
+
b2_colorLimeGreen = 3329330
|
|
841
|
+
b2_colorLinen = 16445670
|
|
842
|
+
b2_colorMagenta = 16711935
|
|
843
|
+
b2_colorMaroon = 8388608
|
|
844
|
+
b2_colorMediumAquaMarine = 6737322
|
|
845
|
+
b2_colorMediumBlue = 205
|
|
846
|
+
b2_colorMediumOrchid = 12211667
|
|
847
|
+
b2_colorMediumPurple = 9662683
|
|
848
|
+
b2_colorMediumSeaGreen = 3978097
|
|
849
|
+
b2_colorMediumSlateBlue = 8087790
|
|
850
|
+
b2_colorMediumSpringGreen = 64154
|
|
851
|
+
b2_colorMediumTurquoise = 4772300
|
|
852
|
+
b2_colorMediumVioletRed = 13047173
|
|
853
|
+
b2_colorMidnightBlue = 1644912
|
|
854
|
+
b2_colorMintCream = 16121850
|
|
855
|
+
b2_colorMistyRose = 16770273
|
|
856
|
+
b2_colorMoccasin = 16770229
|
|
857
|
+
b2_colorNavajoWhite = 16768685
|
|
858
|
+
b2_colorNavy = 128
|
|
859
|
+
b2_colorOldLace = 16643558
|
|
860
|
+
b2_colorOlive = 8421376
|
|
861
|
+
b2_colorOliveDrab = 7048739
|
|
862
|
+
b2_colorOrange = 16753920
|
|
863
|
+
b2_colorOrangeRed = 16729344
|
|
864
|
+
b2_colorOrchid = 14315734
|
|
865
|
+
b2_colorPaleGoldenRod = 15657130
|
|
866
|
+
b2_colorPaleGreen = 10025880
|
|
867
|
+
b2_colorPaleTurquoise = 11529966
|
|
868
|
+
b2_colorPaleVioletRed = 14381203
|
|
869
|
+
b2_colorPapayaWhip = 16773077
|
|
870
|
+
b2_colorPeachPuff = 16767673
|
|
871
|
+
b2_colorPeru = 13468991
|
|
872
|
+
b2_colorPink = 16761035
|
|
873
|
+
b2_colorPlum = 14524637
|
|
874
|
+
b2_colorPowderBlue = 11591910
|
|
875
|
+
b2_colorPurple = 8388736
|
|
876
|
+
b2_colorRebeccaPurple = 6697881
|
|
877
|
+
b2_colorRed = 16711680
|
|
878
|
+
b2_colorRosyBrown = 12357519
|
|
879
|
+
b2_colorRoyalBlue = 4286945
|
|
880
|
+
b2_colorSaddleBrown = 9127187
|
|
881
|
+
b2_colorSalmon = 16416882
|
|
882
|
+
b2_colorSandyBrown = 16032864
|
|
883
|
+
b2_colorSeaGreen = 3050327
|
|
884
|
+
b2_colorSeaShell = 16774638
|
|
885
|
+
b2_colorSienna = 10506797
|
|
886
|
+
b2_colorSilver = 12632256
|
|
887
|
+
b2_colorSkyBlue = 8900331
|
|
888
|
+
b2_colorSlateBlue = 6970061
|
|
889
|
+
b2_colorSlateGray = 7372944
|
|
890
|
+
b2_colorSnow = 16775930
|
|
891
|
+
b2_colorSpringGreen = 65407
|
|
892
|
+
b2_colorSteelBlue = 4620980
|
|
893
|
+
b2_colorTan = 13808780
|
|
894
|
+
b2_colorTeal = 32896
|
|
895
|
+
b2_colorThistle = 14204888
|
|
896
|
+
b2_colorTomato = 16737095
|
|
897
|
+
b2_colorTurquoise = 4251856
|
|
898
|
+
b2_colorViolet = 15631086
|
|
899
|
+
b2_colorWheat = 16113331
|
|
900
|
+
b2_colorWhite = 16777215
|
|
901
|
+
b2_colorWhiteSmoke = 16119285
|
|
902
|
+
b2_colorYellow = 16776960
|
|
903
|
+
b2_colorYellowGreen = 10145074
|
|
904
|
+
b2_colorBox2DRed = 14430514
|
|
905
|
+
b2_colorBox2DBlue = 3190463
|
|
906
|
+
b2_colorBox2DGreen = 9226532
|
|
907
|
+
b2_colorBox2DYellow = 16772748
|
|
908
|
+
|
|
909
|
+
struct b2DebugDraw:
|
|
910
|
+
DrawPolygonFcn: fn(arg0: const_ptr[b2Vec2], arg1: int, arg2: b2HexColor, arg3: ptr[void]) -> void
|
|
911
|
+
DrawSolidPolygonFcn: fn(arg0: b2Transform, arg1: const_ptr[b2Vec2], arg2: int, arg3: float, arg4: b2HexColor, arg5: ptr[void]) -> void
|
|
912
|
+
DrawCircleFcn: fn(arg0: b2Vec2, arg1: float, arg2: b2HexColor, arg3: ptr[void]) -> void
|
|
913
|
+
DrawSolidCircleFcn: fn(arg0: b2Transform, arg1: float, arg2: b2HexColor, arg3: ptr[void]) -> void
|
|
914
|
+
DrawSolidCapsuleFcn: fn(arg0: b2Vec2, arg1: b2Vec2, arg2: float, arg3: b2HexColor, arg4: ptr[void]) -> void
|
|
915
|
+
DrawSegmentFcn: fn(arg0: b2Vec2, arg1: b2Vec2, arg2: b2HexColor, arg3: ptr[void]) -> void
|
|
916
|
+
DrawTransformFcn: fn(arg0: b2Transform, arg1: ptr[void]) -> void
|
|
917
|
+
DrawPointFcn: fn(arg0: b2Vec2, arg1: float, arg2: b2HexColor, arg3: ptr[void]) -> void
|
|
918
|
+
DrawStringFcn: fn(arg0: b2Vec2, arg1: cstr, arg2: b2HexColor, arg3: ptr[void]) -> void
|
|
919
|
+
drawingBounds: b2AABB
|
|
920
|
+
useDrawingBounds: bool
|
|
921
|
+
drawShapes: bool
|
|
922
|
+
drawJoints: bool
|
|
923
|
+
drawJointExtras: bool
|
|
924
|
+
drawBounds: bool
|
|
925
|
+
drawMass: bool
|
|
926
|
+
drawBodyNames: bool
|
|
927
|
+
drawContacts: bool
|
|
928
|
+
drawGraphColors: bool
|
|
929
|
+
drawContactNormals: bool
|
|
930
|
+
drawContactImpulses: bool
|
|
931
|
+
drawContactFeatures: bool
|
|
932
|
+
drawFrictionImpulses: bool
|
|
933
|
+
drawIslands: bool
|
|
934
|
+
context: ptr[void]
|
|
935
|
+
|
|
936
|
+
external function b2DefaultDebugDraw() -> b2DebugDraw
|
|
937
|
+
external function b2CreateWorld(def: const_ptr[b2WorldDef]) -> b2WorldId
|
|
938
|
+
external function b2DestroyWorld(worldId: b2WorldId) -> void
|
|
939
|
+
external function b2World_IsValid(id: b2WorldId) -> bool
|
|
940
|
+
external function b2World_Step(worldId: b2WorldId, timeStep: float, subStepCount: int) -> void
|
|
941
|
+
external function b2World_Draw(worldId: b2WorldId, draw: ptr[b2DebugDraw]) -> void
|
|
942
|
+
external function b2World_GetBodyEvents(worldId: b2WorldId) -> b2BodyEvents
|
|
943
|
+
external function b2World_GetSensorEvents(worldId: b2WorldId) -> b2SensorEvents
|
|
944
|
+
external function b2World_GetContactEvents(worldId: b2WorldId) -> b2ContactEvents
|
|
945
|
+
external function b2World_OverlapAABB(worldId: b2WorldId, aabb: b2AABB, filter: b2QueryFilter, fcn: ptr[b2OverlapResultFcn], context: ptr[void]) -> b2TreeStats
|
|
946
|
+
external function b2World_OverlapShape(worldId: b2WorldId, proxy: const_ptr[b2ShapeProxy], filter: b2QueryFilter, fcn: ptr[b2OverlapResultFcn], context: ptr[void]) -> b2TreeStats
|
|
947
|
+
external function b2World_CastRay(worldId: b2WorldId, origin: b2Vec2, translation: b2Vec2, filter: b2QueryFilter, fcn: ptr[b2CastResultFcn], context: ptr[void]) -> b2TreeStats
|
|
948
|
+
external function b2World_CastRayClosest(worldId: b2WorldId, origin: b2Vec2, translation: b2Vec2, filter: b2QueryFilter) -> b2RayResult
|
|
949
|
+
external function b2World_CastShape(worldId: b2WorldId, proxy: const_ptr[b2ShapeProxy], translation: b2Vec2, filter: b2QueryFilter, fcn: ptr[b2CastResultFcn], context: ptr[void]) -> b2TreeStats
|
|
950
|
+
external function b2World_CastMover(worldId: b2WorldId, mover: const_ptr[b2Capsule], translation: b2Vec2, filter: b2QueryFilter) -> float
|
|
951
|
+
external function b2World_CollideMover(worldId: b2WorldId, mover: const_ptr[b2Capsule], filter: b2QueryFilter, fcn: ptr[b2PlaneResultFcn], context: ptr[void]) -> void
|
|
952
|
+
external function b2World_EnableSleeping(worldId: b2WorldId, flag: bool) -> void
|
|
953
|
+
external function b2World_IsSleepingEnabled(worldId: b2WorldId) -> bool
|
|
954
|
+
external function b2World_EnableContinuous(worldId: b2WorldId, flag: bool) -> void
|
|
955
|
+
external function b2World_IsContinuousEnabled(worldId: b2WorldId) -> bool
|
|
956
|
+
external function b2World_SetRestitutionThreshold(worldId: b2WorldId, value: float) -> void
|
|
957
|
+
external function b2World_GetRestitutionThreshold(worldId: b2WorldId) -> float
|
|
958
|
+
external function b2World_SetHitEventThreshold(worldId: b2WorldId, value: float) -> void
|
|
959
|
+
external function b2World_GetHitEventThreshold(worldId: b2WorldId) -> float
|
|
960
|
+
external function b2World_SetCustomFilterCallback(worldId: b2WorldId, fcn: ptr[b2CustomFilterFcn], context: ptr[void]) -> void
|
|
961
|
+
external function b2World_SetPreSolveCallback(worldId: b2WorldId, fcn: ptr[b2PreSolveFcn], context: ptr[void]) -> void
|
|
962
|
+
external function b2World_SetGravity(worldId: b2WorldId, gravity: b2Vec2) -> void
|
|
963
|
+
external function b2World_GetGravity(worldId: b2WorldId) -> b2Vec2
|
|
964
|
+
external function b2World_Explode(worldId: b2WorldId, explosionDef: const_ptr[b2ExplosionDef]) -> void
|
|
965
|
+
external function b2World_SetContactTuning(worldId: b2WorldId, hertz: float, dampingRatio: float, pushSpeed: float) -> void
|
|
966
|
+
external function b2World_SetMaximumLinearSpeed(worldId: b2WorldId, maximumLinearSpeed: float) -> void
|
|
967
|
+
external function b2World_GetMaximumLinearSpeed(worldId: b2WorldId) -> float
|
|
968
|
+
external function b2World_EnableWarmStarting(worldId: b2WorldId, flag: bool) -> void
|
|
969
|
+
external function b2World_IsWarmStartingEnabled(worldId: b2WorldId) -> bool
|
|
970
|
+
external function b2World_GetAwakeBodyCount(worldId: b2WorldId) -> int
|
|
971
|
+
external function b2World_GetProfile(worldId: b2WorldId) -> b2Profile
|
|
972
|
+
external function b2World_GetCounters(worldId: b2WorldId) -> b2Counters
|
|
973
|
+
external function b2World_SetUserData(worldId: b2WorldId, userData: ptr[void]) -> void
|
|
974
|
+
external function b2World_GetUserData(worldId: b2WorldId) -> ptr[void]
|
|
975
|
+
external function b2World_SetFrictionCallback(worldId: b2WorldId, callback: ptr[b2FrictionCallback]) -> void
|
|
976
|
+
external function b2World_SetRestitutionCallback(worldId: b2WorldId, callback: ptr[b2RestitutionCallback]) -> void
|
|
977
|
+
external function b2World_DumpMemoryStats(worldId: b2WorldId) -> void
|
|
978
|
+
external function b2World_RebuildStaticTree(worldId: b2WorldId) -> void
|
|
979
|
+
external function b2World_EnableSpeculative(worldId: b2WorldId, flag: bool) -> void
|
|
980
|
+
external function b2CreateBody(worldId: b2WorldId, def: const_ptr[b2BodyDef]) -> b2BodyId
|
|
981
|
+
external function b2DestroyBody(bodyId: b2BodyId) -> void
|
|
982
|
+
external function b2Body_IsValid(id: b2BodyId) -> bool
|
|
983
|
+
external function b2Body_GetType(bodyId: b2BodyId) -> b2BodyType
|
|
984
|
+
external function b2Body_SetType(bodyId: b2BodyId, type_: b2BodyType) -> void
|
|
985
|
+
external function b2Body_SetName(bodyId: b2BodyId, name: cstr) -> void
|
|
986
|
+
external function b2Body_GetName(bodyId: b2BodyId) -> cstr
|
|
987
|
+
external function b2Body_SetUserData(bodyId: b2BodyId, userData: ptr[void]) -> void
|
|
988
|
+
external function b2Body_GetUserData(bodyId: b2BodyId) -> ptr[void]
|
|
989
|
+
external function b2Body_GetPosition(bodyId: b2BodyId) -> b2Vec2
|
|
990
|
+
external function b2Body_GetRotation(bodyId: b2BodyId) -> b2Rot
|
|
991
|
+
external function b2Body_GetTransform(bodyId: b2BodyId) -> b2Transform
|
|
992
|
+
external function b2Body_SetTransform(bodyId: b2BodyId, position: b2Vec2, rotation: b2Rot) -> void
|
|
993
|
+
external function b2Body_GetLocalPoint(bodyId: b2BodyId, worldPoint: b2Vec2) -> b2Vec2
|
|
994
|
+
external function b2Body_GetWorldPoint(bodyId: b2BodyId, localPoint: b2Vec2) -> b2Vec2
|
|
995
|
+
external function b2Body_GetLocalVector(bodyId: b2BodyId, worldVector: b2Vec2) -> b2Vec2
|
|
996
|
+
external function b2Body_GetWorldVector(bodyId: b2BodyId, localVector: b2Vec2) -> b2Vec2
|
|
997
|
+
external function b2Body_GetLinearVelocity(bodyId: b2BodyId) -> b2Vec2
|
|
998
|
+
external function b2Body_GetAngularVelocity(bodyId: b2BodyId) -> float
|
|
999
|
+
external function b2Body_SetLinearVelocity(bodyId: b2BodyId, linearVelocity: b2Vec2) -> void
|
|
1000
|
+
external function b2Body_SetAngularVelocity(bodyId: b2BodyId, angularVelocity: float) -> void
|
|
1001
|
+
external function b2Body_SetTargetTransform(bodyId: b2BodyId, target: b2Transform, timeStep: float) -> void
|
|
1002
|
+
external function b2Body_GetLocalPointVelocity(bodyId: b2BodyId, localPoint: b2Vec2) -> b2Vec2
|
|
1003
|
+
external function b2Body_GetWorldPointVelocity(bodyId: b2BodyId, worldPoint: b2Vec2) -> b2Vec2
|
|
1004
|
+
external function b2Body_ApplyForce(bodyId: b2BodyId, force: b2Vec2, point: b2Vec2, wake: bool) -> void
|
|
1005
|
+
external function b2Body_ApplyForceToCenter(bodyId: b2BodyId, force: b2Vec2, wake: bool) -> void
|
|
1006
|
+
external function b2Body_ApplyTorque(bodyId: b2BodyId, torque: float, wake: bool) -> void
|
|
1007
|
+
external function b2Body_ApplyLinearImpulse(bodyId: b2BodyId, impulse: b2Vec2, point: b2Vec2, wake: bool) -> void
|
|
1008
|
+
external function b2Body_ApplyLinearImpulseToCenter(bodyId: b2BodyId, impulse: b2Vec2, wake: bool) -> void
|
|
1009
|
+
external function b2Body_ApplyAngularImpulse(bodyId: b2BodyId, impulse: float, wake: bool) -> void
|
|
1010
|
+
external function b2Body_GetMass(bodyId: b2BodyId) -> float
|
|
1011
|
+
external function b2Body_GetRotationalInertia(bodyId: b2BodyId) -> float
|
|
1012
|
+
external function b2Body_GetLocalCenterOfMass(bodyId: b2BodyId) -> b2Vec2
|
|
1013
|
+
external function b2Body_GetWorldCenterOfMass(bodyId: b2BodyId) -> b2Vec2
|
|
1014
|
+
external function b2Body_SetMassData(bodyId: b2BodyId, massData: b2MassData) -> void
|
|
1015
|
+
external function b2Body_GetMassData(bodyId: b2BodyId) -> b2MassData
|
|
1016
|
+
external function b2Body_ApplyMassFromShapes(bodyId: b2BodyId) -> void
|
|
1017
|
+
external function b2Body_SetLinearDamping(bodyId: b2BodyId, linearDamping: float) -> void
|
|
1018
|
+
external function b2Body_GetLinearDamping(bodyId: b2BodyId) -> float
|
|
1019
|
+
external function b2Body_SetAngularDamping(bodyId: b2BodyId, angularDamping: float) -> void
|
|
1020
|
+
external function b2Body_GetAngularDamping(bodyId: b2BodyId) -> float
|
|
1021
|
+
external function b2Body_SetGravityScale(bodyId: b2BodyId, gravityScale: float) -> void
|
|
1022
|
+
external function b2Body_GetGravityScale(bodyId: b2BodyId) -> float
|
|
1023
|
+
external function b2Body_IsAwake(bodyId: b2BodyId) -> bool
|
|
1024
|
+
external function b2Body_SetAwake(bodyId: b2BodyId, awake: bool) -> void
|
|
1025
|
+
external function b2Body_EnableSleep(bodyId: b2BodyId, enableSleep: bool) -> void
|
|
1026
|
+
external function b2Body_IsSleepEnabled(bodyId: b2BodyId) -> bool
|
|
1027
|
+
external function b2Body_SetSleepThreshold(bodyId: b2BodyId, sleepThreshold: float) -> void
|
|
1028
|
+
external function b2Body_GetSleepThreshold(bodyId: b2BodyId) -> float
|
|
1029
|
+
external function b2Body_IsEnabled(bodyId: b2BodyId) -> bool
|
|
1030
|
+
external function b2Body_Disable(bodyId: b2BodyId) -> void
|
|
1031
|
+
external function b2Body_Enable(bodyId: b2BodyId) -> void
|
|
1032
|
+
external function b2Body_SetFixedRotation(bodyId: b2BodyId, flag: bool) -> void
|
|
1033
|
+
external function b2Body_IsFixedRotation(bodyId: b2BodyId) -> bool
|
|
1034
|
+
external function b2Body_SetBullet(bodyId: b2BodyId, flag: bool) -> void
|
|
1035
|
+
external function b2Body_IsBullet(bodyId: b2BodyId) -> bool
|
|
1036
|
+
external function b2Body_EnableContactEvents(bodyId: b2BodyId, flag: bool) -> void
|
|
1037
|
+
external function b2Body_EnableHitEvents(bodyId: b2BodyId, flag: bool) -> void
|
|
1038
|
+
external function b2Body_GetWorld(bodyId: b2BodyId) -> b2WorldId
|
|
1039
|
+
external function b2Body_GetShapeCount(bodyId: b2BodyId) -> int
|
|
1040
|
+
external function b2Body_GetShapes(bodyId: b2BodyId, shapeArray: ptr[b2ShapeId], capacity: int) -> int
|
|
1041
|
+
external function b2Body_GetJointCount(bodyId: b2BodyId) -> int
|
|
1042
|
+
external function b2Body_GetJoints(bodyId: b2BodyId, jointArray: ptr[b2JointId], capacity: int) -> int
|
|
1043
|
+
external function b2Body_GetContactCapacity(bodyId: b2BodyId) -> int
|
|
1044
|
+
external function b2Body_GetContactData(bodyId: b2BodyId, contactData: ptr[b2ContactData], capacity: int) -> int
|
|
1045
|
+
external function b2Body_ComputeAABB(bodyId: b2BodyId) -> b2AABB
|
|
1046
|
+
external function b2CreateCircleShape(bodyId: b2BodyId, def: const_ptr[b2ShapeDef], circle: const_ptr[b2Circle]) -> b2ShapeId
|
|
1047
|
+
external function b2CreateSegmentShape(bodyId: b2BodyId, def: const_ptr[b2ShapeDef], segment: const_ptr[b2Segment]) -> b2ShapeId
|
|
1048
|
+
external function b2CreateCapsuleShape(bodyId: b2BodyId, def: const_ptr[b2ShapeDef], capsule: const_ptr[b2Capsule]) -> b2ShapeId
|
|
1049
|
+
external function b2CreatePolygonShape(bodyId: b2BodyId, def: const_ptr[b2ShapeDef], polygon: const_ptr[b2Polygon]) -> b2ShapeId
|
|
1050
|
+
external function b2DestroyShape(shapeId: b2ShapeId, updateBodyMass: bool) -> void
|
|
1051
|
+
external function b2Shape_IsValid(id: b2ShapeId) -> bool
|
|
1052
|
+
external function b2Shape_GetType(shapeId: b2ShapeId) -> b2ShapeType
|
|
1053
|
+
external function b2Shape_GetBody(shapeId: b2ShapeId) -> b2BodyId
|
|
1054
|
+
external function b2Shape_GetWorld(shapeId: b2ShapeId) -> b2WorldId
|
|
1055
|
+
external function b2Shape_IsSensor(shapeId: b2ShapeId) -> bool
|
|
1056
|
+
external function b2Shape_SetUserData(shapeId: b2ShapeId, userData: ptr[void]) -> void
|
|
1057
|
+
external function b2Shape_GetUserData(shapeId: b2ShapeId) -> ptr[void]
|
|
1058
|
+
external function b2Shape_SetDensity(shapeId: b2ShapeId, density: float, updateBodyMass: bool) -> void
|
|
1059
|
+
external function b2Shape_GetDensity(shapeId: b2ShapeId) -> float
|
|
1060
|
+
external function b2Shape_SetFriction(shapeId: b2ShapeId, friction: float) -> void
|
|
1061
|
+
external function b2Shape_GetFriction(shapeId: b2ShapeId) -> float
|
|
1062
|
+
external function b2Shape_SetRestitution(shapeId: b2ShapeId, restitution: float) -> void
|
|
1063
|
+
external function b2Shape_GetRestitution(shapeId: b2ShapeId) -> float
|
|
1064
|
+
external function b2Shape_SetMaterial(shapeId: b2ShapeId, material: int) -> void
|
|
1065
|
+
external function b2Shape_GetMaterial(shapeId: b2ShapeId) -> int
|
|
1066
|
+
external function b2Shape_SetSurfaceMaterial(shapeId: b2ShapeId, surfaceMaterial: b2SurfaceMaterial) -> void
|
|
1067
|
+
external function b2Shape_GetSurfaceMaterial(shapeId: b2ShapeId) -> b2SurfaceMaterial
|
|
1068
|
+
external function b2Shape_GetFilter(shapeId: b2ShapeId) -> b2Filter
|
|
1069
|
+
external function b2Shape_SetFilter(shapeId: b2ShapeId, filter: b2Filter) -> void
|
|
1070
|
+
external function b2Shape_EnableSensorEvents(shapeId: b2ShapeId, flag: bool) -> void
|
|
1071
|
+
external function b2Shape_AreSensorEventsEnabled(shapeId: b2ShapeId) -> bool
|
|
1072
|
+
external function b2Shape_EnableContactEvents(shapeId: b2ShapeId, flag: bool) -> void
|
|
1073
|
+
external function b2Shape_AreContactEventsEnabled(shapeId: b2ShapeId) -> bool
|
|
1074
|
+
external function b2Shape_EnablePreSolveEvents(shapeId: b2ShapeId, flag: bool) -> void
|
|
1075
|
+
external function b2Shape_ArePreSolveEventsEnabled(shapeId: b2ShapeId) -> bool
|
|
1076
|
+
external function b2Shape_EnableHitEvents(shapeId: b2ShapeId, flag: bool) -> void
|
|
1077
|
+
external function b2Shape_AreHitEventsEnabled(shapeId: b2ShapeId) -> bool
|
|
1078
|
+
external function b2Shape_TestPoint(shapeId: b2ShapeId, point: b2Vec2) -> bool
|
|
1079
|
+
external function b2Shape_RayCast(shapeId: b2ShapeId, input: const_ptr[b2RayCastInput]) -> b2CastOutput
|
|
1080
|
+
external function b2Shape_GetCircle(shapeId: b2ShapeId) -> b2Circle
|
|
1081
|
+
external function b2Shape_GetSegment(shapeId: b2ShapeId) -> b2Segment
|
|
1082
|
+
external function b2Shape_GetChainSegment(shapeId: b2ShapeId) -> b2ChainSegment
|
|
1083
|
+
external function b2Shape_GetCapsule(shapeId: b2ShapeId) -> b2Capsule
|
|
1084
|
+
external function b2Shape_GetPolygon(shapeId: b2ShapeId) -> b2Polygon
|
|
1085
|
+
external function b2Shape_SetCircle(shapeId: b2ShapeId, circle: const_ptr[b2Circle]) -> void
|
|
1086
|
+
external function b2Shape_SetCapsule(shapeId: b2ShapeId, capsule: const_ptr[b2Capsule]) -> void
|
|
1087
|
+
external function b2Shape_SetSegment(shapeId: b2ShapeId, segment: const_ptr[b2Segment]) -> void
|
|
1088
|
+
external function b2Shape_SetPolygon(shapeId: b2ShapeId, polygon: const_ptr[b2Polygon]) -> void
|
|
1089
|
+
external function b2Shape_GetParentChain(shapeId: b2ShapeId) -> b2ChainId
|
|
1090
|
+
external function b2Shape_GetContactCapacity(shapeId: b2ShapeId) -> int
|
|
1091
|
+
external function b2Shape_GetContactData(shapeId: b2ShapeId, contactData: ptr[b2ContactData], capacity: int) -> int
|
|
1092
|
+
external function b2Shape_GetSensorCapacity(shapeId: b2ShapeId) -> int
|
|
1093
|
+
external function b2Shape_GetSensorOverlaps(shapeId: b2ShapeId, overlaps: ptr[b2ShapeId], capacity: int) -> int
|
|
1094
|
+
external function b2Shape_GetAABB(shapeId: b2ShapeId) -> b2AABB
|
|
1095
|
+
external function b2Shape_GetMassData(shapeId: b2ShapeId) -> b2MassData
|
|
1096
|
+
external function b2Shape_GetClosestPoint(shapeId: b2ShapeId, target: b2Vec2) -> b2Vec2
|
|
1097
|
+
external function b2CreateChain(bodyId: b2BodyId, def: const_ptr[b2ChainDef]) -> b2ChainId
|
|
1098
|
+
external function b2DestroyChain(chainId: b2ChainId) -> void
|
|
1099
|
+
external function b2Chain_GetWorld(chainId: b2ChainId) -> b2WorldId
|
|
1100
|
+
external function b2Chain_GetSegmentCount(chainId: b2ChainId) -> int
|
|
1101
|
+
external function b2Chain_GetSegments(chainId: b2ChainId, segmentArray: ptr[b2ShapeId], capacity: int) -> int
|
|
1102
|
+
external function b2Chain_SetFriction(chainId: b2ChainId, friction: float) -> void
|
|
1103
|
+
external function b2Chain_GetFriction(chainId: b2ChainId) -> float
|
|
1104
|
+
external function b2Chain_SetRestitution(chainId: b2ChainId, restitution: float) -> void
|
|
1105
|
+
external function b2Chain_GetRestitution(chainId: b2ChainId) -> float
|
|
1106
|
+
external function b2Chain_SetMaterial(chainId: b2ChainId, material: int) -> void
|
|
1107
|
+
external function b2Chain_GetMaterial(chainId: b2ChainId) -> int
|
|
1108
|
+
external function b2Chain_IsValid(id: b2ChainId) -> bool
|
|
1109
|
+
external function b2DestroyJoint(jointId: b2JointId) -> void
|
|
1110
|
+
external function b2Joint_IsValid(id: b2JointId) -> bool
|
|
1111
|
+
external function b2Joint_GetType(jointId: b2JointId) -> b2JointType
|
|
1112
|
+
external function b2Joint_GetBodyA(jointId: b2JointId) -> b2BodyId
|
|
1113
|
+
external function b2Joint_GetBodyB(jointId: b2JointId) -> b2BodyId
|
|
1114
|
+
external function b2Joint_GetWorld(jointId: b2JointId) -> b2WorldId
|
|
1115
|
+
external function b2Joint_SetLocalAnchorA(jointId: b2JointId, localAnchor: b2Vec2) -> void
|
|
1116
|
+
external function b2Joint_GetLocalAnchorA(jointId: b2JointId) -> b2Vec2
|
|
1117
|
+
external function b2Joint_SetLocalAnchorB(jointId: b2JointId, localAnchor: b2Vec2) -> void
|
|
1118
|
+
external function b2Joint_GetLocalAnchorB(jointId: b2JointId) -> b2Vec2
|
|
1119
|
+
external function b2Joint_GetReferenceAngle(jointId: b2JointId) -> float
|
|
1120
|
+
external function b2Joint_SetReferenceAngle(jointId: b2JointId, angleInRadians: float) -> void
|
|
1121
|
+
external function b2Joint_SetLocalAxisA(jointId: b2JointId, localAxis: b2Vec2) -> void
|
|
1122
|
+
external function b2Joint_GetLocalAxisA(jointId: b2JointId) -> b2Vec2
|
|
1123
|
+
external function b2Joint_SetCollideConnected(jointId: b2JointId, shouldCollide: bool) -> void
|
|
1124
|
+
external function b2Joint_GetCollideConnected(jointId: b2JointId) -> bool
|
|
1125
|
+
external function b2Joint_SetUserData(jointId: b2JointId, userData: ptr[void]) -> void
|
|
1126
|
+
external function b2Joint_GetUserData(jointId: b2JointId) -> ptr[void]
|
|
1127
|
+
external function b2Joint_WakeBodies(jointId: b2JointId) -> void
|
|
1128
|
+
external function b2Joint_GetConstraintForce(jointId: b2JointId) -> b2Vec2
|
|
1129
|
+
external function b2Joint_GetConstraintTorque(jointId: b2JointId) -> float
|
|
1130
|
+
external function b2Joint_GetLinearSeparation(jointId: b2JointId) -> float
|
|
1131
|
+
external function b2Joint_GetAngularSeparation(jointId: b2JointId) -> float
|
|
1132
|
+
external function b2Joint_GetConstraintTuning(jointId: b2JointId, hertz: ptr[float], dampingRatio: ptr[float]) -> void
|
|
1133
|
+
external function b2Joint_SetConstraintTuning(jointId: b2JointId, hertz: float, dampingRatio: float) -> void
|
|
1134
|
+
external function b2CreateDistanceJoint(worldId: b2WorldId, def: const_ptr[b2DistanceJointDef]) -> b2JointId
|
|
1135
|
+
external function b2DistanceJoint_SetLength(jointId: b2JointId, length: float) -> void
|
|
1136
|
+
external function b2DistanceJoint_GetLength(jointId: b2JointId) -> float
|
|
1137
|
+
external function b2DistanceJoint_EnableSpring(jointId: b2JointId, enableSpring: bool) -> void
|
|
1138
|
+
external function b2DistanceJoint_IsSpringEnabled(jointId: b2JointId) -> bool
|
|
1139
|
+
external function b2DistanceJoint_SetSpringHertz(jointId: b2JointId, hertz: float) -> void
|
|
1140
|
+
external function b2DistanceJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: float) -> void
|
|
1141
|
+
external function b2DistanceJoint_GetSpringHertz(jointId: b2JointId) -> float
|
|
1142
|
+
external function b2DistanceJoint_GetSpringDampingRatio(jointId: b2JointId) -> float
|
|
1143
|
+
external function b2DistanceJoint_EnableLimit(jointId: b2JointId, enableLimit: bool) -> void
|
|
1144
|
+
external function b2DistanceJoint_IsLimitEnabled(jointId: b2JointId) -> bool
|
|
1145
|
+
external function b2DistanceJoint_SetLengthRange(jointId: b2JointId, minLength: float, maxLength: float) -> void
|
|
1146
|
+
external function b2DistanceJoint_GetMinLength(jointId: b2JointId) -> float
|
|
1147
|
+
external function b2DistanceJoint_GetMaxLength(jointId: b2JointId) -> float
|
|
1148
|
+
external function b2DistanceJoint_GetCurrentLength(jointId: b2JointId) -> float
|
|
1149
|
+
external function b2DistanceJoint_EnableMotor(jointId: b2JointId, enableMotor: bool) -> void
|
|
1150
|
+
external function b2DistanceJoint_IsMotorEnabled(jointId: b2JointId) -> bool
|
|
1151
|
+
external function b2DistanceJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: float) -> void
|
|
1152
|
+
external function b2DistanceJoint_GetMotorSpeed(jointId: b2JointId) -> float
|
|
1153
|
+
external function b2DistanceJoint_SetMaxMotorForce(jointId: b2JointId, force: float) -> void
|
|
1154
|
+
external function b2DistanceJoint_GetMaxMotorForce(jointId: b2JointId) -> float
|
|
1155
|
+
external function b2DistanceJoint_GetMotorForce(jointId: b2JointId) -> float
|
|
1156
|
+
external function b2CreateMotorJoint(worldId: b2WorldId, def: const_ptr[b2MotorJointDef]) -> b2JointId
|
|
1157
|
+
external function b2MotorJoint_SetLinearOffset(jointId: b2JointId, linearOffset: b2Vec2) -> void
|
|
1158
|
+
external function b2MotorJoint_GetLinearOffset(jointId: b2JointId) -> b2Vec2
|
|
1159
|
+
external function b2MotorJoint_SetAngularOffset(jointId: b2JointId, angularOffset: float) -> void
|
|
1160
|
+
external function b2MotorJoint_GetAngularOffset(jointId: b2JointId) -> float
|
|
1161
|
+
external function b2MotorJoint_SetMaxForce(jointId: b2JointId, maxForce: float) -> void
|
|
1162
|
+
external function b2MotorJoint_GetMaxForce(jointId: b2JointId) -> float
|
|
1163
|
+
external function b2MotorJoint_SetMaxTorque(jointId: b2JointId, maxTorque: float) -> void
|
|
1164
|
+
external function b2MotorJoint_GetMaxTorque(jointId: b2JointId) -> float
|
|
1165
|
+
external function b2MotorJoint_SetCorrectionFactor(jointId: b2JointId, correctionFactor: float) -> void
|
|
1166
|
+
external function b2MotorJoint_GetCorrectionFactor(jointId: b2JointId) -> float
|
|
1167
|
+
external function b2CreateMouseJoint(worldId: b2WorldId, def: const_ptr[b2MouseJointDef]) -> b2JointId
|
|
1168
|
+
external function b2MouseJoint_SetTarget(jointId: b2JointId, target: b2Vec2) -> void
|
|
1169
|
+
external function b2MouseJoint_GetTarget(jointId: b2JointId) -> b2Vec2
|
|
1170
|
+
external function b2MouseJoint_SetSpringHertz(jointId: b2JointId, hertz: float) -> void
|
|
1171
|
+
external function b2MouseJoint_GetSpringHertz(jointId: b2JointId) -> float
|
|
1172
|
+
external function b2MouseJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: float) -> void
|
|
1173
|
+
external function b2MouseJoint_GetSpringDampingRatio(jointId: b2JointId) -> float
|
|
1174
|
+
external function b2MouseJoint_SetMaxForce(jointId: b2JointId, maxForce: float) -> void
|
|
1175
|
+
external function b2MouseJoint_GetMaxForce(jointId: b2JointId) -> float
|
|
1176
|
+
external function b2CreateFilterJoint(worldId: b2WorldId, def: const_ptr[b2FilterJointDef]) -> b2JointId
|
|
1177
|
+
external function b2CreatePrismaticJoint(worldId: b2WorldId, def: const_ptr[b2PrismaticJointDef]) -> b2JointId
|
|
1178
|
+
external function b2PrismaticJoint_EnableSpring(jointId: b2JointId, enableSpring: bool) -> void
|
|
1179
|
+
external function b2PrismaticJoint_IsSpringEnabled(jointId: b2JointId) -> bool
|
|
1180
|
+
external function b2PrismaticJoint_SetSpringHertz(jointId: b2JointId, hertz: float) -> void
|
|
1181
|
+
external function b2PrismaticJoint_GetSpringHertz(jointId: b2JointId) -> float
|
|
1182
|
+
external function b2PrismaticJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: float) -> void
|
|
1183
|
+
external function b2PrismaticJoint_GetSpringDampingRatio(jointId: b2JointId) -> float
|
|
1184
|
+
external function b2PrismaticJoint_SetTargetTranslation(jointId: b2JointId, translation: float) -> void
|
|
1185
|
+
external function b2PrismaticJoint_GetTargetTranslation(jointId: b2JointId) -> float
|
|
1186
|
+
external function b2PrismaticJoint_EnableLimit(jointId: b2JointId, enableLimit: bool) -> void
|
|
1187
|
+
external function b2PrismaticJoint_IsLimitEnabled(jointId: b2JointId) -> bool
|
|
1188
|
+
external function b2PrismaticJoint_GetLowerLimit(jointId: b2JointId) -> float
|
|
1189
|
+
external function b2PrismaticJoint_GetUpperLimit(jointId: b2JointId) -> float
|
|
1190
|
+
external function b2PrismaticJoint_SetLimits(jointId: b2JointId, lower: float, upper: float) -> void
|
|
1191
|
+
external function b2PrismaticJoint_EnableMotor(jointId: b2JointId, enableMotor: bool) -> void
|
|
1192
|
+
external function b2PrismaticJoint_IsMotorEnabled(jointId: b2JointId) -> bool
|
|
1193
|
+
external function b2PrismaticJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: float) -> void
|
|
1194
|
+
external function b2PrismaticJoint_GetMotorSpeed(jointId: b2JointId) -> float
|
|
1195
|
+
external function b2PrismaticJoint_SetMaxMotorForce(jointId: b2JointId, force: float) -> void
|
|
1196
|
+
external function b2PrismaticJoint_GetMaxMotorForce(jointId: b2JointId) -> float
|
|
1197
|
+
external function b2PrismaticJoint_GetMotorForce(jointId: b2JointId) -> float
|
|
1198
|
+
external function b2PrismaticJoint_GetTranslation(jointId: b2JointId) -> float
|
|
1199
|
+
external function b2PrismaticJoint_GetSpeed(jointId: b2JointId) -> float
|
|
1200
|
+
external function b2CreateRevoluteJoint(worldId: b2WorldId, def: const_ptr[b2RevoluteJointDef]) -> b2JointId
|
|
1201
|
+
external function b2RevoluteJoint_EnableSpring(jointId: b2JointId, enableSpring: bool) -> void
|
|
1202
|
+
external function b2RevoluteJoint_IsSpringEnabled(jointId: b2JointId) -> bool
|
|
1203
|
+
external function b2RevoluteJoint_SetSpringHertz(jointId: b2JointId, hertz: float) -> void
|
|
1204
|
+
external function b2RevoluteJoint_GetSpringHertz(jointId: b2JointId) -> float
|
|
1205
|
+
external function b2RevoluteJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: float) -> void
|
|
1206
|
+
external function b2RevoluteJoint_GetSpringDampingRatio(jointId: b2JointId) -> float
|
|
1207
|
+
external function b2RevoluteJoint_SetTargetAngle(jointId: b2JointId, angle: float) -> void
|
|
1208
|
+
external function b2RevoluteJoint_GetTargetAngle(jointId: b2JointId) -> float
|
|
1209
|
+
external function b2RevoluteJoint_GetAngle(jointId: b2JointId) -> float
|
|
1210
|
+
external function b2RevoluteJoint_EnableLimit(jointId: b2JointId, enableLimit: bool) -> void
|
|
1211
|
+
external function b2RevoluteJoint_IsLimitEnabled(jointId: b2JointId) -> bool
|
|
1212
|
+
external function b2RevoluteJoint_GetLowerLimit(jointId: b2JointId) -> float
|
|
1213
|
+
external function b2RevoluteJoint_GetUpperLimit(jointId: b2JointId) -> float
|
|
1214
|
+
external function b2RevoluteJoint_SetLimits(jointId: b2JointId, lower: float, upper: float) -> void
|
|
1215
|
+
external function b2RevoluteJoint_EnableMotor(jointId: b2JointId, enableMotor: bool) -> void
|
|
1216
|
+
external function b2RevoluteJoint_IsMotorEnabled(jointId: b2JointId) -> bool
|
|
1217
|
+
external function b2RevoluteJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: float) -> void
|
|
1218
|
+
external function b2RevoluteJoint_GetMotorSpeed(jointId: b2JointId) -> float
|
|
1219
|
+
external function b2RevoluteJoint_GetMotorTorque(jointId: b2JointId) -> float
|
|
1220
|
+
external function b2RevoluteJoint_SetMaxMotorTorque(jointId: b2JointId, torque: float) -> void
|
|
1221
|
+
external function b2RevoluteJoint_GetMaxMotorTorque(jointId: b2JointId) -> float
|
|
1222
|
+
external function b2CreateWeldJoint(worldId: b2WorldId, def: const_ptr[b2WeldJointDef]) -> b2JointId
|
|
1223
|
+
external function b2WeldJoint_SetLinearHertz(jointId: b2JointId, hertz: float) -> void
|
|
1224
|
+
external function b2WeldJoint_GetLinearHertz(jointId: b2JointId) -> float
|
|
1225
|
+
external function b2WeldJoint_SetLinearDampingRatio(jointId: b2JointId, dampingRatio: float) -> void
|
|
1226
|
+
external function b2WeldJoint_GetLinearDampingRatio(jointId: b2JointId) -> float
|
|
1227
|
+
external function b2WeldJoint_SetAngularHertz(jointId: b2JointId, hertz: float) -> void
|
|
1228
|
+
external function b2WeldJoint_GetAngularHertz(jointId: b2JointId) -> float
|
|
1229
|
+
external function b2WeldJoint_SetAngularDampingRatio(jointId: b2JointId, dampingRatio: float) -> void
|
|
1230
|
+
external function b2WeldJoint_GetAngularDampingRatio(jointId: b2JointId) -> float
|
|
1231
|
+
external function b2CreateWheelJoint(worldId: b2WorldId, def: const_ptr[b2WheelJointDef]) -> b2JointId
|
|
1232
|
+
external function b2WheelJoint_EnableSpring(jointId: b2JointId, enableSpring: bool) -> void
|
|
1233
|
+
external function b2WheelJoint_IsSpringEnabled(jointId: b2JointId) -> bool
|
|
1234
|
+
external function b2WheelJoint_SetSpringHertz(jointId: b2JointId, hertz: float) -> void
|
|
1235
|
+
external function b2WheelJoint_GetSpringHertz(jointId: b2JointId) -> float
|
|
1236
|
+
external function b2WheelJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: float) -> void
|
|
1237
|
+
external function b2WheelJoint_GetSpringDampingRatio(jointId: b2JointId) -> float
|
|
1238
|
+
external function b2WheelJoint_EnableLimit(jointId: b2JointId, enableLimit: bool) -> void
|
|
1239
|
+
external function b2WheelJoint_IsLimitEnabled(jointId: b2JointId) -> bool
|
|
1240
|
+
external function b2WheelJoint_GetLowerLimit(jointId: b2JointId) -> float
|
|
1241
|
+
external function b2WheelJoint_GetUpperLimit(jointId: b2JointId) -> float
|
|
1242
|
+
external function b2WheelJoint_SetLimits(jointId: b2JointId, lower: float, upper: float) -> void
|
|
1243
|
+
external function b2WheelJoint_EnableMotor(jointId: b2JointId, enableMotor: bool) -> void
|
|
1244
|
+
external function b2WheelJoint_IsMotorEnabled(jointId: b2JointId) -> bool
|
|
1245
|
+
external function b2WheelJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: float) -> void
|
|
1246
|
+
external function b2WheelJoint_GetMotorSpeed(jointId: b2JointId) -> float
|
|
1247
|
+
external function b2WheelJoint_SetMaxMotorTorque(jointId: b2JointId, torque: float) -> void
|
|
1248
|
+
external function b2WheelJoint_GetMaxMotorTorque(jointId: b2JointId) -> float
|
|
1249
|
+
external function b2WheelJoint_GetMotorTorque(jointId: b2JointId) -> float
|
|
1250
|
+
|
|
1251
|
+
const B2_HASH_INIT: int = 5381
|
|
1252
|
+
const B2_PI: float = 3.14159274
|
|
1253
|
+
const B2_MAX_POLYGON_VERTICES: int = 8
|
|
1254
|
+
const B2_DEFAULT_CATEGORY_BITS: int = 1
|