boxdd-sys 0.4.0

Low-level FFI bindings for Box2D built from upstream via submodule
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
// AUTOGENERATED: pregenerated bindings for docs.rs/offline builds
// To refresh, run tools/update_submodule_and_bindings.py

/* automatically generated by rust-bindgen 0.72.1 */

pub const B2_HASH_INIT: u32 = 5381;
pub const B2_PI: f64 = 3.14159265359;
pub const B2_MAX_POLYGON_VERTICES: u32 = 8;
pub const B2_DEFAULT_CATEGORY_BITS: u32 = 1;
pub const B2_DEFAULT_MASK_BITS: i32 = -1;
#[doc = " Prototype for user allocation function\n @param size the allocation size in bytes\n @param alignment the required alignment, guaranteed to be a power of 2"]
pub type b2AllocFcn = ::std::option::Option<
    unsafe extern "C" fn(
        size: ::std::os::raw::c_uint,
        alignment: ::std::os::raw::c_int,
    ) -> *mut ::std::os::raw::c_void,
>;
#[doc = " Prototype for user free function\n @param mem the memory previously allocated through `b2AllocFcn`\n @param size the allocation size in bytes"]
pub type b2FreeFcn = ::std::option::Option<
    unsafe extern "C" fn(mem: *mut ::std::os::raw::c_void, size: ::std::os::raw::c_uint),
