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/box2d.mt
ADDED
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
# generated by mtc imported-bindings from std.c.box2d using bindings/imported/box2d.binding.json
|
|
2
|
+
|
|
3
|
+
import std.c.box2d as c
|
|
4
|
+
|
|
5
|
+
public type TreeNode = c.b2TreeNode
|
|
6
|
+
public type AllocFcn = c.b2AllocFcn
|
|
7
|
+
public type FreeFcn = c.b2FreeFcn
|
|
8
|
+
public type AssertFcn = c.b2AssertFcn
|
|
9
|
+
public type Version = c.b2Version
|
|
10
|
+
public type Vec2 = c.b2Vec2
|
|
11
|
+
public type CosSin = c.b2CosSin
|
|
12
|
+
public type Rot = c.b2Rot
|
|
13
|
+
public type Transform = c.b2Transform
|
|
14
|
+
public type Mat22 = c.b2Mat22
|
|
15
|
+
public type AABB = c.b2AABB
|
|
16
|
+
public type Plane = c.b2Plane
|
|
17
|
+
public type RayCastInput = c.b2RayCastInput
|
|
18
|
+
public type ShapeProxy = c.b2ShapeProxy
|
|
19
|
+
public type ShapeCastInput = c.b2ShapeCastInput
|
|
20
|
+
public type CastOutput = c.b2CastOutput
|
|
21
|
+
public type MassData = c.b2MassData
|
|
22
|
+
public type Circle = c.b2Circle
|
|
23
|
+
public type Capsule = c.b2Capsule
|
|
24
|
+
public type Polygon = c.b2Polygon
|
|
25
|
+
public type Segment = c.b2Segment
|
|
26
|
+
public type ChainSegment = c.b2ChainSegment
|
|
27
|
+
public type Hull = c.b2Hull
|
|
28
|
+
public type SegmentDistanceResult = c.b2SegmentDistanceResult
|
|
29
|
+
public type SimplexCache = c.b2SimplexCache
|
|
30
|
+
public type DistanceInput = c.b2DistanceInput
|
|
31
|
+
public type DistanceOutput = c.b2DistanceOutput
|
|
32
|
+
public type SimplexVertex = c.b2SimplexVertex
|
|
33
|
+
public type Simplex = c.b2Simplex
|
|
34
|
+
public type ShapeCastPairInput = c.b2ShapeCastPairInput
|
|
35
|
+
public type Sweep = c.b2Sweep
|
|
36
|
+
public type TOIInput = c.b2TOIInput
|
|
37
|
+
public type TOIState = c.b2TOIState
|
|
38
|
+
public type TOIOutput = c.b2TOIOutput
|
|
39
|
+
public type ManifoldPoint = c.b2ManifoldPoint
|
|
40
|
+
public type Manifold = c.b2Manifold
|
|
41
|
+
public type DynamicTree = c.b2DynamicTree
|
|
42
|
+
public type TreeStats = c.b2TreeStats
|
|
43
|
+
public type TreeQueryCallbackFcn = c.b2TreeQueryCallbackFcn
|
|
44
|
+
public type TreeRayCastCallbackFcn = c.b2TreeRayCastCallbackFcn
|
|
45
|
+
public type TreeShapeCastCallbackFcn = c.b2TreeShapeCastCallbackFcn
|
|
46
|
+
public type PlaneResult = c.b2PlaneResult
|
|
47
|
+
public type CollisionPlane = c.b2CollisionPlane
|
|
48
|
+
public type PlaneSolverResult = c.b2PlaneSolverResult
|
|
49
|
+
public type WorldId = c.b2WorldId
|
|
50
|
+
public type BodyId = c.b2BodyId
|
|
51
|
+
public type ShapeId = c.b2ShapeId
|
|
52
|
+
public type ChainId = c.b2ChainId
|
|
53
|
+
public type JointId = c.b2JointId
|
|
54
|
+
public type TaskCallback = c.b2TaskCallback
|
|
55
|
+
public type EnqueueTaskCallback = c.b2EnqueueTaskCallback
|
|
56
|
+
public type FinishTaskCallback = c.b2FinishTaskCallback
|
|
57
|
+
public type FrictionCallback = c.b2FrictionCallback
|
|
58
|
+
public type RestitutionCallback = c.b2RestitutionCallback
|
|
59
|
+
public type RayResult = c.b2RayResult
|
|
60
|
+
public type WorldDef = c.b2WorldDef
|
|
61
|
+
public type BodyType = c.b2BodyType
|
|
62
|
+
public type BodyDef = c.b2BodyDef
|
|
63
|
+
public type Filter = c.b2Filter
|
|
64
|
+
public type QueryFilter = c.b2QueryFilter
|
|
65
|
+
public type ShapeType = c.b2ShapeType
|
|
66
|
+
public type SurfaceMaterial = c.b2SurfaceMaterial
|
|
67
|
+
public type ShapeDef = c.b2ShapeDef
|
|
68
|
+
public type ChainDef = c.b2ChainDef
|
|
69
|
+
public type Profile = c.b2Profile
|
|
70
|
+
public type Counters = c.b2Counters
|
|
71
|
+
public type JointType = c.b2JointType
|
|
72
|
+
public type DistanceJointDef = c.b2DistanceJointDef
|
|
73
|
+
public type MotorJointDef = c.b2MotorJointDef
|
|
74
|
+
public type MouseJointDef = c.b2MouseJointDef
|
|
75
|
+
public type FilterJointDef = c.b2FilterJointDef
|
|
76
|
+
public type PrismaticJointDef = c.b2PrismaticJointDef
|
|
77
|
+
public type RevoluteJointDef = c.b2RevoluteJointDef
|
|
78
|
+
public type WeldJointDef = c.b2WeldJointDef
|
|
79
|
+
public type WheelJointDef = c.b2WheelJointDef
|
|
80
|
+
public type ExplosionDef = c.b2ExplosionDef
|
|
81
|
+
public type SensorBeginTouchEvent = c.b2SensorBeginTouchEvent
|
|
82
|
+
public type SensorEndTouchEvent = c.b2SensorEndTouchEvent
|
|
83
|
+
public type SensorEvents = c.b2SensorEvents
|
|
84
|
+
public type ContactBeginTouchEvent = c.b2ContactBeginTouchEvent
|
|
85
|
+
public type ContactEndTouchEvent = c.b2ContactEndTouchEvent
|
|
86
|
+
public type ContactHitEvent = c.b2ContactHitEvent
|
|
87
|
+
public type ContactEvents = c.b2ContactEvents
|
|
88
|
+
public type BodyMoveEvent = c.b2BodyMoveEvent
|
|
89
|
+
public type BodyEvents = c.b2BodyEvents
|
|
90
|
+
public type ContactData = c.b2ContactData
|
|
91
|
+
public type CustomFilterFcn = c.b2CustomFilterFcn
|
|
92
|
+
public type PreSolveFcn = c.b2PreSolveFcn
|
|
93
|
+
public type OverlapResultFcn = c.b2OverlapResultFcn
|
|
94
|
+
public type CastResultFcn = c.b2CastResultFcn
|
|
95
|
+
public type PlaneResultFcn = c.b2PlaneResultFcn
|
|
96
|
+
public type HexColor = c.b2HexColor
|
|
97
|
+
public type DebugDraw = c.b2DebugDraw
|
|
98
|
+
|
|
99
|
+
public const b2Vec2_zero: Vec2 = c.b2Vec2_zero
|
|
100
|
+
public const b2Rot_identity: Rot = c.b2Rot_identity
|
|
101
|
+
public const b2Transform_identity: Transform = c.b2Transform_identity
|
|
102
|
+
public const b2Mat22_zero: Mat22 = c.b2Mat22_zero
|
|
103
|
+
public const b2_emptySimplexCache: SimplexCache = c.b2_emptySimplexCache
|
|
104
|
+
public const b2_nullWorldId: WorldId = c.b2_nullWorldId
|
|
105
|
+
public const b2_nullBodyId: BodyId = c.b2_nullBodyId
|
|
106
|
+
public const b2_nullShapeId: ShapeId = c.b2_nullShapeId
|
|
107
|
+
public const b2_nullChainId: ChainId = c.b2_nullChainId
|
|
108
|
+
public const b2_nullJointId: JointId = c.b2_nullJointId
|
|
109
|
+
public const B2_HASH_INIT: int = c.B2_HASH_INIT
|
|
110
|
+
public const B2_PI: float = c.B2_PI
|
|
111
|
+
public const B2_MAX_POLYGON_VERTICES: int = c.B2_MAX_POLYGON_VERTICES
|
|
112
|
+
public const B2_DEFAULT_CATEGORY_BITS: int = c.B2_DEFAULT_CATEGORY_BITS
|
|
113
|
+
|
|
114
|
+
public foreign function set_allocator(alloc_fcn: ptr[AllocFcn], free_fcn: ptr[FreeFcn]) -> void = c.b2SetAllocator
|
|
115
|
+
public foreign function get_byte_count() -> int = c.b2GetByteCount
|
|
116
|
+
public foreign function set_assert_fcn(assert_fcn: ptr[AssertFcn]) -> void = c.b2SetAssertFcn
|
|
117
|
+
public foreign function get_version() -> Version = c.b2GetVersion
|
|
118
|
+
public foreign function internal_assert_fcn(condition: str as cstr, file_name: str as cstr, line_number: int) -> int = c.b2InternalAssertFcn
|
|
119
|
+
public foreign function get_ticks() -> ulong = c.b2GetTicks
|
|
120
|
+
public foreign function get_milliseconds(ticks: ptr_uint) -> float = c.b2GetMilliseconds
|
|
121
|
+
public foreign function get_milliseconds_and_reset(ticks: ptr[ulong]) -> float = c.b2GetMillisecondsAndReset
|
|
122
|
+
public foreign function yield() -> void = c.b2Yield
|
|
123
|
+
public foreign function hash(hash: uint, data: const_ptr[ubyte], count: int) -> uint = c.b2Hash
|
|
124
|
+
public foreign function is_valid_float(a: float) -> bool = c.b2IsValidFloat
|
|
125
|
+
public foreign function is_valid_vec2(v: Vec2) -> bool = c.b2IsValidVec2
|
|
126
|
+
public foreign function is_valid_rotation(q: Rot) -> bool = c.b2IsValidRotation
|
|
127
|
+
public foreign function is_valid_aabb(aabb: AABB) -> bool = c.b2IsValidAABB
|
|
128
|
+
public foreign function is_valid_plane(a: Plane) -> bool = c.b2IsValidPlane
|
|
129
|
+
public foreign function atan2(y: float, x: float) -> float = c.b2Atan2
|
|
130
|
+
public foreign function compute_cos_sin(radians: float) -> CosSin = c.b2ComputeCosSin
|
|
131
|
+
public foreign function compute_rotation_between_unit_vectors(v1: Vec2, v2: Vec2) -> Rot = c.b2ComputeRotationBetweenUnitVectors
|
|
132
|
+
public foreign function set_length_units_per_meter(length_units: float) -> void = c.b2SetLengthUnitsPerMeter
|
|
133
|
+
public foreign function get_length_units_per_meter() -> float = c.b2GetLengthUnitsPerMeter
|
|
134
|
+
public foreign function is_valid_ray(input: const_ptr[RayCastInput]) -> bool = c.b2IsValidRay
|
|
135
|
+
public foreign function make_polygon(hull: const_ptr[Hull], radius: float) -> Polygon = c.b2MakePolygon
|
|
136
|
+
public foreign function make_offset_polygon(hull: const_ptr[Hull], position: Vec2, rotation: Rot) -> Polygon = c.b2MakeOffsetPolygon
|
|
137
|
+
public foreign function make_offset_rounded_polygon(hull: const_ptr[Hull], position: Vec2, rotation: Rot, radius: float) -> Polygon = c.b2MakeOffsetRoundedPolygon
|
|
138
|
+
public foreign function make_square(half_width: float) -> Polygon = c.b2MakeSquare
|
|
139
|
+
public foreign function make_box(half_width: float, half_height: float) -> Polygon = c.b2MakeBox
|
|
140
|
+
public foreign function make_rounded_box(half_width: float, half_height: float, radius: float) -> Polygon = c.b2MakeRoundedBox
|
|
141
|
+
public foreign function make_offset_box(half_width: float, half_height: float, center: Vec2, rotation: Rot) -> Polygon = c.b2MakeOffsetBox
|
|
142
|
+
public foreign function make_offset_rounded_box(half_width: float, half_height: float, center: Vec2, rotation: Rot, radius: float) -> Polygon = c.b2MakeOffsetRoundedBox
|
|
143
|
+
public foreign function transform_polygon(transform: Transform, polygon: const_ptr[Polygon]) -> Polygon = c.b2TransformPolygon
|
|
144
|
+
public foreign function compute_circle_mass(shape: const_ptr[Circle], density: float) -> MassData = c.b2ComputeCircleMass
|
|
145
|
+
public foreign function compute_capsule_mass(shape: const_ptr[Capsule], density: float) -> MassData = c.b2ComputeCapsuleMass
|
|
146
|
+
public foreign function compute_polygon_mass(shape: const_ptr[Polygon], density: float) -> MassData = c.b2ComputePolygonMass
|
|
147
|
+
public foreign function compute_circle_aabb(shape: const_ptr[Circle], transform: Transform) -> AABB = c.b2ComputeCircleAABB
|
|
148
|
+
public foreign function compute_capsule_aabb(shape: const_ptr[Capsule], transform: Transform) -> AABB = c.b2ComputeCapsuleAABB
|
|
149
|
+
public foreign function compute_polygon_aabb(shape: const_ptr[Polygon], transform: Transform) -> AABB = c.b2ComputePolygonAABB
|
|
150
|
+
public foreign function compute_segment_aabb(shape: const_ptr[Segment], transform: Transform) -> AABB = c.b2ComputeSegmentAABB
|
|
151
|
+
public foreign function point_in_circle(point: Vec2, shape: const_ptr[Circle]) -> bool = c.b2PointInCircle
|
|
152
|
+
public foreign function point_in_capsule(point: Vec2, shape: const_ptr[Capsule]) -> bool = c.b2PointInCapsule
|
|
153
|
+
public foreign function point_in_polygon(point: Vec2, shape: const_ptr[Polygon]) -> bool = c.b2PointInPolygon
|
|
154
|
+
public foreign function ray_cast_circle(input: const_ptr[RayCastInput], shape: const_ptr[Circle]) -> CastOutput = c.b2RayCastCircle
|
|
155
|
+
public foreign function ray_cast_capsule(input: const_ptr[RayCastInput], shape: const_ptr[Capsule]) -> CastOutput = c.b2RayCastCapsule
|
|
156
|
+
public foreign function ray_cast_segment(input: const_ptr[RayCastInput], shape: const_ptr[Segment], one_sided: bool) -> CastOutput = c.b2RayCastSegment
|
|
157
|
+
public foreign function ray_cast_polygon(input: const_ptr[RayCastInput], shape: const_ptr[Polygon]) -> CastOutput = c.b2RayCastPolygon
|
|
158
|
+
public foreign function shape_cast_circle(input: const_ptr[ShapeCastInput], shape: const_ptr[Circle]) -> CastOutput = c.b2ShapeCastCircle
|
|
159
|
+
public foreign function shape_cast_capsule(input: const_ptr[ShapeCastInput], shape: const_ptr[Capsule]) -> CastOutput = c.b2ShapeCastCapsule
|
|
160
|
+
public foreign function shape_cast_segment(input: const_ptr[ShapeCastInput], shape: const_ptr[Segment]) -> CastOutput = c.b2ShapeCastSegment
|
|
161
|
+
public foreign function shape_cast_polygon(input: const_ptr[ShapeCastInput], shape: const_ptr[Polygon]) -> CastOutput = c.b2ShapeCastPolygon
|
|
162
|
+
public foreign function compute_hull(points: const_ptr[Vec2], count: int) -> Hull = c.b2ComputeHull
|
|
163
|
+
public foreign function validate_hull(hull: const_ptr[Hull]) -> bool = c.b2ValidateHull
|
|
164
|
+
public foreign function segment_distance(p1: Vec2, q1: Vec2, p2: Vec2, q2: Vec2) -> SegmentDistanceResult = c.b2SegmentDistance
|
|
165
|
+
public foreign function shape_distance(input: const_ptr[DistanceInput], cache: ptr[SimplexCache], simplexes: ptr[Simplex], simplex_capacity: int) -> DistanceOutput = c.b2ShapeDistance
|
|
166
|
+
public foreign function shape_cast(input: const_ptr[ShapeCastPairInput]) -> CastOutput = c.b2ShapeCast
|
|
167
|
+
public foreign function make_proxy(points: const_ptr[Vec2], count: int, radius: float) -> ShapeProxy = c.b2MakeProxy
|
|
168
|
+
public foreign function make_offset_proxy(points: const_ptr[Vec2], count: int, radius: float, position: Vec2, rotation: Rot) -> ShapeProxy = c.b2MakeOffsetProxy
|
|
169
|
+
public foreign function get_sweep_transform(sweep: const_ptr[Sweep], time: float) -> Transform = c.b2GetSweepTransform
|
|
170
|
+
public foreign function time_of_impact(input: const_ptr[TOIInput]) -> TOIOutput = c.b2TimeOfImpact
|
|
171
|
+
public foreign function collide_circles(circle_a: const_ptr[Circle], xf_a: Transform, circle_b: const_ptr[Circle], xf_b: Transform) -> Manifold = c.b2CollideCircles
|
|
172
|
+
public foreign function collide_capsule_and_circle(capsule_a: const_ptr[Capsule], xf_a: Transform, circle_b: const_ptr[Circle], xf_b: Transform) -> Manifold = c.b2CollideCapsuleAndCircle
|
|
173
|
+
public foreign function collide_segment_and_circle(segment_a: const_ptr[Segment], xf_a: Transform, circle_b: const_ptr[Circle], xf_b: Transform) -> Manifold = c.b2CollideSegmentAndCircle
|
|
174
|
+
public foreign function collide_polygon_and_circle(polygon_a: const_ptr[Polygon], xf_a: Transform, circle_b: const_ptr[Circle], xf_b: Transform) -> Manifold = c.b2CollidePolygonAndCircle
|
|
175
|
+
public foreign function collide_capsules(capsule_a: const_ptr[Capsule], xf_a: Transform, capsule_b: const_ptr[Capsule], xf_b: Transform) -> Manifold = c.b2CollideCapsules
|
|
176
|
+
public foreign function collide_segment_and_capsule(segment_a: const_ptr[Segment], xf_a: Transform, capsule_b: const_ptr[Capsule], xf_b: Transform) -> Manifold = c.b2CollideSegmentAndCapsule
|
|
177
|
+
public foreign function collide_polygon_and_capsule(polygon_a: const_ptr[Polygon], xf_a: Transform, capsule_b: const_ptr[Capsule], xf_b: Transform) -> Manifold = c.b2CollidePolygonAndCapsule
|
|
178
|
+
public foreign function collide_polygons(polygon_a: const_ptr[Polygon], xf_a: Transform, polygon_b: const_ptr[Polygon], xf_b: Transform) -> Manifold = c.b2CollidePolygons
|
|
179
|
+
public foreign function collide_segment_and_polygon(segment_a: const_ptr[Segment], xf_a: Transform, polygon_b: const_ptr[Polygon], xf_b: Transform) -> Manifold = c.b2CollideSegmentAndPolygon
|
|
180
|
+
public foreign function collide_chain_segment_and_circle(segment_a: const_ptr[ChainSegment], xf_a: Transform, circle_b: const_ptr[Circle], xf_b: Transform) -> Manifold = c.b2CollideChainSegmentAndCircle
|
|
181
|
+
public foreign function collide_chain_segment_and_capsule(segment_a: const_ptr[ChainSegment], xf_a: Transform, capsule_b: const_ptr[Capsule], xf_b: Transform, cache: ptr[SimplexCache]) -> Manifold = c.b2CollideChainSegmentAndCapsule
|
|
182
|
+
public foreign function collide_chain_segment_and_polygon(segment_a: const_ptr[ChainSegment], xf_a: Transform, polygon_b: const_ptr[Polygon], xf_b: Transform, cache: ptr[SimplexCache]) -> Manifold = c.b2CollideChainSegmentAndPolygon
|
|
183
|
+
public foreign function dynamic_tree_create() -> DynamicTree = c.b2DynamicTree_Create
|
|
184
|
+
public foreign function dynamic_tree_destroy(tree: ptr[DynamicTree]) -> void = c.b2DynamicTree_Destroy
|
|
185
|
+
public foreign function dynamic_tree_create_proxy(tree: ptr[DynamicTree], aabb: AABB, category_bits: ptr_uint, user_data: ptr_uint) -> int = c.b2DynamicTree_CreateProxy
|
|
186
|
+
public foreign function dynamic_tree_destroy_proxy(tree: ptr[DynamicTree], proxy_id: int) -> void = c.b2DynamicTree_DestroyProxy
|
|
187
|
+
public foreign function dynamic_tree_move_proxy(tree: ptr[DynamicTree], proxy_id: int, aabb: AABB) -> void = c.b2DynamicTree_MoveProxy
|
|
188
|
+
public foreign function dynamic_tree_enlarge_proxy(tree: ptr[DynamicTree], proxy_id: int, aabb: AABB) -> void = c.b2DynamicTree_EnlargeProxy
|
|
189
|
+
public foreign function dynamic_tree_set_category_bits(tree: ptr[DynamicTree], proxy_id: int, category_bits: ptr_uint) -> void = c.b2DynamicTree_SetCategoryBits
|
|
190
|
+
public foreign function dynamic_tree_get_category_bits(tree: ptr[DynamicTree], proxy_id: int) -> ulong = c.b2DynamicTree_GetCategoryBits
|
|
191
|
+
public foreign function dynamic_tree_query(tree: const_ptr[DynamicTree], aabb: AABB, mask_bits: ptr_uint, callback: ptr[TreeQueryCallbackFcn], context: ptr[void]) -> TreeStats = c.b2DynamicTree_Query
|
|
192
|
+
public foreign function dynamic_tree_ray_cast(tree: const_ptr[DynamicTree], input: const_ptr[RayCastInput], mask_bits: ptr_uint, callback: ptr[TreeRayCastCallbackFcn], context: ptr[void]) -> TreeStats = c.b2DynamicTree_RayCast
|
|
193
|
+
public foreign function dynamic_tree_shape_cast(tree: const_ptr[DynamicTree], input: const_ptr[ShapeCastInput], mask_bits: ptr_uint, callback: ptr[TreeShapeCastCallbackFcn], context: ptr[void]) -> TreeStats = c.b2DynamicTree_ShapeCast
|
|
194
|
+
public foreign function dynamic_tree_get_height(tree: const_ptr[DynamicTree]) -> int = c.b2DynamicTree_GetHeight
|
|
195
|
+
public foreign function dynamic_tree_get_area_ratio(tree: const_ptr[DynamicTree]) -> float = c.b2DynamicTree_GetAreaRatio
|
|
196
|
+
public foreign function dynamic_tree_get_root_bounds(tree: const_ptr[DynamicTree]) -> AABB = c.b2DynamicTree_GetRootBounds
|
|
197
|
+
public foreign function dynamic_tree_get_proxy_count(tree: const_ptr[DynamicTree]) -> int = c.b2DynamicTree_GetProxyCount
|
|
198
|
+
public foreign function dynamic_tree_rebuild(tree: ptr[DynamicTree], full_build: bool) -> int = c.b2DynamicTree_Rebuild
|
|
199
|
+
public foreign function dynamic_tree_get_byte_count(tree: const_ptr[DynamicTree]) -> int = c.b2DynamicTree_GetByteCount
|
|
200
|
+
public foreign function dynamic_tree_get_user_data(tree: const_ptr[DynamicTree], proxy_id: int) -> ulong = c.b2DynamicTree_GetUserData
|
|
201
|
+
public foreign function dynamic_tree_get_aabb(tree: const_ptr[DynamicTree], proxy_id: int) -> AABB = c.b2DynamicTree_GetAABB
|
|
202
|
+
public foreign function dynamic_tree_validate(tree: const_ptr[DynamicTree]) -> void = c.b2DynamicTree_Validate
|
|
203
|
+
public foreign function dynamic_tree_validate_no_enlarged(tree: const_ptr[DynamicTree]) -> void = c.b2DynamicTree_ValidateNoEnlarged
|
|
204
|
+
public foreign function solve_planes(target_delta: Vec2, planes: ptr[CollisionPlane], count: int) -> PlaneSolverResult = c.b2SolvePlanes
|
|
205
|
+
public foreign function clip_vector(vector: Vec2, planes: const_ptr[CollisionPlane], count: int) -> Vec2 = c.b2ClipVector
|
|
206
|
+
public foreign function default_world_def() -> WorldDef = c.b2DefaultWorldDef
|
|
207
|
+
public foreign function default_body_def() -> BodyDef = c.b2DefaultBodyDef
|
|
208
|
+
public foreign function default_filter() -> Filter = c.b2DefaultFilter
|
|
209
|
+
public foreign function default_query_filter() -> QueryFilter = c.b2DefaultQueryFilter
|
|
210
|
+
public foreign function default_surface_material() -> SurfaceMaterial = c.b2DefaultSurfaceMaterial
|
|
211
|
+
public foreign function default_shape_def() -> ShapeDef = c.b2DefaultShapeDef
|
|
212
|
+
public foreign function default_chain_def() -> ChainDef = c.b2DefaultChainDef
|
|
213
|
+
public foreign function default_distance_joint_def() -> DistanceJointDef = c.b2DefaultDistanceJointDef
|
|
214
|
+
public foreign function default_motor_joint_def() -> MotorJointDef = c.b2DefaultMotorJointDef
|
|
215
|
+
public foreign function default_mouse_joint_def() -> MouseJointDef = c.b2DefaultMouseJointDef
|
|
216
|
+
public foreign function default_filter_joint_def() -> FilterJointDef = c.b2DefaultFilterJointDef
|
|
217
|
+
public foreign function default_prismatic_joint_def() -> PrismaticJointDef = c.b2DefaultPrismaticJointDef
|
|
218
|
+
public foreign function default_revolute_joint_def() -> RevoluteJointDef = c.b2DefaultRevoluteJointDef
|
|
219
|
+
public foreign function default_weld_joint_def() -> WeldJointDef = c.b2DefaultWeldJointDef
|
|
220
|
+
public foreign function default_wheel_joint_def() -> WheelJointDef = c.b2DefaultWheelJointDef
|
|
221
|
+
public foreign function default_explosion_def() -> ExplosionDef = c.b2DefaultExplosionDef
|
|
222
|
+
public foreign function default_debug_draw() -> DebugDraw = c.b2DefaultDebugDraw
|
|
223
|
+
public foreign function create_world(in world_def: WorldDef) -> WorldId = c.b2CreateWorld
|
|
224
|
+
public foreign function destroy_world(world_id: WorldId) -> void = c.b2DestroyWorld
|
|
225
|
+
public foreign function world_is_valid(id: WorldId) -> bool = c.b2World_IsValid
|
|
226
|
+
public foreign function world_step(world_id: WorldId, time_step: float, sub_step_count: int) -> void = c.b2World_Step
|
|
227
|
+
public foreign function world_draw(world_id: WorldId, inout draw: DebugDraw) -> void = c.b2World_Draw
|
|
228
|
+
public foreign function world_get_body_events(world_id: WorldId) -> BodyEvents = c.b2World_GetBodyEvents
|
|
229
|
+
public foreign function world_get_sensor_events(world_id: WorldId) -> SensorEvents = c.b2World_GetSensorEvents
|
|
230
|
+
public foreign function world_get_contact_events(world_id: WorldId) -> ContactEvents = c.b2World_GetContactEvents
|
|
231
|
+
public foreign function world_overlap_aabb(world_id: WorldId, aabb: AABB, filter: QueryFilter, fcn: ptr[OverlapResultFcn], context: ptr[void]) -> TreeStats = c.b2World_OverlapAABB
|
|
232
|
+
public foreign function world_overlap_shape(world_id: WorldId, proxy: const_ptr[ShapeProxy], filter: QueryFilter, fcn: ptr[OverlapResultFcn], context: ptr[void]) -> TreeStats = c.b2World_OverlapShape
|
|
233
|
+
public foreign function world_cast_ray(world_id: WorldId, origin: Vec2, translation: Vec2, filter: QueryFilter, fcn: ptr[CastResultFcn], context: ptr[void]) -> TreeStats = c.b2World_CastRay
|
|
234
|
+
public foreign function world_cast_ray_closest(world_id: WorldId, origin: Vec2, translation: Vec2, filter: QueryFilter) -> RayResult = c.b2World_CastRayClosest
|
|
235
|
+
public foreign function world_cast_shape(world_id: WorldId, proxy: const_ptr[ShapeProxy], translation: Vec2, filter: QueryFilter, fcn: ptr[CastResultFcn], context: ptr[void]) -> TreeStats = c.b2World_CastShape
|
|
236
|
+
public foreign function world_cast_mover(world_id: WorldId, mover: const_ptr[Capsule], translation: Vec2, filter: QueryFilter) -> float = c.b2World_CastMover
|
|
237
|
+
public foreign function world_collide_mover(world_id: WorldId, mover: const_ptr[Capsule], filter: QueryFilter, fcn: ptr[PlaneResultFcn], context: ptr[void]) -> void = c.b2World_CollideMover
|
|
238
|
+
public foreign function world_enable_sleeping(world_id: WorldId, flag: bool) -> void = c.b2World_EnableSleeping
|
|
239
|
+
public foreign function world_is_sleeping_enabled(world_id: WorldId) -> bool = c.b2World_IsSleepingEnabled
|
|
240
|
+
public foreign function world_enable_continuous(world_id: WorldId, flag: bool) -> void = c.b2World_EnableContinuous
|
|
241
|
+
public foreign function world_is_continuous_enabled(world_id: WorldId) -> bool = c.b2World_IsContinuousEnabled
|
|
242
|
+
public foreign function world_set_restitution_threshold(world_id: WorldId, value: float) -> void = c.b2World_SetRestitutionThreshold
|
|
243
|
+
public foreign function world_get_restitution_threshold(world_id: WorldId) -> float = c.b2World_GetRestitutionThreshold
|
|
244
|
+
public foreign function world_set_hit_event_threshold(world_id: WorldId, value: float) -> void = c.b2World_SetHitEventThreshold
|
|
245
|
+
public foreign function world_get_hit_event_threshold(world_id: WorldId) -> float = c.b2World_GetHitEventThreshold
|
|
246
|
+
public foreign function world_set_custom_filter_callback(world_id: WorldId, fcn: ptr[CustomFilterFcn], context: ptr[void]) -> void = c.b2World_SetCustomFilterCallback
|
|
247
|
+
public foreign function world_set_pre_solve_callback(world_id: WorldId, fcn: ptr[PreSolveFcn], context: ptr[void]) -> void = c.b2World_SetPreSolveCallback
|
|
248
|
+
public foreign function world_set_gravity(world_id: WorldId, gravity: Vec2) -> void = c.b2World_SetGravity
|
|
249
|
+
public foreign function world_get_gravity(world_id: WorldId) -> Vec2 = c.b2World_GetGravity
|
|
250
|
+
public foreign function world_explode(world_id: WorldId, in explosion_def: ExplosionDef) -> void = c.b2World_Explode
|
|
251
|
+
public foreign function world_set_contact_tuning(world_id: WorldId, hertz: float, damping_ratio: float, push_speed: float) -> void = c.b2World_SetContactTuning
|
|
252
|
+
public foreign function world_set_maximum_linear_speed(world_id: WorldId, maximum_linear_speed: float) -> void = c.b2World_SetMaximumLinearSpeed
|
|
253
|
+
public foreign function world_get_maximum_linear_speed(world_id: WorldId) -> float = c.b2World_GetMaximumLinearSpeed
|
|
254
|
+
public foreign function world_enable_warm_starting(world_id: WorldId, flag: bool) -> void = c.b2World_EnableWarmStarting
|
|
255
|
+
public foreign function world_is_warm_starting_enabled(world_id: WorldId) -> bool = c.b2World_IsWarmStartingEnabled
|
|
256
|
+
public foreign function world_get_awake_body_count(world_id: WorldId) -> int = c.b2World_GetAwakeBodyCount
|
|
257
|
+
public foreign function world_get_profile(world_id: WorldId) -> Profile = c.b2World_GetProfile
|
|
258
|
+
public foreign function world_get_counters(world_id: WorldId) -> Counters = c.b2World_GetCounters
|
|
259
|
+
public foreign function world_set_user_data(world_id: WorldId, user_data: ptr[void]) -> void = c.b2World_SetUserData
|
|
260
|
+
public foreign function world_get_user_data(world_id: WorldId) -> ptr[void] = c.b2World_GetUserData
|
|
261
|
+
public foreign function world_set_friction_callback(world_id: WorldId, callback: ptr[FrictionCallback]) -> void = c.b2World_SetFrictionCallback
|
|
262
|
+
public foreign function world_set_restitution_callback(world_id: WorldId, callback: ptr[RestitutionCallback]) -> void = c.b2World_SetRestitutionCallback
|
|
263
|
+
public foreign function world_dump_memory_stats(world_id: WorldId) -> void = c.b2World_DumpMemoryStats
|
|
264
|
+
public foreign function world_rebuild_static_tree(world_id: WorldId) -> void = c.b2World_RebuildStaticTree
|
|
265
|
+
public foreign function world_enable_speculative(world_id: WorldId, flag: bool) -> void = c.b2World_EnableSpeculative
|
|
266
|
+
public foreign function create_body(world_id: WorldId, in body_def: BodyDef) -> BodyId = c.b2CreateBody
|
|
267
|
+
public foreign function destroy_body(body_id: BodyId) -> void = c.b2DestroyBody
|
|
268
|
+
public foreign function body_is_valid(id: BodyId) -> bool = c.b2Body_IsValid
|
|
269
|
+
public foreign function body_get_type(body_id: BodyId) -> BodyType = c.b2Body_GetType
|
|
270
|
+
public foreign function body_set_type(body_id: BodyId, type_: BodyType) -> void = c.b2Body_SetType
|
|
271
|
+
public foreign function body_set_name(body_id: BodyId, name: str as cstr) -> void = c.b2Body_SetName
|
|
272
|
+
public foreign function body_get_name(body_id: BodyId) -> cstr = c.b2Body_GetName
|
|
273
|
+
public foreign function body_set_user_data(body_id: BodyId, user_data: ptr[void]) -> void = c.b2Body_SetUserData
|
|
274
|
+
public foreign function body_get_user_data(body_id: BodyId) -> ptr[void] = c.b2Body_GetUserData
|
|
275
|
+
public foreign function body_get_position(body_id: BodyId) -> Vec2 = c.b2Body_GetPosition
|
|
276
|
+
public foreign function body_get_rotation(body_id: BodyId) -> Rot = c.b2Body_GetRotation
|
|
277
|
+
public foreign function body_get_transform(body_id: BodyId) -> Transform = c.b2Body_GetTransform
|
|
278
|
+
public foreign function body_set_transform(body_id: BodyId, position: Vec2, rotation: Rot) -> void = c.b2Body_SetTransform
|
|
279
|
+
public foreign function body_get_local_point(body_id: BodyId, world_point: Vec2) -> Vec2 = c.b2Body_GetLocalPoint
|
|
280
|
+
public foreign function body_get_world_point(body_id: BodyId, local_point: Vec2) -> Vec2 = c.b2Body_GetWorldPoint
|
|
281
|
+
public foreign function body_get_local_vector(body_id: BodyId, world_vector: Vec2) -> Vec2 = c.b2Body_GetLocalVector
|
|
282
|
+
public foreign function body_get_world_vector(body_id: BodyId, local_vector: Vec2) -> Vec2 = c.b2Body_GetWorldVector
|
|
283
|
+
public foreign function body_get_linear_velocity(body_id: BodyId) -> Vec2 = c.b2Body_GetLinearVelocity
|
|
284
|
+
public foreign function body_get_angular_velocity(body_id: BodyId) -> float = c.b2Body_GetAngularVelocity
|
|
285
|
+
public foreign function body_set_linear_velocity(body_id: BodyId, linear_velocity: Vec2) -> void = c.b2Body_SetLinearVelocity
|
|
286
|
+
public foreign function body_set_angular_velocity(body_id: BodyId, angular_velocity: float) -> void = c.b2Body_SetAngularVelocity
|
|
287
|
+
public foreign function body_set_target_transform(body_id: BodyId, target: Transform, time_step: float) -> void = c.b2Body_SetTargetTransform
|
|
288
|
+
public foreign function body_get_local_point_velocity(body_id: BodyId, local_point: Vec2) -> Vec2 = c.b2Body_GetLocalPointVelocity
|
|
289
|
+
public foreign function body_get_world_point_velocity(body_id: BodyId, world_point: Vec2) -> Vec2 = c.b2Body_GetWorldPointVelocity
|
|
290
|
+
public foreign function body_apply_force(body_id: BodyId, force: Vec2, point: Vec2, wake: bool) -> void = c.b2Body_ApplyForce
|
|
291
|
+
public foreign function body_apply_force_to_center(body_id: BodyId, force: Vec2, wake: bool) -> void = c.b2Body_ApplyForceToCenter
|
|
292
|
+
public foreign function body_apply_torque(body_id: BodyId, torque: float, wake: bool) -> void = c.b2Body_ApplyTorque
|
|
293
|
+
public foreign function body_apply_linear_impulse(body_id: BodyId, impulse: Vec2, point: Vec2, wake: bool) -> void = c.b2Body_ApplyLinearImpulse
|
|
294
|
+
public foreign function body_apply_linear_impulse_to_center(body_id: BodyId, impulse: Vec2, wake: bool) -> void = c.b2Body_ApplyLinearImpulseToCenter
|
|
295
|
+
public foreign function body_apply_angular_impulse(body_id: BodyId, impulse: float, wake: bool) -> void = c.b2Body_ApplyAngularImpulse
|
|
296
|
+
public foreign function body_get_mass(body_id: BodyId) -> float = c.b2Body_GetMass
|
|
297
|
+
public foreign function body_get_rotational_inertia(body_id: BodyId) -> float = c.b2Body_GetRotationalInertia
|
|
298
|
+
public foreign function body_get_local_center_of_mass(body_id: BodyId) -> Vec2 = c.b2Body_GetLocalCenterOfMass
|
|
299
|
+
public foreign function body_get_world_center_of_mass(body_id: BodyId) -> Vec2 = c.b2Body_GetWorldCenterOfMass
|
|
300
|
+
public foreign function body_set_mass_data(body_id: BodyId, mass_data: MassData) -> void = c.b2Body_SetMassData
|
|
301
|
+
public foreign function body_get_mass_data(body_id: BodyId) -> MassData = c.b2Body_GetMassData
|
|
302
|
+
public foreign function body_apply_mass_from_shapes(body_id: BodyId) -> void = c.b2Body_ApplyMassFromShapes
|
|
303
|
+
public foreign function body_set_linear_damping(body_id: BodyId, linear_damping: float) -> void = c.b2Body_SetLinearDamping
|
|
304
|
+
public foreign function body_get_linear_damping(body_id: BodyId) -> float = c.b2Body_GetLinearDamping
|
|
305
|
+
public foreign function body_set_angular_damping(body_id: BodyId, angular_damping: float) -> void = c.b2Body_SetAngularDamping
|
|
306
|
+
public foreign function body_get_angular_damping(body_id: BodyId) -> float = c.b2Body_GetAngularDamping
|
|
307
|
+
public foreign function body_set_gravity_scale(body_id: BodyId, gravity_scale: float) -> void = c.b2Body_SetGravityScale
|
|
308
|
+
public foreign function body_get_gravity_scale(body_id: BodyId) -> float = c.b2Body_GetGravityScale
|
|
309
|
+
public foreign function body_is_awake(body_id: BodyId) -> bool = c.b2Body_IsAwake
|
|
310
|
+
public foreign function body_set_awake(body_id: BodyId, awake: bool) -> void = c.b2Body_SetAwake
|
|
311
|
+
public foreign function body_enable_sleep(body_id: BodyId, enable_sleep: bool) -> void = c.b2Body_EnableSleep
|
|
312
|
+
public foreign function body_is_sleep_enabled(body_id: BodyId) -> bool = c.b2Body_IsSleepEnabled
|
|
313
|
+
public foreign function body_set_sleep_threshold(body_id: BodyId, sleep_threshold: float) -> void = c.b2Body_SetSleepThreshold
|
|
314
|
+
public foreign function body_get_sleep_threshold(body_id: BodyId) -> float = c.b2Body_GetSleepThreshold
|
|
315
|
+
public foreign function body_is_enabled(body_id: BodyId) -> bool = c.b2Body_IsEnabled
|
|
316
|
+
public foreign function body_disable(body_id: BodyId) -> void = c.b2Body_Disable
|
|
317
|
+
public foreign function body_enable(body_id: BodyId) -> void = c.b2Body_Enable
|
|
318
|
+
public foreign function body_set_fixed_rotation(body_id: BodyId, flag: bool) -> void = c.b2Body_SetFixedRotation
|
|
319
|
+
public foreign function body_is_fixed_rotation(body_id: BodyId) -> bool = c.b2Body_IsFixedRotation
|
|
320
|
+
public foreign function body_set_bullet(body_id: BodyId, flag: bool) -> void = c.b2Body_SetBullet
|
|
321
|
+
public foreign function body_is_bullet(body_id: BodyId) -> bool = c.b2Body_IsBullet
|
|
322
|
+
public foreign function body_enable_contact_events(body_id: BodyId, flag: bool) -> void = c.b2Body_EnableContactEvents
|
|
323
|
+
public foreign function body_enable_hit_events(body_id: BodyId, flag: bool) -> void = c.b2Body_EnableHitEvents
|
|
324
|
+
public foreign function body_get_world(body_id: BodyId) -> WorldId = c.b2Body_GetWorld
|
|
325
|
+
public foreign function body_get_shape_count(body_id: BodyId) -> int = c.b2Body_GetShapeCount
|
|
326
|
+
public foreign function body_get_shapes(body_id: BodyId, shape_array: ptr[ShapeId], capacity: int) -> int = c.b2Body_GetShapes
|
|
327
|
+
public foreign function body_get_joint_count(body_id: BodyId) -> int = c.b2Body_GetJointCount
|
|
328
|
+
public foreign function body_get_joints(body_id: BodyId, joint_array: ptr[JointId], capacity: int) -> int = c.b2Body_GetJoints
|
|
329
|
+
public foreign function body_get_contact_capacity(body_id: BodyId) -> int = c.b2Body_GetContactCapacity
|
|
330
|
+
public foreign function body_get_contact_data(body_id: BodyId, contact_data: ptr[ContactData], capacity: int) -> int = c.b2Body_GetContactData
|
|
331
|
+
public foreign function body_compute_aabb(body_id: BodyId) -> AABB = c.b2Body_ComputeAABB
|
|
332
|
+
public foreign function create_circle_shape(body_id: BodyId, in shape_def: ShapeDef, in circle: Circle) -> ShapeId = c.b2CreateCircleShape
|
|
333
|
+
public foreign function create_segment_shape(body_id: BodyId, in shape_def: ShapeDef, in segment: Segment) -> ShapeId = c.b2CreateSegmentShape
|
|
334
|
+
public foreign function create_capsule_shape(body_id: BodyId, in shape_def: ShapeDef, in capsule: Capsule) -> ShapeId = c.b2CreateCapsuleShape
|
|
335
|
+
public foreign function create_polygon_shape(body_id: BodyId, in shape_def: ShapeDef, in polygon: Polygon) -> ShapeId = c.b2CreatePolygonShape
|
|
336
|
+
public foreign function destroy_shape(shape_id: ShapeId, update_body_mass: bool) -> void = c.b2DestroyShape
|
|
337
|
+
public foreign function shape_is_valid(id: ShapeId) -> bool = c.b2Shape_IsValid
|
|
338
|
+
public foreign function shape_get_type(shape_id: ShapeId) -> ShapeType = c.b2Shape_GetType
|
|
339
|
+
public foreign function shape_get_body(shape_id: ShapeId) -> BodyId = c.b2Shape_GetBody
|
|
340
|
+
public foreign function shape_get_world(shape_id: ShapeId) -> WorldId = c.b2Shape_GetWorld
|
|
341
|
+
public foreign function shape_is_sensor(shape_id: ShapeId) -> bool = c.b2Shape_IsSensor
|
|
342
|
+
public foreign function shape_set_user_data(shape_id: ShapeId, user_data: ptr[void]) -> void = c.b2Shape_SetUserData
|
|
343
|
+
public foreign function shape_get_user_data(shape_id: ShapeId) -> ptr[void] = c.b2Shape_GetUserData
|
|
344
|
+
public foreign function shape_set_density(shape_id: ShapeId, density: float, update_body_mass: bool) -> void = c.b2Shape_SetDensity
|
|
345
|
+
public foreign function shape_get_density(shape_id: ShapeId) -> float = c.b2Shape_GetDensity
|
|
346
|
+
public foreign function shape_set_friction(shape_id: ShapeId, friction: float) -> void = c.b2Shape_SetFriction
|
|
347
|
+
public foreign function shape_get_friction(shape_id: ShapeId) -> float = c.b2Shape_GetFriction
|
|
348
|
+
public foreign function shape_set_restitution(shape_id: ShapeId, restitution: float) -> void = c.b2Shape_SetRestitution
|
|
349
|
+
public foreign function shape_get_restitution(shape_id: ShapeId) -> float = c.b2Shape_GetRestitution
|
|
350
|
+
public foreign function shape_set_material(shape_id: ShapeId, material: int) -> void = c.b2Shape_SetMaterial
|
|
351
|
+
public foreign function shape_get_material(shape_id: ShapeId) -> int = c.b2Shape_GetMaterial
|
|
352
|
+
public foreign function shape_set_surface_material(shape_id: ShapeId, surface_material: SurfaceMaterial) -> void = c.b2Shape_SetSurfaceMaterial
|
|
353
|
+
public foreign function shape_get_surface_material(shape_id: ShapeId) -> SurfaceMaterial = c.b2Shape_GetSurfaceMaterial
|
|
354
|
+
public foreign function shape_get_filter(shape_id: ShapeId) -> Filter = c.b2Shape_GetFilter
|
|
355
|
+
public foreign function shape_set_filter(shape_id: ShapeId, filter: Filter) -> void = c.b2Shape_SetFilter
|
|
356
|
+
public foreign function shape_enable_sensor_events(shape_id: ShapeId, flag: bool) -> void = c.b2Shape_EnableSensorEvents
|
|
357
|
+
public foreign function shape_are_sensor_events_enabled(shape_id: ShapeId) -> bool = c.b2Shape_AreSensorEventsEnabled
|
|
358
|
+
public foreign function shape_enable_contact_events(shape_id: ShapeId, flag: bool) -> void = c.b2Shape_EnableContactEvents
|
|
359
|
+
public foreign function shape_are_contact_events_enabled(shape_id: ShapeId) -> bool = c.b2Shape_AreContactEventsEnabled
|
|
360
|
+
public foreign function shape_enable_pre_solve_events(shape_id: ShapeId, flag: bool) -> void = c.b2Shape_EnablePreSolveEvents
|
|
361
|
+
public foreign function shape_are_pre_solve_events_enabled(shape_id: ShapeId) -> bool = c.b2Shape_ArePreSolveEventsEnabled
|
|
362
|
+
public foreign function shape_enable_hit_events(shape_id: ShapeId, flag: bool) -> void = c.b2Shape_EnableHitEvents
|
|
363
|
+
public foreign function shape_are_hit_events_enabled(shape_id: ShapeId) -> bool = c.b2Shape_AreHitEventsEnabled
|
|
364
|
+
public foreign function shape_test_point(shape_id: ShapeId, point: Vec2) -> bool = c.b2Shape_TestPoint
|
|
365
|
+
public foreign function shape_ray_cast(shape_id: ShapeId, input: const_ptr[RayCastInput]) -> CastOutput = c.b2Shape_RayCast
|
|
366
|
+
public foreign function shape_get_circle(shape_id: ShapeId) -> Circle = c.b2Shape_GetCircle
|
|
367
|
+
public foreign function shape_get_segment(shape_id: ShapeId) -> Segment = c.b2Shape_GetSegment
|
|
368
|
+
public foreign function shape_get_chain_segment(shape_id: ShapeId) -> ChainSegment = c.b2Shape_GetChainSegment
|
|
369
|
+
public foreign function shape_get_capsule(shape_id: ShapeId) -> Capsule = c.b2Shape_GetCapsule
|
|
370
|
+
public foreign function shape_get_polygon(shape_id: ShapeId) -> Polygon = c.b2Shape_GetPolygon
|
|
371
|
+
public foreign function shape_set_circle(shape_id: ShapeId, circle: const_ptr[Circle]) -> void = c.b2Shape_SetCircle
|
|
372
|
+
public foreign function shape_set_capsule(shape_id: ShapeId, capsule: const_ptr[Capsule]) -> void = c.b2Shape_SetCapsule
|
|
373
|
+
public foreign function shape_set_segment(shape_id: ShapeId, segment: const_ptr[Segment]) -> void = c.b2Shape_SetSegment
|
|
374
|
+
public foreign function shape_set_polygon(shape_id: ShapeId, polygon: const_ptr[Polygon]) -> void = c.b2Shape_SetPolygon
|
|
375
|
+
public foreign function shape_get_parent_chain(shape_id: ShapeId) -> ChainId = c.b2Shape_GetParentChain
|
|
376
|
+
public foreign function shape_get_contact_capacity(shape_id: ShapeId) -> int = c.b2Shape_GetContactCapacity
|
|
377
|
+
public foreign function shape_get_contact_data(shape_id: ShapeId, contact_data: ptr[ContactData], capacity: int) -> int = c.b2Shape_GetContactData
|
|
378
|
+
public foreign function shape_get_sensor_capacity(shape_id: ShapeId) -> int = c.b2Shape_GetSensorCapacity
|
|
379
|
+
public foreign function shape_get_sensor_overlaps(shape_id: ShapeId, overlaps: ptr[ShapeId], capacity: int) -> int = c.b2Shape_GetSensorOverlaps
|
|
380
|
+
public foreign function shape_get_aabb(shape_id: ShapeId) -> AABB = c.b2Shape_GetAABB
|
|
381
|
+
public foreign function shape_get_mass_data(shape_id: ShapeId) -> MassData = c.b2Shape_GetMassData
|
|
382
|
+
public foreign function shape_get_closest_point(shape_id: ShapeId, target: Vec2) -> Vec2 = c.b2Shape_GetClosestPoint
|
|
383
|
+
public foreign function create_chain(body_id: BodyId, in chain_def: ChainDef) -> ChainId = c.b2CreateChain
|
|
384
|
+
public foreign function destroy_chain(chain_id: ChainId) -> void = c.b2DestroyChain
|
|
385
|
+
public foreign function chain_get_world(chain_id: ChainId) -> WorldId = c.b2Chain_GetWorld
|
|
386
|
+
public foreign function chain_get_segment_count(chain_id: ChainId) -> int = c.b2Chain_GetSegmentCount
|
|
387
|
+
public foreign function chain_get_segments(chain_id: ChainId, segment_array: ptr[ShapeId], capacity: int) -> int = c.b2Chain_GetSegments
|
|
388
|
+
public foreign function chain_set_friction(chain_id: ChainId, friction: float) -> void = c.b2Chain_SetFriction
|
|
389
|
+
public foreign function chain_get_friction(chain_id: ChainId) -> float = c.b2Chain_GetFriction
|
|
390
|
+
public foreign function chain_set_restitution(chain_id: ChainId, restitution: float) -> void = c.b2Chain_SetRestitution
|
|
391
|
+
public foreign function chain_get_restitution(chain_id: ChainId) -> float = c.b2Chain_GetRestitution
|
|
392
|
+
public foreign function chain_set_material(chain_id: ChainId, material: int) -> void = c.b2Chain_SetMaterial
|
|
393
|
+
public foreign function chain_get_material(chain_id: ChainId) -> int = c.b2Chain_GetMaterial
|
|
394
|
+
public foreign function chain_is_valid(id: ChainId) -> bool = c.b2Chain_IsValid
|
|
395
|
+
public foreign function destroy_joint(joint_id: JointId) -> void = c.b2DestroyJoint
|
|
396
|
+
public foreign function joint_is_valid(id: JointId) -> bool = c.b2Joint_IsValid
|
|
397
|
+
public foreign function joint_get_type(joint_id: JointId) -> JointType = c.b2Joint_GetType
|
|
398
|
+
public foreign function joint_get_body_a(joint_id: JointId) -> BodyId = c.b2Joint_GetBodyA
|
|
399
|
+
public foreign function joint_get_body_b(joint_id: JointId) -> BodyId = c.b2Joint_GetBodyB
|
|
400
|
+
public foreign function joint_get_world(joint_id: JointId) -> WorldId = c.b2Joint_GetWorld
|
|
401
|
+
public foreign function joint_set_local_anchor_a(joint_id: JointId, local_anchor: Vec2) -> void = c.b2Joint_SetLocalAnchorA
|
|
402
|
+
public foreign function joint_get_local_anchor_a(joint_id: JointId) -> Vec2 = c.b2Joint_GetLocalAnchorA
|
|
403
|
+
public foreign function joint_set_local_anchor_b(joint_id: JointId, local_anchor: Vec2) -> void = c.b2Joint_SetLocalAnchorB
|
|
404
|
+
public foreign function joint_get_local_anchor_b(joint_id: JointId) -> Vec2 = c.b2Joint_GetLocalAnchorB
|
|
405
|
+
public foreign function joint_get_reference_angle(joint_id: JointId) -> float = c.b2Joint_GetReferenceAngle
|
|
406
|
+
public foreign function joint_set_reference_angle(joint_id: JointId, angle_in_radians: float) -> void = c.b2Joint_SetReferenceAngle
|
|
407
|
+
public foreign function joint_set_local_axis_a(joint_id: JointId, local_axis: Vec2) -> void = c.b2Joint_SetLocalAxisA
|
|
408
|
+
public foreign function joint_get_local_axis_a(joint_id: JointId) -> Vec2 = c.b2Joint_GetLocalAxisA
|
|
409
|
+
public foreign function joint_set_collide_connected(joint_id: JointId, should_collide: bool) -> void = c.b2Joint_SetCollideConnected
|
|
410
|
+
public foreign function joint_get_collide_connected(joint_id: JointId) -> bool = c.b2Joint_GetCollideConnected
|
|
411
|
+
public foreign function joint_set_user_data(joint_id: JointId, user_data: ptr[void]) -> void = c.b2Joint_SetUserData
|
|
412
|
+
public foreign function joint_get_user_data(joint_id: JointId) -> ptr[void] = c.b2Joint_GetUserData
|
|
413
|
+
public foreign function joint_wake_bodies(joint_id: JointId) -> void = c.b2Joint_WakeBodies
|
|
414
|
+
public foreign function joint_get_constraint_force(joint_id: JointId) -> Vec2 = c.b2Joint_GetConstraintForce
|
|
415
|
+
public foreign function joint_get_constraint_torque(joint_id: JointId) -> float = c.b2Joint_GetConstraintTorque
|
|
416
|
+
public foreign function joint_get_linear_separation(joint_id: JointId) -> float = c.b2Joint_GetLinearSeparation
|
|
417
|
+
public foreign function joint_get_angular_separation(joint_id: JointId) -> float = c.b2Joint_GetAngularSeparation
|
|
418
|
+
public foreign function joint_get_constraint_tuning(joint_id: JointId, hertz: ptr[float], damping_ratio: ptr[float]) -> void = c.b2Joint_GetConstraintTuning
|
|
419
|
+
public foreign function joint_set_constraint_tuning(joint_id: JointId, hertz: float, damping_ratio: float) -> void = c.b2Joint_SetConstraintTuning
|
|
420
|
+
public foreign function create_distance_joint(world_id: WorldId, in joint_def: DistanceJointDef) -> JointId = c.b2CreateDistanceJoint
|
|
421
|
+
public foreign function distance_joint_set_length(joint_id: JointId, length: float) -> void = c.b2DistanceJoint_SetLength
|
|
422
|
+
public foreign function distance_joint_get_length(joint_id: JointId) -> float = c.b2DistanceJoint_GetLength
|
|
423
|
+
public foreign function distance_joint_enable_spring(joint_id: JointId, enable_spring: bool) -> void = c.b2DistanceJoint_EnableSpring
|
|
424
|
+
public foreign function distance_joint_is_spring_enabled(joint_id: JointId) -> bool = c.b2DistanceJoint_IsSpringEnabled
|
|
425
|
+
public foreign function distance_joint_set_spring_hertz(joint_id: JointId, hertz: float) -> void = c.b2DistanceJoint_SetSpringHertz
|
|
426
|
+
public foreign function distance_joint_set_spring_damping_ratio(joint_id: JointId, damping_ratio: float) -> void = c.b2DistanceJoint_SetSpringDampingRatio
|
|
427
|
+
public foreign function distance_joint_get_spring_hertz(joint_id: JointId) -> float = c.b2DistanceJoint_GetSpringHertz
|
|
428
|
+
public foreign function distance_joint_get_spring_damping_ratio(joint_id: JointId) -> float = c.b2DistanceJoint_GetSpringDampingRatio
|
|
429
|
+
public foreign function distance_joint_enable_limit(joint_id: JointId, enable_limit: bool) -> void = c.b2DistanceJoint_EnableLimit
|
|
430
|
+
public foreign function distance_joint_is_limit_enabled(joint_id: JointId) -> bool = c.b2DistanceJoint_IsLimitEnabled
|
|
431
|
+
public foreign function distance_joint_set_length_range(joint_id: JointId, min_length: float, max_length: float) -> void = c.b2DistanceJoint_SetLengthRange
|
|
432
|
+
public foreign function distance_joint_get_min_length(joint_id: JointId) -> float = c.b2DistanceJoint_GetMinLength
|
|
433
|
+
public foreign function distance_joint_get_max_length(joint_id: JointId) -> float = c.b2DistanceJoint_GetMaxLength
|
|
434
|
+
public foreign function distance_joint_get_current_length(joint_id: JointId) -> float = c.b2DistanceJoint_GetCurrentLength
|
|
435
|
+
public foreign function distance_joint_enable_motor(joint_id: JointId, enable_motor: bool) -> void = c.b2DistanceJoint_EnableMotor
|
|
436
|
+
public foreign function distance_joint_is_motor_enabled(joint_id: JointId) -> bool = c.b2DistanceJoint_IsMotorEnabled
|
|
437
|
+
public foreign function distance_joint_set_motor_speed(joint_id: JointId, motor_speed: float) -> void = c.b2DistanceJoint_SetMotorSpeed
|
|
438
|
+
public foreign function distance_joint_get_motor_speed(joint_id: JointId) -> float = c.b2DistanceJoint_GetMotorSpeed
|
|
439
|
+
public foreign function distance_joint_set_max_motor_force(joint_id: JointId, force: float) -> void = c.b2DistanceJoint_SetMaxMotorForce
|
|
440
|
+
public foreign function distance_joint_get_max_motor_force(joint_id: JointId) -> float = c.b2DistanceJoint_GetMaxMotorForce
|
|
441
|
+
public foreign function distance_joint_get_motor_force(joint_id: JointId) -> float = c.b2DistanceJoint_GetMotorForce
|
|
442
|
+
public foreign function create_motor_joint(world_id: WorldId, in joint_def: MotorJointDef) -> JointId = c.b2CreateMotorJoint
|
|
443
|
+
public foreign function motor_joint_set_linear_offset(joint_id: JointId, linear_offset: Vec2) -> void = c.b2MotorJoint_SetLinearOffset
|
|
444
|
+
public foreign function motor_joint_get_linear_offset(joint_id: JointId) -> Vec2 = c.b2MotorJoint_GetLinearOffset
|
|
445
|
+
public foreign function motor_joint_set_angular_offset(joint_id: JointId, angular_offset: float) -> void = c.b2MotorJoint_SetAngularOffset
|
|
446
|
+
public foreign function motor_joint_get_angular_offset(joint_id: JointId) -> float = c.b2MotorJoint_GetAngularOffset
|
|
447
|
+
public foreign function motor_joint_set_max_force(joint_id: JointId, max_force: float) -> void = c.b2MotorJoint_SetMaxForce
|
|
448
|
+
public foreign function motor_joint_get_max_force(joint_id: JointId) -> float = c.b2MotorJoint_GetMaxForce
|
|
449
|
+
public foreign function motor_joint_set_max_torque(joint_id: JointId, max_torque: float) -> void = c.b2MotorJoint_SetMaxTorque
|
|
450
|
+
public foreign function motor_joint_get_max_torque(joint_id: JointId) -> float = c.b2MotorJoint_GetMaxTorque
|
|
451
|
+
public foreign function motor_joint_set_correction_factor(joint_id: JointId, correction_factor: float) -> void = c.b2MotorJoint_SetCorrectionFactor
|
|
452
|
+
public foreign function motor_joint_get_correction_factor(joint_id: JointId) -> float = c.b2MotorJoint_GetCorrectionFactor
|
|
453
|
+
public foreign function create_mouse_joint(world_id: WorldId, def: const_ptr[MouseJointDef]) -> JointId = c.b2CreateMouseJoint
|
|
454
|
+
public foreign function mouse_joint_set_target(joint_id: JointId, target: Vec2) -> void = c.b2MouseJoint_SetTarget
|
|
455
|
+
public foreign function mouse_joint_get_target(joint_id: JointId) -> Vec2 = c.b2MouseJoint_GetTarget
|
|
456
|
+
public foreign function mouse_joint_set_spring_hertz(joint_id: JointId, hertz: float) -> void = c.b2MouseJoint_SetSpringHertz
|
|
457
|
+
public foreign function mouse_joint_get_spring_hertz(joint_id: JointId) -> float = c.b2MouseJoint_GetSpringHertz
|
|
458
|
+
public foreign function mouse_joint_set_spring_damping_ratio(joint_id: JointId, damping_ratio: float) -> void = c.b2MouseJoint_SetSpringDampingRatio
|
|
459
|
+
public foreign function mouse_joint_get_spring_damping_ratio(joint_id: JointId) -> float = c.b2MouseJoint_GetSpringDampingRatio
|
|
460
|
+
public foreign function mouse_joint_set_max_force(joint_id: JointId, max_force: float) -> void = c.b2MouseJoint_SetMaxForce
|
|
461
|
+
public foreign function mouse_joint_get_max_force(joint_id: JointId) -> float = c.b2MouseJoint_GetMaxForce
|
|
462
|
+
public foreign function create_filter_joint(world_id: WorldId, in joint_def: FilterJointDef) -> JointId = c.b2CreateFilterJoint
|
|
463
|
+
public foreign function create_prismatic_joint(world_id: WorldId, in joint_def: PrismaticJointDef) -> JointId = c.b2CreatePrismaticJoint
|
|
464
|
+
public foreign function prismatic_joint_enable_spring(joint_id: JointId, enable_spring: bool) -> void = c.b2PrismaticJoint_EnableSpring
|
|
465
|
+
public foreign function prismatic_joint_is_spring_enabled(joint_id: JointId) -> bool = c.b2PrismaticJoint_IsSpringEnabled
|
|
466
|
+
public foreign function prismatic_joint_set_spring_hertz(joint_id: JointId, hertz: float) -> void = c.b2PrismaticJoint_SetSpringHertz
|
|
467
|
+
public foreign function prismatic_joint_get_spring_hertz(joint_id: JointId) -> float = c.b2PrismaticJoint_GetSpringHertz
|
|
468
|
+
public foreign function prismatic_joint_set_spring_damping_ratio(joint_id: JointId, damping_ratio: float) -> void = c.b2PrismaticJoint_SetSpringDampingRatio
|
|
469
|
+
public foreign function prismatic_joint_get_spring_damping_ratio(joint_id: JointId) -> float = c.b2PrismaticJoint_GetSpringDampingRatio
|
|
470
|
+
public foreign function prismatic_joint_set_target_translation(joint_id: JointId, translation: float) -> void = c.b2PrismaticJoint_SetTargetTranslation
|
|
471
|
+
public foreign function prismatic_joint_get_target_translation(joint_id: JointId) -> float = c.b2PrismaticJoint_GetTargetTranslation
|
|
472
|
+
public foreign function prismatic_joint_enable_limit(joint_id: JointId, enable_limit: bool) -> void = c.b2PrismaticJoint_EnableLimit
|
|
473
|
+
public foreign function prismatic_joint_is_limit_enabled(joint_id: JointId) -> bool = c.b2PrismaticJoint_IsLimitEnabled
|
|
474
|
+
public foreign function prismatic_joint_get_lower_limit(joint_id: JointId) -> float = c.b2PrismaticJoint_GetLowerLimit
|
|
475
|
+
public foreign function prismatic_joint_get_upper_limit(joint_id: JointId) -> float = c.b2PrismaticJoint_GetUpperLimit
|
|
476
|
+
public foreign function prismatic_joint_set_limits(joint_id: JointId, lower: float, upper: float) -> void = c.b2PrismaticJoint_SetLimits
|
|
477
|
+
public foreign function prismatic_joint_enable_motor(joint_id: JointId, enable_motor: bool) -> void = c.b2PrismaticJoint_EnableMotor
|
|
478
|
+
public foreign function prismatic_joint_is_motor_enabled(joint_id: JointId) -> bool = c.b2PrismaticJoint_IsMotorEnabled
|
|
479
|
+
public foreign function prismatic_joint_set_motor_speed(joint_id: JointId, motor_speed: float) -> void = c.b2PrismaticJoint_SetMotorSpeed
|
|
480
|
+
public foreign function prismatic_joint_get_motor_speed(joint_id: JointId) -> float = c.b2PrismaticJoint_GetMotorSpeed
|
|
481
|
+
public foreign function prismatic_joint_set_max_motor_force(joint_id: JointId, force: float) -> void = c.b2PrismaticJoint_SetMaxMotorForce
|
|
482
|
+
public foreign function prismatic_joint_get_max_motor_force(joint_id: JointId) -> float = c.b2PrismaticJoint_GetMaxMotorForce
|
|
483
|
+
public foreign function prismatic_joint_get_motor_force(joint_id: JointId) -> float = c.b2PrismaticJoint_GetMotorForce
|
|
484
|
+
public foreign function prismatic_joint_get_translation(joint_id: JointId) -> float = c.b2PrismaticJoint_GetTranslation
|
|
485
|
+
public foreign function prismatic_joint_get_speed(joint_id: JointId) -> float = c.b2PrismaticJoint_GetSpeed
|
|
486
|
+
public foreign function create_revolute_joint(world_id: WorldId, in joint_def: RevoluteJointDef) -> JointId = c.b2CreateRevoluteJoint
|
|
487
|
+
public foreign function revolute_joint_enable_spring(joint_id: JointId, enable_spring: bool) -> void = c.b2RevoluteJoint_EnableSpring
|
|
488
|
+
public foreign function revolute_joint_is_spring_enabled(joint_id: JointId) -> bool = c.b2RevoluteJoint_IsSpringEnabled
|
|
489
|
+
public foreign function revolute_joint_set_spring_hertz(joint_id: JointId, hertz: float) -> void = c.b2RevoluteJoint_SetSpringHertz
|
|
490
|
+
public foreign function revolute_joint_get_spring_hertz(joint_id: JointId) -> float = c.b2RevoluteJoint_GetSpringHertz
|
|
491
|
+
public foreign function revolute_joint_set_spring_damping_ratio(joint_id: JointId, damping_ratio: float) -> void = c.b2RevoluteJoint_SetSpringDampingRatio
|
|
492
|
+
public foreign function revolute_joint_get_spring_damping_ratio(joint_id: JointId) -> float = c.b2RevoluteJoint_GetSpringDampingRatio
|
|
493
|
+
public foreign function revolute_joint_set_target_angle(joint_id: JointId, angle: float) -> void = c.b2RevoluteJoint_SetTargetAngle
|
|
494
|
+
public foreign function revolute_joint_get_target_angle(joint_id: JointId) -> float = c.b2RevoluteJoint_GetTargetAngle
|
|
495
|
+
public foreign function revolute_joint_get_angle(joint_id: JointId) -> float = c.b2RevoluteJoint_GetAngle
|
|
496
|
+
public foreign function revolute_joint_enable_limit(joint_id: JointId, enable_limit: bool) -> void = c.b2RevoluteJoint_EnableLimit
|
|
497
|
+
public foreign function revolute_joint_is_limit_enabled(joint_id: JointId) -> bool = c.b2RevoluteJoint_IsLimitEnabled
|
|
498
|
+
public foreign function revolute_joint_get_lower_limit(joint_id: JointId) -> float = c.b2RevoluteJoint_GetLowerLimit
|
|
499
|
+
public foreign function revolute_joint_get_upper_limit(joint_id: JointId) -> float = c.b2RevoluteJoint_GetUpperLimit
|
|
500
|
+
public foreign function revolute_joint_set_limits(joint_id: JointId, lower: float, upper: float) -> void = c.b2RevoluteJoint_SetLimits
|
|
501
|
+
public foreign function revolute_joint_enable_motor(joint_id: JointId, enable_motor: bool) -> void = c.b2RevoluteJoint_EnableMotor
|
|
502
|
+
public foreign function revolute_joint_is_motor_enabled(joint_id: JointId) -> bool = c.b2RevoluteJoint_IsMotorEnabled
|
|
503
|
+
public foreign function revolute_joint_set_motor_speed(joint_id: JointId, motor_speed: float) -> void = c.b2RevoluteJoint_SetMotorSpeed
|
|
504
|
+
public foreign function revolute_joint_get_motor_speed(joint_id: JointId) -> float = c.b2RevoluteJoint_GetMotorSpeed
|
|
505
|
+
public foreign function revolute_joint_get_motor_torque(joint_id: JointId) -> float = c.b2RevoluteJoint_GetMotorTorque
|
|
506
|
+
public foreign function revolute_joint_set_max_motor_torque(joint_id: JointId, torque: float) -> void = c.b2RevoluteJoint_SetMaxMotorTorque
|
|
507
|
+
public foreign function revolute_joint_get_max_motor_torque(joint_id: JointId) -> float = c.b2RevoluteJoint_GetMaxMotorTorque
|
|
508
|
+
public foreign function create_weld_joint(world_id: WorldId, in joint_def: WeldJointDef) -> JointId = c.b2CreateWeldJoint
|
|
509
|
+
public foreign function weld_joint_set_linear_hertz(joint_id: JointId, hertz: float) -> void = c.b2WeldJoint_SetLinearHertz
|
|
510
|
+
public foreign function weld_joint_get_linear_hertz(joint_id: JointId) -> float = c.b2WeldJoint_GetLinearHertz
|
|
511
|
+
public foreign function weld_joint_set_linear_damping_ratio(joint_id: JointId, damping_ratio: float) -> void = c.b2WeldJoint_SetLinearDampingRatio
|
|
512
|
+
public foreign function weld_joint_get_linear_damping_ratio(joint_id: JointId) -> float = c.b2WeldJoint_GetLinearDampingRatio
|
|
513
|
+
public foreign function weld_joint_set_angular_hertz(joint_id: JointId, hertz: float) -> void = c.b2WeldJoint_SetAngularHertz
|
|
514
|
+
public foreign function weld_joint_get_angular_hertz(joint_id: JointId) -> float = c.b2WeldJoint_GetAngularHertz
|
|
515
|
+
public foreign function weld_joint_set_angular_damping_ratio(joint_id: JointId, damping_ratio: float) -> void = c.b2WeldJoint_SetAngularDampingRatio
|
|
516
|
+
public foreign function weld_joint_get_angular_damping_ratio(joint_id: JointId) -> float = c.b2WeldJoint_GetAngularDampingRatio
|
|
517
|
+
public foreign function create_wheel_joint(world_id: WorldId, in joint_def: WheelJointDef) -> JointId = c.b2CreateWheelJoint
|
|
518
|
+
public foreign function wheel_joint_enable_spring(joint_id: JointId, enable_spring: bool) -> void = c.b2WheelJoint_EnableSpring
|
|
519
|
+
public foreign function wheel_joint_is_spring_enabled(joint_id: JointId) -> bool = c.b2WheelJoint_IsSpringEnabled
|
|
520
|
+
public foreign function wheel_joint_set_spring_hertz(joint_id: JointId, hertz: float) -> void = c.b2WheelJoint_SetSpringHertz
|
|
521
|
+
public foreign function wheel_joint_get_spring_hertz(joint_id: JointId) -> float = c.b2WheelJoint_GetSpringHertz
|
|
522
|
+
public foreign function wheel_joint_set_spring_damping_ratio(joint_id: JointId, damping_ratio: float) -> void = c.b2WheelJoint_SetSpringDampingRatio
|
|
523
|
+
public foreign function wheel_joint_get_spring_damping_ratio(joint_id: JointId) -> float = c.b2WheelJoint_GetSpringDampingRatio
|
|
524
|
+
public foreign function wheel_joint_enable_limit(joint_id: JointId, enable_limit: bool) -> void = c.b2WheelJoint_EnableLimit
|
|
525
|
+
public foreign function wheel_joint_is_limit_enabled(joint_id: JointId) -> bool = c.b2WheelJoint_IsLimitEnabled
|
|
526
|
+
public foreign function wheel_joint_get_lower_limit(joint_id: JointId) -> float = c.b2WheelJoint_GetLowerLimit
|
|
527
|
+
public foreign function wheel_joint_get_upper_limit(joint_id: JointId) -> float = c.b2WheelJoint_GetUpperLimit
|
|
528
|
+
public foreign function wheel_joint_set_limits(joint_id: JointId, lower: float, upper: float) -> void = c.b2WheelJoint_SetLimits
|
|
529
|
+
public foreign function wheel_joint_enable_motor(joint_id: JointId, enable_motor: bool) -> void = c.b2WheelJoint_EnableMotor
|
|
530
|
+
public foreign function wheel_joint_is_motor_enabled(joint_id: JointId) -> bool = c.b2WheelJoint_IsMotorEnabled
|
|
531
|
+
public foreign function wheel_joint_set_motor_speed(joint_id: JointId, motor_speed: float) -> void = c.b2WheelJoint_SetMotorSpeed
|
|
532
|
+
public foreign function wheel_joint_get_motor_speed(joint_id: JointId) -> float = c.b2WheelJoint_GetMotorSpeed
|
|
533
|
+
public foreign function wheel_joint_set_max_motor_torque(joint_id: JointId, torque: float) -> void = c.b2WheelJoint_SetMaxMotorTorque
|
|
534
|
+
public foreign function wheel_joint_get_max_motor_torque(joint_id: JointId) -> float = c.b2WheelJoint_GetMaxMotorTorque
|
|
535
|
+
public foreign function wheel_joint_get_motor_torque(joint_id: JointId) -> float = c.b2WheelJoint_GetMotorTorque
|
data/std/bytes.mt
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import std.mem.heap as heap
|
|
2
|
+
import std.str as text
|
|
3
|
+
|
|
4
|
+
public struct Bytes:
|
|
5
|
+
data: own[ubyte]?
|
|
6
|
+
len: ptr_uint
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
extending Bytes:
|
|
10
|
+
public static function empty() -> Bytes:
|
|
11
|
+
return Bytes(data = null, len = 0)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
public static function copy(source: span[ubyte]) -> Bytes:
|
|
15
|
+
if source.len == 0:
|
|
16
|
+
return Bytes.empty()
|
|
17
|
+
|
|
18
|
+
let data = heap.must_alloc[ubyte](source.len)
|
|
19
|
+
heap.copy_bytes(data, source.data, source.len)
|
|
20
|
+
|
|
21
|
+
return Bytes(data = data, len = source.len)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
public static function from_owned(data: own[ubyte], len: ptr_uint) -> Bytes:
|
|
25
|
+
return Bytes(data = data, len = len)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
public static function take_owned(data: own[ubyte]?, len: ptr_uint) -> Bytes:
|
|
29
|
+
return Bytes(data = data, len = len)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
public editable function release() -> void:
|
|
33
|
+
heap.release(this.data)
|
|
34
|
+
this.data = null
|
|
35
|
+
this.len = 0
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
public function as_span() -> span[ubyte]:
|
|
39
|
+
let data = this.data else:
|
|
40
|
+
return span[ubyte](data = zero[ptr[ubyte]], len = 0)
|
|
41
|
+
|
|
42
|
+
return span[ubyte](data = data, len = this.len)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
public function as_str() -> Option[str]:
|
|
46
|
+
return text.utf8_byte_span_as_str(this.as_span())
|