box2d-ruby 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +336 -0
  4. data/examples/contact_events.rb +22 -0
  5. data/examples/debug_draw.rb +15 -0
  6. data/examples/falling_ball.rb +19 -0
  7. data/examples/rugl_debug_draw.rb +68 -0
  8. data/examples/stagecraft_debug_draw.rb +64 -0
  9. data/examples/support/box2d_debug_lines.rb +125 -0
  10. data/ext/box2d/CMakeLists.txt +35 -0
  11. data/ext/box2d/extconf.rb +42 -0
  12. data/ext/box2d/native.c +9 -0
  13. data/ext/box2d/vendor/box2d/LICENSE +21 -0
  14. data/ext/box2d/vendor/box2d/VERSION +1 -0
  15. data/ext/box2d/vendor/box2d/include/box2d/base.h +131 -0
  16. data/ext/box2d/vendor/box2d/include/box2d/box2d.h +1222 -0
  17. data/ext/box2d/vendor/box2d/include/box2d/collision.h +830 -0
  18. data/ext/box2d/vendor/box2d/include/box2d/id.h +144 -0
  19. data/ext/box2d/vendor/box2d/include/box2d/math_functions.h +761 -0
  20. data/ext/box2d/vendor/box2d/include/box2d/types.h +1457 -0
  21. data/ext/box2d/vendor/box2d/src/CMakeLists.txt +223 -0
  22. data/ext/box2d/vendor/box2d/src/aabb.c +132 -0
  23. data/ext/box2d/vendor/box2d/src/aabb.h +56 -0
  24. data/ext/box2d/vendor/box2d/src/arena_allocator.c +112 -0
  25. data/ext/box2d/vendor/box2d/src/arena_allocator.h +48 -0
  26. data/ext/box2d/vendor/box2d/src/array.c +8 -0
  27. data/ext/box2d/vendor/box2d/src/array.h +179 -0
  28. data/ext/box2d/vendor/box2d/src/atomic.h +79 -0
  29. data/ext/box2d/vendor/box2d/src/bitset.c +67 -0
  30. data/ext/box2d/vendor/box2d/src/bitset.h +65 -0
  31. data/ext/box2d/vendor/box2d/src/body.c +1884 -0
  32. data/ext/box2d/vendor/box2d/src/body.h +194 -0
  33. data/ext/box2d/vendor/box2d/src/box2d.natvis +41 -0
  34. data/ext/box2d/vendor/box2d/src/broad_phase.c +524 -0
  35. data/ext/box2d/vendor/box2d/src/broad_phase.h +83 -0
  36. data/ext/box2d/vendor/box2d/src/constants.h +54 -0
  37. data/ext/box2d/vendor/box2d/src/constraint_graph.c +322 -0
  38. data/ext/box2d/vendor/box2d/src/constraint_graph.h +58 -0
  39. data/ext/box2d/vendor/box2d/src/contact.c +650 -0
  40. data/ext/box2d/vendor/box2d/src/contact.h +148 -0
  41. data/ext/box2d/vendor/box2d/src/contact_solver.c +2120 -0
  42. data/ext/box2d/vendor/box2d/src/contact_solver.h +54 -0
  43. data/ext/box2d/vendor/box2d/src/core.c +178 -0
  44. data/ext/box2d/vendor/box2d/src/core.h +149 -0
  45. data/ext/box2d/vendor/box2d/src/ctz.h +112 -0
  46. data/ext/box2d/vendor/box2d/src/distance.c +1415 -0
  47. data/ext/box2d/vendor/box2d/src/distance_joint.c +556 -0
  48. data/ext/box2d/vendor/box2d/src/dynamic_tree.c +1989 -0
  49. data/ext/box2d/vendor/box2d/src/geometry.c +1028 -0
  50. data/ext/box2d/vendor/box2d/src/hull.c +328 -0
  51. data/ext/box2d/vendor/box2d/src/id_pool.c +79 -0
  52. data/ext/box2d/vendor/box2d/src/id_pool.h +35 -0
  53. data/ext/box2d/vendor/box2d/src/island.c +977 -0
  54. data/ext/box2d/vendor/box2d/src/island.h +89 -0
  55. data/ext/box2d/vendor/box2d/src/joint.c +1272 -0
  56. data/ext/box2d/vendor/box2d/src/joint.h +335 -0
  57. data/ext/box2d/vendor/box2d/src/manifold.c +1726 -0
  58. data/ext/box2d/vendor/box2d/src/math_functions.c +159 -0
  59. data/ext/box2d/vendor/box2d/src/motor_joint.c +283 -0
  60. data/ext/box2d/vendor/box2d/src/mouse_joint.c +214 -0
  61. data/ext/box2d/vendor/box2d/src/mover.c +73 -0
  62. data/ext/box2d/vendor/box2d/src/prismatic_joint.c +656 -0
  63. data/ext/box2d/vendor/box2d/src/revolute_joint.c +534 -0
  64. data/ext/box2d/vendor/box2d/src/sensor.c +389 -0
  65. data/ext/box2d/vendor/box2d/src/sensor.h +36 -0
  66. data/ext/box2d/vendor/box2d/src/shape.c +1714 -0
  67. data/ext/box2d/vendor/box2d/src/shape.h +123 -0
  68. data/ext/box2d/vendor/box2d/src/solver.c +2038 -0
  69. data/ext/box2d/vendor/box2d/src/solver.h +155 -0
  70. data/ext/box2d/vendor/box2d/src/solver_set.c +613 -0
  71. data/ext/box2d/vendor/box2d/src/solver_set.h +57 -0
  72. data/ext/box2d/vendor/box2d/src/table.c +238 -0
  73. data/ext/box2d/vendor/box2d/src/table.h +37 -0
  74. data/ext/box2d/vendor/box2d/src/timer.c +185 -0
  75. data/ext/box2d/vendor/box2d/src/types.c +151 -0
  76. data/ext/box2d/vendor/box2d/src/weld_joint.c +310 -0
  77. data/ext/box2d/vendor/box2d/src/wheel_joint.c +551 -0
  78. data/ext/box2d/vendor/box2d/src/world.c +3301 -0
  79. data/ext/box2d/vendor/box2d/src/world.h +192 -0
  80. data/generator/generate.rb +316 -0
  81. data/generator/layout_probe.c +507 -0
  82. data/generator/verify_layouts.rb +32 -0
  83. data/lib/box2d/body.rb +172 -0
  84. data/lib/box2d/body_definition.rb +38 -0
  85. data/lib/box2d/body_shapes.rb +135 -0
  86. data/lib/box2d/chain.rb +61 -0
  87. data/lib/box2d/debug_draw.rb +118 -0
  88. data/lib/box2d/events.rb +103 -0
  89. data/lib/box2d/fixed_stepper.rb +39 -0
  90. data/lib/box2d/handle.rb +46 -0
  91. data/lib/box2d/hit.rb +5 -0
  92. data/lib/box2d/joint.rb +197 -0
  93. data/lib/box2d/native.rb +1462 -0
  94. data/lib/box2d/native_loader.rb +45 -0
  95. data/lib/box2d/pixel_scale.rb +29 -0
  96. data/lib/box2d/shape.rb +109 -0
  97. data/lib/box2d/shape_definition.rb +44 -0
  98. data/lib/box2d/value_conversion.rb +80 -0
  99. data/lib/box2d/version.rb +7 -0
  100. data/lib/box2d/world.rb +135 -0
  101. data/lib/box2d/world_joints.rb +156 -0
  102. data/lib/box2d/world_queries.rb +122 -0
  103. data/lib/box2d/world_registry.rb +95 -0
  104. data/lib/box2d.rb +31 -0
  105. data/script/build_platform_gem.rb +24 -0
  106. data/script/deterministic_scene.rb +56 -0
  107. data/script/update_deterministic_snapshot.rb +11 -0
  108. data/script/verify_platform_gem.rb +24 -0
  109. metadata +164 -0