>;
#[doc = " Prototype for the user assert callback. Return 0 to skip the debugger break."]
pub type b2AssertFcn = ::std::option::Option<
    unsafe extern "C" fn(
        condition: *const ::std::os::raw::c_char,
        fileName: *const ::std::os::raw::c_char,
        lineNumber: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int,
>;
#[doc = " Prototype for user log callback. Used to log warnings."]
pub type b2LogFcn =
    ::std::option::Option<unsafe extern "C" fn(message: *const ::std::os::raw::c_char)>;
unsafe extern "C" {
    #[doc = " This allows the user to override the allocation functions. These should be\n set during application startup."]
    pub fn b2SetAllocator(allocFcn: b2AllocFcn, freeFcn: b2FreeFcn);
}
unsafe extern "C" {
    #[doc = " @return the total bytes allocated by Box2D"]
    pub fn b2GetByteCount() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Override the default assert function\n @param assertFcn a non-null assert callback"]
    pub fn b2SetAssertFcn(assertFcn: b2AssertFcn);
}
unsafe extern "C" {
    #[doc = " Override the default log function\n @param logFcn a non-null log callback"]
    pub fn b2SetLogFcn(logFcn: b2LogFcn);
}
#[doc = " Version numbering scheme.\n See https://semver.org/"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Version {
    #[doc = " Significant changes"]
    pub major: ::std::os::raw::c_int,
    #[doc = " Incremental changes"]
    pub minor: ::std::os::raw::c_int,
    #[doc = " Bug fixes"]
    pub revision: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Get the current version of Box2D"]
    pub fn b2GetVersion() -> b2Version;
}
unsafe extern "C" {
    pub fn b2InternalAssertFcn(
        condition: *const ::std::os::raw::c_char,
        fileName: *const ::std::os::raw::c_char,
        lineNumber: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the absolute number of system ticks. The value is platform specific."]
    pub fn b2GetTicks() -> u64;
}
unsafe extern "C" {
    #[doc = " Get the milliseconds passed from an initial tick value."]
    pub fn b2GetMilliseconds(ticks: u64) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the milliseconds passed from an initial tick value. Resets the passed in\n value to the current tick value."]
    pub fn b2GetMillisecondsAndReset(ticks: *mut u64) -> f32;
}
unsafe extern "C" {
    #[doc = " Yield to be used in a busy loop."]
    pub fn b2Yield();
}
unsafe extern "C" {
    pub fn b2Hash(hash: u32, data: *const u8, count: ::std::os::raw::c_int) -> u32;
}
#[doc = " 2D vector\n This can be used to represent a point or free vector"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Vec2 {
    #[doc = " coordinates"]
    pub x: f32,
    #[doc = " coordinates"]
    pub y: f32,
}
#[doc = " Cosine and sine pair\n This uses a custom implementation designed for cross-platform determinism"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2CosSin {
    #[doc = " cosine and sine"]
    pub cosine: f32,
    pub sine: f32,
}
#[doc = " 2D rotation\n This is similar to using a complex number for rotation"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Rot {
    #[doc = " cosine and sine"]
    pub c: f32,
    #[doc = " cosine and sine"]
    pub s: f32,
}
#[doc = " A 2D rigid transform"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Transform {
    pub p: b2Vec2,
    pub q: b2Rot,
}
#[doc = " A 2-by-2 Matrix"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Mat22 {
    #[doc = " columns"]
    pub cx: b2Vec2,
    #[doc = " columns"]
    pub cy: b2Vec2,
}
#[doc = " Axis-aligned bounding box"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2AABB {
    pub lowerBound: b2Vec2,
    pub upperBound: b2Vec2,
}
#[doc = " separation = dot(normal, point) - offset"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Plane {
    pub normal: b2Vec2,
    pub offset: f32,
}
unsafe extern "C" {
    #[doc = " Is this a valid number? Not NaN or infinity."]
    pub fn b2IsValidFloat(a: f32) -> bool;
}
unsafe extern "C" {
    #[doc = " Is this a valid vector? Not NaN or infinity."]
    pub fn b2IsValidVec2(v: b2Vec2) -> bool;
}
unsafe extern "C" {
    #[doc = " Is this a valid rotation? Not NaN or infinity. Is normalized."]
    pub fn b2IsValidRotation(q: b2Rot) -> bool;
}
unsafe extern "C" {
    #[doc = " Is this a valid transform? Not NaN or infinity. Rotation is normalized."]
    pub fn b2IsValidTransform(t: b2Transform) -> bool;
}
unsafe extern "C" {
    #[doc = " Is this a valid bounding box? Not Nan or infinity. Upper bound greater than or equal to lower bound."]
    pub fn b2IsValidAABB(aabb: b2AABB) -> bool;
}
unsafe extern "C" {
    #[doc = " Is this a valid plane? Normal is a unit vector. Not Nan or infinity."]
    pub fn b2IsValidPlane(a: b2Plane) -> bool;
}
unsafe extern "C" {
    #[doc = " Compute an approximate arctangent in the range [-pi, pi]\n This is hand coded for cross-platform determinism. The atan2f\n function in the standard library is not cross-platform deterministic.\n\tAccurate to around 0.0023 degrees"]
    pub fn b2Atan2(y: f32, x: f32) -> f32;
}
unsafe extern "C" {
    #[doc = " Compute the cosine and sine of an angle in radians. Implemented\n for cross-platform determinism."]
    pub fn b2ComputeCosSin(radians: f32) -> b2CosSin;
}
unsafe extern "C" {
    #[doc = " Compute the rotation between two unit vectors"]
    pub fn b2ComputeRotationBetweenUnitVectors(v1: b2Vec2, v2: b2Vec2) -> b2Rot;
}
unsafe extern "C" {
    #[doc = " Box2D bases all length units on meters, but you may need different units for your game.\n You can set this value to use different units. This should be done at application startup\n and only modified once. Default value is 1.\n For example, if your game uses pixels for units you can use pixels for all length values\n sent to Box2D. There should be no extra cost. However, Box2D has some internal tolerances\n and thresholds that have been tuned for meters. By calling this function, Box2D is able\n to adjust those tolerances and thresholds to improve accuracy.\n A good rule of thumb is to pass the height of your player character to this function. So\n if your player character is 32 pixels high, then pass 32 to this function. Then you may\n confidently use pixels for all the length values sent to Box2D. All length values returned\n from Box2D will also be pixels because Box2D does not do any scaling internally.\n However, you are now on the hook for coming up with good values for gravity, density, and\n forces.\n @warning This must be modified before any calls to Box2D"]
    pub fn b2SetLengthUnitsPerMeter(lengthUnits: f32);
}
unsafe extern "C" {
    #[doc = " Get the current length units per meter."]
    pub fn b2GetLengthUnitsPerMeter() -> f32;
}
#[doc = " Low level ray cast input data"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2RayCastInput {
    #[doc = " Start point of the ray cast"]
    pub origin: b2Vec2,
    #[doc = " Translation of the ray cast"]
    pub translation: b2Vec2,
    #[doc = " The maximum fraction of the translation to consider, typically 1"]
    pub maxFraction: f32,
}
#[doc = " A distance proxy is used by the GJK algorithm. It encapsulates any shape.\n You can provide between 1 and B2_MAX_POLYGON_VERTICES and a radius."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeProxy {
    #[doc = " The point cloud"]
    pub points: [b2Vec2; 8usize],
    #[doc = " The number of points. Must be greater than 0."]
    pub count: ::std::os::raw::c_int,
    #[doc = " The external radius of the point cloud. May be zero."]
    pub radius: f32,
}
#[doc = " Low level shape cast input in generic form. This allows casting an arbitrary point\n cloud wrap with a radius. For example, a circle is a single point with a non-zero radius.\n A capsule is two points with a non-zero radius. A box is four points with a zero radius."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeCastInput {
    #[doc = " A generic shape"]
    pub proxy: b2ShapeProxy,
    #[doc = " The translation of the shape cast"]
    pub translation: b2Vec2,
    #[doc = " The maximum fraction of the translation to consider, typically 1"]
    pub maxFraction: f32,
    #[doc = " Allow shape cast to encroach when initially touching. This only works if the radius is greater than zero."]
    pub canEncroach: bool,
}
#[doc = " Low level ray cast or shape-cast output data. Returns a zero fraction and normal in the case of initial overlap."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2CastOutput {
    #[doc = " The surface normal at the hit point"]
    pub normal: b2Vec2,
    #[doc = " The surface hit point"]
    pub point: b2Vec2,
    #[doc = " The fraction of the input translation at collision"]
    pub fraction: f32,
    #[doc = " The number of iterations used"]
    pub iterations: ::std::os::raw::c_int,
    #[doc = " Did the cast hit?"]
    pub hit: bool,
}
#[doc = " This holds the mass data computed for a shape."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2MassData {
    #[doc = " The mass of the shape, usually in kilograms."]
    pub mass: f32,
    #[doc = " The position of the shape's centroid relative to the shape's origin."]
    pub center: b2Vec2,
    #[doc = " The rotational inertia of the shape about the shape center."]
    pub rotationalInertia: f32,
}
#[doc = " A solid circle"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Circle {
    #[doc = " The local center"]
    pub center: b2Vec2,
    #[doc = " The radius"]
    pub radius: f32,
}
#[doc = " A solid capsule can be viewed as two semicircles connected\n by a rectangle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Capsule {
    #[doc = " Local center of the first semicircle"]
    pub center1: b2Vec2,
    #[doc = " Local center of the second semicircle"]
    pub center2: b2Vec2,
    #[doc = " The radius of the semicircles"]
    pub radius: f32,
}
#[doc = " A solid convex polygon. It is assumed that the interior of the polygon is to\n the left of each edge.\n Polygons have a maximum number of vertices equal to B2_MAX_POLYGON_VERTICES.\n In most cases you should not need many vertices for a convex polygon.\n @warning DO NOT fill this out manually, instead use a helper function like\n b2MakePolygon or b2MakeBox."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Polygon {
    #[doc = " The polygon vertices"]
    pub vertices: [b2Vec2; 8usize],
    #[doc = " The outward normal vectors of the polygon sides"]
    pub normals: [b2Vec2; 8usize],
    #[doc = " The centroid of the polygon"]
    pub centroid: b2Vec2,
    #[doc = " The external radius for rounded polygons"]
    pub radius: f32,
    #[doc = " The number of polygon vertices"]
    pub count: ::std::os::raw::c_int,
}
#[doc = " A line segment with two-sided collision."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Segment {
    #[doc = " The first point"]
    pub point1: b2Vec2,
    #[doc = " The second point"]
    pub point2: b2Vec2,
}
#[doc = " A line segment with one-sided collision. Only collides on the right side.\n Several of these are generated for a chain shape.\n ghost1 -> point1 -> point2 -> ghost2"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ChainSegment {
    #[doc = " The tail ghost vertex"]
    pub ghost1: b2Vec2,
    #[doc = " The line segment"]
    pub segment: b2Segment,
    #[doc = " The head ghost vertex"]
    pub ghost2: b2Vec2,
    #[doc = " The owning chain shape index (internal usage only)"]
    pub chainId: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Validate ray cast input data (NaN, etc)"]
    pub fn b2IsValidRay(input: *const b2RayCastInput) -> bool;
}
unsafe extern "C" {
    #[doc = " Make a convex polygon from a convex hull. This will assert if the hull is not valid.\n @warning Do not manually fill in the hull data, it must come directly from b2ComputeHull"]
    pub fn b2MakePolygon(hull: *const b2Hull, radius: f32) -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Make an offset convex polygon from a convex hull. This will assert if the hull is not valid.\n @warning Do not manually fill in the hull data, it must come directly from b2ComputeHull"]
    pub fn b2MakeOffsetPolygon(hull: *const b2Hull, position: b2Vec2, rotation: b2Rot)
    -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Make an offset convex polygon from a convex hull. This will assert if the hull is not valid.\n @warning Do not manually fill in the hull data, it must come directly from b2ComputeHull"]
    pub fn b2MakeOffsetRoundedPolygon(
        hull: *const b2Hull,
        position: b2Vec2,
        rotation: b2Rot,
        radius: f32,
    ) -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Make a square polygon, bypassing the need for a convex hull.\n @param halfWidth the half-width"]
    pub fn b2MakeSquare(halfWidth: f32) -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Make a box (rectangle) polygon, bypassing the need for a convex hull.\n @param halfWidth the half-width (x-axis)\n @param halfHeight the half-height (y-axis)"]
    pub fn b2MakeBox(halfWidth: f32, halfHeight: f32) -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Make a rounded box, bypassing the need for a convex hull.\n @param halfWidth the half-width (x-axis)\n @param halfHeight the half-height (y-axis)\n @param radius the radius of the rounded extension"]
    pub fn b2MakeRoundedBox(halfWidth: f32, halfHeight: f32, radius: f32) -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Make an offset box, bypassing the need for a convex hull.\n @param halfWidth the half-width (x-axis)\n @param halfHeight the half-height (y-axis)\n @param center the local center of the box\n @param rotation the local rotation of the box"]
    pub fn b2MakeOffsetBox(
        halfWidth: f32,
        halfHeight: f32,
        center: b2Vec2,
        rotation: b2Rot,
    ) -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Make an offset rounded box, bypassing the need for a convex hull.\n @param halfWidth the half-width (x-axis)\n @param halfHeight the half-height (y-axis)\n @param center the local center of the box\n @param rotation the local rotation of the box\n @param radius the radius of the rounded extension"]
    pub fn b2MakeOffsetRoundedBox(
        halfWidth: f32,
        halfHeight: f32,
        center: b2Vec2,
        rotation: b2Rot,
        radius: f32,
    ) -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Transform a polygon. This is useful for transferring a shape from one body to another."]
    pub fn b2TransformPolygon(transform: b2Transform, polygon: *const b2Polygon) -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Compute mass properties of a circle"]
    pub fn b2ComputeCircleMass(shape: *const b2Circle, density: f32) -> b2MassData;
}
unsafe extern "C" {
    #[doc = " Compute mass properties of a capsule"]
    pub fn b2ComputeCapsuleMass(shape: *const b2Capsule, density: f32) -> b2MassData;
}
unsafe extern "C" {
    #[doc = " Compute mass properties of a polygon"]
    pub fn b2ComputePolygonMass(shape: *const b2Polygon, density: f32) -> b2MassData;
}
unsafe extern "C" {
    #[doc = " Compute the bounding box of a transformed circle"]
    pub fn b2ComputeCircleAABB(shape: *const b2Circle, transform: b2Transform) -> b2AABB;
}
unsafe extern "C" {
    #[doc = " Compute the bounding box of a transformed capsule"]
    pub fn b2ComputeCapsuleAABB(shape: *const b2Capsule, transform: b2Transform) -> b2AABB;
}
unsafe extern "C" {
    #[doc = " Compute the bounding box of a transformed polygon"]
    pub fn b2ComputePolygonAABB(shape: *const b2Polygon, transform: b2Transform) -> b2AABB;
}
unsafe extern "C" {
    #[doc = " Compute the bounding box of a transformed line segment"]
    pub fn b2ComputeSegmentAABB(shape: *const b2Segment, transform: b2Transform) -> b2AABB;
}
unsafe extern "C" {
    #[doc = " Test a point for overlap with a circle in local space"]
    pub fn b2PointInCircle(shape: *const b2Circle, point: b2Vec2) -> bool;
}
unsafe extern "C" {
    #[doc = " Test a point for overlap with a capsule in local space"]
    pub fn b2PointInCapsule(shape: *const b2Capsule, point: b2Vec2) -> bool;
}
unsafe extern "C" {
    #[doc = " Test a point for overlap with a convex polygon in local space"]
    pub fn b2PointInPolygon(shape: *const b2Polygon, point: b2Vec2) -> bool;
}
unsafe extern "C" {
    #[doc = " Ray cast versus circle shape in local space."]
    pub fn b2RayCastCircle(shape: *const b2Circle, input: *const b2RayCastInput) -> b2CastOutput;
}
unsafe extern "C" {
    #[doc = " Ray cast versus capsule shape in local space."]
    pub fn b2RayCastCapsule(shape: *const b2Capsule, input: *const b2RayCastInput) -> b2CastOutput;
}
unsafe extern "C" {
    #[doc = " Ray cast versus segment shape in local space. Optionally treat the segment as one-sided with hits from\n the left side being treated as a miss."]
    pub fn b2RayCastSegment(
        shape: *const b2Segment,
        input: *const b2RayCastInput,
        oneSided: bool,
    ) -> b2CastOutput;
}
unsafe extern "C" {
    #[doc = " Ray cast versus polygon shape in local space."]
    pub fn b2RayCastPolygon(shape: *const b2Polygon, input: *const b2RayCastInput) -> b2CastOutput;
}
unsafe extern "C" {
    #[doc = " Shape cast versus a circle."]
    pub fn b2ShapeCastCircle(
        shape: *const b2Circle,
        input: *const b2ShapeCastInput,
    ) -> b2CastOutput;
}
unsafe extern "C" {
    #[doc = " Shape cast versus a capsule."]
    pub fn b2ShapeCastCapsule(
        shape: *const b2Capsule,
        input: *const b2ShapeCastInput,
    ) -> b2CastOutput;
}
unsafe extern "C" {
    #[doc = " Shape cast versus a line segment."]
    pub fn b2ShapeCastSegment(
        shape: *const b2Segment,
        input: *const b2ShapeCastInput,
    ) -> b2CastOutput;
}
unsafe extern "C" {
    #[doc = " Shape cast versus a convex polygon."]
    pub fn b2ShapeCastPolygon(
        shape: *const b2Polygon,
        input: *const b2ShapeCastInput,
    ) -> b2CastOutput;
}
#[doc = " A convex hull. Used to create convex polygons.\n @warning Do not modify these values directly, instead use b2ComputeHull()"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Hull {
    #[doc = " The final points of the hull"]
    pub points: [b2Vec2; 8usize],
    #[doc = " The number of points"]
    pub count: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Compute the convex hull of a set of points. Returns an empty hull if it fails.\n Some failure cases:\n - all points very close together\n - all points on a line\n - less than 3 points\n - more than B2_MAX_POLYGON_VERTICES points\n This welds close points and removes collinear points.\n @warning Do not modify a hull once it has been computed"]
    pub fn b2ComputeHull(points: *const b2Vec2, count: ::std::os::raw::c_int) -> b2Hull;
}
unsafe extern "C" {
    #[doc = " This determines if a hull is valid. Checks for:\n - convexity\n - collinear points\n This is expensive and should not be called at runtime."]
    pub fn b2ValidateHull(hull: *const b2Hull) -> bool;
}
#[doc = " Result of computing the distance between two line segments"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SegmentDistanceResult {
    #[doc = " The closest point on the first segment"]
    pub closest1: b2Vec2,
    #[doc = " The closest point on the second segment"]
    pub closest2: b2Vec2,
    #[doc = " The barycentric coordinate on the first segment"]
    pub fraction1: f32,
    #[doc = " The barycentric coordinate on the second segment"]
    pub fraction2: f32,
    #[doc = " The squared distance between the closest points"]
    pub distanceSquared: f32,
}
unsafe extern "C" {
    #[doc = " Compute the distance between two line segments, clamping at the end points if needed."]
    pub fn b2SegmentDistance(
        p1: b2Vec2,
        q1: b2Vec2,
        p2: b2Vec2,
        q2: b2Vec2,
    ) -> b2SegmentDistanceResult;
}
#[doc = " Used to warm start the GJK simplex. If you call this function multiple times with nearby\n transforms this might improve performance. Otherwise you can zero initialize this.\n The distance cache must be initialized to zero on the first call.\n Users should generally just zero initialize this structure for each call."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SimplexCache {
    #[doc = " The number of stored simplex points"]
    pub count: u16,
    #[doc = " The cached simplex indices on shape A"]
    pub indexA: [u8; 3usize],
    #[doc = " The cached simplex indices on shape B"]
    pub indexB: [u8; 3usize],
}
#[doc = " Input for b2ShapeDistance"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DistanceInput {
    #[doc = " The proxy for shape A"]
    pub proxyA: b2ShapeProxy,
    #[doc = " The proxy for shape B"]
    pub proxyB: b2ShapeProxy,
    #[doc = " The world transform for shape A"]
    pub transformA: b2Transform,
    #[doc = " The world transform for shape B"]
    pub transformB: b2Transform,
    #[doc = " Should the proxy radius be considered?"]
    pub useRadii: bool,
}
#[doc = " Output for b2ShapeDistance"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DistanceOutput {
    #[doc = "< Closest point on shapeA"]
    pub pointA: b2Vec2,
    #[doc = "< Closest point on shapeB"]
    pub pointB: b2Vec2,
    #[doc = "< Normal vector that points from A to B. Invalid if distance is zero."]
    pub normal: b2Vec2,
    #[doc = "< The final distance, zero if overlapped"]
    pub distance: f32,
    #[doc = "< Number of GJK iterations used"]
    pub iterations: ::std::os::raw::c_int,
    #[doc = "< The number of simplexes stored in the simplex array"]
    pub simplexCount: ::std::os::raw::c_int,
}
#[doc = " Simplex vertex for debugging the GJK algorithm"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SimplexVertex {
    #[doc = "< support point in proxyA"]
    pub wA: b2Vec2,
    #[doc = "< support point in proxyB"]
    pub wB: b2Vec2,
    #[doc = "< wB - wA"]
    pub w: b2Vec2,
    #[doc = "< barycentric coordinate for closest point"]
    pub a: f32,
    #[doc = "< wA index"]
    pub indexA: ::std::os::raw::c_int,
    #[doc = "< wB index"]
    pub indexB: ::std::os::raw::c_int,
}
#[doc = " Simplex from the GJK algorithm"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Simplex {
    #[doc = "< vertices"]
    pub v1: b2SimplexVertex,
    #[doc = "< vertices"]
    pub v2: b2SimplexVertex,
    #[doc = "< vertices"]
    pub v3: b2SimplexVertex,
    #[doc = "< number of valid vertices"]
    pub count: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Compute the closest points between two shapes represented as point clouds.\n b2SimplexCache cache is input/output. On the first call set b2SimplexCache.count to zero.\n The underlying GJK algorithm may be debugged by passing in debug simplexes and capacity. You may pass in NULL and 0 for these."]
    pub fn b2ShapeDistance(
        input: *const b2DistanceInput,
        cache: *mut b2SimplexCache,
        simplexes: *mut b2Simplex,
        simplexCapacity: ::std::os::raw::c_int,
    ) -> b2DistanceOutput;
}
#[doc = " Input parameters for b2ShapeCast"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeCastPairInput {
    #[doc = "< The proxy for shape A"]
    pub proxyA: b2ShapeProxy,
    #[doc = "< The proxy for shape B"]
    pub proxyB: b2ShapeProxy,
    #[doc = "< The world transform for shape A"]
    pub transformA: b2Transform,
    #[doc = "< The world transform for shape B"]
    pub transformB: b2Transform,
    #[doc = "< The translation of shape B"]
    pub translationB: b2Vec2,
    #[doc = "< The fraction of the translation to consider, typically 1"]
    pub maxFraction: f32,
    #[doc = "< Allows shapes with a radius to move slightly closer if already touching"]
    pub canEncroach: bool,
}
unsafe extern "C" {
    #[doc = " Perform a linear shape cast of shape B moving and shape A fixed. Determines the hit point, normal, and translation fraction.\n Initially touching shapes are treated as a miss."]
    pub fn b2ShapeCast(input: *const b2ShapeCastPairInput) -> b2CastOutput;
}
unsafe extern "C" {
    #[doc = " Make a proxy for use in overlap, shape cast, and related functions. This is a deep copy of the points."]
    pub fn b2MakeProxy(
        points: *const b2Vec2,
        count: ::std::os::raw::c_int,
        radius: f32,
    ) -> b2ShapeProxy;
}
unsafe extern "C" {
    #[doc = " Make a proxy with a transform. This is a deep copy of the points."]
    pub fn b2MakeOffsetProxy(
        points: *const b2Vec2,
        count: ::std::os::raw::c_int,
        radius: f32,
        position: b2Vec2,
        rotation: b2Rot,
    ) -> b2ShapeProxy;
}
#[doc = " This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin,\n which may not coincide with the center of mass. However, to support dynamics we must interpolate the center of mass\n position."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Sweep {
    #[doc = "< Local center of mass position"]
    pub localCenter: b2Vec2,
    #[doc = "< Starting center of mass world position"]
    pub c1: b2Vec2,
    #[doc = "< Ending center of mass world position"]
    pub c2: b2Vec2,
    #[doc = "< Starting world rotation"]
    pub q1: b2Rot,
    #[doc = "< Ending world rotation"]
    pub q2: b2Rot,
}
unsafe extern "C" {
    #[doc = " Evaluate the transform sweep at a specific time."]
    pub fn b2GetSweepTransform(sweep: *const b2Sweep, time: f32) -> b2Transform;
}
#[doc = " Time of impact input"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2TOIInput {
    #[doc = "< The proxy for shape A"]
    pub proxyA: b2ShapeProxy,
    #[doc = "< The proxy for shape B"]
    pub proxyB: b2ShapeProxy,
    #[doc = "< The movement of shape A"]
    pub sweepA: b2Sweep,
    #[doc = "< The movement of shape B"]
    pub sweepB: b2Sweep,
    #[doc = "< Defines the sweep interval [0, maxFraction]"]
    pub maxFraction: f32,
}
pub const b2TOIState_b2_toiStateUnknown: b2TOIState = 0;
pub const b2TOIState_b2_toiStateFailed: b2TOIState = 1;
pub const b2TOIState_b2_toiStateOverlapped: b2TOIState = 2;
pub const b2TOIState_b2_toiStateHit: b2TOIState = 3;
pub const b2TOIState_b2_toiStateSeparated: b2TOIState = 4;
#[doc = " Describes the TOI output"]
pub type b2TOIState = ::std::os::raw::c_uint;
#[doc = " Time of impact output"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2TOIOutput {
    #[doc = " The type of result"]
    pub state: b2TOIState,
    #[doc = " The hit point"]
    pub point: b2Vec2,
    #[doc = " The hit normal"]
    pub normal: b2Vec2,
    #[doc = " The sweep time of the collision"]
    pub fraction: f32,
}
unsafe extern "C" {
    #[doc = " Compute the upper bound on time before two shapes penetrate. Time is represented as\n a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate,\n non-tunneling collisions. If you change the time interval, you should call this function\n again."]
    pub fn b2TimeOfImpact(input: *const b2TOIInput) -> b2TOIOutput;
}
#[doc = " A manifold point is a contact point belonging to a contact manifold.\n It holds details related to the geometry and dynamics of the contact points.\n Box2D uses speculative collision so some contact points may be separated.\n You may use the totalNormalImpulse to determine if there was an interaction during\n the time step."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ManifoldPoint {
    #[doc = " Location of the contact point in world space. Subject to precision loss at large coordinates.\n @note Should only be used for debugging."]
    pub point: b2Vec2,
    #[doc = " Location of the contact point relative to shapeA's origin in world space\n @note When used internally to the Box2D solver, this is relative to the body center of mass."]
    pub anchorA: b2Vec2,
    #[doc = " Location of the contact point relative to shapeB's origin in world space\n @note When used internally to the Box2D solver, this is relative to the body center of mass."]
    pub anchorB: b2Vec2,
    #[doc = " The separation of the contact point, negative if penetrating"]
    pub separation: f32,
    #[doc = " The impulse along the manifold normal vector."]
    pub normalImpulse: f32,
    #[doc = " The friction impulse"]
    pub tangentImpulse: f32,
    #[doc = " The total normal impulse applied across sub-stepping and restitution. This is important\n to identify speculative contact points that had an interaction in the time step.\n This includes the warm starting impulse, the sub-step delta impulse, and the restitution\n impulse."]
    pub totalNormalImpulse: f32,
    #[doc = " Relative normal velocity pre-solve. Used for hit events. If the normal impulse is\n zero then there was no hit. Negative means shapes are approaching."]
    pub normalVelocity: f32,
    #[doc = " Uniquely identifies a contact point between two shapes"]
    pub id: u16,
    #[doc = " Did this contact point exist the previous step?"]
    pub persisted: bool,
}
#[doc = " A contact manifold describes the contact points between colliding shapes.\n @note Box2D uses speculative collision so some contact points may be separated."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Manifold {
    #[doc = " The unit normal vector in world space, points from shape A to bodyB"]
    pub normal: b2Vec2,
    #[doc = " Angular impulse applied for rolling resistance. N * m * s = kg * m^2 / s"]
    pub rollingImpulse: f32,
    #[doc = " The manifold points, up to two are possible in 2D"]
    pub points: [b2ManifoldPoint; 2usize],
    #[doc = " The number of contacts points, will be 0, 1, or 2"]
    pub pointCount: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between two circles"]
    pub fn b2CollideCircles(
        circleA: *const b2Circle,
        xfA: b2Transform,
        circleB: *const b2Circle,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between a capsule and circle"]
    pub fn b2CollideCapsuleAndCircle(
        capsuleA: *const b2Capsule,
        xfA: b2Transform,
        circleB: *const b2Circle,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between an segment and a circle"]
    pub fn b2CollideSegmentAndCircle(
        segmentA: *const b2Segment,
        xfA: b2Transform,
        circleB: *const b2Circle,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between a polygon and a circle"]
    pub fn b2CollidePolygonAndCircle(
        polygonA: *const b2Polygon,
        xfA: b2Transform,
        circleB: *const b2Circle,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between a capsule and circle"]
    pub fn b2CollideCapsules(
        capsuleA: *const b2Capsule,
        xfA: b2Transform,
        capsuleB: *const b2Capsule,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between an segment and a capsule"]
    pub fn b2CollideSegmentAndCapsule(
        segmentA: *const b2Segment,
        xfA: b2Transform,
        capsuleB: *const b2Capsule,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between a polygon and capsule"]
    pub fn b2CollidePolygonAndCapsule(
        polygonA: *const b2Polygon,
        xfA: b2Transform,
        capsuleB: *const b2Capsule,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between two polygons"]
    pub fn b2CollidePolygons(
        polygonA: *const b2Polygon,
        xfA: b2Transform,
        polygonB: *const b2Polygon,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between an segment and a polygon"]
    pub fn b2CollideSegmentAndPolygon(
        segmentA: *const b2Segment,
        xfA: b2Transform,
        polygonB: *const b2Polygon,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between a chain segment and a circle"]
    pub fn b2CollideChainSegmentAndCircle(
        segmentA: *const b2ChainSegment,
        xfA: b2Transform,
        circleB: *const b2Circle,
        xfB: b2Transform,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between a chain segment and a capsule"]
    pub fn b2CollideChainSegmentAndCapsule(
        segmentA: *const b2ChainSegment,
        xfA: b2Transform,
        capsuleB: *const b2Capsule,
        xfB: b2Transform,
        cache: *mut b2SimplexCache,
    ) -> b2Manifold;
}
unsafe extern "C" {
    #[doc = " Compute the contact manifold between a chain segment and a rounded polygon"]
    pub fn b2CollideChainSegmentAndPolygon(
        segmentA: *const b2ChainSegment,
        xfA: b2Transform,
        polygonB: *const b2Polygon,
        xfB: b2Transform,
        cache: *mut b2SimplexCache,
    ) -> b2Manifold;
}
#[doc = " The dynamic tree structure. This should be considered private data.\n It is placed here for performance reasons."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DynamicTree {
    #[doc = " The tree nodes"]
    pub nodes: *mut b2TreeNode,
    #[doc = " The root index"]
    pub root: ::std::os::raw::c_int,
    #[doc = " The number of nodes"]
    pub nodeCount: ::std::os::raw::c_int,
    #[doc = " The allocated node space"]
    pub nodeCapacity: ::std::os::raw::c_int,
    #[doc = " Node free list"]
    pub freeList: ::std::os::raw::c_int,
    #[doc = " Number of proxies created"]
    pub proxyCount: ::std::os::raw::c_int,
    #[doc = " Leaf indices for rebuild"]
    pub leafIndices: *mut ::std::os::raw::c_int,
    #[doc = " Leaf bounding boxes for rebuild"]
    pub leafBoxes: *mut b2AABB,
    #[doc = " Leaf bounding box centers for rebuild"]
    pub leafCenters: *mut b2Vec2,
    #[doc = " Bins for sorting during rebuild"]
    pub binIndices: *mut ::std::os::raw::c_int,
    #[doc = " Allocated space for rebuilding"]
    pub rebuildCapacity: ::std::os::raw::c_int,
}
#[doc = " These are performance results returned by dynamic tree queries."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2TreeStats {
    #[doc = " Number of internal nodes visited during the query"]
    pub nodeVisits: ::std::os::raw::c_int,
    #[doc = " Number of leaf nodes visited during the query"]
    pub leafVisits: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Constructing the tree initializes the node pool."]
    pub fn b2DynamicTree_Create() -> b2DynamicTree;
}
unsafe extern "C" {
    #[doc = " Destroy the tree, freeing the node pool."]
    pub fn b2DynamicTree_Destroy(tree: *mut b2DynamicTree);
}
unsafe extern "C" {
    #[doc = " Create a proxy. Provide an AABB and a userData value."]
    pub fn b2DynamicTree_CreateProxy(
        tree: *mut b2DynamicTree,
        aabb: b2AABB,
        categoryBits: u64,
        userData: u64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Destroy a proxy. This asserts if the id is invalid."]
    pub fn b2DynamicTree_DestroyProxy(tree: *mut b2DynamicTree, proxyId: ::std::os::raw::c_int);
}
unsafe extern "C" {
    #[doc = " Move a proxy to a new AABB by removing and reinserting into the tree."]
    pub fn b2DynamicTree_MoveProxy(
        tree: *mut b2DynamicTree,
        proxyId: ::std::os::raw::c_int,
        aabb: b2AABB,
    );
}
unsafe extern "C" {
    #[doc = " Enlarge a proxy and enlarge ancestors as necessary."]
    pub fn b2DynamicTree_EnlargeProxy(
        tree: *mut b2DynamicTree,
        proxyId: ::std::os::raw::c_int,
        aabb: b2AABB,
    );
}
unsafe extern "C" {
    #[doc = " Modify the category bits on a proxy. This is an expensive operation."]
    pub fn b2DynamicTree_SetCategoryBits(
        tree: *mut b2DynamicTree,
        proxyId: ::std::os::raw::c_int,
        categoryBits: u64,
    );
}
unsafe extern "C" {
    #[doc = " Get the category bits on a proxy."]
    pub fn b2DynamicTree_GetCategoryBits(
        tree: *mut b2DynamicTree,
        proxyId: ::std::os::raw::c_int,
    ) -> u64;
}
#[doc = " This function receives proxies found in the AABB query.\n @return true if the query should continue"]
pub type b2TreeQueryCallbackFcn = ::std::option::Option<
    unsafe extern "C" fn(
        proxyId: ::std::os::raw::c_int,
        userData: u64,
        context: *mut ::std::os::raw::c_void,
    ) -> bool,
>;
unsafe extern "C" {
    #[doc = " Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB.\n\t@return performance data"]
    pub fn b2DynamicTree_Query(
        tree: *const b2DynamicTree,
        aabb: b2AABB,
        maskBits: u64,
        callback: b2TreeQueryCallbackFcn,
        context: *mut ::std::os::raw::c_void,
    ) -> b2TreeStats;
}
unsafe extern "C" {
    #[doc = " Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB.\n No filtering is performed.\n\t@return performance data"]
    pub fn b2DynamicTree_QueryAll(
        tree: *const b2DynamicTree,
        aabb: b2AABB,
        callback: b2TreeQueryCallbackFcn,
        context: *mut ::std::os::raw::c_void,
    ) -> b2TreeStats;
}
#[doc = " This function receives clipped ray cast input for a proxy. The function\n returns the new ray fraction.\n - return a value of 0 to terminate the ray cast\n - return a value less than input->maxFraction to clip the ray\n - return a value of input->maxFraction to continue the ray cast without clipping"]
pub type b2TreeRayCastCallbackFcn = ::std::option::Option<
    unsafe extern "C" fn(
        input: *const b2RayCastInput,
        proxyId: ::std::os::raw::c_int,
        userData: u64,
        context: *mut ::std::os::raw::c_void,
    ) -> f32,
>;
unsafe extern "C" {
    #[doc = " Ray cast against the proxies in the tree. This relies on the callback\n to perform a exact ray cast in the case were the proxy contains a shape.\n The callback also performs the any collision filtering. This has performance\n roughly equal to k * log(n), where k is the number of collisions and n is the\n number of proxies in the tree.\n Bit-wise filtering using mask bits can greatly improve performance in some scenarios.\n\tHowever, this filtering may be approximate, so the user should still apply filtering to results.\n @param tree the dynamic tree to ray cast\n @param input the ray cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1)\n @param maskBits mask bit hint: `bool accept = (maskBits & node->categoryBits) != 0;`\n @param callback a callback class that is called for each proxy that is hit by the ray\n @param context user context that is passed to the callback\n\t@return performance data"]
    pub fn b2DynamicTree_RayCast(
        tree: *const b2DynamicTree,
        input: *const b2RayCastInput,
        maskBits: u64,
        callback: b2TreeRayCastCallbackFcn,
        context: *mut ::std::os::raw::c_void,
    ) -> b2TreeStats;
}
#[doc = " This function receives clipped ray cast input for a proxy. The function\n returns the new ray fraction.\n - return a value of 0 to terminate the ray cast\n - return a value less than input->maxFraction to clip the ray\n - return a value of input->maxFraction to continue the ray cast without clipping"]
pub type b2TreeShapeCastCallbackFcn = ::std::option::Option<
    unsafe extern "C" fn(
        input: *const b2ShapeCastInput,
        proxyId: ::std::os::raw::c_int,
        userData: u64,
        context: *mut ::std::os::raw::c_void,
    ) -> f32,
>;
unsafe extern "C" {
    #[doc = " Ray cast against the proxies in the tree. This relies on the callback\n to perform a exact ray cast in the case were the proxy contains a shape.\n The callback also performs the any collision filtering. This has performance\n roughly equal to k * log(n), where k is the number of collisions and n is the\n number of proxies in the tree.\n @param tree the dynamic tree to ray cast\n @param input the ray cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).\n @param maskBits filter bits: `bool accept = (maskBits & node->categoryBits) != 0;`\n @param callback a callback class that is called for each proxy that is hit by the shape\n @param context user context that is passed to the callback\n\t@return performance data"]
    pub fn b2DynamicTree_ShapeCast(
        tree: *const b2DynamicTree,
        input: *const b2ShapeCastInput,
        maskBits: u64,
        callback: b2TreeShapeCastCallbackFcn,
        context: *mut ::std::os::raw::c_void,
    ) -> b2TreeStats;
}
unsafe extern "C" {
    #[doc = " Get the height of the binary tree."]
    pub fn b2DynamicTree_GetHeight(tree: *const b2DynamicTree) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the ratio of the sum of the node areas to the root area."]
    pub fn b2DynamicTree_GetAreaRatio(tree: *const b2DynamicTree) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the bounding box that contains the entire tree"]
    pub fn b2DynamicTree_GetRootBounds(tree: *const b2DynamicTree) -> b2AABB;
}
unsafe extern "C" {
    #[doc = " Get the number of proxies created"]
    pub fn b2DynamicTree_GetProxyCount(tree: *const b2DynamicTree) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Rebuild the tree while retaining subtrees that haven't changed. Returns the number of boxes sorted."]
    pub fn b2DynamicTree_Rebuild(
        tree: *mut b2DynamicTree,
        fullBuild: bool,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the number of bytes used by this tree"]
    pub fn b2DynamicTree_GetByteCount(tree: *const b2DynamicTree) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get proxy user data"]
    pub fn b2DynamicTree_GetUserData(
        tree: *const b2DynamicTree,
        proxyId: ::std::os::raw::c_int,
    ) -> u64;
}
unsafe extern "C" {
    #[doc = " Get the AABB of a proxy"]
    pub fn b2DynamicTree_GetAABB(
        tree: *const b2DynamicTree,
        proxyId: ::std::os::raw::c_int,
    ) -> b2AABB;
}
unsafe extern "C" {
    #[doc = " Validate this tree. For testing."]
    pub fn b2DynamicTree_Validate(tree: *const b2DynamicTree);
}
unsafe extern "C" {
    #[doc = " Validate this tree has no enlarged AABBs. For testing."]
    pub fn b2DynamicTree_ValidateNoEnlarged(tree: *const b2DynamicTree);
}
#[doc = " These are the collision planes returned from b2World_CollideMover"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2PlaneResult {
    #[doc = " The collision plane between the mover and a convex shape"]
    pub plane: b2Plane,
    pub point: b2Vec2,
    #[doc = " Did the collision register a hit? If not this plane should be ignored."]
    pub hit: bool,
}
#[doc = " These are collision planes that can be fed to b2SolvePlanes. Normally\n this is assembled by the user from plane results in b2PlaneResult"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2CollisionPlane {
    #[doc = " The collision plane between the mover and some shape"]
    pub plane: b2Plane,
    #[doc = " Setting this to FLT_MAX makes the plane as rigid as possible. Lower values can\n make the plane collision soft. Usually in meters."]
    pub pushLimit: f32,
    #[doc = " The push on the mover determined by b2SolvePlanes. Usually in meters."]
    pub push: f32,
    #[doc = " Indicates if b2ClipVector should clip against this plane. Should be false for soft collision."]
    pub clipVelocity: bool,
}
#[doc = " Result returned by b2SolvePlanes"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2PlaneSolverResult {
    #[doc = " The translation of the mover"]
    pub translation: b2Vec2,
    #[doc = " The number of iterations used by the plane solver. For diagnostics."]
    pub iterationCount: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Solves the position of a mover that satisfies the given collision planes.\n @param targetDelta the desired movement from the position used to generate the collision planes\n @param planes the collision planes\n @param count the number of collision planes"]
    pub fn b2SolvePlanes(
        targetDelta: b2Vec2,
        planes: *mut b2CollisionPlane,
        count: ::std::os::raw::c_int,
    ) -> b2PlaneSolverResult;
}
unsafe extern "C" {
    #[doc = " Clips the velocity against the given collision planes. Planes with zero push or clipVelocity\n set to false are skipped."]
    pub fn b2ClipVector(
        vector: b2Vec2,
        planes: *const b2CollisionPlane,
        count: ::std::os::raw::c_int,
    ) -> b2Vec2;
}
#[doc = " World id references a world instance. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2WorldId {
    pub index1: u16,
    pub generation: u16,
}
#[doc = " Body id references a body instance. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2BodyId {
    pub index1: i32,
    pub world0: u16,
    pub generation: u16,
}
#[doc = " Shape id references a shape instance. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeId {
    pub index1: i32,
    pub world0: u16,
    pub generation: u16,
}
#[doc = " Chain id references a chain instances. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ChainId {
    pub index1: i32,
    pub world0: u16,
    pub generation: u16,
}
#[doc = " Joint id references a joint instance. This should be treated as an opaque handle."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2JointId {
    pub index1: i32,
    pub world0: u16,
    pub generation: u16,
}
#[doc = " Contact id references a contact instance. This should be treated as an opaque handled."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactId {
    pub index1: i32,
    pub world0: u16,
    pub padding: i16,
    pub generation: u32,
}
#[doc = " Task interface\n This is prototype for a Box2D task. Your task system is expected to invoke the Box2D task with these arguments.\n The task spans a range of the parallel-for: [startIndex, endIndex)\n The worker index must correctly identify each worker in the user thread pool, expected in [0, workerCount).\n A worker must only exist on only one thread at a time and is analogous to the thread index.\n The task context is the context pointer sent from Box2D when it is enqueued.\n The startIndex and endIndex are expected in the range [0, itemCount) where itemCount is the argument to b2EnqueueTaskCallback\n below. Box2D expects startIndex < endIndex and will execute a loop like this:\n\n @code{.c}\n for (int i = startIndex; i < endIndex; ++i)\n {\n \tDoWork();\n }\n @endcode\n @ingroup world"]
pub type b2TaskCallback = ::std::option::Option<
    unsafe extern "C" fn(
        startIndex: ::std::os::raw::c_int,
        endIndex: ::std::os::raw::c_int,
        workerIndex: u32,
        taskContext: *mut ::std::os::raw::c_void,
    ),
>;
#[doc = " These functions can be provided to Box2D to invoke a task system. These are designed to work well with enkiTS.\n Returns a pointer to the user's task object. May be nullptr. A nullptr indicates to Box2D that the work was executed\n serially within the callback and there is no need to call b2FinishTaskCallback.\n The itemCount is the number of Box2D work items that are to be partitioned among workers by the user's task system.\n This is essentially a parallel-for. The minRange parameter is a suggestion of the minimum number of items to assign\n per worker to reduce overhead. For example, suppose the task is small and that itemCount is 16. A minRange of 8 suggests\n that your task system should split the work items among just two workers, even if you have more available.\n In general the range [startIndex, endIndex) send to b2TaskCallback should obey:\n endIndex - startIndex >= minRange\n The exception of course is when itemCount < minRange.\n @ingroup world"]
pub type b2EnqueueTaskCallback = ::std::option::Option<
    unsafe extern "C" fn(
        task: b2TaskCallback,
        itemCount: ::std::os::raw::c_int,
        minRange: ::std::os::raw::c_int,
        taskContext: *mut ::std::os::raw::c_void,
        userContext: *mut ::std::os::raw::c_void,
    ) -> *mut ::std::os::raw::c_void,
>;
#[doc = " Finishes a user task object that wraps a Box2D task.\n @ingroup world"]
pub type b2FinishTaskCallback = ::std::option::Option<
    unsafe extern "C" fn(
        userTask: *mut ::std::os::raw::c_void,
        userContext: *mut ::std::os::raw::c_void,
    ),
>;
#[doc = " Optional friction mixing callback. This intentionally provides no context objects because this is called\n from a worker thread.\n @warning This function should not attempt to modify Box2D state or user application state.\n @ingroup world"]
pub type b2FrictionCallback = ::std::option::Option<
    unsafe extern "C" fn(
        frictionA: f32,
        userMaterialIdA: u64,
        frictionB: f32,
        userMaterialIdB: u64,
    ) -> f32,
>;
#[doc = " Optional restitution mixing callback. This intentionally provides no context objects because this is called\n from a worker thread.\n @warning This function should not attempt to modify Box2D state or user application state.\n @ingroup world"]
pub type b2RestitutionCallback = ::std::option::Option<
    unsafe extern "C" fn(
        restitutionA: f32,
        userMaterialIdA: u64,
        restitutionB: f32,
        userMaterialIdB: u64,
    ) -> f32,