@@ -0,0 +1,507 @@
1
+ // Generated by generator/generate.rb. Do not edit.
2
+ #include <stddef.h>
3
+ #include <stdio.h>
4
+ #include <box2d/box2d.h>
5
+
6
+ int main(void)
7
+ {
8
+ printf("S\tb2Version\t%zu\t%zu\n", sizeof(b2Version), _Alignof(b2Version));
9
+ printf("F\tb2Version\tmajor\t%zu\n", offsetof(b2Version, major));
10
+ printf("F\tb2Version\tminor\t%zu\n", offsetof(b2Version, minor));
11
+ printf("F\tb2Version\trevision\t%zu\n", offsetof(b2Version, revision));
12
+ printf("S\tb2Vec2\t%zu\t%zu\n", sizeof(b2Vec2), _Alignof(b2Vec2));
13
+ printf("F\tb2Vec2\tx\t%zu\n", offsetof(b2Vec2, x));
14
+ printf("F\tb2Vec2\ty\t%zu\n", offsetof(b2Vec2, y));
15
+ printf("S\tb2CosSin\t%zu\t%zu\n", sizeof(b2CosSin), _Alignof(b2CosSin));
16
+ printf("F\tb2CosSin\tcosine\t%zu\n", offsetof(b2CosSin, cosine));
17
+ printf("F\tb2CosSin\tsine\t%zu\n", offsetof(b2CosSin, sine));
18
+ printf("S\tb2Rot\t%zu\t%zu\n", sizeof(b2Rot), _Alignof(b2Rot));
19
+ printf("F\tb2Rot\tc\t%zu\n", offsetof(b2Rot, c));
20
+ printf("F\tb2Rot\ts\t%zu\n", offsetof(b2Rot, s));
21
+ printf("S\tb2Transform\t%zu\t%zu\n", sizeof(b2Transform), _Alignof(b2Transform));
22
+ printf("F\tb2Transform\tp\t%zu\n", offsetof(b2Transform, p));
23
+ printf("F\tb2Transform\tq\t%zu\n", offsetof(b2Transform, q));
24
+ printf("S\tb2Mat22\t%zu\t%zu\n", sizeof(b2Mat22), _Alignof(b2Mat22));
25
+ printf("F\tb2Mat22\tcx\t%zu\n", offsetof(b2Mat22, cx));
26
+ printf("F\tb2Mat22\tcy\t%zu\n", offsetof(b2Mat22, cy));
27
+ printf("S\tb2AABB\t%zu\t%zu\n", sizeof(b2AABB), _Alignof(b2AABB));
28
+ printf("F\tb2AABB\tlowerBound\t%zu\n", offsetof(b2AABB, lowerBound));
29
+ printf("F\tb2AABB\tupperBound\t%zu\n", offsetof(b2AABB, upperBound));
30
+ printf("S\tb2Plane\t%zu\t%zu\n", sizeof(b2Plane), _Alignof(b2Plane));
31
+ printf("F\tb2Plane\tnormal\t%zu\n", offsetof(b2Plane, normal));
32
+ printf("F\tb2Plane\toffset\t%zu\n", offsetof(b2Plane, offset));
33
+ printf("S\tb2RayCastInput\t%zu\t%zu\n", sizeof(b2RayCastInput), _Alignof(b2RayCastInput));
34
+ printf("F\tb2RayCastInput\torigin\t%zu\n", offsetof(b2RayCastInput, origin));
35
+ printf("F\tb2RayCastInput\ttranslation\t%zu\n", offsetof(b2RayCastInput, translation));
36
+ printf("F\tb2RayCastInput\tmaxFraction\t%zu\n", offsetof(b2RayCastInput, maxFraction));
37
+ printf("S\tb2ShapeProxy\t%zu\t%zu\n", sizeof(b2ShapeProxy), _Alignof(b2ShapeProxy));
38
+ printf("F\tb2ShapeProxy\tpoints\t%zu\n", offsetof(b2ShapeProxy, points));
39
+ printf("F\tb2ShapeProxy\tcount\t%zu\n", offsetof(b2ShapeProxy, count));
40
+ printf("F\tb2ShapeProxy\tradius\t%zu\n", offsetof(b2ShapeProxy, radius));
41
+ printf("S\tb2ShapeCastInput\t%zu\t%zu\n", sizeof(b2ShapeCastInput), _Alignof(b2ShapeCastInput));
42
+ printf("F\tb2ShapeCastInput\tproxy\t%zu\n", offsetof(b2ShapeCastInput, proxy));
43
+ printf("F\tb2ShapeCastInput\ttranslation\t%zu\n", offsetof(b2ShapeCastInput, translation));
44
+ printf("F\tb2ShapeCastInput\tmaxFraction\t%zu\n", offsetof(b2ShapeCastInput, maxFraction));
45
+ printf("F\tb2ShapeCastInput\tcanEncroach\t%zu\n", offsetof(b2ShapeCastInput, canEncroach));
46
+ printf("S\tb2CastOutput\t%zu\t%zu\n", sizeof(b2CastOutput), _Alignof(b2CastOutput));
47
+ printf("F\tb2CastOutput\tnormal\t%zu\n", offsetof(b2CastOutput, normal));
48
+ printf("F\tb2CastOutput\tpoint\t%zu\n", offsetof(b2CastOutput, point));
49
+ printf("F\tb2CastOutput\tfraction\t%zu\n", offsetof(b2CastOutput, fraction));
50
+ printf("F\tb2CastOutput\titerations\t%zu\n", offsetof(b2CastOutput, iterations));
51
+ printf("F\tb2CastOutput\thit\t%zu\n", offsetof(b2CastOutput, hit));
52
+ printf("S\tb2MassData\t%zu\t%zu\n", sizeof(b2MassData), _Alignof(b2MassData));
53
+ printf("F\tb2MassData\tmass\t%zu\n", offsetof(b2MassData, mass));
54
+ printf("F\tb2MassData\tcenter\t%zu\n", offsetof(b2MassData, center));
55
+ printf("F\tb2MassData\trotationalInertia\t%zu\n", offsetof(b2MassData, rotationalInertia));
56
+ printf("S\tb2Circle\t%zu\t%zu\n", sizeof(b2Circle), _Alignof(b2Circle));
57
+ printf("F\tb2Circle\tcenter\t%zu\n", offsetof(b2Circle, center));
58
+ printf("F\tb2Circle\tradius\t%zu\n", offsetof(b2Circle, radius));
59
+ printf("S\tb2Capsule\t%zu\t%zu\n", sizeof(b2Capsule), _Alignof(b2Capsule));
60
+ printf("F\tb2Capsule\tcenter1\t%zu\n", offsetof(b2Capsule, center1));
61
+ printf("F\tb2Capsule\tcenter2\t%zu\n", offsetof(b2Capsule, center2));
62
+ printf("F\tb2Capsule\tradius\t%zu\n", offsetof(b2Capsule, radius));
63
+ printf("S\tb2Polygon\t%zu\t%zu\n", sizeof(b2Polygon), _Alignof(b2Polygon));
64
+ printf("F\tb2Polygon\tvertices\t%zu\n", offsetof(b2Polygon, vertices));
65
+ printf("F\tb2Polygon\tnormals\t%zu\n", offsetof(b2Polygon, normals));
66
+ printf("F\tb2Polygon\tcentroid\t%zu\n", offsetof(b2Polygon, centroid));
67
+ printf("F\tb2Polygon\tradius\t%zu\n", offsetof(b2Polygon, radius));
68
+ printf("F\tb2Polygon\tcount\t%zu\n", offsetof(b2Polygon, count));
69
+ printf("S\tb2Segment\t%zu\t%zu\n", sizeof(b2Segment), _Alignof(b2Segment));
70
+ printf("F\tb2Segment\tpoint1\t%zu\n", offsetof(b2Segment, point1));
71
+ printf("F\tb2Segment\tpoint2\t%zu\n", offsetof(b2Segment, point2));
72
+ printf("S\tb2ChainSegment\t%zu\t%zu\n", sizeof(b2ChainSegment), _Alignof(b2ChainSegment));
73
+ printf("F\tb2ChainSegment\tghost1\t%zu\n", offsetof(b2ChainSegment, ghost1));
74
+ printf("F\tb2ChainSegment\tsegment\t%zu\n", offsetof(b2ChainSegment, segment));
75
+ printf("F\tb2ChainSegment\tghost2\t%zu\n", offsetof(b2ChainSegment, ghost2));
76
+ printf("F\tb2ChainSegment\tchainId\t%zu\n", offsetof(b2ChainSegment, chainId));
77
+ printf("S\tb2Hull\t%zu\t%zu\n", sizeof(b2Hull), _Alignof(b2Hull));
78
+ printf("F\tb2Hull\tpoints\t%zu\n", offsetof(b2Hull, points));
79
+ printf("F\tb2Hull\tcount\t%zu\n", offsetof(b2Hull, count));
80
+ printf("S\tb2SegmentDistanceResult\t%zu\t%zu\n", sizeof(b2SegmentDistanceResult), _Alignof(b2SegmentDistanceResult));
81
+ printf("F\tb2SegmentDistanceResult\tclosest1\t%zu\n", offsetof(b2SegmentDistanceResult, closest1));
82
+ printf("F\tb2SegmentDistanceResult\tclosest2\t%zu\n", offsetof(b2SegmentDistanceResult, closest2));
83
+ printf("F\tb2SegmentDistanceResult\tfraction1\t%zu\n", offsetof(b2SegmentDistanceResult, fraction1));
84
+ printf("F\tb2SegmentDistanceResult\tfraction2\t%zu\n", offsetof(b2SegmentDistanceResult, fraction2));
85
+ printf("F\tb2SegmentDistanceResult\tdistanceSquared\t%zu\n", offsetof(b2SegmentDistanceResult, distanceSquared));
86
+ printf("S\tb2SimplexCache\t%zu\t%zu\n", sizeof(b2SimplexCache), _Alignof(b2SimplexCache));
87
+ printf("F\tb2SimplexCache\tcount\t%zu\n", offsetof(b2SimplexCache, count));
88
+ printf("F\tb2SimplexCache\tindexA\t%zu\n", offsetof(b2SimplexCache, indexA));
89
+ printf("F\tb2SimplexCache\tindexB\t%zu\n", offsetof(b2SimplexCache, indexB));
90
+ printf("S\tb2DistanceInput\t%zu\t%zu\n", sizeof(b2DistanceInput), _Alignof(b2DistanceInput));
91
+ printf("F\tb2DistanceInput\tproxyA\t%zu\n", offsetof(b2DistanceInput, proxyA));
92
+ printf("F\tb2DistanceInput\tproxyB\t%zu\n", offsetof(b2DistanceInput, proxyB));
93
+ printf("F\tb2DistanceInput\ttransformA\t%zu\n", offsetof(b2DistanceInput, transformA));
94
+ printf("F\tb2DistanceInput\ttransformB\t%zu\n", offsetof(b2DistanceInput, transformB));
95
+ printf("F\tb2DistanceInput\tuseRadii\t%zu\n", offsetof(b2DistanceInput, useRadii));
96
+ printf("S\tb2DistanceOutput\t%zu\t%zu\n", sizeof(b2DistanceOutput), _Alignof(b2DistanceOutput));
97
+ printf("F\tb2DistanceOutput\tpointA\t%zu\n", offsetof(b2DistanceOutput, pointA));
98
+ printf("F\tb2DistanceOutput\tpointB\t%zu\n", offsetof(b2DistanceOutput, pointB));
99
+ printf("F\tb2DistanceOutput\tnormal\t%zu\n", offsetof(b2DistanceOutput, normal));
100
+ printf("F\tb2DistanceOutput\tdistance\t%zu\n", offsetof(b2DistanceOutput, distance));
101
+ printf("F\tb2DistanceOutput\titerations\t%zu\n", offsetof(b2DistanceOutput, iterations));
102
+ printf("F\tb2DistanceOutput\tsimplexCount\t%zu\n", offsetof(b2DistanceOutput, simplexCount));
103
+ printf("S\tb2SimplexVertex\t%zu\t%zu\n", sizeof(b2SimplexVertex), _Alignof(b2SimplexVertex));
104
+ printf("F\tb2SimplexVertex\twA\t%zu\n", offsetof(b2SimplexVertex, wA));
105
+ printf("F\tb2SimplexVertex\twB\t%zu\n", offsetof(b2SimplexVertex, wB));
106
+ printf("F\tb2SimplexVertex\tw\t%zu\n", offsetof(b2SimplexVertex, w));
107
+ printf("F\tb2SimplexVertex\ta\t%zu\n", offsetof(b2SimplexVertex, a));
108
+ printf("F\tb2SimplexVertex\tindexA\t%zu\n", offsetof(b2SimplexVertex, indexA));
109
+ printf("F\tb2SimplexVertex\tindexB\t%zu\n", offsetof(b2SimplexVertex, indexB));
110
+ printf("S\tb2Simplex\t%zu\t%zu\n", sizeof(b2Simplex), _Alignof(b2Simplex));
111
+ printf("F\tb2Simplex\tv1\t%zu\n", offsetof(b2Simplex, v1));
112
+ printf("F\tb2Simplex\tv2\t%zu\n", offsetof(b2Simplex, v2));
113
+ printf("F\tb2Simplex\tv3\t%zu\n", offsetof(b2Simplex, v3));
114
+ printf("F\tb2Simplex\tcount\t%zu\n", offsetof(b2Simplex, count));
115
+ printf("S\tb2ShapeCastPairInput\t%zu\t%zu\n", sizeof(b2ShapeCastPairInput), _Alignof(b2ShapeCastPairInput));
116
+ printf("F\tb2ShapeCastPairInput\tproxyA\t%zu\n", offsetof(b2ShapeCastPairInput, proxyA));
117
+ printf("F\tb2ShapeCastPairInput\tproxyB\t%zu\n", offsetof(b2ShapeCastPairInput, proxyB));
118
+ printf("F\tb2ShapeCastPairInput\ttransformA\t%zu\n", offsetof(b2ShapeCastPairInput, transformA));
119
+ printf("F\tb2ShapeCastPairInput\ttransformB\t%zu\n", offsetof(b2ShapeCastPairInput, transformB));
120
+ printf("F\tb2ShapeCastPairInput\ttranslationB\t%zu\n", offsetof(b2ShapeCastPairInput, translationB));
121
+ printf("F\tb2ShapeCastPairInput\tmaxFraction\t%zu\n", offsetof(b2ShapeCastPairInput, maxFraction));
122
+ printf("F\tb2ShapeCastPairInput\tcanEncroach\t%zu\n", offsetof(b2ShapeCastPairInput, canEncroach));
123
+ printf("S\tb2Sweep\t%zu\t%zu\n", sizeof(b2Sweep), _Alignof(b2Sweep));
124
+ printf("F\tb2Sweep\tlocalCenter\t%zu\n", offsetof(b2Sweep, localCenter));
125
+ printf("F\tb2Sweep\tc1\t%zu\n", offsetof(b2Sweep, c1));
126
+ printf("F\tb2Sweep\tc2\t%zu\n", offsetof(b2Sweep, c2));
127
+ printf("F\tb2Sweep\tq1\t%zu\n", offsetof(b2Sweep, q1));
128
+ printf("F\tb2Sweep\tq2\t%zu\n", offsetof(b2Sweep, q2));
129
+ printf("S\tb2TOIInput\t%zu\t%zu\n", sizeof(b2TOIInput), _Alignof(b2TOIInput));
130
+ printf("F\tb2TOIInput\tproxyA\t%zu\n", offsetof(b2TOIInput, proxyA));
131
+ printf("F\tb2TOIInput\tproxyB\t%zu\n", offsetof(b2TOIInput, proxyB));
132
+ printf("F\tb2TOIInput\tsweepA\t%zu\n", offsetof(b2TOIInput, sweepA));
133
+ printf("F\tb2TOIInput\tsweepB\t%zu\n", offsetof(b2TOIInput, sweepB));
134
+ printf("F\tb2TOIInput\tmaxFraction\t%zu\n", offsetof(b2TOIInput, maxFraction));
135
+ printf("S\tb2TOIOutput\t%zu\t%zu\n", sizeof(b2TOIOutput), _Alignof(b2TOIOutput));
136
+ printf("F\tb2TOIOutput\tstate\t%zu\n", offsetof(b2TOIOutput, state));
137
+ printf("F\tb2TOIOutput\tfraction\t%zu\n", offsetof(b2TOIOutput, fraction));
138
+ printf("S\tb2ManifoldPoint\t%zu\t%zu\n", sizeof(b2ManifoldPoint), _Alignof(b2ManifoldPoint));
139
+ printf("F\tb2ManifoldPoint\tpoint\t%zu\n", offsetof(b2ManifoldPoint, point));
140
+ printf("F\tb2ManifoldPoint\tanchorA\t%zu\n", offsetof(b2ManifoldPoint, anchorA));
141
+ printf("F\tb2ManifoldPoint\tanchorB\t%zu\n", offsetof(b2ManifoldPoint, anchorB));
142
+ printf("F\tb2ManifoldPoint\tseparation\t%zu\n", offsetof(b2ManifoldPoint, separation));
143
+ printf("F\tb2ManifoldPoint\tnormalImpulse\t%zu\n", offsetof(b2ManifoldPoint, normalImpulse));
144
+ printf("F\tb2ManifoldPoint\ttangentImpulse\t%zu\n", offsetof(b2ManifoldPoint, tangentImpulse));
145
+ printf("F\tb2ManifoldPoint\ttotalNormalImpulse\t%zu\n", offsetof(b2ManifoldPoint, totalNormalImpulse));
146
+ printf("F\tb2ManifoldPoint\tnormalVelocity\t%zu\n", offsetof(b2ManifoldPoint, normalVelocity));
147
+ printf("F\tb2ManifoldPoint\tid\t%zu\n", offsetof(b2ManifoldPoint, id));
148
+ printf("F\tb2ManifoldPoint\tpersisted\t%zu\n", offsetof(b2ManifoldPoint, persisted));
149
+ printf("S\tb2Manifold\t%zu\t%zu\n", sizeof(b2Manifold), _Alignof(b2Manifold));
150
+ printf("F\tb2Manifold\tnormal\t%zu\n", offsetof(b2Manifold, normal));
151
+ printf("F\tb2Manifold\trollingImpulse\t%zu\n", offsetof(b2Manifold, rollingImpulse));
152
+ printf("F\tb2Manifold\tpoints\t%zu\n", offsetof(b2Manifold, points));
153
+ printf("F\tb2Manifold\tpointCount\t%zu\n", offsetof(b2Manifold, pointCount));
154
+ printf("S\tb2DynamicTree\t%zu\t%zu\n", sizeof(b2DynamicTree), _Alignof(b2DynamicTree));
155
+ printf("F\tb2DynamicTree\tnodes\t%zu\n", offsetof(b2DynamicTree, nodes));
156
+ printf("F\tb2DynamicTree\troot\t%zu\n", offsetof(b2DynamicTree, root));
157
+ printf("F\tb2DynamicTree\tnodeCount\t%zu\n", offsetof(b2DynamicTree, nodeCount));
158
+ printf("F\tb2DynamicTree\tnodeCapacity\t%zu\n", offsetof(b2DynamicTree, nodeCapacity));
159
+ printf("F\tb2DynamicTree\tfreeList\t%zu\n", offsetof(b2DynamicTree, freeList));
160
+ printf("F\tb2DynamicTree\tproxyCount\t%zu\n", offsetof(b2DynamicTree, proxyCount));
161
+ printf("F\tb2DynamicTree\tleafIndices\t%zu\n", offsetof(b2DynamicTree, leafIndices));
162
+ printf("F\tb2DynamicTree\tleafBoxes\t%zu\n", offsetof(b2DynamicTree, leafBoxes));
163
+ printf("F\tb2DynamicTree\tleafCenters\t%zu\n", offsetof(b2DynamicTree, leafCenters));
164
+ printf("F\tb2DynamicTree\tbinIndices\t%zu\n", offsetof(b2DynamicTree, binIndices));
165
+ printf("F\tb2DynamicTree\trebuildCapacity\t%zu\n", offsetof(b2DynamicTree, rebuildCapacity));
166
+ printf("S\tb2TreeStats\t%zu\t%zu\n", sizeof(b2TreeStats), _Alignof(b2TreeStats));
167
+ printf("F\tb2TreeStats\tnodeVisits\t%zu\n", offsetof(b2TreeStats, nodeVisits));
168
+ printf("F\tb2TreeStats\tleafVisits\t%zu\n", offsetof(b2TreeStats, leafVisits));
169
+ printf("S\tb2PlaneResult\t%zu\t%zu\n", sizeof(b2PlaneResult), _Alignof(b2PlaneResult));
170
+ printf("F\tb2PlaneResult\tplane\t%zu\n", offsetof(b2PlaneResult, plane));
171
+ printf("F\tb2PlaneResult\thit\t%zu\n", offsetof(b2PlaneResult, hit));
172
+ printf("S\tb2CollisionPlane\t%zu\t%zu\n", sizeof(b2CollisionPlane), _Alignof(b2CollisionPlane));
173
+ printf("F\tb2CollisionPlane\tplane\t%zu\n", offsetof(b2CollisionPlane, plane));
174
+ printf("F\tb2CollisionPlane\tpushLimit\t%zu\n", offsetof(b2CollisionPlane, pushLimit));
175
+ printf("F\tb2CollisionPlane\tpush\t%zu\n", offsetof(b2CollisionPlane, push));
176
+ printf("F\tb2CollisionPlane\tclipVelocity\t%zu\n", offsetof(b2CollisionPlane, clipVelocity));
177
+ printf("S\tb2PlaneSolverResult\t%zu\t%zu\n", sizeof(b2PlaneSolverResult), _Alignof(b2PlaneSolverResult));
178
+ printf("F\tb2PlaneSolverResult\tposition\t%zu\n", offsetof(b2PlaneSolverResult, position));
179
+ printf("F\tb2PlaneSolverResult\titerationCount\t%zu\n", offsetof(b2PlaneSolverResult, iterationCount));
180
+ printf("S\tb2WorldId\t%zu\t%zu\n", sizeof(b2WorldId), _Alignof(b2WorldId));
181
+ printf("F\tb2WorldId\tindex1\t%zu\n", offsetof(b2WorldId, index1));
182
+ printf("F\tb2WorldId\tgeneration\t%zu\n", offsetof(b2WorldId, generation));
183
+ printf("S\tb2BodyId\t%zu\t%zu\n", sizeof(b2BodyId), _Alignof(b2BodyId));
184
+ printf("F\tb2BodyId\tindex1\t%zu\n", offsetof(b2BodyId, index1));
185
+ printf("F\tb2BodyId\tworld0\t%zu\n", offsetof(b2BodyId, world0));
186
+ printf("F\tb2BodyId\tgeneration\t%zu\n", offsetof(b2BodyId, generation));
187
+ printf("S\tb2ShapeId\t%zu\t%zu\n", sizeof(b2ShapeId), _Alignof(b2ShapeId));
188
+ printf("F\tb2ShapeId\tindex1\t%zu\n", offsetof(b2ShapeId, index1));
189
+ printf("F\tb2ShapeId\tworld0\t%zu\n", offsetof(b2ShapeId, world0));
190
+ printf("F\tb2ShapeId\tgeneration\t%zu\n", offsetof(b2ShapeId, generation));
191
+ printf("S\tb2ChainId\t%zu\t%zu\n", sizeof(b2ChainId), _Alignof(b2ChainId));
192
+ printf("F\tb2ChainId\tindex1\t%zu\n", offsetof(b2ChainId, index1));
193
+ printf("F\tb2ChainId\tworld0\t%zu\n", offsetof(b2ChainId, world0));
194
+ printf("F\tb2ChainId\tgeneration\t%zu\n", offsetof(b2ChainId, generation));
195
+ printf("S\tb2JointId\t%zu\t%zu\n", sizeof(b2JointId), _Alignof(b2JointId));
196
+ printf("F\tb2JointId\tindex1\t%zu\n", offsetof(b2JointId, index1));
197
+ printf("F\tb2JointId\tworld0\t%zu\n", offsetof(b2JointId, world0));
198
+ printf("F\tb2JointId\tgeneration\t%zu\n", offsetof(b2JointId, generation));
199
+ printf("S\tb2RayResult\t%zu\t%zu\n", sizeof(b2RayResult), _Alignof(b2RayResult));
200
+ printf("F\tb2RayResult\tshapeId\t%zu\n", offsetof(b2RayResult, shapeId));
201
+ printf("F\tb2RayResult\tpoint\t%zu\n", offsetof(b2RayResult, point));
202
+ printf("F\tb2RayResult\tnormal\t%zu\n", offsetof(b2RayResult, normal));
203
+ printf("F\tb2RayResult\tfraction\t%zu\n", offsetof(b2RayResult, fraction));
204
+ printf("F\tb2RayResult\tnodeVisits\t%zu\n", offsetof(b2RayResult, nodeVisits));
205
+ printf("F\tb2RayResult\tleafVisits\t%zu\n", offsetof(b2RayResult, leafVisits));
206
+ printf("F\tb2RayResult\thit\t%zu\n", offsetof(b2RayResult, hit));
207
+ printf("S\tb2WorldDef\t%zu\t%zu\n", sizeof(b2WorldDef), _Alignof(b2WorldDef));
208
+ printf("F\tb2WorldDef\tgravity\t%zu\n", offsetof(b2WorldDef, gravity));
209
+ printf("F\tb2WorldDef\trestitutionThreshold\t%zu\n", offsetof(b2WorldDef, restitutionThreshold));
210
+ printf("F\tb2WorldDef\thitEventThreshold\t%zu\n", offsetof(b2WorldDef, hitEventThreshold));
211
+ printf("F\tb2WorldDef\tcontactHertz\t%zu\n", offsetof(b2WorldDef, contactHertz));
212
+ printf("F\tb2WorldDef\tcontactDampingRatio\t%zu\n", offsetof(b2WorldDef, contactDampingRatio));
213
+ printf("F\tb2WorldDef\tmaxContactPushSpeed\t%zu\n", offsetof(b2WorldDef, maxContactPushSpeed));
214
+ printf("F\tb2WorldDef\tjointHertz\t%zu\n", offsetof(b2WorldDef, jointHertz));
215
+ printf("F\tb2WorldDef\tjointDampingRatio\t%zu\n", offsetof(b2WorldDef, jointDampingRatio));
216
+ printf("F\tb2WorldDef\tmaximumLinearSpeed\t%zu\n", offsetof(b2WorldDef, maximumLinearSpeed));
217
+ printf("F\tb2WorldDef\tfrictionCallback\t%zu\n", offsetof(b2WorldDef, frictionCallback));
218
+ printf("F\tb2WorldDef\trestitutionCallback\t%zu\n", offsetof(b2WorldDef, restitutionCallback));
219
+ printf("F\tb2WorldDef\tenableSleep\t%zu\n", offsetof(b2WorldDef, enableSleep));
220
+ printf("F\tb2WorldDef\tenableContinuous\t%zu\n", offsetof(b2WorldDef, enableContinuous));
221
+ printf("F\tb2WorldDef\tworkerCount\t%zu\n", offsetof(b2WorldDef, workerCount));
222
+ printf("F\tb2WorldDef\tenqueueTask\t%zu\n", offsetof(b2WorldDef, enqueueTask));
223
+ printf("F\tb2WorldDef\tfinishTask\t%zu\n", offsetof(b2WorldDef, finishTask));
224
+ printf("F\tb2WorldDef\tuserTaskContext\t%zu\n", offsetof(b2WorldDef, userTaskContext));
225
+ printf("F\tb2WorldDef\tuserData\t%zu\n", offsetof(b2WorldDef, userData));
226
+ printf("F\tb2WorldDef\tinternalValue\t%zu\n", offsetof(b2WorldDef, internalValue));
227
+ printf("S\tb2BodyDef\t%zu\t%zu\n", sizeof(b2BodyDef), _Alignof(b2BodyDef));
228
+ printf("F\tb2BodyDef\ttype\t%zu\n", offsetof(b2BodyDef, type));
229
+ printf("F\tb2BodyDef\tposition\t%zu\n", offsetof(b2BodyDef, position));
230
+ printf("F\tb2BodyDef\trotation\t%zu\n", offsetof(b2BodyDef, rotation));
231
+ printf("F\tb2BodyDef\tlinearVelocity\t%zu\n", offsetof(b2BodyDef, linearVelocity));
232
+ printf("F\tb2BodyDef\tangularVelocity\t%zu\n", offsetof(b2BodyDef, angularVelocity));
233
+ printf("F\tb2BodyDef\tlinearDamping\t%zu\n", offsetof(b2BodyDef, linearDamping));
234
+ printf("F\tb2BodyDef\tangularDamping\t%zu\n", offsetof(b2BodyDef, angularDamping));
235
+ printf("F\tb2BodyDef\tgravityScale\t%zu\n", offsetof(b2BodyDef, gravityScale));
236
+ printf("F\tb2BodyDef\tsleepThreshold\t%zu\n", offsetof(b2BodyDef, sleepThreshold));
237
+ printf("F\tb2BodyDef\tname\t%zu\n", offsetof(b2BodyDef, name));
238
+ printf("F\tb2BodyDef\tuserData\t%zu\n", offsetof(b2BodyDef, userData));
239
+ printf("F\tb2BodyDef\tenableSleep\t%zu\n", offsetof(b2BodyDef, enableSleep));
240
+ printf("F\tb2BodyDef\tisAwake\t%zu\n", offsetof(b2BodyDef, isAwake));
241
+ printf("F\tb2BodyDef\tfixedRotation\t%zu\n", offsetof(b2BodyDef, fixedRotation));
242
+ printf("F\tb2BodyDef\tisBullet\t%zu\n", offsetof(b2BodyDef, isBullet));
243
+ printf("F\tb2BodyDef\tisEnabled\t%zu\n", offsetof(b2BodyDef, isEnabled));
244
+ printf("F\tb2BodyDef\tallowFastRotation\t%zu\n", offsetof(b2BodyDef, allowFastRotation));
245
+ printf("F\tb2BodyDef\tinternalValue\t%zu\n", offsetof(b2BodyDef, internalValue));
246
+ printf("S\tb2Filter\t%zu\t%zu\n", sizeof(b2Filter), _Alignof(b2Filter));
247
+ printf("F\tb2Filter\tcategoryBits\t%zu\n", offsetof(b2Filter, categoryBits));
248
+ printf("F\tb2Filter\tmaskBits\t%zu\n", offsetof(b2Filter, maskBits));
249
+ printf("F\tb2Filter\tgroupIndex\t%zu\n", offsetof(b2Filter, groupIndex));
250
+ printf("S\tb2QueryFilter\t%zu\t%zu\n", sizeof(b2QueryFilter), _Alignof(b2QueryFilter));
251
+ printf("F\tb2QueryFilter\tcategoryBits\t%zu\n", offsetof(b2QueryFilter, categoryBits));
252
+ printf("F\tb2QueryFilter\tmaskBits\t%zu\n", offsetof(b2QueryFilter, maskBits));
253
+ printf("S\tb2SurfaceMaterial\t%zu\t%zu\n", sizeof(b2SurfaceMaterial), _Alignof(b2SurfaceMaterial));
254
+ printf("F\tb2SurfaceMaterial\tfriction\t%zu\n", offsetof(b2SurfaceMaterial, friction));
255
+ printf("F\tb2SurfaceMaterial\trestitution\t%zu\n", offsetof(b2SurfaceMaterial, restitution));
256
+ printf("F\tb2SurfaceMaterial\trollingResistance\t%zu\n", offsetof(b2SurfaceMaterial, rollingResistance));
257
+ printf("F\tb2SurfaceMaterial\ttangentSpeed\t%zu\n", offsetof(b2SurfaceMaterial, tangentSpeed));
258
+ printf("F\tb2SurfaceMaterial\tuserMaterialId\t%zu\n", offsetof(b2SurfaceMaterial, userMaterialId));
259
+ printf("F\tb2SurfaceMaterial\tcustomColor\t%zu\n", offsetof(b2SurfaceMaterial, customColor));
260
+ printf("S\tb2ShapeDef\t%zu\t%zu\n", sizeof(b2ShapeDef), _Alignof(b2ShapeDef));
261
+ printf("F\tb2ShapeDef\tuserData\t%zu\n", offsetof(b2ShapeDef, userData));
262
+ printf("F\tb2ShapeDef\tmaterial\t%zu\n", offsetof(b2ShapeDef, material));
263
+ printf("F\tb2ShapeDef\tdensity\t%zu\n", offsetof(b2ShapeDef, density));
264
+ printf("F\tb2ShapeDef\tfilter\t%zu\n", offsetof(b2ShapeDef, filter));
265
+ printf("F\tb2ShapeDef\tisSensor\t%zu\n", offsetof(b2ShapeDef, isSensor));
266
+ printf("F\tb2ShapeDef\tenableSensorEvents\t%zu\n", offsetof(b2ShapeDef, enableSensorEvents));
267
+ printf("F\tb2ShapeDef\tenableContactEvents\t%zu\n", offsetof(b2ShapeDef, enableContactEvents));
268
+ printf("F\tb2ShapeDef\tenableHitEvents\t%zu\n", offsetof(b2ShapeDef, enableHitEvents));
269
+ printf("F\tb2ShapeDef\tenablePreSolveEvents\t%zu\n", offsetof(b2ShapeDef, enablePreSolveEvents));
270
+ printf("F\tb2ShapeDef\tinvokeContactCreation\t%zu\n", offsetof(b2ShapeDef, invokeContactCreation));
271
+ printf("F\tb2ShapeDef\tupdateBodyMass\t%zu\n", offsetof(b2ShapeDef, updateBodyMass));
272
+ printf("F\tb2ShapeDef\tinternalValue\t%zu\n", offsetof(b2ShapeDef, internalValue));
273
+ printf("S\tb2ChainDef\t%zu\t%zu\n", sizeof(b2ChainDef), _Alignof(b2ChainDef));
274
+ printf("F\tb2ChainDef\tuserData\t%zu\n", offsetof(b2ChainDef, userData));
275
+ printf("F\tb2ChainDef\tpoints\t%zu\n", offsetof(b2ChainDef, points));
276
+ printf("F\tb2ChainDef\tcount\t%zu\n", offsetof(b2ChainDef, count));
277
+ printf("F\tb2ChainDef\tmaterials\t%zu\n", offsetof(b2ChainDef, materials));
278
+ printf("F\tb2ChainDef\tmaterialCount\t%zu\n", offsetof(b2ChainDef, materialCount));
279
+ printf("F\tb2ChainDef\tfilter\t%zu\n", offsetof(b2ChainDef, filter));
280
+ printf("F\tb2ChainDef\tisLoop\t%zu\n", offsetof(b2ChainDef, isLoop));
281
+ printf("F\tb2ChainDef\tenableSensorEvents\t%zu\n", offsetof(b2ChainDef, enableSensorEvents));
282
+ printf("F\tb2ChainDef\tinternalValue\t%zu\n", offsetof(b2ChainDef, internalValue));
283
+ printf("S\tb2Profile\t%zu\t%zu\n", sizeof(b2Profile), _Alignof(b2Profile));
284
+ printf("F\tb2Profile\tstep\t%zu\n", offsetof(b2Profile, step));
285
+ printf("F\tb2Profile\tpairs\t%zu\n", offsetof(b2Profile, pairs));
286
+ printf("F\tb2Profile\tcollide\t%zu\n", offsetof(b2Profile, collide));
287
+ printf("F\tb2Profile\tsolve\t%zu\n", offsetof(b2Profile, solve));
288
+ printf("F\tb2Profile\tmergeIslands\t%zu\n", offsetof(b2Profile, mergeIslands));
289
+ printf("F\tb2Profile\tprepareStages\t%zu\n", offsetof(b2Profile, prepareStages));
290
+ printf("F\tb2Profile\tsolveConstraints\t%zu\n", offsetof(b2Profile, solveConstraints));
291
+ printf("F\tb2Profile\tprepareConstraints\t%zu\n", offsetof(b2Profile, prepareConstraints));
292
+ printf("F\tb2Profile\tintegrateVelocities\t%zu\n", offsetof(b2Profile, integrateVelocities));
293
+ printf("F\tb2Profile\twarmStart\t%zu\n", offsetof(b2Profile, warmStart));
294
+ printf("F\tb2Profile\tsolveImpulses\t%zu\n", offsetof(b2Profile, solveImpulses));
295
+ printf("F\tb2Profile\tintegratePositions\t%zu\n", offsetof(b2Profile, integratePositions));
296
+ printf("F\tb2Profile\trelaxImpulses\t%zu\n", offsetof(b2Profile, relaxImpulses));
297
+ printf("F\tb2Profile\tapplyRestitution\t%zu\n", offsetof(b2Profile, applyRestitution));
298
+ printf("F\tb2Profile\tstoreImpulses\t%zu\n", offsetof(b2Profile, storeImpulses));
299
+ printf("F\tb2Profile\tsplitIslands\t%zu\n", offsetof(b2Profile, splitIslands));
300
+ printf("F\tb2Profile\ttransforms\t%zu\n", offsetof(b2Profile, transforms));
301
+ printf("F\tb2Profile\thitEvents\t%zu\n", offsetof(b2Profile, hitEvents));
302
+ printf("F\tb2Profile\trefit\t%zu\n", offsetof(b2Profile, refit));
303
+ printf("F\tb2Profile\tbullets\t%zu\n", offsetof(b2Profile, bullets));
304
+ printf("F\tb2Profile\tsleepIslands\t%zu\n", offsetof(b2Profile, sleepIslands));
305
+ printf("F\tb2Profile\tsensors\t%zu\n", offsetof(b2Profile, sensors));
306
+ printf("S\tb2Counters\t%zu\t%zu\n", sizeof(b2Counters), _Alignof(b2Counters));
307
+ printf("F\tb2Counters\tbodyCount\t%zu\n", offsetof(b2Counters, bodyCount));
308
+ printf("F\tb2Counters\tshapeCount\t%zu\n", offsetof(b2Counters, shapeCount));
309
+ printf("F\tb2Counters\tcontactCount\t%zu\n", offsetof(b2Counters, contactCount));
310
+ printf("F\tb2Counters\tjointCount\t%zu\n", offsetof(b2Counters, jointCount));
311
+ printf("F\tb2Counters\tislandCount\t%zu\n", offsetof(b2Counters, islandCount));
312
+ printf("F\tb2Counters\tstackUsed\t%zu\n", offsetof(b2Counters, stackUsed));
313
+ printf("F\tb2Counters\tstaticTreeHeight\t%zu\n", offsetof(b2Counters, staticTreeHeight));
314
+ printf("F\tb2Counters\ttreeHeight\t%zu\n", offsetof(b2Counters, treeHeight));
315
+ printf("F\tb2Counters\tbyteCount\t%zu\n", offsetof(b2Counters, byteCount));
316
+ printf("F\tb2Counters\ttaskCount\t%zu\n", offsetof(b2Counters, taskCount));
317
+ printf("F\tb2Counters\tcolorCounts\t%zu\n", offsetof(b2Counters, colorCounts));
318
+ printf("S\tb2DistanceJointDef\t%zu\t%zu\n", sizeof(b2DistanceJointDef), _Alignof(b2DistanceJointDef));
319
+ printf("F\tb2DistanceJointDef\tbodyIdA\t%zu\n", offsetof(b2DistanceJointDef, bodyIdA));
320
+ printf("F\tb2DistanceJointDef\tbodyIdB\t%zu\n", offsetof(b2DistanceJointDef, bodyIdB));
321
+ printf("F\tb2DistanceJointDef\tlocalAnchorA\t%zu\n", offsetof(b2DistanceJointDef, localAnchorA));
322
+ printf("F\tb2DistanceJointDef\tlocalAnchorB\t%zu\n", offsetof(b2DistanceJointDef, localAnchorB));
323
+ printf("F\tb2DistanceJointDef\tlength\t%zu\n", offsetof(b2DistanceJointDef, length));
324
+ printf("F\tb2DistanceJointDef\tenableSpring\t%zu\n", offsetof(b2DistanceJointDef, enableSpring));
325
+ printf("F\tb2DistanceJointDef\thertz\t%zu\n", offsetof(b2DistanceJointDef, hertz));
326
+ printf("F\tb2DistanceJointDef\tdampingRatio\t%zu\n", offsetof(b2DistanceJointDef, dampingRatio));
327
+ printf("F\tb2DistanceJointDef\tenableLimit\t%zu\n", offsetof(b2DistanceJointDef, enableLimit));
328
+ printf("F\tb2DistanceJointDef\tminLength\t%zu\n", offsetof(b2DistanceJointDef, minLength));
329
+ printf("F\tb2DistanceJointDef\tmaxLength\t%zu\n", offsetof(b2DistanceJointDef, maxLength));
330
+ printf("F\tb2DistanceJointDef\tenableMotor\t%zu\n", offsetof(b2DistanceJointDef, enableMotor));
331
+ printf("F\tb2DistanceJointDef\tmaxMotorForce\t%zu\n", offsetof(b2DistanceJointDef, maxMotorForce));
332
+ printf("F\tb2DistanceJointDef\tmotorSpeed\t%zu\n", offsetof(b2DistanceJointDef, motorSpeed));
333
+ printf("F\tb2DistanceJointDef\tcollideConnected\t%zu\n", offsetof(b2DistanceJointDef, collideConnected));
334
+ printf("F\tb2DistanceJointDef\tuserData\t%zu\n", offsetof(b2DistanceJointDef, userData));
335
+ printf("F\tb2DistanceJointDef\tinternalValue\t%zu\n", offsetof(b2DistanceJointDef, internalValue));
336
+ printf("S\tb2MotorJointDef\t%zu\t%zu\n", sizeof(b2MotorJointDef), _Alignof(b2MotorJointDef));
337
+ printf("F\tb2MotorJointDef\tbodyIdA\t%zu\n", offsetof(b2MotorJointDef, bodyIdA));
338
+ printf("F\tb2MotorJointDef\tbodyIdB\t%zu\n", offsetof(b2MotorJointDef, bodyIdB));
339
+ printf("F\tb2MotorJointDef\tlinearOffset\t%zu\n", offsetof(b2MotorJointDef, linearOffset));
340
+ printf("F\tb2MotorJointDef\tangularOffset\t%zu\n", offsetof(b2MotorJointDef, angularOffset));
341
+ printf("F\tb2MotorJointDef\tmaxForce\t%zu\n", offsetof(b2MotorJointDef, maxForce));
342
+ printf("F\tb2MotorJointDef\tmaxTorque\t%zu\n", offsetof(b2MotorJointDef, maxTorque));
343
+ printf("F\tb2MotorJointDef\tcorrectionFactor\t%zu\n", offsetof(b2MotorJointDef, correctionFactor));
344
+ printf("F\tb2MotorJointDef\tcollideConnected\t%zu\n", offsetof(b2MotorJointDef, collideConnected));
345
+ printf("F\tb2MotorJointDef\tuserData\t%zu\n", offsetof(b2MotorJointDef, userData));
346
+ printf("F\tb2MotorJointDef\tinternalValue\t%zu\n", offsetof(b2MotorJointDef, internalValue));
347
+ printf("S\tb2MouseJointDef\t%zu\t%zu\n", sizeof(b2MouseJointDef), _Alignof(b2MouseJointDef));
348
+ printf("F\tb2MouseJointDef\tbodyIdA\t%zu\n", offsetof(b2MouseJointDef, bodyIdA));
349
+ printf("F\tb2MouseJointDef\tbodyIdB\t%zu\n", offsetof(b2MouseJointDef, bodyIdB));
350
+ printf("F\tb2MouseJointDef\ttarget\t%zu\n", offsetof(b2MouseJointDef, target));
351
+ printf("F\tb2MouseJointDef\thertz\t%zu\n", offsetof(b2MouseJointDef, hertz));
352
+ printf("F\tb2MouseJointDef\tdampingRatio\t%zu\n", offsetof(b2MouseJointDef, dampingRatio));
353
+ printf("F\tb2MouseJointDef\tmaxForce\t%zu\n", offsetof(b2MouseJointDef, maxForce));
354
+ printf("F\tb2MouseJointDef\tcollideConnected\t%zu\n", offsetof(b2MouseJointDef, collideConnected));
355
+ printf("F\tb2MouseJointDef\tuserData\t%zu\n", offsetof(b2MouseJointDef, userData));
356
+ printf("F\tb2MouseJointDef\tinternalValue\t%zu\n", offsetof(b2MouseJointDef, internalValue));
357
+ printf("S\tb2FilterJointDef\t%zu\t%zu\n", sizeof(b2FilterJointDef), _Alignof(b2FilterJointDef));
358
+ printf("F\tb2FilterJointDef\tbodyIdA\t%zu\n", offsetof(b2FilterJointDef, bodyIdA));
359
+ printf("F\tb2FilterJointDef\tbodyIdB\t%zu\n", offsetof(b2FilterJointDef, bodyIdB));
360
+ printf("F\tb2FilterJointDef\tuserData\t%zu\n", offsetof(b2FilterJointDef, userData));
361
+ printf("F\tb2FilterJointDef\tinternalValue\t%zu\n", offsetof(b2FilterJointDef, internalValue));
362
+ printf("S\tb2PrismaticJointDef\t%zu\t%zu\n", sizeof(b2PrismaticJointDef), _Alignof(b2PrismaticJointDef));
363
+ printf("F\tb2PrismaticJointDef\tbodyIdA\t%zu\n", offsetof(b2PrismaticJointDef, bodyIdA));
364
+ printf("F\tb2PrismaticJointDef\tbodyIdB\t%zu\n", offsetof(b2PrismaticJointDef, bodyIdB));
365
+ printf("F\tb2PrismaticJointDef\tlocalAnchorA\t%zu\n", offsetof(b2PrismaticJointDef, localAnchorA));
366
+ printf("F\tb2PrismaticJointDef\tlocalAnchorB\t%zu\n", offsetof(b2PrismaticJointDef, localAnchorB));
367
+ printf("F\tb2PrismaticJointDef\tlocalAxisA\t%zu\n", offsetof(b2PrismaticJointDef, localAxisA));
368
+ printf("F\tb2PrismaticJointDef\treferenceAngle\t%zu\n", offsetof(b2PrismaticJointDef, referenceAngle));
369
+ printf("F\tb2PrismaticJointDef\tenableSpring\t%zu\n", offsetof(b2PrismaticJointDef, enableSpring));
370
+ printf("F\tb2PrismaticJointDef\thertz\t%zu\n", offsetof(b2PrismaticJointDef, hertz));
371
+ printf("F\tb2PrismaticJointDef\tdampingRatio\t%zu\n", offsetof(b2PrismaticJointDef, dampingRatio));
372
+ printf("F\tb2PrismaticJointDef\tenableLimit\t%zu\n", offsetof(b2PrismaticJointDef, enableLimit));
373
+ printf("F\tb2PrismaticJointDef\tlowerTranslation\t%zu\n", offsetof(b2PrismaticJointDef, lowerTranslation));
374
+ printf("F\tb2PrismaticJointDef\tupperTranslation\t%zu\n", offsetof(b2PrismaticJointDef, upperTranslation));
375
+ printf("F\tb2PrismaticJointDef\tenableMotor\t%zu\n", offsetof(b2PrismaticJointDef, enableMotor));
376
+ printf("F\tb2PrismaticJointDef\tmaxMotorForce\t%zu\n", offsetof(b2PrismaticJointDef, maxMotorForce));
377
+ printf("F\tb2PrismaticJointDef\tmotorSpeed\t%zu\n", offsetof(b2PrismaticJointDef, motorSpeed));
378
+ printf("F\tb2PrismaticJointDef\tcollideConnected\t%zu\n", offsetof(b2PrismaticJointDef, collideConnected));
379
+ printf("F\tb2PrismaticJointDef\tuserData\t%zu\n", offsetof(b2PrismaticJointDef, userData));
380
+ printf("F\tb2PrismaticJointDef\tinternalValue\t%zu\n", offsetof(b2PrismaticJointDef, internalValue));
381
+ printf("S\tb2RevoluteJointDef\t%zu\t%zu\n", sizeof(b2RevoluteJointDef), _Alignof(b2RevoluteJointDef));
382
+ printf("F\tb2RevoluteJointDef\tbodyIdA\t%zu\n", offsetof(b2RevoluteJointDef, bodyIdA));
383
+ printf("F\tb2RevoluteJointDef\tbodyIdB\t%zu\n", offsetof(b2RevoluteJointDef, bodyIdB));
384
+ printf("F\tb2RevoluteJointDef\tlocalAnchorA\t%zu\n", offsetof(b2RevoluteJointDef, localAnchorA));
385
+ printf("F\tb2RevoluteJointDef\tlocalAnchorB\t%zu\n", offsetof(b2RevoluteJointDef, localAnchorB));
386
+ printf("F\tb2RevoluteJointDef\treferenceAngle\t%zu\n", offsetof(b2RevoluteJointDef, referenceAngle));
387
+ printf("F\tb2RevoluteJointDef\tenableSpring\t%zu\n", offsetof(b2RevoluteJointDef, enableSpring));
388
+ printf("F\tb2RevoluteJointDef\thertz\t%zu\n", offsetof(b2RevoluteJointDef, hertz));
389
+ printf("F\tb2RevoluteJointDef\tdampingRatio\t%zu\n", offsetof(b2RevoluteJointDef, dampingRatio));
390
+ printf("F\tb2RevoluteJointDef\tenableLimit\t%zu\n", offsetof(b2RevoluteJointDef, enableLimit));
391
+ printf("F\tb2RevoluteJointDef\tlowerAngle\t%zu\n", offsetof(b2RevoluteJointDef, lowerAngle));
392
+ printf("F\tb2RevoluteJointDef\tupperAngle\t%zu\n", offsetof(b2RevoluteJointDef, upperAngle));
393
+ printf("F\tb2RevoluteJointDef\tenableMotor\t%zu\n", offsetof(b2RevoluteJointDef, enableMotor));
394
+ printf("F\tb2RevoluteJointDef\tmaxMotorTorque\t%zu\n", offsetof(b2RevoluteJointDef, maxMotorTorque));
395
+ printf("F\tb2RevoluteJointDef\tmotorSpeed\t%zu\n", offsetof(b2RevoluteJointDef, motorSpeed));
396
+ printf("F\tb2RevoluteJointDef\tdrawSize\t%zu\n", offsetof(b2RevoluteJointDef, drawSize));
397
+ printf("F\tb2RevoluteJointDef\tcollideConnected\t%zu\n", offsetof(b2RevoluteJointDef, collideConnected));
398
+ printf("F\tb2RevoluteJointDef\tuserData\t%zu\n", offsetof(b2RevoluteJointDef, userData));
399
+ printf("F\tb2RevoluteJointDef\tinternalValue\t%zu\n", offsetof(b2RevoluteJointDef, internalValue));
400
+ printf("S\tb2WeldJointDef\t%zu\t%zu\n", sizeof(b2WeldJointDef), _Alignof(b2WeldJointDef));
401
+ printf("F\tb2WeldJointDef\tbodyIdA\t%zu\n", offsetof(b2WeldJointDef, bodyIdA));
402
+ printf("F\tb2WeldJointDef\tbodyIdB\t%zu\n", offsetof(b2WeldJointDef, bodyIdB));
403
+ printf("F\tb2WeldJointDef\tlocalAnchorA\t%zu\n", offsetof(b2WeldJointDef, localAnchorA));
404
+ printf("F\tb2WeldJointDef\tlocalAnchorB\t%zu\n", offsetof(b2WeldJointDef, localAnchorB));
405
+ printf("F\tb2WeldJointDef\treferenceAngle\t%zu\n", offsetof(b2WeldJointDef, referenceAngle));
406
+ printf("F\tb2WeldJointDef\tlinearHertz\t%zu\n", offsetof(b2WeldJointDef, linearHertz));
407
+ printf("F\tb2WeldJointDef\tangularHertz\t%zu\n", offsetof(b2WeldJointDef, angularHertz));
408
+ printf("F\tb2WeldJointDef\tlinearDampingRatio\t%zu\n", offsetof(b2WeldJointDef, linearDampingRatio));
409
+ printf("F\tb2WeldJointDef\tangularDampingRatio\t%zu\n", offsetof(b2WeldJointDef, angularDampingRatio));
410
+ printf("F\tb2WeldJointDef\tcollideConnected\t%zu\n", offsetof(b2WeldJointDef, collideConnected));
411
+ printf("F\tb2WeldJointDef\tuserData\t%zu\n", offsetof(b2WeldJointDef, userData));
412
+ printf("F\tb2WeldJointDef\tinternalValue\t%zu\n", offsetof(b2WeldJointDef, internalValue));
413
+ printf("S\tb2WheelJointDef\t%zu\t%zu\n", sizeof(b2WheelJointDef), _Alignof(b2WheelJointDef));
414
+ printf("F\tb2WheelJointDef\tbodyIdA\t%zu\n", offsetof(b2WheelJointDef, bodyIdA));
415
+ printf("F\tb2WheelJointDef\tbodyIdB\t%zu\n", offsetof(b2WheelJointDef, bodyIdB));
416
+ printf("F\tb2WheelJointDef\tlocalAnchorA\t%zu\n", offsetof(b2WheelJointDef, localAnchorA));
417
+ printf("F\tb2WheelJointDef\tlocalAnchorB\t%zu\n", offsetof(b2WheelJointDef, localAnchorB));
418
+ printf("F\tb2WheelJointDef\tlocalAxisA\t%zu\n", offsetof(b2WheelJointDef, localAxisA));
419
+ printf("F\tb2WheelJointDef\tenableSpring\t%zu\n", offsetof(b2WheelJointDef, enableSpring));
420
+ printf("F\tb2WheelJointDef\thertz\t%zu\n", offsetof(b2WheelJointDef, hertz));
421
+ printf("F\tb2WheelJointDef\tdampingRatio\t%zu\n", offsetof(b2WheelJointDef, dampingRatio));
422
+ printf("F\tb2WheelJointDef\tenableLimit\t%zu\n", offsetof(b2WheelJointDef, enableLimit));
423
+ printf("F\tb2WheelJointDef\tlowerTranslation\t%zu\n", offsetof(b2WheelJointDef, lowerTranslation));
424
+ printf("F\tb2WheelJointDef\tupperTranslation\t%zu\n", offsetof(b2WheelJointDef, upperTranslation));
425
+ printf("F\tb2WheelJointDef\tenableMotor\t%zu\n", offsetof(b2WheelJointDef, enableMotor));
426
+ printf("F\tb2WheelJointDef\tmaxMotorTorque\t%zu\n", offsetof(b2WheelJointDef, maxMotorTorque));
427
+ printf("F\tb2WheelJointDef\tmotorSpeed\t%zu\n", offsetof(b2WheelJointDef, motorSpeed));
428
+ printf("F\tb2WheelJointDef\tcollideConnected\t%zu\n", offsetof(b2WheelJointDef, collideConnected));
429
+ printf("F\tb2WheelJointDef\tuserData\t%zu\n", offsetof(b2WheelJointDef, userData));
430
+ printf("F\tb2WheelJointDef\tinternalValue\t%zu\n", offsetof(b2WheelJointDef, internalValue));
431
+ printf("S\tb2ExplosionDef\t%zu\t%zu\n", sizeof(b2ExplosionDef), _Alignof(b2ExplosionDef));
432
+ printf("F\tb2ExplosionDef\tmaskBits\t%zu\n", offsetof(b2ExplosionDef, maskBits));
433
+ printf("F\tb2ExplosionDef\tposition\t%zu\n", offsetof(b2ExplosionDef, position));
434
+ printf("F\tb2ExplosionDef\tradius\t%zu\n", offsetof(b2ExplosionDef, radius));
435
+ printf("F\tb2ExplosionDef\tfalloff\t%zu\n", offsetof(b2ExplosionDef, falloff));
436
+ printf("F\tb2ExplosionDef\timpulsePerLength\t%zu\n", offsetof(b2ExplosionDef, impulsePerLength));
437
+ printf("S\tb2SensorBeginTouchEvent\t%zu\t%zu\n", sizeof(b2SensorBeginTouchEvent), _Alignof(b2SensorBeginTouchEvent));
438
+ printf("F\tb2SensorBeginTouchEvent\tsensorShapeId\t%zu\n", offsetof(b2SensorBeginTouchEvent, sensorShapeId));
439
+ printf("F\tb2SensorBeginTouchEvent\tvisitorShapeId\t%zu\n", offsetof(b2SensorBeginTouchEvent, visitorShapeId));
440
+ printf("S\tb2SensorEndTouchEvent\t%zu\t%zu\n", sizeof(b2SensorEndTouchEvent), _Alignof(b2SensorEndTouchEvent));
441
+ printf("F\tb2SensorEndTouchEvent\tsensorShapeId\t%zu\n", offsetof(b2SensorEndTouchEvent, sensorShapeId));
442
+ printf("F\tb2SensorEndTouchEvent\tvisitorShapeId\t%zu\n", offsetof(b2SensorEndTouchEvent, visitorShapeId));
443
+ printf("S\tb2SensorEvents\t%zu\t%zu\n", sizeof(b2SensorEvents), _Alignof(b2SensorEvents));
444
+ printf("F\tb2SensorEvents\tbeginEvents\t%zu\n", offsetof(b2SensorEvents, beginEvents));
445
+ printf("F\tb2SensorEvents\tendEvents\t%zu\n", offsetof(b2SensorEvents, endEvents));
446
+ printf("F\tb2SensorEvents\tbeginCount\t%zu\n", offsetof(b2SensorEvents, beginCount));
447
+ printf("F\tb2SensorEvents\tendCount\t%zu\n", offsetof(b2SensorEvents, endCount));
448
+ printf("S\tb2ContactBeginTouchEvent\t%zu\t%zu\n", sizeof(b2ContactBeginTouchEvent), _Alignof(b2ContactBeginTouchEvent));
449
+ printf("F\tb2ContactBeginTouchEvent\tshapeIdA\t%zu\n", offsetof(b2ContactBeginTouchEvent, shapeIdA));
450
+ printf("F\tb2ContactBeginTouchEvent\tshapeIdB\t%zu\n", offsetof(b2ContactBeginTouchEvent, shapeIdB));
451
+ printf("F\tb2ContactBeginTouchEvent\tmanifold\t%zu\n", offsetof(b2ContactBeginTouchEvent, manifold));
452
+ printf("S\tb2ContactEndTouchEvent\t%zu\t%zu\n", sizeof(b2ContactEndTouchEvent), _Alignof(b2ContactEndTouchEvent));
453
+ printf("F\tb2ContactEndTouchEvent\tshapeIdA\t%zu\n", offsetof(b2ContactEndTouchEvent, shapeIdA));
454
+ printf("F\tb2ContactEndTouchEvent\tshapeIdB\t%zu\n", offsetof(b2ContactEndTouchEvent, shapeIdB));
455
+ printf("S\tb2ContactHitEvent\t%zu\t%zu\n", sizeof(b2ContactHitEvent), _Alignof(b2ContactHitEvent));
456
+ printf("F\tb2ContactHitEvent\tshapeIdA\t%zu\n", offsetof(b2ContactHitEvent, shapeIdA));
457
+ printf("F\tb2ContactHitEvent\tshapeIdB\t%zu\n", offsetof(b2ContactHitEvent, shapeIdB));
458
+ printf("F\tb2ContactHitEvent\tpoint\t%zu\n", offsetof(b2ContactHitEvent, point));
459
+ printf("F\tb2ContactHitEvent\tnormal\t%zu\n", offsetof(b2ContactHitEvent, normal));
460
+ printf("F\tb2ContactHitEvent\tapproachSpeed\t%zu\n", offsetof(b2ContactHitEvent, approachSpeed));
461
+ printf("S\tb2ContactEvents\t%zu\t%zu\n", sizeof(b2ContactEvents), _Alignof(b2ContactEvents));
462
+ printf("F\tb2ContactEvents\tbeginEvents\t%zu\n", offsetof(b2ContactEvents, beginEvents));
463
+ printf("F\tb2ContactEvents\tendEvents\t%zu\n", offsetof(b2ContactEvents, endEvents));
464
+ printf("F\tb2ContactEvents\thitEvents\t%zu\n", offsetof(b2ContactEvents, hitEvents));
465
+ printf("F\tb2ContactEvents\tbeginCount\t%zu\n", offsetof(b2ContactEvents, beginCount));
466
+ printf("F\tb2ContactEvents\tendCount\t%zu\n", offsetof(b2ContactEvents, endCount));
467
+ printf("F\tb2ContactEvents\thitCount\t%zu\n", offsetof(b2ContactEvents, hitCount));
468
+ printf("S\tb2BodyMoveEvent\t%zu\t%zu\n", sizeof(b2BodyMoveEvent), _Alignof(b2BodyMoveEvent));
469
+ printf("F\tb2BodyMoveEvent\ttransform\t%zu\n", offsetof(b2BodyMoveEvent, transform));
470
+ printf("F\tb2BodyMoveEvent\tbodyId\t%zu\n", offsetof(b2BodyMoveEvent, bodyId));
471
+ printf("F\tb2BodyMoveEvent\tuserData\t%zu\n", offsetof(b2BodyMoveEvent, userData));
472
+ printf("F\tb2BodyMoveEvent\tfellAsleep\t%zu\n", offsetof(b2BodyMoveEvent, fellAsleep));
473
+ printf("S\tb2BodyEvents\t%zu\t%zu\n", sizeof(b2BodyEvents), _Alignof(b2BodyEvents));
474
+ printf("F\tb2BodyEvents\tmoveEvents\t%zu\n", offsetof(b2BodyEvents, moveEvents));
475
+ printf("F\tb2BodyEvents\tmoveCount\t%zu\n", offsetof(b2BodyEvents, moveCount));
476
+ printf("S\tb2ContactData\t%zu\t%zu\n", sizeof(b2ContactData), _Alignof(b2ContactData));
477
+ printf("F\tb2ContactData\tshapeIdA\t%zu\n", offsetof(b2ContactData, shapeIdA));
478
+ printf("F\tb2ContactData\tshapeIdB\t%zu\n", offsetof(b2ContactData, shapeIdB));
479
+ printf("F\tb2ContactData\tmanifold\t%zu\n", offsetof(b2ContactData, manifold));
480
+ printf("S\tb2DebugDraw\t%zu\t%zu\n", sizeof(b2DebugDraw), _Alignof(b2DebugDraw));
481
+ printf("F\tb2DebugDraw\tDrawPolygonFcn\t%zu\n", offsetof(b2DebugDraw, DrawPolygonFcn));
482
+ printf("F\tb2DebugDraw\tDrawSolidPolygonFcn\t%zu\n", offsetof(b2DebugDraw, DrawSolidPolygonFcn));
483
+ printf("F\tb2DebugDraw\tDrawCircleFcn\t%zu\n", offsetof(b2DebugDraw, DrawCircleFcn));
484
+ printf("F\tb2DebugDraw\tDrawSolidCircleFcn\t%zu\n", offsetof(b2DebugDraw, DrawSolidCircleFcn));
485
+ printf("F\tb2DebugDraw\tDrawSolidCapsuleFcn\t%zu\n", offsetof(b2DebugDraw, DrawSolidCapsuleFcn));
486
+ printf("F\tb2DebugDraw\tDrawSegmentFcn\t%zu\n", offsetof(b2DebugDraw, DrawSegmentFcn));
487
+ printf("F\tb2DebugDraw\tDrawTransformFcn\t%zu\n", offsetof(b2DebugDraw, DrawTransformFcn));
488
+ printf("F\tb2DebugDraw\tDrawPointFcn\t%zu\n", offsetof(b2DebugDraw, DrawPointFcn));
489
+ printf("F\tb2DebugDraw\tDrawStringFcn\t%zu\n", offsetof(b2DebugDraw, DrawStringFcn));
490
+ printf("F\tb2DebugDraw\tdrawingBounds\t%zu\n", offsetof(b2DebugDraw, drawingBounds));
491
+ printf("F\tb2DebugDraw\tuseDrawingBounds\t%zu\n", offsetof(b2DebugDraw, useDrawingBounds));
492
+ printf("F\tb2DebugDraw\tdrawShapes\t%zu\n", offsetof(b2DebugDraw, drawShapes));
493
+ printf("F\tb2DebugDraw\tdrawJoints\t%zu\n", offsetof(b2DebugDraw, drawJoints));
494
+ printf("F\tb2DebugDraw\tdrawJointExtras\t%zu\n", offsetof(b2DebugDraw, drawJointExtras));
495
+ printf("F\tb2DebugDraw\tdrawBounds\t%zu\n", offsetof(b2DebugDraw, drawBounds));
496
+ printf("F\tb2DebugDraw\tdrawMass\t%zu\n", offsetof(b2DebugDraw, drawMass));
497
+ printf("F\tb2DebugDraw\tdrawBodyNames\t%zu\n", offsetof(b2DebugDraw, drawBodyNames));
498
+ printf("F\tb2DebugDraw\tdrawContacts\t%zu\n", offsetof(b2DebugDraw, drawContacts));
499
+ printf("F\tb2DebugDraw\tdrawGraphColors\t%zu\n", offsetof(b2DebugDraw, drawGraphColors));
500
+ printf("F\tb2DebugDraw\tdrawContactNormals\t%zu\n", offsetof(b2DebugDraw, drawContactNormals));
501
+ printf("F\tb2DebugDraw\tdrawContactImpulses\t%zu\n", offsetof(b2DebugDraw, drawContactImpulses));
502
+ printf("F\tb2DebugDraw\tdrawContactFeatures\t%zu\n", offsetof(b2DebugDraw, drawContactFeatures));
503
+ printf("F\tb2DebugDraw\tdrawFrictionImpulses\t%zu\n", offsetof(b2DebugDraw, drawFrictionImpulses));
504
+ printf("F\tb2DebugDraw\tdrawIslands\t%zu\n", offsetof(b2DebugDraw, drawIslands));
505
+ printf("F\tb2DebugDraw\tcontext\t%zu\n", offsetof(b2DebugDraw, context));
506
+ return 0;
507
+ }
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../lib/box2d/native"
4
+
5
+ probe = ARGV.fetch(0)
6
+ records = Hash.new { |hash, key| hash[key] = {offsets: {}} }
7
+
8
+ IO.popen([probe], &:read).each_line do |line|
9
+ kind, c_name, name, value = line.chomp.split("\t")
10
+ record = records[c_name]
11
+
12
+ if kind == "S"
13
+ record[:size] = Integer(name)
14
+ record[:alignment] = Integer(value)
15
+ else
16
+ record[:offsets][name.to_sym] = Integer(value)
17
+ end
18
+ end
19
+
20
+ records.each do |c_name, expected|
21
+ klass = Box2D::Native.const_get(c_name.delete_prefix("b2"))
22
+ actual = {
23
+ size: klass.size,
24
+ alignment: klass.alignment,
25
+ offsets: expected[:offsets].to_h { |name, _offset| [name, klass.offset_of(name)] }
26
+ }
27
+ next if actual == expected
28
+
29
+ abort "ABI mismatch for #{c_name}: C=#{expected.inspect}, FFI=#{actual.inspect}"
30
+ end
31
+
32
+ puts "verified #{records.length} Box2D struct layouts"