>;
#[doc = " Result from b2World_RayCastClosest\n If there is initial overlap the fraction and normal will be zero while the point is an arbitrary point in the overlap region.\n @ingroup world"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2RayResult {
    pub shapeId: b2ShapeId,
    pub point: b2Vec2,
    pub normal: b2Vec2,
    pub fraction: f32,
    pub nodeVisits: ::std::os::raw::c_int,
    pub leafVisits: ::std::os::raw::c_int,
    pub hit: bool,
}
#[doc = " World definition used to create a simulation world.\n Must be initialized using b2DefaultWorldDef().\n @ingroup world"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2WorldDef {
    #[doc = " Gravity vector. Box2D has no up-vector defined."]
    pub gravity: b2Vec2,
    #[doc = " Restitution speed threshold, usually in m/s. Collisions above this\n speed have restitution applied (will bounce)."]
    pub restitutionThreshold: f32,
    #[doc = " Threshold speed for hit events. Usually meters per second."]
    pub hitEventThreshold: f32,
    #[doc = " Contact stiffness. Cycles per second. Increasing this increases the speed of overlap recovery, but can introduce jitter."]
    pub contactHertz: f32,
    #[doc = " Contact bounciness. Non-dimensional. You can speed up overlap recovery by decreasing this with\n the trade-off that overlap resolution becomes more energetic."]
    pub contactDampingRatio: f32,
    #[doc = " This parameter controls how fast overlap is resolved and usually has units of meters per second. This only\n puts a cap on the resolution speed. The resolution speed is increased by increasing the hertz and/or\n decreasing the damping ratio."]
    pub contactSpeed: f32,
    #[doc = " Maximum linear speed. Usually meters per second."]
    pub maximumLinearSpeed: f32,
    #[doc = " Optional mixing callback for friction. The default uses sqrt(frictionA * frictionB)."]
    pub frictionCallback: b2FrictionCallback,
    #[doc = " Optional mixing callback for restitution. The default uses max(restitutionA, restitutionB)."]
    pub restitutionCallback: b2RestitutionCallback,
    #[doc = " Can bodies go to sleep to improve performance"]
    pub enableSleep: bool,
    #[doc = " Enable continuous collision"]
    pub enableContinuous: bool,
    #[doc = " Contact softening when mass ratios are large. Experimental."]
    pub enableContactSoftening: bool,
    #[doc = " Number of workers to use with the provided task system. Box2D performs best when using only\n performance cores and accessing a single L2 cache. Efficiency cores and hyper-threading provide\n little benefit and may even harm performance.\n @note Box2D does not create threads. This is the number of threads your applications has created\n that you are allocating to b2World_Step.\n @warning Do not modify the default value unless you are also providing a task system and providing\n task callbacks (enqueueTask and finishTask)."]
    pub workerCount: ::std::os::raw::c_int,
    #[doc = " Function to spawn tasks"]
    pub enqueueTask: b2EnqueueTaskCallback,
    #[doc = " Function to finish a task"]
    pub finishTask: b2FinishTaskCallback,
    #[doc = " User context that is provided to enqueueTask and finishTask"]
    pub userTaskContext: *mut ::std::os::raw::c_void,
    #[doc = " User data"]
    pub userData: *mut ::std::os::raw::c_void,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your world definition\n @ingroup world"]
    pub fn b2DefaultWorldDef() -> b2WorldDef;
}
#[doc = " zero mass, zero velocity, may be manually moved"]
pub const b2BodyType_b2_staticBody: b2BodyType = 0;
#[doc = " zero mass, velocity set by user, moved by solver"]
pub const b2BodyType_b2_kinematicBody: b2BodyType = 1;
#[doc = " positive mass, velocity determined by forces, moved by solver"]
pub const b2BodyType_b2_dynamicBody: b2BodyType = 2;
#[doc = " number of body types"]
pub const b2BodyType_b2_bodyTypeCount: b2BodyType = 3;
#[doc = " The body simulation type.\n Each body is one of these three types. The type determines how the body behaves in the simulation.\n @ingroup body"]
pub type b2BodyType = ::std::os::raw::c_uint;
#[doc = " Motion locks to restrict the body movement"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2MotionLocks {
    #[doc = " Prevent translation along the x-axis"]
    pub linearX: bool,
    #[doc = " Prevent translation along the y-axis"]
    pub linearY: bool,
    #[doc = " Prevent rotation around the z-axis"]
    pub angularZ: bool,
}
#[doc = " A body definition holds all the data needed to construct a rigid body.\n You can safely re-use body definitions. Shapes are added to a body after construction.\n Body definitions are temporary objects used to bundle creation parameters.\n Must be initialized using b2DefaultBodyDef().\n @ingroup body"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2BodyDef {
    #[doc = " The body type: static, kinematic, or dynamic."]
    pub type_: b2BodyType,
    #[doc = " The initial world position of the body. Bodies should be created with the desired position.\n @note Creating bodies at the origin and then moving them nearly doubles the cost of body creation, especially\n if the body is moved after shapes have been added."]
    pub position: b2Vec2,
    #[doc = " The initial world rotation of the body. Use b2MakeRot() if you have an angle."]
    pub rotation: b2Rot,
    #[doc = " The initial linear velocity of the body's origin. Usually in meters per second."]
    pub linearVelocity: b2Vec2,
    #[doc = " The initial angular velocity of the body. Radians per second."]
    pub angularVelocity: f32,
    #[doc = " Linear damping is used to reduce the linear velocity. The damping parameter\n can be larger than 1 but the damping effect becomes sensitive to the\n time step when the damping parameter is large.\n Generally linear damping is undesirable because it makes objects move slowly\n as if they are floating."]
    pub linearDamping: f32,
    #[doc = " Angular damping is used to reduce the angular velocity. The damping parameter\n can be larger than 1.0f but the damping effect becomes sensitive to the\n time step when the damping parameter is large.\n Angular damping can be use slow down rotating bodies."]
    pub angularDamping: f32,
    #[doc = " Scale the gravity applied to this body. Non-dimensional."]
    pub gravityScale: f32,
    #[doc = " Sleep speed threshold, default is 0.05 meters per second"]
    pub sleepThreshold: f32,
    #[doc = " Optional body name for debugging. Up to 31 characters (excluding null termination)"]
    pub name: *const ::std::os::raw::c_char,
    #[doc = " Use this to store application specific body data."]
    pub userData: *mut ::std::os::raw::c_void,
    #[doc = " Motions locks to restrict linear and angular movement.\n Caution: may lead to softer constraints along the locked direction"]
    pub motionLocks: b2MotionLocks,
    #[doc = " Set this flag to false if this body should never fall asleep."]
    pub enableSleep: bool,
    #[doc = " Is this body initially awake or sleeping?"]
    pub isAwake: bool,
    #[doc = " Treat this body as a high speed object that performs continuous collision detection\n against dynamic and kinematic bodies, but not other bullet bodies.\n @warning Bullets should be used sparingly. They are not a solution for general dynamic-versus-dynamic\n continuous collision. They do not guarantee accurate collision if both bodies are fast moving because\n the bullet does a continuous check after all non-bullet bodies have moved. You could get unlucky and have\n the bullet body end a time step very close to a non-bullet body and the non-bullet body then moves over\n the bullet body. In continuous collision, initial overlap is ignored to avoid freezing bodies in place.\n I do not recommend using them for game projectiles if precise collision timing is needed. Instead consider\n using a ray or shape cast. You can use a marching ray or shape cast for projectile that moves over time.\n If you want a fast moving projectile to collide with a fast moving target, you need to consider the relative\n movement in your ray or shape cast. This is out of the scope of Box2D.\n So what are good use cases for bullets? Pinball games or games with dynamic containers that hold other objects.\n It should be a use case where it doesn't break the game if there is a collision missed, but the having them\n captured improves the quality of the game."]
    pub isBullet: bool,
    #[doc = " Used to disable a body. A disabled body does not move or collide."]
    pub isEnabled: bool,
    #[doc = " This allows this body to bypass rotational speed limits. Should only be used\n for circular objects, like wheels."]
    pub allowFastRotation: bool,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your body definition\n @ingroup body"]
    pub fn b2DefaultBodyDef() -> b2BodyDef;
}
#[doc = " This is used to filter collision on shapes. It affects shape-vs-shape collision\n and shape-versus-query collision (such as b2World_CastRay).\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Filter {
    #[doc = " The collision category bits. Normally you would just set one bit. The category bits should\n represent your application object types. For example:\n @code{.cpp}\n enum MyCategories\n {\n    Static  = 0x00000001,\n    Dynamic = 0x00000002,\n    Debris  = 0x00000004,\n    Player  = 0x00000008,\n    // etc\n };\n @endcode"]
    pub categoryBits: u64,
    #[doc = " The collision mask bits. This states the categories that this\n shape would accept for collision.\n For example, you may want your player to only collide with static objects\n and other players.\n @code{.c}\n maskBits = Static | Player;\n @endcode"]
    pub maskBits: u64,
    #[doc = " Collision groups allow a certain group of objects to never collide (negative)\n or always collide (positive). A group index of zero has no effect. Non-zero group filtering\n always wins against the mask bits.\n For example, you may want ragdolls to collide with other ragdolls but you don't want\n ragdoll self-collision. In this case you would give each ragdoll a unique negative group index\n and apply that group index to all shapes on the ragdoll."]
    pub groupIndex: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your filter\n @ingroup shape"]
    pub fn b2DefaultFilter() -> b2Filter;
}
#[doc = " The query filter is used to filter collisions between queries and shapes. For example,\n you may want a ray-cast representing a projectile to hit players and the static environment\n but not debris.\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2QueryFilter {
    #[doc = " The collision category bits of this query. Normally you would just set one bit."]
    pub categoryBits: u64,
    #[doc = " The collision mask bits. This states the shape categories that this\n query would accept for collision."]
    pub maskBits: u64,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your query filter\n @ingroup shape"]
    pub fn b2DefaultQueryFilter() -> b2QueryFilter;
}
#[doc = " A circle with an offset"]
pub const b2ShapeType_b2_circleShape: b2ShapeType = 0;
#[doc = " A capsule is an extruded circle"]
pub const b2ShapeType_b2_capsuleShape: b2ShapeType = 1;
#[doc = " A line segment"]
pub const b2ShapeType_b2_segmentShape: b2ShapeType = 2;
#[doc = " A convex polygon"]
pub const b2ShapeType_b2_polygonShape: b2ShapeType = 3;
#[doc = " A line segment owned by a chain shape"]
pub const b2ShapeType_b2_chainSegmentShape: b2ShapeType = 4;
#[doc = " The number of shape types"]
pub const b2ShapeType_b2_shapeTypeCount: b2ShapeType = 5;
#[doc = " Shape type\n @ingroup shape"]
pub type b2ShapeType = ::std::os::raw::c_uint;
#[doc = " Surface materials allow chain shapes to have per segment surface properties.\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SurfaceMaterial {
    #[doc = " The Coulomb (dry) friction coefficient, usually in the range [0,1]."]
    pub friction: f32,
    #[doc = " The coefficient of restitution (bounce) usually in the range [0,1].\n https://en.wikipedia.org/wiki/Coefficient_of_restitution"]
    pub restitution: f32,
    #[doc = " The rolling resistance usually in the range [0,1]."]
    pub rollingResistance: f32,
    #[doc = " The tangent speed for conveyor belts"]
    pub tangentSpeed: f32,
    #[doc = " User material identifier. This is passed with query results and to friction and restitution\n combining functions. It is not used internally."]
    pub userMaterialId: u64,
    #[doc = " Custom debug draw color."]
    pub customColor: u32,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your surface material\n @ingroup shape"]
    pub fn b2DefaultSurfaceMaterial() -> b2SurfaceMaterial;
}
#[doc = " Used to create a shape.\n This is a temporary object used to bundle shape creation parameters. You may use\n the same shape definition to create multiple shapes.\n Must be initialized using b2DefaultShapeDef().\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ShapeDef {
    #[doc = " Use this to store application specific shape data."]
    pub userData: *mut ::std::os::raw::c_void,
    #[doc = " The surface material for this shape."]
    pub material: b2SurfaceMaterial,
    #[doc = " The density, usually in kg/m^2.\n This is not part of the surface material because this is for the interior, which may have\n other considerations, such as being hollow. For example a wood barrel may be hollow or full of water."]
    pub density: f32,
    #[doc = " Collision filtering data."]
    pub filter: b2Filter,
    #[doc = " Enable custom filtering. Only one of the two shapes needs to enable custom filtering. See b2WorldDef."]
    pub enableCustomFiltering: bool,
    #[doc = " A sensor shape generates overlap events but never generates a collision response.\n Sensors do not have continuous collision. Instead, use a ray or shape cast for those scenarios.\n Sensors still contribute to the body mass if they have non-zero density.\n @note Sensor events are disabled by default.\n @see enableSensorEvents"]
    pub isSensor: bool,
    #[doc = " Enable sensor events for this shape. This applies to sensors and non-sensors. False by default, even for sensors."]
    pub enableSensorEvents: bool,
    #[doc = " Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default."]
    pub enableContactEvents: bool,
    #[doc = " Enable hit events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors. False by default."]
    pub enableHitEvents: bool,
    #[doc = " Enable pre-solve contact events for this shape. Only applies to dynamic bodies. These are expensive\n and must be carefully handled due to multithreading. Ignored for sensors."]
    pub enablePreSolveEvents: bool,
    #[doc = " When shapes are created they will scan the environment for collision the next time step. This can significantly slow down\n static body creation when there are many static shapes.\n This is flag is ignored for dynamic and kinematic shapes which always invoke contact creation."]
    pub invokeContactCreation: bool,
    #[doc = " Should the body update the mass properties when this shape is created. Default is true.\n Warning: if this is true, you MUST call b2Body_ApplyMassFromShapes before simulating the world."]
    pub updateBodyMass: bool,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your shape definition\n @ingroup shape"]
    pub fn b2DefaultShapeDef() -> b2ShapeDef;
}
#[doc = " Used to create a chain of line segments. This is designed to eliminate ghost collisions with some limitations.\n - chains are one-sided\n - chains have no mass and should be used on static bodies\n - chains have a counter-clockwise winding order (normal points right of segment direction)\n - chains are either a loop or open\n - a chain must have at least 4 points\n - the distance between any two points must be greater than B2_LINEAR_SLOP\n - a chain shape should not self intersect (this is not validated)\n - an open chain shape has NO COLLISION on the first and final edge\n - you may overlap two open chains on their first three and/or last three points to get smooth collision\n - a chain shape creates multiple line segment shapes on the body\n https://en.wikipedia.org/wiki/Polygonal_chain\n Must be initialized using b2DefaultChainDef().\n @warning Do not use chain shapes unless you understand the limitations. This is an advanced feature.\n @ingroup shape"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ChainDef {
    #[doc = " Use this to store application specific shape data."]
    pub userData: *mut ::std::os::raw::c_void,
    #[doc = " An array of at least 4 points. These are cloned and may be temporary."]
    pub points: *const b2Vec2,
    #[doc = " The point count, must be 4 or more."]
    pub count: ::std::os::raw::c_int,
    #[doc = " Surface materials for each segment. These are cloned."]
    pub materials: *const b2SurfaceMaterial,
    #[doc = " The material count. Must be 1 or count. This allows you to provide one\n material for all segments or a unique material per segment. For open\n chains, the material on the ghost segments are place holders."]
    pub materialCount: ::std::os::raw::c_int,
    #[doc = " Contact filtering data."]
    pub filter: b2Filter,
    #[doc = " Indicates a closed chain formed by connecting the first and last points"]
    pub isLoop: bool,
    #[doc = " Enable sensors to detect this chain. False by default."]
    pub enableSensorEvents: bool,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your chain definition\n @ingroup shape"]
    pub fn b2DefaultChainDef() -> b2ChainDef;
}
#[doc = "! @cond\n Profiling data. Times are in milliseconds."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Profile {
    pub step: f32,
    pub pairs: f32,
    pub collide: f32,
    pub solve: f32,
    pub prepareStages: f32,
    pub solveConstraints: f32,
    pub prepareConstraints: f32,
    pub integrateVelocities: f32,
    pub warmStart: f32,
    pub solveImpulses: f32,
    pub integratePositions: f32,
    pub relaxImpulses: f32,
    pub applyRestitution: f32,
    pub storeImpulses: f32,
    pub splitIslands: f32,
    pub transforms: f32,
    pub sensorHits: f32,
    pub jointEvents: f32,
    pub hitEvents: f32,
    pub refit: f32,
    pub bullets: f32,
    pub sleepIslands: f32,
    pub sensors: f32,
}
#[doc = " Counters that give details of the simulation size."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2Counters {
    pub bodyCount: ::std::os::raw::c_int,
    pub shapeCount: ::std::os::raw::c_int,
    pub contactCount: ::std::os::raw::c_int,
    pub jointCount: ::std::os::raw::c_int,
    pub islandCount: ::std::os::raw::c_int,
    pub stackUsed: ::std::os::raw::c_int,
    pub staticTreeHeight: ::std::os::raw::c_int,
    pub treeHeight: ::std::os::raw::c_int,
    pub byteCount: ::std::os::raw::c_int,
    pub taskCount: ::std::os::raw::c_int,
    pub colorCounts: [::std::os::raw::c_int; 24usize],
}
pub const b2JointType_b2_distanceJoint: b2JointType = 0;
pub const b2JointType_b2_filterJoint: b2JointType = 1;
pub const b2JointType_b2_motorJoint: b2JointType = 2;
pub const b2JointType_b2_prismaticJoint: b2JointType = 3;
pub const b2JointType_b2_revoluteJoint: b2JointType = 4;
pub const b2JointType_b2_weldJoint: b2JointType = 5;
pub const b2JointType_b2_wheelJoint: b2JointType = 6;
#[doc = " Joint type enumeration\n\n This is useful because all joint types use b2JointId and sometimes you\n want to get the type of a joint.\n @ingroup joint"]
pub type b2JointType = ::std::os::raw::c_uint;
#[doc = " Base joint definition used by all joint types.\n The local frames are measured from the body's origin rather than the center of mass because:\n 1. you might not know where the center of mass will be\n 2. if you add/remove shapes from a body and recompute the mass, the joints will be broken"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2JointDef {
    #[doc = " User data pointer"]
    pub userData: *mut ::std::os::raw::c_void,
    #[doc = " The first attached body"]
    pub bodyIdA: b2BodyId,
    #[doc = " The second attached body"]
    pub bodyIdB: b2BodyId,
    #[doc = " The first local joint frame"]
    pub localFrameA: b2Transform,
    #[doc = " The second local joint frame"]
    pub localFrameB: b2Transform,
    #[doc = " Force threshold for joint events"]
    pub forceThreshold: f32,
    #[doc = " Torque threshold for joint events"]
    pub torqueThreshold: f32,
    #[doc = " Constraint hertz (advanced feature)"]
    pub constraintHertz: f32,
    #[doc = " Constraint damping ratio (advanced feature)"]
    pub constraintDampingRatio: f32,
    #[doc = " Debug draw scale"]
    pub drawScale: f32,
    #[doc = " Set this flag to true if the attached bodies should collide"]
    pub collideConnected: bool,
}
#[doc = " Distance joint definition\n Connects a point on body A with a point on body B by a segment.\n Useful for ropes and springs.\n @ingroup distance_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DistanceJointDef {
    #[doc = " Base joint definition"]
    pub base: b2JointDef,
    #[doc = " The rest length of this joint. Clamped to a stable minimum value."]
    pub length: f32,
    #[doc = " Enable the distance constraint to behave like a spring. If false\n then the distance joint will be rigid, overriding the limit and motor."]
    pub enableSpring: bool,
    #[doc = " The lower spring force controls how much tension it can sustain"]
    pub lowerSpringForce: f32,
    #[doc = " The upper spring force controls how much compression it an sustain"]
    pub upperSpringForce: f32,
    #[doc = " The spring linear stiffness Hertz, cycles per second"]
    pub hertz: f32,
    #[doc = " The spring linear damping ratio, non-dimensional"]
    pub dampingRatio: f32,
    #[doc = " Enable/disable the joint limit"]
    pub enableLimit: bool,
    #[doc = " Minimum length for limit. Clamped to a stable minimum value."]
    pub minLength: f32,
    #[doc = " Maximum length for limit. Must be greater than or equal to the minimum length."]
    pub maxLength: f32,
    #[doc = " Enable/disable the joint motor"]
    pub enableMotor: bool,
    #[doc = " The maximum motor force, usually in newtons"]
    pub maxMotorForce: f32,
    #[doc = " The desired motor speed, usually in meters per second"]
    pub motorSpeed: f32,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your joint definition\n @ingroup distance_joint"]
    pub fn b2DefaultDistanceJointDef() -> b2DistanceJointDef;
}
#[doc = " A motor joint is used to control the relative velocity and or transform between two bodies.\n With a velocity of zero this acts like top-down friction.\n @ingroup motor_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2MotorJointDef {
    #[doc = " Base joint definition"]
    pub base: b2JointDef,
    #[doc = " The desired linear velocity"]
    pub linearVelocity: b2Vec2,
    #[doc = " The maximum motor force in newtons"]
    pub maxVelocityForce: f32,
    #[doc = " The desired angular velocity"]
    pub angularVelocity: f32,
    #[doc = " The maximum motor torque in newton-meters"]
    pub maxVelocityTorque: f32,
    #[doc = " Linear spring hertz for position control"]
    pub linearHertz: f32,
    #[doc = " Linear spring damping ratio"]
    pub linearDampingRatio: f32,
    #[doc = " Maximum spring force in newtons"]
    pub maxSpringForce: f32,
    #[doc = " Angular spring hertz for position control"]
    pub angularHertz: f32,
    #[doc = " Angular spring damping ratio"]
    pub angularDampingRatio: f32,
    #[doc = " Maximum spring torque in newton-meters"]
    pub maxSpringTorque: f32,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your joint definition\n @ingroup motor_joint"]
    pub fn b2DefaultMotorJointDef() -> b2MotorJointDef;
}
#[doc = " A filter joint is used to disable collision between two specific bodies.\n\n @ingroup filter_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2FilterJointDef {
    #[doc = " Base joint definition"]
    pub base: b2JointDef,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your joint definition\n @ingroup filter_joint"]
    pub fn b2DefaultFilterJointDef() -> b2FilterJointDef;
}
#[doc = " Prismatic joint definition\n Body B may slide along the x-axis in local frame A. Body B cannot rotate relative to body A.\n The joint translation is zero when the local frame origins coincide in world space.\n @ingroup prismatic_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2PrismaticJointDef {
    #[doc = " Base joint definition"]
    pub base: b2JointDef,
    #[doc = " Enable a linear spring along the prismatic joint axis"]
    pub enableSpring: bool,
    #[doc = " The spring stiffness Hertz, cycles per second"]
    pub hertz: f32,
    #[doc = " The spring damping ratio, non-dimensional"]
    pub dampingRatio: f32,
    #[doc = " The target translation for the joint in meters. The spring-damper will drive\n to this translation."]
    pub targetTranslation: f32,
    #[doc = " Enable/disable the joint limit"]
    pub enableLimit: bool,
    #[doc = " The lower translation limit"]
    pub lowerTranslation: f32,
    #[doc = " The upper translation limit"]
    pub upperTranslation: f32,
    #[doc = " Enable/disable the joint motor"]
    pub enableMotor: bool,
    #[doc = " The maximum motor force, typically in newtons"]
    pub maxMotorForce: f32,
    #[doc = " The desired motor speed, typically in meters per second"]
    pub motorSpeed: f32,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your joint definition\n @ingroup prismatic_joint"]
    pub fn b2DefaultPrismaticJointDef() -> b2PrismaticJointDef;
}
#[doc = " Revolute joint definition\n A point on body B is fixed to a point on body A. Allows relative rotation.\n @ingroup revolute_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2RevoluteJointDef {
    #[doc = " Base joint definition"]
    pub base: b2JointDef,
    #[doc = " The target angle for the joint in radians. The spring-damper will drive\n to this angle."]
    pub targetAngle: f32,
    #[doc = " Enable a rotational spring on the revolute hinge axis"]
    pub enableSpring: bool,
    #[doc = " The spring stiffness Hertz, cycles per second"]
    pub hertz: f32,
    #[doc = " The spring damping ratio, non-dimensional"]
    pub dampingRatio: f32,
    #[doc = " A flag to enable joint limits"]
    pub enableLimit: bool,
    #[doc = " The lower angle for the joint limit in radians. Minimum of -0.99*pi radians."]
    pub lowerAngle: f32,
    #[doc = " The upper angle for the joint limit in radians. Maximum of 0.99*pi radians."]
    pub upperAngle: f32,
    #[doc = " A flag to enable the joint motor"]
    pub enableMotor: bool,
    #[doc = " The maximum motor torque, typically in newton-meters"]
    pub maxMotorTorque: f32,
    #[doc = " The desired motor speed in radians per second"]
    pub motorSpeed: f32,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your joint definition.\n @ingroup revolute_joint"]
    pub fn b2DefaultRevoluteJointDef() -> b2RevoluteJointDef;
}
#[doc = " Weld joint definition\n Connects two bodies together rigidly. This constraint provides springs to mimic\n soft-body simulation.\n @note The approximate solver in Box2D cannot hold many bodies together rigidly\n @ingroup weld_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2WeldJointDef {
    #[doc = " Base joint definition"]
    pub base: b2JointDef,
    #[doc = " Linear stiffness expressed as Hertz (cycles per second). Use zero for maximum stiffness."]
    pub linearHertz: f32,
    #[doc = " Angular stiffness as Hertz (cycles per second). Use zero for maximum stiffness."]
    pub angularHertz: f32,
    #[doc = " Linear damping ratio, non-dimensional. Use 1 for critical damping."]
    pub linearDampingRatio: f32,
    #[doc = " Linear damping ratio, non-dimensional. Use 1 for critical damping."]
    pub angularDampingRatio: f32,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your joint definition\n @ingroup weld_joint"]
    pub fn b2DefaultWeldJointDef() -> b2WeldJointDef;
}
#[doc = " Wheel joint definition\n Body B is a wheel that may rotate freely and slide along the local x-axis in frame A.\n The joint translation is zero when the local frame origins coincide in world space.\n @ingroup wheel_joint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2WheelJointDef {
    #[doc = " Base joint definition"]
    pub base: b2JointDef,
    #[doc = " Enable a linear spring along the local axis"]
    pub enableSpring: bool,
    #[doc = " Spring stiffness in Hertz"]
    pub hertz: f32,
    #[doc = " Spring damping ratio, non-dimensional"]
    pub dampingRatio: f32,
    #[doc = " Enable/disable the joint linear limit"]
    pub enableLimit: bool,
    #[doc = " The lower translation limit"]
    pub lowerTranslation: f32,
    #[doc = " The upper translation limit"]
    pub upperTranslation: f32,
    #[doc = " Enable/disable the joint rotational motor"]
    pub enableMotor: bool,
    #[doc = " The maximum motor torque, typically in newton-meters"]
    pub maxMotorTorque: f32,
    #[doc = " The desired motor speed in radians per second"]
    pub motorSpeed: f32,
    #[doc = " Used internally to detect a valid definition. DO NOT SET."]
    pub internalValue: ::std::os::raw::c_int,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your joint definition\n @ingroup wheel_joint"]
    pub fn b2DefaultWheelJointDef() -> b2WheelJointDef;
}
#[doc = " The explosion definition is used to configure options for explosions. Explosions\n consider shape geometry when computing the impulse.\n @ingroup world"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ExplosionDef {
    #[doc = " Mask bits to filter shapes"]
    pub maskBits: u64,
    #[doc = " The center of the explosion in world space"]
    pub position: b2Vec2,
    #[doc = " The radius of the explosion"]
    pub radius: f32,
    #[doc = " The falloff distance beyond the radius. Impulse is reduced to zero at this distance."]
    pub falloff: f32,
    #[doc = " Impulse per unit length. This applies an impulse according to the shape perimeter that\n is facing the explosion. Explosions only apply to circles, capsules, and polygons. This\n may be negative for implosions."]
    pub impulsePerLength: f32,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your explosion definition\n @ingroup world"]
    pub fn b2DefaultExplosionDef() -> b2ExplosionDef;
}
#[doc = " A begin touch event is generated when a shape starts to overlap a sensor shape."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SensorBeginTouchEvent {
    #[doc = " The id of the sensor shape"]
    pub sensorShapeId: b2ShapeId,
    #[doc = " The id of the shape that began touching the sensor shape"]
    pub visitorShapeId: b2ShapeId,
}
#[doc = " An end touch event is generated when a shape stops overlapping a sensor shape.\n\tThese include things like setting the transform, destroying a body or shape, or changing\n\ta filter. You will also get an end event if the sensor or visitor are destroyed.\n\tTherefore you should always confirm the shape id is valid using b2Shape_IsValid."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SensorEndTouchEvent {
    #[doc = " The id of the sensor shape\n\t@warning this shape may have been destroyed\n\t@see b2Shape_IsValid"]
    pub sensorShapeId: b2ShapeId,
    #[doc = " The id of the shape that stopped touching the sensor shape\n\t@warning this shape may have been destroyed\n\t@see b2Shape_IsValid"]
    pub visitorShapeId: b2ShapeId,
}
#[doc = " Sensor events are buffered in the world and are available\n as begin/end overlap event arrays after the time step is complete.\n Note: these may become invalid if bodies and/or shapes are destroyed"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2SensorEvents {
    #[doc = " Array of sensor begin touch events"]
    pub beginEvents: *mut b2SensorBeginTouchEvent,
    #[doc = " Array of sensor end touch events"]
    pub endEvents: *mut b2SensorEndTouchEvent,
    #[doc = " The number of begin touch events"]
    pub beginCount: ::std::os::raw::c_int,
    #[doc = " The number of end touch events"]
    pub endCount: ::std::os::raw::c_int,
}
#[doc = " A begin touch event is generated when two shapes begin touching."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactBeginTouchEvent {
    #[doc = " Id of the first shape"]
    pub shapeIdA: b2ShapeId,
    #[doc = " Id of the second shape"]
    pub shapeIdB: b2ShapeId,
    #[doc = " The transient contact id. This contact maybe destroyed automatically when the world is modified or simulated.\n Used b2Contact_IsValid before using this id."]
    pub contactId: b2ContactId,
}
#[doc = " An end touch event is generated when two shapes stop touching.\n\tYou will get an end event if you do anything that destroys contacts previous to the last\n\tworld step. These include things like setting the transform, destroying a body\n\tor shape, or changing a filter or body type."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactEndTouchEvent {
    #[doc = " Id of the first shape\n\t@warning this shape may have been destroyed\n\t@see b2Shape_IsValid"]
    pub shapeIdA: b2ShapeId,
    #[doc = " Id of the second shape\n\t@warning this shape may have been destroyed\n\t@see b2Shape_IsValid"]
    pub shapeIdB: b2ShapeId,
    #[doc = " Id of the contact.\n\t@warning this contact may have been destroyed\n\t@see b2Contact_IsValid"]
    pub contactId: b2ContactId,
}
#[doc = " A hit touch event is generated when two shapes collide with a speed faster than the hit speed threshold.\n This may be reported for speculative contacts that have a confirmed impulse."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactHitEvent {
    #[doc = " Id of the first shape"]
    pub shapeIdA: b2ShapeId,
    #[doc = " Id of the second shape"]
    pub shapeIdB: b2ShapeId,
    #[doc = " Id of the contact.\n\t@warning this contact may have been destroyed\n\t@see b2Contact_IsValid"]
    pub contactId: b2ContactId,
    #[doc = " Point where the shapes hit at the beginning of the time step.\n This is a mid-point between the two surfaces. It could be at speculative\n point where the two shapes were not touching at the beginning of the time step."]
    pub point: b2Vec2,
    #[doc = " Normal vector pointing from shape A to shape B"]
    pub normal: b2Vec2,
    #[doc = " The speed the shapes are approaching. Always positive. Typically in meters per second."]
    pub approachSpeed: f32,
}
#[doc = " Contact events are buffered in the Box2D world and are available\n as event arrays after the time step is complete.\n Note: these may become invalid if bodies and/or shapes are destroyed"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactEvents {
    #[doc = " Array of begin touch events"]
    pub beginEvents: *mut b2ContactBeginTouchEvent,
    #[doc = " Array of end touch events"]
    pub endEvents: *mut b2ContactEndTouchEvent,
    #[doc = " Array of hit events"]
    pub hitEvents: *mut b2ContactHitEvent,
    #[doc = " Number of begin touch events"]
    pub beginCount: ::std::os::raw::c_int,
    #[doc = " Number of end touch events"]
    pub endCount: ::std::os::raw::c_int,
    #[doc = " Number of hit events"]
    pub hitCount: ::std::os::raw::c_int,
}
#[doc = " Body move events triggered when a body moves.\n Triggered when a body moves due to simulation. Not reported for bodies moved by the user.\n This also has a flag to indicate that the body went to sleep so the application can also\n sleep that actor/entity/object associated with the body.\n On the other hand if the flag does not indicate the body went to sleep then the application\n can treat the actor/entity/object associated with the body as awake.\n This is an efficient way for an application to update game object transforms rather than\n calling functions such as b2Body_GetTransform() because this data is delivered as a contiguous array\n and it is only populated with bodies that have moved.\n @note If sleeping is disabled all dynamic and kinematic bodies will trigger move events."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2BodyMoveEvent {
    pub userData: *mut ::std::os::raw::c_void,
    pub transform: b2Transform,
    pub bodyId: b2BodyId,
    pub fellAsleep: bool,
}
#[doc = " Body events are buffered in the Box2D world and are available\n as event arrays after the time step is complete.\n Note: this data becomes invalid if bodies are destroyed"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2BodyEvents {
    #[doc = " Array of move events"]
    pub moveEvents: *mut b2BodyMoveEvent,
    #[doc = " Number of move events"]
    pub moveCount: ::std::os::raw::c_int,
}
#[doc = " Joint events report joints that are awake and have a force and/or torque exceeding the threshold\n The observed forces and torques are not returned for efficiency reasons."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2JointEvent {
    #[doc = " The joint id"]
    pub jointId: b2JointId,
    #[doc = " The user data from the joint for convenience"]
    pub userData: *mut ::std::os::raw::c_void,
}
#[doc = " Joint events are buffered in the world and are available\n as event arrays after the time step is complete.\n Note: this data becomes invalid if joints are destroyed"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2JointEvents {
    #[doc = " Array of events"]
    pub jointEvents: *mut b2JointEvent,
    #[doc = " Number of events"]
    pub count: ::std::os::raw::c_int,
}
#[doc = " The contact data for two shapes. By convention the manifold normal points\n from shape A to shape B.\n @see b2Shape_GetContactData() and b2Body_GetContactData()"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2ContactData {
    pub contactId: b2ContactId,
    pub shapeIdA: b2ShapeId,
    pub shapeIdB: b2ShapeId,
    pub manifold: b2Manifold,
}
#[doc = " Prototype for a contact filter callback.\n This is called when a contact pair is considered for collision. This allows you to\n perform custom logic to prevent collision between shapes. This is only called if\n one of the two shapes has custom filtering enabled.\n Notes:\n - this function must be thread-safe\n - this is only called if one of the two shapes has enabled custom filtering\n - this may be called for awake dynamic bodies and sensors\n Return false if you want to disable the collision\n @see b2ShapeDef\n @warning Do not attempt to modify the world inside this callback\n @ingroup world"]
pub type b2CustomFilterFcn = ::std::option::Option<
    unsafe extern "C" fn(
        shapeIdA: b2ShapeId,
        shapeIdB: b2ShapeId,
        context: *mut ::std::os::raw::c_void,
    ) -> bool,
>;
#[doc = " Prototype for a pre-solve callback.\n This is called after a contact is updated. This allows you to inspect a\n contact before it goes to the solver. If you are careful, you can modify the\n contact manifold (e.g. modify the normal).\n Notes:\n - this function must be thread-safe\n - this is only called if the shape has enabled pre-solve events\n - this is called only for awake dynamic bodies\n - this is not called for sensors\n - the supplied manifold has impulse values from the previous step\n Return false if you want to disable the contact this step\n @warning Do not attempt to modify the world inside this callback\n @ingroup world"]
pub type b2PreSolveFcn = ::std::option::Option<
    unsafe extern "C" fn(
        shapeIdA: b2ShapeId,
        shapeIdB: b2ShapeId,
        point: b2Vec2,
        normal: b2Vec2,
        context: *mut ::std::os::raw::c_void,
    ) -> bool,
>;
#[doc = " Prototype callback for overlap queries.\n Called for each shape found in the query.\n @see b2World_OverlapABB\n @return false to terminate the query.\n @ingroup world"]
pub type b2OverlapResultFcn = ::std::option::Option<
    unsafe extern "C" fn(shapeId: b2ShapeId, context: *mut ::std::os::raw::c_void) -> bool,
>;
#[doc = " Prototype callback for ray and shape casts.\n Called for each shape found in the query. You control how the ray cast\n proceeds by returning a float:\n return -1: ignore this shape and continue\n return 0: terminate the ray cast\n return fraction: clip the ray to this point\n return 1: don't clip the ray and continue\n A cast with initial overlap will return a zero fraction and a zero normal.\n @param shapeId the shape hit by the ray\n @param point the point of initial intersection\n @param normal the normal vector at the point of intersection, zero for a shape cast with initial overlap\n @param fraction the fraction along the ray at the point of intersection, zero for a shape cast with initial overlap\n @param context the user context\n @return -1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continue\n @see b2World_CastRay\n @ingroup world"]
pub type b2CastResultFcn = ::std::option::Option<
    unsafe extern "C" fn(
        shapeId: b2ShapeId,
        point: b2Vec2,
        normal: b2Vec2,
        fraction: f32,
        context: *mut ::std::os::raw::c_void,
    ) -> f32,
>;
pub type b2PlaneResultFcn = ::std::option::Option<
    unsafe extern "C" fn(
        shapeId: b2ShapeId,
        plane: *const b2PlaneResult,
        context: *mut ::std::os::raw::c_void,
    ) -> bool,
>;
pub const b2HexColor_b2_colorAliceBlue: b2HexColor = 15792383;
pub const b2HexColor_b2_colorAntiqueWhite: b2HexColor = 16444375;
pub const b2HexColor_b2_colorAqua: b2HexColor = 65535;
pub const b2HexColor_b2_colorAquamarine: b2HexColor = 8388564;
pub const b2HexColor_b2_colorAzure: b2HexColor = 15794175;
pub const b2HexColor_b2_colorBeige: b2HexColor = 16119260;
pub const b2HexColor_b2_colorBisque: b2HexColor = 16770244;
pub const b2HexColor_b2_colorBlack: b2HexColor = 0;
pub const b2HexColor_b2_colorBlanchedAlmond: b2HexColor = 16772045;
pub const b2HexColor_b2_colorBlue: b2HexColor = 255;
pub const b2HexColor_b2_colorBlueViolet: b2HexColor = 9055202;
pub const b2HexColor_b2_colorBrown: b2HexColor = 10824234;
pub const b2HexColor_b2_colorBurlywood: b2HexColor = 14596231;
pub const b2HexColor_b2_colorCadetBlue: b2HexColor = 6266528;
pub const b2HexColor_b2_colorChartreuse: b2HexColor = 8388352;
pub const b2HexColor_b2_colorChocolate: b2HexColor = 13789470;
pub const b2HexColor_b2_colorCoral: b2HexColor = 16744272;
pub const b2HexColor_b2_colorCornflowerBlue: b2HexColor = 6591981;
pub const b2HexColor_b2_colorCornsilk: b2HexColor = 16775388;
pub const b2HexColor_b2_colorCrimson: b2HexColor = 14423100;
pub const b2HexColor_b2_colorCyan: b2HexColor = 65535;
pub const b2HexColor_b2_colorDarkBlue: b2HexColor = 139;
pub const b2HexColor_b2_colorDarkCyan: b2HexColor = 35723;
pub const b2HexColor_b2_colorDarkGoldenRod: b2HexColor = 12092939;
pub const b2HexColor_b2_colorDarkGray: b2HexColor = 11119017;
pub const b2HexColor_b2_colorDarkGreen: b2HexColor = 25600;
pub const b2HexColor_b2_colorDarkKhaki: b2HexColor = 12433259;
pub const b2HexColor_b2_colorDarkMagenta: b2HexColor = 9109643;
pub const b2HexColor_b2_colorDarkOliveGreen: b2HexColor = 5597999;
pub const b2HexColor_b2_colorDarkOrange: b2HexColor = 16747520;
pub const b2HexColor_b2_colorDarkOrchid: b2HexColor = 10040012;
pub const b2HexColor_b2_colorDarkRed: b2HexColor = 9109504;
pub const b2HexColor_b2_colorDarkSalmon: b2HexColor = 15308410;
pub const b2HexColor_b2_colorDarkSeaGreen: b2HexColor = 9419919;
pub const b2HexColor_b2_colorDarkSlateBlue: b2HexColor = 4734347;
pub const b2HexColor_b2_colorDarkSlateGray: b2HexColor = 3100495;
pub const b2HexColor_b2_colorDarkTurquoise: b2HexColor = 52945;
pub const b2HexColor_b2_colorDarkViolet: b2HexColor = 9699539;
pub const b2HexColor_b2_colorDeepPink: b2HexColor = 16716947;
pub const b2HexColor_b2_colorDeepSkyBlue: b2HexColor = 49151;
pub const b2HexColor_b2_colorDimGray: b2HexColor = 6908265;
pub const b2HexColor_b2_colorDodgerBlue: b2HexColor = 2003199;
pub const b2HexColor_b2_colorFireBrick: b2HexColor = 11674146;
pub const b2HexColor_b2_colorFloralWhite: b2HexColor = 16775920;
pub const b2HexColor_b2_colorForestGreen: b2HexColor = 2263842;
pub const b2HexColor_b2_colorFuchsia: b2HexColor = 16711935;
pub const b2HexColor_b2_colorGainsboro: b2HexColor = 14474460;
pub const b2HexColor_b2_colorGhostWhite: b2HexColor = 16316671;
pub const b2HexColor_b2_colorGold: b2HexColor = 16766720;
pub const b2HexColor_b2_colorGoldenRod: b2HexColor = 14329120;
pub const b2HexColor_b2_colorGray: b2HexColor = 8421504;
pub const b2HexColor_b2_colorGreen: b2HexColor = 32768;
pub const b2HexColor_b2_colorGreenYellow: b2HexColor = 11403055;
pub const b2HexColor_b2_colorHoneyDew: b2HexColor = 15794160;
pub const b2HexColor_b2_colorHotPink: b2HexColor = 16738740;
pub const b2HexColor_b2_colorIndianRed: b2HexColor = 13458524;
pub const b2HexColor_b2_colorIndigo: b2HexColor = 4915330;
pub const b2HexColor_b2_colorIvory: b2HexColor = 16777200;
pub const b2HexColor_b2_colorKhaki: b2HexColor = 15787660;
pub const b2HexColor_b2_colorLavender: b2HexColor = 15132410;
pub const b2HexColor_b2_colorLavenderBlush: b2HexColor = 16773365;
pub const b2HexColor_b2_colorLawnGreen: b2HexColor = 8190976;
pub const b2HexColor_b2_colorLemonChiffon: b2HexColor = 16775885;
pub const b2HexColor_b2_colorLightBlue: b2HexColor = 11393254;
pub const b2HexColor_b2_colorLightCoral: b2HexColor = 15761536;
pub const b2HexColor_b2_colorLightCyan: b2HexColor = 14745599;
pub const b2HexColor_b2_colorLightGoldenRodYellow: b2HexColor = 16448210;
pub const b2HexColor_b2_colorLightGray: b2HexColor = 13882323;
pub const b2HexColor_b2_colorLightGreen: b2HexColor = 9498256;
pub const b2HexColor_b2_colorLightPink: b2HexColor = 16758465;
pub const b2HexColor_b2_colorLightSalmon: b2HexColor = 16752762;
pub const b2HexColor_b2_colorLightSeaGreen: b2HexColor = 2142890;
pub const b2HexColor_b2_colorLightSkyBlue: b2HexColor = 8900346;
pub const b2HexColor_b2_colorLightSlateGray: b2HexColor = 7833753;
pub const b2HexColor_b2_colorLightSteelBlue: b2HexColor = 11584734;
pub const b2HexColor_b2_colorLightYellow: b2HexColor = 16777184;
pub const b2HexColor_b2_colorLime: b2HexColor = 65280;
pub const b2HexColor_b2_colorLimeGreen: b2HexColor = 3329330;
pub const b2HexColor_b2_colorLinen: b2HexColor = 16445670;
pub const b2HexColor_b2_colorMagenta: b2HexColor = 16711935;
pub const b2HexColor_b2_colorMaroon: b2HexColor = 8388608;
pub const b2HexColor_b2_colorMediumAquaMarine: b2HexColor = 6737322;
pub const b2HexColor_b2_colorMediumBlue: b2HexColor = 205;
pub const b2HexColor_b2_colorMediumOrchid: b2HexColor = 12211667;
pub const b2HexColor_b2_colorMediumPurple: b2HexColor = 9662683;
pub const b2HexColor_b2_colorMediumSeaGreen: b2HexColor = 3978097;
pub const b2HexColor_b2_colorMediumSlateBlue: b2HexColor = 8087790;
pub const b2HexColor_b2_colorMediumSpringGreen: b2HexColor = 64154;
pub const b2HexColor_b2_colorMediumTurquoise: b2HexColor = 4772300;
pub const b2HexColor_b2_colorMediumVioletRed: b2HexColor = 13047173;
pub const b2HexColor_b2_colorMidnightBlue: b2HexColor = 1644912;
pub const b2HexColor_b2_colorMintCream: b2HexColor = 16121850;
pub const b2HexColor_b2_colorMistyRose: b2HexColor = 16770273;
pub const b2HexColor_b2_colorMoccasin: b2HexColor = 16770229;
pub const b2HexColor_b2_colorNavajoWhite: b2HexColor = 16768685;
pub const b2HexColor_b2_colorNavy: b2HexColor = 128;
pub const b2HexColor_b2_colorOldLace: b2HexColor = 16643558;
pub const b2HexColor_b2_colorOlive: b2HexColor = 8421376;
pub const b2HexColor_b2_colorOliveDrab: b2HexColor = 7048739;
pub const b2HexColor_b2_colorOrange: b2HexColor = 16753920;
pub const b2HexColor_b2_colorOrangeRed: b2HexColor = 16729344;
pub const b2HexColor_b2_colorOrchid: b2HexColor = 14315734;
pub const b2HexColor_b2_colorPaleGoldenRod: b2HexColor = 15657130;
pub const b2HexColor_b2_colorPaleGreen: b2HexColor = 10025880;
pub const b2HexColor_b2_colorPaleTurquoise: b2HexColor = 11529966;
pub const b2HexColor_b2_colorPaleVioletRed: b2HexColor = 14381203;
pub const b2HexColor_b2_colorPapayaWhip: b2HexColor = 16773077;
pub const b2HexColor_b2_colorPeachPuff: b2HexColor = 16767673;
pub const b2HexColor_b2_colorPeru: b2HexColor = 13468991;
pub const b2HexColor_b2_colorPink: b2HexColor = 16761035;
pub const b2HexColor_b2_colorPlum: b2HexColor = 14524637;
pub const b2HexColor_b2_colorPowderBlue: b2HexColor = 11591910;
pub const b2HexColor_b2_colorPurple: b2HexColor = 8388736;
pub const b2HexColor_b2_colorRebeccaPurple: b2HexColor = 6697881;
pub const b2HexColor_b2_colorRed: b2HexColor = 16711680;
pub const b2HexColor_b2_colorRosyBrown: b2HexColor = 12357519;
pub const b2HexColor_b2_colorRoyalBlue: b2HexColor = 4286945;
pub const b2HexColor_b2_colorSaddleBrown: b2HexColor = 9127187;
pub const b2HexColor_b2_colorSalmon: b2HexColor = 16416882;
pub const b2HexColor_b2_colorSandyBrown: b2HexColor = 16032864;
pub const b2HexColor_b2_colorSeaGreen: b2HexColor = 3050327;
pub const b2HexColor_b2_colorSeaShell: b2HexColor = 16774638;
pub const b2HexColor_b2_colorSienna: b2HexColor = 10506797;
pub const b2HexColor_b2_colorSilver: b2HexColor = 12632256;
pub const b2HexColor_b2_colorSkyBlue: b2HexColor = 8900331;
pub const b2HexColor_b2_colorSlateBlue: b2HexColor = 6970061;
pub const b2HexColor_b2_colorSlateGray: b2HexColor = 7372944;
pub const b2HexColor_b2_colorSnow: b2HexColor = 16775930;
pub const b2HexColor_b2_colorSpringGreen: b2HexColor = 65407;
pub const b2HexColor_b2_colorSteelBlue: b2HexColor = 4620980;
pub const b2HexColor_b2_colorTan: b2HexColor = 13808780;
pub const b2HexColor_b2_colorTeal: b2HexColor = 32896;
pub const b2HexColor_b2_colorThistle: b2HexColor = 14204888;
pub const b2HexColor_b2_colorTomato: b2HexColor = 16737095;
pub const b2HexColor_b2_colorTurquoise: b2HexColor = 4251856;
pub const b2HexColor_b2_colorViolet: b2HexColor = 15631086;
pub const b2HexColor_b2_colorWheat: b2HexColor = 16113331;
pub const b2HexColor_b2_colorWhite: b2HexColor = 16777215;
pub const b2HexColor_b2_colorWhiteSmoke: b2HexColor = 16119285;
pub const b2HexColor_b2_colorYellow: b2HexColor = 16776960;
pub const b2HexColor_b2_colorYellowGreen: b2HexColor = 10145074;
pub const b2HexColor_b2_colorBox2DRed: b2HexColor = 14430514;
pub const b2HexColor_b2_colorBox2DBlue: b2HexColor = 3190463;
pub const b2HexColor_b2_colorBox2DGreen: b2HexColor = 9226532;
pub const b2HexColor_b2_colorBox2DYellow: b2HexColor = 16772748;
#[doc = " These colors are used for debug draw and mostly match the named SVG colors.\n See https://www.rapidtables.com/web/color/index.html\n https://johndecember.com/html/spec/colorsvg.html\n https://upload.wikimedia.org/wikipedia/commons/2/2b/SVG_Recognized_color_keyword_names.svg"]
pub type b2HexColor = ::std::os::raw::c_uint;
#[doc = " This struct holds callbacks you can implement to draw a Box2D world.\n This structure should be zero initialized.\n @ingroup world"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2DebugDraw {
    #[doc = " Draw a closed polygon provided in CCW order."]
    pub DrawPolygonFcn: ::std::option::Option<
        unsafe extern "C" fn(
            vertices: *const b2Vec2,
            vertexCount: ::std::os::raw::c_int,
            color: b2HexColor,
            context: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " Draw a solid closed polygon provided in CCW order."]
    pub DrawSolidPolygonFcn: ::std::option::Option<
        unsafe extern "C" fn(
            transform: b2Transform,
            vertices: *const b2Vec2,
            vertexCount: ::std::os::raw::c_int,
            radius: f32,
            color: b2HexColor,
            context: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " Draw a circle."]
    pub DrawCircleFcn: ::std::option::Option<
        unsafe extern "C" fn(
            center: b2Vec2,
            radius: f32,
            color: b2HexColor,
            context: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " Draw a solid circle."]
    pub DrawSolidCircleFcn: ::std::option::Option<
        unsafe extern "C" fn(
            transform: b2Transform,
            radius: f32,
            color: b2HexColor,
            context: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " Draw a solid capsule."]
    pub DrawSolidCapsuleFcn: ::std::option::Option<
        unsafe extern "C" fn(
            p1: b2Vec2,
            p2: b2Vec2,
            radius: f32,
            color: b2HexColor,
            context: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " Draw a line segment."]
    pub DrawLineFcn: ::std::option::Option<
        unsafe extern "C" fn(
            p1: b2Vec2,
            p2: b2Vec2,
            color: b2HexColor,
            context: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " Draw a transform. Choose your own length scale."]
    pub DrawTransformFcn: ::std::option::Option<
        unsafe extern "C" fn(transform: b2Transform, context: *mut ::std::os::raw::c_void),
    >,
    #[doc = " Draw a point."]
    pub DrawPointFcn: ::std::option::Option<
        unsafe extern "C" fn(
            p: b2Vec2,
            size: f32,
            color: b2HexColor,
            context: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " Draw a string in world space"]
    pub DrawStringFcn: ::std::option::Option<
        unsafe extern "C" fn(
            p: b2Vec2,
            s: *const ::std::os::raw::c_char,
            color: b2HexColor,
            context: *mut ::std::os::raw::c_void,
        ),
    >,
    #[doc = " World bounds to use for debug draw"]
    pub drawingBounds: b2AABB,
    #[doc = " Scale to use when drawing forces"]
    pub forceScale: f32,
    #[doc = " Global scaling for joint drawing"]
    pub jointScale: f32,
    #[doc = " Option to draw shapes"]
    pub drawShapes: bool,
    #[doc = " Option to draw joints"]
    pub drawJoints: bool,
    #[doc = " Option to draw additional information for joints"]
    pub drawJointExtras: bool,
    #[doc = " Option to draw the bounding boxes for shapes"]
    pub drawBounds: bool,
    #[doc = " Option to draw the mass and center of mass of dynamic bodies"]
    pub drawMass: bool,
    #[doc = " Option to draw body names"]
    pub drawBodyNames: bool,
    #[doc = " Option to draw contact points"]
    pub drawContactPoints: bool,
    #[doc = " Option to visualize the graph coloring used for contacts and joints"]
    pub drawGraphColors: bool,
    #[doc = " Option to draw contact feature ids"]
    pub drawContactFeatures: bool,
    #[doc = " Option to draw contact normals"]
    pub drawContactNormals: bool,
    #[doc = " Option to draw contact normal forces"]
    pub drawContactForces: bool,
    #[doc = " Option to draw contact friction forces"]
    pub drawFrictionForces: bool,
    #[doc = " Option to draw islands as bounding boxes"]
    pub drawIslands: bool,
    #[doc = " User context that is passed as an argument to drawing callback functions"]
    pub context: *mut ::std::os::raw::c_void,
}
unsafe extern "C" {
    #[doc = " Use this to initialize your drawing interface. This allows you to implement a sub-set\n of the drawing functions."]
    pub fn b2DefaultDebugDraw() -> b2DebugDraw;
}
unsafe extern "C" {
    #[doc = " Create a world for rigid body simulation. A world contains bodies, shapes, and constraints. You make create\n up to 128 worlds. Each world is completely independent and may be simulated in parallel.\n @return the world id."]
    pub fn b2CreateWorld(def: *const b2WorldDef) -> b2WorldId;
}
unsafe extern "C" {
    #[doc = " Destroy a world"]
    pub fn b2DestroyWorld(worldId: b2WorldId);
}
unsafe extern "C" {
    #[doc = " World id validation. Provides validation for up to 64K allocations."]
    pub fn b2World_IsValid(id: b2WorldId) -> bool;
}
unsafe extern "C" {
    #[doc = " Simulate a world for one time step. This performs collision detection, integration, and constraint solution.\n @param worldId The world to simulate\n @param timeStep The amount of time to simulate, this should be a fixed number. Usually 1/60.\n @param subStepCount The number of sub-steps, increasing the sub-step count can increase accuracy. Usually 4."]
    pub fn b2World_Step(worldId: b2WorldId, timeStep: f32, subStepCount: ::std::os::raw::c_int);
}
unsafe extern "C" {
    #[doc = " Call this to draw shapes and other debug draw data"]
    pub fn b2World_Draw(worldId: b2WorldId, draw: *mut b2DebugDraw);
}
unsafe extern "C" {
    #[doc = " Get the body events for the current time step. The event data is transient. Do not store a reference to this data."]
    pub fn b2World_GetBodyEvents(worldId: b2WorldId) -> b2BodyEvents;
}
unsafe extern "C" {
    #[doc = " Get sensor events for the current time step. The event data is transient. Do not store a reference to this data."]
    pub fn b2World_GetSensorEvents(worldId: b2WorldId) -> b2SensorEvents;
}
unsafe extern "C" {
    #[doc = " Get contact events for this current time step. The event data is transient. Do not store a reference to this data."]
    pub fn b2World_GetContactEvents(worldId: b2WorldId) -> b2ContactEvents;
}
unsafe extern "C" {
    #[doc = " Get the joint events for the current time step. The event data is transient. Do not store a reference to this data."]
    pub fn b2World_GetJointEvents(worldId: b2WorldId) -> b2JointEvents;
}
unsafe extern "C" {
    #[doc = " Overlap test for all shapes that *potentially* overlap the provided AABB"]
    pub fn b2World_OverlapAABB(
        worldId: b2WorldId,
        aabb: b2AABB,
        filter: b2QueryFilter,
        fcn: b2OverlapResultFcn,
        context: *mut ::std::os::raw::c_void,
    ) -> b2TreeStats;
}
unsafe extern "C" {
    #[doc = " Overlap test for all shapes that overlap the provided shape proxy."]
    pub fn b2World_OverlapShape(
        worldId: b2WorldId,
        proxy: *const b2ShapeProxy,
        filter: b2QueryFilter,
        fcn: b2OverlapResultFcn,
        context: *mut ::std::os::raw::c_void,
    ) -> b2TreeStats;
}
unsafe extern "C" {
    #[doc = " Cast a ray into the world to collect shapes in the path of the ray.\n Your callback function controls whether you get the closest point, any point, or n-points.\n @note The callback function may receive shapes in any order\n @param worldId The world to cast the ray against\n @param origin The start point of the ray\n @param translation The translation of the ray from the start point to the end point\n @param filter Contains bit flags to filter unwanted shapes from the results\n @param fcn A user implemented callback function\n @param context A user context that is passed along to the callback function\n\t@return traversal performance counters"]
    pub fn b2World_CastRay(
        worldId: b2WorldId,
        origin: b2Vec2,
        translation: b2Vec2,
        filter: b2QueryFilter,
        fcn: b2CastResultFcn,
        context: *mut ::std::os::raw::c_void,
    ) -> b2TreeStats;
}
unsafe extern "C" {
    #[doc = " Cast a ray into the world to collect the closest hit. This is a convenience function. Ignores initial overlap.\n This is less general than b2World_CastRay() and does not allow for custom filtering."]
    pub fn b2World_CastRayClosest(
        worldId: b2WorldId,
        origin: b2Vec2,
        translation: b2Vec2,
        filter: b2QueryFilter,
    ) -> b2RayResult;
}
unsafe extern "C" {
    #[doc = " Cast a shape through the world. Similar to a cast ray except that a shape is cast instead of a point.\n\t@see b2World_CastRay"]
    pub fn b2World_CastShape(
        worldId: b2WorldId,
        proxy: *const b2ShapeProxy,
        translation: b2Vec2,
        filter: b2QueryFilter,
        fcn: b2CastResultFcn,
        context: *mut ::std::os::raw::c_void,
    ) -> b2TreeStats;
}
unsafe extern "C" {
    #[doc = " Cast a capsule mover through the world. This is a special shape cast that handles sliding along other shapes while reducing\n clipping."]
    pub fn b2World_CastMover(
        worldId: b2WorldId,
        mover: *const b2Capsule,
        translation: b2Vec2,
        filter: b2QueryFilter,
    ) -> f32;
}
unsafe extern "C" {
    #[doc = " Collide a capsule mover with the world, gathering collision planes that can be fed to b2SolvePlanes. Useful for\n kinematic character movement."]
    pub fn b2World_CollideMover(
        worldId: b2WorldId,
        mover: *const b2Capsule,
        filter: b2QueryFilter,
        fcn: b2PlaneResultFcn,
        context: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    #[doc = " Enable/disable sleep. If your application does not need sleeping, you can gain some performance\n by disabling sleep completely at the world level.\n @see b2WorldDef"]
    pub fn b2World_EnableSleeping(worldId: b2WorldId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Is body sleeping enabled?"]
    pub fn b2World_IsSleepingEnabled(worldId: b2WorldId) -> bool;
}
unsafe extern "C" {
    #[doc = " Enable/disable continuous collision between dynamic and static bodies. Generally you should keep continuous\n collision enabled to prevent fast moving objects from going through static objects. The performance gain from\n disabling continuous collision is minor.\n @see b2WorldDef"]
    pub fn b2World_EnableContinuous(worldId: b2WorldId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Is continuous collision enabled?"]
    pub fn b2World_IsContinuousEnabled(worldId: b2WorldId) -> bool;
}
unsafe extern "C" {
    #[doc = " Adjust the restitution threshold. It is recommended not to make this value very small\n because it will prevent bodies from sleeping. Usually in meters per second.\n @see b2WorldDef"]
    pub fn b2World_SetRestitutionThreshold(worldId: b2WorldId, value: f32);
}
unsafe extern "C" {
    #[doc = " Get the the restitution speed threshold. Usually in meters per second."]
    pub fn b2World_GetRestitutionThreshold(worldId: b2WorldId) -> f32;
}
unsafe extern "C" {
    #[doc = " Adjust the hit event threshold. This controls the collision speed needed to generate a b2ContactHitEvent.\n Usually in meters per second.\n @see b2WorldDef::hitEventThreshold"]
    pub fn b2World_SetHitEventThreshold(worldId: b2WorldId, value: f32);
}
unsafe extern "C" {
    #[doc = " Get the the hit event speed threshold. Usually in meters per second."]
    pub fn b2World_GetHitEventThreshold(worldId: b2WorldId) -> f32;
}
unsafe extern "C" {
    #[doc = " Register the custom filter callback. This is optional."]
    pub fn b2World_SetCustomFilterCallback(
        worldId: b2WorldId,
        fcn: b2CustomFilterFcn,
        context: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    #[doc = " Register the pre-solve callback. This is optional."]
    pub fn b2World_SetPreSolveCallback(
        worldId: b2WorldId,
        fcn: b2PreSolveFcn,
        context: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    #[doc = " Set the gravity vector for the entire world. Box2D has no concept of an up direction and this\n is left as a decision for the application. Usually in m/s^2.\n @see b2WorldDef"]
    pub fn b2World_SetGravity(worldId: b2WorldId, gravity: b2Vec2);
}
unsafe extern "C" {
    #[doc = " Get the gravity vector"]
    pub fn b2World_GetGravity(worldId: b2WorldId) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Apply a radial explosion\n @param worldId The world id\n @param explosionDef The explosion definition"]
    pub fn b2World_Explode(worldId: b2WorldId, explosionDef: *const b2ExplosionDef);
}
unsafe extern "C" {
    #[doc = " Adjust contact tuning parameters\n @param worldId The world id\n @param hertz The contact stiffness (cycles per second)\n @param dampingRatio The contact bounciness with 1 being critical damping (non-dimensional)\n @param pushSpeed The maximum contact constraint push out speed (meters per second)\n @note Advanced feature"]
    pub fn b2World_SetContactTuning(
        worldId: b2WorldId,
        hertz: f32,
        dampingRatio: f32,
        pushSpeed: f32,
    );
}
unsafe extern "C" {
    #[doc = " Set the maximum linear speed. Usually in m/s."]
    pub fn b2World_SetMaximumLinearSpeed(worldId: b2WorldId, maximumLinearSpeed: f32);
}
unsafe extern "C" {
    #[doc = " Get the maximum linear speed. Usually in m/s."]
    pub fn b2World_GetMaximumLinearSpeed(worldId: b2WorldId) -> f32;
}
unsafe extern "C" {
    #[doc = " Enable/disable constraint warm starting. Advanced feature for testing. Disabling\n warm starting greatly reduces stability and provides no performance gain."]
    pub fn b2World_EnableWarmStarting(worldId: b2WorldId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Is constraint warm starting enabled?"]
    pub fn b2World_IsWarmStartingEnabled(worldId: b2WorldId) -> bool;
}
unsafe extern "C" {
    #[doc = " Get the number of awake bodies."]
    pub fn b2World_GetAwakeBodyCount(worldId: b2WorldId) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the current world performance profile"]
    pub fn b2World_GetProfile(worldId: b2WorldId) -> b2Profile;
}
unsafe extern "C" {
    #[doc = " Get world counters and sizes"]
    pub fn b2World_GetCounters(worldId: b2WorldId) -> b2Counters;
}
unsafe extern "C" {
    #[doc = " Set the user data pointer."]
    pub fn b2World_SetUserData(worldId: b2WorldId, userData: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
    #[doc = " Get the user data pointer."]
    pub fn b2World_GetUserData(worldId: b2WorldId) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    #[doc = " Set the friction callback. Passing NULL resets to default."]
    pub fn b2World_SetFrictionCallback(worldId: b2WorldId, callback: b2FrictionCallback);
}
unsafe extern "C" {
    #[doc = " Set the restitution callback. Passing NULL resets to default."]
    pub fn b2World_SetRestitutionCallback(worldId: b2WorldId, callback: b2RestitutionCallback);
}
unsafe extern "C" {
    #[doc = " Dump memory stats to box2d_memory.txt"]
    pub fn b2World_DumpMemoryStats(worldId: b2WorldId);
}
unsafe extern "C" {
    #[doc = " This is for internal testing"]
    pub fn b2World_RebuildStaticTree(worldId: b2WorldId);
}
unsafe extern "C" {
    #[doc = " This is for internal testing"]
    pub fn b2World_EnableSpeculative(worldId: b2WorldId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Create a rigid body given a definition. No reference to the definition is retained. So you can create the definition\n on the stack and pass it as a pointer.\n @code{.c}\n b2BodyDef bodyDef = b2DefaultBodyDef();\n b2BodyId myBodyId = b2CreateBody(myWorldId, &bodyDef);\n @endcode\n @warning This function is locked during callbacks."]
    pub fn b2CreateBody(worldId: b2WorldId, def: *const b2BodyDef) -> b2BodyId;
}
unsafe extern "C" {
    #[doc = " Destroy a rigid body given an id. This destroys all shapes and joints attached to the body.\n Do not keep references to the associated shapes and joints."]
    pub fn b2DestroyBody(bodyId: b2BodyId);
}
unsafe extern "C" {
    #[doc = " Body identifier validation. A valid body exists in a world and is non-null.\n This can be used to detect orphaned ids. Provides validation for up to 64K allocations."]
    pub fn b2Body_IsValid(id: b2BodyId) -> bool;
}
unsafe extern "C" {
    #[doc = " Get the body type: static, kinematic, or dynamic"]
    pub fn b2Body_GetType(bodyId: b2BodyId) -> b2BodyType;
}
unsafe extern "C" {
    #[doc = " Change the body type. This is an expensive operation. This automatically updates the mass\n properties regardless of the automatic mass setting."]
    pub fn b2Body_SetType(bodyId: b2BodyId, type_: b2BodyType);
}
unsafe extern "C" {
    #[doc = " Set the body name. Up to 31 characters excluding 0 termination."]
    pub fn b2Body_SetName(bodyId: b2BodyId, name: *const ::std::os::raw::c_char);
}
unsafe extern "C" {
    #[doc = " Get the body name."]
    pub fn b2Body_GetName(bodyId: b2BodyId) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " Set the user data for a body"]
    pub fn b2Body_SetUserData(bodyId: b2BodyId, userData: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
    #[doc = " Get the user data stored in a body"]
    pub fn b2Body_GetUserData(bodyId: b2BodyId) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    #[doc = " Get the world position of a body. This is the location of the body origin."]
    pub fn b2Body_GetPosition(bodyId: b2BodyId) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Get the world rotation of a body as a cosine/sine pair (complex number)"]
    pub fn b2Body_GetRotation(bodyId: b2BodyId) -> b2Rot;
}
unsafe extern "C" {
    #[doc = " Get the world transform of a body."]
    pub fn b2Body_GetTransform(bodyId: b2BodyId) -> b2Transform;
}
unsafe extern "C" {
    #[doc = " Set the world transform of a body. This acts as a teleport and is fairly expensive.\n @note Generally you should create a body with then intended transform.\n @see b2BodyDef::position and b2BodyDef::rotation"]
    pub fn b2Body_SetTransform(bodyId: b2BodyId, position: b2Vec2, rotation: b2Rot);
}
unsafe extern "C" {
    #[doc = " Get a local point on a body given a world point"]
    pub fn b2Body_GetLocalPoint(bodyId: b2BodyId, worldPoint: b2Vec2) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Get a world point on a body given a local point"]
    pub fn b2Body_GetWorldPoint(bodyId: b2BodyId, localPoint: b2Vec2) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Get a local vector on a body given a world vector"]
    pub fn b2Body_GetLocalVector(bodyId: b2BodyId, worldVector: b2Vec2) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Get a world vector on a body given a local vector"]
    pub fn b2Body_GetWorldVector(bodyId: b2BodyId, localVector: b2Vec2) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Get the linear velocity of a body's center of mass. Usually in meters per second."]
    pub fn b2Body_GetLinearVelocity(bodyId: b2BodyId) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Get the angular velocity of a body in radians per second"]
    pub fn b2Body_GetAngularVelocity(bodyId: b2BodyId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the linear velocity of a body. Usually in meters per second."]
    pub fn b2Body_SetLinearVelocity(bodyId: b2BodyId, linearVelocity: b2Vec2);
}
unsafe extern "C" {
    #[doc = " Set the angular velocity of a body in radians per second"]
    pub fn b2Body_SetAngularVelocity(bodyId: b2BodyId, angularVelocity: f32);
}
unsafe extern "C" {
    #[doc = " Set the velocity to reach the given transform after a given time step.\n The result will be close but maybe not exact. This is meant for kinematic bodies.\n The target is not applied if the velocity would be below the sleep threshold and\n the body is currently asleep.\n @param bodyId The body id\n @param target The target transform for the body\n @param timeStep The time step of the next call to b2World_Step\n @param wake Option to wake the body or not"]
    pub fn b2Body_SetTargetTransform(
        bodyId: b2BodyId,
        target: b2Transform,
        timeStep: f32,
        wake: bool,
    );
}
unsafe extern "C" {
    #[doc = " Get the linear velocity of a local point attached to a body. Usually in meters per second."]
    pub fn b2Body_GetLocalPointVelocity(bodyId: b2BodyId, localPoint: b2Vec2) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Get the linear velocity of a world point attached to a body. Usually in meters per second."]
    pub fn b2Body_GetWorldPointVelocity(bodyId: b2BodyId, worldPoint: b2Vec2) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Apply a force at a world point. If the force is not applied at the center of mass,\n it will generate a torque and affect the angular velocity. This optionally wakes up the body.\n The force is ignored if the body is not awake.\n @param bodyId The body id\n @param force The world force vector, usually in newtons (N)\n @param point The world position of the point of application\n @param wake Option to wake up the body"]
    pub fn b2Body_ApplyForce(bodyId: b2BodyId, force: b2Vec2, point: b2Vec2, wake: bool);
}
unsafe extern "C" {
    #[doc = " Apply a force to the center of mass. This optionally wakes up the body.\n The force is ignored if the body is not awake.\n @param bodyId The body id\n @param force the world force vector, usually in newtons (N).\n @param wake also wake up the body"]
    pub fn b2Body_ApplyForceToCenter(bodyId: b2BodyId, force: b2Vec2, wake: bool);
}
unsafe extern "C" {
    #[doc = " Apply a torque. This affects the angular velocity without affecting the linear velocity.\n This optionally wakes the body. The torque is ignored if the body is not awake.\n @param bodyId The body id\n @param torque about the z-axis (out of the screen), usually in N*m.\n @param wake also wake up the body"]
    pub fn b2Body_ApplyTorque(bodyId: b2BodyId, torque: f32, wake: bool);
}
unsafe extern "C" {
    #[doc = " Clear the force and torque on this body. Forces and torques are automatically cleared after each world\n step. So this only needs to be called if the application wants to remove the effect of previous\n calls to apply forces and torques before the world step is called.\n @param bodyId The body id"]
    pub fn b2Body_ClearForces(bodyId: b2BodyId);
}
unsafe extern "C" {
    #[doc = " Apply an impulse at a point. This immediately modifies the velocity.\n It also modifies the angular velocity if the point of application\n is not at the center of mass. This optionally wakes the body.\n The impulse is ignored if the body is not awake.\n @param bodyId The body id\n @param impulse the world impulse vector, usually in N*s or kg*m/s.\n @param point the world position of the point of application.\n @param wake also wake up the body\n @warning This should be used for one-shot impulses. If you need a steady force,\n use a force instead, which will work better with the sub-stepping solver."]
    pub fn b2Body_ApplyLinearImpulse(bodyId: b2BodyId, impulse: b2Vec2, point: b2Vec2, wake: bool);
}
unsafe extern "C" {
    #[doc = " Apply an impulse to the center of mass. This immediately modifies the velocity.\n The impulse is ignored if the body is not awake. This optionally wakes the body.\n @param bodyId The body id\n @param impulse the world impulse vector, usually in N*s or kg*m/s.\n @param wake also wake up the body\n @warning This should be used for one-shot impulses. If you need a steady force,\n use a force instead, which will work better with the sub-stepping solver."]
    pub fn b2Body_ApplyLinearImpulseToCenter(bodyId: b2BodyId, impulse: b2Vec2, wake: bool);
}
unsafe extern "C" {
    #[doc = " Apply an angular impulse. The impulse is ignored if the body is not awake.\n This optionally wakes the body.\n @param bodyId The body id\n @param impulse the angular impulse, usually in units of kg*m*m/s\n @param wake also wake up the body\n @warning This should be used for one-shot impulses. If you need a steady torque,\n use a torque instead, which will work better with the sub-stepping solver."]
    pub fn b2Body_ApplyAngularImpulse(bodyId: b2BodyId, impulse: f32, wake: bool);
}
unsafe extern "C" {
    #[doc = " Get the mass of the body, usually in kilograms"]
    pub fn b2Body_GetMass(bodyId: b2BodyId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the rotational inertia of the body, usually in kg*m^2"]
    pub fn b2Body_GetRotationalInertia(bodyId: b2BodyId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the center of mass position of the body in local space"]
    pub fn b2Body_GetLocalCenterOfMass(bodyId: b2BodyId) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Get the center of mass position of the body in world space"]
    pub fn b2Body_GetWorldCenterOfMass(bodyId: b2BodyId) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Override the body's mass properties. Normally this is computed automatically using the\n shape geometry and density. This information is lost if a shape is added or removed or if the\n body type changes."]
    pub fn b2Body_SetMassData(bodyId: b2BodyId, massData: b2MassData);
}
unsafe extern "C" {
    #[doc = " Get the mass data for a body"]
    pub fn b2Body_GetMassData(bodyId: b2BodyId) -> b2MassData;
}
unsafe extern "C" {
    #[doc = " This updates the mass properties to the sum of the mass properties of the shapes.\n This normally does not need to be called unless you called SetMassData to override\n the mass and you later want to reset the mass.\n You may also use this when automatic mass computation has been disabled.\n You should call this regardless of body type.\n Note that sensor shapes may have mass."]
    pub fn b2Body_ApplyMassFromShapes(bodyId: b2BodyId);
}
unsafe extern "C" {
    #[doc = " Adjust the linear damping. Normally this is set in b2BodyDef before creation."]
    pub fn b2Body_SetLinearDamping(bodyId: b2BodyId, linearDamping: f32);
}
unsafe extern "C" {
    #[doc = " Get the current linear damping."]
    pub fn b2Body_GetLinearDamping(bodyId: b2BodyId) -> f32;
}
unsafe extern "C" {
    #[doc = " Adjust the angular damping. Normally this is set in b2BodyDef before creation."]
    pub fn b2Body_SetAngularDamping(bodyId: b2BodyId, angularDamping: f32);
}
unsafe extern "C" {
    #[doc = " Get the current angular damping."]
    pub fn b2Body_GetAngularDamping(bodyId: b2BodyId) -> f32;
}
unsafe extern "C" {
    #[doc = " Adjust the gravity scale. Normally this is set in b2BodyDef before creation.\n @see b2BodyDef::gravityScale"]
    pub fn b2Body_SetGravityScale(bodyId: b2BodyId, gravityScale: f32);
}
unsafe extern "C" {
    #[doc = " Get the current gravity scale"]
    pub fn b2Body_GetGravityScale(bodyId: b2BodyId) -> f32;
}
unsafe extern "C" {
    #[doc = " @return true if this body is awake"]
    pub fn b2Body_IsAwake(bodyId: b2BodyId) -> bool;
}
unsafe extern "C" {
    #[doc = " Wake a body from sleep. This wakes the entire island the body is touching.\n @warning Putting a body to sleep will put the entire island of bodies touching this body to sleep,\n which can be expensive and possibly unintuitive."]
    pub fn b2Body_SetAwake(bodyId: b2BodyId, awake: bool);
}
unsafe extern "C" {
    #[doc = " Wake bodies touching this body. Works for static bodies."]
    pub fn b2Body_WakeTouching(bodyId: b2BodyId);
}
unsafe extern "C" {
    #[doc = " Enable or disable sleeping for this body. If sleeping is disabled the body will wake."]
    pub fn b2Body_EnableSleep(bodyId: b2BodyId, enableSleep: bool);
}
unsafe extern "C" {
    #[doc = " Returns true if sleeping is enabled for this body"]
    pub fn b2Body_IsSleepEnabled(bodyId: b2BodyId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the sleep threshold, usually in meters per second"]
    pub fn b2Body_SetSleepThreshold(bodyId: b2BodyId, sleepThreshold: f32);
}
unsafe extern "C" {
    #[doc = " Get the sleep threshold, usually in meters per second."]
    pub fn b2Body_GetSleepThreshold(bodyId: b2BodyId) -> f32;
}
unsafe extern "C" {
    #[doc = " Returns true if this body is enabled"]
    pub fn b2Body_IsEnabled(bodyId: b2BodyId) -> bool;
}
unsafe extern "C" {
    #[doc = " Disable a body by removing it completely from the simulation. This is expensive."]
    pub fn b2Body_Disable(bodyId: b2BodyId);
}
unsafe extern "C" {
    #[doc = " Enable a body by adding it to the simulation. This is expensive."]
    pub fn b2Body_Enable(bodyId: b2BodyId);
}
unsafe extern "C" {
    #[doc = " Set the motion locks on this body."]
    pub fn b2Body_SetMotionLocks(bodyId: b2BodyId, locks: b2MotionLocks);
}
unsafe extern "C" {
    #[doc = " Get the motion locks for this body."]
    pub fn b2Body_GetMotionLocks(bodyId: b2BodyId) -> b2MotionLocks;
}
unsafe extern "C" {
    #[doc = " Set this body to be a bullet. A bullet does continuous collision detection\n against dynamic bodies (but not other bullets)."]
    pub fn b2Body_SetBullet(bodyId: b2BodyId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Is this body a bullet?"]
    pub fn b2Body_IsBullet(bodyId: b2BodyId) -> bool;
}
unsafe extern "C" {
    #[doc = " Enable/disable contact events on all shapes.\n @see b2ShapeDef::enableContactEvents\n @warning changing this at runtime may cause mismatched begin/end touch events"]
    pub fn b2Body_EnableContactEvents(bodyId: b2BodyId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Enable/disable hit events on all shapes\n @see b2ShapeDef::enableHitEvents"]
    pub fn b2Body_EnableHitEvents(bodyId: b2BodyId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Get the world that owns this body"]
    pub fn b2Body_GetWorld(bodyId: b2BodyId) -> b2WorldId;
}
unsafe extern "C" {
    #[doc = " Get the number of shapes on this body"]
    pub fn b2Body_GetShapeCount(bodyId: b2BodyId) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the shape ids for all shapes on this body, up to the provided capacity.\n @returns the number of shape ids stored in the user array"]
    pub fn b2Body_GetShapes(
        bodyId: b2BodyId,
        shapeArray: *mut b2ShapeId,
        capacity: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the number of joints on this body"]
    pub fn b2Body_GetJointCount(bodyId: b2BodyId) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the joint ids for all joints on this body, up to the provided capacity\n @returns the number of joint ids stored in the user array"]
    pub fn b2Body_GetJoints(
        bodyId: b2BodyId,
        jointArray: *mut b2JointId,
        capacity: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the maximum capacity required for retrieving all the touching contacts on a body"]
    pub fn b2Body_GetContactCapacity(bodyId: b2BodyId) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the touching contact data for a body.\n @note Box2D uses speculative collision so some contact points may be separated.\n @returns the number of elements filled in the provided array\n @warning do not ignore the return value, it specifies the valid number of elements"]
    pub fn b2Body_GetContactData(
        bodyId: b2BodyId,
        contactData: *mut b2ContactData,
        capacity: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the current world AABB that contains all the attached shapes. Note that this may not encompass the body origin.\n If there are no shapes attached then the returned AABB is empty and centered on the body origin."]
    pub fn b2Body_ComputeAABB(bodyId: b2BodyId) -> b2AABB;
}
unsafe extern "C" {
    #[doc = " Create a circle shape and attach it to a body. The shape definition and geometry are fully cloned.\n Contacts are not created until the next time step.\n @return the shape id for accessing the shape"]
    pub fn b2CreateCircleShape(
        bodyId: b2BodyId,
        def: *const b2ShapeDef,
        circle: *const b2Circle,
    ) -> b2ShapeId;
}
unsafe extern "C" {
    #[doc = " Create a line segment shape and attach it to a body. The shape definition and geometry are fully cloned.\n Contacts are not created until the next time step.\n @return the shape id for accessing the shape"]
    pub fn b2CreateSegmentShape(
        bodyId: b2BodyId,
        def: *const b2ShapeDef,
        segment: *const b2Segment,
    ) -> b2ShapeId;
}
unsafe extern "C" {
    #[doc = " Create a capsule shape and attach it to a body. The shape definition and geometry are fully cloned.\n Contacts are not created until the next time step.\n @return the shape id for accessing the shape, this will be b2_nullShapeId if the length is too small."]
    pub fn b2CreateCapsuleShape(
        bodyId: b2BodyId,
        def: *const b2ShapeDef,
        capsule: *const b2Capsule,
    ) -> b2ShapeId;
}
unsafe extern "C" {
    #[doc = " Create a polygon shape and attach it to a body. The shape definition and geometry are fully cloned.\n Contacts are not created until the next time step.\n @return the shape id for accessing the shape"]
    pub fn b2CreatePolygonShape(
        bodyId: b2BodyId,
        def: *const b2ShapeDef,
        polygon: *const b2Polygon,
    ) -> b2ShapeId;
}
unsafe extern "C" {
    #[doc = " Destroy a shape. You may defer the body mass update which can improve performance if several shapes on a\n\tbody are destroyed at once.\n\t@see b2Body_ApplyMassFromShapes"]
    pub fn b2DestroyShape(shapeId: b2ShapeId, updateBodyMass: bool);
}
unsafe extern "C" {
    #[doc = " Shape identifier validation. Provides validation for up to 64K allocations."]
    pub fn b2Shape_IsValid(id: b2ShapeId) -> bool;
}
unsafe extern "C" {
    #[doc = " Get the type of a shape"]
    pub fn b2Shape_GetType(shapeId: b2ShapeId) -> b2ShapeType;
}
unsafe extern "C" {
    #[doc = " Get the id of the body that a shape is attached to"]
    pub fn b2Shape_GetBody(shapeId: b2ShapeId) -> b2BodyId;
}
unsafe extern "C" {
    #[doc = " Get the world that owns this shape"]
    pub fn b2Shape_GetWorld(shapeId: b2ShapeId) -> b2WorldId;
}
unsafe extern "C" {
    #[doc = " Returns true if the shape is a sensor. It is not possible to change a shape\n from sensor to solid dynamically because this breaks the contract for\n sensor events."]
    pub fn b2Shape_IsSensor(shapeId: b2ShapeId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the user data for a shape"]
    pub fn b2Shape_SetUserData(shapeId: b2ShapeId, userData: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
    #[doc = " Get the user data for a shape. This is useful when you get a shape id\n from an event or query."]
    pub fn b2Shape_GetUserData(shapeId: b2ShapeId) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    #[doc = " Set the mass density of a shape, usually in kg/m^2.\n This will optionally update the mass properties on the parent body.\n @see b2ShapeDef::density, b2Body_ApplyMassFromShapes"]
    pub fn b2Shape_SetDensity(shapeId: b2ShapeId, density: f32, updateBodyMass: bool);
}
unsafe extern "C" {
    #[doc = " Get the density of a shape, usually in kg/m^2"]
    pub fn b2Shape_GetDensity(shapeId: b2ShapeId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the friction on a shape"]
    pub fn b2Shape_SetFriction(shapeId: b2ShapeId, friction: f32);
}
unsafe extern "C" {
    #[doc = " Get the friction of a shape"]
    pub fn b2Shape_GetFriction(shapeId: b2ShapeId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the shape restitution (bounciness)"]
    pub fn b2Shape_SetRestitution(shapeId: b2ShapeId, restitution: f32);
}
unsafe extern "C" {
    #[doc = " Get the shape restitution"]
    pub fn b2Shape_GetRestitution(shapeId: b2ShapeId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the user material identifier"]
    pub fn b2Shape_SetUserMaterial(shapeId: b2ShapeId, material: u64);
}
unsafe extern "C" {
    #[doc = " Get the user material identifier"]
    pub fn b2Shape_GetUserMaterial(shapeId: b2ShapeId) -> u64;
}
unsafe extern "C" {
    #[doc = " Set the shape surface material"]
    pub fn b2Shape_SetSurfaceMaterial(
        shapeId: b2ShapeId,
        surfaceMaterial: *const b2SurfaceMaterial,
    );
}
unsafe extern "C" {
    #[doc = " Get the shape surface material"]
    pub fn b2Shape_GetSurfaceMaterial(shapeId: b2ShapeId) -> b2SurfaceMaterial;
}
unsafe extern "C" {
    #[doc = " Get the shape filter"]
    pub fn b2Shape_GetFilter(shapeId: b2ShapeId) -> b2Filter;
}
unsafe extern "C" {
    #[doc = " Set the current filter. This is almost as expensive as recreating the shape. This may cause\n contacts to be immediately destroyed. However contacts are not created until the next world step.\n Sensor overlap state is also not updated until the next world step.\n @see b2ShapeDef::filter"]
    pub fn b2Shape_SetFilter(shapeId: b2ShapeId, filter: b2Filter);
}
unsafe extern "C" {
    #[doc = " Enable sensor events for this shape.\n @see b2ShapeDef::enableSensorEvents"]
    pub fn b2Shape_EnableSensorEvents(shapeId: b2ShapeId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Returns true if sensor events are enabled."]
    pub fn b2Shape_AreSensorEventsEnabled(shapeId: b2ShapeId) -> bool;
}
unsafe extern "C" {
    #[doc = " Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors.\n @see b2ShapeDef::enableContactEvents\n @warning changing this at run-time may lead to lost begin/end events"]
    pub fn b2Shape_EnableContactEvents(shapeId: b2ShapeId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Returns true if contact events are enabled"]
    pub fn b2Shape_AreContactEventsEnabled(shapeId: b2ShapeId) -> bool;
}
unsafe extern "C" {
    #[doc = " Enable pre-solve contact events for this shape. Only applies to dynamic bodies. These are expensive\n and must be carefully handled due to multithreading. Ignored for sensors.\n @see b2PreSolveFcn"]
    pub fn b2Shape_EnablePreSolveEvents(shapeId: b2ShapeId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Returns true if pre-solve events are enabled"]
    pub fn b2Shape_ArePreSolveEventsEnabled(shapeId: b2ShapeId) -> bool;
}
unsafe extern "C" {
    #[doc = " Enable contact hit events for this shape. Ignored for sensors.\n @see b2WorldDef.hitEventThreshold"]
    pub fn b2Shape_EnableHitEvents(shapeId: b2ShapeId, flag: bool);
}
unsafe extern "C" {
    #[doc = " Returns true if hit events are enabled"]
    pub fn b2Shape_AreHitEventsEnabled(shapeId: b2ShapeId) -> bool;
}
unsafe extern "C" {
    #[doc = " Test a point for overlap with a shape"]
    pub fn b2Shape_TestPoint(shapeId: b2ShapeId, point: b2Vec2) -> bool;
}
unsafe extern "C" {
    #[doc = " Ray cast a shape directly"]
    pub fn b2Shape_RayCast(shapeId: b2ShapeId, input: *const b2RayCastInput) -> b2CastOutput;
}
unsafe extern "C" {
    #[doc = " Get a copy of the shape's circle. Asserts the type is correct."]
    pub fn b2Shape_GetCircle(shapeId: b2ShapeId) -> b2Circle;
}
unsafe extern "C" {
    #[doc = " Get a copy of the shape's line segment. Asserts the type is correct."]
    pub fn b2Shape_GetSegment(shapeId: b2ShapeId) -> b2Segment;
}
unsafe extern "C" {
    #[doc = " Get a copy of the shape's chain segment. These come from chain shapes.\n Asserts the type is correct."]
    pub fn b2Shape_GetChainSegment(shapeId: b2ShapeId) -> b2ChainSegment;
}
unsafe extern "C" {
    #[doc = " Get a copy of the shape's capsule. Asserts the type is correct."]
    pub fn b2Shape_GetCapsule(shapeId: b2ShapeId) -> b2Capsule;
}
unsafe extern "C" {
    #[doc = " Get a copy of the shape's convex polygon. Asserts the type is correct."]
    pub fn b2Shape_GetPolygon(shapeId: b2ShapeId) -> b2Polygon;
}
unsafe extern "C" {
    #[doc = " Allows you to change a shape to be a circle or update the current circle.\n This does not modify the mass properties.\n @see b2Body_ApplyMassFromShapes"]
    pub fn b2Shape_SetCircle(shapeId: b2ShapeId, circle: *const b2Circle);
}
unsafe extern "C" {
    #[doc = " Allows you to change a shape to be a capsule or update the current capsule.\n This does not modify the mass properties.\n @see b2Body_ApplyMassFromShapes"]
    pub fn b2Shape_SetCapsule(shapeId: b2ShapeId, capsule: *const b2Capsule);
}
unsafe extern "C" {
    #[doc = " Allows you to change a shape to be a segment or update the current segment."]
    pub fn b2Shape_SetSegment(shapeId: b2ShapeId, segment: *const b2Segment);
}
unsafe extern "C" {
    #[doc = " Allows you to change a shape to be a polygon or update the current polygon.\n This does not modify the mass properties.\n @see b2Body_ApplyMassFromShapes"]
    pub fn b2Shape_SetPolygon(shapeId: b2ShapeId, polygon: *const b2Polygon);
}
unsafe extern "C" {
    #[doc = " Get the parent chain id if the shape type is a chain segment, otherwise\n returns b2_nullChainId."]
    pub fn b2Shape_GetParentChain(shapeId: b2ShapeId) -> b2ChainId;
}
unsafe extern "C" {
    #[doc = " Get the maximum capacity required for retrieving all the touching contacts on a shape"]
    pub fn b2Shape_GetContactCapacity(shapeId: b2ShapeId) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the touching contact data for a shape. The provided shapeId will be either shapeIdA or shapeIdB on the contact data.\n @note Box2D uses speculative collision so some contact points may be separated.\n @returns the number of elements filled in the provided array\n @warning do not ignore the return value, it specifies the valid number of elements"]
    pub fn b2Shape_GetContactData(
        shapeId: b2ShapeId,
        contactData: *mut b2ContactData,
        capacity: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the maximum capacity required for retrieving all the overlapped shapes on a sensor shape.\n This returns 0 if the provided shape is not a sensor.\n @param shapeId the id of a sensor shape\n @returns the required capacity to get all the overlaps in b2Shape_GetSensorOverlaps"]
    pub fn b2Shape_GetSensorCapacity(shapeId: b2ShapeId) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the overlap data for a sensor shape.\n @param shapeId the id of a sensor shape\n @param visitorIds a user allocated array that is filled with the overlapping shapes (visitors)\n @param capacity the capacity of overlappedShapes\n @returns the number of elements filled in the provided array\n @warning do not ignore the return value, it specifies the valid number of elements\n @warning overlaps may contain destroyed shapes so use b2Shape_IsValid to confirm each overlap"]
    pub fn b2Shape_GetSensorData(
        shapeId: b2ShapeId,
        visitorIds: *mut b2ShapeId,
        capacity: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the current world AABB"]
    pub fn b2Shape_GetAABB(shapeId: b2ShapeId) -> b2AABB;
}
unsafe extern "C" {
    #[doc = " Compute the mass data for a shape"]
    pub fn b2Shape_ComputeMassData(shapeId: b2ShapeId) -> b2MassData;
}
unsafe extern "C" {
    #[doc = " Get the closest point on a shape to a target point. Target and result are in world space.\n todo need sample"]
    pub fn b2Shape_GetClosestPoint(shapeId: b2ShapeId, target: b2Vec2) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Apply a wind force to the body for this shape using the density of air. This considers\n the projected area of the shape in the wind direction. This also considers\n the relative velocity of the shape.\n @param shapeId the shape id\n @param wind the wind velocity in world space\n @param drag the drag coefficient, the force that opposes the relative velocity\n @param lift the lift coefficient, the force that is perpendicular to the relative velocity\n @param wake should this wake the body"]
    pub fn b2Shape_ApplyWind(shapeId: b2ShapeId, wind: b2Vec2, drag: f32, lift: f32, wake: bool);
}
unsafe extern "C" {
    #[doc = " Create a chain shape\n @see b2ChainDef for details"]
    pub fn b2CreateChain(bodyId: b2BodyId, def: *const b2ChainDef) -> b2ChainId;
}
unsafe extern "C" {
    #[doc = " Destroy a chain shape"]
    pub fn b2DestroyChain(chainId: b2ChainId);
}
unsafe extern "C" {
    #[doc = " Get the world that owns this chain shape"]
    pub fn b2Chain_GetWorld(chainId: b2ChainId) -> b2WorldId;
}
unsafe extern "C" {
    #[doc = " Get the number of segments on this chain"]
    pub fn b2Chain_GetSegmentCount(chainId: b2ChainId) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Fill a user array with chain segment shape ids up to the specified capacity. Returns\n the actual number of segments returned."]
    pub fn b2Chain_GetSegments(
        chainId: b2ChainId,
        segmentArray: *mut b2ShapeId,
        capacity: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the number of materials used on this chain. Must be 1 or the number of segments."]
    pub fn b2Chain_GetSurfaceMaterialCount(chainId: b2ChainId) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Set a chain material. If the chain has only one material, this material is applied to all\n segments. Otherwise it is applied to a single segment."]
    pub fn b2Chain_SetSurfaceMaterial(
        chainId: b2ChainId,
        material: *const b2SurfaceMaterial,
        materialIndex: ::std::os::raw::c_int,
    );
}
unsafe extern "C" {
    #[doc = " Get a chain material by index."]
    pub fn b2Chain_GetSurfaceMaterial(
        chainId: b2ChainId,
        materialIndex: ::std::os::raw::c_int,
    ) -> b2SurfaceMaterial;
}
unsafe extern "C" {
}
unsafe extern "C" {
    #[doc = " Chain identifier validation. Provides validation for up to 64K allocations."]
    pub fn b2Chain_IsValid(id: b2ChainId) -> bool;
}
unsafe extern "C" {
    #[doc = " Destroy a joint. Optionally wake attached bodies."]
    pub fn b2DestroyJoint(jointId: b2JointId, wakeAttached: bool);
}
unsafe extern "C" {
    #[doc = " Joint identifier validation. Provides validation for up to 64K allocations."]
    pub fn b2Joint_IsValid(id: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Get the joint type"]
    pub fn b2Joint_GetType(jointId: b2JointId) -> b2JointType;
}
unsafe extern "C" {
    #[doc = " Get body A id on a joint"]
    pub fn b2Joint_GetBodyA(jointId: b2JointId) -> b2BodyId;
}
unsafe extern "C" {
    #[doc = " Get body B id on a joint"]
    pub fn b2Joint_GetBodyB(jointId: b2JointId) -> b2BodyId;
}
unsafe extern "C" {
    #[doc = " Get the world that owns this joint"]
    pub fn b2Joint_GetWorld(jointId: b2JointId) -> b2WorldId;
}
unsafe extern "C" {
    #[doc = " Set the local frame on bodyA"]
    pub fn b2Joint_SetLocalFrameA(jointId: b2JointId, localFrame: b2Transform);
}
unsafe extern "C" {
    #[doc = " Get the local frame on bodyA"]
    pub fn b2Joint_GetLocalFrameA(jointId: b2JointId) -> b2Transform;
}
unsafe extern "C" {
    #[doc = " Set the local frame on bodyB"]
    pub fn b2Joint_SetLocalFrameB(jointId: b2JointId, localFrame: b2Transform);
}
unsafe extern "C" {
    #[doc = " Get the local frame on bodyB"]
    pub fn b2Joint_GetLocalFrameB(jointId: b2JointId) -> b2Transform;
}
unsafe extern "C" {
    #[doc = " Toggle collision between connected bodies"]
    pub fn b2Joint_SetCollideConnected(jointId: b2JointId, shouldCollide: bool);
}
unsafe extern "C" {
    #[doc = " Is collision allowed between connected bodies?"]
    pub fn b2Joint_GetCollideConnected(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the user data on a joint"]
    pub fn b2Joint_SetUserData(jointId: b2JointId, userData: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
    #[doc = " Get the user data on a joint"]
    pub fn b2Joint_GetUserData(jointId: b2JointId) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    #[doc = " Wake the bodies connect to this joint"]
    pub fn b2Joint_WakeBodies(jointId: b2JointId);
}
unsafe extern "C" {
    #[doc = " Get the current constraint force for this joint. Usually in Newtons."]
    pub fn b2Joint_GetConstraintForce(jointId: b2JointId) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Get the current constraint torque for this joint. Usually in Newton * meters."]
    pub fn b2Joint_GetConstraintTorque(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the current linear separation error for this joint. Does not consider admissible movement. Usually in meters."]
    pub fn b2Joint_GetLinearSeparation(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the current angular separation error for this joint. Does not consider admissible movement. Usually in meters."]
    pub fn b2Joint_GetAngularSeparation(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the joint constraint tuning. Advanced feature.\n @param jointId the joint\n @param hertz the stiffness in Hertz (cycles per second)\n @param dampingRatio the non-dimensional damping ratio (one for critical damping)"]
    pub fn b2Joint_SetConstraintTuning(jointId: b2JointId, hertz: f32, dampingRatio: f32);
}
unsafe extern "C" {
    #[doc = " Get the joint constraint tuning. Advanced feature."]
    pub fn b2Joint_GetConstraintTuning(jointId: b2JointId, hertz: *mut f32, dampingRatio: *mut f32);
}
unsafe extern "C" {
    #[doc = " Set the force threshold for joint events (Newtons)"]
    pub fn b2Joint_SetForceThreshold(jointId: b2JointId, threshold: f32);
}
unsafe extern "C" {
    #[doc = " Get the force threshold for joint events (Newtons)"]
    pub fn b2Joint_GetForceThreshold(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the torque threshold for joint events (N-m)"]
    pub fn b2Joint_SetTorqueThreshold(jointId: b2JointId, threshold: f32);
}
unsafe extern "C" {
    #[doc = " Get the torque threshold for joint events (N-m)"]
    pub fn b2Joint_GetTorqueThreshold(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Create a distance joint\n @see b2DistanceJointDef for details"]
    pub fn b2CreateDistanceJoint(worldId: b2WorldId, def: *const b2DistanceJointDef) -> b2JointId;
}
unsafe extern "C" {
    #[doc = " Set the rest length of a distance joint\n @param jointId The id for a distance joint\n @param length The new distance joint length"]
    pub fn b2DistanceJoint_SetLength(jointId: b2JointId, length: f32);
}
unsafe extern "C" {
    #[doc = " Get the rest length of a distance joint"]
    pub fn b2DistanceJoint_GetLength(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Enable/disable the distance joint spring. When disabled the distance joint is rigid."]
    pub fn b2DistanceJoint_EnableSpring(jointId: b2JointId, enableSpring: bool);
}
unsafe extern "C" {
    #[doc = " Is the distance joint spring enabled?"]
    pub fn b2DistanceJoint_IsSpringEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the force range for the spring."]
    pub fn b2DistanceJoint_SetSpringForceRange(
        jointId: b2JointId,
        lowerForce: f32,
        upperForce: f32,
    );
}
unsafe extern "C" {
    #[doc = " Get the force range for the spring."]
    pub fn b2DistanceJoint_GetSpringForceRange(
        jointId: b2JointId,
        lowerForce: *mut f32,
        upperForce: *mut f32,
    );
}
unsafe extern "C" {
    #[doc = " Set the spring stiffness in Hertz"]
    pub fn b2DistanceJoint_SetSpringHertz(jointId: b2JointId, hertz: f32);
}
unsafe extern "C" {
    #[doc = " Set the spring damping ratio, non-dimensional"]
    pub fn b2DistanceJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: f32);
}
unsafe extern "C" {
    #[doc = " Get the spring Hertz"]
    pub fn b2DistanceJoint_GetSpringHertz(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the spring damping ratio"]
    pub fn b2DistanceJoint_GetSpringDampingRatio(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Enable joint limit. The limit only works if the joint spring is enabled. Otherwise the joint is rigid\n and the limit has no effect."]
    pub fn b2DistanceJoint_EnableLimit(jointId: b2JointId, enableLimit: bool);
}
unsafe extern "C" {
    #[doc = " Is the distance joint limit enabled?"]
    pub fn b2DistanceJoint_IsLimitEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the minimum and maximum length parameters of a distance joint"]
    pub fn b2DistanceJoint_SetLengthRange(jointId: b2JointId, minLength: f32, maxLength: f32);
}
unsafe extern "C" {
    #[doc = " Get the distance joint minimum length"]
    pub fn b2DistanceJoint_GetMinLength(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the distance joint maximum length"]
    pub fn b2DistanceJoint_GetMaxLength(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the current length of a distance joint"]
    pub fn b2DistanceJoint_GetCurrentLength(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Enable/disable the distance joint motor"]
    pub fn b2DistanceJoint_EnableMotor(jointId: b2JointId, enableMotor: bool);
}
unsafe extern "C" {
    #[doc = " Is the distance joint motor enabled?"]
    pub fn b2DistanceJoint_IsMotorEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the distance joint motor speed, usually in meters per second"]
    pub fn b2DistanceJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: f32);
}
unsafe extern "C" {
    #[doc = " Get the distance joint motor speed, usually in meters per second"]
    pub fn b2DistanceJoint_GetMotorSpeed(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the distance joint maximum motor force, usually in newtons"]
    pub fn b2DistanceJoint_SetMaxMotorForce(jointId: b2JointId, force: f32);
}
unsafe extern "C" {
    #[doc = " Get the distance joint maximum motor force, usually in newtons"]
    pub fn b2DistanceJoint_GetMaxMotorForce(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the distance joint current motor force, usually in newtons"]
    pub fn b2DistanceJoint_GetMotorForce(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Create a motor joint\n @see b2MotorJointDef for details"]
    pub fn b2CreateMotorJoint(worldId: b2WorldId, def: *const b2MotorJointDef) -> b2JointId;
}
unsafe extern "C" {
    #[doc = " Set the desired relative linear velocity in meters per second"]
    pub fn b2MotorJoint_SetLinearVelocity(jointId: b2JointId, velocity: b2Vec2);
}
unsafe extern "C" {
    #[doc = " Get the desired relative linear velocity in meters per second"]
    pub fn b2MotorJoint_GetLinearVelocity(jointId: b2JointId) -> b2Vec2;
}
unsafe extern "C" {
    #[doc = " Set the desired relative angular velocity in radians per second"]
    pub fn b2MotorJoint_SetAngularVelocity(jointId: b2JointId, velocity: f32);
}
unsafe extern "C" {
    #[doc = " Get the desired relative angular velocity in radians per second"]
    pub fn b2MotorJoint_GetAngularVelocity(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the motor joint maximum force, usually in newtons"]
    pub fn b2MotorJoint_SetMaxVelocityForce(jointId: b2JointId, maxForce: f32);
}
unsafe extern "C" {
    #[doc = " Get the motor joint maximum force, usually in newtons"]
    pub fn b2MotorJoint_GetMaxVelocityForce(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the motor joint maximum torque, usually in newton-meters"]
    pub fn b2MotorJoint_SetMaxVelocityTorque(jointId: b2JointId, maxTorque: f32);
}
unsafe extern "C" {
    #[doc = " Get the motor joint maximum torque, usually in newton-meters"]
    pub fn b2MotorJoint_GetMaxVelocityTorque(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the spring linear hertz stiffness"]
    pub fn b2MotorJoint_SetLinearHertz(jointId: b2JointId, hertz: f32);
}
unsafe extern "C" {
    #[doc = " Get the spring linear hertz stiffness"]
    pub fn b2MotorJoint_GetLinearHertz(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the spring linear damping ratio. Use 1.0 for critical damping."]
    pub fn b2MotorJoint_SetLinearDampingRatio(jointId: b2JointId, damping: f32);
}
unsafe extern "C" {
    #[doc = " Get the spring linear damping ratio."]
    pub fn b2MotorJoint_GetLinearDampingRatio(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the spring angular hertz stiffness"]
    pub fn b2MotorJoint_SetAngularHertz(jointId: b2JointId, hertz: f32);
}
unsafe extern "C" {
    #[doc = " Get the spring angular hertz stiffness"]
    pub fn b2MotorJoint_GetAngularHertz(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the spring angular damping ratio. Use 1.0 for critical damping."]
    pub fn b2MotorJoint_SetAngularDampingRatio(jointId: b2JointId, damping: f32);
}
unsafe extern "C" {
    #[doc = " Get the spring angular damping ratio."]
    pub fn b2MotorJoint_GetAngularDampingRatio(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the maximum spring force in newtons."]
    pub fn b2MotorJoint_SetMaxSpringForce(jointId: b2JointId, maxForce: f32);
}
unsafe extern "C" {
    #[doc = " Get the maximum spring force in newtons."]
    pub fn b2MotorJoint_GetMaxSpringForce(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the maximum spring torque in newtons * meters"]
    pub fn b2MotorJoint_SetMaxSpringTorque(jointId: b2JointId, maxTorque: f32);
}
unsafe extern "C" {
    #[doc = " Get the maximum spring torque in newtons * meters"]
    pub fn b2MotorJoint_GetMaxSpringTorque(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Create a filter joint.\n @see b2FilterJointDef for details"]
    pub fn b2CreateFilterJoint(worldId: b2WorldId, def: *const b2FilterJointDef) -> b2JointId;
}
unsafe extern "C" {
    #[doc = " Create a prismatic (slider) joint.\n @see b2PrismaticJointDef for details"]
    pub fn b2CreatePrismaticJoint(worldId: b2WorldId, def: *const b2PrismaticJointDef)
    -> b2JointId;
}
unsafe extern "C" {
    #[doc = " Enable/disable the joint spring."]
    pub fn b2PrismaticJoint_EnableSpring(jointId: b2JointId, enableSpring: bool);
}
unsafe extern "C" {
    #[doc = " Is the prismatic joint spring enabled or not?"]
    pub fn b2PrismaticJoint_IsSpringEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the prismatic joint stiffness in Hertz.\n This should usually be less than a quarter of the simulation rate. For example, if the simulation\n runs at 60Hz then the joint stiffness should be 15Hz or less."]
    pub fn b2PrismaticJoint_SetSpringHertz(jointId: b2JointId, hertz: f32);
}
unsafe extern "C" {
    #[doc = " Get the prismatic joint stiffness in Hertz"]
    pub fn b2PrismaticJoint_GetSpringHertz(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the prismatic joint damping ratio (non-dimensional)"]
    pub fn b2PrismaticJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: f32);
}
unsafe extern "C" {
    #[doc = " Get the prismatic spring damping ratio (non-dimensional)"]
    pub fn b2PrismaticJoint_GetSpringDampingRatio(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the prismatic joint spring target angle, usually in meters"]
    pub fn b2PrismaticJoint_SetTargetTranslation(jointId: b2JointId, translation: f32);
}
unsafe extern "C" {
    #[doc = " Get the prismatic joint spring target translation, usually in meters"]
    pub fn b2PrismaticJoint_GetTargetTranslation(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Enable/disable a prismatic joint limit"]
    pub fn b2PrismaticJoint_EnableLimit(jointId: b2JointId, enableLimit: bool);
}
unsafe extern "C" {
    #[doc = " Is the prismatic joint limit enabled?"]
    pub fn b2PrismaticJoint_IsLimitEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Get the prismatic joint lower limit"]
    pub fn b2PrismaticJoint_GetLowerLimit(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the prismatic joint upper limit"]
    pub fn b2PrismaticJoint_GetUpperLimit(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the prismatic joint limits"]
    pub fn b2PrismaticJoint_SetLimits(jointId: b2JointId, lower: f32, upper: f32);
}
unsafe extern "C" {
    #[doc = " Enable/disable a prismatic joint motor"]
    pub fn b2PrismaticJoint_EnableMotor(jointId: b2JointId, enableMotor: bool);
}
unsafe extern "C" {
    #[doc = " Is the prismatic joint motor enabled?"]
    pub fn b2PrismaticJoint_IsMotorEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the prismatic joint motor speed, usually in meters per second"]
    pub fn b2PrismaticJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: f32);
}
unsafe extern "C" {
    #[doc = " Get the prismatic joint motor speed, usually in meters per second"]
    pub fn b2PrismaticJoint_GetMotorSpeed(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the prismatic joint maximum motor force, usually in newtons"]
    pub fn b2PrismaticJoint_SetMaxMotorForce(jointId: b2JointId, force: f32);
}
unsafe extern "C" {
    #[doc = " Get the prismatic joint maximum motor force, usually in newtons"]
    pub fn b2PrismaticJoint_GetMaxMotorForce(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the prismatic joint current motor force, usually in newtons"]
    pub fn b2PrismaticJoint_GetMotorForce(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the current joint translation, usually in meters."]
    pub fn b2PrismaticJoint_GetTranslation(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the current joint translation speed, usually in meters per second."]
    pub fn b2PrismaticJoint_GetSpeed(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Create a revolute joint\n @see b2RevoluteJointDef for details"]
    pub fn b2CreateRevoluteJoint(worldId: b2WorldId, def: *const b2RevoluteJointDef) -> b2JointId;
}
unsafe extern "C" {
    #[doc = " Enable/disable the revolute joint spring"]
    pub fn b2RevoluteJoint_EnableSpring(jointId: b2JointId, enableSpring: bool);
}
unsafe extern "C" {
    #[doc = " It the revolute angular spring enabled?"]
    pub fn b2RevoluteJoint_IsSpringEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the revolute joint spring stiffness in Hertz"]
    pub fn b2RevoluteJoint_SetSpringHertz(jointId: b2JointId, hertz: f32);
}
unsafe extern "C" {
    #[doc = " Get the revolute joint spring stiffness in Hertz"]
    pub fn b2RevoluteJoint_GetSpringHertz(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the revolute joint spring damping ratio, non-dimensional"]
    pub fn b2RevoluteJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: f32);
}
unsafe extern "C" {
    #[doc = " Get the revolute joint spring damping ratio, non-dimensional"]
    pub fn b2RevoluteJoint_GetSpringDampingRatio(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the revolute joint spring target angle, radians"]
    pub fn b2RevoluteJoint_SetTargetAngle(jointId: b2JointId, angle: f32);
}
unsafe extern "C" {
    #[doc = " Get the revolute joint spring target angle, radians"]
    pub fn b2RevoluteJoint_GetTargetAngle(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the revolute joint current angle in radians relative to the reference angle\n @see b2RevoluteJointDef::referenceAngle"]
    pub fn b2RevoluteJoint_GetAngle(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Enable/disable the revolute joint limit"]
    pub fn b2RevoluteJoint_EnableLimit(jointId: b2JointId, enableLimit: bool);
}
unsafe extern "C" {
    #[doc = " Is the revolute joint limit enabled?"]
    pub fn b2RevoluteJoint_IsLimitEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Get the revolute joint lower limit in radians"]
    pub fn b2RevoluteJoint_GetLowerLimit(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the revolute joint upper limit in radians"]
    pub fn b2RevoluteJoint_GetUpperLimit(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the revolute joint limits in radians. It is expected that lower <= upper\n and that -0.99 * B2_PI <= lower && upper <= -0.99 * B2_PI."]
    pub fn b2RevoluteJoint_SetLimits(jointId: b2JointId, lower: f32, upper: f32);
}
unsafe extern "C" {
    #[doc = " Enable/disable a revolute joint motor"]
    pub fn b2RevoluteJoint_EnableMotor(jointId: b2JointId, enableMotor: bool);
}
unsafe extern "C" {
    #[doc = " Is the revolute joint motor enabled?"]
    pub fn b2RevoluteJoint_IsMotorEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the revolute joint motor speed in radians per second"]
    pub fn b2RevoluteJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: f32);
}
unsafe extern "C" {
    #[doc = " Get the revolute joint motor speed in radians per second"]
    pub fn b2RevoluteJoint_GetMotorSpeed(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the revolute joint current motor torque, usually in newton-meters"]
    pub fn b2RevoluteJoint_GetMotorTorque(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the revolute joint maximum motor torque, usually in newton-meters"]
    pub fn b2RevoluteJoint_SetMaxMotorTorque(jointId: b2JointId, torque: f32);
}
unsafe extern "C" {
    #[doc = " Get the revolute joint maximum motor torque, usually in newton-meters"]
    pub fn b2RevoluteJoint_GetMaxMotorTorque(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Create a weld joint\n @see b2WeldJointDef for details"]
    pub fn b2CreateWeldJoint(worldId: b2WorldId, def: *const b2WeldJointDef) -> b2JointId;
}
unsafe extern "C" {
    #[doc = " Set the weld joint linear stiffness in Hertz. 0 is rigid."]
    pub fn b2WeldJoint_SetLinearHertz(jointId: b2JointId, hertz: f32);
}
unsafe extern "C" {
    #[doc = " Get the weld joint linear stiffness in Hertz"]
    pub fn b2WeldJoint_GetLinearHertz(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the weld joint linear damping ratio (non-dimensional)"]
    pub fn b2WeldJoint_SetLinearDampingRatio(jointId: b2JointId, dampingRatio: f32);
}
unsafe extern "C" {
    #[doc = " Get the weld joint linear damping ratio (non-dimensional)"]
    pub fn b2WeldJoint_GetLinearDampingRatio(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the weld joint angular stiffness in Hertz. 0 is rigid."]
    pub fn b2WeldJoint_SetAngularHertz(jointId: b2JointId, hertz: f32);
}
unsafe extern "C" {
    #[doc = " Get the weld joint angular stiffness in Hertz"]
    pub fn b2WeldJoint_GetAngularHertz(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set weld joint angular damping ratio, non-dimensional"]
    pub fn b2WeldJoint_SetAngularDampingRatio(jointId: b2JointId, dampingRatio: f32);
}
unsafe extern "C" {
    #[doc = " Get the weld joint angular damping ratio, non-dimensional"]
    pub fn b2WeldJoint_GetAngularDampingRatio(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Create a wheel joint\n @see b2WheelJointDef for details"]
    pub fn b2CreateWheelJoint(worldId: b2WorldId, def: *const b2WheelJointDef) -> b2JointId;
}
unsafe extern "C" {
    #[doc = " Enable/disable the wheel joint spring"]
    pub fn b2WheelJoint_EnableSpring(jointId: b2JointId, enableSpring: bool);
}
unsafe extern "C" {
    #[doc = " Is the wheel joint spring enabled?"]
    pub fn b2WheelJoint_IsSpringEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the wheel joint stiffness in Hertz"]
    pub fn b2WheelJoint_SetSpringHertz(jointId: b2JointId, hertz: f32);
}
unsafe extern "C" {
    #[doc = " Get the wheel joint stiffness in Hertz"]
    pub fn b2WheelJoint_GetSpringHertz(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the wheel joint damping ratio, non-dimensional"]
    pub fn b2WheelJoint_SetSpringDampingRatio(jointId: b2JointId, dampingRatio: f32);
}
unsafe extern "C" {
    #[doc = " Get the wheel joint damping ratio, non-dimensional"]
    pub fn b2WheelJoint_GetSpringDampingRatio(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Enable/disable the wheel joint limit"]
    pub fn b2WheelJoint_EnableLimit(jointId: b2JointId, enableLimit: bool);
}
unsafe extern "C" {
    #[doc = " Is the wheel joint limit enabled?"]
    pub fn b2WheelJoint_IsLimitEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Get the wheel joint lower limit"]
    pub fn b2WheelJoint_GetLowerLimit(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the wheel joint upper limit"]
    pub fn b2WheelJoint_GetUpperLimit(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the wheel joint limits"]
    pub fn b2WheelJoint_SetLimits(jointId: b2JointId, lower: f32, upper: f32);
}
unsafe extern "C" {
    #[doc = " Enable/disable the wheel joint motor"]
    pub fn b2WheelJoint_EnableMotor(jointId: b2JointId, enableMotor: bool);
}
unsafe extern "C" {
    #[doc = " Is the wheel joint motor enabled?"]
    pub fn b2WheelJoint_IsMotorEnabled(jointId: b2JointId) -> bool;
}
unsafe extern "C" {
    #[doc = " Set the wheel joint motor speed in radians per second"]
    pub fn b2WheelJoint_SetMotorSpeed(jointId: b2JointId, motorSpeed: f32);
}
unsafe extern "C" {
    #[doc = " Get the wheel joint motor speed in radians per second"]
    pub fn b2WheelJoint_GetMotorSpeed(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Set the wheel joint maximum motor torque, usually in newton-meters"]
    pub fn b2WheelJoint_SetMaxMotorTorque(jointId: b2JointId, torque: f32);
}
unsafe extern "C" {
    #[doc = " Get the wheel joint maximum motor torque, usually in newton-meters"]
    pub fn b2WheelJoint_GetMaxMotorTorque(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Get the wheel joint current motor torque, usually in newton-meters"]
    pub fn b2WheelJoint_GetMotorTorque(jointId: b2JointId) -> f32;
}
unsafe extern "C" {
    #[doc = " Contact identifier validation. Provides validation for up to 2^32 allocations."]
    pub fn b2Contact_IsValid(id: b2ContactId) -> bool;
}
unsafe extern "C" {
    #[doc = " Get the data for a contact. The manifold may have no points if the contact is not touching."]
    pub fn b2Contact_GetData(contactId: b2ContactId) -> b2ContactData;
}
#[doc = " The tree nodes"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct b2TreeNode {
    pub _address: u8,
}