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
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
/// enum for empty constructor tag
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxEMPTY {
    PxEmpty = 0,
}

/// enum for zero constructor tag for vectors and matrices
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxZERO {
    PxZero = 0,
}

/// enum for identity constructor flag for quaternions, transforms, and matrices
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxIDENTITY {
    PxIdentity = 0,
}

/// Error codes
///
/// These error codes are passed to [`PxErrorCallback`]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxErrorCode {
    NoError = 0,
    /// An informational message.
    DebugInfo = 1,
    /// a warning message for the user to help with debugging
    DebugWarning = 2,
    /// method called with invalid parameter(s)
    InvalidParameter = 4,
    /// method was called at a time when an operation is not possible
    InvalidOperation = 8,
    /// method failed to allocate some memory
    OutOfMemory = 16,
    /// The library failed for some reason.
    /// Possibly you have passed invalid values like NaNs, which are not checked for.
    InternalError = 32,
    /// An unrecoverable error, execution should be halted and log output flushed
    Abort = 64,
    /// The SDK has determined that an operation may result in poor performance.
    PerfWarning = 128,
    /// A bit mask for including all errors
    MaskAll = -1,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u32)]
pub enum PxThreadPriority {
    /// High priority
    High = 0,
    /// Above Normal priority
    AboveNormal = 1,
    /// Normal/default priority
    Normal = 2,
    /// Below Normal priority
    BelowNormal = 3,
    /// Low priority.
    Low = 4,
    ForceDword = 4294967295,
}

/// Default color values used for debug rendering.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u32)]
pub enum PxDebugColor {
    ArgbBlack = 4278190080,
    ArgbRed = 4294901760,
    ArgbGreen = 4278255360,
    ArgbBlue = 4278190335,
    ArgbYellow = 4294967040,
    ArgbMagenta = 4294902015,
    ArgbCyan = 4278255615,
    ArgbWhite = 4294967295,
    ArgbGrey = 4286611584,
    ArgbDarkred = 4287102976,
    ArgbDarkgreen = 4278224896,
    ArgbDarkblue = 4278190216,
}

/// an enumeration of concrete classes inheriting from PxBase
///
/// Enumeration space is reserved for future PhysX core types, PhysXExtensions,
/// PhysXVehicle and Custom application types.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxConcreteType {
    Undefined = 0,
    Heightfield = 1,
    ConvexMesh = 2,
    TriangleMeshBvh33 = 3,
    TriangleMeshBvh34 = 4,
    TetrahedronMesh = 5,
    SoftbodyMesh = 6,
    RigidDynamic = 7,
    RigidStatic = 8,
    Shape = 9,
    Material = 10,
    SoftbodyMaterial = 11,
    ClothMaterial = 12,
    PbdMaterial = 13,
    FlipMaterial = 14,
    MpmMaterial = 15,
    CustomMaterial = 16,
    Constraint = 17,
    Aggregate = 18,
    ArticulationReducedCoordinate = 19,
    ArticulationLink = 20,
    ArticulationJointReducedCoordinate = 21,
    ArticulationSensor = 22,
    ArticulationSpatialTendon = 23,
    ArticulationFixedTendon = 24,
    ArticulationAttachment = 25,
    ArticulationTendonJoint = 26,
    PruningStructure = 27,
    Bvh = 28,
    SoftBody = 29,
    SoftBodyState = 30,
    PbdParticlesystem = 31,
    FlipParticlesystem = 32,
    MpmParticlesystem = 33,
    CustomParticlesystem = 34,
    FemCloth = 35,
    HairSystem = 36,
    ParticleBuffer = 37,
    ParticleDiffuseBuffer = 38,
    ParticleClothBuffer = 39,
    ParticleRigidBuffer = 40,
    PhysxCoreCount = 41,
    FirstPhysxExtension = 256,
    FirstVehicleExtension = 512,
    FirstUserExtension = 1024,
}

impl From<u16> for PxConcreteType {
    fn from(val: u16) -> Self {
        #[allow(clippy::match_same_arms)]
        match val {
            0 => Self::Undefined,
            1 => Self::Heightfield,
            2 => Self::ConvexMesh,
            3 => Self::TriangleMeshBvh33,
            4 => Self::TriangleMeshBvh34,
            5 => Self::TetrahedronMesh,
            6 => Self::SoftbodyMesh,
            7 => Self::RigidDynamic,
            8 => Self::RigidStatic,
            9 => Self::Shape,
            10 => Self::Material,
            11 => Self::SoftbodyMaterial,
            12 => Self::ClothMaterial,
            13 => Self::PbdMaterial,
            14 => Self::FlipMaterial,
            15 => Self::MpmMaterial,
            16 => Self::CustomMaterial,
            17 => Self::Constraint,
            18 => Self::Aggregate,
            19 => Self::ArticulationReducedCoordinate,
            20 => Self::ArticulationLink,
            21 => Self::ArticulationJointReducedCoordinate,
            22 => Self::ArticulationSensor,
            23 => Self::ArticulationSpatialTendon,
            24 => Self::ArticulationFixedTendon,
            25 => Self::ArticulationAttachment,
            26 => Self::ArticulationTendonJoint,
            27 => Self::PruningStructure,
            28 => Self::Bvh,
            29 => Self::SoftBody,
            30 => Self::SoftBodyState,
            31 => Self::PbdParticlesystem,
            32 => Self::FlipParticlesystem,
            33 => Self::MpmParticlesystem,
            34 => Self::CustomParticlesystem,
            35 => Self::FemCloth,
            36 => Self::HairSystem,
            37 => Self::ParticleBuffer,
            38 => Self::ParticleDiffuseBuffer,
            39 => Self::ParticleClothBuffer,
            40 => Self::ParticleRigidBuffer,
            41 => Self::PhysxCoreCount,
            256 => Self::FirstPhysxExtension,
            512 => Self::FirstVehicleExtension,
            1024 => Self::FirstUserExtension,
            _ => Self::Undefined,
        }
    }
}

/// Flags for PxBase.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxBaseFlag {
    OwnsMemory = 1,
    IsReleasable = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxBaseFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxBaseFlags: u16 {
        const OwnsMemory = 1 << 0;
        const IsReleasable = 1 << 1;
    }
}

/// Flags used to configure binary meta data entries, typically set through PX_DEF_BIN_METADATA defines.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxMetaDataFlag {
    /// declares a class
    Class = 1,
    /// declares class to be virtual
    Virtual = 2,
    /// declares a typedef
    Typedef = 4,
    /// declares a pointer
    Ptr = 8,
    /// declares a handle
    Handle = 16,
    /// declares extra data exported with PxSerializer::exportExtraData
    ExtraData = 32,
    /// specifies one element of extra data
    ExtraItem = 64,
    /// specifies an array of extra data
    ExtraItems = 128,
    /// specifies a name of extra data
    ExtraName = 256,
    /// declares a union
    Union = 512,
    /// declares explicit padding data
    Padding = 1024,
    /// declares aligned data
    Alignment = 2048,
    /// specifies that the count value's most significant bit needs to be masked out
    CountMaskMsb = 4096,
    /// specifies that the count value is treated as zero for a variable value of one - special case for single triangle meshes
    CountSkipIfOne = 8192,
    /// specifies that the control value is the negate of the variable value
    ControlFlip = 16384,
    /// specifies that the control value is masked - mask bits are assumed to be within eCONTROL_MASK_RANGE
    ControlMask = 32768,
    /// mask range allowed for eCONTROL_MASK
    ControlMaskRange = 255,
    ForceDword = 2147483647,
}

/// Identifies the type of each heavyweight PxTask object
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxTaskType {
    /// PxTask will be run on the CPU
    Cpu = 0,
    /// Return code when attempting to find a task that does not exist
    NotPresent = 1,
    /// PxTask execution has been completed
    Completed = 2,
}

/// A geometry type.
///
/// Used to distinguish the type of a ::PxGeometry object.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxGeometryType {
    Sphere = 0,
    Plane = 1,
    Capsule = 2,
    Box = 3,
    Convexmesh = 4,
    Particlesystem = 5,
    Tetrahedronmesh = 6,
    Trianglemesh = 7,
    Heightfield = 8,
    Hairsystem = 9,
    Custom = 10,
    /// internal use only!
    GeometryCount = 11,
    /// internal use only!
    Invalid = -1,
}

/// Geometry-level query flags.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxGeometryQueryFlag {
    /// Saves/restores SIMD control word for each query (safer but slower). Omit this if you took care of it yourself in your app.
    SimdGuard = 1,
}

bitflags::bitflags! {
    /// Flags for [`PxGeometryQueryFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxGeometryQueryFlags: u32 {
        const SimdGuard = 1 << 0;
    }
}

/// Desired build strategy for bounding-volume hierarchies
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxBVHBuildStrategy {
    /// Fast build strategy. Fast build speed, good runtime performance in most cases. Recommended for runtime cooking.
    Fast = 0,
    /// Default build strategy. Medium build speed, good runtime performance in all cases.
    Default = 1,
    /// SAH build strategy. Slower builds, slightly improved runtime performance in some cases.
    Sah = 2,
    Last = 3,
}

/// Flags controlling the simulated behavior of the convex mesh geometry.
///
/// Used in ::PxConvexMeshGeometryFlags.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxConvexMeshGeometryFlag {
    /// Use tighter (but more expensive to compute) bounds around the convex geometry.
    TightBounds = 1,
}

bitflags::bitflags! {
    /// Flags for [`PxConvexMeshGeometryFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxConvexMeshGeometryFlags: u8 {
        const TightBounds = 1 << 0;
    }
}

/// Flags controlling the simulated behavior of the triangle mesh geometry.
///
/// Used in ::PxMeshGeometryFlags.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxMeshGeometryFlag {
    /// Use tighter (but more expensive to compute) bounds around the triangle mesh geometry.
    TightBounds = 1,
    /// Meshes with this flag set are treated as double-sided.
    /// This flag is currently only used for raycasts and sweeps (it is ignored for overlap queries).
    /// For detailed specifications of this flag for meshes and heightfields please refer to the Geometry Query section of the user guide.
    DoubleSided = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxMeshGeometryFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxMeshGeometryFlags: u8 {
        const TightBounds = 1 << 0;
        const DoubleSided = 1 << 1;
    }
}

/// Identifies the solver to use for a particle system.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxParticleSolverType {
    /// The position based dynamics solver that can handle fluid, granular material, cloth, inflatables etc. See [`PxPBDParticleSystem`].
    Pbd = 1,
    /// The FLIP fluid solver. See [`PxFLIPParticleSystem`].
    Flip = 2,
    /// The MPM (material point method) solver that can handle a variety of materials. See [`PxMPMParticleSystem`].
    Mpm = 4,
    /// Custom solver. The user needs to specify the interaction of the particle by providing appropriate functions. Can be used e.g. for molecular dynamics simulations. See [`PxCustomParticleSystem`].
    Custom = 8,
}

/// Scene query and geometry query behavior flags.
///
/// PxHitFlags are used for 3 different purposes:
///
/// 1) To request hit fields to be filled in by scene queries (such as hit position, normal, face index or UVs).
/// 2) Once query is completed, to indicate which fields are valid (note that a query may produce more valid fields than requested).
/// 3) To specify additional options for the narrow phase and mid-phase intersection routines.
///
/// All these flags apply to both scene queries and geometry queries (PxGeometryQuery).
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxHitFlag {
    /// "position" member of [`PxQueryHit`] is valid
    Position = 1,
    /// "normal" member of [`PxQueryHit`] is valid
    Normal = 2,
    /// "u" and "v" barycentric coordinates of [`PxQueryHit`] are valid. Not applicable to sweep queries.
    Uv = 8,
    /// Performance hint flag for sweeps when it is known upfront there's no initial overlap.
    /// NOTE: using this flag may cause undefined results if shapes are initially overlapping.
    AssumeNoInitialOverlap = 16,
    /// Report any first hit. Used for geometries that contain more than one primitive. For meshes,
    /// if neither eMESH_MULTIPLE nor eANY_HIT is specified, a single closest hit will be reported.
    AnyHit = 32,
    /// Report all hits for meshes rather than just the first. Not applicable to sweep queries.
    MeshMultiple = 64,
    /// Report hits with back faces of mesh triangles. Also report hits for raycast
    /// originating on mesh surface and facing away from the surface normal. Not applicable to sweep queries.
    /// Please refer to the user guide for heightfield-specific differences.
    MeshBothSides = 128,
    /// Use more accurate but slower narrow phase sweep tests.
    /// May provide better compatibility with PhysX 3.2 sweep behavior.
    PreciseSweep = 256,
    /// Report the minimum translation depth, normal and contact point.
    Mtd = 512,
    /// "face index" member of [`PxQueryHit`] is valid
    FaceIndex = 1024,
    Default = 1027,
    /// Only this subset of flags can be modified by pre-filter. Other modifications will be discarded.
    ModifiableFlags = 464,
}

bitflags::bitflags! {
    /// Flags for [`PxHitFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxHitFlags: u16 {
        const Position = 1 << 0;
        const Normal = 1 << 1;
        const Uv = 1 << 3;
        const AssumeNoInitialOverlap = 1 << 4;
        const AnyHit = 1 << 5;
        const MeshMultiple = 1 << 6;
        const MeshBothSides = 1 << 7;
        const PreciseSweep = 1 << 8;
        const Mtd = 1 << 9;
        const FaceIndex = 1 << 10;
        const Default = Self::Position.bits | Self::Normal.bits | Self::FaceIndex.bits;
        const ModifiableFlags = Self::AssumeNoInitialOverlap.bits | Self::MeshMultiple.bits | Self::MeshBothSides.bits | Self::PreciseSweep.bits;
    }
}

/// Describes the format of height field samples.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxHeightFieldFormat {
    /// Height field height data is 16 bit signed integers, followed by triangle materials.
    ///
    /// Each sample is 32 bits wide arranged as follows:
    ///
    /// 1) First there is a 16 bit height value.
    /// 2) Next, two one byte material indices, with the high bit of each byte reserved for special use.
    /// (so the material index is only 7 bits).
    /// The high bit of material0 is the tess-flag.
    /// The high bit of material1 is reserved for future use.
    ///
    /// There are zero or more unused bytes before the next sample depending on PxHeightFieldDesc.sampleStride,
    /// where the application may eventually keep its own data.
    ///
    /// This is the only format supported at the moment.
    S16Tm = 1,
}

/// Determines the tessellation of height field cells.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxHeightFieldTessFlag {
    /// This flag determines which way each quad cell is subdivided.
    ///
    /// The flag lowered indicates subdivision like this: (the 0th vertex is referenced by only one triangle)
    ///
    /// +--+--+--+---> column
    /// | /| /| /|
    /// |/ |/ |/ |
    /// +--+--+--+
    /// | /| /| /|
    /// |/ |/ |/ |
    /// +--+--+--+
    /// |
    /// |
    /// V row
    ///
    /// The flag raised indicates subdivision like this: (the 0th vertex is shared by two triangles)
    ///
    /// +--+--+--+---> column
    /// |
    /// \
    /// |
    /// \
    /// |
    /// \
    /// |
    /// |
    /// \
    /// |
    /// \
    /// |
    /// \
    /// |
    /// +--+--+--+
    /// |
    /// \
    /// |
    /// \
    /// |
    /// \
    /// |
    /// |
    /// \
    /// |
    /// \
    /// |
    /// \
    /// |
    /// +--+--+--+
    /// |
    /// |
    /// V row
    E0ThVertexShared = 1,
}

/// Enum with flag values to be used in PxHeightFieldDesc.flags.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxHeightFieldFlag {
    /// Disable collisions with height field with boundary edges.
    ///
    /// Raise this flag if several terrain patches are going to be placed adjacent to each other,
    /// to avoid a bump when sliding across.
    ///
    /// This flag is ignored in contact generation with sphere and capsule shapes.
    NoBoundaryEdges = 1,
}

bitflags::bitflags! {
    /// Flags for [`PxHeightFieldFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxHeightFieldFlags: u16 {
        const NoBoundaryEdges = 1 << 0;
    }
}

/// Special material index values for height field samples.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxHeightFieldMaterial {
    /// A material indicating that the triangle should be treated as a hole in the mesh.
    Hole = 127,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxMeshMeshQueryFlag {
    /// Report all overlaps
    Default = 0,
    /// Ignore coplanar triangle-triangle overlaps
    DiscardCoplanar = 1,
}

bitflags::bitflags! {
    /// Flags for [`PxMeshMeshQueryFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxMeshMeshQueryFlags: u32 {
        const DiscardCoplanar = 1 << 0;
    }
}

/// Enum with flag values to be used in PxSimpleTriangleMesh::flags.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxMeshFlag {
    /// Specifies if the SDK should flip normals.
    ///
    /// The PhysX libraries assume that the face normal of a triangle with vertices [a,b,c] can be computed as:
    /// edge1 = b-a
    /// edge2 = c-a
    /// face_normal = edge1 x edge2.
    ///
    /// Note: This is the same as a counterclockwise winding in a right handed coordinate system or
    /// alternatively a clockwise winding order in a left handed coordinate system.
    ///
    /// If this does not match the winding order for your triangles, raise the below flag.
    Flipnormals = 1,
    /// Denotes the use of 16-bit vertex indices
    E16BitIndices = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxMeshFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxMeshFlags: u16 {
        const Flipnormals = 1 << 0;
        const E16BitIndices = 1 << 1;
    }
}

/// Mesh midphase structure. This enum is used to select the desired acceleration structure for midphase queries
/// (i.e. raycasts, overlaps, sweeps vs triangle meshes).
///
/// The PxMeshMidPhase::eBVH33 structure is the one used in recent PhysX versions (up to PhysX 3.3). It has great performance and is
/// supported on all platforms. It is deprecated since PhysX 5.x.
///
/// The PxMeshMidPhase::eBVH34 structure is a revisited implementation introduced in PhysX 3.4. It can be significantly faster both
/// in terms of cooking performance and runtime performance.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxMeshMidPhase {
    /// Default midphase mesh structure, as used up to PhysX 3.3 (deprecated)
    Bvh33 = 0,
    /// New midphase mesh structure, introduced in PhysX 3.4
    Bvh34 = 1,
    Last = 2,
}

/// Flags for the mesh geometry properties.
///
/// Used in ::PxTriangleMeshFlags.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxTriangleMeshFlag {
    /// The triangle mesh has 16bits vertex indices.
    E16BitIndices = 2,
    /// The triangle mesh has adjacency information build.
    AdjacencyInfo = 4,
    /// Indicates that this mesh would preferably not be the mesh projected for mesh-mesh collision. This can indicate that the mesh is not well tessellated.
    PreferNoSdfProj = 8,
}

bitflags::bitflags! {
    /// Flags for [`PxTriangleMeshFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxTriangleMeshFlags: u8 {
        const E16BitIndices = 1 << 1;
        const AdjacencyInfo = 1 << 2;
        const PreferNoSdfProj = 1 << 3;
    }
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxTetrahedronMeshFlag {
    /// The tetrahedron mesh has 16bits vertex indices
    E16BitIndices = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxTetrahedronMeshFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxTetrahedronMeshFlags: u8 {
        const E16BitIndices = 1 << 1;
    }
}

/// Flags which control the behavior of an actor.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxActorFlag {
    /// Enable debug renderer for this actor
    Visualization = 1,
    /// Disables scene gravity for this actor
    DisableGravity = 2,
    /// Enables the sending of PxSimulationEventCallback::onWake() and PxSimulationEventCallback::onSleep() notify events
    SendSleepNotifies = 4,
    /// Disables simulation for the actor.
    ///
    /// This is only supported by PxRigidStatic and PxRigidDynamic actors and can be used to reduce the memory footprint when rigid actors are
    /// used for scene queries only.
    ///
    /// Setting this flag will remove all constraints attached to the actor from the scene.
    ///
    /// If this flag is set, the following calls are forbidden:
    ///
    /// PxRigidBody: setLinearVelocity(), setAngularVelocity(), addForce(), addTorque(), clearForce(), clearTorque(), setForceAndTorque()
    ///
    /// PxRigidDynamic: setKinematicTarget(), setWakeCounter(), wakeUp(), putToSleep()
    ///
    /// Sleeping:
    /// Raising this flag will set all velocities and the wake counter to 0, clear all forces, clear the kinematic target, put the actor
    /// to sleep and wake up all touching actors from the previous frame.
    DisableSimulation = 8,
}

bitflags::bitflags! {
    /// Flags for [`PxActorFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxActorFlags: u8 {
        const Visualization = 1 << 0;
        const DisableGravity = 1 << 1;
        const SendSleepNotifies = 1 << 2;
        const DisableSimulation = 1 << 3;
    }
}

/// Identifies each type of actor.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxActorType {
    /// A static rigid body
    RigidStatic = 0,
    /// A dynamic rigid body
    RigidDynamic = 1,
    /// An articulation link
    ArticulationLink = 2,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxAggregateType {
    /// Aggregate will contain various actors of unspecified types
    Generic = 0,
    /// Aggregate will only contain static actors
    Static = 1,
    /// Aggregate will only contain kinematic actors
    Kinematic = 2,
}

/// Constraint row flags
///
/// These flags configure the post-processing of constraint rows and the behavior of the solver while solving constraints
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum Px1DConstraintFlag {
    /// whether the constraint is a spring. Mutually exclusive with eRESTITUTION. If set, eKEEPBIAS is ignored.
    Spring = 1,
    /// whether the constraint is a force or acceleration spring. Only valid if eSPRING is set.
    AccelerationSpring = 2,
    /// whether the restitution model should be applied to generate the target velocity. Mutually exclusive with eSPRING. If restitution causes a bounces, eKEEPBIAS is ignored
    Restitution = 4,
    /// whether to keep the error term when solving for velocity. Ignored if restitution generates bounce, or eSPRING is set.
    Keepbias = 8,
    /// whether to accumulate the force value from this constraint in the force total that is reported for the constraint and tested for breakage
    OutputForce = 16,
    /// whether the constraint has a drive force limit (which will be scaled by dt unless PxConstraintFlag::eLIMITS_ARE_FORCES is set)
    HasDriveLimit = 32,
    /// whether this is an angular or linear constraint
    AngularConstraint = 64,
    /// whether the constraint's geometric error should drive the target velocity
    DriveRow = 128,
}

bitflags::bitflags! {
    /// Flags for [`Px1DConstraintFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct Px1DConstraintFlags: u16 {
        const Spring = 1 << 0;
        const AccelerationSpring = 1 << 1;
        const Restitution = 1 << 2;
        const Keepbias = 1 << 3;
        const OutputForce = 1 << 4;
        const HasDriveLimit = 1 << 5;
        const AngularConstraint = 1 << 6;
        const DriveRow = 1 << 7;
    }
}

/// Constraint type hints which the solver uses to optimize constraint handling
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxConstraintSolveHint {
    /// no special properties
    None = 0,
    /// a group of acceleration drive constraints with the same stiffness and drive parameters
    Acceleration1 = 256,
    /// temporary special value to identify SLERP drive rows
    SlerpSpring = 258,
    /// a group of acceleration drive constraints with the same stiffness and drive parameters
    Acceleration2 = 512,
    /// a group of acceleration drive constraints with the same stiffness and drive parameters
    Acceleration3 = 768,
    /// rotational equality constraints with no force limit and no velocity target
    RotationalEquality = 1024,
    /// rotational inequality constraints with (0, PX_MAX_FLT) force limits
    RotationalInequality = 1025,
    /// equality constraints with no force limit and no velocity target
    Equality = 2048,
    /// inequality constraints with (0, PX_MAX_FLT) force limits
    Inequality = 2049,
}

/// Flags for determining which components of the constraint should be visualized.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxConstraintVisualizationFlag {
    /// visualize constraint frames
    LocalFrames = 1,
    /// visualize constraint limits
    Limits = 2,
}

/// Flags for determining how PVD should serialize a constraint update
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxPvdUpdateType {
    /// triggers createPvdInstance call, creates an instance of a constraint
    CreateInstance = 0,
    /// triggers releasePvdInstance call, releases an instance of a constraint
    ReleaseInstance = 1,
    /// triggers updatePvdProperties call, updates all properties of a constraint
    UpdateAllProperties = 2,
    /// triggers simUpdate call, updates all simulation properties of a constraint
    UpdateSimProperties = 3,
}

/// Constraint descriptor used inside the solver
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum ConstraintType {
    /// Defines this pair is a contact constraint
    ContactConstraint = 0,
    /// Defines this pair is a joint constraint
    JointConstraint = 1,
}

/// Data structure used for preparing constraints before solving them
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum BodyState {
    DynamicBody = 1,
    StaticBody = 2,
    KinematicBody = 4,
    Articulation = 8,
}

/// @
/// {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxArticulationAxis {
    /// Rotational about eX
    Twist = 0,
    /// Rotational about eY
    Swing1 = 1,
    /// Rotational about eZ
    Swing2 = 2,
    /// Linear in eX
    X = 3,
    /// Linear in eY
    Y = 4,
    /// Linear in eZ
    Z = 5,
    Count = 6,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxArticulationMotion {
    /// Locked axis, i.e. degree of freedom (DOF)
    Locked = 0,
    /// Limited DOF - set limits of joint DOF together with this flag, see PxArticulationJointReducedCoordinate::setLimitParams
    Limited = 1,
    /// Free DOF
    Free = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxArticulationMotion`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxArticulationMotions: u8 {
        const Limited = 1 << 0;
        const Free = 1 << 1;
    }
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxArticulationJointType {
    /// All joint axes, i.e. degrees of freedom (DOFs) locked
    Fix = 0,
    /// Single linear DOF, e.g. cart on a rail
    Prismatic = 1,
    /// Single rotational DOF, e.g. an elbow joint or a rotational motor, position wrapped at 2pi radians
    Revolute = 2,
    /// Single rotational DOF, e.g. an elbow joint or a rotational motor, position not wrapped
    RevoluteUnwrapped = 3,
    /// Ball and socket joint with two or three DOFs
    Spherical = 4,
    Undefined = 5,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxArticulationFlag {
    /// Set articulation base to be fixed.
    FixBase = 1,
    /// Limits for drive effort are forces and torques rather than impulses, see PxArticulationDrive::maxForce.
    DriveLimitsAreForces = 2,
    /// Disable collisions between the articulation's links (note that parent/child collisions are disabled internally in either case).
    DisableSelfCollision = 4,
    /// Enable in order to be able to query joint solver (i.e. constraint) forces using PxArticulationCache::jointSolverForces.
    ComputeJointForces = 8,
}

bitflags::bitflags! {
    /// Flags for [`PxArticulationFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxArticulationFlags: u8 {
        const FixBase = 1 << 0;
        const DriveLimitsAreForces = 1 << 1;
        const DisableSelfCollision = 1 << 2;
        const ComputeJointForces = 1 << 3;
    }
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxArticulationDriveType {
    /// The output of the implicit spring drive controller is a force/torque.
    Force = 0,
    /// The output of the implicit spring drive controller is a joint acceleration (use this to get (spatial)-inertia-invariant behavior of the drive).
    Acceleration = 1,
    /// Sets the drive gains internally to track a target position almost kinematically (i.e. with very high drive gains).
    Target = 2,
    /// Sets the drive gains internally to track a target velocity almost kinematically (i.e. with very high drive gains).
    Velocity = 3,
    None = 4,
}

/// A description of the types of articulation data that may be directly written to and read from the GPU using the functions
/// PxScene::copyArticulationData() and PxScene::applyArticulationData(). Types that are read-only may only be used in conjunction with
/// PxScene::copyArticulationData(). Types that are write-only may only be used in conjunction with PxScene::applyArticulationData().
/// A subset of data types may be used in conjunction with both PxScene::applyArticulationData() and PxScene::applyArticulationData().
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxArticulationGpuDataType {
    /// The joint positions, read and write, see PxScene::copyArticulationData(), PxScene::applyArticulationData()
    JointPosition = 0,
    /// The joint velocities, read and write,  see PxScene::copyArticulationData(), PxScene::applyArticulationData()
    JointVelocity = 1,
    /// The joint accelerations, read only, see PxScene::copyArticulationData()
    JointAcceleration = 2,
    /// The applied joint forces, write only, see PxScene::applyArticulationData()
    JointForce = 3,
    /// The computed joint constraint solver forces, read only, see PxScene::copyArticulationData()()
    JointSolverForce = 4,
    /// The velocity targets for the joint drives, write only, see PxScene::applyArticulationData()
    JointTargetVelocity = 5,
    /// The position targets for the joint drives, write only, see PxScene::applyArticulationData()
    JointTargetPosition = 6,
    /// The spatial sensor forces, read only, see PxScene::copyArticulationData()
    SensorForce = 7,
    /// The root link transform, read and write, see PxScene::copyArticulationData(), PxScene::applyArticulationData()
    RootTransform = 8,
    /// The root link velocity, read and write, see PxScene::copyArticulationData(), PxScene::applyArticulationData()
    RootVelocity = 9,
    /// The link transforms including root link, read only, see PxScene::copyArticulationData()
    LinkTransform = 10,
    /// The link velocities including root link, read only, see PxScene::copyArticulationData()
    LinkVelocity = 11,
    /// The forces to apply to links, write only, see PxScene::applyArticulationData()
    LinkForce = 12,
    /// The torques to apply to links, write only, see PxScene::applyArticulationData()
    LinkTorque = 13,
    /// Fixed tendon data, write only, see PxScene::applyArticulationData()
    FixedTendon = 14,
    /// Fixed tendon joint data, write only, see PxScene::applyArticulationData()
    FixedTendonJoint = 15,
    /// Spatial tendon data, write only, see PxScene::applyArticulationData()
    SpatialTendon = 16,
    /// Spatial tendon attachment data, write only, see PxScene::applyArticulationData()
    SpatialTendonAttachment = 17,
}

/// These flags determine what data is read or written to the internal articulation data via cache.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxArticulationCacheFlag {
    /// The joint velocities, see PxArticulationCache::jointVelocity.
    Velocity = 1,
    /// The joint accelerations, see PxArticulationCache::jointAcceleration.
    Acceleration = 2,
    /// The joint positions, see PxArticulationCache::jointPosition.
    Position = 4,
    /// The joint forces, see PxArticulationCache::jointForce.
    Force = 8,
    /// The link velocities, see PxArticulationCache::linkVelocity.
    LinkVelocity = 16,
    /// The link accelerations, see PxArticulationCache::linkAcceleration.
    LinkAcceleration = 32,
    /// Root link transform, see PxArticulationCache::rootLinkData.
    RootTransform = 64,
    /// Root link velocities (read/write) and accelerations (read), see PxArticulationCache::rootLinkData.
    RootVelocities = 128,
    /// The spatial sensor forces, see PxArticulationCache::sensorForces.
    SensorForces = 256,
    /// Solver constraint joint forces, see PxArticulationCache::jointSolverForces.
    JointSolverForces = 512,
    All = 247,
}

bitflags::bitflags! {
    /// Flags for [`PxArticulationCacheFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxArticulationCacheFlags: u32 {
        const Velocity = 1 << 0;
        const Acceleration = 1 << 1;
        const Position = 1 << 2;
        const Force = 1 << 3;
        const LinkVelocity = 1 << 4;
        const LinkAcceleration = 1 << 5;
        const RootTransform = 1 << 6;
        const RootVelocities = 1 << 7;
        const SensorForces = 1 << 8;
        const JointSolverForces = 1 << 9;
        const All = Self::Velocity.bits | Self::Acceleration.bits | Self::Position.bits | Self::LinkVelocity.bits | Self::LinkAcceleration.bits | Self::RootTransform.bits | Self::RootVelocities.bits;
    }
}

/// Flags to configure the forces reported by articulation link sensors.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxArticulationSensorFlag {
    /// Raise to receive forces from forward dynamics.
    ForwardDynamicsForces = 1,
    /// Raise to receive forces from constraint solver.
    ConstraintSolverForces = 2,
    /// Raise to receive forces in the world rotation frame, otherwise they will be reported in the sensor's local frame.
    WorldFrame = 4,
}

bitflags::bitflags! {
    /// Flags for [`PxArticulationSensorFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxArticulationSensorFlags: u8 {
        const ForwardDynamicsForces = 1 << 0;
        const ConstraintSolverForces = 1 << 1;
        const WorldFrame = 1 << 2;
    }
}

/// Flag that configures articulation-state updates by PxArticulationReducedCoordinate::updateKinematic.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxArticulationKinematicFlag {
    /// Raise after any changes to the articulation root or joint positions using non-cache API calls. Updates links' positions and velocities.
    Position = 1,
    /// Raise after velocity-only changes to the articulation root or joints using non-cache API calls. Updates links' velocities.
    Velocity = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxArticulationKinematicFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxArticulationKinematicFlags: u8 {
        const Position = 1 << 0;
        const Velocity = 1 << 1;
    }
}

/// Flags which affect the behavior of PxShapes.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxShapeFlag {
    /// The shape will partake in collision in the physical simulation.
    ///
    /// It is illegal to raise the eSIMULATION_SHAPE and eTRIGGER_SHAPE flags.
    /// In the event that one of these flags is already raised the sdk will reject any
    /// attempt to raise the other.  To raise the eSIMULATION_SHAPE first ensure that
    /// eTRIGGER_SHAPE is already lowered.
    ///
    /// This flag has no effect if simulation is disabled for the corresponding actor (see [`PxActorFlag::eDISABLE_SIMULATION`]).
    SimulationShape = 1,
    /// The shape will partake in scene queries (ray casts, overlap tests, sweeps, ...).
    SceneQueryShape = 2,
    /// The shape is a trigger which can send reports whenever other shapes enter/leave its volume.
    ///
    /// Triangle meshes and heightfields can not be triggers. Shape creation will fail in these cases.
    ///
    /// Shapes marked as triggers do not collide with other objects. If an object should act both
    /// as a trigger shape and a collision shape then create a rigid body with two shapes, one being a
    /// trigger shape and the other a collision shape. It is illegal to raise the eTRIGGER_SHAPE and
    /// eSIMULATION_SHAPE flags on a single PxShape instance.  In the event that one of these flags is already
    /// raised the sdk will reject any attempt to raise the other.  To raise the eTRIGGER_SHAPE flag first
    /// ensure that eSIMULATION_SHAPE flag is already lowered.
    ///
    /// Trigger shapes will no longer send notification events for interactions with other trigger shapes.
    ///
    /// Shapes marked as triggers are allowed to participate in scene queries, provided the eSCENE_QUERY_SHAPE flag is set.
    ///
    /// This flag has no effect if simulation is disabled for the corresponding actor (see [`PxActorFlag::eDISABLE_SIMULATION`]).
    TriggerShape = 4,
    /// Enable debug renderer for this shape
    Visualization = 8,
}

bitflags::bitflags! {
    /// Flags for [`PxShapeFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxShapeFlags: u8 {
        const SimulationShape = 1 << 0;
        const SceneQueryShape = 1 << 1;
        const TriggerShape = 1 << 2;
        const Visualization = 1 << 3;
    }
}

/// Parameter to addForce() and addTorque() calls, determines the exact operation that is carried out.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxForceMode {
    /// parameter has unit of mass * length / time^2, i.e., a force
    Force = 0,
    /// parameter has unit of mass * length / time, i.e., force * time
    Impulse = 1,
    /// parameter has unit of length / time, i.e., the effect is mass independent: a velocity change.
    VelocityChange = 2,
    /// parameter has unit of length/ time^2, i.e., an acceleration. It gets treated just like a force except the mass is not divided out before integration.
    Acceleration = 3,
}

/// Collection of flags describing the behavior of a rigid body.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxRigidBodyFlag {
    /// Enable kinematic mode for the body.
    Kinematic = 1,
    /// Use the kinematic target transform for scene queries.
    ///
    /// If this flag is raised, then scene queries will treat the kinematic target transform as the current pose
    /// of the body (instead of using the actual pose). Without this flag, the kinematic target will only take
    /// effect with respect to scene queries after a simulation step.
    UseKinematicTargetForSceneQueries = 2,
    /// Enable CCD for the body.
    EnableCcd = 4,
    /// Enabled CCD in swept integration for the actor.
    ///
    /// If this flag is raised and CCD is enabled, CCD interactions will simulate friction. By default, friction is disabled in CCD interactions because
    /// CCD friction has been observed to introduce some simulation artifacts. CCD friction was enabled in previous versions of the SDK. Raising this flag will result in behavior
    /// that is a closer match for previous versions of the SDK.
    ///
    /// This flag requires PxRigidBodyFlag::eENABLE_CCD to be raised to have any effect.
    EnableCcdFriction = 8,
    /// Register a rigid body to dynamically adjust contact offset based on velocity. This can be used to achieve a CCD effect.
    ///
    /// If both eENABLE_CCD and eENABLE_SPECULATIVE_CCD are set on the same body, then angular motions are handled by speculative
    /// contacts (eENABLE_SPECULATIVE_CCD) while linear motions are handled by sweeps (eENABLE_CCD).
    EnableSpeculativeCcd = 16,
    /// Register a rigid body for reporting pose changes by the simulation at an early stage.
    ///
    /// Sometimes it might be advantageous to get access to the new pose of a rigid body as early as possible and
    /// not wait until the call to fetchResults() returns. Setting this flag will schedule the rigid body to get reported
    /// in [`PxSimulationEventCallback::onAdvance`](). Please refer to the documentation of that callback to understand
    /// the behavior and limitations of this functionality.
    EnablePoseIntegrationPreview = 32,
    /// Permit CCD to limit maxContactImpulse. This is useful for use-cases like a destruction system but can cause visual artefacts so is not enabled by default.
    EnableCcdMaxContactImpulse = 64,
    /// Carries over forces/accelerations between frames, rather than clearing them
    RetainAccelerations = 128,
    /// Forces kinematic-kinematic pairs notifications for this actor.
    ///
    /// This flag overrides the global scene-level PxPairFilteringMode setting for kinematic actors.
    /// This is equivalent to having PxPairFilteringMode::eKEEP for pairs involving this actor.
    ///
    /// A particular use case is when you have a large amount of kinematic actors, but you are only
    /// interested in interactions between a few of them. In this case it is best to use
    /// PxSceneDesc.kineKineFilteringMode = PxPairFilteringMode::eKILL, and then raise the
    /// eFORCE_KINE_KINE_NOTIFICATIONS flag on the small set of kinematic actors that need
    /// notifications.
    ///
    /// This has no effect if PxRigidBodyFlag::eKINEMATIC is not set.
    ///
    /// Changing this flag at runtime will not have an effect until you remove and re-add the actor to the scene.
    ForceKineKineNotifications = 256,
    /// Forces static-kinematic pairs notifications for this actor.
    ///
    /// Similar to eFORCE_KINE_KINE_NOTIFICATIONS, but for static-kinematic interactions.
    ///
    /// This has no effect if PxRigidBodyFlag::eKINEMATIC is not set.
    ///
    /// Changing this flag at runtime will not have an effect until you remove and re-add the actor to the scene.
    ForceStaticKineNotifications = 512,
    /// Enables computation of gyroscopic forces on the rigid body.
    EnableGyroscopicForces = 1024,
}

bitflags::bitflags! {
    /// Flags for [`PxRigidBodyFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxRigidBodyFlags: u16 {
        const Kinematic = 1 << 0;
        const UseKinematicTargetForSceneQueries = 1 << 1;
        const EnableCcd = 1 << 2;
        const EnableCcdFriction = 1 << 3;
        const EnableSpeculativeCcd = 1 << 4;
        const EnablePoseIntegrationPreview = 1 << 5;
        const EnableCcdMaxContactImpulse = 1 << 6;
        const RetainAccelerations = 1 << 7;
        const ForceKineKineNotifications = 1 << 8;
        const ForceStaticKineNotifications = 1 << 9;
        const EnableGyroscopicForces = 1 << 10;
    }
}

/// constraint flags
///
/// eBROKEN is a read only flag
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxConstraintFlag {
    /// whether the constraint is broken
    Broken = 1,
    /// whether actor1 should get projected to actor0 for this constraint (note: projection of a static/kinematic actor to a dynamic actor will be ignored)
    ProjectToActor0 = 2,
    /// whether actor0 should get projected to actor1 for this constraint (note: projection of a static/kinematic actor to a dynamic actor will be ignored)
    ProjectToActor1 = 4,
    /// whether the actors should get projected for this constraint (the direction will be chosen by PhysX)
    Projection = 6,
    /// whether contacts should be generated between the objects this constraint constrains
    CollisionEnabled = 8,
    /// whether this constraint should be visualized, if constraint visualization is turned on
    Visualization = 16,
    /// limits for drive strength are forces rather than impulses
    DriveLimitsAreForces = 32,
    /// perform preprocessing for improved accuracy on D6 Slerp Drive (this flag will be removed in a future release when preprocessing is no longer required)
    ImprovedSlerp = 128,
    /// suppress constraint preprocessing, intended for use with rowResponseThreshold. May result in worse solver accuracy for ill-conditioned constraints.
    DisablePreprocessing = 256,
    /// enables extended limit ranges for angular limits (e.g., limit values > PxPi or
    /// <
    /// -PxPi)
    EnableExtendedLimits = 512,
    /// the constraint type is supported by gpu dynamics
    GpuCompatible = 1024,
    /// updates the constraint each frame
    AlwaysUpdate = 2048,
    /// disables the constraint. SolverPrep functions won't be called for this constraint.
    DisableConstraint = 4096,
}

bitflags::bitflags! {
    /// Flags for [`PxConstraintFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxConstraintFlags: u16 {
        const Broken = 1 << 0;
        const ProjectToActor0 = 1 << 1;
        const ProjectToActor1 = 1 << 2;
        const Projection = Self::ProjectToActor0.bits | Self::ProjectToActor1.bits;
        const CollisionEnabled = 1 << 3;
        const Visualization = 1 << 4;
        const DriveLimitsAreForces = 1 << 5;
        const ImprovedSlerp = 1 << 7;
        const DisablePreprocessing = 1 << 8;
        const EnableExtendedLimits = 1 << 9;
        const GpuCompatible = 1 << 10;
        const AlwaysUpdate = 1 << 11;
        const DisableConstraint = 1 << 12;
    }
}

/// Header for a contact patch where all points share same material and normal
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxContactPatchFlags {
    /// Indicates this contact stream has face indices.
    HasFaceIndices = 1,
    /// Indicates this contact stream is modifiable.
    Modifiable = 2,
    /// Indicates this contact stream is notify-only (no contact response).
    ForceNoResponse = 4,
    /// Indicates this contact stream has modified mass ratios
    HasModifiedMassRatios = 8,
    /// Indicates this contact stream has target velocities set
    HasTargetVelocity = 16,
    /// Indicates this contact stream has max impulses set
    HasMaxImpulse = 32,
    /// Indicates this contact stream needs patches re-generated. This is required if the application modified either the contact normal or the material properties
    RegeneratePatches = 64,
    CompressedModifiedContact = 128,
}

/// A class to iterate over a compressed contact stream. This supports read-only access to the various contact formats.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum StreamFormat {
    SimpleStream = 0,
    ModifiableStream = 1,
    CompressedModifiableStream = 2,
}

/// Flags specifying deletion event types.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxDeletionEventFlag {
    /// The user has called release on an object.
    UserRelease = 1,
    /// The destructor of an object has been called and the memory has been released.
    MemoryRelease = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxDeletionEventFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxDeletionEventFlags: u8 {
        const UserRelease = 1 << 0;
        const MemoryRelease = 1 << 1;
    }
}

/// Collection of flags describing the actions to take for a collision pair.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxPairFlag {
    /// Process the contacts of this collision pair in the dynamics solver.
    ///
    /// Only takes effect if the colliding actors are rigid bodies.
    SolveContact = 1,
    /// Call contact modification callback for this collision pair
    ///
    /// Only takes effect if the colliding actors are rigid bodies.
    ModifyContacts = 2,
    /// Call contact report callback or trigger callback when this collision pair starts to be in contact.
    ///
    /// If one of the two collision objects is a trigger shape (see [`PxShapeFlag::eTRIGGER_SHAPE`])
    /// then the trigger callback will get called as soon as the other object enters the trigger volume.
    /// If none of the two collision objects is a trigger shape then the contact report callback will get
    /// called when the actors of this collision pair start to be in contact.
    ///
    /// Only takes effect if the colliding actors are rigid bodies.
    ///
    /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
    NotifyTouchFound = 4,
    /// Call contact report callback while this collision pair is in contact
    ///
    /// If none of the two collision objects is a trigger shape then the contact report callback will get
    /// called while the actors of this collision pair are in contact.
    ///
    /// Triggers do not support this event. Persistent trigger contacts need to be tracked separately by observing eNOTIFY_TOUCH_FOUND/eNOTIFY_TOUCH_LOST events.
    ///
    /// Only takes effect if the colliding actors are rigid bodies.
    ///
    /// No report will get sent if the objects in contact are sleeping.
    ///
    /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
    ///
    /// If this flag gets enabled while a pair is in touch already, there will be no eNOTIFY_TOUCH_PERSISTS events until the pair loses and regains touch.
    NotifyTouchPersists = 8,
    /// Call contact report callback or trigger callback when this collision pair stops to be in contact
    ///
    /// If one of the two collision objects is a trigger shape (see [`PxShapeFlag::eTRIGGER_SHAPE`])
    /// then the trigger callback will get called as soon as the other object leaves the trigger volume.
    /// If none of the two collision objects is a trigger shape then the contact report callback will get
    /// called when the actors of this collision pair stop to be in contact.
    ///
    /// Only takes effect if the colliding actors are rigid bodies.
    ///
    /// This event will also get triggered if one of the colliding objects gets deleted.
    ///
    /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
    NotifyTouchLost = 16,
    /// Call contact report callback when this collision pair is in contact during CCD passes.
    ///
    /// If CCD with multiple passes is enabled, then a fast moving object might bounce on and off the same
    /// object multiple times. Hence, the same pair might be in contact multiple times during a simulation step.
    /// This flag will make sure that all the detected collision during CCD will get reported. For performance
    /// reasons, the system can not always tell whether the contact pair lost touch in one of the previous CCD
    /// passes and thus can also not always tell whether the contact is new or has persisted. eNOTIFY_TOUCH_CCD
    /// just reports when the two collision objects were detected as being in contact during a CCD pass.
    ///
    /// Only takes effect if the colliding actors are rigid bodies.
    ///
    /// Trigger shapes are not supported.
    ///
    /// Only takes effect if eDETECT_CCD_CONTACT is raised
    NotifyTouchCcd = 32,
    /// Call contact report callback when the contact force between the actors of this collision pair exceeds one of the actor-defined force thresholds.
    ///
    /// Only takes effect if the colliding actors are rigid bodies.
    ///
    /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
    NotifyThresholdForceFound = 64,
    /// Call contact report callback when the contact force between the actors of this collision pair continues to exceed one of the actor-defined force thresholds.
    ///
    /// Only takes effect if the colliding actors are rigid bodies.
    ///
    /// If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the
    /// previous one (unless [`eNOTIFY_THRESHOLD_FORCE_FOUND`] has been set in the previous frame).
    ///
    /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
    NotifyThresholdForcePersists = 128,
    /// Call contact report callback when the contact force between the actors of this collision pair falls below one of the actor-defined force thresholds (includes the case where this collision pair stops being in contact).
    ///
    /// Only takes effect if the colliding actors are rigid bodies.
    ///
    /// If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the
    /// previous one (unless [`eNOTIFY_THRESHOLD_FORCE_FOUND`] or #eNOTIFY_THRESHOLD_FORCE_PERSISTS has been set in the previous frame).
    ///
    /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
    NotifyThresholdForceLost = 256,
    /// Provide contact points in contact reports for this collision pair.
    ///
    /// Only takes effect if the colliding actors are rigid bodies and if used in combination with the flags eNOTIFY_TOUCH_... or eNOTIFY_THRESHOLD_FORCE_...
    ///
    /// Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised
    NotifyContactPoints = 512,
    /// This flag is used to indicate whether this pair generates discrete collision detection contacts.
    ///
    /// Contacts are only responded to if eSOLVE_CONTACT is enabled.
    DetectDiscreteContact = 1024,
    /// This flag is used to indicate whether this pair generates CCD contacts.
    ///
    /// The contacts will only be responded to if eSOLVE_CONTACT is enabled on this pair.
    ///
    /// The scene must have PxSceneFlag::eENABLE_CCD enabled to use this feature.
    ///
    /// Non-static bodies of the pair should have PxRigidBodyFlag::eENABLE_CCD specified for this feature to work correctly.
    ///
    /// This flag is not supported with trigger shapes. However, CCD trigger events can be emulated using non-trigger shapes
    /// and requesting eNOTIFY_TOUCH_FOUND and eNOTIFY_TOUCH_LOST and not raising eSOLVE_CONTACT on the pair.
    DetectCcdContact = 2048,
    /// Provide pre solver velocities in contact reports for this collision pair.
    ///
    /// If the collision pair has contact reports enabled, the velocities of the rigid bodies before contacts have been solved
    /// will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.
    ///
    /// Usually it is not necessary to request these velocities as they will be available by querying the velocity from the provided
    /// PxRigidActor object directly. However, it might be the case that the velocity of a rigid body gets set while the simulation is running
    /// in which case the PxRigidActor would return this new velocity in the contact report callback and not the velocity the simulation used.
    PreSolverVelocity = 4096,
    /// Provide post solver velocities in contact reports for this collision pair.
    ///
    /// If the collision pair has contact reports enabled, the velocities of the rigid bodies after contacts have been solved
    /// will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.
    PostSolverVelocity = 8192,
    /// Provide rigid body poses in contact reports for this collision pair.
    ///
    /// If the collision pair has contact reports enabled, the rigid body poses at the contact event will be provided
    /// in the contact report callback unless the pair lost touch in which case no data will be provided.
    ///
    /// Usually it is not necessary to request these poses as they will be available by querying the pose from the provided
    /// PxRigidActor object directly. However, it might be the case that the pose of a rigid body gets set while the simulation is running
    /// in which case the PxRigidActor would return this new pose in the contact report callback and not the pose the simulation used.
    /// Another use case is related to CCD with multiple passes enabled, A fast moving object might bounce on and off the same
    /// object multiple times. This flag can be used to request the rigid body poses at the time of impact for each such collision event.
    ContactEventPose = 16384,
    /// For internal use only.
    NextFree = 32768,
    /// Provided default flag to do simple contact processing for this collision pair.
    ContactDefault = 1025,
    /// Provided default flag to get commonly used trigger behavior for this collision pair.
    TriggerDefault = 1044,
}

bitflags::bitflags! {
    /// Flags for [`PxPairFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxPairFlags: u16 {
        const SolveContact = 1 << 0;
        const ModifyContacts = 1 << 1;
        const NotifyTouchFound = 1 << 2;
        const NotifyTouchPersists = 1 << 3;
        const NotifyTouchLost = 1 << 4;
        const NotifyTouchCcd = 1 << 5;
        const NotifyThresholdForceFound = 1 << 6;
        const NotifyThresholdForcePersists = 1 << 7;
        const NotifyThresholdForceLost = 1 << 8;
        const NotifyContactPoints = 1 << 9;
        const DetectDiscreteContact = 1 << 10;
        const DetectCcdContact = 1 << 11;
        const PreSolverVelocity = 1 << 12;
        const PostSolverVelocity = 1 << 13;
        const ContactEventPose = 1 << 14;
        const NextFree = 1 << 15;
        const ContactDefault = Self::SolveContact.bits | Self::DetectDiscreteContact.bits;
        const TriggerDefault = Self::NotifyTouchFound.bits | Self::NotifyTouchLost.bits | Self::DetectDiscreteContact.bits;
    }
}

/// Collection of flags describing the filter actions to take for a collision pair.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxFilterFlag {
    /// Ignore the collision pair as long as the bounding volumes of the pair objects overlap.
    ///
    /// Killed pairs will be ignored by the simulation and won't run through the filter again until one
    /// of the following occurs:
    ///
    /// The bounding volumes of the two objects overlap again (after being separated)
    ///
    /// The user enforces a re-filtering (see [`PxScene::resetFiltering`]())
    Kill = 1,
    /// Ignore the collision pair as long as the bounding volumes of the pair objects overlap or until filtering relevant data changes for one of the collision objects.
    ///
    /// Suppressed pairs will be ignored by the simulation and won't make another filter request until one
    /// of the following occurs:
    ///
    /// Same conditions as for killed pairs (see [`eKILL`])
    ///
    /// The filter data or the filter object attributes change for one of the collision objects
    Suppress = 2,
    /// Invoke the filter callback ([`PxSimulationFilterCallback::pairFound`]()) for this collision pair.
    Callback = 4,
    /// Track this collision pair with the filter callback mechanism.
    ///
    /// When the bounding volumes of the collision pair lose contact, the filter callback [`PxSimulationFilterCallback::pairLost`]()
    /// will be invoked. Furthermore, the filter status of the collision pair can be adjusted through [`PxSimulationFilterCallback::statusChange`]()
    /// once per frame (until a pairLost() notification occurs).
    Notify = 12,
    /// Provided default to get standard behavior:
    ///
    /// The application configure the pair's collision properties once when bounding volume overlap is found and
    /// doesn't get asked again about that pair until overlap status or filter properties changes, or re-filtering is requested.
    ///
    /// No notification is provided when bounding volume overlap is lost
    ///
    /// The pair will not be killed or suppressed, so collision detection will be processed
    Default = 0,
}

bitflags::bitflags! {
    /// Flags for [`PxFilterFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxFilterFlags: u16 {
        const Kill = 1 << 0;
        const Suppress = 1 << 1;
        const Callback = 1 << 2;
        const Notify = Self::Callback.bits;
    }
}

/// Identifies each type of filter object.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxFilterObjectType {
    /// A static rigid body
    RigidStatic = 0,
    /// A dynamic rigid body
    RigidDynamic = 1,
    /// An articulation
    Articulation = 2,
    /// A particle system
    Particlesystem = 3,
    /// A FEM-based soft body
    Softbody = 4,
    /// A FEM-based cloth
    ///
    /// In development
    Femcloth = 5,
    /// A hair system
    ///
    /// In development
    Hairsystem = 6,
    /// internal use only!
    MaxTypeCount = 16,
    /// internal use only!
    Undefined = 15,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxFilterObjectFlag {
    Kinematic = 16,
    Trigger = 32,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxPairFilteringMode {
    /// Output pair from BP, potentially send to user callbacks, create regular interaction object.
    ///
    /// Enable contact pair filtering between kinematic/static or kinematic/kinematic rigid bodies.
    ///
    /// By default contacts between these are suppressed (see [`PxFilterFlag::eSUPPRESS`]) and don't get reported to the filter mechanism.
    /// Use this mode if these pairs should go through the filtering pipeline nonetheless.
    ///
    /// This mode is not mutable, and must be set in PxSceneDesc at scene creation.
    Keep = 0,
    /// Output pair from BP, create interaction marker. Can be later switched to regular interaction.
    Suppress = 1,
    /// Don't output pair from BP. Cannot be later switched to regular interaction, needs "resetFiltering" call.
    Kill = 2,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxDataAccessFlag {
    Readable = 1,
    Writable = 2,
    Device = 4,
}

bitflags::bitflags! {
    /// Flags for [`PxDataAccessFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxDataAccessFlags: u8 {
        const Readable = 1 << 0;
        const Writable = 1 << 1;
        const Device = 1 << 2;
    }
}

/// Flags which control the behavior of a material.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxMaterialFlag {
    /// If this flag is set, friction computations are always skipped between shapes with this material and any other shape.
    DisableFriction = 1,
    /// Whether to use strong friction.
    /// The difference between "normal" and "strong" friction is that the strong friction feature
    /// remembers the "friction error" between simulation steps. The friction is a force trying to
    /// hold objects in place (or slow them down) and this is handled in the solver. But since the
    /// solver is only an approximation, the result of the friction calculation can include a small
    /// "error" - e.g. a box resting on a slope should not move at all if the static friction is in
    /// action, but could slowly glide down the slope because of a small friction error in each
    /// simulation step. The strong friction counter-acts this by remembering the small error and
    /// taking it to account during the next simulation step.
    ///
    /// However, in some cases the strong friction could cause problems, and this is why it is
    /// possible to disable the strong friction feature by setting this flag. One example is
    /// raycast vehicles that are sliding fast across the surface, but still need a precise
    /// steering behavior. It may be a good idea to reenable the strong friction when objects
    /// are coming to a rest, to prevent them from slowly creeping down inclines.
    ///
    /// Note: This flag only has an effect if the PxMaterialFlag::eDISABLE_FRICTION bit is 0.
    DisableStrongFriction = 2,
    /// Whether to use the patch friction model.
    /// This flag only has an effect if PxFrictionType::ePATCH friction model is used.
    ///
    /// When using the patch friction model, up to 2 friction anchors are generated per patch. As the number of friction anchors
    /// can be smaller than the number of contacts, the normal force is accumulated over all contacts and used to compute friction
    /// for all anchors. Where there are more than 2 anchors, this can produce frictional behavior that is too strong (approximately 2x as strong
    /// as analytical models suggest).
    ///
    /// This flag causes the normal force to be distributed between the friction anchors such that the total amount of friction applied does not
    /// exceed the analytical results.
    ImprovedPatchFriction = 4,
    /// This flag has the effect of enabling an implicit spring model for the normal force computation.
    CompliantContact = 8,
}

bitflags::bitflags! {
    /// Flags for [`PxMaterialFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxMaterialFlags: u16 {
        const DisableFriction = 1 << 0;
        const DisableStrongFriction = 1 << 1;
        const ImprovedPatchFriction = 1 << 2;
        const CompliantContact = 1 << 3;
    }
}

/// Enumeration that determines the way in which two material properties will be combined to yield a friction or restitution coefficient for a collision.
///
/// When two actors come in contact with each other, they each have materials with various coefficients, but we only need a single set of coefficients for the pair.
///
/// Physics doesn't have any inherent combinations because the coefficients are determined empirically on a case by case
/// basis. However, simulating this with a pairwise lookup table is often impractical.
///
/// For this reason the following combine behaviors are available:
///
/// eAVERAGE
/// eMIN
/// eMULTIPLY
/// eMAX
///
/// The effective combine mode for the pair is maximum(material0.combineMode, material1.combineMode).
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxCombineMode {
    /// Average: (a + b)/2
    Average = 0,
    /// Minimum: minimum(a,b)
    Min = 1,
    /// Multiply: a*b
    Multiply = 2,
    /// Maximum: maximum(a,b)
    Max = 3,
    /// This is not a valid combine mode, it is a sentinel to denote the number of possible values. We assert that the variable's value is smaller than this.
    NValues = 4,
    /// This is not a valid combine mode, it is to assure that the size of the enum type is big enough.
    Pad32 = 2147483647,
}

/// Identifies dirty particle buffers that need to be updated in the particle system.
///
/// This flag can be used mark the device user buffers that are dirty and need to be written to the particle system.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxParticleBufferFlag {
    /// No data specified
    None = 0,
    /// Specifies the position (first 3 floats) and inverse mass (last float) data (array of PxVec4 * number of particles)
    UpdatePosition = 1,
    /// Specifies the velocity (first 3 floats) data (array of PxVec4 * number of particles)
    UpdateVelocity = 2,
    /// Specifies the per-particle phase flag data (array of PxU32 * number of particles)
    UpdatePhase = 4,
    /// Specifies the rest position (first 3 floats) data for cloth buffers
    UpdateRestposition = 8,
    /// Specifies the cloth buffer (see PxParticleClothBuffer)
    UpdateCloth = 32,
    /// Specifies the rigid buffer (see PxParticleRigidBuffer)
    UpdateRigid = 64,
    /// Specifies the diffuse particle parameter buffer (see PxDiffuseParticleParams)
    UpdateDiffuseParam = 128,
    /// Specifies the attachments.
    UpdateAttachments = 256,
    All = 495,
}

bitflags::bitflags! {
    /// Flags for [`PxParticleBufferFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxParticleBufferFlags: u32 {
        const UpdatePosition = 1 << 0;
        const UpdateVelocity = 1 << 1;
        const UpdatePhase = 1 << 2;
        const UpdateRestposition = 1 << 3;
        const UpdateCloth = 1 << 5;
        const UpdateRigid = 1 << 6;
        const UpdateDiffuseParam = 1 << 7;
        const UpdateAttachments = 1 << 8;
        const All = Self::UpdatePosition.bits | Self::UpdateVelocity.bits | Self::UpdatePhase.bits | Self::UpdateRestposition.bits | Self::UpdateCloth.bits | Self::UpdateRigid.bits | Self::UpdateDiffuseParam.bits | Self::UpdateAttachments.bits;
    }
}

/// Identifies per-particle behavior for a PxParticleSystem.
///
/// See [`PxParticleSystem::createPhase`]().
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u32)]
pub enum PxParticlePhaseFlag {
    /// Bits [ 0, 19] represent the particle group for controlling collisions
    ParticlePhaseGroupMask = 1048575,
    /// Bits [20, 23] hold flags about how the particle behave
    ParticlePhaseFlagsMask = 4293918720,
    /// If set this particle will interact with particles of the same group
    ParticlePhaseSelfCollide = 1048576,
    /// If set this particle will ignore collisions with particles closer than the radius in the rest pose, this flag should not be specified unless valid rest positions have been specified using setRestParticles()
    ParticlePhaseSelfCollideFilter = 2097152,
    /// If set this particle will generate fluid density constraints for its overlapping neighbors
    ParticlePhaseFluid = 4194304,
}

bitflags::bitflags! {
    /// Flags for [`PxParticlePhaseFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxParticlePhaseFlags: u32 {
        const ParticlePhaseGroupMask = 0x000fffff;
        const ParticlePhaseFlagsMask = Self::ParticlePhaseSelfCollide.bits | Self::ParticlePhaseSelfCollideFilter.bits | Self::ParticlePhaseFluid.bits;
        const ParticlePhaseSelfCollide = 1 << 20;
        const ParticlePhaseSelfCollideFilter = 1 << 21;
        const ParticlePhaseFluid = 1 << 22;
    }
}

/// Specifies memory space for a PxBuffer instance.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxBufferType {
    Host = 0,
    Device = 1,
}

/// Filtering flags for scene queries.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxQueryFlag {
    /// Traverse static shapes
    Static = 1,
    /// Traverse dynamic shapes
    Dynamic = 2,
    /// Run the pre-intersection-test filter (see [`PxQueryFilterCallback::preFilter`]())
    Prefilter = 4,
    /// Run the post-intersection-test filter (see [`PxQueryFilterCallback::postFilter`]())
    Postfilter = 8,
    /// Abort traversal as soon as any hit is found and return it via callback.block.
    /// Helps query performance. Both eTOUCH and eBLOCK hitTypes are considered hits with this flag.
    AnyHit = 16,
    /// All hits are reported as touching. Overrides eBLOCK returned from user filters with eTOUCH.
    /// This is also an optimization hint that may improve query performance.
    NoBlock = 32,
    /// Same as eBATCH_QUERY_LEGACY_BEHAVIOUR, more explicit name making it clearer that this can also be used
    /// with regular/non-batched queries if needed.
    DisableHardcodedFilter = 64,
    /// Reserved for internal use
    Reserved = 32768,
}

bitflags::bitflags! {
    /// Flags for [`PxQueryFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxQueryFlags: u16 {
        const Static = 1 << 0;
        const Dynamic = 1 << 1;
        const Prefilter = 1 << 2;
        const Postfilter = 1 << 3;
        const AnyHit = 1 << 4;
        const NoBlock = 1 << 5;
        const DisableHardcodedFilter = 1 << 6;
        const Reserved = 1 << 15;
    }
}

/// Classification of scene query hits (intersections).
///
/// - eNONE: Returning this hit type means that the hit should not be reported.
/// - eBLOCK: For all raycast, sweep and overlap queries the nearest eBLOCK type hit will always be returned in PxHitCallback::block member.
/// - eTOUCH: Whenever a raycast, sweep or overlap query was called with non-zero PxHitCallback::nbTouches and PxHitCallback::touches
/// parameters, eTOUCH type hits that are closer or same distance (touchDistance
/// <
/// = blockDistance condition)
/// as the globally nearest eBLOCK type hit, will be reported.
/// - For example, to record all hits from a raycast query, always return eTOUCH.
///
/// All hits in overlap() queries are treated as if the intersection distance were zero.
/// This means the hits are unsorted and all eTOUCH hits are recorded by the callback even if an eBLOCK overlap hit was encountered.
/// Even though all overlap() blocking hits have zero length, only one (arbitrary) eBLOCK overlap hit is recorded in PxHitCallback::block.
/// All overlap() eTOUCH type hits are reported (zero touchDistance
/// <
/// = zero blockDistance condition).
///
/// For raycast/sweep/overlap calls with zero touch buffer or PxHitCallback::nbTouches member,
/// only the closest hit of type eBLOCK is returned. All eTOUCH hits are discarded.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxQueryHitType {
    /// the query should ignore this shape
    None = 0,
    /// a hit on the shape touches the intersection geometry of the query but does not block it
    Touch = 1,
    /// a hit on the shape blocks the query (does not block overlap queries)
    Block = 2,
}

/// Collection of flags providing a mechanism to lock motion along/around a specific axis.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxRigidDynamicLockFlag {
    LockLinearX = 1,
    LockLinearY = 2,
    LockLinearZ = 4,
    LockAngularX = 8,
    LockAngularY = 16,
    LockAngularZ = 32,
}

bitflags::bitflags! {
    /// Flags for [`PxRigidDynamicLockFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxRigidDynamicLockFlags: u8 {
        const LockLinearX = 1 << 0;
        const LockLinearY = 1 << 1;
        const LockLinearZ = 1 << 2;
        const LockAngularX = 1 << 3;
        const LockAngularY = 1 << 4;
        const LockAngularZ = 1 << 5;
    }
}

/// Pruning structure used to accelerate scene queries.
///
/// eNONE uses a simple data structure that consumes less memory than the alternatives,
/// but generally has slower query performance.
///
/// eDYNAMIC_AABB_TREE usually provides the fastest queries. However there is a
/// constant per-frame management cost associated with this structure. How much work should
/// be done per frame can be tuned via the [`PxSceneQueryDesc::dynamicTreeRebuildRateHint`]
/// parameter.
///
/// eSTATIC_AABB_TREE is typically used for static objects. It is the same as the
/// dynamic AABB tree, without the per-frame overhead. This can be a good choice for static
/// objects, if no static objects are added, moved or removed after the scene has been
/// created. If there is no such guarantee (e.g. when streaming parts of the world in and out),
/// then the dynamic version is a better choice even for static objects.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxPruningStructureType {
    /// Using a simple data structure
    None = 0,
    /// Using a dynamic AABB tree
    DynamicAabbTree = 1,
    /// Using a static AABB tree
    StaticAabbTree = 2,
    Last = 3,
}

/// Secondary pruning structure used for newly added objects in dynamic trees.
///
/// Dynamic trees (PxPruningStructureType::eDYNAMIC_AABB_TREE) are slowly rebuilt
/// over several frames. A secondary pruning structure holds and manages objects
/// added to the scene while this rebuild is in progress.
///
/// eNONE ignores newly added objects. This means that for a number of frames (roughly
/// defined by PxSceneQueryDesc::dynamicTreeRebuildRateHint) newly added objects will
/// be ignored by scene queries. This can be acceptable when streaming large worlds, e.g.
/// when the objects added at the boundaries of the game world don't immediately need to be
/// visible from scene queries (it would be equivalent to streaming that data in a few frames
/// later). The advantage of this approach is that there is no CPU cost associated with
/// inserting the new objects in the scene query data structures, and no extra runtime cost
/// when performing queries.
///
/// eBUCKET uses a structure similar to PxPruningStructureType::eNONE. Insertion is fast but
/// query cost can be high.
///
/// eINCREMENTAL uses an incremental AABB-tree, with no direct PxPruningStructureType equivalent.
/// Query time is fast but insertion cost can be high.
///
/// eBVH uses a PxBVH structure. This usually offers the best overall performance.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxDynamicTreeSecondaryPruner {
    /// no secondary pruner, new objects aren't visible to SQ for a few frames
    None = 0,
    /// bucket-based secondary pruner, faster updates, slower query time
    Bucket = 1,
    /// incremental-BVH secondary pruner, faster query time, slower updates
    Incremental = 2,
    /// PxBVH-based secondary pruner, good overall performance
    Bvh = 3,
    Last = 4,
}

/// Scene query update mode
///
/// This enum controls what work is done when the scene query system is updated. The updates traditionally happen when PxScene::fetchResults
/// is called. This function then calls PxSceneQuerySystem::finalizeUpdates, where the update mode is used.
///
/// fetchResults/finalizeUpdates will sync changed bounds during simulation and update the scene query bounds in pruners, this work is mandatory.
///
/// eBUILD_ENABLED_COMMIT_ENABLED does allow to execute the new AABB tree build step during fetchResults/finalizeUpdates, additionally
/// the pruner commit is called where any changes are applied. During commit PhysX refits the dynamic scene query tree and if a new tree
/// was built and the build finished the tree is swapped with current AABB tree.
///
/// eBUILD_ENABLED_COMMIT_DISABLED does allow to execute the new AABB tree build step during fetchResults/finalizeUpdates. Pruner commit
/// is not called, this means that refit will then occur during the first scene query following fetchResults/finalizeUpdates, or may be forced
/// by the method PxScene::flushQueryUpdates() / PxSceneQuerySystemBase::flushUpdates().
///
/// eBUILD_DISABLED_COMMIT_DISABLED no further scene query work is executed. The scene queries update needs to be called manually, see
/// PxScene::sceneQueriesUpdate (see that function's doc for the equivalent PxSceneQuerySystem sequence). It is recommended to call
/// PxScene::sceneQueriesUpdate right after fetchResults/finalizeUpdates as the pruning structures are not updated.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxSceneQueryUpdateMode {
    /// Both scene query build and commit are executed.
    BuildEnabledCommitEnabled = 0,
    /// Scene query build only is executed.
    BuildEnabledCommitDisabled = 1,
    /// No work is done, no update of scene queries
    BuildDisabledCommitDisabled = 2,
}

/// Built-in enum for default PxScene pruners
///
/// This is passed as a pruner index to various functions in the following APIs.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u32)]
pub enum PxScenePrunerIndex {
    PxScenePrunerStatic = 0,
    PxScenePrunerDynamic = 1,
    PxSceneCompoundPruner = 4294967295,
}

/// Broad phase algorithm used in the simulation
///
/// eSAP is a good generic choice with great performance when many objects are sleeping. Performance
/// can degrade significantly though, when all objects are moving, or when large numbers of objects
/// are added to or removed from the broad phase. This algorithm does not need world bounds to be
/// defined in order to work.
///
/// eMBP is an alternative broad phase algorithm that does not suffer from the same performance
/// issues as eSAP when all objects are moving or when inserting large numbers of objects. However
/// its generic performance when many objects are sleeping might be inferior to eSAP, and it requires
/// users to define world bounds in order to work.
///
/// eABP is a revisited implementation of MBP, which automatically manages broad-phase regions.
/// It offers the convenience of eSAP (no need to define world bounds or regions) and the performance
/// of eMBP when a lot of objects are moving. While eSAP can remain faster when most objects are
/// sleeping and eMBP can remain faster when it uses a large number of properly-defined regions,
/// eABP often gives the best performance on average and the best memory usage.
///
/// ePABP is a parallel implementation of ABP. It can often be the fastest (CPU) broadphase, but it
/// can use more memory than ABP.
///
/// eGPU is a GPU implementation of the incremental sweep and prune approach. Additionally, it uses a ABP-style
/// initial pair generation approach to avoid large spikes when inserting shapes. It not only has the advantage
/// of traditional SAP approch which is good for when many objects are sleeping, but due to being fully parallel,
/// it also is great when lots of shapes are moving or for runtime pair insertion and removal. It can become a
/// performance bottleneck if there are a very large number of shapes roughly projecting to the same values
/// on a given axis. If the scene has a very large number of shapes in an actor, e.g. a humanoid, it is recommended
/// to use an aggregate to represent multi-shape or multi-body actors to minimize stress placed on the broad phase.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxBroadPhaseType {
    /// 3-axes sweep-and-prune
    Sap = 0,
    /// Multi box pruning
    Mbp = 1,
    /// Automatic box pruning
    Abp = 2,
    /// Parallel automatic box pruning
    Pabp = 3,
    /// GPU broad phase
    Gpu = 4,
    Last = 5,
}

/// Enum for selecting the friction algorithm used for simulation.
///
/// [`PxFrictionType::ePATCH`] selects the patch friction model which typically leads to the most stable results at low solver iteration counts and is also quite inexpensive, as it uses only
/// up to four scalar solver constraints per pair of touching objects.  The patch friction model is the same basic strong friction algorithm as PhysX 3.2 and before.
///
/// [`PxFrictionType::eONE_DIRECTIONAL`] is a simplification of the Coulomb friction model, in which the friction for a given point of contact is applied in the alternating tangent directions of
/// the contact's normal.  This simplification allows us to reduce the number of iterations required for convergence but is not as accurate as the two directional model.
///
/// [`PxFrictionType::eTWO_DIRECTIONAL`] is identical to the one directional model, but it applies friction in both tangent directions simultaneously.  This hurts convergence a bit so it
/// requires more solver iterations, but is more accurate.  Like the one directional model, it is applied at every contact point, which makes it potentially more expensive
/// than patch friction for scenarios with many contact points.
///
/// [`PxFrictionType::eFRICTION_COUNT`] is the total numer of friction models supported by the SDK.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxFrictionType {
    /// Select default patch-friction model.
    Patch = 0,
    /// Select one directional per-contact friction model.
    OneDirectional = 1,
    /// Select two directional per-contact friction model.
    TwoDirectional = 2,
    /// The total number of friction models supported by the SDK.
    FrictionCount = 3,
}

/// Enum for selecting the type of solver used for the simulation.
///
/// [`PxSolverType::ePGS`] selects the iterative sequential impulse solver. This is the same kind of solver used in PhysX 3.4 and earlier releases.
///
/// [`PxSolverType::eTGS`] selects a non linear iterative solver. This kind of solver can lead to improved convergence and handle large mass ratios, long chains and jointed systems better. It is slightly more expensive than the default solver and can introduce more energy to correct joint and contact errors.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxSolverType {
    /// Projected Gauss-Seidel iterative solver
    Pgs = 0,
    /// Default Temporal Gauss-Seidel solver
    Tgs = 1,
}

/// flags for configuring properties of the scene
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxSceneFlag {
    /// Enable Active Actors Notification.
    ///
    /// This flag enables the Active Actor Notification feature for a scene.  This
    /// feature defaults to disabled.  When disabled, the function
    /// PxScene::getActiveActors() will always return a NULL list.
    ///
    /// There may be a performance penalty for enabling the Active Actor Notification, hence this flag should
    /// only be enabled if the application intends to use the feature.
    ///
    /// Default:
    /// False
    EnableActiveActors = 1,
    /// Enables a second broad phase check after integration that makes it possible to prevent objects from tunneling through eachother.
    ///
    /// PxPairFlag::eDETECT_CCD_CONTACT requires this flag to be specified.
    ///
    /// For this feature to be effective for bodies that can move at a significant velocity, the user should raise the flag PxRigidBodyFlag::eENABLE_CCD for them.
    ///
    /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
    ///
    /// Default:
    /// False
    EnableCcd = 2,
    /// Enables a simplified swept integration strategy, which sacrifices some accuracy for improved performance.
    ///
    /// This simplified swept integration approach makes certain assumptions about the motion of objects that are not made when using a full swept integration.
    /// These assumptions usually hold but there are cases where they could result in incorrect behavior between a set of fast-moving rigid bodies. A key issue is that
    /// fast-moving dynamic objects may tunnel through each-other after a rebound. This will not happen if this mode is disabled. However, this approach will be potentially
    /// faster than a full swept integration because it will perform significantly fewer sweeps in non-trivial scenes involving many fast-moving objects. This approach
    /// should successfully resist objects passing through the static environment.
    ///
    /// PxPairFlag::eDETECT_CCD_CONTACT requires this flag to be specified.
    ///
    /// This scene flag requires eENABLE_CCD to be enabled as well. If it is not, this scene flag will do nothing.
    ///
    /// For this feature to be effective for bodies that can move at a significant velocity, the user should raise the flag PxRigidBodyFlag::eENABLE_CCD for them.
    ///
    /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
    ///
    /// Default:
    /// False
    DisableCcdResweep = 4,
    /// Enable GJK-based distance collision detection system.
    ///
    /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
    ///
    /// Default:
    /// true
    EnablePcm = 64,
    /// Disable contact report buffer resize. Once the contact buffer is full, the rest of the contact reports will
    /// not be buffered and sent.
    ///
    /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
    ///
    /// Default:
    /// false
    DisableContactReportBufferResize = 128,
    /// Disable contact cache.
    ///
    /// Contact caches are used internally to provide faster contact generation. You can disable all contact caches
    /// if memory usage for this feature becomes too high.
    ///
    /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
    ///
    /// Default:
    /// false
    DisableContactCache = 256,
    /// Require scene-level locking
    ///
    /// When set to true this requires that threads accessing the PxScene use the
    /// multi-threaded lock methods.
    ///
    /// This flag is not mutable, and must be set in PxSceneDesc at scene creation.
    ///
    /// Default:
    /// false
    RequireRwLock = 512,
    /// Enables additional stabilization pass in solver
    ///
    /// When set to true, this enables additional stabilization processing to improve that stability of complex interactions between large numbers of bodies.
    ///
    /// Note that this flag is not mutable and must be set in PxSceneDesc at scene creation. Also, this is an experimental feature which does result in some loss of momentum.
    EnableStabilization = 1024,
    /// Enables average points in contact manifolds
    ///
    /// When set to true, this enables additional contacts to be generated per manifold to represent the average point in a manifold. This can stabilize stacking when only a small
    /// number of solver iterations is used.
    ///
    /// Note that this flag is not mutable and must be set in PxSceneDesc at scene creation.
    EnableAveragePoint = 2048,
    /// Do not report kinematics in list of active actors.
    ///
    /// Since the target pose for kinematics is set by the user, an application can track the activity state directly and use
    /// this flag to avoid that kinematics get added to the list of active actors.
    ///
    /// This flag has only an effect in combination with eENABLE_ACTIVE_ACTORS.
    ///
    /// Default:
    /// false
    ExcludeKinematicsFromActiveActors = 4096,
    /// Do not report kinematics in list of active actors.
    ///
    /// Since the target pose for kinematics is set by the user, an application can track the activity state directly and use
    /// this flag to avoid that kinematics get added to the list of active actors.
    ///
    /// This flag has only an effect in combination with eENABLE_ACTIVE_ACTORS.
    ///
    /// Default:
    /// false
    EnableGpuDynamics = 8192,
    /// Provides improved determinism at the expense of performance.
    ///
    /// By default, PhysX provides limited determinism guarantees. Specifically, PhysX guarantees that the exact scene (same actors created in the same order) and simulated using the same
    /// time-stepping scheme should provide the exact same behaviour.
    ///
    /// However, if additional actors are added to the simulation, this can affect the behaviour of the existing actors in the simulation, even if the set of new actors do not interact with
    /// the existing actors.
    ///
    /// This flag provides an additional level of determinism that guarantees that the simulation will not change if additional actors are added to the simulation, provided those actors do not interfere
    /// with the existing actors in the scene. Determinism is only guaranteed if the actors are inserted in a consistent order each run in a newly-created scene and simulated using a consistent time-stepping
    /// scheme.
    ///
    /// Note that this flag is not mutable and must be set at scene creation.
    ///
    /// Note that enabling this flag can have a negative impact on performance.
    ///
    /// Note that this feature is not currently supported on GPU.
    ///
    /// Default
    /// false
    EnableEnhancedDeterminism = 16384,
    /// Controls processing friction in all solver iterations
    ///
    /// By default, PhysX processes friction only in the final 3 position iterations, and all velocity
    /// iterations. This flag enables friction processing in all position and velocity iterations.
    ///
    /// The default behaviour provides a good trade-off between performance and stability and is aimed
    /// primarily at game development.
    ///
    /// When simulating more complex frictional behaviour, such as grasping of complex geometries with
    /// a robotic manipulator, better results can be achieved by enabling friction in all solver iterations.
    ///
    /// This flag only has effect with the default solver. The TGS solver always performs friction per-iteration.
    EnableFrictionEveryIteration = 32768,
    /// Controls processing friction in all solver iterations
    ///
    /// By default, PhysX processes friction only in the final 3 position iterations, and all velocity
    /// iterations. This flag enables friction processing in all position and velocity iterations.
    ///
    /// The default behaviour provides a good trade-off between performance and stability and is aimed
    /// primarily at game development.
    ///
    /// When simulating more complex frictional behaviour, such as grasping of complex geometries with
    /// a robotic manipulator, better results can be achieved by enabling friction in all solver iterations.
    ///
    /// This flag only has effect with the default solver. The TGS solver always performs friction per-iteration.
    SuppressReadback = 65536,
    /// Controls processing friction in all solver iterations
    ///
    /// By default, PhysX processes friction only in the final 3 position iterations, and all velocity
    /// iterations. This flag enables friction processing in all position and velocity iterations.
    ///
    /// The default behaviour provides a good trade-off between performance and stability and is aimed
    /// primarily at game development.
    ///
    /// When simulating more complex frictional behaviour, such as grasping of complex geometries with
    /// a robotic manipulator, better results can be achieved by enabling friction in all solver iterations.
    ///
    /// This flag only has effect with the default solver. The TGS solver always performs friction per-iteration.
    ForceReadback = 131072,
    /// Controls processing friction in all solver iterations
    ///
    /// By default, PhysX processes friction only in the final 3 position iterations, and all velocity
    /// iterations. This flag enables friction processing in all position and velocity iterations.
    ///
    /// The default behaviour provides a good trade-off between performance and stability and is aimed
    /// primarily at game development.
    ///
    /// When simulating more complex frictional behaviour, such as grasping of complex geometries with
    /// a robotic manipulator, better results can be achieved by enabling friction in all solver iterations.
    ///
    /// This flag only has effect with the default solver. The TGS solver always performs friction per-iteration.
    MutableFlags = 69633,
}

bitflags::bitflags! {
    /// Flags for [`PxSceneFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxSceneFlags: u32 {
        const EnableActiveActors = 1 << 0;
        const EnableCcd = 1 << 1;
        const DisableCcdResweep = 1 << 2;
        const EnablePcm = 1 << 6;
        const DisableContactReportBufferResize = 1 << 7;
        const DisableContactCache = 1 << 8;
        const RequireRwLock = 1 << 9;
        const EnableStabilization = 1 << 10;
        const EnableAveragePoint = 1 << 11;
        const ExcludeKinematicsFromActiveActors = 1 << 12;
        const EnableGpuDynamics = 1 << 13;
        const EnableEnhancedDeterminism = 1 << 14;
        const EnableFrictionEveryIteration = 1 << 15;
        const SuppressReadback = 1 << 16;
        const ForceReadback = 1 << 17;
        const MutableFlags = Self::EnableActiveActors.bits | Self::ExcludeKinematicsFromActiveActors.bits | Self::SuppressReadback.bits;
    }
}

/// Debug visualization parameters.
///
/// [`PxVisualizationParameter::eSCALE`] is the master switch for enabling visualization, please read the corresponding documentation
/// for further details.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxVisualizationParameter {
    /// This overall visualization scale gets multiplied with the individual scales. Setting to zero ignores all visualizations. Default is 0.
    ///
    /// The below settings permit the debug visualization of various simulation properties.
    /// The setting is either zero, in which case the property is not drawn. Otherwise it is a scaling factor
    /// that determines the size of the visualization widgets.
    ///
    /// Only objects for which visualization is turned on using setFlag(eVISUALIZATION) are visualized (see [`PxActorFlag::eVISUALIZATION`], #PxShapeFlag::eVISUALIZATION, ...).
    /// Contacts are visualized if they involve a body which is being visualized.
    /// Default is 0.
    ///
    /// Notes:
    /// - to see any visualization, you have to set PxVisualizationParameter::eSCALE to nonzero first.
    /// - the scale factor has been introduced because it's difficult (if not impossible) to come up with a
    /// good scale for 3D vectors. Normals are normalized and their length is always 1. But it doesn't mean
    /// we should render a line of length 1. Depending on your objects/scene, this might be completely invisible
    /// or extremely huge. That's why the scale factor is here, to let you tune the length until it's ok in
    /// your scene.
    /// - however, things like collision shapes aren't ambiguous. They are clearly defined for example by the
    /// triangles
    /// &
    /// polygons themselves, and there's no point in scaling that. So the visualization widgets
    /// are only scaled when it makes sense.
    ///
    /// Range:
    /// [0, PX_MAX_F32)
    /// Default:
    /// 0
    Scale = 0,
    /// Visualize the world axes.
    WorldAxes = 1,
    /// Visualize a bodies axes.
    BodyAxes = 2,
    /// Visualize a body's mass axes.
    ///
    /// This visualization is also useful for visualizing the sleep state of bodies. Sleeping bodies are drawn in
    /// black, while awake bodies are drawn in white. If the body is sleeping and part of a sleeping group, it is
    /// drawn in red.
    BodyMassAxes = 3,
    /// Visualize the bodies linear velocity.
    BodyLinVelocity = 4,
    /// Visualize the bodies angular velocity.
    BodyAngVelocity = 5,
    /// Visualize contact points. Will enable contact information.
    ContactPoint = 6,
    /// Visualize contact normals. Will enable contact information.
    ContactNormal = 7,
    /// Visualize contact errors. Will enable contact information.
    ContactError = 8,
    /// Visualize Contact forces. Will enable contact information.
    ContactForce = 9,
    /// Visualize actor axes.
    ActorAxes = 10,
    /// Visualize bounds (AABBs in world space)
    CollisionAabbs = 11,
    /// Shape visualization
    CollisionShapes = 12,
    /// Shape axis visualization
    CollisionAxes = 13,
    /// Compound visualization (compound AABBs in world space)
    CollisionCompounds = 14,
    /// Mesh
    /// &
    /// convex face normals
    CollisionFnormals = 15,
    /// Active edges for meshes
    CollisionEdges = 16,
    /// Static pruning structures
    CollisionStatic = 17,
    /// Dynamic pruning structures
    CollisionDynamic = 18,
    /// Joint local axes
    JointLocalFrames = 19,
    /// Joint limits
    JointLimits = 20,
    /// Visualize culling box
    CullBox = 21,
    /// MBP regions
    MbpRegions = 22,
    /// Renders the simulation mesh instead of the collision mesh (only available for tetmeshes)
    SimulationMesh = 23,
    /// Renders the SDF of a mesh instead of the collision mesh (only available for triangle meshes with SDFs)
    Sdf = 24,
    /// This is not a parameter, it just records the current number of parameters (as maximum(PxVisualizationParameter)+1) for use in loops.
    NumValues = 25,
    /// This is not a parameter, it just records the current number of parameters (as maximum(PxVisualizationParameter)+1) for use in loops.
    ForceDword = 2147483647,
}

/// Different types of rigid body collision pair statistics.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum RbPairStatsType {
    /// Shape pairs processed as discrete contact pairs for the current simulation step.
    DiscreteContactPairs = 0,
    /// Shape pairs processed as swept integration pairs for the current simulation step.
    ///
    /// Counts the pairs for which special CCD (continuous collision detection) work was actually done and NOT the number of pairs which were configured for CCD.
    /// Furthermore, there can be multiple CCD passes and all processed pairs of all passes are summed up, hence the number can be larger than the amount of pairs which have been configured for CCD.
    CcdPairs = 1,
    /// Shape pairs processed with user contact modification enabled for the current simulation step.
    ModifiedContactPairs = 2,
    /// Trigger shape pairs processed for the current simulation step.
    TriggerPairs = 3,
}

/// These flags determine what data is read or written to the gpu softbody.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxSoftBodyDataFlag {
    /// The collision mesh tetrahedron indices (quadruples of int32)
    TetIndices = 0,
    /// The collision mesh cauchy stress tensors (float 3x3 matrices)
    TetStress = 1,
    /// The collision mesh tetrahedron von Mises stress (float scalar)
    TetStresscoeff = 2,
    /// The collision mesh tetrahedron rest poses (float 3x3 matrices)
    TetRestPoses = 3,
    /// The collision mesh tetrahedron orientations (quaternions, quadruples of float)
    TetRotations = 4,
    /// The collision mesh vertex positions and their inverted mass in the 4th component (quadruples of float)
    TetPositionInvMass = 5,
    /// The simulation mesh tetrahedron indices (quadruples of int32)
    SimTetIndices = 6,
    /// The simulation mesh vertex velocities and their inverted mass in the 4th component (quadruples of float)
    SimVelocityInvMass = 7,
    /// The simulation mesh vertex positions and their inverted mass in the 4th component (quadruples of float)
    SimPositionInvMass = 8,
    /// The simulation mesh kinematic target positions
    SimKinematicTarget = 9,
}

/// Identifies input and output buffers for PxHairSystem
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxHairSystemData {
    /// No data specified
    None = 0,
    /// Specifies the position (first 3 floats) and inverse mass (last float) data (array of PxVec4 * max number of vertices)
    PositionInvmass = 1,
    /// Specifies the velocity (first 3 floats) data (array of PxVec4 * max number of vertices)
    Velocity = 2,
    /// Specifies everything
    All = 3,
}

bitflags::bitflags! {
    /// Flags for [`PxHairSystemData`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxHairSystemDataFlags: u32 {
        const PositionInvmass = 1 << 0;
        const Velocity = 1 << 1;
        const All = Self::PositionInvmass.bits | Self::Velocity.bits;
    }
}

/// Binary settings for hair system simulation
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxHairSystemFlag {
    /// Determines if self-collision between hair vertices is ignored
    DisableSelfCollision = 1,
    /// Determines if collision between hair and external bodies is ignored
    DisableExternalCollision = 2,
    /// Determines if attachment constraint is also felt by body to which the hair is attached
    DisableTwosidedAttachment = 4,
}

bitflags::bitflags! {
    /// Flags for [`PxHairSystemFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxHairSystemFlags: u32 {
        const DisableSelfCollision = 1 << 0;
        const DisableExternalCollision = 1 << 1;
        const DisableTwosidedAttachment = 1 << 2;
    }
}

/// Identifies each type of information for retrieving from actor.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxActorCacheFlag {
    ActorData = 1,
    Force = 4,
    Torque = 8,
}

bitflags::bitflags! {
    /// Flags for [`PxActorCacheFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxActorCacheFlags: u16 {
        const ActorData = 1 << 0;
        const Force = 1 << 2;
        const Torque = 1 << 3;
    }
}

/// PVD scene Flags. They are disabled by default, and only works if PxPvdInstrumentationFlag::eDEBUG is set.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxPvdSceneFlag {
    TransmitContacts = 1,
    /// Transmits contact stream to PVD.
    TransmitScenequeries = 2,
    /// Transmits scene query stream to PVD.
    TransmitConstraints = 4,
}

bitflags::bitflags! {
    /// Flags for [`PxPvdSceneFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxPvdSceneFlags: u8 {
        const TransmitContacts = 1 << 0;
        const TransmitScenequeries = 1 << 1;
        const TransmitConstraints = 1 << 2;
    }
}

/// Identifies each type of actor for retrieving actors from a scene.
///
/// [`PxArticulationLink`] objects are not supported. Use the #PxArticulationReducedCoordinate object to retrieve all its links.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxActorTypeFlag {
    /// A static rigid body
    RigidStatic = 1,
    /// A dynamic rigid body
    RigidDynamic = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxActorTypeFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxActorTypeFlags: u16 {
        const RigidStatic = 1 << 0;
        const RigidDynamic = 1 << 1;
    }
}

/// Extra data item types for contact pairs.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxContactPairExtraDataType {
    /// see [`PxContactPairVelocity`]
    PreSolverVelocity = 0,
    /// see [`PxContactPairVelocity`]
    PostSolverVelocity = 1,
    /// see [`PxContactPairPose`]
    ContactEventPose = 2,
    /// see [`PxContactPairIndex`]
    ContactPairIndex = 3,
}

/// Collection of flags providing information on contact report pairs.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxContactPairHeaderFlag {
    /// The actor with index 0 has been removed from the scene.
    RemovedActor0 = 1,
    /// The actor with index 1 has been removed from the scene.
    RemovedActor1 = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxContactPairHeaderFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxContactPairHeaderFlags: u16 {
        const RemovedActor0 = 1 << 0;
        const RemovedActor1 = 1 << 1;
    }
}

/// Collection of flags providing information on contact report pairs.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxContactPairFlag {
    /// The shape with index 0 has been removed from the actor/scene.
    RemovedShape0 = 1,
    /// The shape with index 1 has been removed from the actor/scene.
    RemovedShape1 = 2,
    /// First actor pair contact.
    ///
    /// The provided shape pair marks the first contact between the two actors, no other shape pair has been touching prior to the current simulation frame.
    ///
    /// : This info is only available if [`PxPairFlag::eNOTIFY_TOUCH_FOUND`] has been declared for the pair.
    ActorPairHasFirstTouch = 4,
    /// All contact between the actor pair was lost.
    ///
    /// All contact between the two actors has been lost, no shape pairs remain touching after the current simulation frame.
    ActorPairLostTouch = 8,
    /// Internal flag, used by [`PxContactPair`].extractContacts()
    ///
    /// The applied contact impulses are provided for every contact point.
    /// This is the case if [`PxPairFlag::eSOLVE_CONTACT`] has been set for the pair.
    InternalHasImpulses = 16,
    /// Internal flag, used by [`PxContactPair`].extractContacts()
    ///
    /// The provided contact point information is flipped with regards to the shapes of the contact pair. This mainly concerns the order of the internal triangle indices.
    InternalContactsAreFlipped = 32,
}

bitflags::bitflags! {
    /// Flags for [`PxContactPairFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxContactPairFlags: u16 {
        const RemovedShape0 = 1 << 0;
        const RemovedShape1 = 1 << 1;
        const ActorPairHasFirstTouch = 1 << 2;
        const ActorPairLostTouch = 1 << 3;
        const InternalHasImpulses = 1 << 4;
        const InternalContactsAreFlipped = 1 << 5;
    }
}

/// Collection of flags providing information on trigger report pairs.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxTriggerPairFlag {
    /// The trigger shape has been removed from the actor/scene.
    RemovedShapeTrigger = 1,
    /// The shape causing the trigger event has been removed from the actor/scene.
    RemovedShapeOther = 2,
    /// For internal use only.
    NextFree = 4,
}

bitflags::bitflags! {
    /// Flags for [`PxTriggerPairFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxTriggerPairFlags: u8 {
        const RemovedShapeTrigger = 1 << 0;
        const RemovedShapeOther = 1 << 1;
        const NextFree = 1 << 2;
    }
}

/// Identifies input and output buffers for PxSoftBody.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxSoftBodyData {
    None = 0,
    /// Flag to request access to the collision mesh's positions; read only
    PositionInvmass = 1,
    /// Flag to request access to the simulation mesh's positions and inverse masses
    SimPositionInvmass = 4,
    /// Flag to request access to the simulation mesh's velocities and inverse masses
    SimVelocity = 8,
    /// Flag to request access to the simulation mesh's kinematic target position
    SimKinematicTarget = 16,
    All = 29,
}

bitflags::bitflags! {
    /// Flags for [`PxSoftBodyData`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxSoftBodyDataFlags: u32 {
        const PositionInvmass = 1 << 0;
        const SimPositionInvmass = 1 << 2;
        const SimVelocity = 1 << 3;
        const SimKinematicTarget = 1 << 4;
        const All = Self::PositionInvmass.bits | Self::SimPositionInvmass.bits | Self::SimVelocity.bits | Self::SimKinematicTarget.bits;
    }
}

/// Flags to enable or disable special modes of a SoftBody
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxSoftBodyFlag {
    /// Determines if self collision will be detected and resolved
    DisableSelfCollision = 1,
    /// Enables computation of a Cauchy stress tensor for every tetrahedron in the simulation mesh. The tensors can be accessed through the softbody direct API
    ComputeStressTensor = 2,
    /// Enables support for continuous collision detection
    EnableCcd = 4,
    /// Enable debug rendering to display the simulation mesh
    DisplaySimMesh = 8,
    /// Enables support for kinematic motion of the collision and simulation mesh.
    Kinematic = 16,
    /// Enables partially kinematic motion of the collisios and simulation mesh.
    PartiallyKinematic = 32,
}

bitflags::bitflags! {
    /// Flags for [`PxSoftBodyFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxSoftBodyFlags: u32 {
        const DisableSelfCollision = 1 << 0;
        const ComputeStressTensor = 1 << 1;
        const EnableCcd = 1 << 2;
        const DisplaySimMesh = 1 << 3;
        const Kinematic = 1 << 4;
        const PartiallyKinematic = 1 << 5;
    }
}

/// The type of controller, eg box, sphere or capsule.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxControllerShapeType {
    /// A box controller.
    Box = 0,
    /// A capsule controller
    Capsule = 1,
    /// A capsule controller
    ForceDword = 2147483647,
}

/// specifies how a CCT interacts with non-walkable parts.
///
/// This is only used when slopeLimit is non zero. It is currently enabled for static actors only, and not supported for spheres or capsules.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxControllerNonWalkableMode {
    /// Stops character from climbing up non-walkable slopes, but doesn't move it otherwise
    PreventClimbing = 0,
    /// Stops character from climbing up non-walkable slopes, and forces it to slide down those slopes
    PreventClimbingAndForceSliding = 1,
}

/// specifies which sides a character is colliding with.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxControllerCollisionFlag {
    /// Character is colliding to the sides.
    CollisionSides = 1,
    /// Character has collision above.
    CollisionUp = 2,
    /// Character has collision below.
    CollisionDown = 4,
}

bitflags::bitflags! {
    /// Flags for [`PxControllerCollisionFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxControllerCollisionFlags: u8 {
        const CollisionSides = 1 << 0;
        const CollisionUp = 1 << 1;
        const CollisionDown = 1 << 2;
    }
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxCapsuleClimbingMode {
    /// Standard mode, let the capsule climb over surfaces according to impact normal
    Easy = 0,
    /// Constrained mode, try to limit climbing according to the step offset
    Constrained = 1,
    Last = 2,
}

/// specifies controller behavior
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxControllerBehaviorFlag {
    /// Controller can ride on touched object (i.e. when this touched object is moving horizontally).
    ///
    /// The CCT vs. CCT case is not supported.
    CctCanRideOnObject = 1,
    /// Controller should slide on touched object
    CctSlide = 2,
    /// Disable all code dealing with controllers riding on objects, let users define it outside of the SDK.
    CctUserDefinedRide = 4,
}

bitflags::bitflags! {
    /// Flags for [`PxControllerBehaviorFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxControllerBehaviorFlags: u8 {
        const CctCanRideOnObject = 1 << 0;
        const CctSlide = 1 << 1;
        const CctUserDefinedRide = 1 << 2;
    }
}

/// specifies debug-rendering flags
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u32)]
pub enum PxControllerDebugRenderFlag {
    /// Temporal bounding volume around controllers
    TemporalBv = 1,
    /// Cached bounding volume around controllers
    CachedBv = 2,
    /// User-defined obstacles
    Obstacles = 4,
    None = 0,
    All = 4294967295,
}

bitflags::bitflags! {
    /// Flags for [`PxControllerDebugRenderFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxControllerDebugRenderFlags: u32 {
        const TemporalBv = 1 << 0;
        const CachedBv = 1 << 1;
        const Obstacles = 1 << 2;
        const All = Self::TemporalBv.bits | Self::CachedBv.bits | Self::Obstacles.bits;
    }
}

/// Defines the number of bits per subgrid pixel
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxSdfBitsPerSubgridPixel {
    /// 8 bit per subgrid pixel (values will be stored as normalized integers)
    E8BitPerPixel = 1,
    /// 16 bit per subgrid pixel (values will be stored as normalized integers)
    E16BitPerPixel = 2,
    /// 32 bit per subgrid pixel (values will be stored as floats in world scale units)
    E32BitPerPixel = 4,
}

/// Flags which describe the format and behavior of a convex mesh.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxConvexFlag {
    /// Denotes the use of 16-bit vertex indices in PxConvexMeshDesc::triangles or PxConvexMeshDesc::polygons.
    /// (otherwise, 32-bit indices are assumed)
    E16BitIndices = 1,
    /// Automatically recomputes the hull from the vertices. If this flag is not set, you must provide the entire geometry manually.
    ///
    /// There are two different algorithms for hull computation, please see PxConvexMeshCookingType.
    ComputeConvex = 2,
    /// Checks and removes almost zero-area triangles during convex hull computation.
    /// The rejected area size is specified in PxCookingParams::areaTestEpsilon
    ///
    /// This flag is only used in combination with eCOMPUTE_CONVEX.
    CheckZeroAreaTriangles = 4,
    /// Quantizes the input vertices using the k-means clustering
    ///
    /// The input vertices are quantized to PxConvexMeshDesc::quantizedCount
    /// see http://en.wikipedia.org/wiki/K-means_clustering
    QuantizeInput = 8,
    /// Disables the convex mesh validation to speed-up hull creation. Please use separate validation
    /// function in checked/debug builds. Creating a convex mesh with invalid input data without prior validation
    /// may result in undefined behavior.
    DisableMeshValidation = 16,
    /// Enables plane shifting vertex limit algorithm.
    ///
    /// Plane shifting is an alternative algorithm for the case when the computed hull has more vertices
    /// than the specified vertex limit.
    ///
    /// The default algorithm computes the full hull, and an OBB around the input vertices. This OBB is then sliced
    /// with the hull planes until the vertex limit is reached.The default algorithm requires the vertex limit
    /// to be set to at least 8, and typically produces results that are much better quality than are produced
    /// by plane shifting.
    ///
    /// When plane shifting is enabled, the hull computation stops when vertex limit is reached. The hull planes
    /// are then shifted to contain all input vertices, and the new plane intersection points are then used to
    /// generate the final hull with the given vertex limit.Plane shifting may produce sharp edges to vertices
    /// very far away from the input cloud, and does not guarantee that all input vertices are inside the resulting
    /// hull.However, it can be used with a vertex limit as low as 4.
    PlaneShifting = 32,
    /// Inertia tensor computation is faster using SIMD code, but the precision is lower, which may result
    /// in incorrect inertia for very thin hulls.
    FastInertiaComputation = 64,
    /// Convex hulls are created with respect to GPU simulation limitations. Vertex limit and polygon limit
    /// is set to 64 and vertex limit per face is internally set to 32.
    ///
    /// Can be used only with eCOMPUTE_CONVEX flag.
    GpuCompatible = 128,
    /// Convex hull input vertices are shifted to be around origin to provide better computation stability.
    /// It is recommended to provide input vertices around the origin, otherwise use this flag to improve
    /// numerical stability.
    ///
    /// Is used only with eCOMPUTE_CONVEX flag.
    ShiftVertices = 256,
}

bitflags::bitflags! {
    /// Flags for [`PxConvexFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxConvexFlags: u16 {
        const E16BitIndices = 1 << 0;
        const ComputeConvex = 1 << 1;
        const CheckZeroAreaTriangles = 1 << 2;
        const QuantizeInput = 1 << 3;
        const DisableMeshValidation = 1 << 4;
        const PlaneShifting = 1 << 5;
        const FastInertiaComputation = 1 << 6;
        const GpuCompatible = 1 << 7;
        const ShiftVertices = 1 << 8;
    }
}

/// Defines the tetrahedron structure of a mesh.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxMeshFormat {
    /// Normal tetmesh with arbitrary tetrahedra
    TetMesh = 0,
    /// 6 tetrahedra in a row will form a hexahedron
    HexMesh = 1,
}

/// Desired build strategy for PxMeshMidPhase::eBVH34
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxBVH34BuildStrategy {
    /// Fast build strategy. Fast build speed, good runtime performance in most cases. Recommended for runtime mesh cooking.
    Fast = 0,
    /// Default build strategy. Medium build speed, good runtime performance in all cases.
    Default = 1,
    /// SAH build strategy. Slower builds, slightly improved runtime performance in some cases.
    Sah = 2,
    Last = 3,
}

/// Result from convex cooking.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxConvexMeshCookingResult {
    /// Convex mesh cooking succeeded.
    Success = 0,
    /// Convex mesh cooking failed, algorithm couldn't find 4 initial vertices without a small triangle.
    ZeroAreaTestFailed = 1,
    /// Convex mesh cooking succeeded, but the algorithm has reached the 255 polygons limit.
    /// The produced hull does not contain all input vertices. Try to simplify the input vertices
    /// or try to use the eINFLATE_CONVEX or the eQUANTIZE_INPUT flags.
    PolygonsLimitReached = 2,
    /// Something unrecoverable happened. Check the error stream to find out what.
    Failure = 3,
}

/// Enumeration for convex mesh cooking algorithms.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxConvexMeshCookingType {
    /// The Quickhull algorithm constructs the hull from the given input points. The resulting hull
    /// will only contain a subset of the input points.
    Quickhull = 0,
}

/// Result from triangle mesh cooking
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxTriangleMeshCookingResult {
    /// Everything is A-OK.
    Success = 0,
    /// a triangle is too large for well-conditioned results. Tessellate the mesh for better behavior, see the user guide section on cooking for more details.
    LargeTriangle = 1,
    /// Something unrecoverable happened. Check the error stream to find out what.
    Failure = 2,
}

/// Enum for the set of mesh pre-processing parameters.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxMeshPreprocessingFlag {
    /// When set, mesh welding is performed. See PxCookingParams::meshWeldTolerance. Clean mesh must be enabled.
    WeldVertices = 1,
    /// When set, mesh cleaning is disabled. This makes cooking faster.
    ///
    /// When clean mesh is not performed, mesh welding is also not performed.
    ///
    /// It is recommended to use only meshes that passed during validateTriangleMesh.
    DisableCleanMesh = 2,
    /// When set, active edges are set for each triangle edge. This makes cooking faster but slow up contact generation.
    DisableActiveEdgesPrecompute = 4,
    /// When set, 32-bit indices will always be created regardless of triangle count.
    ///
    /// By default mesh will be created with 16-bit indices for triangle count
    /// <
    /// = 0xFFFF and 32-bit otherwise.
    Force32bitIndices = 8,
    /// When set, a list of triangles will be created for each associated vertex in the mesh
    EnableVertMapping = 16,
    /// When set, inertia tensor is calculated for the mesh
    EnableInertia = 32,
}

bitflags::bitflags! {
    /// Flags for [`PxMeshPreprocessingFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxMeshPreprocessingFlags: u32 {
        const WeldVertices = 1 << 0;
        const DisableCleanMesh = 1 << 1;
        const DisableActiveEdgesPrecompute = 1 << 2;
        const Force32bitIndices = 1 << 3;
        const EnableVertMapping = 1 << 4;
        const EnableInertia = 1 << 5;
    }
}

/// Unique identifiers for extensions classes which implement a constraint based on PxConstraint.
///
/// Users which want to create their own custom constraint types should choose an ID larger or equal to eNEXT_FREE_ID
/// and not eINVALID_ID.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxConstraintExtIDs {
    Joint = 0,
    VehicleSuspLimitDeprecated = 1,
    VehicleStickyTyreDeprecated = 2,
    VehicleJoint = 3,
    NextFreeId = 4,
    InvalidId = 2147483647,
}

/// an enumeration of PhysX' built-in joint types
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxJointConcreteType {
    Spherical = 256,
    Revolute = 257,
    Prismatic = 258,
    Fixed = 259,
    Distance = 260,
    D6 = 261,
    Contact = 262,
    Gear = 263,
    RackAndPinion = 264,
    Last = 265,
}

/// an enumeration for specifying one or other of the actors referenced by a joint
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxJointActorIndex {
    Actor0 = 0,
    Actor1 = 1,
    Count = 2,
}

/// flags for configuring the drive of a PxDistanceJoint
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxDistanceJointFlag {
    MaxDistanceEnabled = 2,
    MinDistanceEnabled = 4,
    SpringEnabled = 8,
}

bitflags::bitflags! {
    /// Flags for [`PxDistanceJointFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxDistanceJointFlags: u16 {
        const MaxDistanceEnabled = 1 << 1;
        const MinDistanceEnabled = 1 << 2;
        const SpringEnabled = 1 << 3;
    }
}

/// Flags specific to the prismatic joint.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxPrismaticJointFlag {
    LimitEnabled = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxPrismaticJointFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxPrismaticJointFlags: u16 {
        const LimitEnabled = 1 << 1;
    }
}

/// Flags specific to the Revolute Joint.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxRevoluteJointFlag {
    /// enable the limit
    LimitEnabled = 1,
    /// enable the drive
    DriveEnabled = 2,
    /// if the existing velocity is beyond the drive velocity, do not add force
    DriveFreespin = 4,
}

bitflags::bitflags! {
    /// Flags for [`PxRevoluteJointFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxRevoluteJointFlags: u16 {
        const LimitEnabled = 1 << 0;
        const DriveEnabled = 1 << 1;
        const DriveFreespin = 1 << 2;
    }
}

/// Flags specific to the spherical joint.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxSphericalJointFlag {
    /// the cone limit for the spherical joint is enabled
    LimitEnabled = 2,
}

bitflags::bitflags! {
    /// Flags for [`PxSphericalJointFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxSphericalJointFlags: u16 {
        const LimitEnabled = 1 << 1;
    }
}

/// Used to specify one of the degrees of freedom of  a D6 joint.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxD6Axis {
    /// motion along the X axis
    X = 0,
    /// motion along the Y axis
    Y = 1,
    /// motion along the Z axis
    Z = 2,
    /// motion around the X axis
    Twist = 3,
    /// motion around the Y axis
    Swing1 = 4,
    /// motion around the Z axis
    Swing2 = 5,
    Count = 6,
}

/// Used to specify the range of motions allowed for a degree of freedom in a D6 joint.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxD6Motion {
    /// The DOF is locked, it does not allow relative motion.
    Locked = 0,
    /// The DOF is limited, it only allows motion within a specific range.
    Limited = 1,
    /// The DOF is free and has its full range of motion.
    Free = 2,
}

/// Used to specify which axes of a D6 joint are driven.
///
/// Each drive is an implicit force-limited damped spring:
///
/// force = spring * (target position - position) + damping * (targetVelocity - velocity)
///
/// Alternatively, the spring may be configured to generate a specified acceleration instead of a force.
///
/// A linear axis is affected by drive only if the corresponding drive flag is set. There are two possible models
/// for angular drive: swing/twist, which may be used to drive one or more angular degrees of freedom, or slerp,
/// which may only be used to drive all three angular degrees simultaneously.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxD6Drive {
    /// drive along the X-axis
    X = 0,
    /// drive along the Y-axis
    Y = 1,
    /// drive along the Z-axis
    Z = 2,
    /// drive of displacement from the X-axis
    Swing = 3,
    /// drive of the displacement around the X-axis
    Twist = 4,
    /// drive of all three angular degrees along a SLERP-path
    Slerp = 5,
    Count = 6,
}

impl From<usize> for PxD6Drive {
    fn from(val: usize) -> Self {
        #[allow(clippy::match_same_arms)]
        match val {
            0 => Self::X,
            1 => Self::Y,
            2 => Self::Z,
            3 => Self::Swing,
            4 => Self::Twist,
            5 => Self::Slerp,
            6 => Self::Count,
            _ => Self::Count,
        }
    }
}

/// flags for configuring the drive model of a PxD6Joint
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxD6JointDriveFlag {
    /// drive spring is for the acceleration at the joint (rather than the force)
    Acceleration = 1,
}

bitflags::bitflags! {
    /// Flags for [`PxD6JointDriveFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxD6JointDriveFlags: u32 {
        const Acceleration = 1 << 0;
    }
}

/// Collision filtering operations.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxFilterOp {
    PxFilteropAnd = 0,
    PxFilteropOr = 1,
    PxFilteropXor = 2,
    PxFilteropNand = 3,
    PxFilteropNor = 4,
    PxFilteropNxor = 5,
    PxFilteropSwapAnd = 6,
}

/// If a thread ends up waiting for work it will find itself in a spin-wait loop until work becomes available.
/// Three strategies are available to limit wasted cycles.
/// The strategies are as follows:
/// a) wait until a work task signals the end of the spin-wait period.
/// b) yield the thread by providing a hint to reschedule thread execution, thereby allowing other threads to run.
/// c) yield the processor by informing it that it is waiting for work and requesting it to more efficiently use compute resources.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxDefaultCpuDispatcherWaitForWorkMode {
    WaitForWork = 0,
    YieldThread = 1,
    YieldProcessor = 2,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxBatchQueryStatus {
    /// This is the initial state before a query starts.
    Pending = 0,
    /// The query is finished; results have been written into the result and hit buffers.
    Success = 1,
    /// The query results were incomplete due to touch hit buffer overflow. Blocking hit is still correct.
    Overflow = 2,
}

/// types of instrumentation that PVD can do.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(i32)]
pub enum PxPvdInstrumentationFlag {
    /// Send debugging information to PVD.
    ///
    /// This information is the actual object data of the rigid statics, shapes,
    /// articulations, etc.  Sending this information has a noticeable impact on
    /// performance and thus this flag should not be set if you want an accurate
    /// performance profile.
    Debug = 1,
    /// Send profile information to PVD.
    ///
    /// This information populates PVD's profile view.  It has (at this time) negligible
    /// cost compared to Debug information and makes PVD *much* more useful so it is quite
    /// highly recommended.
    ///
    /// This flag works together with a PxCreatePhysics parameter.
    /// Using it allows the SDK to send profile events to PVD.
    Profile = 2,
    /// Send memory information to PVD.
    ///
    /// The PVD sdk side hooks into the Foundation memory controller and listens to
    /// allocation/deallocation events.  This has a noticable hit on the first frame,
    /// however, this data is somewhat compressed and the PhysX SDK doesn't allocate much
    /// once it hits a steady state.  This information also has a fairly negligible
    /// impact and thus is also highly recommended.
    ///
    /// This flag works together with a PxCreatePhysics parameter,
    /// trackOutstandingAllocations.  Using both of them together allows users to have
    /// an accurate view of the overall memory usage of the simulation at the cost of
    /// a hashtable lookup per allocation/deallocation.  Again, PhysX makes a best effort
    /// attempt not to allocate or deallocate during simulation so this hashtable lookup
    /// tends to have no effect past the first frame.
    ///
    /// Sending memory information without tracking outstanding allocations means that
    /// PVD will accurate information about the state of the memory system before the
    /// actual connection happened.
    Memory = 4,
    /// Send memory information to PVD.
    ///
    /// The PVD sdk side hooks into the Foundation memory controller and listens to
    /// allocation/deallocation events.  This has a noticable hit on the first frame,
    /// however, this data is somewhat compressed and the PhysX SDK doesn't allocate much
    /// once it hits a steady state.  This information also has a fairly negligible
    /// impact and thus is also highly recommended.
    ///
    /// This flag works together with a PxCreatePhysics parameter,
    /// trackOutstandingAllocations.  Using both of them together allows users to have
    /// an accurate view of the overall memory usage of the simulation at the cost of
    /// a hashtable lookup per allocation/deallocation.  Again, PhysX makes a best effort
    /// attempt not to allocate or deallocate during simulation so this hashtable lookup
    /// tends to have no effect past the first frame.
    ///
    /// Sending memory information without tracking outstanding allocations means that
    /// PVD will accurate information about the state of the memory system before the
    /// actual connection happened.
    All = 7,
}

bitflags::bitflags! {
    /// Flags for [`PxPvdInstrumentationFlag`]
    #[derive(Default)]
    #[repr(transparent)]
    pub struct PxPvdInstrumentationFlags: u8 {
        const Debug = 1 << 0;
        const Profile = 1 << 1;
        const Memory = 1 << 2;
        const All = Self::Debug.bits | Self::Profile.bits | Self::Memory.bits;
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxMat34 {
    _unused: [u8; 0],
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxAllocatorCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxAssertHandler {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxFoundation {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxVirtualAllocatorCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[repr(C)]
pub union PxTempAllocatorChunk {
    pub mNext: *mut PxTempAllocatorChunk,
    pub mIndex: u32,
    pub mPad: [u8; 16],
}
#[cfg(feature = "debug-structs")]
impl std::fmt::Debug for PxTempAllocatorChunk {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str("PxTempAllocatorChunk")
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxLogTwo {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxUnConst {
    _unused: [u8; 0],
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxErrorCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxAllocationListener {
    vtable_: *const std::ffi::c_void,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxHash {
    _unused: [u8; 0],
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxInputStream {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxInputData {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxOutputStream {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxProfilerCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxRunnable {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxRenderBuffer {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxProcessPxBaseCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxSerializationContext {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxSerializationRegistry {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxCollection {
    vtable_: *const std::ffi::c_void,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxTypeInfo {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxFEMSoftBodyMaterial {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxFEMClothMaterial {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxPBDMaterial {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxFLIPMaterial {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxMPMMaterial {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxCustomMaterial {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxBVH33TriangleMesh {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxParticleSystem {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxPBDParticleSystem {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxFLIPParticleSystem {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxMPMParticleSystem {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxCustomParticleSystem {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxSoftBody {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxFEMCloth {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxHairSystem {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxParticleBuffer {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxParticleAndDiffuseBuffer {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxParticleClothBuffer {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxParticleRigidBuffer {
    _unused: [u8; 0],
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxStringTable {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxSerializer {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxInsertionCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxTaskManager {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxCpuDispatcher {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxBVHRaycastCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxBVHOverlapCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxBVHTraversalCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxContactBuffer {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxRenderOutput {
    _unused: [u8; 0],
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxCustomGeometryCallbacks {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[repr(C)]
pub union Px1DConstraintMods {
    pub spring: PxSpringModifiers,
    pub bounce: PxRestitutionModifiers,
}
#[cfg(feature = "debug-structs")]
impl std::fmt::Debug for Px1DConstraintMods {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str("Px1DConstraintMods")
    }
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxConstraintVisualizer {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxConstraintConnector {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxConstraintAllocator {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxContactModifyCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxCCDContactModifyCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxDeletionListener {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxSimulationFilterCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxLockedData {
    vtable_: *const std::ffi::c_void,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxCudaContextManager {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxParticleRigidAttachment {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxOmniPvd {
    _unused: [u8; 0],
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxPhysics {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxQueryFilterCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxSceneQuerySystemBase {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxSceneSQSystem {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxSceneQuerySystem {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxBroadPhaseRegions {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxBroadPhase {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxAABBManager {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxPvdSceneClient {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxBroadPhaseCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxSimulationEventCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxObstacleContext {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxUserControllerHitReport {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxControllerFilterCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxController {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxBoxController {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxCapsuleController {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxControllerBehaviorCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxControllerManager {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxDefaultAllocator {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxDefaultErrorCallback {
    vtable_: *const std::ffi::c_void,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxBinaryConverter {
    _unused: [u8; 0],
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxDefaultCpuDispatcher {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxBatchQueryExt {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxCustomSceneQuerySystem {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxCustomSceneQuerySystemAdapter {
    vtable_: *const std::ffi::c_void,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxCooking {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct XmlMemoryAllocator {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct XmlWriter {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct XmlReader {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct MemoryBuffer {
    _unused: [u8; 0],
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxRepXSerializer {
    vtable_: *const std::ffi::c_void,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxVehicleWheels4SimData {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxVehicleWheels4DynData {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxVehicleTireForceCalculator {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxVehicleDrivableSurfaceToTireFrictionPairs {
    _unused: [u8; 0],
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct PxVehicleTelemetryData {
    _unused: [u8; 0],
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxPvd {
    vtable_: *const std::ffi::c_void,
}

#[derive(Clone, Copy)]
#[cfg_attr(feature = "debug-structs", derive(Debug))]
#[repr(C)]
pub struct PxPvdTransport {
    vtable_: *const std::ffi::c_void,
}
extern "C" {
    pub fn PxAllocatorCallback_delete(self_: *mut PxAllocatorCallback);

    /// Allocates size bytes of memory, which must be 16-byte aligned.
    ///
    /// This method should never return NULL.  If you run out of memory, then
    /// you should terminate the app or take some other appropriate action.
    ///
    /// Threading:
    /// This function should be thread safe as it can be called in the context of the user thread
    /// and physics processing thread(s).
    ///
    /// The allocated block of memory.
    pub fn PxAllocatorCallback_allocate_mut(self_: *mut PxAllocatorCallback, size: usize, typeName: *const std::ffi::c_char, filename: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;

    /// Frees memory previously allocated by allocate().
    ///
    /// Threading:
    /// This function should be thread safe as it can be called in the context of the user thread
    /// and physics processing thread(s).
    pub fn PxAllocatorCallback_deallocate_mut(self_: *mut PxAllocatorCallback, ptr: *mut std::ffi::c_void);

    pub fn PxAssertHandler_delete(self_: *mut PxAssertHandler);

    pub fn phys_PxGetAssertHandler() -> *mut PxAssertHandler;

    pub fn phys_PxSetAssertHandler(handler: *mut PxAssertHandler);

    /// Destroys the instance it is called on.
    ///
    /// The operation will fail, if there are still modules referencing the foundation object. Release all dependent modules
    /// prior to calling this method.
    pub fn PxFoundation_release_mut(self_: *mut PxFoundation);

    /// retrieves error callback
    pub fn PxFoundation_getErrorCallback_mut(self_: *mut PxFoundation) -> *mut PxErrorCallback;

    /// Sets mask of errors to report.
    pub fn PxFoundation_setErrorLevel_mut(self_: *mut PxFoundation, mask: u32);

    /// Retrieves mask of errors to be reported.
    pub fn PxFoundation_getErrorLevel(self_: *const PxFoundation) -> u32;

    /// Retrieves the allocator this object was created with.
    pub fn PxFoundation_getAllocatorCallback_mut(self_: *mut PxFoundation) -> *mut PxAllocatorCallback;

    /// Retrieves if allocation names are being passed to allocator callback.
    pub fn PxFoundation_getReportAllocationNames(self_: *const PxFoundation) -> bool;

    /// Set if allocation names are being passed to allocator callback.
    ///
    /// Enabled by default in debug and checked build, disabled by default in profile and release build.
    pub fn PxFoundation_setReportAllocationNames_mut(self_: *mut PxFoundation, value: bool);

    pub fn PxFoundation_registerAllocationListener_mut(self_: *mut PxFoundation, listener: *mut PxAllocationListener);

    pub fn PxFoundation_deregisterAllocationListener_mut(self_: *mut PxFoundation, listener: *mut PxAllocationListener);

    pub fn PxFoundation_registerErrorCallback_mut(self_: *mut PxFoundation, callback: *mut PxErrorCallback);

    pub fn PxFoundation_deregisterErrorCallback_mut(self_: *mut PxFoundation, callback: *mut PxErrorCallback);

    /// Creates an instance of the foundation class
    ///
    /// The foundation class is needed to initialize higher level SDKs. There may be only one instance per process.
    /// Calling this method after an instance has been created already will result in an error message and NULL will be
    /// returned.
    ///
    /// Foundation instance on success, NULL if operation failed
    pub fn phys_PxCreateFoundation(version: u32, allocator: *mut PxAllocatorCallback, errorCallback: *mut PxErrorCallback) -> *mut PxFoundation;

    pub fn phys_PxSetFoundationInstance(foundation: *mut PxFoundation);

    pub fn phys_PxGetFoundation() -> *mut PxFoundation;

    /// Get the callback that will be used for all profiling.
    pub fn phys_PxGetProfilerCallback() -> *mut PxProfilerCallback;

    /// Set the callback that will be used for all profiling.
    pub fn phys_PxSetProfilerCallback(profiler: *mut PxProfilerCallback);

    /// Get the allocator callback
    pub fn phys_PxGetAllocatorCallback() -> *mut PxAllocatorCallback;

    /// Get the broadcasting allocator callback
    pub fn phys_PxGetBroadcastAllocator() -> *mut PxAllocatorCallback;

    /// Get the error callback
    pub fn phys_PxGetErrorCallback() -> *mut PxErrorCallback;

    /// Get the broadcasting error callback
    pub fn phys_PxGetBroadcastError() -> *mut PxErrorCallback;

    /// Get the warn once timestamp
    pub fn phys_PxGetWarnOnceTimeStamp() -> u32;

    /// Decrement the ref count of PxFoundation
    pub fn phys_PxDecFoundationRefCount();

    /// Increment the ref count of PxFoundation
    pub fn phys_PxIncFoundationRefCount();

    pub fn PxAllocator_new(anon_param0: *const std::ffi::c_char) -> PxAllocator;

    pub fn PxAllocator_allocate_mut(self_: *mut PxAllocator, size: usize, file: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;

    pub fn PxAllocator_deallocate_mut(self_: *mut PxAllocator, ptr: *mut std::ffi::c_void);

    pub fn PxRawAllocator_new(anon_param0: *const std::ffi::c_char) -> PxRawAllocator;

    pub fn PxRawAllocator_allocate_mut(self_: *mut PxRawAllocator, size: usize, anon_param1: *const std::ffi::c_char, anon_param2: i32) -> *mut std::ffi::c_void;

    pub fn PxRawAllocator_deallocate_mut(self_: *mut PxRawAllocator, ptr: *mut std::ffi::c_void);

    pub fn PxVirtualAllocatorCallback_delete(self_: *mut PxVirtualAllocatorCallback);

    pub fn PxVirtualAllocatorCallback_allocate_mut(self_: *mut PxVirtualAllocatorCallback, size: usize, group: i32, file: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;

    pub fn PxVirtualAllocatorCallback_deallocate_mut(self_: *mut PxVirtualAllocatorCallback, ptr: *mut std::ffi::c_void);

    pub fn PxVirtualAllocator_new(callback: *mut PxVirtualAllocatorCallback, group: i32) -> PxVirtualAllocator;

    pub fn PxVirtualAllocator_allocate_mut(self_: *mut PxVirtualAllocator, size: usize, file: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;

    pub fn PxVirtualAllocator_deallocate_mut(self_: *mut PxVirtualAllocator, ptr: *mut std::ffi::c_void);

    pub fn PxTempAllocatorChunk_new() -> PxTempAllocatorChunk;

    pub fn PxTempAllocator_new(anon_param0: *const std::ffi::c_char) -> PxTempAllocator;

    pub fn PxTempAllocator_allocate_mut(self_: *mut PxTempAllocator, size: usize, file: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;

    pub fn PxTempAllocator_deallocate_mut(self_: *mut PxTempAllocator, ptr: *mut std::ffi::c_void);

    /// Sets the bytes of the provided buffer to zero.
    ///
    /// Pointer to memory block (same as input)
    pub fn phys_PxMemZero(dest: *mut std::ffi::c_void, count: u32) -> *mut std::ffi::c_void;

    /// Sets the bytes of the provided buffer to the specified value.
    ///
    /// Pointer to memory block (same as input)
    pub fn phys_PxMemSet(dest: *mut std::ffi::c_void, c: i32, count: u32) -> *mut std::ffi::c_void;

    /// Copies the bytes of one memory block to another. The memory blocks must not overlap.
    ///
    /// Use [`PxMemMove`] if memory blocks overlap.
    ///
    /// Pointer to destination memory block
    pub fn phys_PxMemCopy(dest: *mut std::ffi::c_void, src: *const std::ffi::c_void, count: u32) -> *mut std::ffi::c_void;

    /// Copies the bytes of one memory block to another. The memory blocks can overlap.
    ///
    /// Use [`PxMemCopy`] if memory blocks do not overlap.
    ///
    /// Pointer to destination memory block
    pub fn phys_PxMemMove(dest: *mut std::ffi::c_void, src: *const std::ffi::c_void, count: u32) -> *mut std::ffi::c_void;

    /// Mark a specified amount of memory with 0xcd pattern. This is used to check that the meta data
    /// definition for serialized classes is complete in checked builds.
    pub fn phys_PxMarkSerializedMemory(ptr: *mut std::ffi::c_void, byteSize: u32);

    pub fn phys_PxMemoryBarrier();

    /// Return the index of the highest set bit. Undefined for zero arg.
    pub fn phys_PxHighestSetBitUnsafe(v: u32) -> u32;

    /// Return the index of the highest set bit. Undefined for zero arg.
    pub fn phys_PxLowestSetBitUnsafe(v: u32) -> u32;

    /// Returns the index of the highest set bit. Returns 32 for v=0.
    pub fn phys_PxCountLeadingZeros(v: u32) -> u32;

    /// Prefetch aligned 64B x86, 32b ARM around
    pub fn phys_PxPrefetchLine(ptr: *const std::ffi::c_void, offset: u32);

    /// Prefetch
    /// bytes starting at
    pub fn phys_PxPrefetch(ptr: *const std::ffi::c_void, count: u32);

    pub fn phys_PxBitCount(v: u32) -> u32;

    pub fn phys_PxIsPowerOfTwo(x: u32) -> bool;

    pub fn phys_PxNextPowerOfTwo(x: u32) -> u32;

    /// Return the index of the highest set bit. Not valid for zero arg.
    pub fn phys_PxLowestSetBit(x: u32) -> u32;

    /// Return the index of the highest set bit. Not valid for zero arg.
    pub fn phys_PxHighestSetBit(x: u32) -> u32;

    pub fn phys_PxILog2(num: u32) -> u32;

    /// default constructor leaves data uninitialized.
    pub fn PxVec3_new() -> PxVec3;

    /// zero constructor.
    pub fn PxVec3_new_1(anon_param0: PxZERO) -> PxVec3;

    /// Assigns scalar parameter to all elements.
    ///
    /// Useful to initialize to zero or one.
    pub fn PxVec3_new_2(a: f32) -> PxVec3;

    /// Initializes from 3 scalar parameters.
    pub fn PxVec3_new_3(nx: f32, ny: f32, nz: f32) -> PxVec3;

    /// tests for exact zero vector
    pub fn PxVec3_isZero(self_: *const PxVec3) -> bool;

    /// returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)
    pub fn PxVec3_isFinite(self_: *const PxVec3) -> bool;

    /// is normalized - used by API parameter validation
    pub fn PxVec3_isNormalized(self_: *const PxVec3) -> bool;

    /// returns the squared magnitude
    ///
    /// Avoids calling PxSqrt()!
    pub fn PxVec3_magnitudeSquared(self_: *const PxVec3) -> f32;

    /// returns the magnitude
    pub fn PxVec3_magnitude(self_: *const PxVec3) -> f32;

    /// returns the scalar product of this and other.
    pub fn PxVec3_dot(self_: *const PxVec3, v: *const PxVec3) -> f32;

    /// cross product
    pub fn PxVec3_cross(self_: *const PxVec3, v: *const PxVec3) -> PxVec3;

    /// returns a unit vector
    pub fn PxVec3_getNormalized(self_: *const PxVec3) -> PxVec3;

    /// normalizes the vector in place
    pub fn PxVec3_normalize_mut(self_: *mut PxVec3) -> f32;

    /// normalizes the vector in place. Does nothing if vector magnitude is under PX_NORMALIZATION_EPSILON.
    /// Returns vector magnitude if >= PX_NORMALIZATION_EPSILON and 0.0f otherwise.
    pub fn PxVec3_normalizeSafe_mut(self_: *mut PxVec3) -> f32;

    /// normalizes the vector in place. Asserts if vector magnitude is under PX_NORMALIZATION_EPSILON.
    /// returns vector magnitude.
    pub fn PxVec3_normalizeFast_mut(self_: *mut PxVec3) -> f32;

    /// a[i] * b[i], for all i.
    pub fn PxVec3_multiply(self_: *const PxVec3, a: *const PxVec3) -> PxVec3;

    /// element-wise minimum
    pub fn PxVec3_minimum(self_: *const PxVec3, v: *const PxVec3) -> PxVec3;

    /// returns MIN(x, y, z);
    pub fn PxVec3_minElement(self_: *const PxVec3) -> f32;

    /// element-wise maximum
    pub fn PxVec3_maximum(self_: *const PxVec3, v: *const PxVec3) -> PxVec3;

    /// returns MAX(x, y, z);
    pub fn PxVec3_maxElement(self_: *const PxVec3) -> f32;

    /// returns absolute values of components;
    pub fn PxVec3_abs(self_: *const PxVec3) -> PxVec3;

    pub fn PxVec3Padded_new_alloc() -> *mut PxVec3Padded;

    pub fn PxVec3Padded_delete(self_: *mut PxVec3Padded);

    pub fn PxVec3Padded_new_alloc_1(p: *const PxVec3) -> *mut PxVec3Padded;

    pub fn PxVec3Padded_new_alloc_2(f: f32) -> *mut PxVec3Padded;

    /// Default constructor, does not do any initialization.
    pub fn PxQuat_new() -> PxQuat;

    /// identity constructor
    pub fn PxQuat_new_1(anon_param0: PxIDENTITY) -> PxQuat;

    /// Constructor from a scalar: sets the real part w to the scalar value, and the imaginary parts (x,y,z) to zero
    pub fn PxQuat_new_2(r: f32) -> PxQuat;

    /// Constructor. Take note of the order of the elements!
    pub fn PxQuat_new_3(nx: f32, ny: f32, nz: f32, nw: f32) -> PxQuat;

    /// Creates from angle-axis representation.
    ///
    /// Axis must be normalized!
    ///
    /// Angle is in radians!
    ///
    /// Unit:
    /// Radians
    pub fn PxQuat_new_4(angleRadians: f32, unitAxis: *const PxVec3) -> PxQuat;

    /// Creates from orientation matrix.
    pub fn PxQuat_new_5(m: *const PxMat33) -> PxQuat;

    /// returns true if quat is identity
    pub fn PxQuat_isIdentity(self_: *const PxQuat) -> bool;

    /// returns true if all elements are finite (not NAN or INF, etc.)
    pub fn PxQuat_isFinite(self_: *const PxQuat) -> bool;

    /// returns true if finite and magnitude is close to unit
    pub fn PxQuat_isUnit(self_: *const PxQuat) -> bool;

    /// returns true if finite and magnitude is reasonably close to unit to allow for some accumulation of error vs
    /// isValid
    pub fn PxQuat_isSane(self_: *const PxQuat) -> bool;

    /// converts this quaternion to angle-axis representation
    pub fn PxQuat_toRadiansAndUnitAxis(self_: *const PxQuat, angle: *mut f32, axis: *mut PxVec3);

    /// Gets the angle between this quat and the identity quaternion.
    ///
    /// Unit:
    /// Radians
    pub fn PxQuat_getAngle(self_: *const PxQuat) -> f32;

    /// Gets the angle between this quat and the argument
    ///
    /// Unit:
    /// Radians
    pub fn PxQuat_getAngle_1(self_: *const PxQuat, q: *const PxQuat) -> f32;

    /// This is the squared 4D vector length, should be 1 for unit quaternions.
    pub fn PxQuat_magnitudeSquared(self_: *const PxQuat) -> f32;

    /// returns the scalar product of this and other.
    pub fn PxQuat_dot(self_: *const PxQuat, v: *const PxQuat) -> f32;

    pub fn PxQuat_getNormalized(self_: *const PxQuat) -> PxQuat;

    pub fn PxQuat_magnitude(self_: *const PxQuat) -> f32;

    /// maps to the closest unit quaternion.
    pub fn PxQuat_normalize_mut(self_: *mut PxQuat) -> f32;

    pub fn PxQuat_getConjugate(self_: *const PxQuat) -> PxQuat;

    pub fn PxQuat_getImaginaryPart(self_: *const PxQuat) -> PxVec3;

    /// brief computes rotation of x-axis
    pub fn PxQuat_getBasisVector0(self_: *const PxQuat) -> PxVec3;

    /// brief computes rotation of y-axis
    pub fn PxQuat_getBasisVector1(self_: *const PxQuat) -> PxVec3;

    /// brief computes rotation of z-axis
    pub fn PxQuat_getBasisVector2(self_: *const PxQuat) -> PxVec3;

    /// rotates passed vec by this (assumed unitary)
    pub fn PxQuat_rotate(self_: *const PxQuat, v: *const PxVec3) -> PxVec3;

    /// inverse rotates passed vec by this (assumed unitary)
    pub fn PxQuat_rotateInv(self_: *const PxQuat, v: *const PxVec3) -> PxVec3;

    pub fn PxTransform_new() -> PxTransform;

    pub fn PxTransform_new_1(position: *const PxVec3) -> PxTransform;

    pub fn PxTransform_new_2(anon_param0: PxIDENTITY) -> PxTransform;

    pub fn PxTransform_new_3(orientation: *const PxQuat) -> PxTransform;

    pub fn PxTransform_new_4(x: f32, y: f32, z: f32, aQ: PxQuat) -> PxTransform;

    pub fn PxTransform_new_5(p0: *const PxVec3, q0: *const PxQuat) -> PxTransform;

    pub fn PxTransform_new_6(m: *const PxMat44) -> PxTransform;

    pub fn PxTransform_getInverse(self_: *const PxTransform) -> PxTransform;

    pub fn PxTransform_transform(self_: *const PxTransform, input: *const PxVec3) -> PxVec3;

    pub fn PxTransform_transformInv(self_: *const PxTransform, input: *const PxVec3) -> PxVec3;

    pub fn PxTransform_rotate(self_: *const PxTransform, input: *const PxVec3) -> PxVec3;

    pub fn PxTransform_rotateInv(self_: *const PxTransform, input: *const PxVec3) -> PxVec3;

    /// Transform transform to parent (returns compound transform: first src, then *this)
    pub fn PxTransform_transform_1(self_: *const PxTransform, src: *const PxTransform) -> PxTransform;

    /// returns true if finite and q is a unit quaternion
    pub fn PxTransform_isValid(self_: *const PxTransform) -> bool;

    /// returns true if finite and quat magnitude is reasonably close to unit to allow for some accumulation of error
    /// vs isValid
    pub fn PxTransform_isSane(self_: *const PxTransform) -> bool;

    /// returns true if all elems are finite (not NAN or INF, etc.)
    pub fn PxTransform_isFinite(self_: *const PxTransform) -> bool;

    /// Transform transform from parent (returns compound transform: first src, then this->inverse)
    pub fn PxTransform_transformInv_1(self_: *const PxTransform, src: *const PxTransform) -> PxTransform;

    /// return a normalized transform (i.e. one in which the quaternion has unit magnitude)
    pub fn PxTransform_getNormalized(self_: *const PxTransform) -> PxTransform;

    /// Default constructor
    pub fn PxMat33_new() -> PxMat33;

    /// identity constructor
    pub fn PxMat33_new_1(anon_param0: PxIDENTITY) -> PxMat33;

    /// zero constructor
    pub fn PxMat33_new_2(anon_param0: PxZERO) -> PxMat33;

    /// Construct from three base vectors
    pub fn PxMat33_new_3(col0: *const PxVec3, col1: *const PxVec3, col2: *const PxVec3) -> PxMat33;

    /// constructor from a scalar, which generates a multiple of the identity matrix
    pub fn PxMat33_new_4(r: f32) -> PxMat33;

    /// Construct from float[9]
    pub fn PxMat33_new_5(values: *mut f32) -> PxMat33;

    /// Construct from a quaternion
    pub fn PxMat33_new_6(q: *const PxQuat) -> PxMat33;

    /// Construct from diagonal, off-diagonals are zero.
    pub fn PxMat33_createDiagonal(d: *const PxVec3) -> PxMat33;

    /// Computes the outer product of two vectors
    pub fn PxMat33_outer(a: *const PxVec3, b: *const PxVec3) -> PxMat33;

    /// Get transposed matrix
    pub fn PxMat33_getTranspose(self_: *const PxMat33) -> PxMat33;

    /// Get the real inverse
    pub fn PxMat33_getInverse(self_: *const PxMat33) -> PxMat33;

    /// Get determinant
    pub fn PxMat33_getDeterminant(self_: *const PxMat33) -> f32;

    /// Transform vector by matrix, equal to v' = M*v
    pub fn PxMat33_transform(self_: *const PxMat33, other: *const PxVec3) -> PxVec3;

    /// Transform vector by matrix transpose, v' = M^t*v
    pub fn PxMat33_transformTranspose(self_: *const PxMat33, other: *const PxVec3) -> PxVec3;

    pub fn PxMat33_front(self_: *const PxMat33) -> *const f32;

    /// Default constructor, not performing any initialization for performance reason.
    ///
    /// Use empty() function below to construct empty bounds.
    pub fn PxBounds3_new() -> PxBounds3;

    /// Construct from two bounding points
    pub fn PxBounds3_new_1(minimum: *const PxVec3, maximum: *const PxVec3) -> PxBounds3;

    /// Return empty bounds.
    pub fn PxBounds3_empty() -> PxBounds3;

    /// returns the AABB containing v0 and v1.
    pub fn PxBounds3_boundsOfPoints(v0: *const PxVec3, v1: *const PxVec3) -> PxBounds3;

    /// returns the AABB from center and extents vectors.
    pub fn PxBounds3_centerExtents(center: *const PxVec3, extent: *const PxVec3) -> PxBounds3;

    /// Construct from center, extent, and (not necessarily orthogonal) basis
    pub fn PxBounds3_basisExtent(center: *const PxVec3, basis: *const PxMat33, extent: *const PxVec3) -> PxBounds3;

    /// Construct from pose and extent
    pub fn PxBounds3_poseExtent(pose: *const PxTransform, extent: *const PxVec3) -> PxBounds3;

    /// gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
    ///
    /// This version is safe to call for empty bounds.
    pub fn PxBounds3_transformSafe(matrix: *const PxMat33, bounds: *const PxBounds3) -> PxBounds3;

    /// gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
    ///
    /// Calling this method for empty bounds leads to undefined behavior. Use [`transformSafe`]() instead.
    pub fn PxBounds3_transformFast(matrix: *const PxMat33, bounds: *const PxBounds3) -> PxBounds3;

    /// gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
    ///
    /// This version is safe to call for empty bounds.
    pub fn PxBounds3_transformSafe_1(transform: *const PxTransform, bounds: *const PxBounds3) -> PxBounds3;

    /// gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
    ///
    /// Calling this method for empty bounds leads to undefined behavior. Use [`transformSafe`]() instead.
    pub fn PxBounds3_transformFast_1(transform: *const PxTransform, bounds: *const PxBounds3) -> PxBounds3;

    /// Sets empty to true
    pub fn PxBounds3_setEmpty_mut(self_: *mut PxBounds3);

    /// Sets the bounds to maximum size [-PX_MAX_BOUNDS_EXTENTS, PX_MAX_BOUNDS_EXTENTS].
    pub fn PxBounds3_setMaximal_mut(self_: *mut PxBounds3);

    /// expands the volume to include v
    pub fn PxBounds3_include_mut(self_: *mut PxBounds3, v: *const PxVec3);

    /// expands the volume to include b.
    pub fn PxBounds3_include_mut_1(self_: *mut PxBounds3, b: *const PxBounds3);

    pub fn PxBounds3_isEmpty(self_: *const PxBounds3) -> bool;

    /// indicates whether the intersection of this and b is empty or not.
    pub fn PxBounds3_intersects(self_: *const PxBounds3, b: *const PxBounds3) -> bool;

    /// computes the 1D-intersection between two AABBs, on a given axis.
    pub fn PxBounds3_intersects1D(self_: *const PxBounds3, a: *const PxBounds3, axis: u32) -> bool;

    /// indicates if these bounds contain v.
    pub fn PxBounds3_contains(self_: *const PxBounds3, v: *const PxVec3) -> bool;

    /// checks a box is inside another box.
    pub fn PxBounds3_isInside(self_: *const PxBounds3, box_: *const PxBounds3) -> bool;

    /// returns the center of this axis aligned box.
    pub fn PxBounds3_getCenter(self_: *const PxBounds3) -> PxVec3;

    /// get component of the box's center along a given axis
    pub fn PxBounds3_getCenter_1(self_: *const PxBounds3, axis: u32) -> f32;

    /// get component of the box's extents along a given axis
    pub fn PxBounds3_getExtents(self_: *const PxBounds3, axis: u32) -> f32;

    /// returns the dimensions (width/height/depth) of this axis aligned box.
    pub fn PxBounds3_getDimensions(self_: *const PxBounds3) -> PxVec3;

    /// returns the extents, which are half of the width/height/depth.
    pub fn PxBounds3_getExtents_1(self_: *const PxBounds3) -> PxVec3;

    /// scales the AABB.
    ///
    /// This version is safe to call for empty bounds.
    pub fn PxBounds3_scaleSafe_mut(self_: *mut PxBounds3, scale: f32);

    /// scales the AABB.
    ///
    /// Calling this method for empty bounds leads to undefined behavior. Use [`scaleSafe`]() instead.
    pub fn PxBounds3_scaleFast_mut(self_: *mut PxBounds3, scale: f32);

    /// fattens the AABB in all 3 dimensions by the given distance.
    ///
    /// This version is safe to call for empty bounds.
    pub fn PxBounds3_fattenSafe_mut(self_: *mut PxBounds3, distance: f32);

    /// fattens the AABB in all 3 dimensions by the given distance.
    ///
    /// Calling this method for empty bounds leads to undefined behavior. Use [`fattenSafe`]() instead.
    pub fn PxBounds3_fattenFast_mut(self_: *mut PxBounds3, distance: f32);

    /// checks that the AABB values are not NaN
    pub fn PxBounds3_isFinite(self_: *const PxBounds3) -> bool;

    /// checks that the AABB values describe a valid configuration.
    pub fn PxBounds3_isValid(self_: *const PxBounds3) -> bool;

    /// Finds the closest point in the box to the point p. If p is contained, this will be p, otherwise it
    /// will be the closest point on the surface of the box.
    pub fn PxBounds3_closestPoint(self_: *const PxBounds3, p: *const PxVec3) -> PxVec3;

    pub fn PxErrorCallback_delete(self_: *mut PxErrorCallback);

    /// Reports an error code.
    pub fn PxErrorCallback_reportError_mut(self_: *mut PxErrorCallback, code: PxErrorCode, message: *const std::ffi::c_char, file: *const std::ffi::c_char, line: i32);

    /// callback when memory is allocated.
    pub fn PxAllocationListener_onAllocation_mut(self_: *mut PxAllocationListener, size: usize, typeName: *const std::ffi::c_char, filename: *const std::ffi::c_char, line: i32, allocatedMemory: *mut std::ffi::c_void);

    /// callback when memory is deallocated.
    pub fn PxAllocationListener_onDeallocation_mut(self_: *mut PxAllocationListener, allocatedMemory: *mut std::ffi::c_void);

    /// The default constructor.
    pub fn PxBroadcastingAllocator_new_alloc(allocator: *mut PxAllocatorCallback, error: *mut PxErrorCallback) -> *mut PxBroadcastingAllocator;

    /// The default constructor.
    pub fn PxBroadcastingAllocator_delete(self_: *mut PxBroadcastingAllocator);

    /// Allocates size bytes of memory, which must be 16-byte aligned.
    ///
    /// This method should never return NULL.  If you run out of memory, then
    /// you should terminate the app or take some other appropriate action.
    ///
    /// Threading:
    /// This function should be thread safe as it can be called in the context of the user thread
    /// and physics processing thread(s).
    ///
    /// The allocated block of memory.
    pub fn PxBroadcastingAllocator_allocate_mut(self_: *mut PxBroadcastingAllocator, size: usize, typeName: *const std::ffi::c_char, filename: *const std::ffi::c_char, line: i32) -> *mut std::ffi::c_void;

    /// Frees memory previously allocated by allocate().
    ///
    /// Threading:
    /// This function should be thread safe as it can be called in the context of the user thread
    /// and physics processing thread(s).
    pub fn PxBroadcastingAllocator_deallocate_mut(self_: *mut PxBroadcastingAllocator, ptr: *mut std::ffi::c_void);

    /// The default constructor.
    pub fn PxBroadcastingErrorCallback_new_alloc(errorCallback: *mut PxErrorCallback) -> *mut PxBroadcastingErrorCallback;

    /// The default destructor.
    pub fn PxBroadcastingErrorCallback_delete(self_: *mut PxBroadcastingErrorCallback);

    /// Reports an error code.
    pub fn PxBroadcastingErrorCallback_reportError_mut(self_: *mut PxBroadcastingErrorCallback, code: PxErrorCode, message: *const std::ffi::c_char, file: *const std::ffi::c_char, line: i32);

    /// Enables floating point exceptions for the scalar and SIMD unit
    pub fn phys_PxEnableFPExceptions();

    /// Disables floating point exceptions for the scalar and SIMD unit
    pub fn phys_PxDisableFPExceptions();

    /// read from the stream. The number of bytes read may be less than the number requested.
    ///
    /// the number of bytes read from the stream.
    pub fn PxInputStream_read_mut(self_: *mut PxInputStream, dest: *mut std::ffi::c_void, count: u32) -> u32;

    pub fn PxInputStream_delete(self_: *mut PxInputStream);

    /// return the length of the input data
    ///
    /// size in bytes of the input data
    pub fn PxInputData_getLength(self_: *const PxInputData) -> u32;

    /// seek to the given offset from the start of the data.
    pub fn PxInputData_seek_mut(self_: *mut PxInputData, offset: u32);

    /// return the current offset from the start of the data
    ///
    /// the offset to seek to.
    pub fn PxInputData_tell(self_: *const PxInputData) -> u32;

    pub fn PxInputData_delete(self_: *mut PxInputData);

    /// write to the stream. The number of bytes written may be less than the number sent.
    ///
    /// the number of bytes written to the stream by this call.
    pub fn PxOutputStream_write_mut(self_: *mut PxOutputStream, src: *const std::ffi::c_void, count: u32) -> u32;

    pub fn PxOutputStream_delete(self_: *mut PxOutputStream);

    /// default constructor leaves data uninitialized.
    pub fn PxVec4_new() -> PxVec4;

    /// zero constructor.
    pub fn PxVec4_new_1(anon_param0: PxZERO) -> PxVec4;

    /// Assigns scalar parameter to all elements.
    ///
    /// Useful to initialize to zero or one.
    pub fn PxVec4_new_2(a: f32) -> PxVec4;

    /// Initializes from 3 scalar parameters.
    pub fn PxVec4_new_3(nx: f32, ny: f32, nz: f32, nw: f32) -> PxVec4;

    /// Initializes from 3 scalar parameters.
    pub fn PxVec4_new_4(v: *const PxVec3, nw: f32) -> PxVec4;

    /// Initializes from an array of scalar parameters.
    pub fn PxVec4_new_5(v: *const f32) -> PxVec4;

    /// tests for exact zero vector
    pub fn PxVec4_isZero(self_: *const PxVec4) -> bool;

    /// returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)
    pub fn PxVec4_isFinite(self_: *const PxVec4) -> bool;

    /// is normalized - used by API parameter validation
    pub fn PxVec4_isNormalized(self_: *const PxVec4) -> bool;

    /// returns the squared magnitude
    ///
    /// Avoids calling PxSqrt()!
    pub fn PxVec4_magnitudeSquared(self_: *const PxVec4) -> f32;

    /// returns the magnitude
    pub fn PxVec4_magnitude(self_: *const PxVec4) -> f32;

    /// returns the scalar product of this and other.
    pub fn PxVec4_dot(self_: *const PxVec4, v: *const PxVec4) -> f32;

    /// returns a unit vector
    pub fn PxVec4_getNormalized(self_: *const PxVec4) -> PxVec4;

    /// normalizes the vector in place
    pub fn PxVec4_normalize_mut(self_: *mut PxVec4) -> f32;

    /// a[i] * b[i], for all i.
    pub fn PxVec4_multiply(self_: *const PxVec4, a: *const PxVec4) -> PxVec4;

    /// element-wise minimum
    pub fn PxVec4_minimum(self_: *const PxVec4, v: *const PxVec4) -> PxVec4;

    /// element-wise maximum
    pub fn PxVec4_maximum(self_: *const PxVec4, v: *const PxVec4) -> PxVec4;

    pub fn PxVec4_getXYZ(self_: *const PxVec4) -> PxVec3;

    /// Default constructor
    pub fn PxMat44_new() -> PxMat44;

    /// identity constructor
    pub fn PxMat44_new_1(anon_param0: PxIDENTITY) -> PxMat44;

    /// zero constructor
    pub fn PxMat44_new_2(anon_param0: PxZERO) -> PxMat44;

    /// Construct from four 4-vectors
    pub fn PxMat44_new_3(col0: *const PxVec4, col1: *const PxVec4, col2: *const PxVec4, col3: *const PxVec4) -> PxMat44;

    /// constructor that generates a multiple of the identity matrix
    pub fn PxMat44_new_4(r: f32) -> PxMat44;

    /// Construct from three base vectors and a translation
    pub fn PxMat44_new_5(col0: *const PxVec3, col1: *const PxVec3, col2: *const PxVec3, col3: *const PxVec3) -> PxMat44;

    /// Construct from float[16]
    pub fn PxMat44_new_6(values: *mut f32) -> PxMat44;

    /// Construct from a quaternion
    pub fn PxMat44_new_7(q: *const PxQuat) -> PxMat44;

    /// Construct from a diagonal vector
    pub fn PxMat44_new_8(diagonal: *const PxVec4) -> PxMat44;

    /// Construct from Mat33 and a translation
    pub fn PxMat44_new_9(axes: *const PxMat33, position: *const PxVec3) -> PxMat44;

    pub fn PxMat44_new_10(t: *const PxTransform) -> PxMat44;

    /// Get transposed matrix
    pub fn PxMat44_getTranspose(self_: *const PxMat44) -> PxMat44;

    /// Transform vector by matrix, equal to v' = M*v
    pub fn PxMat44_transform(self_: *const PxMat44, other: *const PxVec4) -> PxVec4;

    /// Transform vector by matrix, equal to v' = M*v
    pub fn PxMat44_transform_1(self_: *const PxMat44, other: *const PxVec3) -> PxVec3;

    /// Rotate vector by matrix, equal to v' = M*v
    pub fn PxMat44_rotate(self_: *const PxMat44, other: *const PxVec4) -> PxVec4;

    /// Rotate vector by matrix, equal to v' = M*v
    pub fn PxMat44_rotate_1(self_: *const PxMat44, other: *const PxVec3) -> PxVec3;

    pub fn PxMat44_getBasis(self_: *const PxMat44, num: u32) -> PxVec3;

    pub fn PxMat44_getPosition(self_: *const PxMat44) -> PxVec3;

    pub fn PxMat44_setPosition_mut(self_: *mut PxMat44, position: *const PxVec3);

    pub fn PxMat44_front(self_: *const PxMat44) -> *const f32;

    pub fn PxMat44_scale_mut(self_: *mut PxMat44, p: *const PxVec4);

    pub fn PxMat44_inverseRT(self_: *const PxMat44) -> PxMat44;

    pub fn PxMat44_isFinite(self_: *const PxMat44) -> bool;

    /// Constructor
    pub fn PxPlane_new() -> PxPlane;

    /// Constructor from a normal and a distance
    pub fn PxPlane_new_1(nx: f32, ny: f32, nz: f32, distance: f32) -> PxPlane;

    /// Constructor from a normal and a distance
    pub fn PxPlane_new_2(normal: *const PxVec3, distance: f32) -> PxPlane;

    /// Constructor from a point on the plane and a normal
    pub fn PxPlane_new_3(point: *const PxVec3, normal: *const PxVec3) -> PxPlane;

    /// Constructor from three points
    pub fn PxPlane_new_4(p0: *const PxVec3, p1: *const PxVec3, p2: *const PxVec3) -> PxPlane;

    pub fn PxPlane_distance(self_: *const PxPlane, p: *const PxVec3) -> f32;

    pub fn PxPlane_contains(self_: *const PxPlane, p: *const PxVec3) -> bool;

    /// projects p into the plane
    pub fn PxPlane_project(self_: *const PxPlane, p: *const PxVec3) -> PxVec3;

    /// find an arbitrary point in the plane
    pub fn PxPlane_pointInPlane(self_: *const PxPlane) -> PxVec3;

    /// equivalent plane with unit normal
    pub fn PxPlane_normalize_mut(self_: *mut PxPlane);

    /// transform plane
    pub fn PxPlane_transform(self_: *const PxPlane, pose: *const PxTransform) -> PxPlane;

    /// inverse-transform plane
    pub fn PxPlane_inverseTransform(self_: *const PxPlane, pose: *const PxTransform) -> PxPlane;

    /// finds the shortest rotation between two vectors.
    ///
    /// a rotation about an axis normal to the two vectors which takes one to the other via the shortest path
    pub fn phys_PxShortestRotation(from: *const PxVec3, target: *const PxVec3) -> PxQuat;

    pub fn phys_PxDiagonalize(m: *const PxMat33, axes: *mut PxQuat) -> PxVec3;

    /// creates a transform from the endpoints of a segment, suitable for an actor transform for a PxCapsuleGeometry
    ///
    /// A PxTransform which will transform the vector (1,0,0) to the capsule axis shrunk by the halfHeight
    pub fn phys_PxTransformFromSegment(p0: *const PxVec3, p1: *const PxVec3, halfHeight: *mut f32) -> PxTransform;

    /// creates a transform from a plane equation, suitable for an actor transform for a PxPlaneGeometry
    ///
    /// a PxTransform which will transform the plane PxPlane(1,0,0,0) to the specified plane
    pub fn phys_PxTransformFromPlaneEquation(plane: *const PxPlane) -> PxTransform;

    /// creates a plane equation from a transform, such as the actor transform for a PxPlaneGeometry
    ///
    /// the plane
    pub fn phys_PxPlaneEquationFromTransform(pose: *const PxTransform) -> PxPlane;

    /// Spherical linear interpolation of two quaternions.
    ///
    /// Returns left when t=0, right when t=1 and a linear interpolation of left and right when 0
    /// <
    /// t
    /// <
    /// 1.
    /// Returns angle between -PI and PI in radians
    pub fn phys_PxSlerp(t: f32, left: *const PxQuat, right: *const PxQuat) -> PxQuat;

    /// integrate transform.
    pub fn phys_PxIntegrateTransform(curTrans: *const PxTransform, linvel: *const PxVec3, angvel: *const PxVec3, timeStep: f32, result: *mut PxTransform);

    /// Compute the exponent of a PxVec3
    pub fn phys_PxExp(v: *const PxVec3) -> PxQuat;

    /// computes a oriented bounding box around the scaled basis.
    ///
    /// Bounding box extent.
    pub fn phys_PxOptimizeBoundingBox(basis: *mut PxMat33) -> PxVec3;

    /// return Returns the log of a PxQuat
    pub fn phys_PxLog(q: *const PxQuat) -> PxVec3;

    /// return Returns 0 if v.x is largest element of v, 1 if v.y is largest element, 2 if v.z is largest element.
    pub fn phys_PxLargestAxis(v: *const PxVec3) -> u32;

    /// Compute tan(theta/2) given sin(theta) and cos(theta) as inputs.
    ///
    /// Returns tan(theta/2)
    pub fn phys_PxTanHalf(sin: f32, cos: f32) -> f32;

    /// Compute the closest point on an 2d ellipse to a given 2d point.
    ///
    /// Returns the 2d position on the surface of the ellipse that is closest to point.
    pub fn phys_PxEllipseClamp(point: *const PxVec3, radii: *const PxVec3) -> PxVec3;

    /// Compute from an input quaternion q a pair of quaternions (swing, twist) such that
    /// q = swing * twist
    /// with the caveats that swing.x = twist.y = twist.z = 0.
    pub fn phys_PxSeparateSwingTwist(q: *const PxQuat, swing: *mut PxQuat, twist: *mut PxQuat);

    /// Compute the angle between two non-unit vectors
    ///
    /// Returns the angle (in radians) between the two vector v0 and v1.
    pub fn phys_PxComputeAngle(v0: *const PxVec3, v1: *const PxVec3) -> f32;

    /// Compute two normalized vectors (right and up) that are perpendicular to an input normalized vector (dir).
    pub fn phys_PxComputeBasisVectors(dir: *const PxVec3, right: *mut PxVec3, up: *mut PxVec3);

    /// Compute three normalized vectors (dir, right and up) that are parallel to (dir) and perpendicular to (right, up) the
    /// normalized direction vector (p1 - p0)/||p1 - p0||.
    pub fn phys_PxComputeBasisVectors_1(p0: *const PxVec3, p1: *const PxVec3, dir: *mut PxVec3, right: *mut PxVec3, up: *mut PxVec3);

    /// Compute (i+1)%3
    pub fn phys_PxGetNextIndex3(i: u32) -> u32;

    pub fn phys_computeBarycentric(a: *const PxVec3, b: *const PxVec3, c: *const PxVec3, d: *const PxVec3, p: *const PxVec3, bary: *mut PxVec4);

    pub fn phys_computeBarycentric_1(a: *const PxVec3, b: *const PxVec3, c: *const PxVec3, p: *const PxVec3, bary: *mut PxVec4);

    pub fn Interpolation_PxLerp(a: f32, b: f32, t: f32) -> f32;

    pub fn Interpolation_PxBiLerp(f00: f32, f10: f32, f01: f32, f11: f32, tx: f32, ty: f32) -> f32;

    pub fn Interpolation_PxTriLerp(f000: f32, f100: f32, f010: f32, f110: f32, f001: f32, f101: f32, f011: f32, f111: f32, tx: f32, ty: f32, tz: f32) -> f32;

    pub fn Interpolation_PxSDFIdx(i: u32, j: u32, k: u32, nbX: u32, nbY: u32) -> u32;

    pub fn Interpolation_PxSDFSampleImpl(sdf: *const f32, localPos: *const PxVec3, sdfBoxLower: *const PxVec3, sdfBoxHigher: *const PxVec3, sdfDx: f32, invSdfDx: f32, dimX: u32, dimY: u32, dimZ: u32, tolerance: f32) -> f32;

    pub fn phys_PxSdfSample(sdf: *const f32, localPos: *const PxVec3, sdfBoxLower: *const PxVec3, sdfBoxHigher: *const PxVec3, sdfDx: f32, invSdfDx: f32, dimX: u32, dimY: u32, dimZ: u32, gradient: *mut PxVec3, tolerance: f32) -> f32;

    /// The constructor for Mutex creates a mutex. It is initially unlocked.
    pub fn PxMutexImpl_new_alloc() -> *mut PxMutexImpl;

    /// The destructor for Mutex deletes the mutex.
    pub fn PxMutexImpl_delete(self_: *mut PxMutexImpl);

    /// Acquire (lock) the mutex. If the mutex is already locked
    /// by another thread, this method blocks until the mutex is
    /// unlocked.
    pub fn PxMutexImpl_lock_mut(self_: *mut PxMutexImpl);

    /// Acquire (lock) the mutex. If the mutex is already locked
    /// by another thread, this method returns false without blocking.
    pub fn PxMutexImpl_trylock_mut(self_: *mut PxMutexImpl) -> bool;

    /// Release (unlock) the mutex.
    pub fn PxMutexImpl_unlock_mut(self_: *mut PxMutexImpl);

    /// Size of this class.
    pub fn PxMutexImpl_getSize() -> u32;

    pub fn PxReadWriteLock_new_alloc() -> *mut PxReadWriteLock;

    pub fn PxReadWriteLock_delete(self_: *mut PxReadWriteLock);

    pub fn PxReadWriteLock_lockReader_mut(self_: *mut PxReadWriteLock, takeLock: bool);

    pub fn PxReadWriteLock_lockWriter_mut(self_: *mut PxReadWriteLock);

    pub fn PxReadWriteLock_unlockReader_mut(self_: *mut PxReadWriteLock);

    pub fn PxReadWriteLock_unlockWriter_mut(self_: *mut PxReadWriteLock);

    /// Mark the beginning of a nested profile block
    ///
    /// Returns implementation-specific profiler data for this event
    pub fn PxProfilerCallback_zoneStart_mut(self_: *mut PxProfilerCallback, eventName: *const std::ffi::c_char, detached: bool, contextId: u64) -> *mut std::ffi::c_void;

    /// Mark the end of a nested profile block
    ///
    /// eventName plus contextId can be used to uniquely match up start and end of a zone.
    pub fn PxProfilerCallback_zoneEnd_mut(self_: *mut PxProfilerCallback, profilerData: *mut std::ffi::c_void, eventName: *const std::ffi::c_char, detached: bool, contextId: u64);

    pub fn PxProfileScoped_new_alloc(callback: *mut PxProfilerCallback, eventName: *const std::ffi::c_char, detached: bool, contextId: u64) -> *mut PxProfileScoped;

    pub fn PxProfileScoped_delete(self_: *mut PxProfileScoped);

    pub fn PxSListEntry_new() -> PxSListEntry;

    pub fn PxSListEntry_next_mut(self_: *mut PxSListEntry) -> *mut PxSListEntry;

    pub fn PxSListImpl_new_alloc() -> *mut PxSListImpl;

    pub fn PxSListImpl_delete(self_: *mut PxSListImpl);

    pub fn PxSListImpl_push_mut(self_: *mut PxSListImpl, entry: *mut PxSListEntry);

    pub fn PxSListImpl_pop_mut(self_: *mut PxSListImpl) -> *mut PxSListEntry;

    pub fn PxSListImpl_flush_mut(self_: *mut PxSListImpl) -> *mut PxSListEntry;

    pub fn PxSListImpl_getSize() -> u32;

    pub fn PxSyncImpl_new_alloc() -> *mut PxSyncImpl;

    pub fn PxSyncImpl_delete(self_: *mut PxSyncImpl);

    /// Wait on the object for at most the given number of ms. Returns
    /// true if the object is signaled. Sync::waitForever will block forever
    /// or until the object is signaled.
    pub fn PxSyncImpl_wait_mut(self_: *mut PxSyncImpl, milliseconds: u32) -> bool;

    /// Signal the synchronization object, waking all threads waiting on it
    pub fn PxSyncImpl_set_mut(self_: *mut PxSyncImpl);

    /// Reset the synchronization object
    pub fn PxSyncImpl_reset_mut(self_: *mut PxSyncImpl);

    /// Size of this class.
    pub fn PxSyncImpl_getSize() -> u32;

    pub fn PxRunnable_new_alloc() -> *mut PxRunnable;

    pub fn PxRunnable_delete(self_: *mut PxRunnable);

    pub fn PxRunnable_execute_mut(self_: *mut PxRunnable);

    pub fn phys_PxTlsAlloc() -> u32;

    pub fn phys_PxTlsFree(index: u32);

    pub fn phys_PxTlsGet(index: u32) -> *mut std::ffi::c_void;

    pub fn phys_PxTlsGetValue(index: u32) -> usize;

    pub fn phys_PxTlsSet(index: u32, value: *mut std::ffi::c_void) -> u32;

    pub fn phys_PxTlsSetValue(index: u32, value: usize) -> u32;

    pub fn PxCounterFrequencyToTensOfNanos_new(inNum: u64, inDenom: u64) -> PxCounterFrequencyToTensOfNanos;

    pub fn PxCounterFrequencyToTensOfNanos_toTensOfNanos(self_: *const PxCounterFrequencyToTensOfNanos, inCounter: u64) -> u64;

    pub fn PxTime_getBootCounterFrequency() -> *const PxCounterFrequencyToTensOfNanos;

    pub fn PxTime_getCounterFrequency() -> PxCounterFrequencyToTensOfNanos;

    pub fn PxTime_getCurrentCounterValue() -> u64;

    pub fn PxTime_getCurrentTimeInTensOfNanoSeconds() -> u64;

    pub fn PxTime_new() -> PxTime;

    pub fn PxTime_getElapsedSeconds_mut(self_: *mut PxTime) -> f64;

    pub fn PxTime_peekElapsedSeconds_mut(self_: *mut PxTime) -> f64;

    pub fn PxTime_getLastTime(self_: *const PxTime) -> f64;

    /// default constructor leaves data uninitialized.
    pub fn PxVec2_new() -> PxVec2;

    /// zero constructor.
    pub fn PxVec2_new_1(anon_param0: PxZERO) -> PxVec2;

    /// Assigns scalar parameter to all elements.
    ///
    /// Useful to initialize to zero or one.
    pub fn PxVec2_new_2(a: f32) -> PxVec2;

    /// Initializes from 2 scalar parameters.
    pub fn PxVec2_new_3(nx: f32, ny: f32) -> PxVec2;

    /// tests for exact zero vector
    pub fn PxVec2_isZero(self_: *const PxVec2) -> bool;

    /// returns true if all 2 elems of the vector are finite (not NAN or INF, etc.)
    pub fn PxVec2_isFinite(self_: *const PxVec2) -> bool;

    /// is normalized - used by API parameter validation
    pub fn PxVec2_isNormalized(self_: *const PxVec2) -> bool;

    /// returns the squared magnitude
    ///
    /// Avoids calling PxSqrt()!
    pub fn PxVec2_magnitudeSquared(self_: *const PxVec2) -> f32;

    /// returns the magnitude
    pub fn PxVec2_magnitude(self_: *const PxVec2) -> f32;

    /// returns the scalar product of this and other.
    pub fn PxVec2_dot(self_: *const PxVec2, v: *const PxVec2) -> f32;

    /// returns a unit vector
    pub fn PxVec2_getNormalized(self_: *const PxVec2) -> PxVec2;

    /// normalizes the vector in place
    pub fn PxVec2_normalize_mut(self_: *mut PxVec2) -> f32;

    /// a[i] * b[i], for all i.
    pub fn PxVec2_multiply(self_: *const PxVec2, a: *const PxVec2) -> PxVec2;

    /// element-wise minimum
    pub fn PxVec2_minimum(self_: *const PxVec2, v: *const PxVec2) -> PxVec2;

    /// returns MIN(x, y);
    pub fn PxVec2_minElement(self_: *const PxVec2) -> f32;

    /// element-wise maximum
    pub fn PxVec2_maximum(self_: *const PxVec2, v: *const PxVec2) -> PxVec2;

    /// returns MAX(x, y);
    pub fn PxVec2_maxElement(self_: *const PxVec2) -> f32;

    pub fn PxStridedData_new() -> PxStridedData;

    pub fn PxBoundedData_new() -> PxBoundedData;

    pub fn PxDebugPoint_new(p: *const PxVec3, c: *const u32) -> PxDebugPoint;

    pub fn PxDebugLine_new(p0: *const PxVec3, p1: *const PxVec3, c: *const u32) -> PxDebugLine;

    pub fn PxDebugTriangle_new(p0: *const PxVec3, p1: *const PxVec3, p2: *const PxVec3, c: *const u32) -> PxDebugTriangle;

    pub fn PxDebugText_new() -> PxDebugText;

    pub fn PxDebugText_new_1(pos: *const PxVec3, sz: *const f32, clr: *const u32, str: *const std::ffi::c_char) -> PxDebugText;

    pub fn PxRenderBuffer_delete(self_: *mut PxRenderBuffer);

    pub fn PxRenderBuffer_getNbPoints(self_: *const PxRenderBuffer) -> u32;

    pub fn PxRenderBuffer_getPoints(self_: *const PxRenderBuffer) -> *const PxDebugPoint;

    pub fn PxRenderBuffer_addPoint_mut(self_: *mut PxRenderBuffer, point: *const PxDebugPoint);

    pub fn PxRenderBuffer_getNbLines(self_: *const PxRenderBuffer) -> u32;

    pub fn PxRenderBuffer_getLines(self_: *const PxRenderBuffer) -> *const PxDebugLine;

    pub fn PxRenderBuffer_addLine_mut(self_: *mut PxRenderBuffer, line: *const PxDebugLine);

    pub fn PxRenderBuffer_reserveLines_mut(self_: *mut PxRenderBuffer, nbLines: u32) -> *mut PxDebugLine;

    pub fn PxRenderBuffer_reservePoints_mut(self_: *mut PxRenderBuffer, nbLines: u32) -> *mut PxDebugPoint;

    pub fn PxRenderBuffer_getNbTriangles(self_: *const PxRenderBuffer) -> u32;

    pub fn PxRenderBuffer_getTriangles(self_: *const PxRenderBuffer) -> *const PxDebugTriangle;

    pub fn PxRenderBuffer_addTriangle_mut(self_: *mut PxRenderBuffer, triangle: *const PxDebugTriangle);

    pub fn PxRenderBuffer_append_mut(self_: *mut PxRenderBuffer, other: *const PxRenderBuffer);

    pub fn PxRenderBuffer_clear_mut(self_: *mut PxRenderBuffer);

    pub fn PxRenderBuffer_shift_mut(self_: *mut PxRenderBuffer, delta: *const PxVec3);

    pub fn PxRenderBuffer_empty(self_: *const PxRenderBuffer) -> bool;

    pub fn PxProcessPxBaseCallback_delete(self_: *mut PxProcessPxBaseCallback);

    pub fn PxProcessPxBaseCallback_process_mut(self_: *mut PxProcessPxBaseCallback, anon_param0: *mut PxBase);

    /// Registers a reference value corresponding to a PxBase object.
    ///
    /// This method is assumed to be called in the implementation of PxSerializer::registerReferences for serialized
    /// references that need to be resolved on deserialization.
    ///
    /// A reference needs to be associated with exactly one PxBase object in either the collection or the
    /// external references collection.
    ///
    /// Different kinds of references are supported and need to be specified. In the most common case
    /// (PX_SERIAL_REF_KIND_PXBASE) the PxBase object matches the reference value (which is the pointer
    /// to the PxBase object). Integer references maybe registered as well (used for internal material
    /// indices with PX_SERIAL_REF_KIND_MATERIAL_IDX). Other kinds could be added with the restriction that
    /// for pointer types the kind value needs to be marked with the PX_SERIAL_REF_KIND_PTR_TYPE_BIT.
    pub fn PxSerializationContext_registerReference_mut(self_: *mut PxSerializationContext, base: *mut PxBase, kind: u32, reference: usize);

    /// Returns the collection that is being serialized.
    pub fn PxSerializationContext_getCollection(self_: *const PxSerializationContext) -> *const PxCollection;

    /// Serializes object data and object extra data.
    ///
    /// This function is assumed to be called within the implementation of PxSerializer::exportData and PxSerializer::exportExtraData.
    pub fn PxSerializationContext_writeData_mut(self_: *mut PxSerializationContext, data: *const std::ffi::c_void, size: u32);

    /// Aligns the serialized data.
    ///
    /// This function is assumed to be called within the implementation of PxSerializer::exportData and PxSerializer::exportExtraData.
    pub fn PxSerializationContext_alignData_mut(self_: *mut PxSerializationContext, alignment: u32);

    /// Helper function to write a name to the extraData if serialization is configured to save names.
    ///
    /// This function is assumed to be called within the implementation of PxSerializer::exportExtraData.
    pub fn PxSerializationContext_writeName_mut(self_: *mut PxSerializationContext, name: *const std::ffi::c_char);

    /// Retrieves a pointer to a deserialized PxBase object given a corresponding deserialized reference value
    ///
    /// This method is assumed to be called in the implementation of PxSerializer::createObject in order
    /// to update reference values on deserialization.
    ///
    /// To update a PxBase reference the corresponding deserialized pointer value needs to be provided in order to retrieve
    /// the location of the corresponding deserialized PxBase object. (PxDeserializationContext::translatePxBase simplifies
    /// this common case).
    ///
    /// For other kinds of references the reverence values need to be updated by deduction given the corresponding PxBase instance.
    ///
    /// PxBase object associated with the reference value
    pub fn PxDeserializationContext_resolveReference(self_: *const PxDeserializationContext, kind: u32, reference: usize) -> *mut PxBase;

    /// Helper function to read a name from the extra data during deserialization.
    ///
    /// This function is assumed to be called within the implementation of PxSerializer::createObject.
    pub fn PxDeserializationContext_readName_mut(self_: *mut PxDeserializationContext, name: *mut *const std::ffi::c_char);

    /// Function to align the extra data stream to a power of 2 alignment
    ///
    /// This function is assumed to be called within the implementation of PxSerializer::createObject.
    pub fn PxDeserializationContext_alignExtraData_mut(self_: *mut PxDeserializationContext, alignment: u32);

    /// Register a serializer for a concrete type
    pub fn PxSerializationRegistry_registerSerializer_mut(self_: *mut PxSerializationRegistry, type_: u16, serializer: *mut PxSerializer);

    /// Unregister a serializer for a concrete type, and retrieves the corresponding serializer object.
    ///
    /// Unregistered serializer corresponding to type, NULL for types for which no serializer has been registered.
    pub fn PxSerializationRegistry_unregisterSerializer_mut(self_: *mut PxSerializationRegistry, type_: u16) -> *mut PxSerializer;

    /// Returns PxSerializer corresponding to type
    ///
    /// Registered PxSerializer object corresponding to type
    pub fn PxSerializationRegistry_getSerializer(self_: *const PxSerializationRegistry, type_: u16) -> *const PxSerializer;

    /// Register a RepX serializer for a concrete type
    pub fn PxSerializationRegistry_registerRepXSerializer_mut(self_: *mut PxSerializationRegistry, type_: u16, serializer: *mut PxRepXSerializer);

    /// Unregister a RepX serializer for a concrete type, and retrieves the corresponding serializer object.
    ///
    /// Unregistered PxRepxSerializer corresponding to type, NULL for types for which no RepX serializer has been registered.
    pub fn PxSerializationRegistry_unregisterRepXSerializer_mut(self_: *mut PxSerializationRegistry, type_: u16) -> *mut PxRepXSerializer;

    /// Returns RepX serializer given the corresponding type name
    ///
    /// Registered PxRepXSerializer object corresponding to type name
    pub fn PxSerializationRegistry_getRepXSerializer(self_: *const PxSerializationRegistry, typeName: *const std::ffi::c_char) -> *mut PxRepXSerializer;

    /// Releases PxSerializationRegistry instance.
    ///
    /// This unregisters all PhysX and PhysXExtension serializers. Make sure to unregister all custom type
    /// serializers before releasing the PxSerializationRegistry.
    pub fn PxSerializationRegistry_release_mut(self_: *mut PxSerializationRegistry);

    /// Adds a PxBase object to the collection.
    ///
    /// Adds a PxBase object to the collection. Optionally a PxSerialObjectId can be provided
    /// in order to resolve dependencies between collections. A PxSerialObjectId value of PX_SERIAL_OBJECT_ID_INVALID
    /// means the object remains without id. Objects can be added regardless of other objects they require. If the object
    /// is already in the collection, the ID will be set if it was PX_SERIAL_OBJECT_ID_INVALID previously, otherwise the
    /// operation fails.
    pub fn PxCollection_add_mut(self_: *mut PxCollection, object: *mut PxBase, id: u64);

    /// Removes a PxBase member object from the collection.
    ///
    /// Object needs to be contained by the collection.
    pub fn PxCollection_remove_mut(self_: *mut PxCollection, object: *mut PxBase);

    /// Returns whether the collection contains a certain PxBase object.
    ///
    /// Whether object is contained.
    pub fn PxCollection_contains(self_: *const PxCollection, object: *mut PxBase) -> bool;

    /// Adds an id to a member PxBase object.
    ///
    /// If the object is already associated with an id within the collection, the id is replaced.
    /// May only be called for objects that are members of the collection. The id needs to be unique
    /// within the collection.
    pub fn PxCollection_addId_mut(self_: *mut PxCollection, object: *mut PxBase, id: u64);

    /// Removes id from a contained PxBase object.
    ///
    /// May only be called for ids that are associated with an object in the collection.
    pub fn PxCollection_removeId_mut(self_: *mut PxCollection, id: u64);

    /// Adds all PxBase objects and their ids of collection to this collection.
    ///
    /// PxBase objects already in this collection are ignored. Object ids need to be conflict
    /// free, i.e. the same object may not have two different ids within the two collections.
    pub fn PxCollection_add_mut_1(self_: *mut PxCollection, collection: *mut PxCollection);

    /// Removes all PxBase objects of collection from this collection.
    ///
    /// PxBase objects not present in this collection are ignored. Ids of objects
    /// which are removed are also removed.
    pub fn PxCollection_remove_mut_1(self_: *mut PxCollection, collection: *mut PxCollection);

    /// Gets number of PxBase objects in this collection.
    ///
    /// Number of objects in this collection
    pub fn PxCollection_getNbObjects(self_: *const PxCollection) -> u32;

    /// Gets the PxBase object of this collection given its index.
    ///
    /// PxBase object at index index
    pub fn PxCollection_getObject(self_: *const PxCollection, index: u32) -> *mut PxBase;

    /// Copies member PxBase pointers to a user specified buffer.
    ///
    /// number of members PxBase objects that have been written to the userBuffer
    pub fn PxCollection_getObjects(self_: *const PxCollection, userBuffer: *mut *mut PxBase, bufferSize: u32, startIndex: u32) -> u32;

    /// Looks for a PxBase object given a PxSerialObjectId value.
    ///
    /// If there is no PxBase object in the collection with the given id, NULL is returned.
    ///
    /// PxBase object with the given id value or NULL
    pub fn PxCollection_find(self_: *const PxCollection, id: u64) -> *mut PxBase;

    /// Gets number of PxSerialObjectId names in this collection.
    ///
    /// Number of PxSerialObjectId names in this collection
    pub fn PxCollection_getNbIds(self_: *const PxCollection) -> u32;

    /// Copies member PxSerialObjectId values to a user specified buffer.
    ///
    /// number of members PxSerialObjectId values that have been written to the userBuffer
    pub fn PxCollection_getIds(self_: *const PxCollection, userBuffer: *mut u64, bufferSize: u32, startIndex: u32) -> u32;

    /// Gets the PxSerialObjectId name of a PxBase object within the collection.
    ///
    /// The PxBase object needs to be a member of the collection.
    ///
    /// PxSerialObjectId name of the object or PX_SERIAL_OBJECT_ID_INVALID if the object is unnamed
    pub fn PxCollection_getId(self_: *const PxCollection, object: *const PxBase) -> u64;

    /// Deletes a collection object.
    ///
    /// This function only deletes the collection object, i.e. the container class. It doesn't delete objects
    /// that are part of the collection.
    pub fn PxCollection_release_mut(self_: *mut PxCollection);

    /// Creates a collection object.
    ///
    /// Objects can only be serialized or deserialized through a collection.
    /// For serialization, users must add objects to the collection and serialize the collection as a whole.
    /// For deserialization, the system gives back a collection of deserialized objects to users.
    ///
    /// The new collection object.
    pub fn phys_PxCreateCollection() -> *mut PxCollection;

    /// Releases the PxBase instance, please check documentation of release in derived class.
    pub fn PxBase_release_mut(self_: *mut PxBase);

    /// Returns string name of dynamic type.
    ///
    /// Class name of most derived type of this object.
    pub fn PxBase_getConcreteTypeName(self_: *const PxBase) -> *const std::ffi::c_char;

    /// Returns concrete type of object.
    ///
    /// PxConcreteType::Enum of serialized object
    pub fn PxBase_getConcreteType(self_: *const PxBase) -> u16;

    /// Set PxBaseFlag
    pub fn PxBase_setBaseFlag_mut(self_: *mut PxBase, flag: PxBaseFlag, value: bool);

    /// Set PxBaseFlags
    pub fn PxBase_setBaseFlags_mut(self_: *mut PxBase, inFlags: PxBaseFlags);

    /// Returns PxBaseFlags
    ///
    /// PxBaseFlags
    pub fn PxBase_getBaseFlags(self_: *const PxBase) -> PxBaseFlags;

    /// Whether the object is subordinate.
    ///
    /// A class is subordinate, if it can only be instantiated in the context of another class.
    ///
    /// Whether the class is subordinate
    pub fn PxBase_isReleasable(self_: *const PxBase) -> bool;

    /// Decrements the reference count of the object and releases it if the new reference count is zero.
    pub fn PxRefCounted_release_mut(self_: *mut PxRefCounted);

    /// Returns the reference count of the object.
    ///
    /// At creation, the reference count of the object is 1. Every other object referencing this object increments the
    /// count by 1. When the reference count reaches 0, and only then, the object gets destroyed automatically.
    ///
    /// the current reference count.
    pub fn PxRefCounted_getReferenceCount(self_: *const PxRefCounted) -> u32;

    /// Acquires a counted reference to this object.
    ///
    /// This method increases the reference count of the object by 1. Decrement the reference count by calling release()
    pub fn PxRefCounted_acquireReference_mut(self_: *mut PxRefCounted);

    /// constructor sets to default
    pub fn PxTolerancesScale_new(defaultLength: f32, defaultSpeed: f32) -> PxTolerancesScale;

    /// Returns true if the descriptor is valid.
    ///
    /// true if the current settings are valid (returns always true).
    pub fn PxTolerancesScale_isValid(self_: *const PxTolerancesScale) -> bool;

    /// Allocate a new string.
    ///
    /// *Always* a valid null terminated string.  "" is returned if "" or null is passed in.
    pub fn PxStringTable_allocateStr_mut(self_: *mut PxStringTable, inSrc: *const std::ffi::c_char) -> *const std::ffi::c_char;

    /// Release the string table and all the strings associated with it.
    pub fn PxStringTable_release_mut(self_: *mut PxStringTable);

    /// Returns string name of dynamic type.
    ///
    /// Class name of most derived type of this object.
    pub fn PxSerializer_getConcreteTypeName(self_: *const PxSerializer) -> *const std::ffi::c_char;

    /// Adds required objects to the collection.
    ///
    /// This method does not add the required objects recursively, e.g. objects required by required objects.
    pub fn PxSerializer_requiresObjects(self_: *const PxSerializer, anon_param0: *mut PxBase, anon_param1: *mut PxProcessPxBaseCallback);

    /// Whether the object is subordinate.
    ///
    /// A class is subordinate, if it can only be instantiated in the context of another class.
    ///
    /// Whether the class is subordinate
    pub fn PxSerializer_isSubordinate(self_: *const PxSerializer) -> bool;

    /// Exports object's extra data to stream.
    pub fn PxSerializer_exportExtraData(self_: *const PxSerializer, anon_param0: *mut PxBase, anon_param1: *mut PxSerializationContext);

    /// Exports object's data to stream.
    pub fn PxSerializer_exportData(self_: *const PxSerializer, anon_param0: *mut PxBase, anon_param1: *mut PxSerializationContext);

    /// Register references that the object maintains to other objects.
    pub fn PxSerializer_registerReferences(self_: *const PxSerializer, obj: *mut PxBase, s: *mut PxSerializationContext);

    /// Returns size needed to create the class instance.
    ///
    /// sizeof class instance.
    pub fn PxSerializer_getClassSize(self_: *const PxSerializer) -> usize;

    /// Create object at a given address, resolve references and import extra data.
    ///
    /// Created PxBase pointer (needs to be identical to address before increment).
    pub fn PxSerializer_createObject(self_: *const PxSerializer, address: *mut *mut u8, context: *mut PxDeserializationContext) -> *mut PxBase;

    /// *******************************************************************************************************************
    pub fn PxSerializer_delete(self_: *mut PxSerializer);

    /// Builds object (TriangleMesh, Heightfield, ConvexMesh or BVH) from given data in PxPhysics.
    ///
    /// PxBase Created object in PxPhysics.
    pub fn PxInsertionCallback_buildObjectFromData_mut(self_: *mut PxInsertionCallback, type_: PxConcreteType, data: *mut std::ffi::c_void) -> *mut PxBase;

    /// Set the user-provided dispatcher object for CPU tasks
    pub fn PxTaskManager_setCpuDispatcher_mut(self_: *mut PxTaskManager, ref_: *mut PxCpuDispatcher);

    /// Get the user-provided dispatcher object for CPU tasks
    ///
    /// The CPU dispatcher object.
    pub fn PxTaskManager_getCpuDispatcher(self_: *const PxTaskManager) -> *mut PxCpuDispatcher;

    /// Reset any dependencies between Tasks
    ///
    /// Will be called at the start of every frame before tasks are submitted.
    pub fn PxTaskManager_resetDependencies_mut(self_: *mut PxTaskManager);

    /// Called by the owning scene to start the task graph.
    ///
    /// All tasks with ref count of 1 will be dispatched.
    pub fn PxTaskManager_startSimulation_mut(self_: *mut PxTaskManager);

    /// Called by the owning scene at the end of a simulation step.
    pub fn PxTaskManager_stopSimulation_mut(self_: *mut PxTaskManager);

    /// Called by the worker threads to inform the PxTaskManager that a task has completed processing.
    pub fn PxTaskManager_taskCompleted_mut(self_: *mut PxTaskManager, task: *mut PxTask);

    /// Retrieve a task by name
    ///
    /// The ID of the task with that name, or eNOT_PRESENT if not found
    pub fn PxTaskManager_getNamedTask_mut(self_: *mut PxTaskManager, name: *const std::ffi::c_char) -> u32;

    /// Submit a task with a unique name.
    ///
    /// The ID of the task with that name, or eNOT_PRESENT if not found
    pub fn PxTaskManager_submitNamedTask_mut(self_: *mut PxTaskManager, task: *mut PxTask, name: *const std::ffi::c_char, type_: PxTaskType) -> u32;

    /// Submit an unnamed task.
    ///
    /// The ID of the task with that name, or eNOT_PRESENT if not found
    pub fn PxTaskManager_submitUnnamedTask_mut(self_: *mut PxTaskManager, task: *mut PxTask, type_: PxTaskType) -> u32;

    /// Retrieve a task given a task ID
    ///
    /// The task associated with the ID
    pub fn PxTaskManager_getTaskFromID_mut(self_: *mut PxTaskManager, id: u32) -> *mut PxTask;

    /// Release the PxTaskManager object, referenced dispatchers will not be released
    pub fn PxTaskManager_release_mut(self_: *mut PxTaskManager);

    /// Construct a new PxTaskManager instance with the given [optional] dispatchers
    pub fn PxTaskManager_createTaskManager(errorCallback: *mut PxErrorCallback, anon_param1: *mut PxCpuDispatcher) -> *mut PxTaskManager;

    /// Called by the TaskManager when a task is to be queued for execution.
    ///
    /// Upon receiving a task, the dispatcher should schedule the task to run.
    /// After the task has been run, it should call the release() method and
    /// discard its pointer.
    pub fn PxCpuDispatcher_submitTask_mut(self_: *mut PxCpuDispatcher, task: *mut PxBaseTask);

    /// Returns the number of available worker threads for this dispatcher.
    ///
    /// The SDK will use this count to control how many tasks are submitted. By
    /// matching the number of tasks with the number of execution units task
    /// overhead can be reduced.
    pub fn PxCpuDispatcher_getWorkerCount(self_: *const PxCpuDispatcher) -> u32;

    pub fn PxCpuDispatcher_delete(self_: *mut PxCpuDispatcher);

    /// The user-implemented run method where the task's work should be performed
    ///
    /// run() methods must be thread safe, stack friendly (no alloca, etc), and
    /// must never block.
    pub fn PxBaseTask_run_mut(self_: *mut PxBaseTask);

    /// Return a user-provided task name for profiling purposes.
    ///
    /// It does not have to be unique, but unique names are helpful.
    ///
    /// The name of this task
    pub fn PxBaseTask_getName(self_: *const PxBaseTask) -> *const std::ffi::c_char;

    /// Implemented by derived implementation classes
    pub fn PxBaseTask_addReference_mut(self_: *mut PxBaseTask);

    /// Implemented by derived implementation classes
    pub fn PxBaseTask_removeReference_mut(self_: *mut PxBaseTask);

    /// Implemented by derived implementation classes
    pub fn PxBaseTask_getReference(self_: *const PxBaseTask) -> i32;

    /// Implemented by derived implementation classes
    ///
    /// A task may assume in its release() method that the task system no longer holds
    /// references to it - so it may safely run its destructor, recycle itself, etc.
    /// provided no additional user references to the task exist
    pub fn PxBaseTask_release_mut(self_: *mut PxBaseTask);

    /// Return PxTaskManager to which this task was submitted
    ///
    /// Note, can return NULL if task was not submitted, or has been
    /// completed.
    pub fn PxBaseTask_getTaskManager(self_: *const PxBaseTask) -> *mut PxTaskManager;

    pub fn PxBaseTask_setContextId_mut(self_: *mut PxBaseTask, id: u64);

    pub fn PxBaseTask_getContextId(self_: *const PxBaseTask) -> u64;

    /// Release method implementation
    pub fn PxTask_release_mut(self_: *mut PxTask);

    /// Inform the PxTaskManager this task must finish before the given
    pub fn PxTask_finishBefore_mut(self_: *mut PxTask, taskID: u32);

    /// Inform the PxTaskManager this task cannot start until the given
    pub fn PxTask_startAfter_mut(self_: *mut PxTask, taskID: u32);

    /// Manually increment this task's reference count. The task will
    /// not be allowed to run until removeReference() is called.
    pub fn PxTask_addReference_mut(self_: *mut PxTask);

    /// Manually decrement this task's reference count. If the reference
    /// count reaches zero, the task will be dispatched.
    pub fn PxTask_removeReference_mut(self_: *mut PxTask);

    /// Return the ref-count for this task
    pub fn PxTask_getReference(self_: *const PxTask) -> i32;

    /// Return the unique ID for this task
    pub fn PxTask_getTaskID(self_: *const PxTask) -> u32;

    /// Called by PxTaskManager at submission time for initialization
    ///
    /// Perform simulation step initialization here.
    pub fn PxTask_submitted_mut(self_: *mut PxTask);

    /// Initialize this task and specify the task that will have its ref count decremented on completion.
    ///
    /// Submission is deferred until the task's mRefCount is decremented to zero.
    /// Note that we only use the PxTaskManager to query the appropriate dispatcher.
    pub fn PxLightCpuTask_setContinuation_mut(self_: *mut PxLightCpuTask, tm: *mut PxTaskManager, c: *mut PxBaseTask);

    /// Initialize this task and specify the task that will have its ref count decremented on completion.
    ///
    /// This overload of setContinuation() queries the PxTaskManager from the continuation
    /// task, which cannot be NULL.
    pub fn PxLightCpuTask_setContinuation_mut_1(self_: *mut PxLightCpuTask, c: *mut PxBaseTask);

    /// Retrieves continuation task
    pub fn PxLightCpuTask_getContinuation(self_: *const PxLightCpuTask) -> *mut PxBaseTask;

    /// Manually decrement this task's reference count. If the reference
    /// count reaches zero, the task will be dispatched.
    pub fn PxLightCpuTask_removeReference_mut(self_: *mut PxLightCpuTask);

    /// Return the ref-count for this task
    pub fn PxLightCpuTask_getReference(self_: *const PxLightCpuTask) -> i32;

    /// Manually increment this task's reference count. The task will
    /// not be allowed to run until removeReference() is called.
    pub fn PxLightCpuTask_addReference_mut(self_: *mut PxLightCpuTask);

    /// called by CpuDispatcher after run method has completed
    ///
    /// Decrements the continuation task's reference count, if specified.
    pub fn PxLightCpuTask_release_mut(self_: *mut PxLightCpuTask);

    /// Returns the type of the geometry.
    ///
    /// The type of the object.
    pub fn PxGeometry_getType(self_: *const PxGeometry) -> PxGeometryType;

    /// Constructor to initialize half extents from scalar parameters.
    pub fn PxBoxGeometry_new(hx: f32, hy: f32, hz: f32) -> PxBoxGeometry;

    /// Constructor to initialize half extents from vector parameter.
    pub fn PxBoxGeometry_new_1(halfExtents_: PxVec3) -> PxBoxGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid
    ///
    /// A valid box has a positive extent in each direction (halfExtents.x > 0, halfExtents.y > 0, halfExtents.z > 0).
    /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a box that has zero extent in any direction.
    pub fn PxBoxGeometry_isValid(self_: *const PxBoxGeometry) -> bool;

    pub fn PxBVHRaycastCallback_delete(self_: *mut PxBVHRaycastCallback);

    pub fn PxBVHRaycastCallback_reportHit_mut(self_: *mut PxBVHRaycastCallback, boundsIndex: u32, distance: *mut f32) -> bool;

    pub fn PxBVHOverlapCallback_delete(self_: *mut PxBVHOverlapCallback);

    pub fn PxBVHOverlapCallback_reportHit_mut(self_: *mut PxBVHOverlapCallback, boundsIndex: u32) -> bool;

    pub fn PxBVHTraversalCallback_delete(self_: *mut PxBVHTraversalCallback);

    pub fn PxBVHTraversalCallback_visitNode_mut(self_: *mut PxBVHTraversalCallback, bounds: *const PxBounds3) -> bool;

    pub fn PxBVHTraversalCallback_reportLeaf_mut(self_: *mut PxBVHTraversalCallback, nbPrims: u32, prims: *const u32) -> bool;

    /// Raycast test against a BVH.
    ///
    /// false if query has been aborted
    pub fn PxBVH_raycast(self_: *const PxBVH, origin: *const PxVec3, unitDir: *const PxVec3, maxDist: f32, cb: *mut PxBVHRaycastCallback, queryFlags: PxGeometryQueryFlags) -> bool;

    /// Sweep test against a BVH.
    ///
    /// false if query has been aborted
    pub fn PxBVH_sweep(self_: *const PxBVH, geom: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, maxDist: f32, cb: *mut PxBVHRaycastCallback, queryFlags: PxGeometryQueryFlags) -> bool;

    /// Overlap test against a BVH.
    ///
    /// false if query has been aborted
    pub fn PxBVH_overlap(self_: *const PxBVH, geom: *const PxGeometry, pose: *const PxTransform, cb: *mut PxBVHOverlapCallback, queryFlags: PxGeometryQueryFlags) -> bool;

    /// Frustum culling test against a BVH.
    ///
    /// This is similar in spirit to an overlap query using a convex object around the frustum.
    /// However this specialized query has better performance, and can support more than the 6 planes
    /// of a frustum, which can be useful in portal-based engines.
    ///
    /// On the other hand this test only returns a conservative number of bounds, i.e. some of the returned
    /// bounds may actually be outside the frustum volume, close to it but not touching it. This is usually
    /// an ok performance trade-off when the function is used for view-frustum culling.
    ///
    /// false if query has been aborted
    pub fn PxBVH_cull(self_: *const PxBVH, nbPlanes: u32, planes: *const PxPlane, cb: *mut PxBVHOverlapCallback, queryFlags: PxGeometryQueryFlags) -> bool;

    /// Returns the number of bounds in the BVH.
    ///
    /// You can use [`getBounds`]() to retrieve the bounds.
    ///
    /// These are the user-defined bounds passed to the BVH builder, not the internal bounds around each BVH node.
    ///
    /// Number of bounds in the BVH.
    pub fn PxBVH_getNbBounds(self_: *const PxBVH) -> u32;

    /// Retrieve the read-only bounds in the BVH.
    ///
    /// These are the user-defined bounds passed to the BVH builder, not the internal bounds around each BVH node.
    pub fn PxBVH_getBounds(self_: *const PxBVH) -> *const PxBounds3;

    /// Retrieve the bounds in the BVH.
    ///
    /// These bounds can be modified. Call refit() after modifications are done.
    ///
    /// These are the user-defined bounds passed to the BVH builder, not the internal bounds around each BVH node.
    pub fn PxBVH_getBoundsForModification_mut(self_: *mut PxBVH) -> *mut PxBounds3;

    /// Refit the BVH.
    ///
    /// This function "refits" the tree, i.e. takes the new (leaf) bounding boxes into account and
    /// recomputes all the BVH bounds accordingly. This is an O(n) operation with n = number of bounds in the BVH.
    ///
    /// This works best with minor bounds modifications, i.e. when the bounds remain close to their initial values.
    /// With large modifications the tree quality degrades more and more, and subsequent query performance suffers.
    /// It might be a better strategy to create a brand new BVH if bounds change drastically.
    ///
    /// This function refits the whole tree after an arbitrary number of bounds have potentially been modified by
    /// users (via getBoundsForModification()). If you only have a small number of bounds to update, it might be
    /// more efficient to use setBounds() and partialRefit() instead.
    pub fn PxBVH_refit_mut(self_: *mut PxBVH);

    /// Update single bounds.
    ///
    /// This is an alternative to getBoundsForModification() / refit(). If you only have a small set of bounds to
    /// update, it can be inefficient to call the refit() function, because it refits the whole BVH.
    ///
    /// Instead, one can update individual bounds with this updateBounds() function. It sets the new bounds and
    /// marks the corresponding BVH nodes for partial refit. Once all the individual bounds have been updated,
    /// call partialRefit() to only refit the subset of marked nodes.
    ///
    /// true if success
    pub fn PxBVH_updateBounds_mut(self_: *mut PxBVH, boundsIndex: u32, newBounds: *const PxBounds3) -> bool;

    /// Refits subset of marked nodes.
    ///
    /// This is an alternative to the refit() function, to be called after updateBounds() calls.
    /// See updateBounds() for details.
    pub fn PxBVH_partialRefit_mut(self_: *mut PxBVH);

    /// Generic BVH traversal function.
    ///
    /// This can be used to implement custom BVH traversal functions if provided ones are not enough.
    /// In particular this can be used to visualize the tree's bounds.
    ///
    /// false if query has been aborted
    pub fn PxBVH_traverse(self_: *const PxBVH, cb: *mut PxBVHTraversalCallback) -> bool;

    pub fn PxBVH_getConcreteTypeName(self_: *const PxBVH) -> *const std::ffi::c_char;

    /// Constructor, initializes to a capsule with passed radius and half height.
    pub fn PxCapsuleGeometry_new(radius_: f32, halfHeight_: f32) -> PxCapsuleGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid.
    ///
    /// A valid capsule has radius > 0, halfHeight >= 0.
    /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a capsule that has zero radius or height.
    pub fn PxCapsuleGeometry_isValid(self_: *const PxCapsuleGeometry) -> bool;

    /// Returns the number of vertices.
    ///
    /// Number of vertices.
    pub fn PxConvexMesh_getNbVertices(self_: *const PxConvexMesh) -> u32;

    /// Returns the vertices.
    ///
    /// Array of vertices.
    pub fn PxConvexMesh_getVertices(self_: *const PxConvexMesh) -> *const PxVec3;

    /// Returns the index buffer.
    ///
    /// Index buffer.
    pub fn PxConvexMesh_getIndexBuffer(self_: *const PxConvexMesh) -> *const u8;

    /// Returns the number of polygons.
    ///
    /// Number of polygons.
    pub fn PxConvexMesh_getNbPolygons(self_: *const PxConvexMesh) -> u32;

    /// Returns the polygon data.
    ///
    /// True if success.
    pub fn PxConvexMesh_getPolygonData(self_: *const PxConvexMesh, index: u32, data: *mut PxHullPolygon) -> bool;

    /// Decrements the reference count of a convex mesh and releases it if the new reference count is zero.
    pub fn PxConvexMesh_release_mut(self_: *mut PxConvexMesh);

    /// Returns the mass properties of the mesh assuming unit density.
    ///
    /// The following relationship holds between mass and volume:
    ///
    /// mass = volume * density
    ///
    /// The mass of a unit density mesh is equal to its volume, so this function returns the volume of the mesh.
    ///
    /// Similarly, to obtain the localInertia of an identically shaped object with a uniform density of d, simply multiply the
    /// localInertia of the unit density mesh by d.
    pub fn PxConvexMesh_getMassInformation(self_: *const PxConvexMesh, mass: *mut f32, localInertia: *mut PxMat33, localCenterOfMass: *mut PxVec3);

    /// Returns the local-space (vertex space) AABB from the convex mesh.
    ///
    /// local-space bounds
    pub fn PxConvexMesh_getLocalBounds(self_: *const PxConvexMesh) -> PxBounds3;

    /// Returns the local-space Signed Distance Field for this mesh if it has one.
    ///
    /// local-space SDF.
    pub fn PxConvexMesh_getSDF(self_: *const PxConvexMesh) -> *const f32;

    pub fn PxConvexMesh_getConcreteTypeName(self_: *const PxConvexMesh) -> *const std::ffi::c_char;

    /// This method decides whether a convex mesh is gpu compatible. If the total number of vertices are more than 64 or any number of vertices in a polygon is more than 32, or
    /// convex hull data was not cooked with GPU data enabled during cooking or was loaded from a serialized collection, the convex hull is incompatible with GPU collision detection. Otherwise
    /// it is compatible.
    ///
    /// True if the convex hull is gpu compatible
    pub fn PxConvexMesh_isGpuCompatible(self_: *const PxConvexMesh) -> bool;

    /// Constructor initializes to identity scale.
    pub fn PxMeshScale_new() -> PxMeshScale;

    /// Constructor from scalar.
    pub fn PxMeshScale_new_1(r: f32) -> PxMeshScale;

    /// Constructor to initialize to arbitrary scale and identity scale rotation.
    pub fn PxMeshScale_new_2(s: *const PxVec3) -> PxMeshScale;

    /// Constructor to initialize to arbitrary scaling.
    pub fn PxMeshScale_new_3(s: *const PxVec3, r: *const PxQuat) -> PxMeshScale;

    /// Returns true if the scaling is an identity transformation.
    pub fn PxMeshScale_isIdentity(self_: *const PxMeshScale) -> bool;

    /// Returns the inverse of this scaling transformation.
    pub fn PxMeshScale_getInverse(self_: *const PxMeshScale) -> PxMeshScale;

    /// Converts this transformation to a 3x3 matrix representation.
    pub fn PxMeshScale_toMat33(self_: *const PxMeshScale) -> PxMat33;

    /// Returns true if combination of negative scale components will cause the triangle normal to flip. The SDK will flip the normals internally.
    pub fn PxMeshScale_hasNegativeDeterminant(self_: *const PxMeshScale) -> bool;

    pub fn PxMeshScale_transform(self_: *const PxMeshScale, v: *const PxVec3) -> PxVec3;

    pub fn PxMeshScale_isValidForTriangleMesh(self_: *const PxMeshScale) -> bool;

    pub fn PxMeshScale_isValidForConvexMesh(self_: *const PxMeshScale) -> bool;

    /// Constructor. By default creates an empty object with a NULL mesh and identity scale.
    pub fn PxConvexMeshGeometry_new(mesh: *mut PxConvexMesh, scaling: *const PxMeshScale, flags: PxConvexMeshGeometryFlags) -> PxConvexMeshGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid for shape creation.
    ///
    /// A valid convex mesh has a positive scale value in each direction (scale.x > 0, scale.y > 0, scale.z > 0).
    /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a convex that has zero extent in any direction.
    pub fn PxConvexMeshGeometry_isValid(self_: *const PxConvexMeshGeometry) -> bool;

    /// Constructor.
    pub fn PxSphereGeometry_new(ir: f32) -> PxSphereGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid
    ///
    /// A valid sphere has radius > 0.
    /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a sphere that has zero radius.
    pub fn PxSphereGeometry_isValid(self_: *const PxSphereGeometry) -> bool;

    /// Constructor.
    pub fn PxPlaneGeometry_new() -> PxPlaneGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid
    pub fn PxPlaneGeometry_isValid(self_: *const PxPlaneGeometry) -> bool;

    /// Constructor. By default creates an empty object with a NULL mesh and identity scale.
    pub fn PxTriangleMeshGeometry_new(mesh: *mut PxTriangleMesh, scaling: *const PxMeshScale, flags: PxMeshGeometryFlags) -> PxTriangleMeshGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid for shape creation.
    ///
    /// A valid triangle mesh has a positive scale value in each direction (scale.scale.x > 0, scale.scale.y > 0, scale.scale.z > 0).
    /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a triangle mesh that has zero extents in any direction.
    pub fn PxTriangleMeshGeometry_isValid(self_: *const PxTriangleMeshGeometry) -> bool;

    /// Constructor.
    pub fn PxHeightFieldGeometry_new(hf: *mut PxHeightField, flags: PxMeshGeometryFlags, heightScale_: f32, rowScale_: f32, columnScale_: f32) -> PxHeightFieldGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid
    ///
    /// A valid height field has a positive scale value in each direction (heightScale > 0, rowScale > 0, columnScale > 0).
    /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a height field that has zero extents in any direction.
    pub fn PxHeightFieldGeometry_isValid(self_: *const PxHeightFieldGeometry) -> bool;

    /// Default constructor.
    ///
    /// Creates an empty object with no particles.
    pub fn PxParticleSystemGeometry_new() -> PxParticleSystemGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid for shape creation.
    pub fn PxParticleSystemGeometry_isValid(self_: *const PxParticleSystemGeometry) -> bool;

    /// Default constructor.
    pub fn PxHairSystemGeometry_new() -> PxHairSystemGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid for shape creation.
    pub fn PxHairSystemGeometry_isValid(self_: *const PxHairSystemGeometry) -> bool;

    /// Constructor. By default creates an empty object with a NULL mesh and identity scale.
    pub fn PxTetrahedronMeshGeometry_new(mesh: *mut PxTetrahedronMesh) -> PxTetrahedronMeshGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid for shape creation.
    ///
    /// A valid tetrahedron mesh has a positive scale value in each direction (scale.scale.x > 0, scale.scale.y > 0, scale.scale.z > 0).
    /// It is illegal to call PxRigidActor::createShape and PxPhysics::createShape with a tetrahedron mesh that has zero extents in any direction.
    pub fn PxTetrahedronMeshGeometry_isValid(self_: *const PxTetrahedronMeshGeometry) -> bool;

    pub fn PxQueryHit_new() -> PxQueryHit;

    pub fn PxLocationHit_new() -> PxLocationHit;

    /// For raycast hits: true for shapes overlapping with raycast origin.
    ///
    /// For sweep hits: true for shapes overlapping at zero sweep distance.
    pub fn PxLocationHit_hadInitialOverlap(self_: *const PxLocationHit) -> bool;

    pub fn PxGeomRaycastHit_new() -> PxGeomRaycastHit;

    pub fn PxGeomOverlapHit_new() -> PxGeomOverlapHit;

    pub fn PxGeomSweepHit_new() -> PxGeomSweepHit;

    pub fn PxGeomIndexPair_new() -> PxGeomIndexPair;

    pub fn PxGeomIndexPair_new_1(_id0: u32, _id1: u32) -> PxGeomIndexPair;

    /// For internal use
    pub fn phys_PxCustomGeometry_getUniqueID() -> u32;

    /// Default constructor
    pub fn PxCustomGeometryType_new() -> PxCustomGeometryType;

    /// Invalid type
    pub fn PxCustomGeometryType_INVALID() -> PxCustomGeometryType;

    /// Return custom type. The type purpose is for user to differentiate custom geometries. Not used by PhysX.
    ///
    /// Unique ID of a custom geometry type.
    ///
    /// User should use DECLARE_CUSTOM_GEOMETRY_TYPE and IMPLEMENT_CUSTOM_GEOMETRY_TYPE intead of overwriting this function.
    pub fn PxCustomGeometryCallbacks_getCustomType(self_: *const PxCustomGeometryCallbacks) -> PxCustomGeometryType;

    /// Return local bounds.
    ///
    /// Bounding box in the geometry local space.
    pub fn PxCustomGeometryCallbacks_getLocalBounds(self_: *const PxCustomGeometryCallbacks, geometry: *const PxGeometry) -> PxBounds3;

    /// Raycast. Cast a ray against the geometry in given pose.
    ///
    /// Number of hits.
    pub fn PxCustomGeometryCallbacks_raycast(self_: *const PxCustomGeometryCallbacks, origin: *const PxVec3, unitDir: *const PxVec3, geom: *const PxGeometry, pose: *const PxTransform, maxDist: f32, hitFlags: PxHitFlags, maxHits: u32, rayHits: *mut PxGeomRaycastHit, stride: u32, threadContext: *mut PxQueryThreadContext) -> u32;

    /// Overlap. Test if geometries overlap.
    ///
    /// True if there is overlap. False otherwise.
    pub fn PxCustomGeometryCallbacks_overlap(self_: *const PxCustomGeometryCallbacks, geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, threadContext: *mut PxQueryThreadContext) -> bool;

    /// Sweep. Sweep one geometry against the other.
    ///
    /// True if there is hit. False otherwise.
    pub fn PxCustomGeometryCallbacks_sweep(self_: *const PxCustomGeometryCallbacks, unitDir: *const PxVec3, maxDist: f32, geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, sweepHit: *mut PxGeomSweepHit, hitFlags: PxHitFlags, inflation: f32, threadContext: *mut PxQueryThreadContext) -> bool;

    /// Compute custom geometry mass properties. For geometries usable with dynamic rigidbodies.
    pub fn PxCustomGeometryCallbacks_computeMassProperties(self_: *const PxCustomGeometryCallbacks, geometry: *const PxGeometry, massProperties: *mut PxMassProperties);

    /// Compatible with PhysX's PCM feature. Allows to optimize contact generation.
    pub fn PxCustomGeometryCallbacks_usePersistentContactManifold(self_: *const PxCustomGeometryCallbacks, geometry: *const PxGeometry, breakingThreshold: *mut f32) -> bool;

    pub fn PxCustomGeometryCallbacks_delete(self_: *mut PxCustomGeometryCallbacks);

    /// Default constructor.
    ///
    /// Creates an empty object with a NULL callbacks pointer.
    pub fn PxCustomGeometry_new() -> PxCustomGeometry;

    /// Constructor.
    pub fn PxCustomGeometry_new_1(_callbacks: *mut PxCustomGeometryCallbacks) -> PxCustomGeometry;

    /// Returns true if the geometry is valid.
    ///
    /// True if the current settings are valid for shape creation.
    pub fn PxCustomGeometry_isValid(self_: *const PxCustomGeometry) -> bool;

    /// Returns the custom type of the custom geometry.
    pub fn PxCustomGeometry_getCustomType(self_: *const PxCustomGeometry) -> PxCustomGeometryType;

    pub fn PxGeometryHolder_getType(self_: *const PxGeometryHolder) -> PxGeometryType;

    pub fn PxGeometryHolder_any_mut(self_: *mut PxGeometryHolder) -> *mut PxGeometry;

    pub fn PxGeometryHolder_any(self_: *const PxGeometryHolder) -> *const PxGeometry;

    pub fn PxGeometryHolder_sphere_mut(self_: *mut PxGeometryHolder) -> *mut PxSphereGeometry;

    pub fn PxGeometryHolder_sphere(self_: *const PxGeometryHolder) -> *const PxSphereGeometry;

    pub fn PxGeometryHolder_plane_mut(self_: *mut PxGeometryHolder) -> *mut PxPlaneGeometry;

    pub fn PxGeometryHolder_plane(self_: *const PxGeometryHolder) -> *const PxPlaneGeometry;

    pub fn PxGeometryHolder_capsule_mut(self_: *mut PxGeometryHolder) -> *mut PxCapsuleGeometry;

    pub fn PxGeometryHolder_capsule(self_: *const PxGeometryHolder) -> *const PxCapsuleGeometry;

    pub fn PxGeometryHolder_box_mut(self_: *mut PxGeometryHolder) -> *mut PxBoxGeometry;

    pub fn PxGeometryHolder_box(self_: *const PxGeometryHolder) -> *const PxBoxGeometry;

    pub fn PxGeometryHolder_convexMesh_mut(self_: *mut PxGeometryHolder) -> *mut PxConvexMeshGeometry;

    pub fn PxGeometryHolder_convexMesh(self_: *const PxGeometryHolder) -> *const PxConvexMeshGeometry;

    pub fn PxGeometryHolder_tetMesh_mut(self_: *mut PxGeometryHolder) -> *mut PxTetrahedronMeshGeometry;

    pub fn PxGeometryHolder_tetMesh(self_: *const PxGeometryHolder) -> *const PxTetrahedronMeshGeometry;

    pub fn PxGeometryHolder_triangleMesh_mut(self_: *mut PxGeometryHolder) -> *mut PxTriangleMeshGeometry;

    pub fn PxGeometryHolder_triangleMesh(self_: *const PxGeometryHolder) -> *const PxTriangleMeshGeometry;

    pub fn PxGeometryHolder_heightField_mut(self_: *mut PxGeometryHolder) -> *mut PxHeightFieldGeometry;

    pub fn PxGeometryHolder_heightField(self_: *const PxGeometryHolder) -> *const PxHeightFieldGeometry;

    pub fn PxGeometryHolder_particleSystem_mut(self_: *mut PxGeometryHolder) -> *mut PxParticleSystemGeometry;

    pub fn PxGeometryHolder_particleSystem(self_: *const PxGeometryHolder) -> *const PxParticleSystemGeometry;

    pub fn PxGeometryHolder_hairSystem_mut(self_: *mut PxGeometryHolder) -> *mut PxHairSystemGeometry;

    pub fn PxGeometryHolder_hairSystem(self_: *const PxGeometryHolder) -> *const PxHairSystemGeometry;

    pub fn PxGeometryHolder_custom_mut(self_: *mut PxGeometryHolder) -> *mut PxCustomGeometry;

    pub fn PxGeometryHolder_custom(self_: *const PxGeometryHolder) -> *const PxCustomGeometry;

    pub fn PxGeometryHolder_storeAny_mut(self_: *mut PxGeometryHolder, geometry: *const PxGeometry);

    pub fn PxGeometryHolder_new() -> PxGeometryHolder;

    pub fn PxGeometryHolder_new_1(geometry: *const PxGeometry) -> PxGeometryHolder;

    /// Raycast test against a geometry object.
    ///
    /// All geometry types are supported except PxParticleSystemGeometry, PxTetrahedronMeshGeometry and PxHairSystemGeometry.
    ///
    /// Number of hits between the ray and the geometry object
    pub fn PxGeometryQuery_raycast(origin: *const PxVec3, unitDir: *const PxVec3, geom: *const PxGeometry, pose: *const PxTransform, maxDist: f32, hitFlags: PxHitFlags, maxHits: u32, rayHits: *mut PxGeomRaycastHit, stride: u32, queryFlags: PxGeometryQueryFlags, threadContext: *mut PxQueryThreadContext) -> u32;

    /// Overlap test for two geometry objects.
    ///
    /// All combinations are supported except:
    ///
    /// PxPlaneGeometry vs. {PxPlaneGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
    ///
    /// PxTriangleMeshGeometry vs. PxHeightFieldGeometry
    ///
    /// PxHeightFieldGeometry vs. PxHeightFieldGeometry
    ///
    /// Anything involving PxParticleSystemGeometry, PxTetrahedronMeshGeometry or PxHairSystemGeometry.
    ///
    /// True if the two geometry objects overlap
    pub fn PxGeometryQuery_overlap(geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, queryFlags: PxGeometryQueryFlags, threadContext: *mut PxQueryThreadContext) -> bool;

    /// Sweep a specified geometry object in space and test for collision with a given object.
    ///
    /// The following combinations are supported.
    ///
    /// PxSphereGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
    ///
    /// PxCapsuleGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
    ///
    /// PxBoxGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
    ///
    /// PxConvexMeshGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
    ///
    /// True if the swept geometry object geom0 hits the object geom1
    pub fn PxGeometryQuery_sweep(unitDir: *const PxVec3, maxDist: f32, geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, sweepHit: *mut PxGeomSweepHit, hitFlags: PxHitFlags, inflation: f32, queryFlags: PxGeometryQueryFlags, threadContext: *mut PxQueryThreadContext) -> bool;

    /// Compute minimum translational distance (MTD) between two geometry objects.
    ///
    /// All combinations of geom objects are supported except:
    /// - plane/plane
    /// - plane/mesh
    /// - plane/heightfield
    /// - mesh/mesh
    /// - mesh/heightfield
    /// - heightfield/heightfield
    /// - anything involving PxParticleSystemGeometry, PxTetrahedronMeshGeometry or PxHairSystemGeometry
    ///
    /// The function returns a unit vector ('direction') and a penetration depth ('depth').
    ///
    /// The depenetration vector D = direction * depth should be applied to the first object, to
    /// get out of the second object.
    ///
    /// Returned depth should always be positive or null.
    ///
    /// If objects do not overlap, the function can not compute the MTD and returns false.
    ///
    /// True if the MTD has successfully been computed, i.e. if objects do overlap.
    pub fn PxGeometryQuery_computePenetration(direction: *mut PxVec3, depth: *mut f32, geom0: *const PxGeometry, pose0: *const PxTransform, geom1: *const PxGeometry, pose1: *const PxTransform, queryFlags: PxGeometryQueryFlags) -> bool;

    /// Computes distance between a point and a geometry object.
    ///
    /// Currently supported geometry objects: box, sphere, capsule, convex, mesh.
    ///
    /// For meshes, only the BVH34 midphase data-structure is supported.
    ///
    /// Square distance between the point and the geom object, or 0.0 if the point is inside the object, or -1.0 if an error occured (geometry type is not supported, or invalid pose)
    pub fn PxGeometryQuery_pointDistance(point: *const PxVec3, geom: *const PxGeometry, pose: *const PxTransform, closestPoint: *mut PxVec3, closestIndex: *mut u32, queryFlags: PxGeometryQueryFlags) -> f32;

    /// computes the bounds for a geometry object
    pub fn PxGeometryQuery_computeGeomBounds(bounds: *mut PxBounds3, geom: *const PxGeometry, pose: *const PxTransform, offset: f32, inflation: f32, queryFlags: PxGeometryQueryFlags);

    /// Checks if provided geometry is valid.
    ///
    /// True if geometry is valid.
    pub fn PxGeometryQuery_isValid(geom: *const PxGeometry) -> bool;

    pub fn PxHeightFieldSample_tessFlag(self_: *const PxHeightFieldSample) -> u8;

    pub fn PxHeightFieldSample_setTessFlag_mut(self_: *mut PxHeightFieldSample);

    pub fn PxHeightFieldSample_clearTessFlag_mut(self_: *mut PxHeightFieldSample);

    /// Decrements the reference count of a height field and releases it if the new reference count is zero.
    pub fn PxHeightField_release_mut(self_: *mut PxHeightField);

    /// Writes out the sample data array.
    ///
    /// The user provides destBufferSize bytes storage at destBuffer.
    /// The data is formatted and arranged as PxHeightFieldDesc.samples.
    ///
    /// The number of bytes written.
    pub fn PxHeightField_saveCells(self_: *const PxHeightField, destBuffer: *mut std::ffi::c_void, destBufferSize: u32) -> u32;

    /// Replaces a rectangular subfield in the sample data array.
    ///
    /// The user provides the description of a rectangular subfield in subfieldDesc.
    /// The data is formatted and arranged as PxHeightFieldDesc.samples.
    ///
    /// True on success, false on failure. Failure can occur due to format mismatch.
    ///
    /// Modified samples are constrained to the same height quantization range as the original heightfield.
    /// Source samples that are out of range of target heightfield will be clipped with no error.
    /// PhysX does not keep a mapping from the heightfield to heightfield shapes that reference it.
    /// Call PxShape::setGeometry on each shape which references the height field, to ensure that internal data structures are updated to reflect the new geometry.
    /// Please note that PxShape::setGeometry does not guarantee correct/continuous behavior when objects are resting on top of old or new geometry.
    pub fn PxHeightField_modifySamples_mut(self_: *mut PxHeightField, startCol: i32, startRow: i32, subfieldDesc: *const PxHeightFieldDesc, shrinkBounds: bool) -> bool;

    /// Retrieves the number of sample rows in the samples array.
    ///
    /// The number of sample rows in the samples array.
    pub fn PxHeightField_getNbRows(self_: *const PxHeightField) -> u32;

    /// Retrieves the number of sample columns in the samples array.
    ///
    /// The number of sample columns in the samples array.
    pub fn PxHeightField_getNbColumns(self_: *const PxHeightField) -> u32;

    /// Retrieves the format of the sample data.
    ///
    /// The format of the sample data.
    pub fn PxHeightField_getFormat(self_: *const PxHeightField) -> PxHeightFieldFormat;

    /// Retrieves the offset in bytes between consecutive samples in the array.
    ///
    /// The offset in bytes between consecutive samples in the array.
    pub fn PxHeightField_getSampleStride(self_: *const PxHeightField) -> u32;

    /// Retrieves the convex edge threshold.
    ///
    /// The convex edge threshold.
    pub fn PxHeightField_getConvexEdgeThreshold(self_: *const PxHeightField) -> f32;

    /// Retrieves the flags bits, combined from values of the enum ::PxHeightFieldFlag.
    ///
    /// The flags bits, combined from values of the enum ::PxHeightFieldFlag.
    pub fn PxHeightField_getFlags(self_: *const PxHeightField) -> PxHeightFieldFlags;

    /// Retrieves the height at the given coordinates in grid space.
    ///
    /// The height at the given coordinates or 0 if the coordinates are out of range.
    pub fn PxHeightField_getHeight(self_: *const PxHeightField, x: f32, z: f32) -> f32;

    /// Returns material table index of given triangle
    ///
    /// This function takes a post cooking triangle index.
    ///
    /// Material table index, or 0xffff if no per-triangle materials are used
    pub fn PxHeightField_getTriangleMaterialIndex(self_: *const PxHeightField, triangleIndex: u32) -> u16;

    /// Returns a triangle face normal for a given triangle index
    ///
    /// This function takes a post cooking triangle index.
    ///
    /// Triangle normal for a given triangle index
    pub fn PxHeightField_getTriangleNormal(self_: *const PxHeightField, triangleIndex: u32) -> PxVec3;

    /// Returns heightfield sample of given row and column
    ///
    /// Heightfield sample
    pub fn PxHeightField_getSample(self_: *const PxHeightField, row: u32, column: u32) -> *const PxHeightFieldSample;

    /// Returns the number of times the heightfield data has been modified
    ///
    /// This method returns the number of times modifySamples has been called on this heightfield, so that code that has
    /// retained state that depends on the heightfield can efficiently determine whether it has been modified.
    ///
    /// the number of times the heightfield sample data has been modified.
    pub fn PxHeightField_getTimestamp(self_: *const PxHeightField) -> u32;

    pub fn PxHeightField_getConcreteTypeName(self_: *const PxHeightField) -> *const std::ffi::c_char;

    /// Constructor sets to default.
    pub fn PxHeightFieldDesc_new() -> PxHeightFieldDesc;

    /// (re)sets the structure to the default.
    pub fn PxHeightFieldDesc_setToDefault_mut(self_: *mut PxHeightFieldDesc);

    /// Returns true if the descriptor is valid.
    ///
    /// True if the current settings are valid.
    pub fn PxHeightFieldDesc_isValid(self_: *const PxHeightFieldDesc) -> bool;

    /// Retrieves triangle data from a triangle ID.
    ///
    /// This function can be used together with [`findOverlapTriangleMesh`]() to retrieve triangle properties.
    ///
    /// This function will flip the triangle normal whenever triGeom.scale.hasNegativeDeterminant() is true.
    pub fn PxMeshQuery_getTriangle(triGeom: *const PxTriangleMeshGeometry, transform: *const PxTransform, triangleIndex: u32, triangle: *mut PxTriangle, vertexIndices: *mut u32, adjacencyIndices: *mut u32);

    /// Retrieves triangle data from a triangle ID.
    ///
    /// This function can be used together with [`findOverlapHeightField`]() to retrieve triangle properties.
    ///
    /// This function will flip the triangle normal whenever triGeom.scale.hasNegativeDeterminant() is true.
    ///
    /// TriangleIndex is an index used in internal format, which does have an index out of the bounds in last row.
    /// To traverse all tri indices in the HF, the following code can be applied:
    /// for (PxU32 row = 0; row
    /// <
    /// (nbRows - 1); row++)
    /// {
    /// for (PxU32 col = 0; col
    /// <
    /// (nbCols - 1); col++)
    /// {
    /// for (PxU32 k = 0; k
    /// <
    /// 2; k++)
    /// {
    /// const PxU32 triIndex = 2 * (row*nbCols + col) + k;
    /// ....
    /// }
    /// }
    /// }
    pub fn PxMeshQuery_getTriangle_1(hfGeom: *const PxHeightFieldGeometry, transform: *const PxTransform, triangleIndex: u32, triangle: *mut PxTriangle, vertexIndices: *mut u32, adjacencyIndices: *mut u32);

    /// Find the mesh triangles which touch the specified geometry object.
    ///
    /// For mesh-vs-mesh overlap tests, please use the specialized function below.
    ///
    /// Returned triangle indices can be used with [`getTriangle`]() to retrieve the triangle properties.
    ///
    /// Number of overlaps found, i.e. number of elements written to the results buffer
    pub fn PxMeshQuery_findOverlapTriangleMesh(geom: *const PxGeometry, geomPose: *const PxTransform, meshGeom: *const PxTriangleMeshGeometry, meshPose: *const PxTransform, results: *mut u32, maxResults: u32, startIndex: u32, overflow: *mut bool, queryFlags: PxGeometryQueryFlags) -> u32;

    /// Find the height field triangles which touch the specified geometry object.
    ///
    /// Returned triangle indices can be used with [`getTriangle`]() to retrieve the triangle properties.
    ///
    /// Number of overlaps found, i.e. number of elements written to the results buffer
    pub fn PxMeshQuery_findOverlapHeightField(geom: *const PxGeometry, geomPose: *const PxTransform, hfGeom: *const PxHeightFieldGeometry, hfPose: *const PxTransform, results: *mut u32, maxResults: u32, startIndex: u32, overflow: *mut bool, queryFlags: PxGeometryQueryFlags) -> u32;

    /// Sweep a specified geometry object in space and test for collision with a set of given triangles.
    ///
    /// This function simply sweeps input geometry against each input triangle, in the order they are given.
    /// This is an O(N) operation with N = number of input triangles. It does not use any particular acceleration structure.
    ///
    /// True if the swept geometry object hits the specified triangles
    ///
    /// Only the following geometry types are currently supported: PxSphereGeometry, PxCapsuleGeometry, PxBoxGeometry
    ///
    /// If a shape from the scene is already overlapping with the query shape in its starting position, the hit is returned unless eASSUME_NO_INITIAL_OVERLAP was specified.
    ///
    /// This function returns a single closest hit across all the input triangles. Multiple hits are not supported.
    ///
    /// Supported hitFlags are PxHitFlag::eDEFAULT, PxHitFlag::eASSUME_NO_INITIAL_OVERLAP, PxHitFlag::ePRECISE_SWEEP, PxHitFlag::eMESH_BOTH_SIDES, PxHitFlag::eMESH_ANY.
    ///
    /// ePOSITION is only defined when there is no initial overlap (sweepHit.hadInitialOverlap() == false)
    ///
    /// The returned normal for initially overlapping sweeps is set to -unitDir.
    ///
    /// Otherwise the returned normal is the front normal of the triangle even if PxHitFlag::eMESH_BOTH_SIDES is set.
    ///
    /// The returned PxGeomSweepHit::faceIndex parameter will hold the index of the hit triangle in input array, i.e. the range is [0; triangleCount). For initially overlapping sweeps, this is the index of overlapping triangle.
    ///
    /// The inflation parameter is not compatible with PxHitFlag::ePRECISE_SWEEP.
    pub fn PxMeshQuery_sweep(unitDir: *const PxVec3, distance: f32, geom: *const PxGeometry, pose: *const PxTransform, triangleCount: u32, triangles: *const PxTriangle, sweepHit: *mut PxGeomSweepHit, hitFlags: PxHitFlags, cachedIndex: *const u32, inflation: f32, doubleSided: bool, queryFlags: PxGeometryQueryFlags) -> bool;

    /// constructor sets to default.
    pub fn PxSimpleTriangleMesh_new() -> PxSimpleTriangleMesh;

    /// (re)sets the structure to the default.
    pub fn PxSimpleTriangleMesh_setToDefault_mut(self_: *mut PxSimpleTriangleMesh);

    /// returns true if the current settings are valid
    pub fn PxSimpleTriangleMesh_isValid(self_: *const PxSimpleTriangleMesh) -> bool;

    /// Constructor
    pub fn PxTriangle_new_alloc() -> *mut PxTriangle;

    /// Constructor
    pub fn PxTriangle_new_alloc_1(p0: *const PxVec3, p1: *const PxVec3, p2: *const PxVec3) -> *mut PxTriangle;

    /// Destructor
    pub fn PxTriangle_delete(self_: *mut PxTriangle);

    /// Compute the normal of the Triangle.
    pub fn PxTriangle_normal(self_: *const PxTriangle, _normal: *mut PxVec3);

    /// Compute the unnormalized normal of the triangle.
    pub fn PxTriangle_denormalizedNormal(self_: *const PxTriangle, _normal: *mut PxVec3);

    /// Compute the area of the triangle.
    ///
    /// Area of the triangle.
    pub fn PxTriangle_area(self_: *const PxTriangle) -> f32;

    /// Computes a point on the triangle from u and v barycentric coordinates.
    pub fn PxTriangle_pointFromUV(self_: *const PxTriangle, u: f32, v: f32) -> PxVec3;

    pub fn PxTrianglePadded_new_alloc() -> *mut PxTrianglePadded;

    pub fn PxTrianglePadded_delete(self_: *mut PxTrianglePadded);

    /// Returns the number of vertices.
    ///
    /// number of vertices
    pub fn PxTriangleMesh_getNbVertices(self_: *const PxTriangleMesh) -> u32;

    /// Returns the vertices.
    ///
    /// array of vertices
    pub fn PxTriangleMesh_getVertices(self_: *const PxTriangleMesh) -> *const PxVec3;

    /// Returns all mesh vertices for modification.
    ///
    /// This function will return the vertices of the mesh so that their positions can be changed in place.
    /// After modifying the vertices you must call refitBVH for the refitting to actually take place.
    /// This function maintains the old mesh topology (triangle indices).
    ///
    /// inplace vertex coordinates for each existing mesh vertex.
    ///
    /// It is recommended to use this feature for scene queries only.
    ///
    /// Size of array returned is equal to the number returned by getNbVertices().
    ///
    /// This function operates on cooked vertex indices.
    ///
    /// This means the index mapping and vertex count can be different from what was provided as an input to the cooking routine.
    ///
    /// To achieve unchanged 1-to-1 index mapping with orignal mesh data (before cooking) please use the following cooking flags:
    ///
    /// eWELD_VERTICES = 0, eDISABLE_CLEAN_MESH = 1.
    ///
    /// It is also recommended to make sure that a call to validateTriangleMesh returns true if mesh cleaning is disabled.
    pub fn PxTriangleMesh_getVerticesForModification_mut(self_: *mut PxTriangleMesh) -> *mut PxVec3;

    /// Refits BVH for mesh vertices.
    ///
    /// This function will refit the mesh BVH to correctly enclose the new positions updated by getVerticesForModification.
    /// Mesh BVH will not be reoptimized by this function so significantly different new positions will cause significantly reduced performance.
    ///
    /// New bounds for the entire mesh.
    ///
    /// For PxMeshMidPhase::eBVH34 trees the refit operation is only available on non-quantized trees (see PxBVH34MidphaseDesc::quantized)
    ///
    /// PhysX does not keep a mapping from the mesh to mesh shapes that reference it.
    ///
    /// Call PxShape::setGeometry on each shape which references the mesh, to ensure that internal data structures are updated to reflect the new geometry.
    ///
    /// PxShape::setGeometry does not guarantee correct/continuous behavior when objects are resting on top of old or new geometry.
    ///
    /// It is also recommended to make sure that a call to validateTriangleMesh returns true if mesh cleaning is disabled.
    ///
    /// Active edges information will be lost during refit, the rigid body mesh contact generation might not perform as expected.
    pub fn PxTriangleMesh_refitBVH_mut(self_: *mut PxTriangleMesh) -> PxBounds3;

    /// Returns the number of triangles.
    ///
    /// number of triangles
    pub fn PxTriangleMesh_getNbTriangles(self_: *const PxTriangleMesh) -> u32;

    /// Returns the triangle indices.
    ///
    /// The indices can be 16 or 32bit depending on the number of triangles in the mesh.
    /// Call getTriangleMeshFlags() to know if the indices are 16 or 32 bits.
    ///
    /// The number of indices is the number of triangles * 3.
    ///
    /// array of triangles
    pub fn PxTriangleMesh_getTriangles(self_: *const PxTriangleMesh) -> *const std::ffi::c_void;

    /// Reads the PxTriangleMesh flags.
    ///
    /// See the list of flags [`PxTriangleMeshFlag`]
    ///
    /// The values of the PxTriangleMesh flags.
    pub fn PxTriangleMesh_getTriangleMeshFlags(self_: *const PxTriangleMesh) -> PxTriangleMeshFlags;

    /// Returns the triangle remapping table.
    ///
    /// The triangles are internally sorted according to various criteria. Hence the internal triangle order
    /// does not always match the original (user-defined) order. The remapping table helps finding the old
    /// indices knowing the new ones:
    ///
    /// remapTable[ internalTriangleIndex ] = originalTriangleIndex
    ///
    /// the remapping table (or NULL if 'PxCookingParams::suppressTriangleMeshRemapTable' has been used)
    pub fn PxTriangleMesh_getTrianglesRemap(self_: *const PxTriangleMesh) -> *const u32;

    /// Decrements the reference count of a triangle mesh and releases it if the new reference count is zero.
    pub fn PxTriangleMesh_release_mut(self_: *mut PxTriangleMesh);

    /// Returns material table index of given triangle
    ///
    /// This function takes a post cooking triangle index.
    ///
    /// Material table index, or 0xffff if no per-triangle materials are used
    pub fn PxTriangleMesh_getTriangleMaterialIndex(self_: *const PxTriangleMesh, triangleIndex: u32) -> u16;

    /// Returns the local-space (vertex space) AABB from the triangle mesh.
    ///
    /// local-space bounds
    pub fn PxTriangleMesh_getLocalBounds(self_: *const PxTriangleMesh) -> PxBounds3;

    /// Returns the local-space Signed Distance Field for this mesh if it has one.
    ///
    /// local-space SDF.
    pub fn PxTriangleMesh_getSDF(self_: *const PxTriangleMesh) -> *const f32;

    /// Returns the resolution of the local-space dense SDF.
    pub fn PxTriangleMesh_getSDFDimensions(self_: *const PxTriangleMesh, numX: *mut u32, numY: *mut u32, numZ: *mut u32);

    /// Sets whether this mesh should be preferred for SDF projection.
    ///
    /// By default, meshes are flagged as preferring projection and the decisions on which mesh to project is based on the triangle and vertex
    /// count. The model with the fewer triangles is projected onto the SDF of the more detailed mesh.
    /// If one of the meshes is set to prefer SDF projection (default) and the other is set to not prefer SDF projection, model flagged as
    /// preferring SDF projection will be projected onto the model flagged as not preferring, regardless of the detail of the respective meshes.
    /// Where both models are flagged as preferring no projection, the less detailed model will be projected as before.
    pub fn PxTriangleMesh_setPreferSDFProjection_mut(self_: *mut PxTriangleMesh, preferProjection: bool);

    /// Returns whether this mesh prefers SDF projection.
    ///
    /// whether this mesh prefers SDF projection.
    pub fn PxTriangleMesh_getPreferSDFProjection(self_: *const PxTriangleMesh) -> bool;

    /// Returns the mass properties of the mesh assuming unit density.
    ///
    /// The following relationship holds between mass and volume:
    ///
    /// mass = volume * density
    ///
    /// The mass of a unit density mesh is equal to its volume, so this function returns the volume of the mesh.
    ///
    /// Similarly, to obtain the localInertia of an identically shaped object with a uniform density of d, simply multiply the
    /// localInertia of the unit density mesh by d.
    pub fn PxTriangleMesh_getMassInformation(self_: *const PxTriangleMesh, mass: *mut f32, localInertia: *mut PxMat33, localCenterOfMass: *mut PxVec3);

    /// Constructor
    pub fn PxTetrahedron_new_alloc() -> *mut PxTetrahedron;

    /// Constructor
    pub fn PxTetrahedron_new_alloc_1(p0: *const PxVec3, p1: *const PxVec3, p2: *const PxVec3, p3: *const PxVec3) -> *mut PxTetrahedron;

    /// Destructor
    pub fn PxTetrahedron_delete(self_: *mut PxTetrahedron);

    /// Decrements the reference count of a tetrahedron mesh and releases it if the new reference count is zero.
    pub fn PxSoftBodyAuxData_release_mut(self_: *mut PxSoftBodyAuxData);

    /// Returns the number of vertices.
    ///
    /// number of vertices
    pub fn PxTetrahedronMesh_getNbVertices(self_: *const PxTetrahedronMesh) -> u32;

    /// Returns the vertices
    ///
    /// array of vertices
    pub fn PxTetrahedronMesh_getVertices(self_: *const PxTetrahedronMesh) -> *const PxVec3;

    /// Returns the number of tetrahedrons.
    ///
    /// number of tetrahedrons
    pub fn PxTetrahedronMesh_getNbTetrahedrons(self_: *const PxTetrahedronMesh) -> u32;

    /// Returns the tetrahedron indices.
    ///
    /// The indices can be 16 or 32bit depending on the number of tetrahedrons in the mesh.
    /// Call getTetrahedronMeshFlags() to know if the indices are 16 or 32 bits.
    ///
    /// The number of indices is the number of tetrahedrons * 4.
    ///
    /// array of tetrahedrons
    pub fn PxTetrahedronMesh_getTetrahedrons(self_: *const PxTetrahedronMesh) -> *const std::ffi::c_void;

    /// Reads the PxTetrahedronMesh flags.
    ///
    /// See the list of flags [`PxTetrahedronMeshFlags`]
    ///
    /// The values of the PxTetrahedronMesh flags.
    pub fn PxTetrahedronMesh_getTetrahedronMeshFlags(self_: *const PxTetrahedronMesh) -> PxTetrahedronMeshFlags;

    /// Returns the tetrahedra remapping table.
    ///
    /// The tetrahedra are internally sorted according to various criteria. Hence the internal tetrahedron order
    /// does not always match the original (user-defined) order. The remapping table helps finding the old
    /// indices knowing the new ones:
    ///
    /// remapTable[ internalTetrahedronIndex ] = originalTetrahedronIndex
    ///
    /// the remapping table (or NULL if 'PxCookingParams::suppressTriangleMeshRemapTable' has been used)
    pub fn PxTetrahedronMesh_getTetrahedraRemap(self_: *const PxTetrahedronMesh) -> *const u32;

    /// Returns the local-space (vertex space) AABB from the tetrahedron mesh.
    ///
    /// local-space bounds
    pub fn PxTetrahedronMesh_getLocalBounds(self_: *const PxTetrahedronMesh) -> PxBounds3;

    /// Decrements the reference count of a tetrahedron mesh and releases it if the new reference count is zero.
    pub fn PxTetrahedronMesh_release_mut(self_: *mut PxTetrahedronMesh);

    /// Const accecssor to the softbody's collision mesh.
    pub fn PxSoftBodyMesh_getCollisionMesh(self_: *const PxSoftBodyMesh) -> *const PxTetrahedronMesh;

    /// Accecssor to the softbody's collision mesh.
    pub fn PxSoftBodyMesh_getCollisionMesh_mut(self_: *mut PxSoftBodyMesh) -> *mut PxTetrahedronMesh;

    /// Const accessor to the softbody's simulation mesh.
    pub fn PxSoftBodyMesh_getSimulationMesh(self_: *const PxSoftBodyMesh) -> *const PxTetrahedronMesh;

    /// Accecssor to the softbody's simulation mesh.
    pub fn PxSoftBodyMesh_getSimulationMesh_mut(self_: *mut PxSoftBodyMesh) -> *mut PxTetrahedronMesh;

    /// Const accessor to the softbodies simulation state.
    pub fn PxSoftBodyMesh_getSoftBodyAuxData(self_: *const PxSoftBodyMesh) -> *const PxSoftBodyAuxData;

    /// Accessor to the softbody's auxilary data like mass and rest pose information
    pub fn PxSoftBodyMesh_getSoftBodyAuxData_mut(self_: *mut PxSoftBodyMesh) -> *mut PxSoftBodyAuxData;

    /// Decrements the reference count of a tetrahedron mesh and releases it if the new reference count is zero.
    pub fn PxSoftBodyMesh_release_mut(self_: *mut PxSoftBodyMesh);

    pub fn PxCollisionMeshMappingData_release_mut(self_: *mut PxCollisionMeshMappingData);

    pub fn PxCollisionTetrahedronMeshData_getMesh(self_: *const PxCollisionTetrahedronMeshData) -> *const PxTetrahedronMeshData;

    pub fn PxCollisionTetrahedronMeshData_getMesh_mut(self_: *mut PxCollisionTetrahedronMeshData) -> *mut PxTetrahedronMeshData;

    pub fn PxCollisionTetrahedronMeshData_getData(self_: *const PxCollisionTetrahedronMeshData) -> *const PxSoftBodyCollisionData;

    pub fn PxCollisionTetrahedronMeshData_getData_mut(self_: *mut PxCollisionTetrahedronMeshData) -> *mut PxSoftBodyCollisionData;

    pub fn PxCollisionTetrahedronMeshData_release_mut(self_: *mut PxCollisionTetrahedronMeshData);

    pub fn PxSimulationTetrahedronMeshData_getMesh_mut(self_: *mut PxSimulationTetrahedronMeshData) -> *mut PxTetrahedronMeshData;

    pub fn PxSimulationTetrahedronMeshData_getData_mut(self_: *mut PxSimulationTetrahedronMeshData) -> *mut PxSoftBodySimulationData;

    pub fn PxSimulationTetrahedronMeshData_release_mut(self_: *mut PxSimulationTetrahedronMeshData);

    /// Deletes the actor.
    ///
    /// Do not keep a reference to the deleted instance.
    ///
    /// If the actor belongs to a [`PxAggregate`] object, it is automatically removed from the aggregate.
    pub fn PxActor_release_mut(self_: *mut PxActor);

    /// Retrieves the type of actor.
    ///
    /// The actor type of the actor.
    pub fn PxActor_getType(self_: *const PxActor) -> PxActorType;

    /// Retrieves the scene which this actor belongs to.
    ///
    /// Owner Scene. NULL if not part of a scene.
    pub fn PxActor_getScene(self_: *const PxActor) -> *mut PxScene;

    /// Sets a name string for the object that can be retrieved with getName().
    ///
    /// This is for debugging and is not used by the SDK. The string is not copied by the SDK,
    /// only the pointer is stored.
    ///
    /// Default:
    /// NULL
    pub fn PxActor_setName_mut(self_: *mut PxActor, name: *const std::ffi::c_char);

    /// Retrieves the name string set with setName().
    ///
    /// Name string associated with object.
    pub fn PxActor_getName(self_: *const PxActor) -> *const std::ffi::c_char;

    /// Retrieves the axis aligned bounding box enclosing the actor.
    ///
    /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
    /// in PxContactModifyCallback or in contact report callbacks).
    ///
    /// The actor's bounding box.
    pub fn PxActor_getWorldBounds(self_: *const PxActor, inflation: f32) -> PxBounds3;

    /// Raises or clears a particular actor flag.
    ///
    /// See the list of flags [`PxActorFlag`]
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the actor up automatically.
    pub fn PxActor_setActorFlag_mut(self_: *mut PxActor, flag: PxActorFlag, value: bool);

    /// Sets the actor flags.
    ///
    /// See the list of flags [`PxActorFlag`]
    pub fn PxActor_setActorFlags_mut(self_: *mut PxActor, inFlags: PxActorFlags);

    /// Reads the PxActor flags.
    ///
    /// See the list of flags [`PxActorFlag`]
    ///
    /// The values of the PxActor flags.
    pub fn PxActor_getActorFlags(self_: *const PxActor) -> PxActorFlags;

    /// Assigns dynamic actors a dominance group identifier.
    ///
    /// PxDominanceGroup is a 5 bit group identifier (legal range from 0 to 31).
    ///
    /// The PxScene::setDominanceGroupPair() lets you set certain behaviors for pairs of dominance groups.
    /// By default every dynamic actor is created in group 0.
    ///
    /// Default:
    /// 0
    ///
    /// Sleeping:
    /// Changing the dominance group does
    /// NOT
    /// wake the actor up automatically.
    pub fn PxActor_setDominanceGroup_mut(self_: *mut PxActor, dominanceGroup: u8);

    /// Retrieves the value set with setDominanceGroup().
    ///
    /// The dominance group of this actor.
    pub fn PxActor_getDominanceGroup(self_: *const PxActor) -> u8;

    /// Sets the owner client of an actor.
    ///
    /// This cannot be done once the actor has been placed into a scene.
    ///
    /// Default:
    /// PX_DEFAULT_CLIENT
    pub fn PxActor_setOwnerClient_mut(self_: *mut PxActor, inClient: u8);

    /// Returns the owner client that was specified at creation time.
    ///
    /// This value cannot be changed once the object is placed into the scene.
    pub fn PxActor_getOwnerClient(self_: *const PxActor) -> u8;

    /// Retrieves the aggregate the actor might be a part of.
    ///
    /// The aggregate the actor is a part of, or NULL if the actor does not belong to an aggregate.
    pub fn PxActor_getAggregate(self_: *const PxActor) -> *mut PxAggregate;

    pub fn phys_PxGetAggregateFilterHint(type_: PxAggregateType, enableSelfCollision: bool) -> u32;

    pub fn phys_PxGetAggregateSelfCollisionBit(hint: u32) -> u32;

    pub fn phys_PxGetAggregateType(hint: u32) -> PxAggregateType;

    /// Deletes the aggregate object.
    ///
    /// Deleting the PxAggregate object does not delete the aggregated actors. If the PxAggregate object
    /// belongs to a scene, the aggregated actors are automatically re-inserted in that scene. If you intend
    /// to delete both the PxAggregate and its actors, it is best to release the actors first, then release
    /// the PxAggregate when it is empty.
    pub fn PxAggregate_release_mut(self_: *mut PxAggregate);

    /// Adds an actor to the aggregate object.
    ///
    /// A warning is output if the total number of actors is reached, or if the incoming actor already belongs
    /// to an aggregate.
    ///
    /// If the aggregate belongs to a scene, adding an actor to the aggregate also adds the actor to that scene.
    ///
    /// If the actor already belongs to a scene, a warning is output and the call is ignored. You need to remove
    /// the actor from the scene first, before adding it to the aggregate.
    ///
    /// When a BVH is provided the actor shapes are grouped together.
    /// The scene query pruning structure inside PhysX SDK will store/update one
    /// bound per actor. The scene queries against such an actor will query actor
    /// bounds and then make a local space query against the provided BVH, which is in actor's local space.
    pub fn PxAggregate_addActor_mut(self_: *mut PxAggregate, actor: *mut PxActor, bvh: *const PxBVH) -> bool;

    /// Removes an actor from the aggregate object.
    ///
    /// A warning is output if the incoming actor does not belong to the aggregate. Otherwise the actor is
    /// removed from the aggregate. If the aggregate belongs to a scene, the actor is reinserted in that
    /// scene. If you intend to delete the actor, it is best to call [`PxActor::release`]() directly. That way
    /// the actor will be automatically removed from its aggregate (if any) and not reinserted in a scene.
    pub fn PxAggregate_removeActor_mut(self_: *mut PxAggregate, actor: *mut PxActor) -> bool;

    /// Adds an articulation to the aggregate object.
    ///
    /// A warning is output if the total number of actors is reached (every articulation link counts as an actor),
    /// or if the incoming articulation already belongs to an aggregate.
    ///
    /// If the aggregate belongs to a scene, adding an articulation to the aggregate also adds the articulation to that scene.
    ///
    /// If the articulation already belongs to a scene, a warning is output and the call is ignored. You need to remove
    /// the articulation from the scene first, before adding it to the aggregate.
    pub fn PxAggregate_addArticulation_mut(self_: *mut PxAggregate, articulation: *mut PxArticulationReducedCoordinate) -> bool;

    /// Removes an articulation from the aggregate object.
    ///
    /// A warning is output if the incoming articulation does not belong to the aggregate. Otherwise the articulation is
    /// removed from the aggregate. If the aggregate belongs to a scene, the articulation is reinserted in that
    /// scene. If you intend to delete the articulation, it is best to call [`PxArticulationReducedCoordinate::release`]() directly. That way
    /// the articulation will be automatically removed from its aggregate (if any) and not reinserted in a scene.
    pub fn PxAggregate_removeArticulation_mut(self_: *mut PxAggregate, articulation: *mut PxArticulationReducedCoordinate) -> bool;

    /// Returns the number of actors contained in the aggregate.
    ///
    /// You can use [`getActors`]() to retrieve the actor pointers.
    ///
    /// Number of actors contained in the aggregate.
    pub fn PxAggregate_getNbActors(self_: *const PxAggregate) -> u32;

    /// Retrieves max amount of shapes that can be contained in the aggregate.
    ///
    /// Max shape size.
    pub fn PxAggregate_getMaxNbShapes(self_: *const PxAggregate) -> u32;

    /// Retrieve all actors contained in the aggregate.
    ///
    /// You can retrieve the number of actor pointers by calling [`getNbActors`]()
    ///
    /// Number of actor pointers written to the buffer.
    pub fn PxAggregate_getActors(self_: *const PxAggregate, userBuffer: *mut *mut PxActor, bufferSize: u32, startIndex: u32) -> u32;

    /// Retrieves the scene which this aggregate belongs to.
    ///
    /// Owner Scene. NULL if not part of a scene.
    pub fn PxAggregate_getScene_mut(self_: *mut PxAggregate) -> *mut PxScene;

    /// Retrieves aggregate's self-collision flag.
    ///
    /// self-collision flag
    pub fn PxAggregate_getSelfCollision(self_: *const PxAggregate) -> bool;

    pub fn PxAggregate_getConcreteTypeName(self_: *const PxAggregate) -> *const std::ffi::c_char;

    pub fn PxConstraintInvMassScale_new() -> PxConstraintInvMassScale;

    pub fn PxConstraintInvMassScale_new_1(lin0: f32, ang0: f32, lin1: f32, ang1: f32) -> PxConstraintInvMassScale;

    /// Visualize joint frames
    pub fn PxConstraintVisualizer_visualizeJointFrames_mut(self_: *mut PxConstraintVisualizer, parent: *const PxTransform, child: *const PxTransform);

    /// Visualize joint linear limit
    pub fn PxConstraintVisualizer_visualizeLinearLimit_mut(self_: *mut PxConstraintVisualizer, t0: *const PxTransform, t1: *const PxTransform, value: f32, active: bool);

    /// Visualize joint angular limit
    pub fn PxConstraintVisualizer_visualizeAngularLimit_mut(self_: *mut PxConstraintVisualizer, t0: *const PxTransform, lower: f32, upper: f32, active: bool);

    /// Visualize limit cone
    pub fn PxConstraintVisualizer_visualizeLimitCone_mut(self_: *mut PxConstraintVisualizer, t: *const PxTransform, tanQSwingY: f32, tanQSwingZ: f32, active: bool);

    /// Visualize joint double cone
    pub fn PxConstraintVisualizer_visualizeDoubleCone_mut(self_: *mut PxConstraintVisualizer, t: *const PxTransform, angle: f32, active: bool);

    /// Visualize line
    pub fn PxConstraintVisualizer_visualizeLine_mut(self_: *mut PxConstraintVisualizer, p0: *const PxVec3, p1: *const PxVec3, color: u32);

    /// Pre-simulation data preparation
    /// when the constraint is marked dirty, this function is called at the start of the simulation
    /// step for the SDK to copy the constraint data block.
    pub fn PxConstraintConnector_prepareData_mut(self_: *mut PxConstraintConnector) -> *mut std::ffi::c_void;

    /// Constraint release callback
    ///
    /// When the SDK deletes a PxConstraint object this function is called by the SDK. In general
    /// custom constraints should not be deleted directly by applications: rather, the constraint
    /// should respond to a release() request by calling PxConstraint::release(), then wait for
    /// this call to release its own resources.
    ///
    /// This function is also called when a PxConstraint object is deleted on cleanup due to
    /// destruction of the PxPhysics object.
    pub fn PxConstraintConnector_onConstraintRelease_mut(self_: *mut PxConstraintConnector);

    /// Center-of-mass shift callback
    ///
    /// This function is called by the SDK when the CoM of one of the actors is moved. Since the
    /// API specifies constraint positions relative to actors, and the constraint shader functions
    /// are supplied with coordinates relative to bodies, some synchronization is usually required
    /// when the application moves an object's center of mass.
    pub fn PxConstraintConnector_onComShift_mut(self_: *mut PxConstraintConnector, actor: u32);

    /// Origin shift callback
    ///
    /// This function is called by the SDK when the scene origin gets shifted and allows to adjust
    /// custom data which contains world space transforms.
    ///
    /// If the adjustments affect constraint shader data, it is necessary to call PxConstraint::markDirty()
    /// to make sure that the data gets synced at the beginning of the next simulation step.
    pub fn PxConstraintConnector_onOriginShift_mut(self_: *mut PxConstraintConnector, shift: *const PxVec3);

    /// Obtain a reference to a PxBase interface if the constraint has one.
    ///
    /// If the constraint does not implement the PxBase interface, it should return NULL.
    pub fn PxConstraintConnector_getSerializable_mut(self_: *mut PxConstraintConnector) -> *mut PxBase;

    /// Obtain the pointer to the constraint's constant data
    pub fn PxConstraintConnector_getConstantBlock(self_: *const PxConstraintConnector) -> *const std::ffi::c_void;

    /// Let the connector know it has been connected to a constraint.
    pub fn PxConstraintConnector_connectToConstraint_mut(self_: *mut PxConstraintConnector, anon_param0: *mut PxConstraint);

    /// virtual destructor
    pub fn PxConstraintConnector_delete(self_: *mut PxConstraintConnector);

    pub fn PxSolverBody_new() -> PxSolverBody;

    pub fn PxSolverBodyData_projectVelocity(self_: *const PxSolverBodyData, lin: *const PxVec3, ang: *const PxVec3) -> f32;

    pub fn PxSolverConstraintPrepDesc_delete(self_: *mut PxSolverConstraintPrepDesc);

    /// Allocates constraint data. It is the application's responsibility to release this memory after PxSolveConstraints has completed.
    ///
    /// The allocated memory. This address must be 16-byte aligned.
    pub fn PxConstraintAllocator_reserveConstraintData_mut(self_: *mut PxConstraintAllocator, byteSize: u32) -> *mut u8;

    /// Allocates friction data. Friction data can be retained by the application for a given pair and provided as an input to PxSolverContactDesc to improve simulation stability.
    /// It is the application's responsibility to release this memory. If this memory is released, the application should ensure it does not pass pointers to this memory to PxSolverContactDesc.
    ///
    /// The allocated memory. This address must be 4-byte aligned.
    pub fn PxConstraintAllocator_reserveFrictionData_mut(self_: *mut PxConstraintAllocator, byteSize: u32) -> *mut u8;

    pub fn PxConstraintAllocator_delete(self_: *mut PxConstraintAllocator);

    pub fn PxArticulationLimit_new() -> PxArticulationLimit;

    pub fn PxArticulationLimit_new_1(low_: f32, high_: f32) -> PxArticulationLimit;

    pub fn PxArticulationDrive_new() -> PxArticulationDrive;

    pub fn PxArticulationDrive_new_1(stiffness_: f32, damping_: f32, maxForce_: f32, driveType_: PxArticulationDriveType) -> PxArticulationDrive;

    pub fn PxTGSSolverBodyVel_projectVelocity(self_: *const PxTGSSolverBodyVel, lin: *const PxVec3, ang: *const PxVec3) -> f32;

    pub fn PxTGSSolverBodyData_projectVelocity(self_: *const PxTGSSolverBodyData, linear: *const PxVec3, angular: *const PxVec3) -> f32;

    pub fn PxTGSSolverConstraintPrepDesc_delete(self_: *mut PxTGSSolverConstraintPrepDesc);

    /// Sets the spring rest length for the sub-tendon from the root to this leaf attachment.
    ///
    /// Setting this on non-leaf attachments has no effect.
    pub fn PxArticulationAttachment_setRestLength_mut(self_: *mut PxArticulationAttachment, restLength: f32);

    /// Gets the spring rest length for the sub-tendon from the root to this leaf attachment.
    ///
    /// The rest length.
    pub fn PxArticulationAttachment_getRestLength(self_: *const PxArticulationAttachment) -> f32;

    /// Sets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.
    ///
    /// Setting this on non-leaf attachments has no effect.
    pub fn PxArticulationAttachment_setLimitParameters_mut(self_: *mut PxArticulationAttachment, parameters: *const PxArticulationTendonLimit);

    /// Gets the low and high limit on the length of the sub-tendon from the root to this leaf attachment.
    ///
    /// Struct with the low and high limit.
    pub fn PxArticulationAttachment_getLimitParameters(self_: *const PxArticulationAttachment) -> PxArticulationTendonLimit;

    /// Sets the attachment's relative offset in the link actor frame.
    pub fn PxArticulationAttachment_setRelativeOffset_mut(self_: *mut PxArticulationAttachment, offset: *const PxVec3);

    /// Gets the attachment's relative offset in the link actor frame.
    ///
    /// The relative offset in the link actor frame.
    pub fn PxArticulationAttachment_getRelativeOffset(self_: *const PxArticulationAttachment) -> PxVec3;

    /// Sets the attachment coefficient.
    pub fn PxArticulationAttachment_setCoefficient_mut(self_: *mut PxArticulationAttachment, coefficient: f32);

    /// Gets the attachment coefficient.
    ///
    /// The scale that the distance between this attachment and its parent is multiplied by when summing up the spatial tendon's length.
    pub fn PxArticulationAttachment_getCoefficient(self_: *const PxArticulationAttachment) -> f32;

    /// Gets the articulation link.
    ///
    /// The articulation link that this attachment is attached to.
    pub fn PxArticulationAttachment_getLink(self_: *const PxArticulationAttachment) -> *mut PxArticulationLink;

    /// Gets the parent attachment.
    ///
    /// The parent attachment.
    pub fn PxArticulationAttachment_getParent(self_: *const PxArticulationAttachment) -> *mut PxArticulationAttachment;

    /// Indicates that this attachment is a leaf, and thus defines a sub-tendon from the root to this attachment.
    ///
    /// True: This attachment is a leaf and has zero children; False: Not a leaf.
    pub fn PxArticulationAttachment_isLeaf(self_: *const PxArticulationAttachment) -> bool;

    /// Gets the spatial tendon that the attachment is a part of.
    ///
    /// The tendon.
    pub fn PxArticulationAttachment_getTendon(self_: *const PxArticulationAttachment) -> *mut PxArticulationSpatialTendon;

    /// Releases the attachment.
    ///
    /// Releasing the attachment is not allowed while the articulation is in a scene. In order to
    /// release the attachment, remove and then re-add the articulation to the scene.
    pub fn PxArticulationAttachment_release_mut(self_: *mut PxArticulationAttachment);

    /// Returns the string name of the dynamic type.
    ///
    /// The string name.
    pub fn PxArticulationAttachment_getConcreteTypeName(self_: *const PxArticulationAttachment) -> *const std::ffi::c_char;

    /// Sets the tendon joint coefficient.
    ///
    /// RecipCoefficient is commonly expected to be 1/coefficient, but it can be set to different values to tune behavior; for example, zero can be used to
    /// have a joint axis only participate in the length computation of the tendon, but not have any tendon force applied to it.
    pub fn PxArticulationTendonJoint_setCoefficient_mut(self_: *mut PxArticulationTendonJoint, axis: PxArticulationAxis, coefficient: f32, recipCoefficient: f32);

    /// Gets the tendon joint coefficient.
    pub fn PxArticulationTendonJoint_getCoefficient(self_: *const PxArticulationTendonJoint, axis: *mut PxArticulationAxis, coefficient: *mut f32, recipCoefficient: *mut f32);

    /// Gets the articulation link.
    ///
    /// The articulation link (and its incoming joint in particular) that this tendon joint is associated with.
    pub fn PxArticulationTendonJoint_getLink(self_: *const PxArticulationTendonJoint) -> *mut PxArticulationLink;

    /// Gets the parent tendon joint.
    ///
    /// The parent tendon joint.
    pub fn PxArticulationTendonJoint_getParent(self_: *const PxArticulationTendonJoint) -> *mut PxArticulationTendonJoint;

    /// Gets the tendon that the joint is a part of.
    ///
    /// The tendon.
    pub fn PxArticulationTendonJoint_getTendon(self_: *const PxArticulationTendonJoint) -> *mut PxArticulationFixedTendon;

    /// Releases a tendon joint.
    ///
    /// Releasing a tendon joint is not allowed while the articulation is in a scene. In order to
    /// release the joint, remove and then re-add the articulation to the scene.
    pub fn PxArticulationTendonJoint_release_mut(self_: *mut PxArticulationTendonJoint);

    /// Returns the string name of the dynamic type.
    ///
    /// The string name.
    pub fn PxArticulationTendonJoint_getConcreteTypeName(self_: *const PxArticulationTendonJoint) -> *const std::ffi::c_char;

    /// Sets the spring stiffness term acting on the tendon length.
    pub fn PxArticulationTendon_setStiffness_mut(self_: *mut PxArticulationTendon, stiffness: f32);

    /// Gets the spring stiffness of the tendon.
    ///
    /// The spring stiffness.
    pub fn PxArticulationTendon_getStiffness(self_: *const PxArticulationTendon) -> f32;

    /// Sets the damping term acting both on the tendon length and tendon-length limits.
    pub fn PxArticulationTendon_setDamping_mut(self_: *mut PxArticulationTendon, damping: f32);

    /// Gets the damping term acting both on the tendon length and tendon-length limits.
    ///
    /// The damping term.
    pub fn PxArticulationTendon_getDamping(self_: *const PxArticulationTendon) -> f32;

    /// Sets the limit stiffness term acting on the tendon's length limits.
    ///
    /// For spatial tendons, this parameter applies to all its leaf attachments / sub-tendons.
    pub fn PxArticulationTendon_setLimitStiffness_mut(self_: *mut PxArticulationTendon, stiffness: f32);

    /// Gets the limit stiffness term acting on the tendon's length limits.
    ///
    /// For spatial tendons, this parameter applies to all its leaf attachments / sub-tendons.
    ///
    /// The limit stiffness term.
    pub fn PxArticulationTendon_getLimitStiffness(self_: *const PxArticulationTendon) -> f32;

    /// Sets the length offset term for the tendon.
    ///
    /// An offset defines an amount to be added to the accumulated length computed for the tendon. It allows the
    /// application to actuate the tendon by shortening or lengthening it.
    pub fn PxArticulationTendon_setOffset_mut(self_: *mut PxArticulationTendon, offset: f32, autowake: bool);

    /// Gets the length offset term for the tendon.
    ///
    /// The offset term.
    pub fn PxArticulationTendon_getOffset(self_: *const PxArticulationTendon) -> f32;

    /// Gets the articulation that the tendon is a part of.
    ///
    /// The articulation.
    pub fn PxArticulationTendon_getArticulation(self_: *const PxArticulationTendon) -> *mut PxArticulationReducedCoordinate;

    /// Releases a tendon to remove it from the articulation and free its associated memory.
    ///
    /// When an articulation is released, its attached tendons are automatically released.
    ///
    /// Releasing a tendon is not allowed while the articulation is in a scene. In order to
    /// release the tendon, remove and then re-add the articulation to the scene.
    pub fn PxArticulationTendon_release_mut(self_: *mut PxArticulationTendon);

    /// Creates an articulation attachment and adds it to the list of children in the parent attachment.
    ///
    /// Creating an attachment is not allowed while the articulation is in a scene. In order to
    /// add the attachment, remove and then re-add the articulation to the scene.
    ///
    /// The newly-created attachment if creation was successful, otherwise a null pointer.
    pub fn PxArticulationSpatialTendon_createAttachment_mut(self_: *mut PxArticulationSpatialTendon, parent: *mut PxArticulationAttachment, coefficient: f32, relativeOffset: PxVec3, link: *mut PxArticulationLink) -> *mut PxArticulationAttachment;

    /// Fills a user-provided buffer of attachment pointers with the set of attachments.
    ///
    /// The number of attachments that were filled into the user buffer.
    pub fn PxArticulationSpatialTendon_getAttachments(self_: *const PxArticulationSpatialTendon, userBuffer: *mut *mut PxArticulationAttachment, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of attachments in the tendon.
    ///
    /// The number of attachments.
    pub fn PxArticulationSpatialTendon_getNbAttachments(self_: *const PxArticulationSpatialTendon) -> u32;

    /// Returns the string name of the dynamic type.
    ///
    /// The string name.
    pub fn PxArticulationSpatialTendon_getConcreteTypeName(self_: *const PxArticulationSpatialTendon) -> *const std::ffi::c_char;

    /// Creates an articulation tendon joint and adds it to the list of children in the parent tendon joint.
    ///
    /// Creating a tendon joint is not allowed while the articulation is in a scene. In order to
    /// add the joint, remove and then re-add the articulation to the scene.
    ///
    /// The newly-created tendon joint if creation was successful, otherwise a null pointer.
    ///
    /// - The axis motion must not be configured as PxArticulationMotion::eLOCKED.
    /// - The axis cannot be part of a fixed joint, i.e. joint configured as PxArticulationJointType::eFIX.
    pub fn PxArticulationFixedTendon_createTendonJoint_mut(self_: *mut PxArticulationFixedTendon, parent: *mut PxArticulationTendonJoint, axis: PxArticulationAxis, coefficient: f32, recipCoefficient: f32, link: *mut PxArticulationLink) -> *mut PxArticulationTendonJoint;

    /// Fills a user-provided buffer of tendon-joint pointers with the set of tendon joints.
    ///
    /// The number of tendon joints filled into the user buffer.
    pub fn PxArticulationFixedTendon_getTendonJoints(self_: *const PxArticulationFixedTendon, userBuffer: *mut *mut PxArticulationTendonJoint, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of tendon joints in the tendon.
    ///
    /// The number of tendon joints.
    pub fn PxArticulationFixedTendon_getNbTendonJoints(self_: *const PxArticulationFixedTendon) -> u32;

    /// Sets the spring rest length of the tendon.
    ///
    /// The accumulated "length" of a fixed tendon is a linear combination of the joint axis positions that the tendon is
    /// associated with, scaled by the respective tendon joints' coefficients. As such, when the joint positions of all
    /// joints are zero, the accumulated length of a fixed tendon is zero.
    ///
    /// The spring of the tendon is not exerting any force on the articulation when the rest length is equal to the
    /// tendon's accumulated length plus the tendon offset.
    pub fn PxArticulationFixedTendon_setRestLength_mut(self_: *mut PxArticulationFixedTendon, restLength: f32);

    /// Gets the spring rest length of the tendon.
    ///
    /// The spring rest length of the tendon.
    pub fn PxArticulationFixedTendon_getRestLength(self_: *const PxArticulationFixedTendon) -> f32;

    /// Sets the low and high limit on the length of the tendon.
    ///
    /// The limits, together with the damping and limit stiffness parameters, act on the accumulated length of the tendon.
    pub fn PxArticulationFixedTendon_setLimitParameters_mut(self_: *mut PxArticulationFixedTendon, parameter: *const PxArticulationTendonLimit);

    /// Gets the low and high limit on the length of the tendon.
    ///
    /// Struct with the low and high limit.
    pub fn PxArticulationFixedTendon_getLimitParameters(self_: *const PxArticulationFixedTendon) -> PxArticulationTendonLimit;

    /// Returns the string name of the dynamic type.
    ///
    /// The string name.
    pub fn PxArticulationFixedTendon_getConcreteTypeName(self_: *const PxArticulationFixedTendon) -> *const std::ffi::c_char;

    pub fn PxArticulationCache_new() -> PxArticulationCache;

    /// Releases an articulation cache.
    pub fn PxArticulationCache_release_mut(self_: *mut PxArticulationCache);

    /// Releases the sensor.
    ///
    /// Releasing a sensor is not allowed while the articulation is in a scene. In order to
    /// release a sensor, remove and then re-add the articulation to the scene.
    pub fn PxArticulationSensor_release_mut(self_: *mut PxArticulationSensor);

    /// Returns the spatial force in the local frame of the sensor.
    ///
    /// The spatial force.
    ///
    /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
    /// and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationSensor_getForces(self_: *const PxArticulationSensor) -> PxSpatialForce;

    /// Returns the relative pose between this sensor and the body frame of the link that the sensor is attached to.
    ///
    /// The link body frame is at the center of mass and aligned with the principal axes of inertia, see PxRigidBody::getCMassLocalPose.
    ///
    /// The transform link body frame -> sensor frame.
    pub fn PxArticulationSensor_getRelativePose(self_: *const PxArticulationSensor) -> PxTransform;

    /// Sets the relative pose between this sensor and the body frame of the link that the sensor is attached to.
    ///
    /// The link body frame is at the center of mass and aligned with the principal axes of inertia, see PxRigidBody::getCMassLocalPose.
    ///
    /// Setting the sensor relative pose is not allowed while the articulation is in a scene. In order to
    /// set the pose, remove and then re-add the articulation to the scene.
    pub fn PxArticulationSensor_setRelativePose_mut(self_: *mut PxArticulationSensor, pose: *const PxTransform);

    /// Returns the link that this sensor is attached to.
    ///
    /// A pointer to the link.
    pub fn PxArticulationSensor_getLink(self_: *const PxArticulationSensor) -> *mut PxArticulationLink;

    /// Returns the index of this sensor inside the articulation.
    ///
    /// The return value is only valid for sensors attached to articulations that are in a scene.
    ///
    /// The low-level index, or 0xFFFFFFFF if the articulation is not in a scene.
    pub fn PxArticulationSensor_getIndex(self_: *const PxArticulationSensor) -> u32;

    /// Returns the articulation that this sensor is part of.
    ///
    /// A pointer to the articulation.
    pub fn PxArticulationSensor_getArticulation(self_: *const PxArticulationSensor) -> *mut PxArticulationReducedCoordinate;

    /// Returns the sensor's flags.
    ///
    /// The current set of flags of the sensor.
    pub fn PxArticulationSensor_getFlags(self_: *const PxArticulationSensor) -> PxArticulationSensorFlags;

    /// Sets a flag of the sensor.
    ///
    /// Setting the sensor flags is not allowed while the articulation is in a scene. In order to
    /// set the flags, remove and then re-add the articulation to the scene.
    pub fn PxArticulationSensor_setFlag_mut(self_: *mut PxArticulationSensor, flag: PxArticulationSensorFlag, enabled: bool);

    /// Returns the string name of the dynamic type.
    ///
    /// The string name.
    pub fn PxArticulationSensor_getConcreteTypeName(self_: *const PxArticulationSensor) -> *const std::ffi::c_char;

    /// Returns the scene which this articulation belongs to.
    ///
    /// Owner Scene. NULL if not part of a scene.
    pub fn PxArticulationReducedCoordinate_getScene(self_: *const PxArticulationReducedCoordinate) -> *mut PxScene;

    /// Sets the solver iteration counts for the articulation.
    ///
    /// The solver iteration count determines how accurately contacts, drives, and limits are resolved.
    /// Setting a higher position iteration count may therefore help in scenarios where the articulation
    /// is subject to many constraints; for example, a manipulator articulation with drives and joint limits
    /// that is grasping objects, or several such articulations interacting through contacts. Other situations
    /// where higher position iterations may improve simulation fidelity are: large mass ratios within the
    /// articulation or between the articulation and an object in contact with it; or strong drives in the
    /// articulation being used to manipulate a light object.
    ///
    /// If intersecting bodies are being depenetrated too violently, increase the number of velocity
    /// iterations. More velocity iterations will drive the relative exit velocity of the intersecting
    /// objects closer to the correct value given the restitution.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_setSolverIterationCounts_mut(self_: *mut PxArticulationReducedCoordinate, minPositionIters: u32, minVelocityIters: u32);

    /// Returns the solver iteration counts.
    pub fn PxArticulationReducedCoordinate_getSolverIterationCounts(self_: *const PxArticulationReducedCoordinate, minPositionIters: *mut u32, minVelocityIters: *mut u32);

    /// Returns true if this articulation is sleeping.
    ///
    /// When an actor does not move for a period of time, it is no longer simulated in order to save time. This state
    /// is called sleeping. However, because the object automatically wakes up when it is either touched by an awake object,
    /// or a sleep-affecting property is changed by the user, the entire sleep mechanism should be transparent to the user.
    ///
    /// An articulation can only go to sleep if all links are ready for sleeping. An articulation is guaranteed to be awake
    /// if at least one of the following holds:
    ///
    /// The wake counter is positive (see [`setWakeCounter`]()).
    ///
    /// The linear or angular velocity of any link is non-zero.
    ///
    /// A non-zero force or torque has been applied to the articulation or any of its links.
    ///
    /// If an articulation is sleeping, the following state is guaranteed:
    ///
    /// The wake counter is zero.
    ///
    /// The linear and angular velocity of all links is zero.
    ///
    /// There is no force update pending.
    ///
    /// When an articulation gets inserted into a scene, it will be considered asleep if all the points above hold, else it will
    /// be treated as awake.
    ///
    /// If an articulation is asleep after the call to [`PxScene::fetchResults`]() returns, it is guaranteed that the poses of the
    /// links were not changed. You can use this information to avoid updating the transforms of associated objects.
    ///
    /// True if the articulation is sleeping.
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation,
    /// except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
    pub fn PxArticulationReducedCoordinate_isSleeping(self_: *const PxArticulationReducedCoordinate) -> bool;

    /// Sets the mass-normalized energy threshold below which the articulation may go to sleep.
    ///
    /// The articulation will sleep if the energy of each link is below this threshold.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_setSleepThreshold_mut(self_: *mut PxArticulationReducedCoordinate, threshold: f32);

    /// Returns the mass-normalized energy below which the articulation may go to sleep.
    ///
    /// The energy threshold for sleeping.
    pub fn PxArticulationReducedCoordinate_getSleepThreshold(self_: *const PxArticulationReducedCoordinate) -> f32;

    /// Sets the mass-normalized kinetic energy threshold below which the articulation may participate in stabilization.
    ///
    /// Articulations whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
    ///
    /// This value has no effect if PxSceneFlag::eENABLE_STABILIZATION was not enabled on the PxSceneDesc.
    ///
    /// Default:
    /// 0.01 * PxTolerancesScale::speed * PxTolerancesScale::speed
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_setStabilizationThreshold_mut(self_: *mut PxArticulationReducedCoordinate, threshold: f32);

    /// Returns the mass-normalized kinetic energy below which the articulation may participate in stabilization.
    ///
    /// Articulations whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
    ///
    /// The energy threshold for participating in stabilization.
    pub fn PxArticulationReducedCoordinate_getStabilizationThreshold(self_: *const PxArticulationReducedCoordinate) -> f32;

    /// Sets the wake counter for the articulation in seconds.
    ///
    /// - The wake counter value determines the minimum amount of time until the articulation can be put to sleep.
    /// - An articulation will not be put to sleep if the energy is above the specified threshold (see [`setSleepThreshold`]())
    /// or if other awake objects are touching it.
    /// - Passing in a positive value will wake up the articulation automatically.
    ///
    /// Default:
    /// 0.4s (which corresponds to 20 frames for a time step of 0.02s)
    ///
    /// This call may not be made during simulation, except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
    pub fn PxArticulationReducedCoordinate_setWakeCounter_mut(self_: *mut PxArticulationReducedCoordinate, wakeCounterValue: f32);

    /// Returns the wake counter of the articulation in seconds.
    ///
    /// The wake counter of the articulation in seconds.
    ///
    /// This call may not be made during simulation, except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
    pub fn PxArticulationReducedCoordinate_getWakeCounter(self_: *const PxArticulationReducedCoordinate) -> f32;

    /// Wakes up the articulation if it is sleeping.
    ///
    /// - The articulation will get woken up and might cause other touching objects to wake up as well during the next simulation step.
    /// - This will set the wake counter of the articulation to the value specified in [`PxSceneDesc::wakeCounterResetValue`].
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation,
    /// except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
    pub fn PxArticulationReducedCoordinate_wakeUp_mut(self_: *mut PxArticulationReducedCoordinate);

    /// Forces the articulation to sleep.
    ///
    /// - The articulation will stay asleep during the next simulation step if not touched by another non-sleeping actor.
    /// - This will set any applied force, the velocity, and the wake counter of all bodies in the articulation to zero.
    ///
    /// This call may not be made during simulation, and may only be made on articulations that are in a scene.
    pub fn PxArticulationReducedCoordinate_putToSleep_mut(self_: *mut PxArticulationReducedCoordinate);

    /// Sets the limit on the magnitude of the linear velocity of the articulation's center of mass.
    ///
    /// - The limit acts on the linear velocity of the entire articulation. The velocity is calculated from the total momentum
    /// and the spatial inertia of the articulation.
    /// - The limit only applies to floating-base articulations.
    /// - A benefit of the COM velocity limit is that it is evenly applied to the whole articulation, which results in fewer visual
    /// artifacts compared to link rigid-body damping or joint-velocity limits. However, these per-link or per-degree-of-freedom
    /// limits may still help avoid numerical issues.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_setMaxCOMLinearVelocity_mut(self_: *mut PxArticulationReducedCoordinate, maxLinearVelocity: f32);

    /// Gets the limit on the magnitude of the linear velocity of the articulation's center of mass.
    ///
    /// The maximal linear velocity magnitude.
    pub fn PxArticulationReducedCoordinate_getMaxCOMLinearVelocity(self_: *const PxArticulationReducedCoordinate) -> f32;

    /// Sets the limit on the magnitude of the angular velocity at the articulation's center of mass.
    ///
    /// - The limit acts on the angular velocity of the entire articulation. The velocity is calculated from the total momentum
    /// and the spatial inertia of the articulation.
    /// - The limit only applies to floating-base articulations.
    /// - A benefit of the COM velocity limit is that it is evenly applied to the whole articulation, which results in fewer visual
    /// artifacts compared to link rigid-body damping or joint-velocity limits. However, these per-link or per-degree-of-freedom
    /// limits may still help avoid numerical issues.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_setMaxCOMAngularVelocity_mut(self_: *mut PxArticulationReducedCoordinate, maxAngularVelocity: f32);

    /// Gets the limit on the magnitude of the angular velocity at the articulation's center of mass.
    ///
    /// The maximal angular velocity magnitude.
    pub fn PxArticulationReducedCoordinate_getMaxCOMAngularVelocity(self_: *const PxArticulationReducedCoordinate) -> f32;

    /// Adds a link to the articulation with default attribute values.
    ///
    /// The new link, or NULL if the link cannot be created.
    ///
    /// Creating a link is not allowed while the articulation is in a scene. In order to add a link,
    /// remove and then re-add the articulation to the scene.
    pub fn PxArticulationReducedCoordinate_createLink_mut(self_: *mut PxArticulationReducedCoordinate, parent: *mut PxArticulationLink, pose: *const PxTransform) -> *mut PxArticulationLink;

    /// Releases the articulation, and all its links and corresponding joints.
    ///
    /// Attached sensors and tendons are released automatically when the articulation is released.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_release_mut(self_: *mut PxArticulationReducedCoordinate);

    /// Returns the number of links in the articulation.
    ///
    /// The number of links.
    pub fn PxArticulationReducedCoordinate_getNbLinks(self_: *const PxArticulationReducedCoordinate) -> u32;

    /// Returns the set of links in the articulation in the order that they were added to the articulation using createLink.
    ///
    /// The number of links written into the buffer.
    pub fn PxArticulationReducedCoordinate_getLinks(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxArticulationLink, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of shapes in the articulation.
    ///
    /// The number of shapes.
    pub fn PxArticulationReducedCoordinate_getNbShapes(self_: *const PxArticulationReducedCoordinate) -> u32;

    /// Sets a name string for the articulation that can be retrieved with getName().
    ///
    /// This is for debugging and is not used by the SDK. The string is not copied by the SDK,
    /// only the pointer is stored.
    pub fn PxArticulationReducedCoordinate_setName_mut(self_: *mut PxArticulationReducedCoordinate, name: *const std::ffi::c_char);

    /// Returns the name string set with setName().
    ///
    /// Name string associated with the articulation.
    pub fn PxArticulationReducedCoordinate_getName(self_: *const PxArticulationReducedCoordinate) -> *const std::ffi::c_char;

    /// Returns the axis-aligned bounding box enclosing the articulation.
    ///
    /// The articulation's bounding box.
    ///
    /// It is not allowed to use this method while the simulation is running, except in a split simulation
    /// during [`PxScene::collide`]() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationReducedCoordinate_getWorldBounds(self_: *const PxArticulationReducedCoordinate, inflation: f32) -> PxBounds3;

    /// Returns the aggregate the articulation might be a part of.
    ///
    /// The aggregate the articulation is a part of, or NULL if the articulation does not belong to an aggregate.
    pub fn PxArticulationReducedCoordinate_getAggregate(self_: *const PxArticulationReducedCoordinate) -> *mut PxAggregate;

    /// Sets flags on the articulation.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_setArticulationFlags_mut(self_: *mut PxArticulationReducedCoordinate, flags: PxArticulationFlags);

    /// Raises or clears a flag on the articulation.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_setArticulationFlag_mut(self_: *mut PxArticulationReducedCoordinate, flag: PxArticulationFlag, value: bool);

    /// Returns the articulation's flags.
    ///
    /// The flags.
    pub fn PxArticulationReducedCoordinate_getArticulationFlags(self_: *const PxArticulationReducedCoordinate) -> PxArticulationFlags;

    /// Returns the total number of joint degrees-of-freedom (DOFs) of the articulation.
    ///
    /// - The six DOFs of the base of a floating-base articulation are not included in this count.
    /// - Example: Both a fixed-base and a floating-base double-pendulum with two revolute joints will have getDofs() == 2.
    /// - The return value is only valid for articulations that are in a scene.
    ///
    /// The number of joint DOFs, or 0xFFFFFFFF if the articulation is not in a scene.
    pub fn PxArticulationReducedCoordinate_getDofs(self_: *const PxArticulationReducedCoordinate) -> u32;

    /// Creates an articulation cache that can be used to read and write internal articulation data.
    ///
    /// - When the structure of the articulation changes (e.g. adding a link or sensor) after the cache was created,
    /// the cache needs to be released and recreated.
    /// - Free the memory allocated for the cache by calling the release() method on the cache.
    /// - Caches can only be created by articulations that are in a scene.
    ///
    /// The cache, or NULL if the articulation is not in a scene.
    pub fn PxArticulationReducedCoordinate_createCache(self_: *const PxArticulationReducedCoordinate) -> *mut PxArticulationCache;

    /// Returns the size of the articulation cache in bytes.
    ///
    /// - The size does not include: the user-allocated memory for the coefficient matrix or lambda values;
    /// the scratch-related memory/members; and the cache version. See comment in [`PxArticulationCache`].
    /// - The return value is only valid for articulations that are in a scene.
    ///
    /// The byte size of the cache, or 0xFFFFFFFF if the articulation is not in a scene.
    pub fn PxArticulationReducedCoordinate_getCacheDataSize(self_: *const PxArticulationReducedCoordinate) -> u32;

    /// Zeroes all data in the articulation cache, except user-provided and scratch memory, and cache version.
    ///
    /// This call may only be made on articulations that are in a scene.
    pub fn PxArticulationReducedCoordinate_zeroCache(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);

    /// Applies the data in the cache to the articulation.
    ///
    /// This call wakes the articulation if it is sleeping, and the autowake parameter is true (default) or:
    /// - a nonzero joint velocity is applied or
    /// - a nonzero joint force is applied or
    /// - a nonzero root velocity is applied
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_applyCache_mut(self_: *mut PxArticulationReducedCoordinate, cache: *mut PxArticulationCache, flags: PxArticulationCacheFlags, autowake: bool);

    /// Copies internal data of the articulation to the cache.
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_copyInternalStateToCache(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache, flags: PxArticulationCacheFlags);

    /// Converts maximal-coordinate joint DOF data to reduced coordinates.
    ///
    /// - Indexing into the maximal joint DOF data is via the link's low-level index minus 1 (the root link is not included).
    /// - The reduced-coordinate data follows the cache indexing convention, see PxArticulationCache::jointVelocity.
    ///
    /// The articulation must be in a scene.
    pub fn PxArticulationReducedCoordinate_packJointData(self_: *const PxArticulationReducedCoordinate, maximum: *const f32, reduced: *mut f32);

    /// Converts reduced-coordinate joint DOF data to maximal coordinates.
    ///
    /// - Indexing into the maximal joint DOF data is via the link's low-level index minus 1 (the root link is not included).
    /// - The reduced-coordinate data follows the cache indexing convention, see PxArticulationCache::jointVelocity.
    ///
    /// The articulation must be in a scene.
    pub fn PxArticulationReducedCoordinate_unpackJointData(self_: *const PxArticulationReducedCoordinate, reduced: *const f32, maximum: *mut f32);

    /// Prepares common articulation data based on articulation pose for inverse dynamics calculations.
    ///
    /// Usage:
    /// 1. Set articulation pose (joint positions and base transform) via articulation cache and applyCache().
    /// 1. Call commonInit.
    /// 1. Call inverse dynamics computation method.
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_commonInit(self_: *const PxArticulationReducedCoordinate);

    /// Computes the joint DOF forces required to counteract gravitational forces for the given articulation pose.
    ///
    /// - Inputs - Articulation pose (joint positions + base transform).
    /// - Outputs - Joint forces to counteract gravity (in cache).
    ///
    /// - The joint forces returned are determined purely by gravity for the articulation in the current joint and base pose, and joints at rest;
    /// i.e. external forces, joint velocities, and joint accelerations are set to zero. Joint drives are also not considered in the computation.
    /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_computeGeneralizedGravityForce(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);

    /// Computes the joint DOF forces required to counteract Coriolis and centrifugal forces for the given articulation state.
    ///
    /// - Inputs - Articulation state (joint positions and velocities (in cache), and base transform and spatial velocity).
    /// - Outputs - Joint forces to counteract Coriolis and centrifugal forces (in cache).
    ///
    /// - The joint forces returned are determined purely by the articulation's state; i.e. external forces, gravity, and joint accelerations are set to zero.
    /// Joint drives and potential damping terms, such as link angular or linear damping, or joint friction, are also not considered in the computation.
    /// - Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache().
    /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_computeCoriolisAndCentrifugalForce(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);

    /// Computes the joint DOF forces required to counteract external spatial forces applied to articulation links.
    ///
    /// - Inputs - External forces on links (in cache), articulation pose (joint positions + base transform).
    /// - Outputs - Joint forces to counteract the external forces (in cache).
    ///
    /// - Only the external spatial forces provided in the cache and the articulation pose are considered in the computation.
    /// - The external spatial forces are with respect to the links' centers of mass, and not the actor's origin.
    /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_computeGeneralizedExternalForce(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);

    /// Computes the joint accelerations for the given articulation state and joint forces.
    ///
    /// - Inputs - Joint forces (in cache) and articulation state (joint positions and velocities (in cache), and base transform and spatial velocity).
    /// - Outputs - Joint accelerations (in cache).
    ///
    /// - The computation includes Coriolis terms and gravity. However, joint drives and potential damping terms are not considered in the computation
    /// (for example, linear link damping or joint friction).
    /// - Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache().
    /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_computeJointAcceleration(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);

    /// Computes the joint forces for the given articulation state and joint accelerations, not considering gravity.
    ///
    /// - Inputs - Joint accelerations (in cache) and articulation state (joint positions and velocities (in cache), and base transform and spatial velocity).
    /// - Outputs - Joint forces (in cache).
    ///
    /// - The computation includes Coriolis terms. However, joint drives and potential damping terms are not considered in the computation
    /// (for example, linear link damping or joint friction).
    /// - Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache().
    /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_computeJointForce(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);

    /// Compute the dense Jacobian for the articulation in world space, including the DOFs of a potentially floating base.
    ///
    /// This computes the dense representation of an inherently sparse matrix. Multiplication with this matrix maps
    /// joint space velocities to world-space linear and angular (i.e. spatial) velocities of the centers of mass of the links.
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_computeDenseJacobian(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache, nRows: *mut u32, nCols: *mut u32);

    /// Computes the coefficient matrix for contact forces.
    ///
    /// - The matrix dimension is getCoefficientMatrixSize() = getDofs() * getNbLoopJoints(), and the DOF (column) indexing follows the internal DOF order, see PxArticulationCache::jointVelocity.
    /// - Each column in the matrix is the joint forces effected by a contact based on impulse strength 1.
    /// - The user must allocate memory for PxArticulationCache::coefficientMatrix where the required size of the PxReal array is equal to getCoefficientMatrixSize().
    /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_computeCoefficientMatrix(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);

    /// Computes the lambda values when the test impulse is 1.
    ///
    /// - The user must allocate memory for PxArticulationCache::lambda where the required size of the PxReal array is equal to getNbLoopJoints().
    /// - commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
    ///
    /// True if convergence was achieved within maxIter; False if convergence was not achieved or the operation failed otherwise.
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_computeLambda(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache, initialState: *mut PxArticulationCache, jointTorque: *const f32, maxIter: u32) -> bool;

    /// Compute the joint-space inertia matrix that maps joint accelerations to joint forces: forces = M * accelerations.
    ///
    /// - Inputs - Articulation pose (joint positions and base transform).
    /// - Outputs - Mass matrix (in cache).
    ///
    /// commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_computeGeneralizedMassMatrix(self_: *const PxArticulationReducedCoordinate, cache: *mut PxArticulationCache);

    /// Adds a loop joint to the articulation system for inverse dynamics.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_addLoopJoint_mut(self_: *mut PxArticulationReducedCoordinate, joint: *mut PxConstraint);

    /// Removes a loop joint from the articulation for inverse dynamics.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_removeLoopJoint_mut(self_: *mut PxArticulationReducedCoordinate, joint: *mut PxConstraint);

    /// Returns the number of loop joints in the articulation for inverse dynamics.
    ///
    /// The number of loop joints.
    pub fn PxArticulationReducedCoordinate_getNbLoopJoints(self_: *const PxArticulationReducedCoordinate) -> u32;

    /// Returns the set of loop constraints (i.e. joints) in the articulation.
    ///
    /// The number of constraints written into the buffer.
    pub fn PxArticulationReducedCoordinate_getLoopJoints(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxConstraint, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the required size of the coefficient matrix in the articulation.
    ///
    /// Size of the coefficient matrix (equal to getDofs() * getNbLoopJoints()).
    ///
    /// This call may only be made on articulations that are in a scene.
    pub fn PxArticulationReducedCoordinate_getCoefficientMatrixSize(self_: *const PxArticulationReducedCoordinate) -> u32;

    /// Sets the root link transform (world to actor frame).
    ///
    /// - For performance, prefer PxArticulationCache::rootLinkData to set the root link transform in a batch articulation state update.
    /// - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method,
    /// in order to update link states for the next simulation frame or querying.
    ///
    /// This call may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_setRootGlobalPose_mut(self_: *mut PxArticulationReducedCoordinate, pose: *const PxTransform, autowake: bool);

    /// Returns the root link transform (world to actor frame).
    ///
    /// For performance, prefer PxArticulationCache::rootLinkData to get the root link transform in a batch query.
    ///
    /// The root link transform.
    ///
    /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
    /// and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationReducedCoordinate_getRootGlobalPose(self_: *const PxArticulationReducedCoordinate) -> PxTransform;

    /// Sets the root link linear center-of-mass velocity.
    ///
    /// - The linear velocity is with respect to the link's center of mass and not the actor frame origin.
    /// - For performance, prefer PxArticulationCache::rootLinkData to set the root link velocity in a batch articulation state update.
    /// - The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene.
    /// - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method,
    /// in order to update link states for the next simulation frame or querying.
    ///
    /// This call may not be made during simulation, except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
    pub fn PxArticulationReducedCoordinate_setRootLinearVelocity_mut(self_: *mut PxArticulationReducedCoordinate, linearVelocity: *const PxVec3, autowake: bool);

    /// Gets the root link center-of-mass linear velocity.
    ///
    /// - The linear velocity is with respect to the link's center of mass and not the actor frame origin.
    /// - For performance, prefer PxArticulationCache::rootLinkData to get the root link velocity in a batch query.
    ///
    /// The root link center-of-mass linear velocity.
    ///
    /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
    /// and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationReducedCoordinate_getRootLinearVelocity(self_: *const PxArticulationReducedCoordinate) -> PxVec3;

    /// Sets the root link angular velocity.
    ///
    /// - For performance, prefer PxArticulationCache::rootLinkData to set the root link velocity in a batch articulation state update.
    /// - The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene.
    /// - Use updateKinematic() after all state updates to the articulation via non-cache API such as this method,
    /// in order to update link states for the next simulation frame or querying.
    ///
    /// This call may not be made during simulation, except in a split simulation in-between [`PxScene::fetchCollision`] and #PxScene::advance.
    pub fn PxArticulationReducedCoordinate_setRootAngularVelocity_mut(self_: *mut PxArticulationReducedCoordinate, angularVelocity: *const PxVec3, autowake: bool);

    /// Gets the root link angular velocity.
    ///
    /// For performance, prefer PxArticulationCache::rootLinkData to get the root link velocity in a batch query.
    ///
    /// The root link angular velocity.
    ///
    /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
    /// and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationReducedCoordinate_getRootAngularVelocity(self_: *const PxArticulationReducedCoordinate) -> PxVec3;

    /// Returns the (classical) link acceleration in world space for the given low-level link index.
    ///
    /// - The returned acceleration is not a spatial, but a classical, i.e. body-fixed acceleration (https://en.wikipedia.org/wiki/Spatial_acceleration).
    /// - The (linear) acceleration is with respect to the link's center of mass and not the actor frame origin.
    ///
    /// The link's center-of-mass classical acceleration, or 0 if the call is made before the articulation participated in a first simulation step.
    ///
    /// This call may only be made on articulations that are in a scene, and it is not allowed to use this method while the simulation
    /// is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationReducedCoordinate_getLinkAcceleration_mut(self_: *mut PxArticulationReducedCoordinate, linkId: u32) -> PxSpatialVelocity;

    /// Returns the GPU articulation index.
    ///
    /// The GPU index, or 0xFFFFFFFF if the articulation is not in a scene or PxSceneFlag::eSUPPRESS_READBACK is not set.
    pub fn PxArticulationReducedCoordinate_getGpuArticulationIndex_mut(self_: *mut PxArticulationReducedCoordinate) -> u32;

    /// Creates a spatial tendon to attach to the articulation with default attribute values.
    ///
    /// The new spatial tendon.
    ///
    /// Creating a spatial tendon is not allowed while the articulation is in a scene. In order to
    /// add the tendon, remove and then re-add the articulation to the scene.
    pub fn PxArticulationReducedCoordinate_createSpatialTendon_mut(self_: *mut PxArticulationReducedCoordinate) -> *mut PxArticulationSpatialTendon;

    /// Creates a fixed tendon to attach to the articulation with default attribute values.
    ///
    /// The new fixed tendon.
    ///
    /// Creating a fixed tendon is not allowed while the articulation is in a scene. In order to
    /// add the tendon, remove and then re-add the articulation to the scene.
    pub fn PxArticulationReducedCoordinate_createFixedTendon_mut(self_: *mut PxArticulationReducedCoordinate) -> *mut PxArticulationFixedTendon;

    /// Creates a force sensor attached to a link of the articulation.
    ///
    /// The new sensor.
    ///
    /// Creating a sensor is not allowed while the articulation is in a scene. In order to
    /// add the sensor, remove and then re-add the articulation to the scene.
    pub fn PxArticulationReducedCoordinate_createSensor_mut(self_: *mut PxArticulationReducedCoordinate, link: *mut PxArticulationLink, relativePose: *const PxTransform) -> *mut PxArticulationSensor;

    /// Returns the spatial tendons attached to the articulation.
    ///
    /// The order of the tendons in the buffer is not necessarily identical to the order in which the tendons were added to the articulation.
    ///
    /// The number of tendons written into the buffer.
    pub fn PxArticulationReducedCoordinate_getSpatialTendons(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxArticulationSpatialTendon, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of spatial tendons in the articulation.
    ///
    /// The number of tendons.
    pub fn PxArticulationReducedCoordinate_getNbSpatialTendons_mut(self_: *mut PxArticulationReducedCoordinate) -> u32;

    /// Returns the fixed tendons attached to the articulation.
    ///
    /// The order of the tendons in the buffer is not necessarily identical to the order in which the tendons were added to the articulation.
    ///
    /// The number of tendons written into the buffer.
    pub fn PxArticulationReducedCoordinate_getFixedTendons(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxArticulationFixedTendon, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of fixed tendons in the articulation.
    ///
    /// The number of tendons.
    pub fn PxArticulationReducedCoordinate_getNbFixedTendons_mut(self_: *mut PxArticulationReducedCoordinate) -> u32;

    /// Returns the sensors attached to the articulation.
    ///
    /// The order of the sensors in the buffer is not necessarily identical to the order in which the sensors were added to the articulation.
    ///
    /// The number of sensors written into the buffer.
    pub fn PxArticulationReducedCoordinate_getSensors(self_: *const PxArticulationReducedCoordinate, userBuffer: *mut *mut PxArticulationSensor, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of sensors in the articulation.
    ///
    /// The number of sensors.
    pub fn PxArticulationReducedCoordinate_getNbSensors_mut(self_: *mut PxArticulationReducedCoordinate) -> u32;

    /// Update link velocities and/or positions in the articulation.
    ///
    /// For performance, prefer the PxArticulationCache API that performs batch articulation state updates.
    ///
    /// If the application updates the root state (position and velocity) or joint state via any combination of
    /// the non-cache API calls
    ///
    /// - setRootGlobalPose(), setRootLinearVelocity(), setRootAngularVelocity()
    /// - PxArticulationJointReducedCoordinate::setJointPosition(), PxArticulationJointReducedCoordinate::setJointVelocity()
    ///
    /// the application needs to call this method after the state setting in order to update the link states for
    /// the next simulation frame or querying.
    ///
    /// Use
    /// - PxArticulationKinematicFlag::ePOSITION after any changes to the articulation root or joint positions using non-cache API calls. Updates links' positions and velocities.
    /// - PxArticulationKinematicFlag::eVELOCITY after velocity-only changes to the articulation root or joints using non-cache API calls. Updates links' velocities only.
    ///
    /// This call may only be made on articulations that are in a scene, and may not be made during simulation.
    pub fn PxArticulationReducedCoordinate_updateKinematic_mut(self_: *mut PxArticulationReducedCoordinate, flags: PxArticulationKinematicFlags);

    /// Gets the parent articulation link of this joint.
    ///
    /// The parent link.
    pub fn PxArticulationJointReducedCoordinate_getParentArticulationLink(self_: *const PxArticulationJointReducedCoordinate) -> *mut PxArticulationLink;

    /// Sets the joint pose in the parent link actor frame.
    ///
    /// This call is not allowed while the simulation is running.
    pub fn PxArticulationJointReducedCoordinate_setParentPose_mut(self_: *mut PxArticulationJointReducedCoordinate, pose: *const PxTransform);

    /// Gets the joint pose in the parent link actor frame.
    ///
    /// The joint pose.
    pub fn PxArticulationJointReducedCoordinate_getParentPose(self_: *const PxArticulationJointReducedCoordinate) -> PxTransform;

    /// Gets the child articulation link of this joint.
    ///
    /// The child link.
    pub fn PxArticulationJointReducedCoordinate_getChildArticulationLink(self_: *const PxArticulationJointReducedCoordinate) -> *mut PxArticulationLink;

    /// Sets the joint pose in the child link actor frame.
    ///
    /// This call is not allowed while the simulation is running.
    pub fn PxArticulationJointReducedCoordinate_setChildPose_mut(self_: *mut PxArticulationJointReducedCoordinate, pose: *const PxTransform);

    /// Gets the joint pose in the child link actor frame.
    ///
    /// The joint pose.
    pub fn PxArticulationJointReducedCoordinate_getChildPose(self_: *const PxArticulationJointReducedCoordinate) -> PxTransform;

    /// Sets the joint type (e.g. revolute).
    ///
    /// Setting the joint type is not allowed while the articulation is in a scene.
    /// In order to set the joint type, remove and then re-add the articulation to the scene.
    pub fn PxArticulationJointReducedCoordinate_setJointType_mut(self_: *mut PxArticulationJointReducedCoordinate, jointType: PxArticulationJointType);

    /// Gets the joint type.
    ///
    /// The joint type.
    pub fn PxArticulationJointReducedCoordinate_getJointType(self_: *const PxArticulationJointReducedCoordinate) -> PxArticulationJointType;

    /// Sets the joint motion for a given axis.
    ///
    /// Setting the motion of joint axes is not allowed while the articulation is in a scene.
    /// In order to set the motion, remove and then re-add the articulation to the scene.
    pub fn PxArticulationJointReducedCoordinate_setMotion_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, motion: PxArticulationMotion);

    /// Returns the joint motion for the given axis.
    ///
    /// The joint motion of the given axis.
    pub fn PxArticulationJointReducedCoordinate_getMotion(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> PxArticulationMotion;

    /// Sets the joint limits for a given axis.
    ///
    /// - The motion of the corresponding axis should be set to PxArticulationMotion::eLIMITED in order for the limits to be enforced.
    /// - The lower limit should be strictly smaller than the higher limit. If the limits should be equal, use PxArticulationMotion::eLOCKED
    /// and an appropriate offset in the parent/child joint frames.
    ///
    /// This call is not allowed while the simulation is running.
    ///
    /// For spherical joints, limit.min and limit.max must both be in range [-Pi, Pi].
    pub fn PxArticulationJointReducedCoordinate_setLimitParams_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, limit: *const PxArticulationLimit);

    /// Returns the joint limits for a given axis.
    ///
    /// The joint limits.
    pub fn PxArticulationJointReducedCoordinate_getLimitParams(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> PxArticulationLimit;

    /// Configures a joint drive for the given axis.
    ///
    /// See PxArticulationDrive for parameter details; and the manual for further information, and the drives' implicit spring-damper (i.e. PD control) implementation in particular.
    ///
    /// This call is not allowed while the simulation is running.
    pub fn PxArticulationJointReducedCoordinate_setDriveParams_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, drive: *const PxArticulationDrive);

    /// Gets the joint drive configuration for the given axis.
    ///
    /// The drive parameters.
    pub fn PxArticulationJointReducedCoordinate_getDriveParams(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> PxArticulationDrive;

    /// Sets the joint drive position target for the given axis.
    ///
    /// The target units are linear units (equivalent to scene units) for a translational axis, or rad for a rotational axis.
    ///
    /// This call is not allowed while the simulation is running.
    ///
    /// For spherical joints, target must be in range [-Pi, Pi].
    ///
    /// The target is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the joint will drive the parent and child links to poses that obey Gp * Lp * J = Gc * Lc. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistTarget, swing1Target, swing2Target))).  For joints restricted to linear motion, J has the form PxTransform(PxVec3(XTarget, YTarget, ZTarget), PxQuat(PxIdentity)).
    ///
    /// For spherical joints with more than 1 degree of freedom, the joint target angles taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint drive target is not the shortest path rotation.  The joint pose J that is the outcome after driving to the target pose will always be the equivalent of the shortest path rotation.
    pub fn PxArticulationJointReducedCoordinate_setDriveTarget_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, target: f32, autowake: bool);

    /// Returns the joint drive position target for the given axis.
    ///
    /// The target position.
    pub fn PxArticulationJointReducedCoordinate_getDriveTarget(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;

    /// Sets the joint drive velocity target for the given axis.
    ///
    /// The target units are linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
    ///
    /// This call is not allowed while the simulation is running.
    pub fn PxArticulationJointReducedCoordinate_setDriveVelocity_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, targetVel: f32, autowake: bool);

    /// Returns the joint drive velocity target for the given axis.
    ///
    /// The target velocity.
    pub fn PxArticulationJointReducedCoordinate_getDriveVelocity(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;

    /// Sets the joint armature for the given axis.
    ///
    /// - The armature is directly added to the joint-space spatial inertia of the corresponding axis.
    /// - The armature is in mass units for a prismatic (i.e. linear) joint, and in mass units * (scene linear units)^2 for a rotational joint.
    ///
    /// This call is not allowed while the simulation is running.
    pub fn PxArticulationJointReducedCoordinate_setArmature_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, armature: f32);

    /// Gets the joint armature for the given axis.
    ///
    /// The armature set on the given axis.
    pub fn PxArticulationJointReducedCoordinate_getArmature(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;

    /// Sets the joint friction coefficient, which applies to all joint axes.
    ///
    /// - The joint friction is unitless and relates the magnitude of the spatial force [F_trans, T_trans] transmitted from parent to child link to
    /// the maximal friction force F_resist that may be applied by the solver to resist joint motion, per axis; i.e. |F_resist|
    /// <
    /// = coefficient * (|F_trans| + |T_trans|),
    /// where F_resist may refer to a linear force or torque depending on the joint axis.
    /// - The simulated friction effect is therefore similar to static and Coulomb friction. In order to simulate dynamic joint friction, use a joint drive with
    /// zero stiffness and zero velocity target, and an appropriately dimensioned damping parameter.
    ///
    /// This call is not allowed while the simulation is running.
    pub fn PxArticulationJointReducedCoordinate_setFrictionCoefficient_mut(self_: *mut PxArticulationJointReducedCoordinate, coefficient: f32);

    /// Gets the joint friction coefficient.
    ///
    /// The joint friction coefficient.
    pub fn PxArticulationJointReducedCoordinate_getFrictionCoefficient(self_: *const PxArticulationJointReducedCoordinate) -> f32;

    /// Sets the maximal joint velocity enforced for all axes.
    ///
    /// - The solver will apply appropriate joint-space impulses in order to enforce the per-axis joint-velocity limit.
    /// - The velocity units are linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
    ///
    /// This call is not allowed while the simulation is running.
    pub fn PxArticulationJointReducedCoordinate_setMaxJointVelocity_mut(self_: *mut PxArticulationJointReducedCoordinate, maxJointV: f32);

    /// Gets the maximal joint velocity enforced for all axes.
    ///
    /// The maximal per-axis joint velocity.
    pub fn PxArticulationJointReducedCoordinate_getMaxJointVelocity(self_: *const PxArticulationJointReducedCoordinate) -> f32;

    /// Sets the joint position for the given axis.
    ///
    /// - For performance, prefer PxArticulationCache::jointPosition to set joint positions in a batch articulation state update.
    /// - Use PxArticulationReducedCoordinate::updateKinematic after all state updates to the articulation via non-cache API such as this method,
    /// in order to update link states for the next simulation frame or querying.
    ///
    /// This call is not allowed while the simulation is running.
    ///
    /// For spherical joints, jointPos must be in range [-Pi, Pi].
    ///
    /// Joint position is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the parent and child links will be given poses that obey Gp * Lp * J = Gc * Lc with J denoting the joint pose. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistPos, swing1Pos, swing2Pos))).  For joints restricted to linear motion, J has the form PxTransform(PxVec3(xPos, yPos, zPos), PxQuat(PxIdentity)).
    ///
    /// For spherical joints with more than 1 degree of freedom, the input joint positions taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint positions is not the shortest path rotation.  The joint pose J that is the outcome of setting and applying the joint positions will always be the equivalent of the shortest path rotation.
    pub fn PxArticulationJointReducedCoordinate_setJointPosition_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, jointPos: f32);

    /// Gets the joint position for the given axis, i.e. joint degree of freedom (DOF).
    ///
    /// For performance, prefer PxArticulationCache::jointPosition to get joint positions in a batch query.
    ///
    /// The joint position in linear units (equivalent to scene units) for a translational axis, or radians for a rotational axis.
    ///
    /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
    /// and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationJointReducedCoordinate_getJointPosition(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;

    /// Sets the joint velocity for the given axis.
    ///
    /// - For performance, prefer PxArticulationCache::jointVelocity to set joint velocities in a batch articulation state update.
    /// - Use PxArticulationReducedCoordinate::updateKinematic after all state updates to the articulation via non-cache API such as this method,
    /// in order to update link states for the next simulation frame or querying.
    ///
    /// This call is not allowed while the simulation is running.
    pub fn PxArticulationJointReducedCoordinate_setJointVelocity_mut(self_: *mut PxArticulationJointReducedCoordinate, axis: PxArticulationAxis, jointVel: f32);

    /// Gets the joint velocity for the given axis.
    ///
    /// For performance, prefer PxArticulationCache::jointVelocity to get joint velocities in a batch query.
    ///
    /// The joint velocity in linear units (equivalent to scene units) per second for a translational axis, or radians per second for a rotational axis.
    ///
    /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
    /// and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationJointReducedCoordinate_getJointVelocity(self_: *const PxArticulationJointReducedCoordinate, axis: PxArticulationAxis) -> f32;

    /// Returns the string name of the dynamic type.
    ///
    /// The string name.
    pub fn PxArticulationJointReducedCoordinate_getConcreteTypeName(self_: *const PxArticulationJointReducedCoordinate) -> *const std::ffi::c_char;

    /// Decrements the reference count of a shape and releases it if the new reference count is zero.
    ///
    /// Note that in releases prior to PhysX 3.3 this method did not have reference counting semantics and was used to destroy a shape
    /// created with PxActor::createShape(). In PhysX 3.3 and above, this usage is deprecated, instead, use PxRigidActor::detachShape() to detach
    /// a shape from an actor. If the shape to be detached was created with PxActor::createShape(), the actor holds the only counted reference,
    /// and so when the shape is detached it will also be destroyed.
    pub fn PxShape_release_mut(self_: *mut PxShape);

    /// Adjust the geometry of the shape.
    ///
    /// The type of the passed in geometry must match the geometry type of the shape.
    ///
    /// It is not allowed to change the geometry type of a shape.
    ///
    /// This function does not guarantee correct/continuous behavior when objects are resting on top of old or new geometry.
    pub fn PxShape_setGeometry_mut(self_: *mut PxShape, geometry: *const PxGeometry);

    /// Retrieve a reference to the shape's geometry.
    ///
    /// The returned reference has the same lifetime as the PxShape it comes from.
    ///
    /// Reference to internal PxGeometry object.
    pub fn PxShape_getGeometry(self_: *const PxShape) -> *const PxGeometry;

    /// Retrieves the actor which this shape is associated with.
    ///
    /// The actor this shape is associated with, if it is an exclusive shape, else NULL
    pub fn PxShape_getActor(self_: *const PxShape) -> *mut PxRigidActor;

    /// Sets the pose of the shape in actor space, i.e. relative to the actors to which they are attached.
    ///
    /// This transformation is identity by default.
    ///
    /// The local pose is an attribute of the shape, and so will apply to all actors to which the shape is attached.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the associated actor up automatically.
    ///
    /// Note:
    /// Does not automatically update the inertia properties of the owning actor (if applicable); use the
    /// PhysX extensions method [`PxRigidBodyExt::updateMassAndInertia`]() to do this.
    ///
    /// Default:
    /// the identity transform
    pub fn PxShape_setLocalPose_mut(self_: *mut PxShape, pose: *const PxTransform);

    /// Retrieves the pose of the shape in actor space, i.e. relative to the actor they are owned by.
    ///
    /// This transformation is identity by default.
    ///
    /// Pose of shape relative to the actor's frame.
    pub fn PxShape_getLocalPose(self_: *const PxShape) -> PxTransform;

    /// Sets the user definable collision filter data.
    ///
    /// Sleeping:
    /// Does wake up the actor if the filter data change causes a formerly suppressed
    /// collision pair to be enabled.
    ///
    /// Default:
    /// (0,0,0,0)
    pub fn PxShape_setSimulationFilterData_mut(self_: *mut PxShape, data: *const PxFilterData);

    /// Retrieves the shape's collision filter data.
    pub fn PxShape_getSimulationFilterData(self_: *const PxShape) -> PxFilterData;

    /// Sets the user definable query filter data.
    ///
    /// Default:
    /// (0,0,0,0)
    pub fn PxShape_setQueryFilterData_mut(self_: *mut PxShape, data: *const PxFilterData);

    /// Retrieves the shape's Query filter data.
    pub fn PxShape_getQueryFilterData(self_: *const PxShape) -> PxFilterData;

    /// Assigns material(s) to the shape. Will remove existing materials from the shape.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the associated actor up automatically.
    pub fn PxShape_setMaterials_mut(self_: *mut PxShape, materials: *const *mut PxMaterial, materialCount: u16);

    /// Returns the number of materials assigned to the shape.
    ///
    /// You can use [`getMaterials`]() to retrieve the material pointers.
    ///
    /// Number of materials associated with this shape.
    pub fn PxShape_getNbMaterials(self_: *const PxShape) -> u16;

    /// Retrieve all the material pointers associated with the shape.
    ///
    /// You can retrieve the number of material pointers by calling [`getNbMaterials`]()
    ///
    /// Note: The returned data may contain invalid pointers if you release materials using [`PxMaterial::release`]().
    ///
    /// Number of material pointers written to the buffer.
    pub fn PxShape_getMaterials(self_: *const PxShape, userBuffer: *mut *mut PxMaterial, bufferSize: u32, startIndex: u32) -> u32;

    /// Retrieve material from given triangle index.
    ///
    /// The input index is the internal triangle index as used inside the SDK. This is the index
    /// returned to users by various SDK functions such as raycasts.
    ///
    /// This function is only useful for triangle meshes or heightfields, which have per-triangle
    /// materials. For other shapes or SDF triangle meshes, the function returns the single material
    /// associated with the shape, regardless of the index.
    ///
    /// Material from input triangle
    ///
    /// If faceIndex value of 0xFFFFffff is passed as an input for mesh and heightfield shapes, this function will issue a warning and return NULL.
    ///
    /// Scene queries set the value of PxQueryHit::faceIndex to 0xFFFFffff whenever it is undefined or does not apply.
    pub fn PxShape_getMaterialFromInternalFaceIndex(self_: *const PxShape, faceIndex: u32) -> *mut PxBaseMaterial;

    /// Sets the contact offset.
    ///
    /// Shapes whose distance is less than the sum of their contactOffset values will generate contacts. The contact offset must be positive and
    /// greater than the rest offset. Having a contactOffset greater than than the restOffset allows the collision detection system to
    /// predictively enforce the contact constraint even when the objects are slightly separated. This prevents jitter that would occur
    /// if the constraint were enforced only when shapes were within the rest distance.
    ///
    /// Default:
    /// 0.02f * PxTolerancesScale::length
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the associated actor up automatically.
    pub fn PxShape_setContactOffset_mut(self_: *mut PxShape, contactOffset: f32);

    /// Retrieves the contact offset.
    ///
    /// The contact offset of the shape.
    pub fn PxShape_getContactOffset(self_: *const PxShape) -> f32;

    /// Sets the rest offset.
    ///
    /// Two shapes will come to rest at a distance equal to the sum of their restOffset values. If the restOffset is 0, they should converge to touching
    /// exactly.  Having a restOffset greater than zero is useful to have objects slide smoothly, so that they do not get hung up on irregularities of
    /// each others' surfaces.
    ///
    /// Default:
    /// 0.0f
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the associated actor up automatically.
    pub fn PxShape_setRestOffset_mut(self_: *mut PxShape, restOffset: f32);

    /// Retrieves the rest offset.
    ///
    /// The rest offset of the shape.
    pub fn PxShape_getRestOffset(self_: *const PxShape) -> f32;

    /// Sets the density used to interact with fluids.
    ///
    /// To be physically accurate, the density of a rigid body should be computed as its mass divided by its volume. To
    /// simplify tuning the interaction of fluid and rigid bodies, the density for fluid can differ from the real density. This
    /// allows to create floating bodies, even if they are supposed to sink with their mass and volume.
    ///
    /// Default:
    /// 800.0f
    pub fn PxShape_setDensityForFluid_mut(self_: *mut PxShape, densityForFluid: f32);

    /// Retrieves the density used to interact with fluids.
    ///
    /// The density of the body when interacting with fluid.
    pub fn PxShape_getDensityForFluid(self_: *const PxShape) -> f32;

    /// Sets torsional patch radius.
    ///
    /// This defines the radius of the contact patch used to apply torsional friction. If the radius is 0, no torsional friction
    /// will be applied. If the radius is > 0, some torsional friction will be applied. This is proportional to the penetration depth
    /// so, if the shapes are separated or penetration is zero, no torsional friction will be applied. It is used to approximate
    /// rotational friction introduced by the compression of contacting surfaces.
    ///
    /// Default:
    /// 0.0
    pub fn PxShape_setTorsionalPatchRadius_mut(self_: *mut PxShape, radius: f32);

    /// Gets torsional patch radius.
    ///
    /// This defines the radius of the contact patch used to apply torsional friction. If the radius is 0, no torsional friction
    /// will be applied. If the radius is > 0, some torsional friction will be applied. This is proportional to the penetration depth
    /// so, if the shapes are separated or penetration is zero, no torsional friction will be applied. It is used to approximate
    /// rotational friction introduced by the compression of contacting surfaces.
    ///
    /// The torsional patch radius of the shape.
    pub fn PxShape_getTorsionalPatchRadius(self_: *const PxShape) -> f32;

    /// Sets minimum torsional patch radius.
    ///
    /// This defines the minimum radius of the contact patch used to apply torsional friction. If the radius is 0, the amount of torsional friction
    /// that will be applied will be entirely dependent on the value of torsionalPatchRadius.
    ///
    /// If the radius is > 0, some torsional friction will be applied regardless of the value of torsionalPatchRadius or the amount of penetration.
    ///
    /// Default:
    /// 0.0
    pub fn PxShape_setMinTorsionalPatchRadius_mut(self_: *mut PxShape, radius: f32);

    /// Gets minimum torsional patch radius.
    ///
    /// This defines the minimum radius of the contact patch used to apply torsional friction. If the radius is 0, the amount of torsional friction
    /// that will be applied will be entirely dependent on the value of torsionalPatchRadius.
    ///
    /// If the radius is > 0, some torsional friction will be applied regardless of the value of torsionalPatchRadius or the amount of penetration.
    ///
    /// The minimum torsional patch radius of the shape.
    pub fn PxShape_getMinTorsionalPatchRadius(self_: *const PxShape) -> f32;

    /// Sets shape flags
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the associated actor up automatically.
    ///
    /// Default:
    /// PxShapeFlag::eVISUALIZATION | PxShapeFlag::eSIMULATION_SHAPE | PxShapeFlag::eSCENE_QUERY_SHAPE
    pub fn PxShape_setFlag_mut(self_: *mut PxShape, flag: PxShapeFlag, value: bool);

    /// Sets shape flags
    pub fn PxShape_setFlags_mut(self_: *mut PxShape, inFlags: PxShapeFlags);

    /// Retrieves shape flags.
    ///
    /// The values of the shape flags.
    pub fn PxShape_getFlags(self_: *const PxShape) -> PxShapeFlags;

    /// Returns true if the shape is exclusive to an actor.
    pub fn PxShape_isExclusive(self_: *const PxShape) -> bool;

    /// Sets a name string for the object that can be retrieved with [`getName`]().
    ///
    /// This is for debugging and is not used by the SDK.
    /// The string is not copied by the SDK, only the pointer is stored.
    ///
    /// Default:
    /// NULL
    pub fn PxShape_setName_mut(self_: *mut PxShape, name: *const std::ffi::c_char);

    /// retrieves the name string set with setName().
    ///
    /// The name associated with the shape.
    pub fn PxShape_getName(self_: *const PxShape) -> *const std::ffi::c_char;

    pub fn PxShape_getConcreteTypeName(self_: *const PxShape) -> *const std::ffi::c_char;

    /// Deletes the rigid actor object.
    ///
    /// Also releases any shapes associated with the actor.
    ///
    /// Releasing an actor will affect any objects that are connected to the actor (constraint shaders like joints etc.).
    /// Such connected objects will be deleted upon scene deletion, or explicitly by the user by calling release()
    /// on these objects. It is recommended to always remove all objects that reference actors before the actors
    /// themselves are removed. It is not possible to retrieve list of dead connected objects.
    ///
    /// Sleeping:
    /// This call will awaken any sleeping actors contacting the deleted actor (directly or indirectly).
    ///
    /// Calls [`PxActor::release`]() so you might want to check the documentation of that method as well.
    pub fn PxRigidActor_release_mut(self_: *mut PxRigidActor);

    /// Returns the internal actor index.
    ///
    /// This is only defined for actors that have been added to a scene.
    ///
    /// The internal actor index, or 0xffffffff if the actor is not part of a scene.
    pub fn PxRigidActor_getInternalActorIndex(self_: *const PxRigidActor) -> u32;

    /// Retrieves the actors world space transform.
    ///
    /// The getGlobalPose() method retrieves the actor's current actor space to world space transformation.
    ///
    /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
    /// in PxContactModifyCallback or in contact report callbacks).
    ///
    /// Global pose of object.
    pub fn PxRigidActor_getGlobalPose(self_: *const PxRigidActor) -> PxTransform;

    /// Method for setting an actor's pose in the world.
    ///
    /// This method instantaneously changes the actor space to world space transformation.
    ///
    /// This method is mainly for dynamic rigid bodies (see [`PxRigidDynamic`]). Calling this method on static actors is
    /// likely to result in a performance penalty, since internal optimization structures for static actors may need to be
    /// recomputed. In addition, moving static actors will not interact correctly with dynamic actors or joints.
    ///
    /// To directly control an actor's position and have it correctly interact with dynamic bodies and joints, create a dynamic
    /// body with the PxRigidBodyFlag::eKINEMATIC flag, then use the setKinematicTarget() commands to define its path.
    ///
    /// Even when moving dynamic actors, exercise restraint in making use of this method. Where possible, avoid:
    ///
    /// moving actors into other actors, thus causing overlap (an invalid physical state)
    ///
    /// moving an actor that is connected by a joint to another away from the other (thus causing joint error)
    ///
    /// Sleeping:
    /// This call wakes dynamic actors if they are sleeping and the autowake parameter is true (default).
    pub fn PxRigidActor_setGlobalPose_mut(self_: *mut PxRigidActor, pose: *const PxTransform, autowake: bool);

    /// Attach a shape to an actor
    ///
    /// This call will increment the reference count of the shape.
    ///
    /// Mass properties of dynamic rigid actors will not automatically be recomputed
    /// to reflect the new mass distribution implied by the shape. Follow this call with a call to
    /// the PhysX extensions method [`PxRigidBodyExt::updateMassAndInertia`]() to do that.
    ///
    /// Attaching a triangle mesh, heightfield or plane geometry shape configured as eSIMULATION_SHAPE is not supported for
    /// non-kinematic PxRigidDynamic instances.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the actor up automatically.
    ///
    /// True if success.
    pub fn PxRigidActor_attachShape_mut(self_: *mut PxRigidActor, shape: *mut PxShape) -> bool;

    /// Detach a shape from an actor.
    ///
    /// This will also decrement the reference count of the PxShape, and if the reference count is zero, will cause it to be deleted.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the actor up automatically.
    pub fn PxRigidActor_detachShape_mut(self_: *mut PxRigidActor, shape: *mut PxShape, wakeOnLostTouch: bool);

    /// Returns the number of shapes assigned to the actor.
    ///
    /// You can use [`getShapes`]() to retrieve the shape pointers.
    ///
    /// Number of shapes associated with this actor.
    pub fn PxRigidActor_getNbShapes(self_: *const PxRigidActor) -> u32;

    /// Retrieve all the shape pointers belonging to the actor.
    ///
    /// These are the shapes used by the actor for collision detection.
    ///
    /// You can retrieve the number of shape pointers by calling [`getNbShapes`]()
    ///
    /// Note: Removing shapes with [`PxShape::release`]() will invalidate the pointer of the released shape.
    ///
    /// Number of shape pointers written to the buffer.
    pub fn PxRigidActor_getShapes(self_: *const PxRigidActor, userBuffer: *mut *mut PxShape, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of constraint shaders attached to the actor.
    ///
    /// You can use [`getConstraints`]() to retrieve the constraint shader pointers.
    ///
    /// Number of constraint shaders attached to this actor.
    pub fn PxRigidActor_getNbConstraints(self_: *const PxRigidActor) -> u32;

    /// Retrieve all the constraint shader pointers belonging to the actor.
    ///
    /// You can retrieve the number of constraint shader pointers by calling [`getNbConstraints`]()
    ///
    /// Note: Removing constraint shaders with [`PxConstraint::release`]() will invalidate the pointer of the released constraint.
    ///
    /// Number of constraint shader pointers written to the buffer.
    pub fn PxRigidActor_getConstraints(self_: *const PxRigidActor, userBuffer: *mut *mut PxConstraint, bufferSize: u32, startIndex: u32) -> u32;

    pub fn PxNodeIndex_new(id: u32, articLinkId: u32) -> PxNodeIndex;

    pub fn PxNodeIndex_new_1(id: u32) -> PxNodeIndex;

    pub fn PxNodeIndex_index(self_: *const PxNodeIndex) -> u32;

    pub fn PxNodeIndex_articulationLinkId(self_: *const PxNodeIndex) -> u32;

    pub fn PxNodeIndex_isArticulation(self_: *const PxNodeIndex) -> u32;

    pub fn PxNodeIndex_isStaticBody(self_: *const PxNodeIndex) -> bool;

    pub fn PxNodeIndex_isValid(self_: *const PxNodeIndex) -> bool;

    pub fn PxNodeIndex_setIndices_mut(self_: *mut PxNodeIndex, index: u32, articLinkId: u32);

    pub fn PxNodeIndex_setIndices_mut_1(self_: *mut PxNodeIndex, index: u32);

    pub fn PxNodeIndex_getInd(self_: *const PxNodeIndex) -> u64;

    /// Sets the pose of the center of mass relative to the actor.
    ///
    /// Changing this transform will not move the actor in the world!
    ///
    /// Setting an unrealistic center of mass which is a long way from the body can make it difficult for
    /// the SDK to solve constraints. Perhaps leading to instability and jittering bodies.
    ///
    /// Default:
    /// the identity transform
    pub fn PxRigidBody_setCMassLocalPose_mut(self_: *mut PxRigidBody, pose: *const PxTransform);

    /// Retrieves the center of mass pose relative to the actor frame.
    ///
    /// The center of mass pose relative to the actor frame.
    pub fn PxRigidBody_getCMassLocalPose(self_: *const PxRigidBody) -> PxTransform;

    /// Sets the mass of a dynamic actor.
    ///
    /// The mass must be non-negative.
    ///
    /// setMass() does not update the inertial properties of the body, to change the inertia tensor
    /// use setMassSpaceInertiaTensor() or the PhysX extensions method [`PxRigidBodyExt::updateMassAndInertia`]().
    ///
    /// A value of 0 is interpreted as infinite mass.
    ///
    /// Values of 0 are not permitted for instances of PxArticulationLink but are permitted for instances of PxRigidDynamic.
    ///
    /// Default:
    /// 1.0
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the actor up automatically.
    pub fn PxRigidBody_setMass_mut(self_: *mut PxRigidBody, mass: f32);

    /// Retrieves the mass of the actor.
    ///
    /// A value of 0 is interpreted as infinite mass.
    ///
    /// The mass of this actor.
    pub fn PxRigidBody_getMass(self_: *const PxRigidBody) -> f32;

    /// Retrieves the inverse mass of the actor.
    ///
    /// The inverse mass of this actor.
    pub fn PxRigidBody_getInvMass(self_: *const PxRigidBody) -> f32;

    /// Sets the inertia tensor, using a parameter specified in mass space coordinates.
    ///
    /// Note that such matrices are diagonal -- the passed vector is the diagonal.
    ///
    /// If you have a non diagonal world/actor space inertia tensor(3x3 matrix). Then you need to
    /// diagonalize it and set an appropriate mass space transform. See [`setCMassLocalPose`]().
    ///
    /// The inertia tensor elements must be non-negative.
    ///
    /// A value of 0 in an element is interpreted as infinite inertia along that axis.
    ///
    /// Values of 0 are not permitted for instances of PxArticulationLink but are permitted for instances of PxRigidDynamic.
    ///
    /// Default:
    /// (1.0, 1.0, 1.0)
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the actor up automatically.
    pub fn PxRigidBody_setMassSpaceInertiaTensor_mut(self_: *mut PxRigidBody, m: *const PxVec3);

    /// Retrieves the diagonal inertia tensor of the actor relative to the mass coordinate frame.
    ///
    /// This method retrieves a mass frame inertia vector.
    ///
    /// The mass space inertia tensor of this actor.
    ///
    /// A value of 0 in an element is interpreted as infinite inertia along that axis.
    pub fn PxRigidBody_getMassSpaceInertiaTensor(self_: *const PxRigidBody) -> PxVec3;

    /// Retrieves the diagonal inverse inertia tensor of the actor relative to the mass coordinate frame.
    ///
    /// This method retrieves a mass frame inverse inertia vector.
    ///
    /// A value of 0 in an element is interpreted as infinite inertia along that axis.
    ///
    /// The mass space inverse inertia tensor of this actor.
    pub fn PxRigidBody_getMassSpaceInvInertiaTensor(self_: *const PxRigidBody) -> PxVec3;

    /// Sets the linear damping coefficient.
    ///
    /// Zero represents no damping. The damping coefficient must be nonnegative.
    ///
    /// Default:
    /// 0.0
    pub fn PxRigidBody_setLinearDamping_mut(self_: *mut PxRigidBody, linDamp: f32);

    /// Retrieves the linear damping coefficient.
    ///
    /// The linear damping coefficient associated with this actor.
    pub fn PxRigidBody_getLinearDamping(self_: *const PxRigidBody) -> f32;

    /// Sets the angular damping coefficient.
    ///
    /// Zero represents no damping.
    ///
    /// The angular damping coefficient must be nonnegative.
    ///
    /// Default:
    /// 0.05
    pub fn PxRigidBody_setAngularDamping_mut(self_: *mut PxRigidBody, angDamp: f32);

    /// Retrieves the angular damping coefficient.
    ///
    /// The angular damping coefficient associated with this actor.
    pub fn PxRigidBody_getAngularDamping(self_: *const PxRigidBody) -> f32;

    /// Retrieves the linear velocity of an actor.
    ///
    /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
    /// in PxContactModifyCallback or in contact report callbacks).
    ///
    /// The linear velocity of the actor.
    pub fn PxRigidBody_getLinearVelocity(self_: *const PxRigidBody) -> PxVec3;

    /// Retrieves the angular velocity of the actor.
    ///
    /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
    /// in PxContactModifyCallback or in contact report callbacks).
    ///
    /// The angular velocity of the actor.
    pub fn PxRigidBody_getAngularVelocity(self_: *const PxRigidBody) -> PxVec3;

    /// Lets you set the maximum linear velocity permitted for this actor.
    ///
    /// With this function, you can set the  maximum linear velocity permitted for this rigid body.
    /// Higher angular velocities are clamped to this value.
    ///
    /// Note: The angular velocity is clamped to the set value
    /// before
    /// the solver, which means that
    /// the limit may still be momentarily exceeded.
    ///
    /// Default:
    /// PX_MAX_F32
    pub fn PxRigidBody_setMaxLinearVelocity_mut(self_: *mut PxRigidBody, maxLinVel: f32);

    /// Retrieves the maximum angular velocity permitted for this actor.
    ///
    /// The maximum allowed angular velocity for this actor.
    pub fn PxRigidBody_getMaxLinearVelocity(self_: *const PxRigidBody) -> f32;

    /// Lets you set the maximum angular velocity permitted for this actor.
    ///
    /// For various internal computations, very quickly rotating actors introduce error
    /// into the simulation, which leads to undesired results.
    ///
    /// With this function, you can set the  maximum angular velocity permitted for this rigid body.
    /// Higher angular velocities are clamped to this value.
    ///
    /// Note: The angular velocity is clamped to the set value
    /// before
    /// the solver, which means that
    /// the limit may still be momentarily exceeded.
    ///
    /// Default:
    /// 100.0
    pub fn PxRigidBody_setMaxAngularVelocity_mut(self_: *mut PxRigidBody, maxAngVel: f32);

    /// Retrieves the maximum angular velocity permitted for this actor.
    ///
    /// The maximum allowed angular velocity for this actor.
    pub fn PxRigidBody_getMaxAngularVelocity(self_: *const PxRigidBody) -> f32;

    /// Applies a force (or impulse) defined in the global coordinate frame to the actor at its center of mass.
    ///
    /// This will not induce a torque
    /// .
    ///
    /// ::PxForceMode determines if the force is to be conventional or impulsive.
    ///
    /// Each actor has an acceleration and a velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION
    /// and PxForceMode::eVELOCITY_CHANGE respectively.  The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same
    /// accumulators and are just short hand for multiplying the vector parameter by inverse mass and then using PxForceMode::eACCELERATION and
    /// PxForceMode::eVELOCITY_CHANGE respectively.
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
    ///
    /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
    ///
    /// if this is called on an articulation link, only the link is updated, not the entire articulation.
    ///
    /// see [`PxRigidBodyExt::computeVelocityDeltaFromImpulse`] for details of how to compute the change in linear velocity that
    /// will arise from the application of an impulsive force, where an impulsive force is applied force multiplied by a timestep.
    ///
    /// Sleeping:
    /// This call wakes the actor if it is sleeping, and the autowake parameter is true (default) or the force is non-zero.
    pub fn PxRigidBody_addForce_mut(self_: *mut PxRigidBody, force: *const PxVec3, mode: PxForceMode, autowake: bool);

    /// Applies an impulsive torque defined in the global coordinate frame to the actor.
    ///
    /// ::PxForceMode determines if the torque is to be conventional or impulsive.
    ///
    /// Each actor has an angular acceleration and an angular velocity change accumulator which are directly modified using the modes
    /// PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively.  The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE
    /// also modify these same accumulators and are just short hand for multiplying the vector parameter by inverse inertia and then
    /// using PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively.
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
    ///
    /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
    ///
    /// if this called on an articulation link, only the link is updated, not the entire articulation.
    ///
    /// see [`PxRigidBodyExt::computeVelocityDeltaFromImpulse`] for details of how to compute the change in angular velocity that
    /// will arise from the application of an impulsive torque, where an impulsive torque is an applied torque multiplied by a timestep.
    ///
    /// Sleeping:
    /// This call wakes the actor if it is sleeping, and the autowake parameter is true (default) or the torque is non-zero.
    pub fn PxRigidBody_addTorque_mut(self_: *mut PxRigidBody, torque: *const PxVec3, mode: PxForceMode, autowake: bool);

    /// Clears the accumulated forces (sets the accumulated force back to zero).
    ///
    /// Each actor has an acceleration and a velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION
    /// and PxForceMode::eVELOCITY_CHANGE respectively.  The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same
    /// accumulators (see PxRigidBody::addForce() for details); therefore the effect of calling clearForce(PxForceMode::eFORCE) is equivalent to calling
    /// clearForce(PxForceMode::eACCELERATION), and the effect of calling clearForce(PxForceMode::eIMPULSE) is equivalent to calling
    /// clearForce(PxForceMode::eVELOCITY_CHANGE).
    ///
    /// ::PxForceMode determines if the cleared force is to be conventional or impulsive.
    ///
    /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
    pub fn PxRigidBody_clearForce_mut(self_: *mut PxRigidBody, mode: PxForceMode);

    /// Clears the impulsive torque defined in the global coordinate frame to the actor.
    ///
    /// ::PxForceMode determines if the cleared torque is to be conventional or impulsive.
    ///
    /// Each actor has an angular acceleration and a velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION
    /// and PxForceMode::eVELOCITY_CHANGE respectively.  The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same
    /// accumulators (see PxRigidBody::addTorque() for details); therefore the effect of calling clearTorque(PxForceMode::eFORCE) is equivalent to calling
    /// clearTorque(PxForceMode::eACCELERATION), and the effect of calling clearTorque(PxForceMode::eIMPULSE) is equivalent to calling
    /// clearTorque(PxForceMode::eVELOCITY_CHANGE).
    ///
    /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
    pub fn PxRigidBody_clearTorque_mut(self_: *mut PxRigidBody, mode: PxForceMode);

    /// Sets the impulsive force and torque defined in the global coordinate frame to the actor.
    ///
    /// ::PxForceMode determines if the cleared torque is to be conventional or impulsive.
    ///
    /// The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
    pub fn PxRigidBody_setForceAndTorque_mut(self_: *mut PxRigidBody, force: *const PxVec3, torque: *const PxVec3, mode: PxForceMode);

    /// Raises or clears a particular rigid body flag.
    ///
    /// See the list of flags [`PxRigidBodyFlag`]
    ///
    /// Default:
    /// no flags are set
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the actor up automatically.
    pub fn PxRigidBody_setRigidBodyFlag_mut(self_: *mut PxRigidBody, flag: PxRigidBodyFlag, value: bool);

    pub fn PxRigidBody_setRigidBodyFlags_mut(self_: *mut PxRigidBody, inFlags: PxRigidBodyFlags);

    /// Reads the PxRigidBody flags.
    ///
    /// See the list of flags [`PxRigidBodyFlag`]
    ///
    /// The values of the PxRigidBody flags.
    pub fn PxRigidBody_getRigidBodyFlags(self_: *const PxRigidBody) -> PxRigidBodyFlags;

    /// Sets the CCD minimum advance coefficient.
    ///
    /// The CCD minimum advance coefficient is a value in the range [0, 1] that is used to control the minimum amount of time a body is integrated when
    /// it has a CCD contact. The actual minimum amount of time that is integrated depends on various properties, including the relative speed and collision shapes
    /// of the bodies involved in the contact. From these properties, a numeric value is calculated that determines the maximum distance (and therefore maximum time)
    /// which these bodies could be integrated forwards that would ensure that these bodies did not pass through each-other. This value is then scaled by CCD minimum advance
    /// coefficient to determine the amount of time that will be consumed in the CCD pass.
    ///
    /// Things to consider:
    /// A large value (approaching 1) ensures that the objects will always advance some time. However, larger values increase the chances of objects gently drifting through each-other in
    /// scenes which the constraint solver can't converge, e.g. scenes where an object is being dragged through a wall with a constraint.
    /// A value of 0 ensures that the pair of objects stop at the exact time-of-impact and will not gently drift through each-other. However, with very small/thin objects initially in
    /// contact, this can lead to a large amount of time being dropped and increases the chances of jamming. Jamming occurs when the an object is persistently in contact with an object
    /// such that the time-of-impact is 0, which results in no time being advanced for those objects in that CCD pass.
    ///
    /// The chances of jamming can be reduced by increasing the number of CCD mass
    pub fn PxRigidBody_setMinCCDAdvanceCoefficient_mut(self_: *mut PxRigidBody, advanceCoefficient: f32);

    /// Gets the CCD minimum advance coefficient.
    ///
    /// The value of the CCD min advance coefficient.
    pub fn PxRigidBody_getMinCCDAdvanceCoefficient(self_: *const PxRigidBody) -> f32;

    /// Sets the maximum depenetration velocity permitted to be introduced by the solver.
    /// This value controls how much velocity the solver can introduce to correct for penetrations in contacts.
    pub fn PxRigidBody_setMaxDepenetrationVelocity_mut(self_: *mut PxRigidBody, biasClamp: f32);

    /// Returns the maximum depenetration velocity the solver is permitted to introduced.
    /// This value controls how much velocity the solver can introduce to correct for penetrations in contacts.
    ///
    /// The maximum penetration bias applied by the solver.
    pub fn PxRigidBody_getMaxDepenetrationVelocity(self_: *const PxRigidBody) -> f32;

    /// Sets a limit on the impulse that may be applied at a contact. The maximum impulse at a contact between two dynamic or kinematic
    /// bodies will be the minimum of the two limit values. For a collision between a static and a dynamic body, the impulse is limited
    /// by the value for the dynamic body.
    pub fn PxRigidBody_setMaxContactImpulse_mut(self_: *mut PxRigidBody, maxImpulse: f32);

    /// Returns the maximum impulse that may be applied at a contact.
    ///
    /// The maximum impulse that may be applied at a contact
    pub fn PxRigidBody_getMaxContactImpulse(self_: *const PxRigidBody) -> f32;

    /// Sets a distance scale whereby the angular influence of a contact on the normal constraint in a contact is
    /// zeroed if normal.cross(offset) falls below this tolerance. Rather than acting as an absolute value, this tolerance
    /// is scaled by the ratio rXn.dot(angVel)/normal.dot(linVel) such that contacts that have relatively larger angular velocity
    /// than linear normal velocity (e.g. rolling wheels) achieve larger slop values as the angular velocity increases.
    pub fn PxRigidBody_setContactSlopCoefficient_mut(self_: *mut PxRigidBody, slopCoefficient: f32);

    /// Returns the contact slop coefficient.
    ///
    /// The contact slop coefficient.
    pub fn PxRigidBody_getContactSlopCoefficient(self_: *const PxRigidBody) -> f32;

    /// Returns the island node index
    ///
    /// The island node index.
    pub fn PxRigidBody_getInternalIslandNodeIndex(self_: *const PxRigidBody) -> PxNodeIndex;

    /// Releases the link from the articulation.
    ///
    /// Only a leaf articulation link can be released.
    ///
    /// Releasing a link is not allowed while the articulation link is in a scene. In order to release a link,
    /// remove and then re-add the corresponding articulation to the scene.
    pub fn PxArticulationLink_release_mut(self_: *mut PxArticulationLink);

    /// Gets the articulation that the link is a part of.
    ///
    /// The articulation.
    pub fn PxArticulationLink_getArticulation(self_: *const PxArticulationLink) -> *mut PxArticulationReducedCoordinate;

    /// Gets the joint which connects this link to its parent.
    ///
    /// The joint connecting the link to the parent. NULL for the root link.
    pub fn PxArticulationLink_getInboundJoint(self_: *const PxArticulationLink) -> *mut PxArticulationJointReducedCoordinate;

    /// Gets the number of degrees of freedom of the joint which connects this link to its parent.
    ///
    /// - The root link DOF-count is defined to be 0 regardless of PxArticulationFlag::eFIX_BASE.
    /// - The return value is only valid for articulations that are in a scene.
    ///
    /// The number of degrees of freedom, or 0xFFFFFFFF if the articulation is not in a scene.
    pub fn PxArticulationLink_getInboundJointDof(self_: *const PxArticulationLink) -> u32;

    /// Gets the number of child links.
    ///
    /// The number of child links.
    pub fn PxArticulationLink_getNbChildren(self_: *const PxArticulationLink) -> u32;

    /// Gets the low-level link index that may be used to index into members of PxArticulationCache.
    ///
    /// The return value is only valid for articulations that are in a scene.
    ///
    /// The low-level index, or 0xFFFFFFFF if the articulation is not in a scene.
    pub fn PxArticulationLink_getLinkIndex(self_: *const PxArticulationLink) -> u32;

    /// Retrieves the child links.
    ///
    /// The number of articulation links written to the buffer.
    pub fn PxArticulationLink_getChildren(self_: *const PxArticulationLink, userBuffer: *mut *mut PxArticulationLink, bufferSize: u32, startIndex: u32) -> u32;

    /// Set the constraint-force-mixing scale term.
    ///
    /// The cfm scale term is a stabilization term that helps avoid instabilities with over-constrained
    /// configurations. It should be a small value that is multiplied by 1/mass internally to produce
    /// an additional bias added to the unit response term in the solver.
    ///
    /// Default:
    /// 0.025
    /// Range:
    /// [0, 1]
    ///
    /// This call is not allowed while the simulation is running.
    pub fn PxArticulationLink_setCfmScale_mut(self_: *mut PxArticulationLink, cfm: f32);

    /// Get the constraint-force-mixing scale term.
    ///
    /// The constraint-force-mixing scale term.
    pub fn PxArticulationLink_getCfmScale(self_: *const PxArticulationLink) -> f32;

    /// Get the linear velocity of the link.
    ///
    /// - The linear velocity is with respect to the link's center of mass and not the actor frame origin.
    /// - For performance, prefer PxArticulationCache::linkVelocity to get link spatial velocities in a batch query.
    /// - When the articulation state is updated via non-cache API, use PxArticulationReducedCoordinate::updateKinematic before querying velocity.
    ///
    /// The linear velocity of the link.
    ///
    /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
    /// and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationLink_getLinearVelocity(self_: *const PxArticulationLink) -> PxVec3;

    /// Get the angular velocity of the link.
    ///
    /// - For performance, prefer PxArticulationCache::linkVelocity to get link spatial velocities in a batch query.
    /// - When the articulation state is updated via non-cache API, use PxArticulationReducedCoordinate::updateKinematic before querying velocity.
    ///
    /// The angular velocity of the link.
    ///
    /// This call is not allowed while the simulation is running except in a split simulation during [`PxScene::collide`]() and up to #PxScene::advance(),
    /// and in PxContactModifyCallback or in contact report callbacks.
    pub fn PxArticulationLink_getAngularVelocity(self_: *const PxArticulationLink) -> PxVec3;

    /// Returns the string name of the dynamic type.
    ///
    /// The string name.
    pub fn PxArticulationLink_getConcreteTypeName(self_: *const PxArticulationLink) -> *const std::ffi::c_char;

    pub fn PxConeLimitedConstraint_new() -> PxConeLimitedConstraint;

    /// Releases a PxConstraint instance.
    ///
    /// This call does not wake up the connected rigid bodies.
    pub fn PxConstraint_release_mut(self_: *mut PxConstraint);

    /// Retrieves the scene which this constraint belongs to.
    ///
    /// Owner Scene. NULL if not part of a scene.
    pub fn PxConstraint_getScene(self_: *const PxConstraint) -> *mut PxScene;

    /// Retrieves the actors for this constraint.
    pub fn PxConstraint_getActors(self_: *const PxConstraint, actor0: *mut *mut PxRigidActor, actor1: *mut *mut PxRigidActor);

    /// Sets the actors for this constraint.
    pub fn PxConstraint_setActors_mut(self_: *mut PxConstraint, actor0: *mut PxRigidActor, actor1: *mut PxRigidActor);

    /// Notify the scene that the constraint shader data has been updated by the application
    pub fn PxConstraint_markDirty_mut(self_: *mut PxConstraint);

    /// Retrieve the flags for this constraint
    ///
    /// the constraint flags
    pub fn PxConstraint_getFlags(self_: *const PxConstraint) -> PxConstraintFlags;

    /// Set the flags for this constraint
    ///
    /// default: PxConstraintFlag::eDRIVE_LIMITS_ARE_FORCES
    pub fn PxConstraint_setFlags_mut(self_: *mut PxConstraint, flags: PxConstraintFlags);

    /// Set a flag for this constraint
    pub fn PxConstraint_setFlag_mut(self_: *mut PxConstraint, flag: PxConstraintFlag, value: bool);

    /// Retrieve the constraint force most recently applied to maintain this constraint.
    ///
    /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
    /// in PxContactModifyCallback or in contact report callbacks).
    pub fn PxConstraint_getForce(self_: *const PxConstraint, linear: *mut PxVec3, angular: *mut PxVec3);

    /// whether the constraint is valid.
    ///
    /// A constraint is valid if it has at least one dynamic rigid body or articulation link. A constraint that
    /// is not valid may not be inserted into a scene, and therefore a static actor to which an invalid constraint
    /// is attached may not be inserted into a scene.
    ///
    /// Invalid constraints arise only when an actor to which the constraint is attached has been deleted.
    pub fn PxConstraint_isValid(self_: *const PxConstraint) -> bool;

    /// Set the break force and torque thresholds for this constraint.
    ///
    /// If either the force or torque measured at the constraint exceed these thresholds the constraint will break.
    pub fn PxConstraint_setBreakForce_mut(self_: *mut PxConstraint, linear: f32, angular: f32);

    /// Retrieve the constraint break force and torque thresholds
    pub fn PxConstraint_getBreakForce(self_: *const PxConstraint, linear: *mut f32, angular: *mut f32);

    /// Set the minimum response threshold for a constraint row
    ///
    /// When using mass modification for a joint or infinite inertia for a jointed body, very stiff solver constraints can be generated which
    /// can destabilize simulation. Setting this value to a small positive value (e.g. 1e-8) will cause constraint rows to be ignored if very
    /// large changes in impulses will generate only small changes in velocity. When setting this value, also set
    /// PxConstraintFlag::eDISABLE_PREPROCESSING. The solver accuracy for this joint may be reduced.
    pub fn PxConstraint_setMinResponseThreshold_mut(self_: *mut PxConstraint, threshold: f32);

    /// Retrieve the constraint break force and torque thresholds
    ///
    /// the minimum response threshold for a constraint row
    pub fn PxConstraint_getMinResponseThreshold(self_: *const PxConstraint) -> f32;

    /// Fetch external owner of the constraint.
    ///
    /// Provides a reference to the external owner of a constraint and a unique owner type ID.
    ///
    /// Reference to the external object which owns the constraint.
    pub fn PxConstraint_getExternalReference_mut(self_: *mut PxConstraint, typeID: *mut u32) -> *mut std::ffi::c_void;

    /// Set the constraint functions for this constraint
    pub fn PxConstraint_setConstraintFunctions_mut(self_: *mut PxConstraint, connector: *mut PxConstraintConnector, shaders: *const PxConstraintShaderTable);

    pub fn PxConstraint_getConcreteTypeName(self_: *const PxConstraint) -> *const std::ffi::c_char;

    /// Constructor
    pub fn PxContactStreamIterator_new(contactPatches: *const u8, contactPoints: *const u8, contactFaceIndices: *const u32, nbPatches: u32, nbContacts: u32) -> PxContactStreamIterator;

    /// Returns whether there are more patches in this stream.
    ///
    /// Whether there are more patches in this stream.
    pub fn PxContactStreamIterator_hasNextPatch(self_: *const PxContactStreamIterator) -> bool;

    /// Returns the total contact count.
    ///
    /// Total contact count.
    pub fn PxContactStreamIterator_getTotalContactCount(self_: *const PxContactStreamIterator) -> u32;

    /// Returns the total patch count.
    ///
    /// Total patch count.
    pub fn PxContactStreamIterator_getTotalPatchCount(self_: *const PxContactStreamIterator) -> u32;

    /// Advances iterator to next contact patch.
    pub fn PxContactStreamIterator_nextPatch_mut(self_: *mut PxContactStreamIterator);

    /// Returns if the current patch has more contacts.
    ///
    /// If there are more contacts in the current patch.
    pub fn PxContactStreamIterator_hasNextContact(self_: *const PxContactStreamIterator) -> bool;

    /// Advances to the next contact in the patch.
    pub fn PxContactStreamIterator_nextContact_mut(self_: *mut PxContactStreamIterator);

    /// Gets the current contact's normal
    ///
    /// The current contact's normal.
    pub fn PxContactStreamIterator_getContactNormal(self_: *const PxContactStreamIterator) -> *const PxVec3;

    /// Gets the inverse mass scale for body 0.
    ///
    /// The inverse mass scale for body 0.
    pub fn PxContactStreamIterator_getInvMassScale0(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the inverse mass scale for body 1.
    ///
    /// The inverse mass scale for body 1.
    pub fn PxContactStreamIterator_getInvMassScale1(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the inverse inertia scale for body 0.
    ///
    /// The inverse inertia scale for body 0.
    pub fn PxContactStreamIterator_getInvInertiaScale0(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the inverse inertia scale for body 1.
    ///
    /// The inverse inertia scale for body 1.
    pub fn PxContactStreamIterator_getInvInertiaScale1(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the contact's max impulse.
    ///
    /// The contact's max impulse.
    pub fn PxContactStreamIterator_getMaxImpulse(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the contact's target velocity.
    ///
    /// The contact's target velocity.
    pub fn PxContactStreamIterator_getTargetVel(self_: *const PxContactStreamIterator) -> *const PxVec3;

    /// Gets the contact's contact point.
    ///
    /// The contact's contact point.
    pub fn PxContactStreamIterator_getContactPoint(self_: *const PxContactStreamIterator) -> *const PxVec3;

    /// Gets the contact's separation.
    ///
    /// The contact's separation.
    pub fn PxContactStreamIterator_getSeparation(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the contact's face index for shape 0.
    ///
    /// The contact's face index for shape 0.
    pub fn PxContactStreamIterator_getFaceIndex0(self_: *const PxContactStreamIterator) -> u32;

    /// Gets the contact's face index for shape 1.
    ///
    /// The contact's face index for shape 1.
    pub fn PxContactStreamIterator_getFaceIndex1(self_: *const PxContactStreamIterator) -> u32;

    /// Gets the contact's static friction coefficient.
    ///
    /// The contact's static friction coefficient.
    pub fn PxContactStreamIterator_getStaticFriction(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the contact's dynamic friction coefficient.
    ///
    /// The contact's dynamic friction coefficient.
    pub fn PxContactStreamIterator_getDynamicFriction(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the contact's restitution coefficient.
    ///
    /// The contact's restitution coefficient.
    pub fn PxContactStreamIterator_getRestitution(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the contact's damping value.
    ///
    /// The contact's damping value.
    pub fn PxContactStreamIterator_getDamping(self_: *const PxContactStreamIterator) -> f32;

    /// Gets the contact's material flags.
    ///
    /// The contact's material flags.
    pub fn PxContactStreamIterator_getMaterialFlags(self_: *const PxContactStreamIterator) -> u32;

    /// Gets the contact's material index for shape 0.
    ///
    /// The contact's material index for shape 0.
    pub fn PxContactStreamIterator_getMaterialIndex0(self_: *const PxContactStreamIterator) -> u16;

    /// Gets the contact's material index for shape 1.
    ///
    /// The contact's material index for shape 1.
    pub fn PxContactStreamIterator_getMaterialIndex1(self_: *const PxContactStreamIterator) -> u16;

    /// Advances the contact stream iterator to a specific contact index.
    ///
    /// True if advancing was possible
    pub fn PxContactStreamIterator_advanceToIndex_mut(self_: *mut PxContactStreamIterator, initialIndex: u32) -> bool;

    /// Get the position of a specific contact point in the set.
    ///
    /// Position to the requested point in world space
    pub fn PxContactSet_getPoint(self_: *const PxContactSet, i: u32) -> *const PxVec3;

    /// Alter the position of a specific contact point in the set.
    pub fn PxContactSet_setPoint_mut(self_: *mut PxContactSet, i: u32, p: *const PxVec3);

    /// Get the contact normal of a specific contact point in the set.
    ///
    /// The requested normal in world space
    pub fn PxContactSet_getNormal(self_: *const PxContactSet, i: u32) -> *const PxVec3;

    /// Alter the contact normal of a specific contact point in the set.
    ///
    /// Changing the normal can cause contact points to be ignored.
    pub fn PxContactSet_setNormal_mut(self_: *mut PxContactSet, i: u32, n: *const PxVec3);

    /// Get the separation distance of a specific contact point in the set.
    ///
    /// The separation. Negative implies penetration.
    pub fn PxContactSet_getSeparation(self_: *const PxContactSet, i: u32) -> f32;

    /// Alter the separation of a specific contact point in the set.
    pub fn PxContactSet_setSeparation_mut(self_: *mut PxContactSet, i: u32, s: f32);

    /// Get the target velocity of a specific contact point in the set.
    ///
    /// The target velocity in world frame
    pub fn PxContactSet_getTargetVelocity(self_: *const PxContactSet, i: u32) -> *const PxVec3;

    /// Alter the target velocity of a specific contact point in the set.
    pub fn PxContactSet_setTargetVelocity_mut(self_: *mut PxContactSet, i: u32, v: *const PxVec3);

    /// Get the face index with respect to the first shape of the pair for a specific contact point in the set.
    ///
    /// The face index of the first shape
    ///
    /// At the moment, the first shape is never a tri-mesh, therefore this function always returns PXC_CONTACT_NO_FACE_INDEX
    pub fn PxContactSet_getInternalFaceIndex0(self_: *const PxContactSet, i: u32) -> u32;

    /// Get the face index with respect to the second shape of the pair for a specific contact point in the set.
    ///
    /// The face index of the second shape
    pub fn PxContactSet_getInternalFaceIndex1(self_: *const PxContactSet, i: u32) -> u32;

    /// Get the maximum impulse for a specific contact point in the set.
    ///
    /// The maximum impulse
    pub fn PxContactSet_getMaxImpulse(self_: *const PxContactSet, i: u32) -> f32;

    /// Alter the maximum impulse for a specific contact point in the set.
    ///
    /// Must be nonnegative. If set to zero, the contact point will be ignored
    pub fn PxContactSet_setMaxImpulse_mut(self_: *mut PxContactSet, i: u32, s: f32);

    /// Get the restitution coefficient for a specific contact point in the set.
    ///
    /// The restitution coefficient
    pub fn PxContactSet_getRestitution(self_: *const PxContactSet, i: u32) -> f32;

    /// Alter the restitution coefficient for a specific contact point in the set.
    ///
    /// Valid ranges [0,1]
    pub fn PxContactSet_setRestitution_mut(self_: *mut PxContactSet, i: u32, r: f32);

    /// Get the static friction coefficient for a specific contact point in the set.
    ///
    /// The friction coefficient (dimensionless)
    pub fn PxContactSet_getStaticFriction(self_: *const PxContactSet, i: u32) -> f32;

    /// Alter the static friction coefficient for a specific contact point in the set.
    pub fn PxContactSet_setStaticFriction_mut(self_: *mut PxContactSet, i: u32, f: f32);

    /// Get the static friction coefficient for a specific contact point in the set.
    ///
    /// The friction coefficient
    pub fn PxContactSet_getDynamicFriction(self_: *const PxContactSet, i: u32) -> f32;

    /// Alter the static dynamic coefficient for a specific contact point in the set.
    pub fn PxContactSet_setDynamicFriction_mut(self_: *mut PxContactSet, i: u32, f: f32);

    /// Ignore the contact point.
    ///
    /// If a contact point is ignored then no force will get applied at this point. This can be used to disable collision in certain areas of a shape, for example.
    pub fn PxContactSet_ignore_mut(self_: *mut PxContactSet, i: u32);

    /// The number of contact points in the set.
    pub fn PxContactSet_size(self_: *const PxContactSet) -> u32;

    /// Returns the invMassScale of body 0
    ///
    /// A value
    /// <
    /// 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact
    /// treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.
    pub fn PxContactSet_getInvMassScale0(self_: *const PxContactSet) -> f32;

    /// Returns the invMassScale of body 1
    ///
    /// A value
    /// <
    /// 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact
    /// treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.
    pub fn PxContactSet_getInvMassScale1(self_: *const PxContactSet) -> f32;

    /// Returns the invInertiaScale of body 0
    ///
    /// A value
    /// <
    /// 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact
    /// treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.
    pub fn PxContactSet_getInvInertiaScale0(self_: *const PxContactSet) -> f32;

    /// Returns the invInertiaScale of body 1
    ///
    /// A value
    /// <
    /// 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact
    /// treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.
    pub fn PxContactSet_getInvInertiaScale1(self_: *const PxContactSet) -> f32;

    /// Sets the invMassScale of body 0
    ///
    /// This can be set to any value in the range [0, PX_MAX_F32). A value
    /// <
    /// 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact
    /// treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.
    pub fn PxContactSet_setInvMassScale0_mut(self_: *mut PxContactSet, scale: f32);

    /// Sets the invMassScale of body 1
    ///
    /// This can be set to any value in the range [0, PX_MAX_F32). A value
    /// <
    /// 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact
    /// treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.
    pub fn PxContactSet_setInvMassScale1_mut(self_: *mut PxContactSet, scale: f32);

    /// Sets the invInertiaScale of body 0
    ///
    /// This can be set to any value in the range [0, PX_MAX_F32). A value
    /// <
    /// 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact
    /// treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.
    pub fn PxContactSet_setInvInertiaScale0_mut(self_: *mut PxContactSet, scale: f32);

    /// Sets the invInertiaScale of body 1
    ///
    /// This can be set to any value in the range [0, PX_MAX_F32). A value
    /// <
    /// 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact
    /// treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.
    pub fn PxContactSet_setInvInertiaScale1_mut(self_: *mut PxContactSet, scale: f32);

    /// Passes modifiable arrays of contacts to the application.
    ///
    /// The initial contacts are regenerated from scratch each frame by collision detection.
    ///
    /// The number of contacts can not be changed, so you cannot add your own contacts.  You may however
    /// disable contacts using PxContactSet::ignore().
    pub fn PxContactModifyCallback_onContactModify_mut(self_: *mut PxContactModifyCallback, pairs: *mut PxContactModifyPair, count: u32);

    /// Passes modifiable arrays of contacts to the application.
    ///
    /// The initial contacts are regenerated from scratch each frame by collision detection.
    ///
    /// The number of contacts can not be changed, so you cannot add your own contacts.  You may however
    /// disable contacts using PxContactSet::ignore().
    pub fn PxCCDContactModifyCallback_onCCDContactModify_mut(self_: *mut PxCCDContactModifyCallback, pairs: *mut PxContactModifyPair, count: u32);

    /// Notification if an object or its memory gets released
    ///
    /// If release() gets called on a PxBase object, an eUSER_RELEASE event will get fired immediately. The object state can be queried in the callback but
    /// it is not allowed to change the state. Furthermore, when reading from the object it is the user's responsibility to make sure that no other thread
    /// is writing at the same time to the object (this includes the simulation itself, i.e., [`PxScene::fetchResults`]() must not get called at the same time).
    ///
    /// Calling release() on a PxBase object does not necessarily trigger its destructor immediately. For example, the object can be shared and might still
    /// be referenced by other objects or the simulation might still be running and accessing the object state. In such cases the destructor will be called
    /// as soon as it is safe to do so. After the destruction of the object and its memory, an eMEMORY_RELEASE event will get fired. In this case it is not
    /// allowed to dereference the object pointer in the callback.
    pub fn PxDeletionListener_onRelease_mut(self_: *mut PxDeletionListener, observed: *const PxBase, userData: *mut std::ffi::c_void, deletionEvent: PxDeletionEventFlag);

    pub fn PxBaseMaterial_isKindOf(self_: *const PxBaseMaterial, name: *const std::ffi::c_char) -> bool;

    /// Sets young's modulus which defines the body's stiffness
    pub fn PxFEMMaterial_setYoungsModulus_mut(self_: *mut PxFEMMaterial, young: f32);

    /// Retrieves the young's modulus value.
    ///
    /// The young's modulus value.
    pub fn PxFEMMaterial_getYoungsModulus(self_: *const PxFEMMaterial) -> f32;

    /// Sets the Poisson's ratio which defines the body's volume preservation. Completely incompressible materials have a poisson ratio of 0.5. Its value should not be set to exactly 0.5 because this leads to numerical problems.
    pub fn PxFEMMaterial_setPoissons_mut(self_: *mut PxFEMMaterial, poisson: f32);

    /// Retrieves the Poisson's ratio.
    ///
    /// The Poisson's ratio.
    pub fn PxFEMMaterial_getPoissons(self_: *const PxFEMMaterial) -> f32;

    /// Sets the dynamic friction value which defines the strength of resistance when two objects slide relative to each other while in contact.
    pub fn PxFEMMaterial_setDynamicFriction_mut(self_: *mut PxFEMMaterial, dynamicFriction: f32);

    /// Retrieves the dynamic friction value
    ///
    /// The dynamic friction value
    pub fn PxFEMMaterial_getDynamicFriction(self_: *const PxFEMMaterial) -> f32;

    pub fn PxFilterData_new(anon_param0: PxEMPTY) -> PxFilterData;

    /// Default constructor.
    pub fn PxFilterData_new_1() -> PxFilterData;

    /// Constructor to set filter data initially.
    pub fn PxFilterData_new_2(w0: u32, w1: u32, w2: u32, w3: u32) -> PxFilterData;

    /// (re)sets the structure to the default.
    pub fn PxFilterData_setToDefault_mut(self_: *mut PxFilterData);

    /// Extract filter object type from the filter attributes of a collision pair object
    ///
    /// The type of the collision pair object.
    pub fn phys_PxGetFilterObjectType(attr: u32) -> PxFilterObjectType;

    /// Specifies whether the collision object belongs to a kinematic rigid body
    ///
    /// True if the object belongs to a kinematic rigid body, else false
    pub fn phys_PxFilterObjectIsKinematic(attr: u32) -> bool;

    /// Specifies whether the collision object is a trigger shape
    ///
    /// True if the object is a trigger shape, else false
    pub fn phys_PxFilterObjectIsTrigger(attr: u32) -> bool;

    /// Filter method to specify how a pair of potentially colliding objects should be processed.
    ///
    /// This method gets called when the filter flags returned by the filter shader (see [`PxSimulationFilterShader`])
    /// indicate that the filter callback should be invoked ([`PxFilterFlag::eCALLBACK`] or #PxFilterFlag::eNOTIFY set).
    /// Return the PxFilterFlag flags and set the PxPairFlag flags to define what the simulation should do with the given
    /// collision pair.
    ///
    /// Filter flags defining whether the pair should be discarded, temporarily ignored or processed and whether the pair
    /// should be tracked and send a report on pair deletion through the filter callback
    pub fn PxSimulationFilterCallback_pairFound_mut(self_: *mut PxSimulationFilterCallback, pairID: u32, attributes0: u32, filterData0: PxFilterData, a0: *const PxActor, s0: *const PxShape, attributes1: u32, filterData1: PxFilterData, a1: *const PxActor, s1: *const PxShape, pairFlags: *mut PxPairFlags) -> PxFilterFlags;

    /// Callback to inform that a tracked collision pair is gone.
    ///
    /// This method gets called when a collision pair disappears or gets re-filtered. Only applies to
    /// collision pairs which have been marked as filter callback pairs ([`PxFilterFlag::eNOTIFY`] set in #pairFound()).
    pub fn PxSimulationFilterCallback_pairLost_mut(self_: *mut PxSimulationFilterCallback, pairID: u32, attributes0: u32, filterData0: PxFilterData, attributes1: u32, filterData1: PxFilterData, objectRemoved: bool);

    /// Callback to give the opportunity to change the filter state of a tracked collision pair.
    ///
    /// This method gets called once per simulation step to let the application change the filter and pair
    /// flags of a collision pair that has been reported in [`pairFound`]() and requested callbacks by
    /// setting [`PxFilterFlag::eNOTIFY`]. To request a change of filter status, the target pair has to be
    /// specified by its ID, the new filter and pair flags have to be provided and the method should return true.
    ///
    /// If this method changes the filter status of a collision pair and the pair should keep being tracked
    /// by the filter callbacks then [`PxFilterFlag::eNOTIFY`] has to be set.
    ///
    /// The application is responsible to ensure that this method does not get called for pairs that have been
    /// reported as lost, see [`pairLost`]().
    ///
    /// True if the changes should be applied. In this case the method will get called again. False if
    /// no more status changes should be done in the current simulation step. In that case the provided flags will be discarded.
    pub fn PxSimulationFilterCallback_statusChange_mut(self_: *mut PxSimulationFilterCallback, pairID: *mut u32, pairFlags: *mut PxPairFlags, filterFlags: *mut PxFilterFlags) -> bool;

    /// Any combination of PxDataAccessFlag::eREADABLE and PxDataAccessFlag::eWRITABLE
    pub fn PxLockedData_getDataAccessFlags_mut(self_: *mut PxLockedData) -> PxDataAccessFlags;

    /// Unlocks the bulk data.
    pub fn PxLockedData_unlock_mut(self_: *mut PxLockedData);

    /// virtual destructor
    pub fn PxLockedData_delete(self_: *mut PxLockedData);

    /// Sets the coefficient of dynamic friction.
    ///
    /// The coefficient of dynamic friction should be in [0, PX_MAX_F32). If set to greater than staticFriction, the effective value of staticFriction will be increased to match.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake any actors which may be affected.
    pub fn PxMaterial_setDynamicFriction_mut(self_: *mut PxMaterial, coef: f32);

    /// Retrieves the DynamicFriction value.
    ///
    /// The coefficient of dynamic friction.
    pub fn PxMaterial_getDynamicFriction(self_: *const PxMaterial) -> f32;

    /// Sets the coefficient of static friction
    ///
    /// The coefficient of static friction should be in the range [0, PX_MAX_F32)
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake any actors which may be affected.
    pub fn PxMaterial_setStaticFriction_mut(self_: *mut PxMaterial, coef: f32);

    /// Retrieves the coefficient of static friction.
    ///
    /// The coefficient of static friction.
    pub fn PxMaterial_getStaticFriction(self_: *const PxMaterial) -> f32;

    /// Sets the coefficient of restitution
    ///
    /// A coefficient of 0 makes the object bounce as little as possible, higher values up to 1.0 result in more bounce.
    ///
    /// This property is overloaded when PxMaterialFlag::eCOMPLIANT_CONTACT flag is enabled. This permits negative values for restitution to be provided.
    /// The negative values are converted into spring stiffness terms for an implicit spring simulated at the contact site, with the spring positional error defined by
    /// the contact separation value. Higher stiffness terms produce stiffer springs that behave more like a rigid contact.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake any actors which may be affected.
    pub fn PxMaterial_setRestitution_mut(self_: *mut PxMaterial, rest: f32);

    /// Retrieves the coefficient of restitution.
    ///
    /// See [`setRestitution`].
    ///
    /// The coefficient of restitution.
    pub fn PxMaterial_getRestitution(self_: *const PxMaterial) -> f32;

    /// Sets the coefficient of damping
    ///
    /// This property only affects the simulation if PxMaterialFlag::eCOMPLIANT_CONTACT is raised.
    /// Damping works together with spring stiffness (set through a negative restitution value). Spring stiffness corrects positional error while
    /// damping resists relative velocity. Setting a high damping coefficient can produce spongy contacts.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake any actors which may be affected.
    pub fn PxMaterial_setDamping_mut(self_: *mut PxMaterial, damping: f32);

    /// Retrieves the coefficient of damping.
    ///
    /// See [`setDamping`].
    ///
    /// The coefficient of damping.
    pub fn PxMaterial_getDamping(self_: *const PxMaterial) -> f32;

    /// Raises or clears a particular material flag.
    ///
    /// See the list of flags [`PxMaterialFlag`]
    ///
    /// Default:
    /// eIMPROVED_PATCH_FRICTION
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake any actors which may be affected.
    pub fn PxMaterial_setFlag_mut(self_: *mut PxMaterial, flag: PxMaterialFlag, b: bool);

    /// sets all the material flags.
    ///
    /// See the list of flags [`PxMaterialFlag`]
    ///
    /// Default:
    /// eIMPROVED_PATCH_FRICTION
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake any actors which may be affected.
    pub fn PxMaterial_setFlags_mut(self_: *mut PxMaterial, flags: PxMaterialFlags);

    /// Retrieves the flags. See [`PxMaterialFlag`].
    ///
    /// The material flags.
    pub fn PxMaterial_getFlags(self_: *const PxMaterial) -> PxMaterialFlags;

    /// Sets the friction combine mode.
    ///
    /// See the enum ::PxCombineMode .
    ///
    /// Default:
    /// PxCombineMode::eAVERAGE
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake any actors which may be affected.
    pub fn PxMaterial_setFrictionCombineMode_mut(self_: *mut PxMaterial, combMode: PxCombineMode);

    /// Retrieves the friction combine mode.
    ///
    /// See [`setFrictionCombineMode`].
    ///
    /// The friction combine mode for this material.
    pub fn PxMaterial_getFrictionCombineMode(self_: *const PxMaterial) -> PxCombineMode;

    /// Sets the restitution combine mode.
    ///
    /// See the enum ::PxCombineMode .
    ///
    /// Default:
    /// PxCombineMode::eAVERAGE
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake any actors which may be affected.
    pub fn PxMaterial_setRestitutionCombineMode_mut(self_: *mut PxMaterial, combMode: PxCombineMode);

    /// Retrieves the restitution combine mode.
    ///
    /// See [`setRestitutionCombineMode`].
    ///
    /// The coefficient of restitution combine mode for this material.
    pub fn PxMaterial_getRestitutionCombineMode(self_: *const PxMaterial) -> PxCombineMode;

    pub fn PxMaterial_getConcreteTypeName(self_: *const PxMaterial) -> *const std::ffi::c_char;

    /// Construct parameters with default values.
    pub fn PxDiffuseParticleParams_new() -> PxDiffuseParticleParams;

    /// (re)sets the structure to the default.
    pub fn PxDiffuseParticleParams_setToDefault_mut(self_: *mut PxDiffuseParticleParams);

    /// Sets friction
    pub fn PxParticleMaterial_setFriction_mut(self_: *mut PxParticleMaterial, friction: f32);

    /// Retrieves the friction value.
    ///
    /// The friction value.
    pub fn PxParticleMaterial_getFriction(self_: *const PxParticleMaterial) -> f32;

    /// Sets velocity damping term
    pub fn PxParticleMaterial_setDamping_mut(self_: *mut PxParticleMaterial, damping: f32);

    /// Retrieves the velocity damping term
    ///
    /// The velocity damping term.
    pub fn PxParticleMaterial_getDamping(self_: *const PxParticleMaterial) -> f32;

    /// Sets adhesion term
    pub fn PxParticleMaterial_setAdhesion_mut(self_: *mut PxParticleMaterial, adhesion: f32);

    /// Retrieves the adhesion term
    ///
    /// The adhesion term.
    pub fn PxParticleMaterial_getAdhesion(self_: *const PxParticleMaterial) -> f32;

    /// Sets gravity scale term
    pub fn PxParticleMaterial_setGravityScale_mut(self_: *mut PxParticleMaterial, scale: f32);

    /// Retrieves the gravity scale term
    ///
    /// The gravity scale term.
    pub fn PxParticleMaterial_getGravityScale(self_: *const PxParticleMaterial) -> f32;

    /// Sets material adhesion radius scale. This is multiplied by the particle rest offset to compute the fall-off distance
    /// at which point adhesion ceases to operate.
    pub fn PxParticleMaterial_setAdhesionRadiusScale_mut(self_: *mut PxParticleMaterial, scale: f32);

    /// Retrieves the adhesion radius scale.
    ///
    /// The adhesion radius scale.
    pub fn PxParticleMaterial_getAdhesionRadiusScale(self_: *const PxParticleMaterial) -> f32;

    /// Destroys the instance it is called on.
    ///
    /// Use this release method to destroy an instance of this class. Be sure
    /// to not keep a reference to this object after calling release.
    /// Avoid release calls while a scene is simulating (in between simulate() and fetchResults() calls).
    ///
    /// Note that this must be called once for each prior call to PxCreatePhysics, as
    /// there is a reference counter. Also note that you mustn't destroy the PxFoundation instance (holding the allocator, error callback etc.)
    /// until after the reference count reaches 0 and the SDK is actually removed.
    ///
    /// Releasing an SDK will also release any objects created through it (scenes, triangle meshes, convex meshes, heightfields, shapes etc.),
    /// provided the user hasn't already done so.
    ///
    /// Releasing the PxPhysics instance is a prerequisite to releasing the PxFoundation instance.
    pub fn PxPhysics_release_mut(self_: *mut PxPhysics);

    /// Retrieves the Foundation instance.
    ///
    /// A reference to the Foundation object.
    pub fn PxPhysics_getFoundation_mut(self_: *mut PxPhysics) -> *mut PxFoundation;

    /// Creates an aggregate with the specified maximum size and filtering hint.
    ///
    /// The previous API used "bool enableSelfCollision" which should now silently evaluates
    /// to a PxAggregateType::eGENERIC aggregate with its self-collision bit.
    ///
    /// Use PxAggregateType::eSTATIC or PxAggregateType::eKINEMATIC for aggregates that will
    /// only contain static or kinematic actors. This provides faster filtering when used in
    /// combination with PxPairFilteringMode.
    ///
    /// The new aggregate.
    pub fn PxPhysics_createAggregate_mut(self_: *mut PxPhysics, maxActor: u32, maxShape: u32, filterHint: u32) -> *mut PxAggregate;

    /// Returns the simulation tolerance parameters.
    ///
    /// The current simulation tolerance parameters.
    pub fn PxPhysics_getTolerancesScale(self_: *const PxPhysics) -> *const PxTolerancesScale;

    /// Creates a triangle mesh object.
    ///
    /// This can then be instanced into [`PxShape`] objects.
    ///
    /// The new triangle mesh.
    pub fn PxPhysics_createTriangleMesh_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxTriangleMesh;

    /// Return the number of triangle meshes that currently exist.
    ///
    /// Number of triangle meshes.
    pub fn PxPhysics_getNbTriangleMeshes(self_: *const PxPhysics) -> u32;

    /// Writes the array of triangle mesh pointers to a user buffer.
    ///
    /// Returns the number of pointers written.
    ///
    /// The ordering of the triangle meshes in the array is not specified.
    ///
    /// The number of triangle mesh pointers written to userBuffer, this should be less or equal to bufferSize.
    pub fn PxPhysics_getTriangleMeshes(self_: *const PxPhysics, userBuffer: *mut *mut PxTriangleMesh, bufferSize: u32, startIndex: u32) -> u32;

    /// Creates a tetrahedron mesh object.
    ///
    /// This can then be instanced into [`PxShape`] objects.
    ///
    /// The new tetrahedron mesh.
    pub fn PxPhysics_createTetrahedronMesh_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxTetrahedronMesh;

    /// Creates a softbody mesh object.
    ///
    /// The new softbody mesh.
    pub fn PxPhysics_createSoftBodyMesh_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxSoftBodyMesh;

    /// Return the number of tetrahedron meshes that currently exist.
    ///
    /// Number of tetrahedron meshes.
    pub fn PxPhysics_getNbTetrahedronMeshes(self_: *const PxPhysics) -> u32;

    /// Writes the array of tetrahedron mesh pointers to a user buffer.
    ///
    /// Returns the number of pointers written.
    ///
    /// The ordering of the tetrahedron meshes in the array is not specified.
    ///
    /// The number of tetrahedron mesh pointers written to userBuffer, this should be less or equal to bufferSize.
    pub fn PxPhysics_getTetrahedronMeshes(self_: *const PxPhysics, userBuffer: *mut *mut PxTetrahedronMesh, bufferSize: u32, startIndex: u32) -> u32;

    /// Creates a heightfield object from previously cooked stream.
    ///
    /// This can then be instanced into [`PxShape`] objects.
    ///
    /// The new heightfield.
    pub fn PxPhysics_createHeightField_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxHeightField;

    /// Return the number of heightfields that currently exist.
    ///
    /// Number of heightfields.
    pub fn PxPhysics_getNbHeightFields(self_: *const PxPhysics) -> u32;

    /// Writes the array of heightfield pointers to a user buffer.
    ///
    /// Returns the number of pointers written.
    ///
    /// The ordering of the heightfields in the array is not specified.
    ///
    /// The number of heightfield pointers written to userBuffer, this should be less or equal to bufferSize.
    pub fn PxPhysics_getHeightFields(self_: *const PxPhysics, userBuffer: *mut *mut PxHeightField, bufferSize: u32, startIndex: u32) -> u32;

    /// Creates a convex mesh object.
    ///
    /// This can then be instanced into [`PxShape`] objects.
    ///
    /// The new convex mesh.
    pub fn PxPhysics_createConvexMesh_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxConvexMesh;

    /// Return the number of convex meshes that currently exist.
    ///
    /// Number of convex meshes.
    pub fn PxPhysics_getNbConvexMeshes(self_: *const PxPhysics) -> u32;

    /// Writes the array of convex mesh pointers to a user buffer.
    ///
    /// Returns the number of pointers written.
    ///
    /// The ordering of the convex meshes in the array is not specified.
    ///
    /// The number of convex mesh pointers written to userBuffer, this should be less or equal to bufferSize.
    pub fn PxPhysics_getConvexMeshes(self_: *const PxPhysics, userBuffer: *mut *mut PxConvexMesh, bufferSize: u32, startIndex: u32) -> u32;

    /// Creates a bounding volume hierarchy.
    ///
    /// The new BVH.
    pub fn PxPhysics_createBVH_mut(self_: *mut PxPhysics, stream: *mut PxInputStream) -> *mut PxBVH;

    /// Return the number of bounding volume hierarchies that currently exist.
    ///
    /// Number of bounding volume hierarchies.
    pub fn PxPhysics_getNbBVHs(self_: *const PxPhysics) -> u32;

    /// Writes the array of bounding volume hierarchy pointers to a user buffer.
    ///
    /// Returns the number of pointers written.
    ///
    /// The ordering of the BVHs in the array is not specified.
    ///
    /// The number of BVH pointers written to userBuffer, this should be less or equal to bufferSize.
    pub fn PxPhysics_getBVHs(self_: *const PxPhysics, userBuffer: *mut *mut PxBVH, bufferSize: u32, startIndex: u32) -> u32;

    /// Creates a scene.
    ///
    /// Every scene uses a Thread Local Storage slot. This imposes a platform specific limit on the
    /// number of scenes that can be created.
    ///
    /// The new scene object.
    pub fn PxPhysics_createScene_mut(self_: *mut PxPhysics, sceneDesc: *const PxSceneDesc) -> *mut PxScene;

    /// Gets number of created scenes.
    ///
    /// The number of scenes created.
    pub fn PxPhysics_getNbScenes(self_: *const PxPhysics) -> u32;

    /// Writes the array of scene pointers to a user buffer.
    ///
    /// Returns the number of pointers written.
    ///
    /// The ordering of the scene pointers in the array is not specified.
    ///
    /// The number of scene pointers written to userBuffer, this should be less or equal to bufferSize.
    pub fn PxPhysics_getScenes(self_: *const PxPhysics, userBuffer: *mut *mut PxScene, bufferSize: u32, startIndex: u32) -> u32;

    /// Creates a static rigid actor with the specified pose and all other fields initialized
    /// to their default values.
    pub fn PxPhysics_createRigidStatic_mut(self_: *mut PxPhysics, pose: *const PxTransform) -> *mut PxRigidStatic;

    /// Creates a dynamic rigid actor with the specified pose and all other fields initialized
    /// to their default values.
    pub fn PxPhysics_createRigidDynamic_mut(self_: *mut PxPhysics, pose: *const PxTransform) -> *mut PxRigidDynamic;

    /// Creates a pruning structure from actors.
    ///
    /// Every provided actor needs at least one shape with the eSCENE_QUERY_SHAPE flag set.
    ///
    /// Both static and dynamic actors can be provided.
    ///
    /// It is not allowed to pass in actors which are already part of a scene.
    ///
    /// Articulation links cannot be provided.
    ///
    /// Pruning structure created from given actors, or NULL if any of the actors did not comply with the above requirements.
    pub fn PxPhysics_createPruningStructure_mut(self_: *mut PxPhysics, actors: *const *mut PxRigidActor, nbActors: u32) -> *mut PxPruningStructure;

    /// Creates a shape which may be attached to multiple actors
    ///
    /// The shape will be created with a reference count of 1.
    ///
    /// The shape
    ///
    /// Shared shapes are not mutable when they are attached to an actor
    pub fn PxPhysics_createShape_mut(self_: *mut PxPhysics, geometry: *const PxGeometry, material: *const PxMaterial, isExclusive: bool, shapeFlags: PxShapeFlags) -> *mut PxShape;

    /// Creates a shape which may be attached to multiple actors
    ///
    /// The shape will be created with a reference count of 1.
    ///
    /// The shape
    ///
    /// Shared shapes are not mutable when they are attached to an actor
    ///
    /// Shapes created from *SDF* triangle-mesh geometries do not support more than one material.
    pub fn PxPhysics_createShape_mut_1(self_: *mut PxPhysics, geometry: *const PxGeometry, materials: *const *mut PxMaterial, materialCount: u16, isExclusive: bool, shapeFlags: PxShapeFlags) -> *mut PxShape;

    /// Return the number of shapes that currently exist.
    ///
    /// Number of shapes.
    pub fn PxPhysics_getNbShapes(self_: *const PxPhysics) -> u32;

    /// Writes the array of shape pointers to a user buffer.
    ///
    /// Returns the number of pointers written.
    ///
    /// The ordering of the shapes in the array is not specified.
    ///
    /// The number of shape pointers written to userBuffer, this should be less or equal to bufferSize.
    pub fn PxPhysics_getShapes(self_: *const PxPhysics, userBuffer: *mut *mut PxShape, bufferSize: u32, startIndex: u32) -> u32;

    /// Creates a constraint shader.
    ///
    /// A constraint shader will get added automatically to the scene the two linked actors belong to. Either, but not both, of actor0 and actor1 may
    /// be NULL to denote attachment to the world.
    ///
    /// The new constraint shader.
    pub fn PxPhysics_createConstraint_mut(self_: *mut PxPhysics, actor0: *mut PxRigidActor, actor1: *mut PxRigidActor, connector: *mut PxConstraintConnector, shaders: *const PxConstraintShaderTable, dataSize: u32) -> *mut PxConstraint;

    /// Creates a reduced-coordinate articulation with all fields initialized to their default values.
    ///
    /// the new articulation
    pub fn PxPhysics_createArticulationReducedCoordinate_mut(self_: *mut PxPhysics) -> *mut PxArticulationReducedCoordinate;

    /// Creates a new rigid body material with certain default properties.
    ///
    /// The new rigid body material.
    pub fn PxPhysics_createMaterial_mut(self_: *mut PxPhysics, staticFriction: f32, dynamicFriction: f32, restitution: f32) -> *mut PxMaterial;

    /// Return the number of rigid body materials that currently exist.
    ///
    /// Number of rigid body materials.
    pub fn PxPhysics_getNbMaterials(self_: *const PxPhysics) -> u32;

    /// Writes the array of rigid body material pointers to a user buffer.
    ///
    /// Returns the number of pointers written.
    ///
    /// The ordering of the materials in the array is not specified.
    ///
    /// The number of material pointers written to userBuffer, this should be less or equal to bufferSize.
    pub fn PxPhysics_getMaterials(self_: *const PxPhysics, userBuffer: *mut *mut PxMaterial, bufferSize: u32, startIndex: u32) -> u32;

    /// Register a deletion listener. Listeners will be called whenever an object is deleted.
    ///
    /// It is illegal to register or unregister a deletion listener while deletions are being processed.
    ///
    /// By default a registered listener will receive events from all objects. Set the restrictedObjectSet parameter to true on registration and use [`registerDeletionListenerObjects`] to restrict the received events to specific objects.
    ///
    /// The deletion events are only supported on core PhysX objects. In general, objects in extension modules do not provide this functionality, however, in the case of PxJoint objects, the underlying PxConstraint will send the events.
    pub fn PxPhysics_registerDeletionListener_mut(self_: *mut PxPhysics, observer: *mut PxDeletionListener, deletionEvents: *const PxDeletionEventFlags, restrictedObjectSet: bool);

    /// Unregister a deletion listener.
    ///
    /// It is illegal to register or unregister a deletion listener while deletions are being processed.
    pub fn PxPhysics_unregisterDeletionListener_mut(self_: *mut PxPhysics, observer: *mut PxDeletionListener);

    /// Register specific objects for deletion events.
    ///
    /// This method allows for a deletion listener to limit deletion events to specific objects only.
    ///
    /// It is illegal to register or unregister objects while deletions are being processed.
    ///
    /// The deletion listener has to be registered through [`registerDeletionListener`]() and configured to support restricted object sets prior to this method being used.
    pub fn PxPhysics_registerDeletionListenerObjects_mut(self_: *mut PxPhysics, observer: *mut PxDeletionListener, observables: *const *const PxBase, observableCount: u32);

    /// Unregister specific objects for deletion events.
    ///
    /// This method allows to clear previously registered objects for a deletion listener (see [`registerDeletionListenerObjects`]()).
    ///
    /// It is illegal to register or unregister objects while deletions are being processed.
    ///
    /// The deletion listener has to be registered through [`registerDeletionListener`]() and configured to support restricted object sets prior to this method being used.
    pub fn PxPhysics_unregisterDeletionListenerObjects_mut(self_: *mut PxPhysics, observer: *mut PxDeletionListener, observables: *const *const PxBase, observableCount: u32);

    /// Gets PxPhysics object insertion interface.
    ///
    /// The insertion interface is needed for PxCreateTriangleMesh, PxCooking::createTriangleMesh etc., this allows runtime mesh creation.
    pub fn PxPhysics_getPhysicsInsertionCallback_mut(self_: *mut PxPhysics) -> *mut PxInsertionCallback;

    /// Creates an instance of the physics SDK.
    ///
    /// Creates an instance of this class. May not be a class member to avoid name mangling.
    /// Pass the constant [`PX_PHYSICS_VERSION`] as the argument.
    /// There may be only one instance of this class per process. Calling this method after an instance
    /// has been created already will result in an error message and NULL will be returned.
    ///
    /// Calling this will register all optional code modules (Articulations and HeightFields), preparing them for use.
    /// If you do not need some of these modules, consider calling PxCreateBasePhysics() instead and registering needed
    /// modules manually.
    ///
    /// PxPhysics instance on success, NULL if operation failed
    pub fn phys_PxCreatePhysics(version: u32, foundation: *mut PxFoundation, scale: *const PxTolerancesScale, trackOutstandingAllocations: bool, pvd: *mut PxPvd, omniPvd: *mut PxOmniPvd) -> *mut PxPhysics;

    pub fn phys_PxGetPhysics() -> *mut PxPhysics;

    pub fn PxActorShape_new() -> PxActorShape;

    pub fn PxActorShape_new_1(a: *mut PxRigidActor, s: *mut PxShape) -> PxActorShape;

    /// constructor sets to default
    pub fn PxQueryCache_new() -> PxQueryCache;

    /// constructor to set properties
    pub fn PxQueryCache_new_1(s: *mut PxShape, findex: u32) -> PxQueryCache;

    /// default constructor
    pub fn PxQueryFilterData_new() -> PxQueryFilterData;

    /// constructor to set both filter data and filter flags
    pub fn PxQueryFilterData_new_1(fd: *const PxFilterData, f: PxQueryFlags) -> PxQueryFilterData;

    /// constructor to set filter flags only
    pub fn PxQueryFilterData_new_2(f: PxQueryFlags) -> PxQueryFilterData;

    /// This filter callback is executed before the exact intersection test if PxQueryFlag::ePREFILTER flag was set.
    ///
    /// the updated type for this hit  (see [`PxQueryHitType`])
    pub fn PxQueryFilterCallback_preFilter_mut(self_: *mut PxQueryFilterCallback, filterData: *const PxFilterData, shape: *const PxShape, actor: *const PxRigidActor, queryFlags: *mut PxHitFlags) -> PxQueryHitType;

    /// This filter callback is executed if the exact intersection test returned true and PxQueryFlag::ePOSTFILTER flag was set.
    ///
    /// the updated hit type for this hit  (see [`PxQueryHitType`])
    pub fn PxQueryFilterCallback_postFilter_mut(self_: *mut PxQueryFilterCallback, filterData: *const PxFilterData, hit: *const PxQueryHit, shape: *const PxShape, actor: *const PxRigidActor) -> PxQueryHitType;

    /// virtual destructor
    pub fn PxQueryFilterCallback_delete(self_: *mut PxQueryFilterCallback);

    /// Moves kinematically controlled dynamic actors through the game world.
    ///
    /// You set a dynamic actor to be kinematic using the PxRigidBodyFlag::eKINEMATIC flag
    /// with setRigidBodyFlag().
    ///
    /// The move command will result in a velocity that will move the body into
    /// the desired pose. After the move is carried out during a single time step,
    /// the velocity is returned to zero. Thus, you must continuously call
    /// this in every time step for kinematic actors so that they move along a path.
    ///
    /// This function simply stores the move destination until the next simulation
    /// step is processed, so consecutive calls will simply overwrite the stored target variable.
    ///
    /// The motion is always fully carried out.
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
    ///
    /// Sleeping:
    /// This call wakes the actor if it is sleeping and will set the wake counter to [`PxSceneDesc::wakeCounterResetValue`].
    pub fn PxRigidDynamic_setKinematicTarget_mut(self_: *mut PxRigidDynamic, destination: *const PxTransform);

    /// Get target pose of a kinematically controlled dynamic actor.
    ///
    /// True if the actor is a kinematically controlled dynamic and the target has been set, else False.
    pub fn PxRigidDynamic_getKinematicTarget(self_: *const PxRigidDynamic, target: *mut PxTransform) -> bool;

    /// Returns true if this body is sleeping.
    ///
    /// When an actor does not move for a period of time, it is no longer simulated in order to save time. This state
    /// is called sleeping. However, because the object automatically wakes up when it is either touched by an awake object,
    /// or one of its properties is changed by the user, the entire sleep mechanism should be transparent to the user.
    ///
    /// In general, a dynamic rigid actor is guaranteed to be awake if at least one of the following holds:
    ///
    /// The wake counter is positive (see [`setWakeCounter`]()).
    ///
    /// The linear or angular velocity is non-zero.
    ///
    /// A non-zero force or torque has been applied.
    ///
    /// If a dynamic rigid actor is sleeping, the following state is guaranteed:
    ///
    /// The wake counter is zero.
    ///
    /// The linear and angular velocity is zero.
    ///
    /// There is no force update pending.
    ///
    /// When an actor gets inserted into a scene, it will be considered asleep if all the points above hold, else it will be treated as awake.
    ///
    /// If an actor is asleep after the call to PxScene::fetchResults() returns, it is guaranteed that the pose of the actor
    /// was not changed. You can use this information to avoid updating the transforms of associated objects.
    ///
    /// A kinematic actor is asleep unless a target pose has been set (in which case it will stay awake until two consecutive
    /// simulation steps without a target pose being set have passed). The wake counter will get set to zero or to the reset value
    /// [`PxSceneDesc::wakeCounterResetValue`] in the case where a target pose has been set to be consistent with the definitions above.
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already.
    ///
    /// It is not allowed to use this method while the simulation is running.
    ///
    /// True if the actor is sleeping.
    pub fn PxRigidDynamic_isSleeping(self_: *const PxRigidDynamic) -> bool;

    /// Sets the mass-normalized kinetic energy threshold below which an actor may go to sleep.
    ///
    /// Actors whose kinetic energy divided by their mass is below this threshold will be candidates for sleeping.
    ///
    /// Default:
    /// 5e-5f * PxTolerancesScale::speed * PxTolerancesScale::speed
    pub fn PxRigidDynamic_setSleepThreshold_mut(self_: *mut PxRigidDynamic, threshold: f32);

    /// Returns the mass-normalized kinetic energy below which an actor may go to sleep.
    ///
    /// The energy threshold for sleeping.
    pub fn PxRigidDynamic_getSleepThreshold(self_: *const PxRigidDynamic) -> f32;

    /// Sets the mass-normalized kinetic energy threshold below which an actor may participate in stabilization.
    ///
    /// Actors whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
    ///
    /// This value has no effect if PxSceneFlag::eENABLE_STABILIZATION was not enabled on the PxSceneDesc.
    ///
    /// Default:
    /// 1e-5f * PxTolerancesScale::speed * PxTolerancesScale::speed
    pub fn PxRigidDynamic_setStabilizationThreshold_mut(self_: *mut PxRigidDynamic, threshold: f32);

    /// Returns the mass-normalized kinetic energy below which an actor may participate in stabilization.
    ///
    /// Actors whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
    ///
    /// The energy threshold for participating in stabilization.
    pub fn PxRigidDynamic_getStabilizationThreshold(self_: *const PxRigidDynamic) -> f32;

    /// Reads the PxRigidDynamic lock flags.
    ///
    /// See the list of flags [`PxRigidDynamicLockFlag`]
    ///
    /// The values of the PxRigidDynamicLock flags.
    pub fn PxRigidDynamic_getRigidDynamicLockFlags(self_: *const PxRigidDynamic) -> PxRigidDynamicLockFlags;

    /// Raises or clears a particular rigid dynamic lock flag.
    ///
    /// See the list of flags [`PxRigidDynamicLockFlag`]
    ///
    /// Default:
    /// no flags are set
    pub fn PxRigidDynamic_setRigidDynamicLockFlag_mut(self_: *mut PxRigidDynamic, flag: PxRigidDynamicLockFlag, value: bool);

    pub fn PxRigidDynamic_setRigidDynamicLockFlags_mut(self_: *mut PxRigidDynamic, flags: PxRigidDynamicLockFlags);

    /// Retrieves the linear velocity of an actor.
    ///
    /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
    /// in PxContactModifyCallback or in contact report callbacks).
    ///
    /// The linear velocity of the actor.
    pub fn PxRigidDynamic_getLinearVelocity(self_: *const PxRigidDynamic) -> PxVec3;

    /// Sets the linear velocity of the actor.
    ///
    /// Note that if you continuously set the velocity of an actor yourself,
    /// forces such as gravity or friction will not be able to manifest themselves, because forces directly
    /// influence only the velocity/momentum of an actor.
    ///
    /// Default:
    /// (0.0, 0.0, 0.0)
    ///
    /// Sleeping:
    /// This call wakes the actor if it is sleeping, and the autowake parameter is true (default) or the
    /// new velocity is non-zero.
    ///
    /// It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
    pub fn PxRigidDynamic_setLinearVelocity_mut(self_: *mut PxRigidDynamic, linVel: *const PxVec3, autowake: bool);

    /// Retrieves the angular velocity of the actor.
    ///
    /// It is not allowed to use this method while the simulation is running (except during PxScene::collide(),
    /// in PxContactModifyCallback or in contact report callbacks).
    ///
    /// The angular velocity of the actor.
    pub fn PxRigidDynamic_getAngularVelocity(self_: *const PxRigidDynamic) -> PxVec3;

    /// Sets the angular velocity of the actor.
    ///
    /// Note that if you continuously set the angular velocity of an actor yourself,
    /// forces such as friction will not be able to rotate the actor, because forces directly influence only the velocity/momentum.
    ///
    /// Default:
    /// (0.0, 0.0, 0.0)
    ///
    /// Sleeping:
    /// This call wakes the actor if it is sleeping, and the autowake parameter is true (default) or the
    /// new velocity is non-zero.
    ///
    /// It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
    pub fn PxRigidDynamic_setAngularVelocity_mut(self_: *mut PxRigidDynamic, angVel: *const PxVec3, autowake: bool);

    /// Sets the wake counter for the actor.
    ///
    /// The wake counter value determines the minimum amount of time until the body can be put to sleep. Please note
    /// that a body will not be put to sleep if the energy is above the specified threshold (see [`setSleepThreshold`]())
    /// or if other awake bodies are touching it.
    ///
    /// Passing in a positive value will wake the actor up automatically.
    ///
    /// It is invalid to use this method for kinematic actors since the wake counter for kinematics is defined
    /// based on whether a target pose has been set (see the comment in [`isSleeping`]()).
    ///
    /// It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
    ///
    /// Default:
    /// 0.4 (which corresponds to 20 frames for a time step of 0.02)
    pub fn PxRigidDynamic_setWakeCounter_mut(self_: *mut PxRigidDynamic, wakeCounterValue: f32);

    /// Returns the wake counter of the actor.
    ///
    /// It is not allowed to use this method while the simulation is running.
    ///
    /// The wake counter of the actor.
    pub fn PxRigidDynamic_getWakeCounter(self_: *const PxRigidDynamic) -> f32;

    /// Wakes up the actor if it is sleeping.
    ///
    /// The actor will get woken up and might cause other touching actors to wake up as well during the next simulation step.
    ///
    /// This will set the wake counter of the actor to the value specified in [`PxSceneDesc::wakeCounterResetValue`].
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
    ///
    /// It is invalid to use this method for kinematic actors since the sleep state for kinematics is defined
    /// based on whether a target pose has been set (see the comment in [`isSleeping`]()).
    pub fn PxRigidDynamic_wakeUp_mut(self_: *mut PxRigidDynamic);

    /// Forces the actor to sleep.
    ///
    /// The actor will stay asleep during the next simulation step if not touched by another non-sleeping actor.
    ///
    /// Any applied force will be cleared and the velocity and the wake counter of the actor will be set to 0.
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
    ///
    /// It is invalid to use this method for kinematic actors since the sleep state for kinematics is defined
    /// based on whether a target pose has been set (see the comment in [`isSleeping`]()).
    pub fn PxRigidDynamic_putToSleep_mut(self_: *mut PxRigidDynamic);

    /// Sets the solver iteration counts for the body.
    ///
    /// The solver iteration count determines how accurately joints and contacts are resolved.
    /// If you are having trouble with jointed bodies oscillating and behaving erratically, then
    /// setting a higher position iteration count may improve their stability.
    ///
    /// If intersecting bodies are being depenetrated too violently, increase the number of velocity
    /// iterations. More velocity iterations will drive the relative exit velocity of the intersecting
    /// objects closer to the correct value given the restitution.
    ///
    /// Default:
    /// 4 position iterations, 1 velocity iteration
    pub fn PxRigidDynamic_setSolverIterationCounts_mut(self_: *mut PxRigidDynamic, minPositionIters: u32, minVelocityIters: u32);

    /// Retrieves the solver iteration counts.
    pub fn PxRigidDynamic_getSolverIterationCounts(self_: *const PxRigidDynamic, minPositionIters: *mut u32, minVelocityIters: *mut u32);

    /// Retrieves the force threshold for contact reports.
    ///
    /// The contact report threshold is a force threshold. If the force between
    /// two actors exceeds this threshold for either of the two actors, a contact report
    /// will be generated according to the contact report threshold flags provided by
    /// the filter shader/callback.
    /// See [`PxPairFlag`].
    ///
    /// The threshold used for a collision between a dynamic actor and the static environment is
    /// the threshold of the dynamic actor, and all contacts with static actors are summed to find
    /// the total normal force.
    ///
    /// Default:
    /// PX_MAX_F32
    ///
    /// Force threshold for contact reports.
    pub fn PxRigidDynamic_getContactReportThreshold(self_: *const PxRigidDynamic) -> f32;

    /// Sets the force threshold for contact reports.
    ///
    /// See [`getContactReportThreshold`]().
    pub fn PxRigidDynamic_setContactReportThreshold_mut(self_: *mut PxRigidDynamic, threshold: f32);

    pub fn PxRigidDynamic_getConcreteTypeName(self_: *const PxRigidDynamic) -> *const std::ffi::c_char;

    pub fn PxRigidStatic_getConcreteTypeName(self_: *const PxRigidStatic) -> *const std::ffi::c_char;

    /// constructor sets to default.
    pub fn PxSceneQueryDesc_new() -> PxSceneQueryDesc;

    /// (re)sets the structure to the default.
    pub fn PxSceneQueryDesc_setToDefault_mut(self_: *mut PxSceneQueryDesc);

    /// Returns true if the descriptor is valid.
    ///
    /// true if the current settings are valid.
    pub fn PxSceneQueryDesc_isValid(self_: *const PxSceneQueryDesc) -> bool;

    /// Sets the rebuild rate of the dynamic tree pruning structures.
    pub fn PxSceneQuerySystemBase_setDynamicTreeRebuildRateHint_mut(self_: *mut PxSceneQuerySystemBase, dynamicTreeRebuildRateHint: u32);

    /// Retrieves the rebuild rate of the dynamic tree pruning structures.
    ///
    /// The rebuild rate of the dynamic tree pruning structures.
    pub fn PxSceneQuerySystemBase_getDynamicTreeRebuildRateHint(self_: *const PxSceneQuerySystemBase) -> u32;

    /// Forces dynamic trees to be immediately rebuilt.
    ///
    /// PxScene will call this function with the PX_SCENE_PRUNER_STATIC or PX_SCENE_PRUNER_DYNAMIC value.
    pub fn PxSceneQuerySystemBase_forceRebuildDynamicTree_mut(self_: *mut PxSceneQuerySystemBase, prunerIndex: u32);

    /// Sets scene query update mode
    pub fn PxSceneQuerySystemBase_setUpdateMode_mut(self_: *mut PxSceneQuerySystemBase, updateMode: PxSceneQueryUpdateMode);

    /// Gets scene query update mode
    ///
    /// Current scene query update mode.
    pub fn PxSceneQuerySystemBase_getUpdateMode(self_: *const PxSceneQuerySystemBase) -> PxSceneQueryUpdateMode;

    /// Retrieves the system's internal scene query timestamp, increased each time a change to the
    /// static scene query structure is performed.
    ///
    /// scene query static timestamp
    pub fn PxSceneQuerySystemBase_getStaticTimestamp(self_: *const PxSceneQuerySystemBase) -> u32;

    /// Flushes any changes to the scene query representation.
    ///
    /// This method updates the state of the scene query representation to match changes in the scene state.
    ///
    /// By default, these changes are buffered until the next query is submitted. Calling this function will not change
    /// the results from scene queries, but can be used to ensure that a query will not perform update work in the course of
    /// its execution.
    ///
    /// A thread performing updates will hold a write lock on the query structure, and thus stall other querying threads. In multithread
    /// scenarios it can be useful to explicitly schedule the period where this lock may be held for a significant period, so that
    /// subsequent queries issued from multiple threads will not block.
    pub fn PxSceneQuerySystemBase_flushUpdates_mut(self_: *mut PxSceneQuerySystemBase);

    /// Performs a raycast against objects in the scene, returns results in a PxRaycastBuffer object
    /// or via a custom user callback implementation inheriting from PxRaycastCallback.
    ///
    /// Touching hits are not ordered.
    ///
    /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in user guide article SceneQuery. User can ignore such objects by employing one of the provided filter mechanisms.
    ///
    /// True if any touching or blocking hits were found or any hit was found in case PxQueryFlag::eANY_HIT was specified.
    pub fn PxSceneQuerySystemBase_raycast(self_: *const PxSceneQuerySystemBase, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, hitCall: *mut PxRaycastCallback, hitFlags: PxHitFlags, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, queryFlags: PxGeometryQueryFlags) -> bool;

    /// Performs a sweep test against objects in the scene, returns results in a PxSweepBuffer object
    /// or via a custom user callback implementation inheriting from PxSweepCallback.
    ///
    /// Touching hits are not ordered.
    ///
    /// If a shape from the scene is already overlapping with the query shape in its starting position,
    /// the hit is returned unless eASSUME_NO_INITIAL_OVERLAP was specified.
    ///
    /// True if any touching or blocking hits were found or any hit was found in case PxQueryFlag::eANY_HIT was specified.
    pub fn PxSceneQuerySystemBase_sweep(self_: *const PxSceneQuerySystemBase, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, hitCall: *mut PxSweepCallback, hitFlags: PxHitFlags, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32, queryFlags: PxGeometryQueryFlags) -> bool;

    /// Performs an overlap test of a given geometry against objects in the scene, returns results in a PxOverlapBuffer object
    /// or via a custom user callback implementation inheriting from PxOverlapCallback.
    ///
    /// Filtering: returning eBLOCK from user filter for overlap queries will cause a warning (see [`PxQueryHitType`]).
    ///
    /// True if any touching or blocking hits were found or any hit was found in case PxQueryFlag::eANY_HIT was specified.
    ///
    /// eBLOCK should not be returned from user filters for overlap(). Doing so will result in undefined behavior, and a warning will be issued.
    ///
    /// If the PxQueryFlag::eNO_BLOCK flag is set, the eBLOCK will instead be automatically converted to an eTOUCH and the warning suppressed.
    pub fn PxSceneQuerySystemBase_overlap(self_: *const PxSceneQuerySystemBase, geometry: *const PxGeometry, pose: *const PxTransform, hitCall: *mut PxOverlapCallback, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, queryFlags: PxGeometryQueryFlags) -> bool;

    /// Sets scene query update mode
    pub fn PxSceneSQSystem_setSceneQueryUpdateMode_mut(self_: *mut PxSceneSQSystem, updateMode: PxSceneQueryUpdateMode);

    /// Gets scene query update mode
    ///
    /// Current scene query update mode.
    pub fn PxSceneSQSystem_getSceneQueryUpdateMode(self_: *const PxSceneSQSystem) -> PxSceneQueryUpdateMode;

    /// Retrieves the scene's internal scene query timestamp, increased each time a change to the
    /// static scene query structure is performed.
    ///
    /// scene query static timestamp
    pub fn PxSceneSQSystem_getSceneQueryStaticTimestamp(self_: *const PxSceneSQSystem) -> u32;

    /// Flushes any changes to the scene query representation.
    pub fn PxSceneSQSystem_flushQueryUpdates_mut(self_: *mut PxSceneSQSystem);

    /// Forces dynamic trees to be immediately rebuilt.
    pub fn PxSceneSQSystem_forceDynamicTreeRebuild_mut(self_: *mut PxSceneSQSystem, rebuildStaticStructure: bool, rebuildDynamicStructure: bool);

    /// Return the value of PxSceneQueryDesc::staticStructure that was set when creating the scene with PxPhysics::createScene
    pub fn PxSceneSQSystem_getStaticStructure(self_: *const PxSceneSQSystem) -> PxPruningStructureType;

    /// Return the value of PxSceneQueryDesc::dynamicStructure that was set when creating the scene with PxPhysics::createScene
    pub fn PxSceneSQSystem_getDynamicStructure(self_: *const PxSceneSQSystem) -> PxPruningStructureType;

    /// Executes scene queries update tasks.
    ///
    /// This function will refit dirty shapes within the pruner and will execute a task to build a new AABB tree, which is
    /// build on a different thread. The new AABB tree is built based on the dynamic tree rebuild hint rate. Once
    /// the new tree is ready it will be commited in next fetchQueries call, which must be called after.
    ///
    /// This function is equivalent to the following PxSceneQuerySystem calls:
    /// Synchronous calls:
    /// - PxSceneQuerySystemBase::flushUpdates()
    /// - handle0 = PxSceneQuerySystem::prepareSceneQueryBuildStep(PX_SCENE_PRUNER_STATIC)
    /// - handle1 = PxSceneQuerySystem::prepareSceneQueryBuildStep(PX_SCENE_PRUNER_DYNAMIC)
    /// Asynchronous calls:
    /// - PxSceneQuerySystem::sceneQueryBuildStep(handle0);
    /// - PxSceneQuerySystem::sceneQueryBuildStep(handle1);
    ///
    /// This function is part of the PxSceneSQSystem interface because it uses the PxScene task system under the hood. But
    /// it calls PxSceneQuerySystem functions, which are independent from this system and could be called in a similar
    /// fashion by a separate, possibly user-defined task manager.
    ///
    /// If PxSceneQueryUpdateMode::eBUILD_DISABLED_COMMIT_DISABLED is used, it is required to update the scene queries
    /// using this function.
    pub fn PxSceneSQSystem_sceneQueriesUpdate_mut(self_: *mut PxSceneSQSystem, completionTask: *mut PxBaseTask, controlSimulation: bool);

    /// This checks to see if the scene queries update has completed.
    ///
    /// This does not cause the data available for reading to be updated with the results of the scene queries update, it is simply a status check.
    /// The bool will allow it to either return immediately or block waiting for the condition to be met so that it can return true
    ///
    /// True if the results are available.
    pub fn PxSceneSQSystem_checkQueries_mut(self_: *mut PxSceneSQSystem, block: bool) -> bool;

    /// This method must be called after sceneQueriesUpdate. It will wait for the scene queries update to finish. If the user makes an illegal scene queries update call,
    /// the SDK will issue an error message.
    ///
    /// If a new AABB tree build finished, then during fetchQueries the current tree within the pruning structure is swapped with the new tree.
    pub fn PxSceneSQSystem_fetchQueries_mut(self_: *mut PxSceneSQSystem, block: bool) -> bool;

    /// Decrements the reference count of the object and releases it if the new reference count is zero.
    pub fn PxSceneQuerySystem_release_mut(self_: *mut PxSceneQuerySystem);

    /// Acquires a counted reference to this object.
    ///
    /// This method increases the reference count of the object by 1. Decrement the reference count by calling release()
    pub fn PxSceneQuerySystem_acquireReference_mut(self_: *mut PxSceneQuerySystem);

    /// Preallocates internal arrays to minimize the amount of reallocations.
    ///
    /// The system does not prevent more allocations than given numbers. It is legal to not call this function at all,
    /// or to add more shapes to the system than the preallocated amounts.
    pub fn PxSceneQuerySystem_preallocate_mut(self_: *mut PxSceneQuerySystem, prunerIndex: u32, nbShapes: u32);

    /// Frees internal memory that may not be in-use anymore.
    ///
    /// This is an entry point for reclaiming transient memory allocated at some point by the SQ system,
    /// but which wasn't been immediately freed for performance reason. Calling this function might free
    /// some memory, but it might also produce a new set of allocations in the next frame.
    pub fn PxSceneQuerySystem_flushMemory_mut(self_: *mut PxSceneQuerySystem);

    /// Adds a shape to the SQ system.
    ///
    /// The same function is used to add either a regular shape, or a SQ compound shape.
    pub fn PxSceneQuerySystem_addSQShape_mut(self_: *mut PxSceneQuerySystem, actor: *const PxRigidActor, shape: *const PxShape, bounds: *const PxBounds3, transform: *const PxTransform, compoundHandle: *const u32, hasPruningStructure: bool);

    /// Removes a shape from the SQ system.
    ///
    /// The same function is used to remove either a regular shape, or a SQ compound shape.
    pub fn PxSceneQuerySystem_removeSQShape_mut(self_: *mut PxSceneQuerySystem, actor: *const PxRigidActor, shape: *const PxShape);

    /// Updates a shape in the SQ system.
    ///
    /// The same function is used to update either a regular shape, or a SQ compound shape.
    ///
    /// The transforms are eager-evaluated, but the bounds are lazy-evaluated. This means that
    /// the updated transform has to be passed to the update function, while the bounds are automatically
    /// recomputed by the system whenever needed.
    pub fn PxSceneQuerySystem_updateSQShape_mut(self_: *mut PxSceneQuerySystem, actor: *const PxRigidActor, shape: *const PxShape, transform: *const PxTransform);

    /// Adds a compound to the SQ system.
    ///
    /// SQ compound handle
    pub fn PxSceneQuerySystem_addSQCompound_mut(self_: *mut PxSceneQuerySystem, actor: *const PxRigidActor, shapes: *mut *const PxShape, bvh: *const PxBVH, transforms: *const PxTransform) -> u32;

    /// Removes a compound from the SQ system.
    pub fn PxSceneQuerySystem_removeSQCompound_mut(self_: *mut PxSceneQuerySystem, compoundHandle: u32);

    /// Updates a compound in the SQ system.
    ///
    /// The compound structures are immediately updated when the call occurs.
    pub fn PxSceneQuerySystem_updateSQCompound_mut(self_: *mut PxSceneQuerySystem, compoundHandle: u32, compoundTransform: *const PxTransform);

    /// Shift the data structures' origin by the specified vector.
    ///
    /// Please refer to the notes of the similar function in PxScene.
    pub fn PxSceneQuerySystem_shiftOrigin_mut(self_: *mut PxSceneQuerySystem, shift: *const PxVec3);

    /// Merges a pruning structure with the SQ system's internal pruners.
    pub fn PxSceneQuerySystem_merge_mut(self_: *mut PxSceneQuerySystem, pruningStructure: *const PxPruningStructure);

    /// Shape to SQ-pruner-handle mapping function.
    ///
    /// This function finds and returns the SQ pruner handle associated with a given (actor/shape) couple
    /// that was previously added to the system. This is needed for the sync function.
    ///
    /// Associated SQ pruner handle.
    pub fn PxSceneQuerySystem_getHandle(self_: *const PxSceneQuerySystem, actor: *const PxRigidActor, shape: *const PxShape, prunerIndex: *mut u32) -> u32;

    /// Synchronizes the scene-query system with another system that references the same objects.
    ///
    /// This function is used when the scene-query objects also exist in another system that can also update them. For example the scene-query objects
    /// (used for raycast, overlap or sweep queries) might be driven by equivalent objects in an external rigid-body simulation engine. In this case
    /// the rigid-body simulation engine computes the new poses and transforms, and passes them to the scene-query system using this function. It is
    /// more efficient than calling updateSQShape on each object individually, since updateSQShape would end up recomputing the bounds already available
    /// in the rigid-body engine.
    pub fn PxSceneQuerySystem_sync_mut(self_: *mut PxSceneQuerySystem, prunerIndex: u32, handles: *const u32, indices: *const u32, bounds: *const PxBounds3, transforms: *const PxTransformPadded, count: u32, ignoredIndices: *const PxBitMap);

    /// Finalizes updates made to the SQ system.
    ///
    /// This function should be called after updates have been made to the SQ system, to fully reflect the changes
    /// inside the internal pruners. In particular it should be called:
    /// - after calls to updateSQShape
    /// - after calls to sync
    ///
    /// This function:
    /// - recomputes bounds of manually updated shapes (i.e. either regular or SQ compound shapes modified by updateSQShape)
    /// - updates dynamic pruners (refit operations)
    /// - incrementally rebuilds AABB-trees
    ///
    /// The amount of work performed in this function depends on PxSceneQueryUpdateMode.
    pub fn PxSceneQuerySystem_finalizeUpdates_mut(self_: *mut PxSceneQuerySystem);

    /// Prepares asynchronous build step.
    ///
    /// This is directly called (synchronously) by PxSceneSQSystem::sceneQueriesUpdate(). See the comments there.
    ///
    /// This function is called to let the system execute any necessary synchronous operation before the
    /// asynchronous sceneQueryBuildStep() function is called.
    ///
    /// If there is any work to do for the specific pruner, the function returns a pruner-specific handle that
    /// will be passed to the corresponding, asynchronous sceneQueryBuildStep function.
    ///
    /// A pruner-specific handle that will be sent to sceneQueryBuildStep if there is any work to do, i.e. to execute the corresponding sceneQueryBuildStep() call.
    ///
    /// Null if there is no work to do, otherwise a pruner-specific handle.
    pub fn PxSceneQuerySystem_prepareSceneQueryBuildStep_mut(self_: *mut PxSceneQuerySystem, prunerIndex: u32) -> *mut std::ffi::c_void;

    /// Executes asynchronous build step.
    ///
    /// This is directly called (asynchronously) by PxSceneSQSystem::sceneQueriesUpdate(). See the comments there.
    ///
    /// This function incrementally builds the internal trees/pruners. It is called asynchronously, i.e. this can be
    /// called from different threads for building multiple trees at the same time.
    pub fn PxSceneQuerySystem_sceneQueryBuildStep_mut(self_: *mut PxSceneQuerySystem, handle: *mut std::ffi::c_void);

    pub fn PxBroadPhaseDesc_new(type_: PxBroadPhaseType) -> PxBroadPhaseDesc;

    pub fn PxBroadPhaseDesc_isValid(self_: *const PxBroadPhaseDesc) -> bool;

    /// Retrieves the filter group for static objects.
    ///
    /// Mark static objects with this group when adding them to the broadphase.
    /// Overlaps between static objects will not be detected. All static objects
    /// should have the same group.
    ///
    /// Filter group for static objects.
    pub fn phys_PxGetBroadPhaseStaticFilterGroup() -> u32;

    /// Retrieves a filter group for dynamic objects.
    ///
    /// Mark dynamic objects with this group when adding them to the broadphase.
    /// Each dynamic object must have an ID, and overlaps between dynamic objects that have
    /// the same ID will not be detected. This is useful to dismiss overlaps between shapes
    /// of the same (compound) actor directly within the broadphase.
    ///
    /// Filter group for the object.
    pub fn phys_PxGetBroadPhaseDynamicFilterGroup(id: u32) -> u32;

    /// Retrieves a filter group for kinematic objects.
    ///
    /// Mark kinematic objects with this group when adding them to the broadphase.
    /// Each kinematic object must have an ID, and overlaps between kinematic objects that have
    /// the same ID will not be detected.
    ///
    /// Filter group for the object.
    pub fn phys_PxGetBroadPhaseKinematicFilterGroup(id: u32) -> u32;

    pub fn PxBroadPhaseUpdateData_new(created: *const u32, nbCreated: u32, updated: *const u32, nbUpdated: u32, removed: *const u32, nbRemoved: u32, bounds: *const PxBounds3, groups: *const u32, distances: *const f32, capacity: u32) -> PxBroadPhaseUpdateData;

    pub fn PxBroadPhaseResults_new() -> PxBroadPhaseResults;

    /// Returns number of regions currently registered in the broad-phase.
    ///
    /// Number of regions
    pub fn PxBroadPhaseRegions_getNbRegions(self_: *const PxBroadPhaseRegions) -> u32;

    /// Gets broad-phase regions.
    ///
    /// Number of written out regions.
    pub fn PxBroadPhaseRegions_getRegions(self_: *const PxBroadPhaseRegions, userBuffer: *mut PxBroadPhaseRegionInfo, bufferSize: u32, startIndex: u32) -> u32;

    /// Adds a new broad-phase region.
    ///
    /// The total number of regions is limited to PxBroadPhaseCaps::mMaxNbRegions. If that number is exceeded, the call is ignored.
    ///
    /// The newly added region will be automatically populated with already existing objects that touch it, if the
    /// 'populateRegion' parameter is set to true. Otherwise the newly added region will be empty, and it will only be
    /// populated with objects when those objects are added to the simulation, or updated if they already exist.
    ///
    /// Using 'populateRegion=true' has a cost, so it is best to avoid it if possible. In particular it is more efficient
    /// to create the empty regions first (with populateRegion=false) and then add the objects afterwards (rather than
    /// the opposite).
    ///
    /// Objects automatically move from one region to another during their lifetime. The system keeps tracks of what
    /// regions a given object is in. It is legal for an object to be in an arbitrary number of regions. However if an
    /// object leaves all regions, or is created outside of all regions, several things happen:
    /// - collisions get disabled for this object
    /// - the object appears in the getOutOfBoundsObjects() array
    ///
    /// If an out-of-bounds object, whose collisions are disabled, re-enters a valid broadphase region, then collisions
    /// are re-enabled for that object.
    ///
    /// Handle for newly created region, or 0xffffffff in case of failure.
    pub fn PxBroadPhaseRegions_addRegion_mut(self_: *mut PxBroadPhaseRegions, region: *const PxBroadPhaseRegion, populateRegion: bool, bounds: *const PxBounds3, distances: *const f32) -> u32;

    /// Removes a broad-phase region.
    ///
    /// If the region still contains objects, and if those objects do not overlap any region any more, they are not
    /// automatically removed from the simulation. Instead, the PxBroadPhaseCallback::onObjectOutOfBounds notification
    /// is used for each object. Users are responsible for removing the objects from the simulation if this is the
    /// desired behavior.
    ///
    /// If the handle is invalid, or if a valid handle is removed twice, an error message is sent to the error stream.
    ///
    /// True if success
    pub fn PxBroadPhaseRegions_removeRegion_mut(self_: *mut PxBroadPhaseRegions, handle: u32) -> bool;

    pub fn PxBroadPhaseRegions_getNbOutOfBoundsObjects(self_: *const PxBroadPhaseRegions) -> u32;

    pub fn PxBroadPhaseRegions_getOutOfBoundsObjects(self_: *const PxBroadPhaseRegions) -> *const u32;

    pub fn PxBroadPhase_release_mut(self_: *mut PxBroadPhase);

    /// Gets the broadphase type.
    ///
    /// Broadphase type.
    pub fn PxBroadPhase_getType(self_: *const PxBroadPhase) -> PxBroadPhaseType;

    /// Gets broad-phase caps.
    pub fn PxBroadPhase_getCaps(self_: *const PxBroadPhase, caps: *mut PxBroadPhaseCaps);

    /// Retrieves the regions API if applicable.
    ///
    /// For broadphases that do not use explicit user-defined regions, this call returns NULL.
    ///
    /// Region API, or NULL.
    pub fn PxBroadPhase_getRegions_mut(self_: *mut PxBroadPhase) -> *mut PxBroadPhaseRegions;

    /// Retrieves the broadphase allocator.
    ///
    /// User-provided buffers should ideally be allocated with this allocator, for best performance.
    /// This is especially true for the GPU broadphases, whose buffers need to be allocated in CUDA
    /// host memory.
    ///
    /// The broadphase allocator.
    pub fn PxBroadPhase_getAllocator_mut(self_: *mut PxBroadPhase) -> *mut PxAllocatorCallback;

    /// Retrieves the profiler's context ID.
    ///
    /// The context ID.
    pub fn PxBroadPhase_getContextID(self_: *const PxBroadPhase) -> u64;

    /// Sets a scratch buffer
    ///
    /// Some broadphases might take advantage of a scratch buffer to limit runtime allocations.
    ///
    /// All broadphases still work without providing a scratch buffer, this is an optional function
    /// that can potentially reduce runtime allocations.
    pub fn PxBroadPhase_setScratchBlock_mut(self_: *mut PxBroadPhase, scratchBlock: *mut std::ffi::c_void, size: u32);

    /// Updates the broadphase and computes the lists of created/deleted pairs.
    ///
    /// The provided update data describes changes to objects since the last broadphase update.
    ///
    /// To benefit from potentially multithreaded implementations, it is necessary to provide a continuation
    /// task to the function. It is legal to pass NULL there, but the underlying (CPU) implementations will
    /// then run single-threaded.
    pub fn PxBroadPhase_update_mut(self_: *mut PxBroadPhase, updateData: *const PxBroadPhaseUpdateData, continuation: *mut PxBaseTask);

    /// Retrieves the broadphase results after an update.
    ///
    /// This should be called once after each update call to retrieve the results of the broadphase. The
    /// results are incremental, i.e. the system only returns new and lost pairs, not all current pairs.
    pub fn PxBroadPhase_fetchResults_mut(self_: *mut PxBroadPhase, results: *mut PxBroadPhaseResults);

    /// Helper for single-threaded updates.
    ///
    /// This short helper function performs a single-theaded update and reports the results in a single call.
    pub fn PxBroadPhase_update_mut_1(self_: *mut PxBroadPhase, results: *mut PxBroadPhaseResults, updateData: *const PxBroadPhaseUpdateData);

    /// Broadphase factory function.
    ///
    /// Use this function to create a new standalone broadphase.
    ///
    /// Newly created broadphase, or NULL
    pub fn phys_PxCreateBroadPhase(desc: *const PxBroadPhaseDesc) -> *mut PxBroadPhase;

    pub fn PxAABBManager_release_mut(self_: *mut PxAABBManager);

    /// Retrieves the underlying broadphase.
    ///
    /// The managed broadphase.
    pub fn PxAABBManager_getBroadPhase_mut(self_: *mut PxAABBManager) -> *mut PxBroadPhase;

    /// Retrieves the managed bounds.
    ///
    /// This is needed as input parameters to functions like PxBroadPhaseRegions::addRegion.
    ///
    /// The managed object bounds.
    pub fn PxAABBManager_getBounds(self_: *const PxAABBManager) -> *const PxBounds3;

    /// Retrieves the managed distances.
    ///
    /// This is needed as input parameters to functions like PxBroadPhaseRegions::addRegion.
    ///
    /// The managed object distances.
    pub fn PxAABBManager_getDistances(self_: *const PxAABBManager) -> *const f32;

    /// Retrieves the managed filter groups.
    ///
    /// The managed object groups.
    pub fn PxAABBManager_getGroups(self_: *const PxAABBManager) -> *const u32;

    /// Retrieves the managed buffers' capacity.
    ///
    /// Bounds, distances and groups buffers have the same capacity.
    ///
    /// The managed buffers' capacity.
    pub fn PxAABBManager_getCapacity(self_: *const PxAABBManager) -> u32;

    /// Adds an object to the manager.
    ///
    /// Objects' indices are externally managed, i.e. they must be provided by users (as opposed to handles
    /// that could be returned by this manager). The design allows users to identify an object by a single ID,
    /// and use the same ID in multiple sub-systems.
    pub fn PxAABBManager_addObject_mut(self_: *mut PxAABBManager, index: u32, bounds: *const PxBounds3, group: u32, distance: f32);

    /// Removes an object from the manager.
    pub fn PxAABBManager_removeObject_mut(self_: *mut PxAABBManager, index: u32);

    /// Updates an object in the manager.
    ///
    /// This call can update an object's bounds, distance, or both.
    /// It is not possible to update an object's filter group.
    pub fn PxAABBManager_updateObject_mut(self_: *mut PxAABBManager, index: u32, bounds: *const PxBounds3, distance: *const f32);

    /// Updates the broadphase and computes the lists of created/deleted pairs.
    ///
    /// The data necessary for updating the broadphase is internally computed by the AABB manager.
    ///
    /// To benefit from potentially multithreaded implementations, it is necessary to provide a continuation
    /// task to the function. It is legal to pass NULL there, but the underlying (CPU) implementations will
    /// then run single-threaded.
    pub fn PxAABBManager_update_mut(self_: *mut PxAABBManager, continuation: *mut PxBaseTask);

    /// Retrieves the broadphase results after an update.
    ///
    /// This should be called once after each update call to retrieve the results of the broadphase. The
    /// results are incremental, i.e. the system only returns new and lost pairs, not all current pairs.
    pub fn PxAABBManager_fetchResults_mut(self_: *mut PxAABBManager, results: *mut PxBroadPhaseResults);

    /// Helper for single-threaded updates.
    ///
    /// This short helper function performs a single-theaded update and reports the results in a single call.
    pub fn PxAABBManager_update_mut_1(self_: *mut PxAABBManager, results: *mut PxBroadPhaseResults);

    /// AABB manager factory function.
    ///
    /// Use this function to create a new standalone high-level broadphase.
    ///
    /// Newly created AABB manager, or NULL
    pub fn phys_PxCreateAABBManager(broadphase: *mut PxBroadPhase) -> *mut PxAABBManager;

    /// constructor sets to default
    pub fn PxSceneLimits_new() -> PxSceneLimits;

    /// (re)sets the structure to the default
    pub fn PxSceneLimits_setToDefault_mut(self_: *mut PxSceneLimits);

    /// Returns true if the descriptor is valid.
    ///
    /// true if the current settings are valid.
    pub fn PxSceneLimits_isValid(self_: *const PxSceneLimits) -> bool;

    pub fn PxgDynamicsMemoryConfig_new() -> PxgDynamicsMemoryConfig;

    pub fn PxgDynamicsMemoryConfig_isValid(self_: *const PxgDynamicsMemoryConfig) -> bool;

    /// constructor sets to default.
    pub fn PxSceneDesc_new(scale: *const PxTolerancesScale) -> PxSceneDesc;

    /// (re)sets the structure to the default.
    pub fn PxSceneDesc_setToDefault_mut(self_: *mut PxSceneDesc, scale: *const PxTolerancesScale);

    /// Returns true if the descriptor is valid.
    ///
    /// true if the current settings are valid.
    pub fn PxSceneDesc_isValid(self_: *const PxSceneDesc) -> bool;

    pub fn PxSceneDesc_getTolerancesScale(self_: *const PxSceneDesc) -> *const PxTolerancesScale;

    /// Get number of broadphase volumes added for the current simulation step.
    ///
    /// Number of broadphase volumes added.
    pub fn PxSimulationStatistics_getNbBroadPhaseAdds(self_: *const PxSimulationStatistics) -> u32;

    /// Get number of broadphase volumes removed for the current simulation step.
    ///
    /// Number of broadphase volumes removed.
    pub fn PxSimulationStatistics_getNbBroadPhaseRemoves(self_: *const PxSimulationStatistics) -> u32;

    /// Get number of shape collision pairs of a certain type processed for the current simulation step.
    ///
    /// There is an entry for each geometry pair type.
    ///
    /// entry[i][j] = entry[j][i], hence, if you want the sum of all pair
    /// types, you need to discard the symmetric entries
    ///
    /// Number of processed pairs of the specified geometry types.
    pub fn PxSimulationStatistics_getRbPairStats(self_: *const PxSimulationStatistics, pairType: RbPairStatsType, g0: PxGeometryType, g1: PxGeometryType) -> u32;

    pub fn PxSimulationStatistics_new() -> PxSimulationStatistics;

    /// Sets the PVD flag. See PxPvdSceneFlag.
    pub fn PxPvdSceneClient_setScenePvdFlag_mut(self_: *mut PxPvdSceneClient, flag: PxPvdSceneFlag, value: bool);

    /// Sets the PVD flags. See PxPvdSceneFlags.
    pub fn PxPvdSceneClient_setScenePvdFlags_mut(self_: *mut PxPvdSceneClient, flags: PxPvdSceneFlags);

    /// Retrieves the PVD flags. See PxPvdSceneFlags.
    pub fn PxPvdSceneClient_getScenePvdFlags(self_: *const PxPvdSceneClient) -> PxPvdSceneFlags;

    /// update camera on PVD application's render window
    pub fn PxPvdSceneClient_updateCamera_mut(self_: *mut PxPvdSceneClient, name: *const std::ffi::c_char, origin: *const PxVec3, up: *const PxVec3, target: *const PxVec3);

    /// draw points on PVD application's render window
    pub fn PxPvdSceneClient_drawPoints_mut(self_: *mut PxPvdSceneClient, points: *const PxDebugPoint, count: u32);

    /// draw lines on PVD application's render window
    pub fn PxPvdSceneClient_drawLines_mut(self_: *mut PxPvdSceneClient, lines: *const PxDebugLine, count: u32);

    /// draw triangles on PVD application's render window
    pub fn PxPvdSceneClient_drawTriangles_mut(self_: *mut PxPvdSceneClient, triangles: *const PxDebugTriangle, count: u32);

    /// draw text on PVD application's render window
    pub fn PxPvdSceneClient_drawText_mut(self_: *mut PxPvdSceneClient, text: *const PxDebugText);

    pub fn PxDominanceGroupPair_new(a: u8, b: u8) -> PxDominanceGroupPair;

    pub fn PxBroadPhaseCallback_delete(self_: *mut PxBroadPhaseCallback);

    /// Out-of-bounds notification.
    ///
    /// This function is called when an object leaves the broad-phase.
    pub fn PxBroadPhaseCallback_onObjectOutOfBounds_mut(self_: *mut PxBroadPhaseCallback, shape: *mut PxShape, actor: *mut PxActor);

    /// Out-of-bounds notification.
    ///
    /// This function is called when an aggregate leaves the broad-phase.
    pub fn PxBroadPhaseCallback_onObjectOutOfBounds_mut_1(self_: *mut PxBroadPhaseCallback, aggregate: *mut PxAggregate);

    /// Deletes the scene.
    ///
    /// Removes any actors and constraint shaders from this scene
    /// (if the user hasn't already done so).
    ///
    /// Be sure to not keep a reference to this object after calling release.
    /// Avoid release calls while the scene is simulating (in between simulate() and fetchResults() calls).
    pub fn PxScene_release_mut(self_: *mut PxScene);

    /// Sets a scene flag. You can only set one flag at a time.
    ///
    /// Not all flags are mutable and changing some will result in an error. Please check [`PxSceneFlag`] to see which flags can be changed.
    pub fn PxScene_setFlag_mut(self_: *mut PxScene, flag: PxSceneFlag, value: bool);

    /// Get the scene flags.
    ///
    /// The scene flags. See [`PxSceneFlag`]
    pub fn PxScene_getFlags(self_: *const PxScene) -> PxSceneFlags;

    /// Set new scene limits.
    ///
    /// Increase the maximum capacity of various data structures in the scene. The new capacities will be
    /// at least as large as required to deal with the objects currently in the scene. Further, these values
    /// are for preallocation and do not represent hard limits.
    pub fn PxScene_setLimits_mut(self_: *mut PxScene, limits: *const PxSceneLimits);

    /// Get current scene limits.
    ///
    /// Current scene limits.
    pub fn PxScene_getLimits(self_: *const PxScene) -> PxSceneLimits;

    /// Call this method to retrieve the Physics SDK.
    ///
    /// The physics SDK this scene is associated with.
    pub fn PxScene_getPhysics_mut(self_: *mut PxScene) -> *mut PxPhysics;

    /// Retrieves the scene's internal timestamp, increased each time a simulation step is completed.
    ///
    /// scene timestamp
    pub fn PxScene_getTimestamp(self_: *const PxScene) -> u32;

    /// Adds an articulation to this scene.
    ///
    /// If the articulation is already assigned to a scene (see [`PxArticulationReducedCoordinate::getScene`]), the call is ignored and an error is issued.
    ///
    /// True if success
    pub fn PxScene_addArticulation_mut(self_: *mut PxScene, articulation: *mut PxArticulationReducedCoordinate) -> bool;

    /// Removes an articulation from this scene.
    ///
    /// If the articulation is not part of this scene (see [`PxArticulationReducedCoordinate::getScene`]), the call is ignored and an error is issued.
    ///
    /// If the articulation is in an aggregate it will be removed from the aggregate.
    pub fn PxScene_removeArticulation_mut(self_: *mut PxScene, articulation: *mut PxArticulationReducedCoordinate, wakeOnLostTouch: bool);

    /// Adds an actor to this scene.
    ///
    /// If the actor is already assigned to a scene (see [`PxActor::getScene`]), the call is ignored and an error is issued.
    ///
    /// If the actor has an invalid constraint, in checked builds the call is ignored and an error is issued.
    ///
    /// You can not add individual articulation links (see [`PxArticulationLink`]) to the scene. Use #addArticulation() instead.
    ///
    /// If the actor is a PxRigidActor then each assigned PxConstraint object will get added to the scene automatically if
    /// it connects to another actor that is part of the scene already.
    ///
    /// When a BVH is provided the actor shapes are grouped together.
    /// The scene query pruning structure inside PhysX SDK will store/update one
    /// bound per actor. The scene queries against such an actor will query actor
    /// bounds and then make a local space query against the provided BVH, which is in actor's local space.
    ///
    /// True if success
    pub fn PxScene_addActor_mut(self_: *mut PxScene, actor: *mut PxActor, bvh: *const PxBVH) -> bool;

    /// Adds actors to this scene. Only supports actors of type PxRigidStatic and PxRigidDynamic.
    ///
    /// This method only supports actors of type PxRigidStatic and PxRigidDynamic. For other actors, use addActor() instead.
    /// For articulation links, use addArticulation().
    ///
    /// If one of the actors is already assigned to a scene (see [`PxActor::getScene`]), the call is ignored and an error is issued.
    ///
    /// If an actor in the array contains an invalid constraint, in checked builds the call is ignored and an error is issued.
    ///
    /// If an actor in the array is a PxRigidActor then each assigned PxConstraint object will get added to the scene automatically if
    /// it connects to another actor that is part of the scene already.
    ///
    /// this method is optimized for high performance.
    ///
    /// True if success
    pub fn PxScene_addActors_mut(self_: *mut PxScene, actors: *const *mut PxActor, nbActors: u32) -> bool;

    /// Adds a pruning structure together with its actors to this scene. Only supports actors of type PxRigidStatic and PxRigidDynamic.
    ///
    /// This method only supports actors of type PxRigidStatic and PxRigidDynamic. For other actors, use addActor() instead.
    /// For articulation links, use addArticulation().
    ///
    /// If an actor in the pruning structure contains an invalid constraint, in checked builds the call is ignored and an error is issued.
    ///
    /// For all actors in the pruning structure each assigned PxConstraint object will get added to the scene automatically if
    /// it connects to another actor that is part of the scene already.
    ///
    /// This method is optimized for high performance.
    ///
    /// Merging a PxPruningStructure into an active scene query optimization AABB tree might unbalance the tree. A typical use case for
    /// PxPruningStructure is a large world scenario where blocks of closely positioned actors get streamed in. The merge process finds the
    /// best node in the active scene query optimization AABB tree and inserts the PxPruningStructure. Therefore using PxPruningStructure
    /// for actors scattered throughout the world will result in an unbalanced tree.
    ///
    /// True if success
    pub fn PxScene_addActors_mut_1(self_: *mut PxScene, pruningStructure: *const PxPruningStructure) -> bool;

    /// Removes an actor from this scene.
    ///
    /// If the actor is not part of this scene (see [`PxActor::getScene`]), the call is ignored and an error is issued.
    ///
    /// You can not remove individual articulation links (see [`PxArticulationLink`]) from the scene. Use #removeArticulation() instead.
    ///
    /// If the actor is a PxRigidActor then all assigned PxConstraint objects will get removed from the scene automatically.
    ///
    /// If the actor is in an aggregate it will be removed from the aggregate.
    pub fn PxScene_removeActor_mut(self_: *mut PxScene, actor: *mut PxActor, wakeOnLostTouch: bool);

    /// Removes actors from this scene. Only supports actors of type PxRigidStatic and PxRigidDynamic.
    ///
    /// This method only supports actors of type PxRigidStatic and PxRigidDynamic. For other actors, use removeActor() instead.
    /// For articulation links, use removeArticulation().
    ///
    /// If some actor is not part of this scene (see [`PxActor::getScene`]), the actor remove is ignored and an error is issued.
    ///
    /// You can not remove individual articulation links (see [`PxArticulationLink`]) from the scene. Use #removeArticulation() instead.
    ///
    /// If the actor is a PxRigidActor then all assigned PxConstraint objects will get removed from the scene automatically.
    pub fn PxScene_removeActors_mut(self_: *mut PxScene, actors: *const *mut PxActor, nbActors: u32, wakeOnLostTouch: bool);

    /// Adds an aggregate to this scene.
    ///
    /// If the aggregate is already assigned to a scene (see [`PxAggregate::getScene`]), the call is ignored and an error is issued.
    ///
    /// If the aggregate contains an actor with an invalid constraint, in checked builds the call is ignored and an error is issued.
    ///
    /// If the aggregate already contains actors, those actors are added to the scene as well.
    ///
    /// True if success
    pub fn PxScene_addAggregate_mut(self_: *mut PxScene, aggregate: *mut PxAggregate) -> bool;

    /// Removes an aggregate from this scene.
    ///
    /// If the aggregate is not part of this scene (see [`PxAggregate::getScene`]), the call is ignored and an error is issued.
    ///
    /// If the aggregate contains actors, those actors are removed from the scene as well.
    pub fn PxScene_removeAggregate_mut(self_: *mut PxScene, aggregate: *mut PxAggregate, wakeOnLostTouch: bool);

    /// Adds objects in the collection to this scene.
    ///
    /// This function adds the following types of objects to this scene: PxRigidActor (except PxArticulationLink), PxAggregate, PxArticulationReducedCoordinate.
    /// This method is typically used after deserializing the collection in order to populate the scene with deserialized objects.
    ///
    /// If the collection contains an actor with an invalid constraint, in checked builds the call is ignored and an error is issued.
    ///
    /// True if success
    pub fn PxScene_addCollection_mut(self_: *mut PxScene, collection: *const PxCollection) -> bool;

    /// Retrieve the number of actors of certain types in the scene. For supported types, see PxActorTypeFlags.
    ///
    /// the number of actors.
    pub fn PxScene_getNbActors(self_: *const PxScene, types: PxActorTypeFlags) -> u32;

    /// Retrieve an array of all the actors of certain types in the scene. For supported types, see PxActorTypeFlags.
    ///
    /// Number of actors written to the buffer.
    pub fn PxScene_getActors(self_: *const PxScene, types: PxActorTypeFlags, userBuffer: *mut *mut PxActor, bufferSize: u32, startIndex: u32) -> u32;

    /// Queries the PxScene for a list of the PxActors whose transforms have been
    /// updated during the previous simulation step. Only includes actors of type PxRigidDynamic and PxArticulationLink.
    ///
    /// PxSceneFlag::eENABLE_ACTIVE_ACTORS must be set.
    ///
    /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored and NULL will be returned.
    ///
    /// A pointer to the list of active PxActors generated during the last call to fetchResults().
    pub fn PxScene_getActiveActors_mut(self_: *mut PxScene, nbActorsOut: *mut u32) -> *mut *mut PxActor;

    /// Returns the number of articulations in the scene.
    ///
    /// the number of articulations in this scene.
    pub fn PxScene_getNbArticulations(self_: *const PxScene) -> u32;

    /// Retrieve all the articulations in the scene.
    ///
    /// Number of articulations written to the buffer.
    pub fn PxScene_getArticulations(self_: *const PxScene, userBuffer: *mut *mut PxArticulationReducedCoordinate, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of constraint shaders in the scene.
    ///
    /// the number of constraint shaders in this scene.
    pub fn PxScene_getNbConstraints(self_: *const PxScene) -> u32;

    /// Retrieve all the constraint shaders in the scene.
    ///
    /// Number of constraint shaders written to the buffer.
    pub fn PxScene_getConstraints(self_: *const PxScene, userBuffer: *mut *mut PxConstraint, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of aggregates in the scene.
    ///
    /// the number of aggregates in this scene.
    pub fn PxScene_getNbAggregates(self_: *const PxScene) -> u32;

    /// Retrieve all the aggregates in the scene.
    ///
    /// Number of aggregates written to the buffer.
    pub fn PxScene_getAggregates(self_: *const PxScene, userBuffer: *mut *mut PxAggregate, bufferSize: u32, startIndex: u32) -> u32;

    /// Specifies the dominance behavior of contacts between two actors with two certain dominance groups.
    ///
    /// It is possible to assign each actor to a dominance groups using [`PxActor::setDominanceGroup`]().
    ///
    /// With dominance groups one can have all contacts created between actors act in one direction only. This is useful, for example, if you
    /// want an object to push debris out of its way and be unaffected,while still responding physically to forces and collisions
    /// with non-debris objects.
    ///
    /// Whenever a contact between two actors (a0, a1) needs to be solved, the groups (g0, g1) of both
    /// actors are retrieved. Then the PxDominanceGroupPair setting for this group pair is retrieved with getDominanceGroupPair(g0, g1).
    ///
    /// In the contact, PxDominanceGroupPair::dominance0 becomes the dominance setting for a0, and
    /// PxDominanceGroupPair::dominance1 becomes the dominance setting for a1. A dominanceN setting of 1.0f, the default,
    /// will permit aN to be pushed or pulled by a(1-N) through the contact. A dominanceN setting of 0.0f, will however
    /// prevent aN to be pushed by a(1-N) via the contact. Thus, a PxDominanceGroupPair of (1.0f, 0.0f) makes
    /// the interaction one-way.
    ///
    /// The matrix sampled by getDominanceGroupPair(g1, g2) is initialised by default such that:
    ///
    /// if g1 == g2, then (1.0f, 1.0f) is returned
    /// if g1
    /// <
    /// g2, then (0.0f, 1.0f) is returned
    /// if g1 >  g2, then (1.0f, 0.0f) is returned
    ///
    /// In other words, we permit actors in higher groups to be pushed around by actors in lower groups by default.
    ///
    /// These settings should cover most applications, and in fact not overriding these settings may likely result in higher performance.
    ///
    /// It is not possible to make the matrix asymetric, or to change the diagonal. In other words:
    ///
    /// it is not possible to change (g1, g2) if (g1==g2)
    /// if you set
    ///
    /// (g1, g2) to X, then (g2, g1) will implicitly and automatically be set to ~X, where:
    ///
    /// ~(1.0f, 1.0f) is (1.0f, 1.0f)
    /// ~(0.0f, 1.0f) is (1.0f, 0.0f)
    /// ~(1.0f, 0.0f) is (0.0f, 1.0f)
    ///
    /// These two restrictions are to make sure that contacts between two actors will always evaluate to the same dominance
    /// setting, regardless of the order of the actors.
    ///
    /// Dominance settings are currently specified as floats 0.0f or 1.0f because in the future we may permit arbitrary
    /// fractional settings to express 'partly-one-way' interactions.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake actors up automatically.
    pub fn PxScene_setDominanceGroupPair_mut(self_: *mut PxScene, group1: u8, group2: u8, dominance: *const PxDominanceGroupPair);

    /// Samples the dominance matrix.
    pub fn PxScene_getDominanceGroupPair(self_: *const PxScene, group1: u8, group2: u8) -> PxDominanceGroupPair;

    /// Return the cpu dispatcher that was set in PxSceneDesc::cpuDispatcher when creating the scene with PxPhysics::createScene
    pub fn PxScene_getCpuDispatcher(self_: *const PxScene) -> *mut PxCpuDispatcher;

    /// Reserves a new client ID.
    ///
    /// PX_DEFAULT_CLIENT is always available as the default clientID.
    /// Additional clients are returned by this function. Clients cannot be released once created.
    /// An error is reported when more than a supported number of clients (currently 128) are created.
    pub fn PxScene_createClient_mut(self_: *mut PxScene) -> u8;

    /// Sets a user notify object which receives special simulation events when they occur.
    ///
    /// Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
    pub fn PxScene_setSimulationEventCallback_mut(self_: *mut PxScene, callback: *mut PxSimulationEventCallback);

    /// Retrieves the simulationEventCallback pointer set with setSimulationEventCallback().
    ///
    /// The current user notify pointer. See [`PxSimulationEventCallback`].
    pub fn PxScene_getSimulationEventCallback(self_: *const PxScene) -> *mut PxSimulationEventCallback;

    /// Sets a user callback object, which receives callbacks on all contacts generated for specified actors.
    ///
    /// Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
    pub fn PxScene_setContactModifyCallback_mut(self_: *mut PxScene, callback: *mut PxContactModifyCallback);

    /// Sets a user callback object, which receives callbacks on all CCD contacts generated for specified actors.
    ///
    /// Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
    pub fn PxScene_setCCDContactModifyCallback_mut(self_: *mut PxScene, callback: *mut PxCCDContactModifyCallback);

    /// Retrieves the PxContactModifyCallback pointer set with setContactModifyCallback().
    ///
    /// The current user contact modify callback pointer. See [`PxContactModifyCallback`].
    pub fn PxScene_getContactModifyCallback(self_: *const PxScene) -> *mut PxContactModifyCallback;

    /// Retrieves the PxCCDContactModifyCallback pointer set with setContactModifyCallback().
    ///
    /// The current user contact modify callback pointer. See [`PxContactModifyCallback`].
    pub fn PxScene_getCCDContactModifyCallback(self_: *const PxScene) -> *mut PxCCDContactModifyCallback;

    /// Sets a broad-phase user callback object.
    ///
    /// Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
    pub fn PxScene_setBroadPhaseCallback_mut(self_: *mut PxScene, callback: *mut PxBroadPhaseCallback);

    /// Retrieves the PxBroadPhaseCallback pointer set with setBroadPhaseCallback().
    ///
    /// The current broad-phase callback pointer. See [`PxBroadPhaseCallback`].
    pub fn PxScene_getBroadPhaseCallback(self_: *const PxScene) -> *mut PxBroadPhaseCallback;

    /// Sets the shared global filter data which will get passed into the filter shader.
    ///
    /// It is the user's responsibility to ensure that changing the shared global filter data does not change the filter output value for existing pairs.
    /// If the filter output for existing pairs does change nonetheless then such a change will not take effect until the pair gets refiltered.
    /// resetFiltering() can be used to explicitly refilter the pairs of specific objects.
    ///
    /// The provided data will get copied to internal buffers and this copy will be used for filtering calls.
    ///
    /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored.
    pub fn PxScene_setFilterShaderData_mut(self_: *mut PxScene, data: *const std::ffi::c_void, dataSize: u32);

    /// Gets the shared global filter data in use for this scene.
    ///
    /// The reference points to a copy of the original filter data specified in [`PxSceneDesc`].filterShaderData or provided by #setFilterShaderData().
    ///
    /// Shared filter data for filter shader.
    pub fn PxScene_getFilterShaderData(self_: *const PxScene) -> *const std::ffi::c_void;

    /// Gets the size of the shared global filter data ([`PxSceneDesc`].filterShaderData)
    ///
    /// Size of shared filter data [bytes].
    pub fn PxScene_getFilterShaderDataSize(self_: *const PxScene) -> u32;

    /// Marks the object to reset interactions and re-run collision filters in the next simulation step.
    ///
    /// This call forces the object to remove all existing collision interactions, to search anew for existing contact
    /// pairs and to run the collision filters again for found collision pairs.
    ///
    /// The operation is supported for PxRigidActor objects only.
    ///
    /// All persistent state of existing interactions will be lost and can not be retrieved even if the same collison pair
    /// is found again in the next step. This will mean, for example, that you will not get notified about persistent contact
    /// for such an interaction (see [`PxPairFlag::eNOTIFY_TOUCH_PERSISTS`]), the contact pair will be interpreted as newly found instead.
    ///
    /// Lost touch contact reports will be sent for every collision pair which includes this shape, if they have
    /// been requested through [`PxPairFlag::eNOTIFY_TOUCH_LOST`] or #PxPairFlag::eNOTIFY_THRESHOLD_FORCE_LOST.
    ///
    /// This is an expensive operation, don't use it if you don't have to.
    ///
    /// Can be used to retrieve collision pairs that were killed by the collision filters (see [`PxFilterFlag::eKILL`])
    ///
    /// It is invalid to use this method if the actor has not been added to a scene already.
    ///
    /// It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
    ///
    /// Do not use this method while the simulation is running.
    ///
    /// Sleeping:
    /// Does wake up the actor.
    ///
    /// True if success
    pub fn PxScene_resetFiltering_mut(self_: *mut PxScene, actor: *mut PxActor) -> bool;

    /// Marks the object to reset interactions and re-run collision filters for specified shapes in the next simulation step.
    ///
    /// This is a specialization of the resetFiltering(PxActor
    /// &
    /// actor) method and allows to reset interactions for specific shapes of
    /// a PxRigidActor.
    ///
    /// Do not use this method while the simulation is running.
    ///
    /// Sleeping:
    /// Does wake up the actor.
    pub fn PxScene_resetFiltering_mut_1(self_: *mut PxScene, actor: *mut PxRigidActor, shapes: *const *mut PxShape, shapeCount: u32) -> bool;

    /// Gets the pair filtering mode for kinematic-kinematic pairs.
    ///
    /// Filtering mode for kinematic-kinematic pairs.
    pub fn PxScene_getKinematicKinematicFilteringMode(self_: *const PxScene) -> PxPairFilteringMode;

    /// Gets the pair filtering mode for static-kinematic pairs.
    ///
    /// Filtering mode for static-kinematic pairs.
    pub fn PxScene_getStaticKinematicFilteringMode(self_: *const PxScene) -> PxPairFilteringMode;

    /// Advances the simulation by an elapsedTime time.
    ///
    /// Large elapsedTime values can lead to instabilities. In such cases elapsedTime
    /// should be subdivided into smaller time intervals and simulate() should be called
    /// multiple times for each interval.
    ///
    /// Calls to simulate() should pair with calls to fetchResults():
    /// Each fetchResults() invocation corresponds to exactly one simulate()
    /// invocation; calling simulate() twice without an intervening fetchResults()
    /// or fetchResults() twice without an intervening simulate() causes an error
    /// condition.
    ///
    /// scene->simulate();
    /// ...do some processing until physics is computed...
    /// scene->fetchResults();
    /// ...now results of run may be retrieved.
    ///
    /// True if success
    pub fn PxScene_simulate_mut(self_: *mut PxScene, elapsedTime: f32, completionTask: *mut PxBaseTask, scratchMemBlock: *mut std::ffi::c_void, scratchMemBlockSize: u32, controlSimulation: bool) -> bool;

    /// Performs dynamics phase of the simulation pipeline.
    ///
    /// Calls to advance() should follow calls to fetchCollision(). An error message will be issued if this sequence is not followed.
    ///
    /// True if success
    pub fn PxScene_advance_mut(self_: *mut PxScene, completionTask: *mut PxBaseTask) -> bool;

    /// Performs collision detection for the scene over elapsedTime
    ///
    /// Calls to collide() should be the first method called to simulate a frame.
    ///
    /// True if success
    pub fn PxScene_collide_mut(self_: *mut PxScene, elapsedTime: f32, completionTask: *mut PxBaseTask, scratchMemBlock: *mut std::ffi::c_void, scratchMemBlockSize: u32, controlSimulation: bool) -> bool;

    /// This checks to see if the simulation run has completed.
    ///
    /// This does not cause the data available for reading to be updated with the results of the simulation, it is simply a status check.
    /// The bool will allow it to either return immediately or block waiting for the condition to be met so that it can return true
    ///
    /// True if the results are available.
    pub fn PxScene_checkResults_mut(self_: *mut PxScene, block: bool) -> bool;

    /// This method must be called after collide() and before advance(). It will wait for the collision phase to finish. If the user makes an illegal simulation call, the SDK will issue an error
    /// message.
    pub fn PxScene_fetchCollision_mut(self_: *mut PxScene, block: bool) -> bool;

    /// This is the big brother to checkResults() it basically does the following:
    ///
    /// True if the results have been fetched.
    pub fn PxScene_fetchResults_mut(self_: *mut PxScene, block: bool, errorState: *mut u32) -> bool;

    /// This call performs the first section of fetchResults, and returns a pointer to the contact streams output by the simulation. It can be used to process contact pairs in parallel, which is often a limiting factor
    /// for fetchResults() performance.
    ///
    /// After calling this function and processing the contact streams, call fetchResultsFinish(). Note that writes to the simulation are not
    /// permitted between the start of fetchResultsStart() and the end of fetchResultsFinish().
    ///
    /// True if the results have been fetched.
    pub fn PxScene_fetchResultsStart_mut(self_: *mut PxScene, contactPairs: *mut *const PxContactPairHeader, nbContactPairs: *mut u32, block: bool) -> bool;

    /// This call processes all event callbacks in parallel. It takes a continuation task, which will be executed once all callbacks have been processed.
    ///
    /// This is a utility function to make it easier to process callbacks in parallel using the PhysX task system. It can only be used in conjunction with
    /// fetchResultsStart(...) and fetchResultsFinish(...)
    pub fn PxScene_processCallbacks_mut(self_: *mut PxScene, continuation: *mut PxBaseTask);

    /// This call performs the second section of fetchResults.
    ///
    /// It must be called after fetchResultsStart() returns and contact reports have been processed.
    ///
    /// Note that once fetchResultsFinish() has been called, the contact streams returned in fetchResultsStart() will be invalid.
    pub fn PxScene_fetchResultsFinish_mut(self_: *mut PxScene, errorState: *mut u32);

    /// This call performs the synchronization of particle system data copies.
    pub fn PxScene_fetchResultsParticleSystem_mut(self_: *mut PxScene);

    /// Clear internal buffers and free memory.
    ///
    /// This method can be used to clear buffers and free internal memory without having to destroy the scene. Can be useful if
    /// the physics data gets streamed in and a checkpoint with a clean state should be created.
    ///
    /// It is not allowed to call this method while the simulation is running. The call will fail.
    pub fn PxScene_flushSimulation_mut(self_: *mut PxScene, sendPendingReports: bool);

    /// Sets a constant gravity for the entire scene.
    ///
    /// Do not use this method while the simulation is running.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the actor up automatically.
    pub fn PxScene_setGravity_mut(self_: *mut PxScene, vec: *const PxVec3);

    /// Retrieves the current gravity setting.
    ///
    /// The current gravity for the scene.
    pub fn PxScene_getGravity(self_: *const PxScene) -> PxVec3;

    /// Set the bounce threshold velocity.  Collision speeds below this threshold will not cause a bounce.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setBounceThresholdVelocity_mut(self_: *mut PxScene, t: f32);

    /// Return the bounce threshold velocity.
    pub fn PxScene_getBounceThresholdVelocity(self_: *const PxScene) -> f32;

    /// Sets the maximum number of CCD passes
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setCCDMaxPasses_mut(self_: *mut PxScene, ccdMaxPasses: u32);

    /// Gets the maximum number of CCD passes.
    ///
    /// The maximum number of CCD passes.
    pub fn PxScene_getCCDMaxPasses(self_: *const PxScene) -> u32;

    /// Set the maximum CCD separation.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setCCDMaxSeparation_mut(self_: *mut PxScene, t: f32);

    /// Gets the maximum CCD separation.
    ///
    /// The maximum CCD separation.
    pub fn PxScene_getCCDMaxSeparation(self_: *const PxScene) -> f32;

    /// Set the CCD threshold.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setCCDThreshold_mut(self_: *mut PxScene, t: f32);

    /// Gets the CCD threshold.
    ///
    /// The CCD threshold.
    pub fn PxScene_getCCDThreshold(self_: *const PxScene) -> f32;

    /// Set the max bias coefficient.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setMaxBiasCoefficient_mut(self_: *mut PxScene, t: f32);

    /// Gets the max bias coefficient.
    ///
    /// The max bias coefficient.
    pub fn PxScene_getMaxBiasCoefficient(self_: *const PxScene) -> f32;

    /// Set the friction offset threshold.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setFrictionOffsetThreshold_mut(self_: *mut PxScene, t: f32);

    /// Gets the friction offset threshold.
    pub fn PxScene_getFrictionOffsetThreshold(self_: *const PxScene) -> f32;

    /// Set the friction correlation distance.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setFrictionCorrelationDistance_mut(self_: *mut PxScene, t: f32);

    /// Gets the friction correlation distance.
    pub fn PxScene_getFrictionCorrelationDistance(self_: *const PxScene) -> f32;

    /// Return the friction model.
    pub fn PxScene_getFrictionType(self_: *const PxScene) -> PxFrictionType;

    /// Return the solver model.
    pub fn PxScene_getSolverType(self_: *const PxScene) -> PxSolverType;

    /// Function that lets you set debug visualization parameters.
    ///
    /// Returns false if the value passed is out of range for usage specified by the enum.
    ///
    /// Do not use this method while the simulation is running.
    ///
    /// False if the parameter is out of range.
    pub fn PxScene_setVisualizationParameter_mut(self_: *mut PxScene, param: PxVisualizationParameter, value: f32) -> bool;

    /// Function that lets you query debug visualization parameters.
    ///
    /// The value of the parameter.
    pub fn PxScene_getVisualizationParameter(self_: *const PxScene, paramEnum: PxVisualizationParameter) -> f32;

    /// Defines a box in world space to which visualization geometry will be (conservatively) culled. Use a non-empty culling box to enable the feature, and an empty culling box to disable it.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setVisualizationCullingBox_mut(self_: *mut PxScene, box_: *const PxBounds3);

    /// Retrieves the visualization culling box.
    ///
    /// the box to which the geometry will be culled.
    pub fn PxScene_getVisualizationCullingBox(self_: *const PxScene) -> PxBounds3;

    /// Retrieves the render buffer.
    ///
    /// This will contain the results of any active visualization for this scene.
    ///
    /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will result in undefined behaviour.
    ///
    /// The render buffer.
    pub fn PxScene_getRenderBuffer_mut(self_: *mut PxScene) -> *const PxRenderBuffer;

    /// Call this method to retrieve statistics for the current simulation step.
    ///
    /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored.
    pub fn PxScene_getSimulationStatistics(self_: *const PxScene, stats: *mut PxSimulationStatistics);

    /// Returns broad-phase type.
    ///
    /// Broad-phase type
    pub fn PxScene_getBroadPhaseType(self_: *const PxScene) -> PxBroadPhaseType;

    /// Gets broad-phase caps.
    ///
    /// True if success
    pub fn PxScene_getBroadPhaseCaps(self_: *const PxScene, caps: *mut PxBroadPhaseCaps) -> bool;

    /// Returns number of regions currently registered in the broad-phase.
    ///
    /// Number of regions
    pub fn PxScene_getNbBroadPhaseRegions(self_: *const PxScene) -> u32;

    /// Gets broad-phase regions.
    ///
    /// Number of written out regions
    pub fn PxScene_getBroadPhaseRegions(self_: *const PxScene, userBuffer: *mut PxBroadPhaseRegionInfo, bufferSize: u32, startIndex: u32) -> u32;

    /// Adds a new broad-phase region.
    ///
    /// The bounds for the new region must be non-empty, otherwise an error occurs and the call is ignored.
    ///
    /// Note that by default, objects already existing in the SDK that might touch this region will not be automatically
    /// added to the region. In other words the newly created region will be empty, and will only be populated with new
    /// objects when they are added to the simulation, or with already existing objects when they are updated.
    ///
    /// It is nonetheless possible to override this default behavior and let the SDK populate the new region automatically
    /// with already existing objects overlapping the incoming region. This has a cost though, and it should only be used
    /// when the game can not guarantee that all objects within the new region will be added to the simulation after the
    /// region itself.
    ///
    /// Objects automatically move from one region to another during their lifetime. The system keeps tracks of what
    /// regions a given object is in. It is legal for an object to be in an arbitrary number of regions. However if an
    /// object leaves all regions, or is created outside of all regions, several things happen:
    /// - collisions get disabled for this object
    /// - if a PxBroadPhaseCallback object is provided, an "out-of-bounds" event is generated via that callback
    /// - if a PxBroadPhaseCallback object is not provided, a warning/error message is sent to the error stream
    ///
    /// If an object goes out-of-bounds and user deletes it during the same frame, neither the out-of-bounds event nor the
    /// error message is generated.
    ///
    /// Handle for newly created region, or 0xffffffff in case of failure.
    pub fn PxScene_addBroadPhaseRegion_mut(self_: *mut PxScene, region: *const PxBroadPhaseRegion, populateRegion: bool) -> u32;

    /// Removes a new broad-phase region.
    ///
    /// If the region still contains objects, and if those objects do not overlap any region any more, they are not
    /// automatically removed from the simulation. Instead, the PxBroadPhaseCallback::onObjectOutOfBounds notification
    /// is used for each object. Users are responsible for removing the objects from the simulation if this is the
    /// desired behavior.
    ///
    /// If the handle is invalid, or if a valid handle is removed twice, an error message is sent to the error stream.
    ///
    /// True if success
    pub fn PxScene_removeBroadPhaseRegion_mut(self_: *mut PxScene, handle: u32) -> bool;

    /// Get the task manager associated with this scene
    ///
    /// the task manager associated with the scene
    pub fn PxScene_getTaskManager(self_: *const PxScene) -> *mut PxTaskManager;

    /// Lock the scene for reading from the calling thread.
    ///
    /// When the PxSceneFlag::eREQUIRE_RW_LOCK flag is enabled lockRead() must be
    /// called before any read calls are made on the scene.
    ///
    /// Multiple threads may read at the same time, no threads may read while a thread is writing.
    /// If a call to lockRead() is made while another thread is holding a write lock
    /// then the calling thread will be blocked until the writing thread calls unlockWrite().
    ///
    /// Lock upgrading is *not* supported, that means it is an error to
    /// call lockRead() followed by lockWrite().
    ///
    /// Recursive locking is supported but each lockRead() call must be paired with an unlockRead().
    pub fn PxScene_lockRead_mut(self_: *mut PxScene, file: *const std::ffi::c_char, line: u32);

    /// Unlock the scene from reading.
    ///
    /// Each unlockRead() must be paired with a lockRead() from the same thread.
    pub fn PxScene_unlockRead_mut(self_: *mut PxScene);

    /// Lock the scene for writing from this thread.
    ///
    /// When the PxSceneFlag::eREQUIRE_RW_LOCK flag is enabled lockWrite() must be
    /// called before any write calls are made on the scene.
    ///
    /// Only one thread may write at a time and no threads may read while a thread is writing.
    /// If a call to lockWrite() is made and there are other threads reading then the
    /// calling thread will be blocked until the readers complete.
    ///
    /// Writers have priority. If a thread is blocked waiting to write then subsequent calls to
    /// lockRead() from other threads will be blocked until the writer completes.
    ///
    /// If multiple threads are waiting to write then the thread that is first
    /// granted access depends on OS scheduling.
    ///
    /// Recursive locking is supported but each lockWrite() call must be paired
    /// with an unlockWrite().
    ///
    /// If a thread has already locked the scene for writing then it may call
    /// lockRead().
    pub fn PxScene_lockWrite_mut(self_: *mut PxScene, file: *const std::ffi::c_char, line: u32);

    /// Unlock the scene from writing.
    ///
    /// Each unlockWrite() must be paired with a lockWrite() from the same thread.
    pub fn PxScene_unlockWrite_mut(self_: *mut PxScene);

    /// set the cache blocks that can be used during simulate().
    ///
    /// Each frame the simulation requires memory to store contact, friction, and contact cache data. This memory is used in blocks of 16K.
    /// Each frame the blocks used by the previous frame are freed, and may be retrieved by the application using PxScene::flushSimulation()
    ///
    /// This call will force allocation of cache blocks if the numBlocks parameter is greater than the currently allocated number
    /// of blocks, and less than the max16KContactDataBlocks parameter specified at scene creation time.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setNbContactDataBlocks_mut(self_: *mut PxScene, numBlocks: u32);

    /// get the number of cache blocks currently used by the scene
    ///
    /// This function may not be called while the scene is simulating
    ///
    /// the number of cache blocks currently used by the scene
    pub fn PxScene_getNbContactDataBlocksUsed(self_: *const PxScene) -> u32;

    /// get the maximum number of cache blocks used by the scene
    ///
    /// This function may not be called while the scene is simulating
    ///
    /// the maximum number of cache blocks everused by the scene
    pub fn PxScene_getMaxNbContactDataBlocksUsed(self_: *const PxScene) -> u32;

    /// Return the value of PxSceneDesc::contactReportStreamBufferSize that was set when creating the scene with PxPhysics::createScene
    pub fn PxScene_getContactReportStreamBufferSize(self_: *const PxScene) -> u32;

    /// Sets the number of actors required to spawn a separate rigid body solver thread.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setSolverBatchSize_mut(self_: *mut PxScene, solverBatchSize: u32);

    /// Retrieves the number of actors required to spawn a separate rigid body solver thread.
    ///
    /// Current number of actors required to spawn a separate rigid body solver thread.
    pub fn PxScene_getSolverBatchSize(self_: *const PxScene) -> u32;

    /// Sets the number of articulations required to spawn a separate rigid body solver thread.
    ///
    /// Do not use this method while the simulation is running.
    pub fn PxScene_setSolverArticulationBatchSize_mut(self_: *mut PxScene, solverBatchSize: u32);

    /// Retrieves the number of articulations required to spawn a separate rigid body solver thread.
    ///
    /// Current number of articulations required to spawn a separate rigid body solver thread.
    pub fn PxScene_getSolverArticulationBatchSize(self_: *const PxScene) -> u32;

    /// Returns the wake counter reset value.
    ///
    /// Wake counter reset value
    pub fn PxScene_getWakeCounterResetValue(self_: *const PxScene) -> f32;

    /// Shift the scene origin by the specified vector.
    ///
    /// The poses of all objects in the scene and the corresponding data structures will get adjusted to reflect the new origin location
    /// (the shift vector will get subtracted from all object positions).
    ///
    /// It is the user's responsibility to keep track of the summed total origin shift and adjust all input/output to/from PhysX accordingly.
    ///
    /// Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored.
    ///
    /// Make sure to propagate the origin shift to other dependent modules (for example, the character controller module etc.).
    ///
    /// This is an expensive operation and we recommend to use it only in the case where distance related precision issues may arise in areas far from the origin.
    pub fn PxScene_shiftOrigin_mut(self_: *mut PxScene, shift: *const PxVec3);

    /// Returns the Pvd client associated with the scene.
    ///
    /// the client, NULL if no PVD supported.
    pub fn PxScene_getScenePvdClient_mut(self_: *mut PxScene) -> *mut PxPvdSceneClient;

    /// Copy GPU articulation data from the internal GPU buffer to a user-provided device buffer.
    pub fn PxScene_copyArticulationData_mut(self_: *mut PxScene, data: *mut std::ffi::c_void, index: *mut std::ffi::c_void, dataType: PxArticulationGpuDataType, nbCopyArticulations: u32, copyEvent: *mut std::ffi::c_void);

    /// Apply GPU articulation data from a user-provided device buffer to the internal GPU buffer.
    pub fn PxScene_applyArticulationData_mut(self_: *mut PxScene, data: *mut std::ffi::c_void, index: *mut std::ffi::c_void, dataType: PxArticulationGpuDataType, nbUpdatedArticulations: u32, waitEvent: *mut std::ffi::c_void, signalEvent: *mut std::ffi::c_void);

    /// Copy GPU softbody data from the internal GPU buffer to a user-provided device buffer.
    pub fn PxScene_copySoftBodyData_mut(self_: *mut PxScene, data: *mut *mut std::ffi::c_void, dataSizes: *mut std::ffi::c_void, softBodyIndices: *mut std::ffi::c_void, flag: PxSoftBodyDataFlag, nbCopySoftBodies: u32, maxSize: u32, copyEvent: *mut std::ffi::c_void);

    /// Apply user-provided data to the internal softbody system.
    pub fn PxScene_applySoftBodyData_mut(self_: *mut PxScene, data: *mut *mut std::ffi::c_void, dataSizes: *mut std::ffi::c_void, softBodyIndices: *mut std::ffi::c_void, flag: PxSoftBodyDataFlag, nbUpdatedSoftBodies: u32, maxSize: u32, applyEvent: *mut std::ffi::c_void);

    /// Copy contact data from the internal GPU buffer to a user-provided device buffer.
    ///
    /// The contact data contains pointers to internal state and is only valid until the next call to simulate().
    pub fn PxScene_copyContactData_mut(self_: *mut PxScene, data: *mut std::ffi::c_void, maxContactPairs: u32, numContactPairs: *mut std::ffi::c_void, copyEvent: *mut std::ffi::c_void);

    /// Copy GPU rigid body data from the internal GPU buffer to a user-provided device buffer.
    pub fn PxScene_copyBodyData_mut(self_: *mut PxScene, data: *mut PxGpuBodyData, index: *mut PxGpuActorPair, nbCopyActors: u32, copyEvent: *mut std::ffi::c_void);

    /// Apply user-provided data to rigid body.
    pub fn PxScene_applyActorData_mut(self_: *mut PxScene, data: *mut std::ffi::c_void, index: *mut PxGpuActorPair, flag: PxActorCacheFlag, nbUpdatedActors: u32, waitEvent: *mut std::ffi::c_void, signalEvent: *mut std::ffi::c_void);

    /// Compute dense Jacobian matrices for specified articulations on the GPU.
    ///
    /// The size of Jacobians can vary by articulation, since it depends on the number of links, degrees-of-freedom, and whether the base is fixed.
    ///
    /// The size is determined using these formulas:
    /// nCols = (fixedBase ? 0 : 6) + dofCount
    /// nRows = (fixedBase ? 0 : 6) + (linkCount - 1) * 6;
    ///
    /// The user must ensure that adequate space is provided for each Jacobian matrix.
    pub fn PxScene_computeDenseJacobians_mut(self_: *mut PxScene, indices: *const PxIndexDataPair, nbIndices: u32, computeEvent: *mut std::ffi::c_void);

    /// Compute the joint-space inertia matrices that maps joint accelerations to joint forces: forces = M * accelerations on the GPU.
    ///
    /// The size of matrices can vary by articulation, since it depends on the number of links and degrees-of-freedom.
    ///
    /// The size is determined using this formula:
    /// sizeof(float) * dofCount * dofCount
    ///
    /// The user must ensure that adequate space is provided for each mass matrix.
    pub fn PxScene_computeGeneralizedMassMatrices_mut(self_: *mut PxScene, indices: *const PxIndexDataPair, nbIndices: u32, computeEvent: *mut std::ffi::c_void);

    /// Computes the joint DOF forces required to counteract gravitational forces for the given articulation pose.
    ///
    /// The size of the result can vary by articulation, since it depends on the number of links and degrees-of-freedom.
    ///
    /// The size is determined using this formula:
    /// sizeof(float) * dofCount
    ///
    /// The user must ensure that adequate space is provided for each articulation.
    pub fn PxScene_computeGeneralizedGravityForces_mut(self_: *mut PxScene, indices: *const PxIndexDataPair, nbIndices: u32, computeEvent: *mut std::ffi::c_void);

    /// Computes the joint DOF forces required to counteract coriolis and centrifugal forces for the given articulation pose.
    ///
    /// The size of the result can vary by articulation, since it depends on the number of links and degrees-of-freedom.
    ///
    /// The size is determined using this formula:
    /// sizeof(float) * dofCount
    ///
    /// The user must ensure that adequate space is provided for each articulation.
    pub fn PxScene_computeCoriolisAndCentrifugalForces_mut(self_: *mut PxScene, indices: *const PxIndexDataPair, nbIndices: u32, computeEvent: *mut std::ffi::c_void);

    pub fn PxScene_getGpuDynamicsConfig(self_: *const PxScene) -> PxgDynamicsMemoryConfig;

    /// Apply user-provided data to particle buffers.
    ///
    /// This function should be used if the particle buffer flags are already on the device. Otherwise, use PxParticleBuffer::raiseFlags()
    /// from the CPU.
    ///
    /// This assumes the data has been changed directly in the PxParticleBuffer.
    pub fn PxScene_applyParticleBufferData_mut(self_: *mut PxScene, indices: *const u32, bufferIndexPair: *const PxGpuParticleBufferIndexPair, flags: *const PxParticleBufferFlags, nbUpdatedBuffers: u32, waitEvent: *mut std::ffi::c_void, signalEvent: *mut std::ffi::c_void);

    /// Constructor
    pub fn PxSceneReadLock_new_alloc(scene: *mut PxScene, file: *const std::ffi::c_char, line: u32) -> *mut PxSceneReadLock;

    pub fn PxSceneReadLock_delete(self_: *mut PxSceneReadLock);

    /// Constructor
    pub fn PxSceneWriteLock_new_alloc(scene: *mut PxScene, file: *const std::ffi::c_char, line: u32) -> *mut PxSceneWriteLock;

    pub fn PxSceneWriteLock_delete(self_: *mut PxSceneWriteLock);

    pub fn PxContactPairExtraDataItem_new() -> PxContactPairExtraDataItem;

    pub fn PxContactPairVelocity_new() -> PxContactPairVelocity;

    pub fn PxContactPairPose_new() -> PxContactPairPose;

    pub fn PxContactPairIndex_new() -> PxContactPairIndex;

    /// Constructor
    pub fn PxContactPairExtraDataIterator_new(stream: *const u8, size: u32) -> PxContactPairExtraDataIterator;

    /// Advances the iterator to next set of extra data items.
    ///
    /// The contact pair extra data stream contains sets of items as requested by the corresponding [`PxPairFlag`] flags
    /// [`PxPairFlag::ePRE_SOLVER_VELOCITY`], #PxPairFlag::ePOST_SOLVER_VELOCITY, #PxPairFlag::eCONTACT_EVENT_POSE. A set can contain one
    /// item of each plus the PxContactPairIndex item. This method parses the stream and points the iterator
    /// member variables to the corresponding items of the current set, if they are available. If CCD is not enabled,
    /// you should only get one set of items. If CCD with multiple passes is enabled, you might get more than one item
    /// set.
    ///
    /// Even though contact pair extra data is requested per shape pair, you will not get an item set per shape pair
    /// but one per actor pair. If, for example, an actor has two shapes and both collide with another actor, then
    /// there will only be one item set (since it applies to both shape pairs).
    ///
    /// True if there was another set of extra data items in the stream, else false.
    pub fn PxContactPairExtraDataIterator_nextItemSet_mut(self_: *mut PxContactPairExtraDataIterator) -> bool;

    pub fn PxContactPairHeader_new() -> PxContactPairHeader;

    pub fn PxContactPair_new() -> PxContactPair;

    /// Extracts the contact points from the stream and stores them in a convenient format.
    ///
    /// Number of contact points written to the buffer.
    pub fn PxContactPair_extractContacts(self_: *const PxContactPair, userBuffer: *mut PxContactPairPoint, bufferSize: u32) -> u32;

    /// Helper method to clone the contact pair and copy the contact data stream into a user buffer.
    ///
    /// The contact data stream is only accessible during the contact report callback. This helper function provides copy functionality
    /// to buffer the contact stream information such that it can get accessed at a later stage.
    pub fn PxContactPair_bufferContacts(self_: *const PxContactPair, newPair: *mut PxContactPair, bufferMemory: *mut u8);

    pub fn PxContactPair_getInternalFaceIndices(self_: *const PxContactPair) -> *const u32;

    pub fn PxTriggerPair_new() -> PxTriggerPair;

    pub fn PxConstraintInfo_new() -> PxConstraintInfo;

    pub fn PxConstraintInfo_new_1(c: *mut PxConstraint, extRef: *mut std::ffi::c_void, t: u32) -> PxConstraintInfo;

    /// This is called when a breakable constraint breaks.
    ///
    /// The user should not release the constraint shader inside this call!
    ///
    /// No event will get reported if the constraint breaks but gets deleted while the time step is still being simulated.
    pub fn PxSimulationEventCallback_onConstraintBreak_mut(self_: *mut PxSimulationEventCallback, constraints: *mut PxConstraintInfo, count: u32);

    /// This is called with the actors which have just been woken up.
    ///
    /// Only supported by rigid bodies yet.
    ///
    /// Only called on actors for which the PxActorFlag eSEND_SLEEP_NOTIFIES has been set.
    ///
    /// Only the latest sleep state transition happening between fetchResults() of the previous frame and fetchResults() of the current frame
    /// will get reported. For example, let us assume actor A is awake, then A->putToSleep() gets called, then later A->wakeUp() gets called.
    /// At the next simulate/fetchResults() step only an onWake() event will get triggered because that was the last transition.
    ///
    /// If an actor gets newly added to a scene with properties such that it is awake and the sleep state does not get changed by
    /// the user or simulation, then an onWake() event will get sent at the next simulate/fetchResults() step.
    pub fn PxSimulationEventCallback_onWake_mut(self_: *mut PxSimulationEventCallback, actors: *mut *mut PxActor, count: u32);

    /// This is called with the actors which have just been put to sleep.
    ///
    /// Only supported by rigid bodies yet.
    ///
    /// Only called on actors for which the PxActorFlag eSEND_SLEEP_NOTIFIES has been set.
    ///
    /// Only the latest sleep state transition happening between fetchResults() of the previous frame and fetchResults() of the current frame
    /// will get reported. For example, let us assume actor A is asleep, then A->wakeUp() gets called, then later A->putToSleep() gets called.
    /// At the next simulate/fetchResults() step only an onSleep() event will get triggered because that was the last transition (assuming the simulation
    /// does not wake the actor up).
    ///
    /// If an actor gets newly added to a scene with properties such that it is asleep and the sleep state does not get changed by
    /// the user or simulation, then an onSleep() event will get sent at the next simulate/fetchResults() step.
    pub fn PxSimulationEventCallback_onSleep_mut(self_: *mut PxSimulationEventCallback, actors: *mut *mut PxActor, count: u32);

    /// This is called when certain contact events occur.
    ///
    /// The method will be called for a pair of actors if one of the colliding shape pairs requested contact notification.
    /// You request which events are reported using the filter shader/callback mechanism (see [`PxSimulationFilterShader`],
    /// [`PxSimulationFilterCallback`], #PxPairFlag).
    ///
    /// Do not keep references to the passed objects, as they will be
    /// invalid after this function returns.
    pub fn PxSimulationEventCallback_onContact_mut(self_: *mut PxSimulationEventCallback, pairHeader: *const PxContactPairHeader, pairs: *const PxContactPair, nbPairs: u32);

    /// This is called with the current trigger pair events.
    ///
    /// Shapes which have been marked as triggers using PxShapeFlag::eTRIGGER_SHAPE will send events
    /// according to the pair flag specification in the filter shader (see [`PxPairFlag`], #PxSimulationFilterShader).
    ///
    /// Trigger shapes will no longer send notification events for interactions with other trigger shapes.
    pub fn PxSimulationEventCallback_onTrigger_mut(self_: *mut PxSimulationEventCallback, pairs: *mut PxTriggerPair, count: u32);

    /// Provides early access to the new pose of moving rigid bodies.
    ///
    /// When this call occurs, rigid bodies having the [`PxRigidBodyFlag::eENABLE_POSE_INTEGRATION_PREVIEW`]
    /// flag set, were moved by the simulation and their new poses can be accessed through the provided buffers.
    ///
    /// The provided buffers are valid and can be read until the next call to [`PxScene::simulate`]() or #PxScene::collide().
    ///
    /// This callback gets triggered while the simulation is running. If the provided rigid body references are used to
    /// read properties of the object, then the callback has to guarantee no other thread is writing to the same body at the same
    /// time.
    ///
    /// The code in this callback should be lightweight as it can block the simulation, that is, the
    /// [`PxScene::fetchResults`]() call.
    pub fn PxSimulationEventCallback_onAdvance_mut(self_: *mut PxSimulationEventCallback, bodyBuffer: *const *const PxRigidBody, poseBuffer: *const PxTransform, count: u32);

    pub fn PxSimulationEventCallback_delete(self_: *mut PxSimulationEventCallback);

    pub fn PxFEMParameters_new() -> PxFEMParameters;

    /// Release this object.
    pub fn PxPruningStructure_release_mut(self_: *mut PxPruningStructure);

    /// Retrieve rigid actors in the pruning structure.
    ///
    /// You can retrieve the number of rigid actor pointers by calling [`getNbRigidActors`]()
    ///
    /// Number of rigid actor pointers written to the buffer.
    pub fn PxPruningStructure_getRigidActors(self_: *const PxPruningStructure, userBuffer: *mut *mut PxRigidActor, bufferSize: u32, startIndex: u32) -> u32;

    /// Returns the number of rigid actors in the pruning structure.
    ///
    /// You can use [`getRigidActors`]() to retrieve the rigid actor pointers.
    ///
    /// Number of rigid actors in the pruning structure.
    pub fn PxPruningStructure_getNbRigidActors(self_: *const PxPruningStructure) -> u32;

    /// Gets the merge data for static actors
    ///
    /// This is mainly called by the PxSceneQuerySystem::merge() function to merge a PxPruningStructure
    /// with the internal data-structures of the scene-query system.
    ///
    /// Implementation-dependent merge data for static actors.
    pub fn PxPruningStructure_getStaticMergeData(self_: *const PxPruningStructure) -> *const std::ffi::c_void;

    /// Gets the merge data for dynamic actors
    ///
    /// This is mainly called by the PxSceneQuerySystem::merge() function to merge a PxPruningStructure
    /// with the internal data-structures of the scene-query system.
    ///
    /// Implementation-dependent merge data for dynamic actors.
    pub fn PxPruningStructure_getDynamicMergeData(self_: *const PxPruningStructure) -> *const std::ffi::c_void;

    pub fn PxPruningStructure_getConcreteTypeName(self_: *const PxPruningStructure) -> *const std::ffi::c_char;

    pub fn PxExtendedVec3_new() -> PxExtendedVec3;

    pub fn PxExtendedVec3_new_1(_x: f64, _y: f64, _z: f64) -> PxExtendedVec3;

    pub fn PxExtendedVec3_isZero(self_: *const PxExtendedVec3) -> bool;

    pub fn PxExtendedVec3_dot(self_: *const PxExtendedVec3, v: *const PxVec3) -> f64;

    pub fn PxExtendedVec3_distanceSquared(self_: *const PxExtendedVec3, v: *const PxExtendedVec3) -> f64;

    pub fn PxExtendedVec3_magnitudeSquared(self_: *const PxExtendedVec3) -> f64;

    pub fn PxExtendedVec3_magnitude(self_: *const PxExtendedVec3) -> f64;

    pub fn PxExtendedVec3_normalize_mut(self_: *mut PxExtendedVec3) -> f64;

    pub fn PxExtendedVec3_isFinite(self_: *const PxExtendedVec3) -> bool;

    pub fn PxExtendedVec3_maximum_mut(self_: *mut PxExtendedVec3, v: *const PxExtendedVec3);

    pub fn PxExtendedVec3_minimum_mut(self_: *mut PxExtendedVec3, v: *const PxExtendedVec3);

    pub fn PxExtendedVec3_set_mut(self_: *mut PxExtendedVec3, x_: f64, y_: f64, z_: f64);

    pub fn PxExtendedVec3_setPlusInfinity_mut(self_: *mut PxExtendedVec3);

    pub fn PxExtendedVec3_setMinusInfinity_mut(self_: *mut PxExtendedVec3);

    pub fn PxExtendedVec3_cross_mut(self_: *mut PxExtendedVec3, left: *const PxExtendedVec3, right: *const PxVec3);

    pub fn PxExtendedVec3_cross_mut_1(self_: *mut PxExtendedVec3, left: *const PxExtendedVec3, right: *const PxExtendedVec3);

    pub fn PxExtendedVec3_cross(self_: *const PxExtendedVec3, v: *const PxExtendedVec3) -> PxExtendedVec3;

    pub fn PxExtendedVec3_cross_mut_2(self_: *mut PxExtendedVec3, left: *const PxVec3, right: *const PxExtendedVec3);

    pub fn phys_toVec3(v: *const PxExtendedVec3) -> PxVec3;

    pub fn PxObstacle_getType(self_: *const PxObstacle) -> PxGeometryType;

    pub fn PxBoxObstacle_new() -> PxBoxObstacle;

    pub fn PxCapsuleObstacle_new() -> PxCapsuleObstacle;

    /// Releases the context.
    pub fn PxObstacleContext_release_mut(self_: *mut PxObstacleContext);

    /// Retrieves the controller manager associated with this context.
    ///
    /// The associated controller manager
    pub fn PxObstacleContext_getControllerManager(self_: *const PxObstacleContext) -> *mut PxControllerManager;

    /// Adds an obstacle to the context.
    ///
    /// Handle for newly-added obstacle
    pub fn PxObstacleContext_addObstacle_mut(self_: *mut PxObstacleContext, obstacle: *const PxObstacle) -> u32;

    /// Removes an obstacle from the context.
    ///
    /// True if success
    pub fn PxObstacleContext_removeObstacle_mut(self_: *mut PxObstacleContext, handle: u32) -> bool;

    /// Updates data for an existing obstacle.
    ///
    /// True if success
    pub fn PxObstacleContext_updateObstacle_mut(self_: *mut PxObstacleContext, handle: u32, obstacle: *const PxObstacle) -> bool;

    /// Retrieves number of obstacles in the context.
    ///
    /// Number of obstacles in the context
    pub fn PxObstacleContext_getNbObstacles(self_: *const PxObstacleContext) -> u32;

    /// Retrieves desired obstacle.
    ///
    /// Desired obstacle
    pub fn PxObstacleContext_getObstacle(self_: *const PxObstacleContext, i: u32) -> *const PxObstacle;

    /// Retrieves desired obstacle by given handle.
    ///
    /// Desired obstacle
    pub fn PxObstacleContext_getObstacleByHandle(self_: *const PxObstacleContext, handle: u32) -> *const PxObstacle;

    /// Called when current controller hits a shape.
    ///
    /// This is called when the CCT moves and hits a shape. This will not be called when a moving shape hits a non-moving CCT.
    pub fn PxUserControllerHitReport_onShapeHit_mut(self_: *mut PxUserControllerHitReport, hit: *const PxControllerShapeHit);

    /// Called when current controller hits another controller.
    pub fn PxUserControllerHitReport_onControllerHit_mut(self_: *mut PxUserControllerHitReport, hit: *const PxControllersHit);

    /// Called when current controller hits a user-defined obstacle.
    pub fn PxUserControllerHitReport_onObstacleHit_mut(self_: *mut PxUserControllerHitReport, hit: *const PxControllerObstacleHit);

    pub fn PxControllerFilterCallback_delete(self_: *mut PxControllerFilterCallback);

    /// Filtering method for CCT-vs-CCT.
    ///
    /// true to keep the pair, false to filter it out
    pub fn PxControllerFilterCallback_filter_mut(self_: *mut PxControllerFilterCallback, a: *const PxController, b: *const PxController) -> bool;

    pub fn PxControllerFilters_new(filterData: *const PxFilterData, cb: *mut PxQueryFilterCallback, cctFilterCb: *mut PxControllerFilterCallback) -> PxControllerFilters;

    /// returns true if the current settings are valid
    ///
    /// True if the descriptor is valid.
    pub fn PxControllerDesc_isValid(self_: *const PxControllerDesc) -> bool;

    /// Returns the character controller type
    ///
    /// The controllers type.
    pub fn PxControllerDesc_getType(self_: *const PxControllerDesc) -> PxControllerShapeType;

    /// Return the type of controller
    pub fn PxController_getType(self_: *const PxController) -> PxControllerShapeType;

    /// Releases the controller.
    pub fn PxController_release_mut(self_: *mut PxController);

    /// Moves the character using a "collide-and-slide" algorithm.
    ///
    /// Collision flags, collection of ::PxControllerCollisionFlags
    pub fn PxController_move_mut(self_: *mut PxController, disp: *const PxVec3, minDist: f32, elapsedTime: f32, filters: *const PxControllerFilters, obstacles: *const PxObstacleContext) -> PxControllerCollisionFlags;

    /// Sets controller's position.
    ///
    /// The position controlled by this function is the center of the collision shape.
    ///
    /// This is a 'teleport' function, it doesn't check for collisions.
    ///
    /// The character's position must be such that it does not overlap the static geometry.
    ///
    /// To move the character under normal conditions use the [`move`]() function.
    ///
    /// Currently always returns true.
    pub fn PxController_setPosition_mut(self_: *mut PxController, position: *const PxExtendedVec3) -> bool;

    /// Retrieve the raw position of the controller.
    ///
    /// The position retrieved by this function is the center of the collision shape. To retrieve the bottom position of the shape,
    /// a.k.a. the foot position, use the getFootPosition() function.
    ///
    /// The position is updated by calls to move(). Calling this method without calling
    /// move() will return the last position or the initial position of the controller.
    ///
    /// The controller's center position
    pub fn PxController_getPosition(self_: *const PxController) -> *const PxExtendedVec3;

    /// Set controller's foot position.
    ///
    /// The position controlled by this function is the bottom of the collision shape, a.k.a. the foot position.
    ///
    /// The foot position takes the contact offset into account
    ///
    /// This is a 'teleport' function, it doesn't check for collisions.
    ///
    /// To move the character under normal conditions use the [`move`]() function.
    ///
    /// Currently always returns true.
    pub fn PxController_setFootPosition_mut(self_: *mut PxController, position: *const PxExtendedVec3) -> bool;

    /// Retrieve the "foot" position of the controller, i.e. the position of the bottom of the CCT's shape.
    ///
    /// The foot position takes the contact offset into account
    ///
    /// The controller's foot position
    pub fn PxController_getFootPosition(self_: *const PxController) -> PxExtendedVec3;

    /// Get the rigid body actor associated with this controller (see PhysX documentation).
    /// The behavior upon manually altering this actor is undefined, you should primarily
    /// use it for reading const properties.
    ///
    /// the actor associated with the controller.
    pub fn PxController_getActor(self_: *const PxController) -> *mut PxRigidDynamic;

    /// The step height.
    pub fn PxController_setStepOffset_mut(self_: *mut PxController, offset: f32);

    /// Retrieve the step height.
    ///
    /// The step offset for the controller.
    pub fn PxController_getStepOffset(self_: *const PxController) -> f32;

    /// Sets the non-walkable mode for the CCT.
    pub fn PxController_setNonWalkableMode_mut(self_: *mut PxController, flag: PxControllerNonWalkableMode);

    /// Retrieves the non-walkable mode for the CCT.
    ///
    /// The current non-walkable mode.
    pub fn PxController_getNonWalkableMode(self_: *const PxController) -> PxControllerNonWalkableMode;

    /// Retrieve the contact offset.
    ///
    /// The contact offset for the controller.
    pub fn PxController_getContactOffset(self_: *const PxController) -> f32;

    /// Sets the contact offset.
    pub fn PxController_setContactOffset_mut(self_: *mut PxController, offset: f32);

    /// Retrieve the 'up' direction.
    ///
    /// The up direction for the controller.
    pub fn PxController_getUpDirection(self_: *const PxController) -> PxVec3;

    /// Sets the 'up' direction.
    pub fn PxController_setUpDirection_mut(self_: *mut PxController, up: *const PxVec3);

    /// Retrieve the slope limit.
    ///
    /// The slope limit for the controller.
    pub fn PxController_getSlopeLimit(self_: *const PxController) -> f32;

    /// Sets the slope limit.
    ///
    /// This feature can not be enabled at runtime, i.e. if the slope limit is zero when creating the CCT
    /// (which disables the feature) then changing the slope limit at runtime will not have any effect, and the call
    /// will be ignored.
    pub fn PxController_setSlopeLimit_mut(self_: *mut PxController, slopeLimit: f32);

    /// Flushes internal geometry cache.
    ///
    /// The character controller uses caching in order to speed up collision testing. The cache is
    /// automatically flushed when a change to static objects is detected in the scene. For example when a
    /// static shape is added, updated, or removed from the scene, the cache is automatically invalidated.
    ///
    /// However there may be situations that cannot be automatically detected, and those require manual
    /// invalidation of the cache. Currently the user must call this when the filtering behavior changes (the
    /// PxControllerFilters parameter of the PxController::move call).  While the controller in principle
    /// could detect a change in these parameters, it cannot detect a change in the behavior of the filtering
    /// function.
    pub fn PxController_invalidateCache_mut(self_: *mut PxController);

    /// Retrieve the scene associated with the controller.
    ///
    /// The physics scene
    pub fn PxController_getScene_mut(self_: *mut PxController) -> *mut PxScene;

    /// Returns the user data associated with this controller.
    ///
    /// The user pointer associated with the controller.
    pub fn PxController_getUserData(self_: *const PxController) -> *mut std::ffi::c_void;

    /// Sets the user data associated with this controller.
    pub fn PxController_setUserData_mut(self_: *mut PxController, userData: *mut std::ffi::c_void);

    /// Returns information about the controller's internal state.
    pub fn PxController_getState(self_: *const PxController, state: *mut PxControllerState);

    /// Returns the controller's internal statistics.
    pub fn PxController_getStats(self_: *const PxController, stats: *mut PxControllerStats);

    /// Resizes the controller.
    ///
    /// This function attempts to resize the controller to a given size, while making sure the bottom
    /// position of the controller remains constant. In other words the function modifies both the
    /// height and the (center) position of the controller. This is a helper function that can be used
    /// to implement a 'crouch' functionality for example.
    pub fn PxController_resize_mut(self_: *mut PxController, height: f32);

    /// constructor sets to default.
    pub fn PxBoxControllerDesc_new_alloc() -> *mut PxBoxControllerDesc;

    pub fn PxBoxControllerDesc_delete(self_: *mut PxBoxControllerDesc);

    /// (re)sets the structure to the default.
    pub fn PxBoxControllerDesc_setToDefault_mut(self_: *mut PxBoxControllerDesc);

    /// returns true if the current settings are valid
    ///
    /// True if the descriptor is valid.
    pub fn PxBoxControllerDesc_isValid(self_: *const PxBoxControllerDesc) -> bool;

    /// Gets controller's half height.
    ///
    /// The half height of the controller.
    pub fn PxBoxController_getHalfHeight(self_: *const PxBoxController) -> f32;

    /// Gets controller's half side extent.
    ///
    /// The half side extent of the controller.
    pub fn PxBoxController_getHalfSideExtent(self_: *const PxBoxController) -> f32;

    /// Gets controller's half forward extent.
    ///
    /// The half forward extent of the controller.
    pub fn PxBoxController_getHalfForwardExtent(self_: *const PxBoxController) -> f32;

    /// Sets controller's half height.
    ///
    /// this doesn't check for collisions.
    ///
    /// Currently always true.
    pub fn PxBoxController_setHalfHeight_mut(self_: *mut PxBoxController, halfHeight: f32) -> bool;

    /// Sets controller's half side extent.
    ///
    /// this doesn't check for collisions.
    ///
    /// Currently always true.
    pub fn PxBoxController_setHalfSideExtent_mut(self_: *mut PxBoxController, halfSideExtent: f32) -> bool;

    /// Sets controller's half forward extent.
    ///
    /// this doesn't check for collisions.
    ///
    /// Currently always true.
    pub fn PxBoxController_setHalfForwardExtent_mut(self_: *mut PxBoxController, halfForwardExtent: f32) -> bool;

    /// constructor sets to default.
    pub fn PxCapsuleControllerDesc_new_alloc() -> *mut PxCapsuleControllerDesc;

    pub fn PxCapsuleControllerDesc_delete(self_: *mut PxCapsuleControllerDesc);

    /// (re)sets the structure to the default.
    pub fn PxCapsuleControllerDesc_setToDefault_mut(self_: *mut PxCapsuleControllerDesc);

    /// returns true if the current settings are valid
    ///
    /// True if the descriptor is valid.
    pub fn PxCapsuleControllerDesc_isValid(self_: *const PxCapsuleControllerDesc) -> bool;

    /// Gets controller's radius.
    ///
    /// The radius of the controller.
    pub fn PxCapsuleController_getRadius(self_: *const PxCapsuleController) -> f32;

    /// Sets controller's radius.
    ///
    /// this doesn't check for collisions.
    ///
    /// Currently always true.
    pub fn PxCapsuleController_setRadius_mut(self_: *mut PxCapsuleController, radius: f32) -> bool;

    /// Gets controller's height.
    ///
    /// The height of the capsule controller.
    pub fn PxCapsuleController_getHeight(self_: *const PxCapsuleController) -> f32;

    /// Resets controller's height.
    ///
    /// this doesn't check for collisions.
    ///
    /// Currently always true.
    pub fn PxCapsuleController_setHeight_mut(self_: *mut PxCapsuleController, height: f32) -> bool;

    /// Gets controller's climbing mode.
    ///
    /// The capsule controller's climbing mode.
    pub fn PxCapsuleController_getClimbingMode(self_: *const PxCapsuleController) -> PxCapsuleClimbingMode;

    /// Sets controller's climbing mode.
    pub fn PxCapsuleController_setClimbingMode_mut(self_: *mut PxCapsuleController, mode: PxCapsuleClimbingMode) -> bool;

    /// Retrieve behavior flags for a shape.
    ///
    /// When the CCT touches a shape, the CCT's behavior w.r.t. this shape can be customized by users.
    /// This function retrieves the desired PxControllerBehaviorFlag flags capturing the desired behavior.
    ///
    /// See comments about deprecated functions at the start of this class
    ///
    /// Desired behavior flags for the given shape
    pub fn PxControllerBehaviorCallback_getBehaviorFlags_mut(self_: *mut PxControllerBehaviorCallback, shape: *const PxShape, actor: *const PxActor) -> PxControllerBehaviorFlags;

    /// Retrieve behavior flags for a controller.
    ///
    /// When the CCT touches a controller, the CCT's behavior w.r.t. this controller can be customized by users.
    /// This function retrieves the desired PxControllerBehaviorFlag flags capturing the desired behavior.
    ///
    /// The flag PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT is not supported.
    ///
    /// See comments about deprecated functions at the start of this class
    ///
    /// Desired behavior flags for the given controller
    pub fn PxControllerBehaviorCallback_getBehaviorFlags_mut_1(self_: *mut PxControllerBehaviorCallback, controller: *const PxController) -> PxControllerBehaviorFlags;

    /// Retrieve behavior flags for an obstacle.
    ///
    /// When the CCT touches an obstacle, the CCT's behavior w.r.t. this obstacle can be customized by users.
    /// This function retrieves the desired PxControllerBehaviorFlag flags capturing the desired behavior.
    ///
    /// See comments about deprecated functions at the start of this class
    ///
    /// Desired behavior flags for the given obstacle
    pub fn PxControllerBehaviorCallback_getBehaviorFlags_mut_2(self_: *mut PxControllerBehaviorCallback, obstacle: *const PxObstacle) -> PxControllerBehaviorFlags;

    /// Releases the controller manager.
    ///
    /// This will release all associated controllers and obstacle contexts.
    ///
    /// This function is required to be called to release foundation usage.
    pub fn PxControllerManager_release_mut(self_: *mut PxControllerManager);

    /// Returns the scene the manager is adding the controllers to.
    ///
    /// The associated physics scene.
    pub fn PxControllerManager_getScene(self_: *const PxControllerManager) -> *mut PxScene;

    /// Returns the number of controllers that are being managed.
    ///
    /// The number of controllers.
    pub fn PxControllerManager_getNbControllers(self_: *const PxControllerManager) -> u32;

    /// Retrieve one of the controllers in the manager.
    ///
    /// The controller with the specified index.
    pub fn PxControllerManager_getController_mut(self_: *mut PxControllerManager, index: u32) -> *mut PxController;

    /// Creates a new character controller.
    ///
    /// The new controller
    pub fn PxControllerManager_createController_mut(self_: *mut PxControllerManager, desc: *const PxControllerDesc) -> *mut PxController;

    /// Releases all the controllers that are being managed.
    pub fn PxControllerManager_purgeControllers_mut(self_: *mut PxControllerManager);

    /// Retrieves debug data.
    ///
    /// The render buffer filled with debug-render data
    pub fn PxControllerManager_getRenderBuffer_mut(self_: *mut PxControllerManager) -> *mut PxRenderBuffer;

    /// Sets debug rendering flags
    pub fn PxControllerManager_setDebugRenderingFlags_mut(self_: *mut PxControllerManager, flags: PxControllerDebugRenderFlags);

    /// Returns the number of obstacle contexts that are being managed.
    ///
    /// The number of obstacle contexts.
    pub fn PxControllerManager_getNbObstacleContexts(self_: *const PxControllerManager) -> u32;

    /// Retrieve one of the obstacle contexts in the manager.
    ///
    /// The obstacle context with the specified index.
    pub fn PxControllerManager_getObstacleContext_mut(self_: *mut PxControllerManager, index: u32) -> *mut PxObstacleContext;

    /// Creates an obstacle context.
    ///
    /// New obstacle context
    pub fn PxControllerManager_createObstacleContext_mut(self_: *mut PxControllerManager) -> *mut PxObstacleContext;

    /// Computes character-character interactions.
    ///
    /// This function is an optional helper to properly resolve interactions between characters, in case they overlap (which can happen for gameplay reasons, etc).
    ///
    /// You should call this once per frame, before your PxController::move() calls. The function will not move the characters directly, but it will
    /// compute overlap information for each character that will be used in the next move() call.
    ///
    /// You need to provide a proper time value here so that interactions are resolved in a way that do not depend on the framerate.
    ///
    /// If you only have one character in the scene, or if you can guarantee your characters will never overlap, then you do not need to call this function.
    ///
    /// Releasing the manager will automatically release all the associated obstacle contexts.
    pub fn PxControllerManager_computeInteractions_mut(self_: *mut PxControllerManager, elapsedTime: f32, cctFilterCb: *mut PxControllerFilterCallback);

    /// Enables or disables runtime tessellation.
    ///
    /// Large triangles can create accuracy issues in the sweep code, which in turn can lead to characters not sliding smoothly
    /// against geometries, or even penetrating them. This feature allows one to reduce those issues by tessellating large
    /// triangles at runtime, before performing sweeps against them. The amount of tessellation is controlled by the 'maxEdgeLength' parameter.
    /// Any triangle with at least one edge length greater than the maxEdgeLength will get recursively tessellated, until resulting triangles are small enough.
    ///
    /// This features only applies to triangle meshes, convex meshes, heightfields and boxes.
    pub fn PxControllerManager_setTessellation_mut(self_: *mut PxControllerManager, flag: bool, maxEdgeLength: f32);

    /// Enables or disables the overlap recovery module.
    ///
    /// The overlap recovery module can be used to depenetrate CCTs from static objects when an overlap is detected. This can happen
    /// in three main cases:
    /// - when the CCT is directly spawned or teleported in another object
    /// - when the CCT algorithm fails due to limited FPU accuracy
    /// - when the "up vector" is modified, making the rotated CCT shape overlap surrounding objects
    ///
    /// When activated, the CCT module will automatically try to resolve the penetration, and move the CCT to a safe place where it does
    /// not overlap other objects anymore. This only concerns static objects, dynamic objects are ignored by the recovery module.
    ///
    /// When the recovery module is not activated, it is possible for the CCTs to go through static objects. By default, the recovery
    /// module is enabled.
    ///
    /// The recovery module currently works with all geometries except heightfields.
    pub fn PxControllerManager_setOverlapRecoveryModule_mut(self_: *mut PxControllerManager, flag: bool);

    /// Enables or disables the precise sweeps.
    ///
    /// Precise sweeps are more accurate, but also potentially slower than regular sweeps.
    ///
    /// By default, precise sweeps are enabled.
    pub fn PxControllerManager_setPreciseSweeps_mut(self_: *mut PxControllerManager, flag: bool);

    /// Enables or disables vertical sliding against ceilings.
    ///
    /// Geometry is seen as "ceilings" when the following condition is met:
    ///
    /// dot product(contact normal, up direction)
    /// <
    /// 0.0f
    ///
    /// This flag controls whether characters should slide vertically along the geometry in that case.
    ///
    /// By default, sliding is allowed.
    pub fn PxControllerManager_setPreventVerticalSlidingAgainstCeiling_mut(self_: *mut PxControllerManager, flag: bool);

    /// Shift the origin of the character controllers and obstacle objects by the specified vector.
    ///
    /// The positions of all character controllers, obstacle objects and the corresponding data structures will get adjusted to reflect the shifted origin location
    /// (the shift vector will get subtracted from all character controller and obstacle object positions).
    ///
    /// It is the user's responsibility to keep track of the summed total origin shift and adjust all input/output to/from PhysXCharacterKinematic accordingly.
    ///
    /// This call will not automatically shift the PhysX scene and its objects. You need to call PxScene::shiftOrigin() seperately to keep the systems in sync.
    pub fn PxControllerManager_shiftOrigin_mut(self_: *mut PxControllerManager, shift: *const PxVec3);

    /// Creates the controller manager.
    ///
    /// The character controller is informed by [`PxDeletionListener::onRelease`]() when actors or shapes are released, and updates its internal
    /// caches accordingly. If character controller movement or a call to [`PxControllerManager::shiftOrigin`]() may overlap with actor/shape releases,
    /// internal data structures must be guarded against concurrent access.
    ///
    /// Locking guarantees thread safety in such scenarios.
    ///
    /// locking may result in significant slowdown for release of actors or shapes.
    ///
    /// By default, locking is disabled.
    pub fn phys_PxCreateControllerManager(scene: *mut PxScene, lockingEnabled: bool) -> *mut PxControllerManager;

    pub fn PxDim3_new() -> PxDim3;

    /// Constructor
    pub fn PxSDFDesc_new() -> PxSDFDesc;

    /// Returns true if the descriptor is valid.
    ///
    /// true if the current settings are valid
    pub fn PxSDFDesc_isValid(self_: *const PxSDFDesc) -> bool;

    /// constructor sets to default.
    pub fn PxConvexMeshDesc_new() -> PxConvexMeshDesc;

    /// (re)sets the structure to the default.
    pub fn PxConvexMeshDesc_setToDefault_mut(self_: *mut PxConvexMeshDesc);

    /// Returns true if the descriptor is valid.
    ///
    /// True if the current settings are valid
    pub fn PxConvexMeshDesc_isValid(self_: *const PxConvexMeshDesc) -> bool;

    /// Constructor sets to default.
    pub fn PxTriangleMeshDesc_new() -> PxTriangleMeshDesc;

    /// (re)sets the structure to the default.
    pub fn PxTriangleMeshDesc_setToDefault_mut(self_: *mut PxTriangleMeshDesc);

    /// Returns true if the descriptor is valid.
    ///
    /// true if the current settings are valid
    pub fn PxTriangleMeshDesc_isValid(self_: *const PxTriangleMeshDesc) -> bool;

    /// Constructor to build an empty tetmesh description
    pub fn PxTetrahedronMeshDesc_new() -> PxTetrahedronMeshDesc;

    pub fn PxTetrahedronMeshDesc_isValid(self_: *const PxTetrahedronMeshDesc) -> bool;

    /// Constructor to build an empty simulation description
    pub fn PxSoftBodySimulationDataDesc_new() -> PxSoftBodySimulationDataDesc;

    pub fn PxSoftBodySimulationDataDesc_isValid(self_: *const PxSoftBodySimulationDataDesc) -> bool;

    /// Desc initialization to default value.
    pub fn PxBVH34MidphaseDesc_setToDefault_mut(self_: *mut PxBVH34MidphaseDesc);

    /// Returns true if the descriptor is valid.
    ///
    /// true if the current settings are valid.
    pub fn PxBVH34MidphaseDesc_isValid(self_: *const PxBVH34MidphaseDesc) -> bool;

    pub fn PxMidphaseDesc_new() -> PxMidphaseDesc;

    /// Returns type of midphase mesh structure.
    ///
    /// PxMeshMidPhase::Enum
    pub fn PxMidphaseDesc_getType(self_: *const PxMidphaseDesc) -> PxMeshMidPhase;

    /// Initialize the midphase mesh structure descriptor
    pub fn PxMidphaseDesc_setToDefault_mut(self_: *mut PxMidphaseDesc, type_: PxMeshMidPhase);

    /// Returns true if the descriptor is valid.
    ///
    /// true if the current settings are valid.
    pub fn PxMidphaseDesc_isValid(self_: *const PxMidphaseDesc) -> bool;

    pub fn PxBVHDesc_new() -> PxBVHDesc;

    /// Initialize the BVH descriptor
    pub fn PxBVHDesc_setToDefault_mut(self_: *mut PxBVHDesc);

    /// Returns true if the descriptor is valid.
    ///
    /// true if the current settings are valid.
    pub fn PxBVHDesc_isValid(self_: *const PxBVHDesc) -> bool;

    pub fn PxCookingParams_new(sc: *const PxTolerancesScale) -> PxCookingParams;

    pub fn phys_PxGetStandaloneInsertionCallback() -> *mut PxInsertionCallback;

    /// Cooks a bounding volume hierarchy. The results are written to the stream.
    ///
    /// PxCookBVH() allows a BVH description to be cooked into a binary stream
    /// suitable for loading and performing BVH detection at runtime.
    ///
    /// true on success.
    pub fn phys_PxCookBVH(desc: *const PxBVHDesc, stream: *mut PxOutputStream) -> bool;

    /// Cooks and creates a bounding volume hierarchy without going through a stream.
    ///
    /// This method does the same as cookBVH, but the produced BVH is not stored
    /// into a stream but is either directly inserted in PxPhysics, or created as a standalone
    /// object. Use this method if you are unable to cook offline.
    ///
    /// PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback()
    /// or PxCooking::getStandaloneInsertionCallback().
    ///
    /// PxBVH pointer on success
    pub fn phys_PxCreateBVH(desc: *const PxBVHDesc, insertionCallback: *mut PxInsertionCallback) -> *mut PxBVH;

    /// Cooks a heightfield. The results are written to the stream.
    ///
    /// To create a heightfield object there is an option to precompute some of calculations done while loading the heightfield data.
    ///
    /// cookHeightField() allows a heightfield description to be cooked into a binary stream
    /// suitable for loading and performing collision detection at runtime.
    ///
    /// true on success
    pub fn phys_PxCookHeightField(desc: *const PxHeightFieldDesc, stream: *mut PxOutputStream) -> bool;

    /// Cooks and creates a heightfield mesh and inserts it into PxPhysics.
    ///
    /// PxHeightField pointer on success
    pub fn phys_PxCreateHeightField(desc: *const PxHeightFieldDesc, insertionCallback: *mut PxInsertionCallback) -> *mut PxHeightField;

    /// Cooks a convex mesh. The results are written to the stream.
    ///
    /// To create a triangle mesh object it is necessary to first 'cook' the mesh data into
    /// a form which allows the SDK to perform efficient collision detection.
    ///
    /// cookConvexMesh() allows a mesh description to be cooked into a binary stream
    /// suitable for loading and performing collision detection at runtime.
    ///
    /// The number of vertices and the number of convex polygons in a cooked convex mesh is limited to 255.
    ///
    /// If those limits are exceeded in either the user-provided data or the final cooked mesh, an error is reported.
    ///
    /// true on success.
    pub fn phys_PxCookConvexMesh(params: *const PxCookingParams, desc: *const PxConvexMeshDesc, stream: *mut PxOutputStream, condition: *mut PxConvexMeshCookingResult) -> bool;

    /// Cooks and creates a convex mesh without going through a stream.
    ///
    /// This method does the same as cookConvexMesh, but the produced mesh is not stored
    /// into a stream but is either directly inserted in PxPhysics, or created as a standalone
    /// object. Use this method if you are unable to cook offline.
    ///
    /// PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback()
    /// or PxCooking::getStandaloneInsertionCallback().
    ///
    /// PxConvexMesh pointer on success
    pub fn phys_PxCreateConvexMesh(params: *const PxCookingParams, desc: *const PxConvexMeshDesc, insertionCallback: *mut PxInsertionCallback, condition: *mut PxConvexMeshCookingResult) -> *mut PxConvexMesh;

    /// Verifies if the convex mesh is valid. Prints an error message for each inconsistency found.
    ///
    /// The convex mesh descriptor must contain an already created convex mesh - the vertices, indices and polygons must be provided.
    ///
    /// This function should be used if PxConvexFlag::eDISABLE_MESH_VALIDATION is planned to be used in release builds.
    ///
    /// true if all the validity conditions hold, false otherwise.
    pub fn phys_PxValidateConvexMesh(params: *const PxCookingParams, desc: *const PxConvexMeshDesc) -> bool;

    /// Computed hull polygons from given vertices and triangles. Polygons are needed for PxConvexMeshDesc rather than triangles.
    ///
    /// Please note that the resulting polygons may have different number of vertices. Some vertices may be removed.
    /// The output vertices, indices and polygons must be used to construct a hull.
    ///
    /// The provided PxAllocatorCallback does allocate the out array's. It is the user responsibility to deallocated those
    /// array's.
    ///
    /// true on success
    pub fn phys_PxComputeHullPolygons(params: *const PxCookingParams, mesh: *const PxSimpleTriangleMesh, inCallback: *mut PxAllocatorCallback, nbVerts: *mut u32, vertices: *mut *mut PxVec3, nbIndices: *mut u32, indices: *mut *mut u32, nbPolygons: *mut u32, hullPolygons: *mut *mut PxHullPolygon) -> bool;

    /// Verifies if the triangle mesh is valid. Prints an error message for each inconsistency found.
    ///
    /// The following conditions are true for a valid triangle mesh:
    /// 1. There are no duplicate vertices (within specified vertexWeldTolerance. See PxCookingParams::meshWeldTolerance)
    /// 2. There are no large triangles (within specified PxTolerancesScale.)
    ///
    /// true if all the validity conditions hold, false otherwise.
    pub fn phys_PxValidateTriangleMesh(params: *const PxCookingParams, desc: *const PxTriangleMeshDesc) -> bool;

    /// Cooks and creates a triangle mesh without going through a stream.
    ///
    /// This method does the same as cookTriangleMesh, but the produced mesh is not stored
    /// into a stream but is either directly inserted in PxPhysics, or created as a standalone
    /// object. Use this method if you are unable to cook offline.
    ///
    /// PxInsertionCallback can be obtained through PxPhysics::getPhysicsInsertionCallback()
    /// or PxCooking::getStandaloneInsertionCallback().
    ///
    /// PxTriangleMesh pointer on success.
    pub fn phys_PxCreateTriangleMesh(params: *const PxCookingParams, desc: *const PxTriangleMeshDesc, insertionCallback: *mut PxInsertionCallback, condition: *mut PxTriangleMeshCookingResult) -> *mut PxTriangleMesh;

    /// Cooks a triangle mesh. The results are written to the stream.
    ///
    /// To create a triangle mesh object it is necessary to first 'cook' the mesh data into
    /// a form which allows the SDK to perform efficient collision detection.
    ///
    /// PxCookTriangleMesh() allows a mesh description to be cooked into a binary stream
    /// suitable for loading and performing collision detection at runtime.
    ///
    /// true on success
    pub fn phys_PxCookTriangleMesh(params: *const PxCookingParams, desc: *const PxTriangleMeshDesc, stream: *mut PxOutputStream, condition: *mut PxTriangleMeshCookingResult) -> bool;

    pub fn PxDefaultMemoryOutputStream_new_alloc(allocator: *mut PxAllocatorCallback) -> *mut PxDefaultMemoryOutputStream;

    pub fn PxDefaultMemoryOutputStream_delete(self_: *mut PxDefaultMemoryOutputStream);

    pub fn PxDefaultMemoryOutputStream_write_mut(self_: *mut PxDefaultMemoryOutputStream, src: *const std::ffi::c_void, count: u32) -> u32;

    pub fn PxDefaultMemoryOutputStream_getSize(self_: *const PxDefaultMemoryOutputStream) -> u32;

    pub fn PxDefaultMemoryOutputStream_getData(self_: *const PxDefaultMemoryOutputStream) -> *mut u8;

    pub fn PxDefaultMemoryInputData_new_alloc(data: *mut u8, length: u32) -> *mut PxDefaultMemoryInputData;

    pub fn PxDefaultMemoryInputData_read_mut(self_: *mut PxDefaultMemoryInputData, dest: *mut std::ffi::c_void, count: u32) -> u32;

    pub fn PxDefaultMemoryInputData_getLength(self_: *const PxDefaultMemoryInputData) -> u32;

    pub fn PxDefaultMemoryInputData_seek_mut(self_: *mut PxDefaultMemoryInputData, pos: u32);

    pub fn PxDefaultMemoryInputData_tell(self_: *const PxDefaultMemoryInputData) -> u32;

    pub fn PxDefaultFileOutputStream_new_alloc(name: *const std::ffi::c_char) -> *mut PxDefaultFileOutputStream;

    pub fn PxDefaultFileOutputStream_delete(self_: *mut PxDefaultFileOutputStream);

    pub fn PxDefaultFileOutputStream_write_mut(self_: *mut PxDefaultFileOutputStream, src: *const std::ffi::c_void, count: u32) -> u32;

    pub fn PxDefaultFileOutputStream_isValid_mut(self_: *mut PxDefaultFileOutputStream) -> bool;

    pub fn PxDefaultFileInputData_new_alloc(name: *const std::ffi::c_char) -> *mut PxDefaultFileInputData;

    pub fn PxDefaultFileInputData_delete(self_: *mut PxDefaultFileInputData);

    pub fn PxDefaultFileInputData_read_mut(self_: *mut PxDefaultFileInputData, dest: *mut std::ffi::c_void, count: u32) -> u32;

    pub fn PxDefaultFileInputData_seek_mut(self_: *mut PxDefaultFileInputData, pos: u32);

    pub fn PxDefaultFileInputData_tell(self_: *const PxDefaultFileInputData) -> u32;

    pub fn PxDefaultFileInputData_getLength(self_: *const PxDefaultFileInputData) -> u32;

    pub fn PxDefaultFileInputData_isValid(self_: *const PxDefaultFileInputData) -> bool;

    pub fn phys_platformAlignedAlloc(size: usize) -> *mut std::ffi::c_void;

    pub fn phys_platformAlignedFree(ptr: *mut std::ffi::c_void);

    pub fn PxDefaultAllocator_allocate_mut(self_: *mut PxDefaultAllocator, size: usize, anon_param1: *const std::ffi::c_char, anon_param2: *const std::ffi::c_char, anon_param3: i32) -> *mut std::ffi::c_void;

    pub fn PxDefaultAllocator_deallocate_mut(self_: *mut PxDefaultAllocator, ptr: *mut std::ffi::c_void);

    pub fn PxDefaultAllocator_delete(self_: *mut PxDefaultAllocator);

    /// Set the actors for this joint.
    ///
    /// An actor may be NULL to indicate the world frame. At most one of the actors may be NULL.
    pub fn PxJoint_setActors_mut(self_: *mut PxJoint, actor0: *mut PxRigidActor, actor1: *mut PxRigidActor);

    /// Get the actors for this joint.
    pub fn PxJoint_getActors(self_: *const PxJoint, actor0: *mut *mut PxRigidActor, actor1: *mut *mut PxRigidActor);

    /// Set the joint local pose for an actor.
    ///
    /// This is the relative pose which locates the joint frame relative to the actor.
    pub fn PxJoint_setLocalPose_mut(self_: *mut PxJoint, actor: PxJointActorIndex, localPose: *const PxTransform);

    /// get the joint local pose for an actor.
    ///
    /// return the local pose for this joint
    pub fn PxJoint_getLocalPose(self_: *const PxJoint, actor: PxJointActorIndex) -> PxTransform;

    /// get the relative pose for this joint
    ///
    /// This function returns the pose of the joint frame of actor1 relative to actor0
    pub fn PxJoint_getRelativeTransform(self_: *const PxJoint) -> PxTransform;

    /// get the relative linear velocity of the joint
    ///
    /// This function returns the linear velocity of the origin of the constraint frame of actor1, relative to the origin of the constraint
    /// frame of actor0. The value is returned in the constraint frame of actor0
    pub fn PxJoint_getRelativeLinearVelocity(self_: *const PxJoint) -> PxVec3;

    /// get the relative angular velocity of the joint
    ///
    /// This function returns the angular velocity of  actor1 relative to actor0. The value is returned in the constraint frame of actor0
    pub fn PxJoint_getRelativeAngularVelocity(self_: *const PxJoint) -> PxVec3;

    /// set the break force for this joint.
    ///
    /// if the constraint force or torque on the joint exceeds the specified values, the joint will break,
    /// at which point it will not constrain the two actors and the flag PxConstraintFlag::eBROKEN will be set. The
    /// force and torque are measured in the joint frame of the first actor
    pub fn PxJoint_setBreakForce_mut(self_: *mut PxJoint, force: f32, torque: f32);

    /// get the break force for this joint.
    pub fn PxJoint_getBreakForce(self_: *const PxJoint, force: *mut f32, torque: *mut f32);

    /// set the constraint flags for this joint.
    pub fn PxJoint_setConstraintFlags_mut(self_: *mut PxJoint, flags: PxConstraintFlags);

    /// set a constraint flags for this joint to a specified value.
    pub fn PxJoint_setConstraintFlag_mut(self_: *mut PxJoint, flag: PxConstraintFlag, value: bool);

    /// get the constraint flags for this joint.
    ///
    /// the constraint flags
    pub fn PxJoint_getConstraintFlags(self_: *const PxJoint) -> PxConstraintFlags;

    /// set the inverse mass scale for actor0.
    pub fn PxJoint_setInvMassScale0_mut(self_: *mut PxJoint, invMassScale: f32);

    /// get the inverse mass scale for actor0.
    ///
    /// inverse mass scale for actor0
    pub fn PxJoint_getInvMassScale0(self_: *const PxJoint) -> f32;

    /// set the inverse inertia scale for actor0.
    pub fn PxJoint_setInvInertiaScale0_mut(self_: *mut PxJoint, invInertiaScale: f32);

    /// get the inverse inertia scale for actor0.
    ///
    /// inverse inertia scale for actor0
    pub fn PxJoint_getInvInertiaScale0(self_: *const PxJoint) -> f32;

    /// set the inverse mass scale for actor1.
    pub fn PxJoint_setInvMassScale1_mut(self_: *mut PxJoint, invMassScale: f32);

    /// get the inverse mass scale for actor1.
    ///
    /// inverse mass scale for actor1
    pub fn PxJoint_getInvMassScale1(self_: *const PxJoint) -> f32;

    /// set the inverse inertia scale for actor1.
    pub fn PxJoint_setInvInertiaScale1_mut(self_: *mut PxJoint, invInertiaScale: f32);

    /// get the inverse inertia scale for actor1.
    ///
    /// inverse inertia scale for actor1
    pub fn PxJoint_getInvInertiaScale1(self_: *const PxJoint) -> f32;

    /// Retrieves the PxConstraint corresponding to this joint.
    ///
    /// This can be used to determine, among other things, the force applied at the joint.
    ///
    /// the constraint
    pub fn PxJoint_getConstraint(self_: *const PxJoint) -> *mut PxConstraint;

    /// Sets a name string for the object that can be retrieved with getName().
    ///
    /// This is for debugging and is not used by the SDK. The string is not copied by the SDK,
    /// only the pointer is stored.
    pub fn PxJoint_setName_mut(self_: *mut PxJoint, name: *const std::ffi::c_char);

    /// Retrieves the name string set with setName().
    ///
    /// Name string associated with object.
    pub fn PxJoint_getName(self_: *const PxJoint) -> *const std::ffi::c_char;

    /// Deletes the joint.
    ///
    /// This call does not wake up the connected rigid bodies.
    pub fn PxJoint_release_mut(self_: *mut PxJoint);

    /// Retrieves the scene which this joint belongs to.
    ///
    /// Owner Scene. NULL if not part of a scene.
    pub fn PxJoint_getScene(self_: *const PxJoint) -> *mut PxScene;

    /// Put class meta data in stream, used for serialization
    pub fn PxJoint_getBinaryMetaData(stream: *mut PxOutputStream);

    pub fn PxSpring_new(stiffness_: f32, damping_: f32) -> PxSpring;

    /// Helper function to setup a joint's global frame
    ///
    /// This replaces the following functions from previous SDK versions:
    ///
    /// void NxJointDesc::setGlobalAnchor(const NxVec3
    /// &
    /// wsAnchor);
    /// void NxJointDesc::setGlobalAxis(const NxVec3
    /// &
    /// wsAxis);
    ///
    /// The function sets the joint's localPose using world-space input parameters.
    pub fn phys_PxSetJointGlobalFrame(joint: *mut PxJoint, wsAnchor: *const PxVec3, wsAxis: *const PxVec3);

    /// Create a distance Joint.
    pub fn phys_PxDistanceJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxDistanceJoint;

    /// Return the current distance of the joint
    pub fn PxDistanceJoint_getDistance(self_: *const PxDistanceJoint) -> f32;

    /// Set the allowed minimum distance for the joint.
    ///
    /// The minimum distance must be no more than the maximum distance
    ///
    /// Default
    /// 0.0f
    /// Range
    /// [0, PX_MAX_F32)
    pub fn PxDistanceJoint_setMinDistance_mut(self_: *mut PxDistanceJoint, distance: f32);

    /// Get the allowed minimum distance for the joint.
    ///
    /// the allowed minimum distance
    pub fn PxDistanceJoint_getMinDistance(self_: *const PxDistanceJoint) -> f32;

    /// Set the allowed maximum distance for the joint.
    ///
    /// The maximum distance must be no less than the minimum distance.
    ///
    /// Default
    /// 0.0f
    /// Range
    /// [0, PX_MAX_F32)
    pub fn PxDistanceJoint_setMaxDistance_mut(self_: *mut PxDistanceJoint, distance: f32);

    /// Get the allowed maximum distance for the joint.
    ///
    /// the allowed maximum distance
    pub fn PxDistanceJoint_getMaxDistance(self_: *const PxDistanceJoint) -> f32;

    /// Set the error tolerance of the joint.
    pub fn PxDistanceJoint_setTolerance_mut(self_: *mut PxDistanceJoint, tolerance: f32);

    /// Get the error tolerance of the joint.
    ///
    /// the distance beyond the joint's [min, max] range before the joint becomes active.
    ///
    /// Default
    /// 0.25f * PxTolerancesScale::length
    /// Range
    /// (0, PX_MAX_F32)
    ///
    /// This value should be used to ensure that if the minimum distance is zero and the
    /// spring function is in use, the rest length of the spring is non-zero.
    pub fn PxDistanceJoint_getTolerance(self_: *const PxDistanceJoint) -> f32;

    /// Set the strength of the joint spring.
    ///
    /// The spring is used if enabled, and the distance exceeds the range [min-error, max+error].
    ///
    /// Default
    /// 0.0f
    /// Range
    /// [0, PX_MAX_F32)
    pub fn PxDistanceJoint_setStiffness_mut(self_: *mut PxDistanceJoint, stiffness: f32);

    /// Get the strength of the joint spring.
    ///
    /// stiffness the spring strength of the joint
    pub fn PxDistanceJoint_getStiffness(self_: *const PxDistanceJoint) -> f32;

    /// Set the damping of the joint spring.
    ///
    /// The spring is used if enabled, and the distance exceeds the range [min-error, max+error].
    ///
    /// Default
    /// 0.0f
    /// Range
    /// [0, PX_MAX_F32)
    pub fn PxDistanceJoint_setDamping_mut(self_: *mut PxDistanceJoint, damping: f32);

    /// Get the damping of the joint spring.
    ///
    /// the degree of damping of the joint spring of the joint
    pub fn PxDistanceJoint_getDamping(self_: *const PxDistanceJoint) -> f32;

    /// Set the contact distance for the min
    /// &
    /// max distance limits.
    ///
    /// This is similar to the PxJointLimitParameters::contactDistance parameter for regular limits.
    ///
    /// The two most common values are 0 and infinite. Infinite means the internal constraints are
    /// always created, resulting in the best simulation quality but slower performance. Zero means
    /// the internal constraints are only created when the limits are violated, resulting in best
    /// performance but worse simulation quality.
    ///
    /// Default
    /// 0.0f
    /// Range
    /// [0, PX_MAX_F32)
    pub fn PxDistanceJoint_setContactDistance_mut(self_: *mut PxDistanceJoint, contactDistance: f32);

    /// Get the contact distance.
    ///
    /// the contact distance
    pub fn PxDistanceJoint_getContactDistance(self_: *const PxDistanceJoint) -> f32;

    /// Set the flags specific to the Distance Joint.
    ///
    /// Default
    /// PxDistanceJointFlag::eMAX_DISTANCE_ENABLED
    pub fn PxDistanceJoint_setDistanceJointFlags_mut(self_: *mut PxDistanceJoint, flags: PxDistanceJointFlags);

    /// Set a single flag specific to a Distance Joint to true or false.
    pub fn PxDistanceJoint_setDistanceJointFlag_mut(self_: *mut PxDistanceJoint, flag: PxDistanceJointFlag, value: bool);

    /// Get the flags specific to the Distance Joint.
    ///
    /// the joint flags
    pub fn PxDistanceJoint_getDistanceJointFlags(self_: *const PxDistanceJoint) -> PxDistanceJointFlags;

    /// Returns string name of PxDistanceJoint, used for serialization
    pub fn PxDistanceJoint_getConcreteTypeName(self_: *const PxDistanceJoint) -> *const std::ffi::c_char;

    /// Create a distance Joint.
    pub fn phys_PxContactJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxContactJoint;

    pub fn PxJacobianRow_new() -> PxJacobianRow;

    pub fn PxJacobianRow_new_1(lin0: *const PxVec3, lin1: *const PxVec3, ang0: *const PxVec3, ang1: *const PxVec3) -> PxJacobianRow;

    /// Set the current contact of the joint
    pub fn PxContactJoint_setContact_mut(self_: *mut PxContactJoint, contact: *const PxVec3);

    /// Set the current contact normal of the joint
    pub fn PxContactJoint_setContactNormal_mut(self_: *mut PxContactJoint, contactNormal: *const PxVec3);

    /// Set the current penetration of the joint
    pub fn PxContactJoint_setPenetration_mut(self_: *mut PxContactJoint, penetration: f32);

    /// Return the current contact of the joint
    pub fn PxContactJoint_getContact(self_: *const PxContactJoint) -> PxVec3;

    /// Return the current contact normal of the joint
    pub fn PxContactJoint_getContactNormal(self_: *const PxContactJoint) -> PxVec3;

    /// Return the current penetration value of the joint
    pub fn PxContactJoint_getPenetration(self_: *const PxContactJoint) -> f32;

    pub fn PxContactJoint_getRestitution(self_: *const PxContactJoint) -> f32;

    pub fn PxContactJoint_setRestitution_mut(self_: *mut PxContactJoint, restitution: f32);

    pub fn PxContactJoint_getBounceThreshold(self_: *const PxContactJoint) -> f32;

    pub fn PxContactJoint_setBounceThreshold_mut(self_: *mut PxContactJoint, bounceThreshold: f32);

    /// Returns string name of PxContactJoint, used for serialization
    pub fn PxContactJoint_getConcreteTypeName(self_: *const PxContactJoint) -> *const std::ffi::c_char;

    pub fn PxContactJoint_computeJacobians(self_: *const PxContactJoint, jacobian: *mut PxJacobianRow);

    pub fn PxContactJoint_getNbJacobianRows(self_: *const PxContactJoint) -> u32;

    /// Create a fixed joint.
    pub fn phys_PxFixedJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxFixedJoint;

    /// Returns string name of PxFixedJoint, used for serialization
    pub fn PxFixedJoint_getConcreteTypeName(self_: *const PxFixedJoint) -> *const std::ffi::c_char;

    pub fn PxJointLimitParameters_new_alloc() -> *mut PxJointLimitParameters;

    /// Returns true if the current settings are valid.
    ///
    /// true if the current settings are valid
    pub fn PxJointLimitParameters_isValid(self_: *const PxJointLimitParameters) -> bool;

    pub fn PxJointLimitParameters_isSoft(self_: *const PxJointLimitParameters) -> bool;

    /// construct a linear hard limit
    pub fn PxJointLinearLimit_new(scale: *const PxTolerancesScale, extent: f32, contactDist_deprecated: f32) -> PxJointLinearLimit;

    /// construct a linear soft limit
    pub fn PxJointLinearLimit_new_1(extent: f32, spring: *const PxSpring) -> PxJointLinearLimit;

    /// Returns true if the limit is valid
    ///
    /// true if the current settings are valid
    pub fn PxJointLinearLimit_isValid(self_: *const PxJointLinearLimit) -> bool;

    pub fn PxJointLinearLimit_delete(self_: *mut PxJointLinearLimit);

    /// Construct a linear hard limit pair. The lower distance value must be less than the upper distance value.
    pub fn PxJointLinearLimitPair_new(scale: *const PxTolerancesScale, lowerLimit: f32, upperLimit: f32, contactDist_deprecated: f32) -> PxJointLinearLimitPair;

    /// construct a linear soft limit pair
    pub fn PxJointLinearLimitPair_new_1(lowerLimit: f32, upperLimit: f32, spring: *const PxSpring) -> PxJointLinearLimitPair;

    /// Returns true if the limit is valid.
    ///
    /// true if the current settings are valid
    pub fn PxJointLinearLimitPair_isValid(self_: *const PxJointLinearLimitPair) -> bool;

    pub fn PxJointLinearLimitPair_delete(self_: *mut PxJointLinearLimitPair);

    /// construct an angular hard limit pair.
    ///
    /// The lower value must be less than the upper value.
    pub fn PxJointAngularLimitPair_new(lowerLimit: f32, upperLimit: f32, contactDist_deprecated: f32) -> PxJointAngularLimitPair;

    /// construct an angular soft limit pair.
    ///
    /// The lower value must be less than the upper value.
    pub fn PxJointAngularLimitPair_new_1(lowerLimit: f32, upperLimit: f32, spring: *const PxSpring) -> PxJointAngularLimitPair;

    /// Returns true if the limit is valid.
    ///
    /// true if the current settings are valid
    pub fn PxJointAngularLimitPair_isValid(self_: *const PxJointAngularLimitPair) -> bool;

    pub fn PxJointAngularLimitPair_delete(self_: *mut PxJointAngularLimitPair);

    /// Construct a cone hard limit.
    pub fn PxJointLimitCone_new(yLimitAngle: f32, zLimitAngle: f32, contactDist_deprecated: f32) -> PxJointLimitCone;

    /// Construct a cone soft limit.
    pub fn PxJointLimitCone_new_1(yLimitAngle: f32, zLimitAngle: f32, spring: *const PxSpring) -> PxJointLimitCone;

    /// Returns true if the limit is valid.
    ///
    /// true if the current settings are valid
    pub fn PxJointLimitCone_isValid(self_: *const PxJointLimitCone) -> bool;

    pub fn PxJointLimitCone_delete(self_: *mut PxJointLimitCone);

    /// Construct a pyramid hard limit.
    pub fn PxJointLimitPyramid_new(yLimitAngleMin: f32, yLimitAngleMax: f32, zLimitAngleMin: f32, zLimitAngleMax: f32, contactDist_deprecated: f32) -> PxJointLimitPyramid;

    /// Construct a pyramid soft limit.
    pub fn PxJointLimitPyramid_new_1(yLimitAngleMin: f32, yLimitAngleMax: f32, zLimitAngleMin: f32, zLimitAngleMax: f32, spring: *const PxSpring) -> PxJointLimitPyramid;

    /// Returns true if the limit is valid.
    ///
    /// true if the current settings are valid
    pub fn PxJointLimitPyramid_isValid(self_: *const PxJointLimitPyramid) -> bool;

    pub fn PxJointLimitPyramid_delete(self_: *mut PxJointLimitPyramid);

    /// Create a prismatic joint.
    pub fn phys_PxPrismaticJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxPrismaticJoint;

    /// returns the displacement of the joint along its axis.
    pub fn PxPrismaticJoint_getPosition(self_: *const PxPrismaticJoint) -> f32;

    /// returns the velocity of the joint along its axis
    pub fn PxPrismaticJoint_getVelocity(self_: *const PxPrismaticJoint) -> f32;

    /// sets the joint limit  parameters.
    ///
    /// The limit range is [-PX_MAX_F32, PX_MAX_F32], but note that the width of the limit (upper-lower) must also be
    /// a valid float.
    pub fn PxPrismaticJoint_setLimit_mut(self_: *mut PxPrismaticJoint, anon_param0: *const PxJointLinearLimitPair);

    /// gets the joint limit  parameters.
    pub fn PxPrismaticJoint_getLimit(self_: *const PxPrismaticJoint) -> PxJointLinearLimitPair;

    /// Set the flags specific to the Prismatic Joint.
    ///
    /// Default
    /// PxPrismaticJointFlags(0)
    pub fn PxPrismaticJoint_setPrismaticJointFlags_mut(self_: *mut PxPrismaticJoint, flags: PxPrismaticJointFlags);

    /// Set a single flag specific to a Prismatic Joint to true or false.
    pub fn PxPrismaticJoint_setPrismaticJointFlag_mut(self_: *mut PxPrismaticJoint, flag: PxPrismaticJointFlag, value: bool);

    /// Get the flags specific to the Prismatic Joint.
    ///
    /// the joint flags
    pub fn PxPrismaticJoint_getPrismaticJointFlags(self_: *const PxPrismaticJoint) -> PxPrismaticJointFlags;

    /// Returns string name of PxPrismaticJoint, used for serialization
    pub fn PxPrismaticJoint_getConcreteTypeName(self_: *const PxPrismaticJoint) -> *const std::ffi::c_char;

    /// Create a revolute joint.
    pub fn phys_PxRevoluteJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxRevoluteJoint;

    /// return the angle of the joint, in the range (-2*Pi, 2*Pi]
    pub fn PxRevoluteJoint_getAngle(self_: *const PxRevoluteJoint) -> f32;

    /// return the velocity of the joint
    pub fn PxRevoluteJoint_getVelocity(self_: *const PxRevoluteJoint) -> f32;

    /// set the joint limit parameters.
    ///
    /// The limit is activated using the flag PxRevoluteJointFlag::eLIMIT_ENABLED
    ///
    /// The limit angle range is (-2*Pi, 2*Pi).
    pub fn PxRevoluteJoint_setLimit_mut(self_: *mut PxRevoluteJoint, limits: *const PxJointAngularLimitPair);

    /// get the joint limit parameters.
    ///
    /// the joint limit parameters
    pub fn PxRevoluteJoint_getLimit(self_: *const PxRevoluteJoint) -> PxJointAngularLimitPair;

    /// set the target velocity for the drive model.
    ///
    /// The motor will only be able to reach this velocity if the maxForce is sufficiently large.
    /// If the joint is spinning faster than this velocity, the motor will actually try to brake
    /// (see PxRevoluteJointFlag::eDRIVE_FREESPIN.)
    ///
    /// The sign of this variable determines the rotation direction, with positive values going
    /// the same way as positive joint angles. Setting a very large target velocity may cause
    /// undesirable results.
    ///
    /// Range:
    /// (-PX_MAX_F32, PX_MAX_F32)
    /// Default:
    /// 0.0
    pub fn PxRevoluteJoint_setDriveVelocity_mut(self_: *mut PxRevoluteJoint, velocity: f32, autowake: bool);

    /// gets the target velocity for the drive model.
    ///
    /// the drive target velocity
    pub fn PxRevoluteJoint_getDriveVelocity(self_: *const PxRevoluteJoint) -> f32;

    /// sets the maximum torque the drive can exert.
    ///
    /// The value set here may be used either as an impulse limit or a force limit, depending on the flag PxConstraintFlag::eDRIVE_LIMITS_ARE_FORCES
    ///
    /// Range:
    /// [0, PX_MAX_F32)
    /// Default:
    /// PX_MAX_F32
    pub fn PxRevoluteJoint_setDriveForceLimit_mut(self_: *mut PxRevoluteJoint, limit: f32);

    /// gets the maximum torque the drive can exert.
    ///
    /// the torque limit
    pub fn PxRevoluteJoint_getDriveForceLimit(self_: *const PxRevoluteJoint) -> f32;

    /// sets the gear ratio for the drive.
    ///
    /// When setting up the drive constraint, the velocity of the first actor is scaled by this value, and its response to drive torque is scaled down.
    /// So if the drive target velocity is zero, the second actor will be driven to the velocity of the first scaled by the gear ratio
    ///
    /// Range:
    /// [0, PX_MAX_F32)
    /// Default:
    /// 1.0
    pub fn PxRevoluteJoint_setDriveGearRatio_mut(self_: *mut PxRevoluteJoint, ratio: f32);

    /// gets the gear ratio.
    ///
    /// the drive gear ratio
    pub fn PxRevoluteJoint_getDriveGearRatio(self_: *const PxRevoluteJoint) -> f32;

    /// sets the flags specific to the Revolute Joint.
    ///
    /// Default
    /// PxRevoluteJointFlags(0)
    pub fn PxRevoluteJoint_setRevoluteJointFlags_mut(self_: *mut PxRevoluteJoint, flags: PxRevoluteJointFlags);

    /// sets a single flag specific to a Revolute Joint.
    pub fn PxRevoluteJoint_setRevoluteJointFlag_mut(self_: *mut PxRevoluteJoint, flag: PxRevoluteJointFlag, value: bool);

    /// gets the flags specific to the Revolute Joint.
    ///
    /// the joint flags
    pub fn PxRevoluteJoint_getRevoluteJointFlags(self_: *const PxRevoluteJoint) -> PxRevoluteJointFlags;

    /// Returns string name of PxRevoluteJoint, used for serialization
    pub fn PxRevoluteJoint_getConcreteTypeName(self_: *const PxRevoluteJoint) -> *const std::ffi::c_char;

    /// Create a spherical joint.
    pub fn phys_PxSphericalJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxSphericalJoint;

    /// Set the limit cone.
    ///
    /// If enabled, the limit cone will constrain the angular movement of the joint to lie
    /// within an elliptical cone.
    ///
    /// the limit cone
    pub fn PxSphericalJoint_getLimitCone(self_: *const PxSphericalJoint) -> PxJointLimitCone;

    /// Get the limit cone.
    pub fn PxSphericalJoint_setLimitCone_mut(self_: *mut PxSphericalJoint, limit: *const PxJointLimitCone);

    /// get the swing angle of the joint from the Y axis
    pub fn PxSphericalJoint_getSwingYAngle(self_: *const PxSphericalJoint) -> f32;

    /// get the swing angle of the joint from the Z axis
    pub fn PxSphericalJoint_getSwingZAngle(self_: *const PxSphericalJoint) -> f32;

    /// Set the flags specific to the Spherical Joint.
    ///
    /// Default
    /// PxSphericalJointFlags(0)
    pub fn PxSphericalJoint_setSphericalJointFlags_mut(self_: *mut PxSphericalJoint, flags: PxSphericalJointFlags);

    /// Set a single flag specific to a Spherical Joint to true or false.
    pub fn PxSphericalJoint_setSphericalJointFlag_mut(self_: *mut PxSphericalJoint, flag: PxSphericalJointFlag, value: bool);

    /// Get the flags specific to the Spherical Joint.
    ///
    /// the joint flags
    pub fn PxSphericalJoint_getSphericalJointFlags(self_: *const PxSphericalJoint) -> PxSphericalJointFlags;

    /// Returns string name of PxSphericalJoint, used for serialization
    pub fn PxSphericalJoint_getConcreteTypeName(self_: *const PxSphericalJoint) -> *const std::ffi::c_char;

    /// Create a D6 joint.
    pub fn phys_PxD6JointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxD6Joint;

    /// default constructor for PxD6JointDrive.
    pub fn PxD6JointDrive_new() -> PxD6JointDrive;

    /// constructor a PxD6JointDrive.
    pub fn PxD6JointDrive_new_1(driveStiffness: f32, driveDamping: f32, driveForceLimit: f32, isAcceleration: bool) -> PxD6JointDrive;

    /// returns true if the drive is valid
    pub fn PxD6JointDrive_isValid(self_: *const PxD6JointDrive) -> bool;

    /// Set the motion type around the specified axis.
    ///
    /// Each axis may independently specify that the degree of freedom is locked (blocking relative movement
    /// along or around this axis), limited by the corresponding limit, or free.
    ///
    /// Default:
    /// all degrees of freedom are locked
    pub fn PxD6Joint_setMotion_mut(self_: *mut PxD6Joint, axis: PxD6Axis, type_: PxD6Motion);

    /// Get the motion type around the specified axis.
    ///
    /// the motion type around the specified axis
    pub fn PxD6Joint_getMotion(self_: *const PxD6Joint, axis: PxD6Axis) -> PxD6Motion;

    /// get the twist angle of the joint, in the range (-2*Pi, 2*Pi]
    pub fn PxD6Joint_getTwistAngle(self_: *const PxD6Joint) -> f32;

    /// get the swing angle of the joint from the Y axis
    pub fn PxD6Joint_getSwingYAngle(self_: *const PxD6Joint) -> f32;

    /// get the swing angle of the joint from the Z axis
    pub fn PxD6Joint_getSwingZAngle(self_: *const PxD6Joint) -> f32;

    /// Set the distance limit for the joint.
    ///
    /// A single limit constraints all linear limited degrees of freedom, forming a linear, circular
    /// or spherical constraint on motion depending on the number of limited degrees. This is similar
    /// to a distance limit.
    pub fn PxD6Joint_setDistanceLimit_mut(self_: *mut PxD6Joint, limit: *const PxJointLinearLimit);

    /// Get the distance limit for the joint.
    ///
    /// the distance limit structure
    pub fn PxD6Joint_getDistanceLimit(self_: *const PxD6Joint) -> PxJointLinearLimit;

    /// Set the linear limit for a given linear axis.
    ///
    /// This function extends the previous setDistanceLimit call with the following features:
    /// - there can be a different limit for each linear axis
    /// - each limit is defined by two values, i.e. it can now be asymmetric
    ///
    /// This can be used to create prismatic joints similar to PxPrismaticJoint, or point-in-quad joints,
    /// or point-in-box joints.
    pub fn PxD6Joint_setLinearLimit_mut(self_: *mut PxD6Joint, axis: PxD6Axis, limit: *const PxJointLinearLimitPair);

    /// Get the linear limit for a given linear axis.
    ///
    /// the linear limit pair structure from desired axis
    pub fn PxD6Joint_getLinearLimit(self_: *const PxD6Joint, axis: PxD6Axis) -> PxJointLinearLimitPair;

    /// Set the twist limit for the joint.
    ///
    /// The twist limit controls the range of motion around the twist axis.
    ///
    /// The limit angle range is (-2*Pi, 2*Pi).
    pub fn PxD6Joint_setTwistLimit_mut(self_: *mut PxD6Joint, limit: *const PxJointAngularLimitPair);

    /// Get the twist limit for the joint.
    ///
    /// the twist limit structure
    pub fn PxD6Joint_getTwistLimit(self_: *const PxD6Joint) -> PxJointAngularLimitPair;

    /// Set the swing cone limit for the joint.
    ///
    /// The cone limit is used if either or both swing axes are limited. The extents are
    /// symmetrical and measured in the frame of the parent. If only one swing degree of freedom
    /// is limited, the corresponding value from the cone limit defines the limit range.
    pub fn PxD6Joint_setSwingLimit_mut(self_: *mut PxD6Joint, limit: *const PxJointLimitCone);

    /// Get the cone limit for the joint.
    ///
    /// the swing limit structure
    pub fn PxD6Joint_getSwingLimit(self_: *const PxD6Joint) -> PxJointLimitCone;

    /// Set a pyramidal swing limit for the joint.
    ///
    /// The pyramid limits will only be used in the following cases:
    /// - both swing Y and Z are limited. The limit shape is then a pyramid.
    /// - Y is limited and Z is locked, or vice versa. The limit shape is an asymmetric angular section, similar to
    /// what is supported for the twist axis.
    /// The remaining cases (Y limited and Z is free, or vice versa) are not supported.
    pub fn PxD6Joint_setPyramidSwingLimit_mut(self_: *mut PxD6Joint, limit: *const PxJointLimitPyramid);

    /// Get the pyramidal swing limit for the joint.
    ///
    /// the swing limit structure
    pub fn PxD6Joint_getPyramidSwingLimit(self_: *const PxD6Joint) -> PxJointLimitPyramid;

    /// Set the drive parameters for the specified drive type.
    ///
    /// Default
    /// The default drive spring and damping values are zero, the force limit is zero, and no flags are set.
    pub fn PxD6Joint_setDrive_mut(self_: *mut PxD6Joint, index: PxD6Drive, drive: *const PxD6JointDrive);

    /// Get the drive parameters for the specified drive type.
    pub fn PxD6Joint_getDrive(self_: *const PxD6Joint, index: PxD6Drive) -> PxD6JointDrive;

    /// Set the drive goal pose
    ///
    /// The goal is relative to the constraint frame of actor[0]
    ///
    /// Default
    /// the identity transform
    pub fn PxD6Joint_setDrivePosition_mut(self_: *mut PxD6Joint, pose: *const PxTransform, autowake: bool);

    /// Get the drive goal pose.
    pub fn PxD6Joint_getDrivePosition(self_: *const PxD6Joint) -> PxTransform;

    /// Set the target goal velocity for drive.
    ///
    /// The velocity is measured in the constraint frame of actor[0]
    pub fn PxD6Joint_setDriveVelocity_mut(self_: *mut PxD6Joint, linear: *const PxVec3, angular: *const PxVec3, autowake: bool);

    /// Get the target goal velocity for joint drive.
    pub fn PxD6Joint_getDriveVelocity(self_: *const PxD6Joint, linear: *mut PxVec3, angular: *mut PxVec3);

    /// Set the linear tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION
    /// is set for the joint.
    ///
    /// If the joint separates by more than this distance along its locked degrees of freedom, the solver
    /// will move the bodies to close the distance.
    ///
    /// Setting a very small tolerance may result in simulation jitter or other artifacts.
    ///
    /// Sometimes it is not possible to project (for example when the joints form a cycle).
    ///
    /// Range:
    /// [0, PX_MAX_F32)
    /// Default:
    /// 1e10f
    pub fn PxD6Joint_setProjectionLinearTolerance_mut(self_: *mut PxD6Joint, tolerance: f32);

    /// Get the linear tolerance threshold for projection.
    ///
    /// the linear tolerance threshold
    pub fn PxD6Joint_getProjectionLinearTolerance(self_: *const PxD6Joint) -> f32;

    /// Set the angular tolerance threshold for projection. Projection is enabled if
    /// PxConstraintFlag::ePROJECTION is set for the joint.
    ///
    /// If the joint deviates by more than this angle around its locked angular degrees of freedom,
    /// the solver will move the bodies to close the angle.
    ///
    /// Setting a very small tolerance may result in simulation jitter or other artifacts.
    ///
    /// Sometimes it is not possible to project (for example when the joints form a cycle).
    ///
    /// Range:
    /// [0,Pi]
    /// Default:
    /// Pi
    ///
    /// Angular projection is implemented only for the case of two or three locked angular degrees of freedom.
    pub fn PxD6Joint_setProjectionAngularTolerance_mut(self_: *mut PxD6Joint, tolerance: f32);

    /// Get the angular tolerance threshold for projection.
    ///
    /// tolerance the angular tolerance threshold in radians
    pub fn PxD6Joint_getProjectionAngularTolerance(self_: *const PxD6Joint) -> f32;

    /// Returns string name of PxD6Joint, used for serialization
    pub fn PxD6Joint_getConcreteTypeName(self_: *const PxD6Joint) -> *const std::ffi::c_char;

    /// Create a gear Joint.
    pub fn phys_PxGearJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxGearJoint;

    /// Set the hinge/revolute joints connected by the gear joint.
    ///
    /// The passed joints can be either PxRevoluteJoint, PxD6Joint or PxArticulationJointReducedCoordinate.
    /// The joints must define degrees of freedom around the twist axis. They cannot be null.
    ///
    /// Note that these joints are only used to compute the positional error correction term,
    /// used to adjust potential drift between jointed actors. The gear joint can run without
    /// calling this function, but in that case some visible overlap may develop over time between
    /// the teeth of the gear meshes.
    ///
    /// Calling this function resets the internal positional error correction term.
    ///
    /// true if success
    pub fn PxGearJoint_setHinges_mut(self_: *mut PxGearJoint, hinge0: *const PxBase, hinge1: *const PxBase) -> bool;

    /// Set the desired gear ratio.
    ///
    /// For two gears with n0 and n1 teeth respectively, the gear ratio is n0/n1.
    ///
    /// You may need to use a negative gear ratio if the joint frames of involved actors are not oriented in the same direction.
    ///
    /// Calling this function resets the internal positional error correction term.
    pub fn PxGearJoint_setGearRatio_mut(self_: *mut PxGearJoint, ratio: f32);

    /// Get the gear ratio.
    ///
    /// Current ratio
    pub fn PxGearJoint_getGearRatio(self_: *const PxGearJoint) -> f32;

    pub fn PxGearJoint_getConcreteTypeName(self_: *const PxGearJoint) -> *const std::ffi::c_char;

    /// Create a rack
    /// &
    /// pinion Joint.
    pub fn phys_PxRackAndPinionJointCreate(physics: *mut PxPhysics, actor0: *mut PxRigidActor, localFrame0: *const PxTransform, actor1: *mut PxRigidActor, localFrame1: *const PxTransform) -> *mut PxRackAndPinionJoint;

    /// Set the hinge
    /// &
    /// prismatic joints connected by the rack
    /// &
    /// pinion joint.
    ///
    /// The passed hinge joint can be either PxRevoluteJoint, PxD6Joint or PxArticulationJointReducedCoordinate. It cannot be null.
    /// The passed prismatic joint can be either PxPrismaticJoint or PxD6Joint. It cannot be null.
    ///
    /// Note that these joints are only used to compute the positional error correction term,
    /// used to adjust potential drift between jointed actors. The rack
    /// &
    /// pinion joint can run without
    /// calling this function, but in that case some visible overlap may develop over time between
    /// the teeth of the rack
    /// &
    /// pinion meshes.
    ///
    /// Calling this function resets the internal positional error correction term.
    ///
    /// true if success
    pub fn PxRackAndPinionJoint_setJoints_mut(self_: *mut PxRackAndPinionJoint, hinge: *const PxBase, prismatic: *const PxBase) -> bool;

    /// Set the desired ratio directly.
    ///
    /// You may need to use a negative gear ratio if the joint frames of involved actors are not oriented in the same direction.
    ///
    /// Calling this function resets the internal positional error correction term.
    pub fn PxRackAndPinionJoint_setRatio_mut(self_: *mut PxRackAndPinionJoint, ratio: f32);

    /// Get the ratio.
    ///
    /// Current ratio
    pub fn PxRackAndPinionJoint_getRatio(self_: *const PxRackAndPinionJoint) -> f32;

    /// Set the desired ratio indirectly.
    ///
    /// This is a simple helper function that computes the ratio from passed data:
    ///
    /// ratio = (PI*2*nbRackTeeth)/(rackLength*nbPinionTeeth)
    ///
    /// Calling this function resets the internal positional error correction term.
    ///
    /// true if success
    pub fn PxRackAndPinionJoint_setData_mut(self_: *mut PxRackAndPinionJoint, nbRackTeeth: u32, nbPinionTeeth: u32, rackLength: f32) -> bool;

    pub fn PxRackAndPinionJoint_getConcreteTypeName(self_: *const PxRackAndPinionJoint) -> *const std::ffi::c_char;

    pub fn PxGroupsMask_new_alloc() -> *mut PxGroupsMask;

    pub fn PxGroupsMask_delete(self_: *mut PxGroupsMask);

    /// Implementation of a simple filter shader that emulates PhysX 2.8.x filtering
    ///
    /// This shader provides the following logic:
    ///
    /// If one of the two filter objects is a trigger, the pair is acccepted and [`PxPairFlag::eTRIGGER_DEFAULT`] will be used for trigger reports
    ///
    /// Else, if the filter mask logic (see further below) discards the pair it will be suppressed ([`PxFilterFlag::eSUPPRESS`])
    ///
    /// Else, the pair gets accepted and collision response gets enabled ([`PxPairFlag::eCONTACT_DEFAULT`])
    ///
    /// Filter mask logic:
    /// Given the two [`PxFilterData`] structures fd0 and fd1 of two collision objects, the pair passes the filter if the following
    /// conditions are met:
    ///
    /// 1) Collision groups of the pair are enabled
    /// 2) Collision filtering equation is satisfied
    pub fn phys_PxDefaultSimulationFilterShader(attributes0: u32, filterData0: PxFilterData, attributes1: u32, filterData1: PxFilterData, pairFlags: *mut PxPairFlags, constantBlock: *const std::ffi::c_void, constantBlockSize: u32) -> PxFilterFlags;

    /// Determines if collision detection is performed between a pair of groups
    ///
    /// Collision group is an integer between 0 and 31.
    ///
    /// True if the groups could collide
    pub fn phys_PxGetGroupCollisionFlag(group1: u16, group2: u16) -> bool;

    /// Specifies if collision should be performed by a pair of groups
    ///
    /// Collision group is an integer between 0 and 31.
    pub fn phys_PxSetGroupCollisionFlag(group1: u16, group2: u16, enable: bool);

    /// Retrieves the value set with PxSetGroup()
    ///
    /// Collision group is an integer between 0 and 31.
    ///
    /// The collision group this actor belongs to
    pub fn phys_PxGetGroup(actor: *const PxActor) -> u16;

    /// Sets which collision group this actor is part of
    ///
    /// Collision group is an integer between 0 and 31.
    pub fn phys_PxSetGroup(actor: *mut PxActor, collisionGroup: u16);

    /// Retrieves filtering operation. See comments for PxGroupsMask
    pub fn phys_PxGetFilterOps(op0: *mut PxFilterOp, op1: *mut PxFilterOp, op2: *mut PxFilterOp);

    /// Setups filtering operations. See comments for PxGroupsMask
    pub fn phys_PxSetFilterOps(op0: *const PxFilterOp, op1: *const PxFilterOp, op2: *const PxFilterOp);

    /// Retrieves filtering's boolean value. See comments for PxGroupsMask
    ///
    /// flag Boolean value for filter.
    pub fn phys_PxGetFilterBool() -> bool;

    /// Setups filtering's boolean value. See comments for PxGroupsMask
    pub fn phys_PxSetFilterBool(enable: bool);

    /// Gets filtering constant K0 and K1. See comments for PxGroupsMask
    pub fn phys_PxGetFilterConstants(c0: *mut PxGroupsMask, c1: *mut PxGroupsMask);

    /// Setups filtering's K0 and K1 value. See comments for PxGroupsMask
    pub fn phys_PxSetFilterConstants(c0: *const PxGroupsMask, c1: *const PxGroupsMask);

    /// Gets 64-bit mask used for collision filtering. See comments for PxGroupsMask
    ///
    /// The group mask for the actor.
    pub fn phys_PxGetGroupsMask(actor: *const PxActor) -> PxGroupsMask;

    /// Sets 64-bit mask used for collision filtering. See comments for PxGroupsMask
    pub fn phys_PxSetGroupsMask(actor: *mut PxActor, mask: *const PxGroupsMask);

    pub fn PxDefaultErrorCallback_new_alloc() -> *mut PxDefaultErrorCallback;

    pub fn PxDefaultErrorCallback_delete(self_: *mut PxDefaultErrorCallback);

    pub fn PxDefaultErrorCallback_reportError_mut(self_: *mut PxDefaultErrorCallback, code: PxErrorCode, message: *const std::ffi::c_char, file: *const std::ffi::c_char, line: i32);

    /// Creates a new shape with default properties and a list of materials and adds it to the list of shapes of this actor.
    ///
    /// This is equivalent to the following
    ///
    /// ```cpp
    /// // reference count is 1
    /// PxShape* shape(...) = PxGetPhysics().createShape(...);
    /// // increments reference count
    /// actor->attachShape(shape);
    /// // releases user reference, leaving reference count at 1
    /// shape->release();
    /// ```
    ///
    /// As a consequence, detachShape() will result in the release of the last reference, and the shape will be deleted.
    ///
    /// The default shape flags to be set are: eVISUALIZATION, eSIMULATION_SHAPE, eSCENE_QUERY_SHAPE (see [`PxShapeFlag`]).
    /// Triangle mesh, heightfield or plane geometry shapes configured as eSIMULATION_SHAPE are not supported for
    /// non-kinematic PxRigidDynamic instances.
    ///
    /// Creating compounds with a very large number of shapes may adversely affect performance and stability.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the actor up automatically.
    ///
    /// The newly created shape.
    pub fn PxRigidActorExt_createExclusiveShape(actor: *mut PxRigidActor, geometry: *const PxGeometry, materials: *const *mut PxMaterial, materialCount: u16, shapeFlags: PxShapeFlags) -> *mut PxShape;

    /// Creates a new shape with default properties and a single material adds it to the list of shapes of this actor.
    ///
    /// This is equivalent to the following
    ///
    /// ```cpp
    /// // reference count is 1
    /// PxShape* shape(...) = PxGetPhysics().createShape(...);
    /// // increments reference count
    /// actor->attachShape(shape);
    /// // releases user reference, leaving reference count at 1
    /// shape->release();
    /// ```
    ///
    /// As a consequence, detachShape() will result in the release of the last reference, and the shape will be deleted.
    ///
    /// The default shape flags to be set are: eVISUALIZATION, eSIMULATION_SHAPE, eSCENE_QUERY_SHAPE (see [`PxShapeFlag`]).
    /// Triangle mesh, heightfield or plane geometry shapes configured as eSIMULATION_SHAPE are not supported for
    /// non-kinematic PxRigidDynamic instances.
    ///
    /// Creating compounds with a very large number of shapes may adversely affect performance and stability.
    ///
    /// Sleeping:
    /// Does
    /// NOT
    /// wake the actor up automatically.
    ///
    /// The newly created shape.
    pub fn PxRigidActorExt_createExclusiveShape_1(actor: *mut PxRigidActor, geometry: *const PxGeometry, material: *const PxMaterial, shapeFlags: PxShapeFlags) -> *mut PxShape;

    /// Gets a list of bounds based on shapes in rigid actor. This list can be used to cook/create
    /// bounding volume hierarchy though PxCooking API.
    pub fn PxRigidActorExt_getRigidActorShapeLocalBoundsList(actor: *const PxRigidActor, numBounds: *mut u32) -> *mut PxBounds3;

    /// Convenience function to create a PxBVH object from a PxRigidActor.
    ///
    /// The computed PxBVH can then be used in PxScene::addActor() or PxAggregate::addActor().
    /// After adding the actor
    /// &
    /// BVH to the scene/aggregate, release the PxBVH object by calling PxBVH::release().
    ///
    /// The PxBVH for this actor.
    pub fn PxRigidActorExt_createBVHFromActor(physics: *mut PxPhysics, actor: *const PxRigidActor) -> *mut PxBVH;

    /// Default constructor.
    pub fn PxMassProperties_new() -> PxMassProperties;

    /// Construct from individual elements.
    pub fn PxMassProperties_new_1(m: f32, inertiaT: *const PxMat33, com: *const PxVec3) -> PxMassProperties;

    /// Compute mass properties based on a provided geometry structure.
    ///
    /// This constructor assumes the geometry has a density of 1. Mass and inertia tensor scale linearly with density.
    pub fn PxMassProperties_new_2(geometry: *const PxGeometry) -> PxMassProperties;

    /// Translate the center of mass by a given vector and adjust the inertia tensor accordingly.
    pub fn PxMassProperties_translate_mut(self_: *mut PxMassProperties, t: *const PxVec3);

    /// Get the entries of the diagonalized inertia tensor and the corresponding reference rotation.
    ///
    /// The entries of the diagonalized inertia tensor.
    pub fn PxMassProperties_getMassSpaceInertia(inertia: *const PxMat33, massFrame: *mut PxQuat) -> PxVec3;

    /// Translate an inertia tensor using the parallel axis theorem
    ///
    /// The translated inertia tensor.
    pub fn PxMassProperties_translateInertia(inertia: *const PxMat33, mass: f32, t: *const PxVec3) -> PxMat33;

    /// Rotate an inertia tensor around the center of mass
    ///
    /// The rotated inertia tensor.
    pub fn PxMassProperties_rotateInertia(inertia: *const PxMat33, q: *const PxQuat) -> PxMat33;

    /// Non-uniform scaling of the inertia tensor
    ///
    /// The scaled inertia tensor.
    pub fn PxMassProperties_scaleInertia(inertia: *const PxMat33, scaleRotation: *const PxQuat, scale: *const PxVec3) -> PxMat33;

    /// Sum up individual mass properties.
    ///
    /// The summed up mass properties.
    pub fn PxMassProperties_sum(props: *const PxMassProperties, transforms: *const PxTransform, count: u32) -> PxMassProperties;

    /// Computation of mass properties for a rigid body actor
    ///
    /// To simulate a dynamic rigid actor, the SDK needs a mass and an inertia tensor.
    ///
    /// This method offers functionality to compute the necessary mass and inertia properties based on the shapes declared in
    /// the PxRigidBody descriptor and some additionally specified parameters. For each shape, the shape geometry,
    /// the shape positioning within the actor and the specified shape density are used to compute the body's mass and
    /// inertia properties.
    ///
    /// Shapes without PxShapeFlag::eSIMULATION_SHAPE set are ignored unless includeNonSimShapes is true.
    /// Shapes with plane, triangle mesh or heightfield geometry and PxShapeFlag::eSIMULATION_SHAPE set are not allowed for PxRigidBody collision.
    ///
    /// This method will set the mass, center of mass, and inertia tensor
    ///
    /// if no collision shapes are found, the inertia tensor is set to (1,1,1) and the mass to 1
    ///
    /// if massLocalPose is non-NULL, the rigid body's center of mass parameter  will be set
    /// to the user provided value (massLocalPose) and the inertia tensor will be resolved at that point.
    ///
    /// If all shapes of the actor have the same density then the overloaded method updateMassAndInertia() with a single density parameter can be used instead.
    ///
    /// Boolean. True on success else false.
    pub fn PxRigidBodyExt_updateMassAndInertia(body: *mut PxRigidBody, shapeDensities: *const f32, shapeDensityCount: u32, massLocalPose: *const PxVec3, includeNonSimShapes: bool) -> bool;

    /// Computation of mass properties for a rigid body actor
    ///
    /// See previous method for details.
    ///
    /// Boolean. True on success else false.
    pub fn PxRigidBodyExt_updateMassAndInertia_1(body: *mut PxRigidBody, density: f32, massLocalPose: *const PxVec3, includeNonSimShapes: bool) -> bool;

    /// Computation of mass properties for a rigid body actor
    ///
    /// This method sets the mass, inertia and center of mass of a rigid body. The mass is set to the sum of all user-supplied
    /// shape mass values, and the inertia and center of mass are computed according to the rigid body's shapes and the per shape mass input values.
    ///
    /// If no collision shapes are found, the inertia tensor is set to (1,1,1)
    ///
    /// If a single mass value should be used for the actor as a whole then the overloaded method setMassAndUpdateInertia() with a single mass parameter can be used instead.
    ///
    /// Boolean. True on success else false.
    pub fn PxRigidBodyExt_setMassAndUpdateInertia(body: *mut PxRigidBody, shapeMasses: *const f32, shapeMassCount: u32, massLocalPose: *const PxVec3, includeNonSimShapes: bool) -> bool;

    /// Computation of mass properties for a rigid body actor
    ///
    /// This method sets the mass, inertia and center of mass of a rigid body. The mass is set to the user-supplied
    /// value, and the inertia and center of mass are computed according to the rigid body's shapes and the input mass.
    ///
    /// If no collision shapes are found, the inertia tensor is set to (1,1,1)
    ///
    /// Boolean. True on success else false.
    pub fn PxRigidBodyExt_setMassAndUpdateInertia_1(body: *mut PxRigidBody, mass: f32, massLocalPose: *const PxVec3, includeNonSimShapes: bool) -> bool;

    /// Compute the mass, inertia tensor and center of mass from a list of shapes.
    ///
    /// The mass properties from the combined shapes.
    pub fn PxRigidBodyExt_computeMassPropertiesFromShapes(shapes: *const *const PxShape, shapeCount: u32) -> PxMassProperties;

    /// Applies a force (or impulse) defined in the global coordinate frame, acting at a particular
    /// point in global coordinates, to the actor.
    ///
    /// Note that if the force does not act along the center of mass of the actor, this
    /// will also add the corresponding torque. Because forces are reset at the end of every timestep,
    /// you can maintain a total external force on an object by calling this once every frame.
    ///
    /// if this call is used to apply a force or impulse to an articulation link, only the link is updated, not the entire
    /// articulation
    ///
    /// ::PxForceMode determines if the force is to be conventional or impulsive. Only eFORCE and eIMPULSE are supported, as the
    /// force required to produce a given velocity change or acceleration is underdetermined given only the desired change at a
    /// given point.
    ///
    /// Sleeping:
    /// This call wakes the actor if it is sleeping and the wakeup parameter is true (default).
    pub fn PxRigidBodyExt_addForceAtPos(body: *mut PxRigidBody, force: *const PxVec3, pos: *const PxVec3, mode: PxForceMode, wakeup: bool);

    /// Applies a force (or impulse) defined in the global coordinate frame, acting at a particular
    /// point in local coordinates, to the actor.
    ///
    /// Note that if the force does not act along the center of mass of the actor, this
    /// will also add the corresponding torque. Because forces are reset at the end of every timestep, you can maintain a
    /// total external force on an object by calling this once every frame.
    ///
    /// if this call is used to apply a force or impulse to an articulation link, only the link is updated, not the entire
    /// articulation
    ///
    /// ::PxForceMode determines if the force is to be conventional or impulsive. Only eFORCE and eIMPULSE are supported, as the
    /// force required to produce a given velocity change or acceleration is underdetermined given only the desired change at a
    /// given point.
    ///
    /// Sleeping:
    /// This call wakes the actor if it is sleeping and the wakeup parameter is true (default).
    pub fn PxRigidBodyExt_addForceAtLocalPos(body: *mut PxRigidBody, force: *const PxVec3, pos: *const PxVec3, mode: PxForceMode, wakeup: bool);

    /// Applies a force (or impulse) defined in the actor local coordinate frame, acting at a
    /// particular point in global coordinates, to the actor.
    ///
    /// Note that if the force does not act along the center of mass of the actor, this
    /// will also add the corresponding torque. Because forces are reset at the end of every timestep, you can maintain a
    /// total external force on an object by calling this once every frame.
    ///
    /// if this call is used to apply a force or impulse to an articulation link, only the link is updated, not the entire
    /// articulation
    ///
    /// ::PxForceMode determines if the force is to be conventional or impulsive. Only eFORCE and eIMPULSE are supported, as the
    /// force required to produce a given velocity change or acceleration is underdetermined given only the desired change at a
    /// given point.
    ///
    /// Sleeping:
    /// This call wakes the actor if it is sleeping and the wakeup parameter is true (default).
    pub fn PxRigidBodyExt_addLocalForceAtPos(body: *mut PxRigidBody, force: *const PxVec3, pos: *const PxVec3, mode: PxForceMode, wakeup: bool);

    /// Applies a force (or impulse) defined in the actor local coordinate frame, acting at a
    /// particular point in local coordinates, to the actor.
    ///
    /// Note that if the force does not act along the center of mass of the actor, this
    /// will also add the corresponding torque. Because forces are reset at the end of every timestep, you can maintain a
    /// total external force on an object by calling this once every frame.
    ///
    /// if this call is used to apply a force or impulse to an articulation link, only the link is updated, not the entire
    /// articulation
    ///
    /// ::PxForceMode determines if the force is to be conventional or impulsive. Only eFORCE and eIMPULSE are supported, as the
    /// force required to produce a given velocity change or acceleration is underdetermined given only the desired change at a
    /// given point.
    ///
    /// Sleeping:
    /// This call wakes the actor if it is sleeping and the wakeup parameter is true (default).
    pub fn PxRigidBodyExt_addLocalForceAtLocalPos(body: *mut PxRigidBody, force: *const PxVec3, pos: *const PxVec3, mode: PxForceMode, wakeup: bool);

    /// Computes the velocity of a point given in world coordinates if it were attached to the
    /// specified body and moving with it.
    ///
    /// The velocity of point in the global frame.
    pub fn PxRigidBodyExt_getVelocityAtPos(body: *const PxRigidBody, pos: *const PxVec3) -> PxVec3;

    /// Computes the velocity of a point given in local coordinates if it were attached to the
    /// specified body and moving with it.
    ///
    /// The velocity of point in the local frame.
    pub fn PxRigidBodyExt_getLocalVelocityAtLocalPos(body: *const PxRigidBody, pos: *const PxVec3) -> PxVec3;

    /// Computes the velocity of a point (offset from the origin of the body) given in world coordinates if it were attached to the
    /// specified body and moving with it.
    ///
    /// The velocity of point (offset from the origin of the body) in the global frame.
    pub fn PxRigidBodyExt_getVelocityAtOffset(body: *const PxRigidBody, pos: *const PxVec3) -> PxVec3;

    /// Compute the change to linear and angular velocity that would occur if an impulsive force and torque were to be applied to a specified rigid body.
    ///
    /// The rigid body is left unaffected unless a subsequent independent call is executed that actually applies the computed changes to velocity and angular velocity.
    ///
    /// if this call is used to determine the velocity delta for an articulation link, only the mass properties of the link are taken into account.
    pub fn PxRigidBodyExt_computeVelocityDeltaFromImpulse(body: *const PxRigidBody, impulsiveForce: *const PxVec3, impulsiveTorque: *const PxVec3, deltaLinearVelocity: *mut PxVec3, deltaAngularVelocity: *mut PxVec3);

    /// Computes the linear and angular velocity change vectors for a given impulse at a world space position taking a mass and inertia scale into account
    ///
    /// This function is useful for extracting the respective linear and angular velocity changes from a contact or joint when the mass/inertia ratios have been adjusted.
    ///
    /// if this call is used to determine the velocity delta for an articulation link, only the mass properties of the link are taken into account.
    pub fn PxRigidBodyExt_computeVelocityDeltaFromImpulse_1(body: *const PxRigidBody, globalPose: *const PxTransform, point: *const PxVec3, impulse: *const PxVec3, invMassScale: f32, invInertiaScale: f32, deltaLinearVelocity: *mut PxVec3, deltaAngularVelocity: *mut PxVec3);

    /// Computes the linear and angular impulse vectors for a given impulse at a world space position taking a mass and inertia scale into account
    ///
    /// This function is useful for extracting the respective linear and angular impulses from a contact or joint when the mass/inertia ratios have been adjusted.
    pub fn PxRigidBodyExt_computeLinearAngularImpulse(body: *const PxRigidBody, globalPose: *const PxTransform, point: *const PxVec3, impulse: *const PxVec3, invMassScale: f32, invInertiaScale: f32, linearImpulse: *mut PxVec3, angularImpulse: *mut PxVec3);

    /// Performs a linear sweep through space with the body's geometry objects.
    ///
    /// Supported geometries are: box, sphere, capsule, convex. Other geometry types will be ignored.
    ///
    /// If eTOUCH is returned from the filter callback, it will trigger an error and the hit will be discarded.
    ///
    /// The function sweeps all shapes attached to a given rigid body through space and reports the nearest
    /// object in the scene which intersects any of of the shapes swept paths.
    /// Information about the closest intersection is written to a [`PxSweepHit`] structure.
    ///
    /// True if a blocking hit was found.
    pub fn PxRigidBodyExt_linearSweepSingle(body: *mut PxRigidBody, scene: *mut PxScene, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, closestHit: *mut PxSweepHit, shapeIndex: *mut u32, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> bool;

    /// Performs a linear sweep through space with the body's geometry objects, returning all overlaps.
    ///
    /// Supported geometries are: box, sphere, capsule, convex. Other geometry types will be ignored.
    ///
    /// This function sweeps all shapes attached to a given rigid body through space and reports all
    /// objects in the scene that intersect any of the shapes' swept paths until there are no more objects to report
    /// or a blocking hit is encountered.
    ///
    /// the number of touching hits. If overflow is set to true, the results are incomplete. In case of overflow there are also no guarantees that all touching hits returned are closer than the blocking hit.
    pub fn PxRigidBodyExt_linearSweepMultiple(body: *mut PxRigidBody, scene: *mut PxScene, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, touchHitBuffer: *mut PxSweepHit, touchHitShapeIndices: *mut u32, touchHitBufferSize: u32, block: *mut PxSweepHit, blockingShapeIndex: *mut i32, overflow: *mut bool, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> u32;

    /// Retrieves the world space pose of the shape.
    ///
    /// Global pose of shape.
    pub fn PxShapeExt_getGlobalPose(shape: *const PxShape, actor: *const PxRigidActor) -> PxTransform;

    /// Raycast test against the shape.
    ///
    /// Number of hits between the ray and the shape
    pub fn PxShapeExt_raycast(shape: *const PxShape, actor: *const PxRigidActor, rayOrigin: *const PxVec3, rayDir: *const PxVec3, maxDist: f32, hitFlags: PxHitFlags, maxHits: u32, rayHits: *mut PxRaycastHit) -> u32;

    /// Test overlap between the shape and a geometry object
    ///
    /// True if the shape overlaps the geometry object
    pub fn PxShapeExt_overlap(shape: *const PxShape, actor: *const PxRigidActor, otherGeom: *const PxGeometry, otherGeomPose: *const PxTransform) -> bool;

    /// Sweep a geometry object against the shape.
    ///
    /// Currently only box, sphere, capsule and convex mesh shapes are supported, i.e. the swept geometry object must be one of those types.
    ///
    /// True if the swept geometry object hits the shape
    pub fn PxShapeExt_sweep(shape: *const PxShape, actor: *const PxRigidActor, unitDir: *const PxVec3, distance: f32, otherGeom: *const PxGeometry, otherGeomPose: *const PxTransform, sweepHit: *mut PxSweepHit, hitFlags: PxHitFlags) -> bool;

    /// Retrieves the axis aligned bounding box enclosing the shape.
    ///
    /// The shape's bounding box.
    pub fn PxShapeExt_getWorldBounds(shape: *const PxShape, actor: *const PxRigidActor, inflation: f32) -> PxBounds3;

    pub fn PxMeshOverlapUtil_new_alloc() -> *mut PxMeshOverlapUtil;

    pub fn PxMeshOverlapUtil_delete(self_: *mut PxMeshOverlapUtil);

    /// Find the mesh triangles which touch the specified geometry object.
    ///
    /// Number of overlaps found. Triangle indices can then be accessed through the [`getResults`]() function.
    pub fn PxMeshOverlapUtil_findOverlap_mut(self_: *mut PxMeshOverlapUtil, geom: *const PxGeometry, geomPose: *const PxTransform, meshGeom: *const PxTriangleMeshGeometry, meshPose: *const PxTransform) -> u32;

    /// Find the height field triangles which touch the specified geometry object.
    ///
    /// Number of overlaps found. Triangle indices can then be accessed through the [`getResults`]() function.
    pub fn PxMeshOverlapUtil_findOverlap_mut_1(self_: *mut PxMeshOverlapUtil, geom: *const PxGeometry, geomPose: *const PxTransform, hfGeom: *const PxHeightFieldGeometry, hfPose: *const PxTransform) -> u32;

    /// Retrieves array of triangle indices after a findOverlap call.
    ///
    /// Indices of touched triangles
    pub fn PxMeshOverlapUtil_getResults(self_: *const PxMeshOverlapUtil) -> *const u32;

    /// Retrieves number of triangle indices after a findOverlap call.
    ///
    /// Number of touched triangles
    pub fn PxMeshOverlapUtil_getNbResults(self_: *const PxMeshOverlapUtil) -> u32;

    /// Computes an approximate minimum translational distance (MTD) between a geometry object and a mesh.
    ///
    /// This iterative function computes an approximate vector that can be used to depenetrate a geom object
    /// from a triangle mesh. Returned depenetration vector should be applied to 'geom', to get out of the mesh.
    ///
    /// The function works best when the amount of overlap between the geom object and the mesh is small. If the
    /// geom object's center goes inside the mesh, backface culling usually kicks in, no overlap is detected,
    /// and the function does not compute an MTD vector.
    ///
    /// The function early exits if no overlap is detected after a depenetration attempt. This means that if
    /// maxIter = N, the code will attempt at most N iterations but it might exit earlier if depenetration has
    /// been successful. Usually N = 4 gives good results.
    ///
    /// True if the MTD has successfully been computed, i.e. if objects do overlap.
    pub fn phys_PxComputeTriangleMeshPenetration(direction: *mut PxVec3, depth: *mut f32, geom: *const PxGeometry, geomPose: *const PxTransform, meshGeom: *const PxTriangleMeshGeometry, meshPose: *const PxTransform, maxIter: u32, usedIter: *mut u32) -> bool;

    /// Computes an approximate minimum translational distance (MTD) between a geometry object and a heightfield.
    ///
    /// This iterative function computes an approximate vector that can be used to depenetrate a geom object
    /// from a heightfield. Returned depenetration vector should be applied to 'geom', to get out of the heightfield.
    ///
    /// The function works best when the amount of overlap between the geom object and the mesh is small. If the
    /// geom object's center goes inside the heightfield, backface culling usually kicks in, no overlap is detected,
    /// and the function does not compute an MTD vector.
    ///
    /// The function early exits if no overlap is detected after a depenetration attempt. This means that if
    /// maxIter = N, the code will attempt at most N iterations but it might exit earlier if depenetration has
    /// been successful. Usually N = 4 gives good results.
    ///
    /// True if the MTD has successfully been computed, i.e. if objects do overlap.
    pub fn phys_PxComputeHeightFieldPenetration(direction: *mut PxVec3, depth: *mut f32, geom: *const PxGeometry, geomPose: *const PxTransform, heightFieldGeom: *const PxHeightFieldGeometry, heightFieldPose: *const PxTransform, maxIter: u32, usedIter: *mut u32) -> bool;

    pub fn PxXmlMiscParameter_new() -> PxXmlMiscParameter;

    pub fn PxXmlMiscParameter_new_1(inUpVector: *mut PxVec3, inScale: PxTolerancesScale) -> PxXmlMiscParameter;

    /// Returns whether the collection is serializable with the externalReferences collection.
    ///
    /// Some definitions to explain whether a collection can be serialized or not:
    ///
    /// For definitions of
    /// requires
    /// and
    /// complete
    /// see [`PxSerialization::complete`]
    ///
    /// A serializable object is
    /// subordinate
    /// if it cannot be serialized on its own
    /// The following objects are subordinate:
    /// - articulation links
    /// - articulation joints
    /// - joints
    ///
    /// A collection C can be serialized with external references collection D iff
    /// - C is complete relative to D (no dangling references)
    /// - Every object in D required by an object in C has a valid ID (no unnamed references)
    /// - Every subordinate object in C is required by another object in C (no orphans)
    ///
    /// Whether the collection is serializable
    pub fn PxSerialization_isSerializable(collection: *mut PxCollection, sr: *mut PxSerializationRegistry, externalReferences: *const PxCollection) -> bool;

    /// Adds to a collection all objects such that it can be successfully serialized.
    ///
    /// A collection C is complete relative to an other collection D if every object required by C is either in C or D.
    /// This function adds objects to a collection, such that it becomes complete with respect to the exceptFor collection.
    /// Completeness is needed for serialization. See [`PxSerialization::serializeCollectionToBinary`],
    /// [`PxSerialization::serializeCollectionToXml`].
    ///
    /// Sdk objects require other sdk object according to the following rules:
    /// - joints require their actors and constraint
    /// - rigid actors require their shapes
    /// - shapes require their material(s) and mesh (triangle mesh, convex mesh or height field), if any
    /// - articulations require their links and joints
    /// - aggregates require their actors
    ///
    /// If followJoints is specified another rule is added:
    /// - actors require their joints
    ///
    /// Specifying followJoints will make whole jointed actor chains being added to the collection. Following chains
    /// is interrupted whenever a object in exceptFor is encountered.
    pub fn PxSerialization_complete(collection: *mut PxCollection, sr: *mut PxSerializationRegistry, exceptFor: *const PxCollection, followJoints: bool);

    /// Creates PxSerialObjectId values for unnamed objects in a collection.
    ///
    /// Creates PxSerialObjectId names for unnamed objects in a collection starting at a base value and incrementing,
    /// skipping values that are already assigned to objects in the collection.
    pub fn PxSerialization_createSerialObjectIds(collection: *mut PxCollection, base: u64);

    /// Creates a PxCollection from XML data.
    ///
    /// a pointer to a PxCollection if successful or NULL if it failed.
    pub fn PxSerialization_createCollectionFromXml(inputData: *mut PxInputData, cooking: *mut PxCooking, sr: *mut PxSerializationRegistry, externalRefs: *const PxCollection, stringTable: *mut PxStringTable, outArgs: *mut PxXmlMiscParameter) -> *mut PxCollection;

    /// Deserializes a PxCollection from memory.
    ///
    /// Creates a collection from memory. If the collection has external dependencies another collection
    /// can be provided to resolve these.
    ///
    /// The memory block provided has to be 128 bytes aligned and contain a contiguous serialized collection as written
    /// by PxSerialization::serializeCollectionToBinary. The contained binary data needs to be compatible with the current binary format version
    /// which is defined by "PX_PHYSICS_VERSION_MAJOR.PX_PHYSICS_VERSION_MINOR.PX_PHYSICS_VERSION_BUGFIX-PX_BINARY_SERIAL_VERSION".
    /// For a list of compatible sdk releases refer to the documentation of PX_BINARY_SERIAL_VERSION.
    pub fn PxSerialization_createCollectionFromBinary(memBlock: *mut std::ffi::c_void, sr: *mut PxSerializationRegistry, externalRefs: *const PxCollection) -> *mut PxCollection;

    /// Serializes a physics collection to an XML output stream.
    ///
    /// The collection to be serialized needs to be complete
    ///
    /// Serialization of objects in a scene that is simultaneously being simulated is not supported and leads to undefined behavior.
    ///
    /// true if the collection is successfully serialized.
    pub fn PxSerialization_serializeCollectionToXml(outputStream: *mut PxOutputStream, collection: *mut PxCollection, sr: *mut PxSerializationRegistry, cooking: *mut PxCooking, externalRefs: *const PxCollection, inArgs: *mut PxXmlMiscParameter) -> bool;

    /// Serializes a collection to a binary stream.
    ///
    /// Serializes a collection to a stream. In order to resolve external dependencies the externalReferences collection has to be provided.
    /// Optionally names of objects that where set for example with [`PxActor::setName`] are serialized along with the objects.
    ///
    /// The collection can be successfully serialized if isSerializable(collection) returns true. See [`isSerializable`].
    ///
    /// The implementation of the output stream needs to fulfill the requirements on the memory block input taken by
    /// PxSerialization::createCollectionFromBinary.
    ///
    /// Serialization of objects in a scene that is simultaneously being simulated is not supported and leads to undefined behavior.
    ///
    /// Whether serialization was successful
    pub fn PxSerialization_serializeCollectionToBinary(outputStream: *mut PxOutputStream, collection: *mut PxCollection, sr: *mut PxSerializationRegistry, externalRefs: *const PxCollection, exportNames: bool) -> bool;

    /// Creates an application managed registry for serialization.
    ///
    /// PxSerializationRegistry instance.
    pub fn PxSerialization_createSerializationRegistry(physics: *mut PxPhysics) -> *mut PxSerializationRegistry;

    /// Deletes the dispatcher.
    ///
    /// Do not keep a reference to the deleted instance.
    pub fn PxDefaultCpuDispatcher_release_mut(self_: *mut PxDefaultCpuDispatcher);

    /// Enables profiling at task level.
    ///
    /// By default enabled only in profiling builds.
    pub fn PxDefaultCpuDispatcher_setRunProfiled_mut(self_: *mut PxDefaultCpuDispatcher, runProfiled: bool);

    /// Checks if profiling is enabled at task level.
    ///
    /// True if tasks should be profiled.
    pub fn PxDefaultCpuDispatcher_getRunProfiled(self_: *const PxDefaultCpuDispatcher) -> bool;

    /// Create default dispatcher, extensions SDK needs to be initialized first.
    ///
    /// numThreads may be zero in which case no worker thread are initialized and
    /// simulation tasks will be executed on the thread that calls PxScene::simulate()
    ///
    /// yieldProcessorCount must be greater than zero if eYIELD_PROCESSOR is the chosen mode and equal to zero for all other modes.
    ///
    /// eYIELD_THREAD and eYIELD_PROCESSOR modes will use compute resources even if the simulation is not running.
    /// It is left to users to keep threads inactive, if so desired, when no simulation is running.
    pub fn phys_PxDefaultCpuDispatcherCreate(numThreads: u32, affinityMasks: *mut u32, mode: PxDefaultCpuDispatcherWaitForWorkMode, yieldProcessorCount: u32) -> *mut PxDefaultCpuDispatcher;

    /// Builds smooth vertex normals over a mesh.
    ///
    /// - "smooth" because smoothing groups are not supported here
    /// - takes angles into account for correct cube normals computation
    ///
    /// To use 32bit indices pass a pointer in dFaces and set wFaces to zero. Alternatively pass a pointer to
    /// wFaces and set dFaces to zero.
    ///
    /// True on success.
    pub fn phys_PxBuildSmoothNormals(nbTris: u32, nbVerts: u32, verts: *const PxVec3, dFaces: *const u32, wFaces: *const u16, normals: *mut PxVec3, flip: bool) -> bool;

    /// simple method to create a PxRigidDynamic actor with a single PxShape.
    ///
    /// a new dynamic actor with the PxRigidBodyFlag, or NULL if it could
    /// not be constructed
    pub fn phys_PxCreateDynamic(sdk: *mut PxPhysics, transform: *const PxTransform, geometry: *const PxGeometry, material: *mut PxMaterial, density: f32, shapeOffset: *const PxTransform) -> *mut PxRigidDynamic;

    /// simple method to create a PxRigidDynamic actor with a single PxShape.
    ///
    /// a new dynamic actor with the PxRigidBodyFlag, or NULL if it could
    /// not be constructed
    pub fn phys_PxCreateDynamic_1(sdk: *mut PxPhysics, transform: *const PxTransform, shape: *mut PxShape, density: f32) -> *mut PxRigidDynamic;

    /// simple method to create a kinematic PxRigidDynamic actor with a single PxShape.
    ///
    /// unlike PxCreateDynamic, the geometry is not restricted to box, capsule, sphere or convex. However,
    /// kinematics of other geometry types may not participate in simulation collision and may be used only for
    /// triggers or scene queries of moving objects under animation control. In this case the density parameter
    /// will be ignored and the created shape will be set up as a scene query only shape (see [`PxShapeFlag::eSCENE_QUERY_SHAPE`])
    ///
    /// a new dynamic actor with the PxRigidBodyFlag::eKINEMATIC set, or NULL if it could
    /// not be constructed
    pub fn phys_PxCreateKinematic(sdk: *mut PxPhysics, transform: *const PxTransform, geometry: *const PxGeometry, material: *mut PxMaterial, density: f32, shapeOffset: *const PxTransform) -> *mut PxRigidDynamic;

    /// simple method to create a kinematic PxRigidDynamic actor with a single PxShape.
    ///
    /// unlike PxCreateDynamic, the geometry is not restricted to box, capsule, sphere or convex. However,
    /// kinematics of other geometry types may not participate in simulation collision and may be used only for
    /// triggers or scene queries of moving objects under animation control. In this case the density parameter
    /// will be ignored and the created shape will be set up as a scene query only shape (see [`PxShapeFlag::eSCENE_QUERY_SHAPE`])
    ///
    /// a new dynamic actor with the PxRigidBodyFlag::eKINEMATIC set, or NULL if it could
    /// not be constructed
    pub fn phys_PxCreateKinematic_1(sdk: *mut PxPhysics, transform: *const PxTransform, shape: *mut PxShape, density: f32) -> *mut PxRigidDynamic;

    /// simple method to create a PxRigidStatic actor with a single PxShape.
    ///
    /// a new static actor, or NULL if it could not be constructed
    pub fn phys_PxCreateStatic(sdk: *mut PxPhysics, transform: *const PxTransform, geometry: *const PxGeometry, material: *mut PxMaterial, shapeOffset: *const PxTransform) -> *mut PxRigidStatic;

    /// simple method to create a PxRigidStatic actor with a single PxShape.
    ///
    /// a new static actor, or NULL if it could not be constructed
    pub fn phys_PxCreateStatic_1(sdk: *mut PxPhysics, transform: *const PxTransform, shape: *mut PxShape) -> *mut PxRigidStatic;

    /// create a shape by copying attributes from another shape
    ///
    /// The function clones a PxShape. The following properties are copied:
    /// - geometry
    /// - flags
    /// - materials
    /// - actor-local pose
    /// - contact offset
    /// - rest offset
    /// - simulation filter data
    /// - query filter data
    /// - torsional patch radius
    /// - minimum torsional patch radius
    ///
    /// The following are not copied and retain their default values:
    /// - name
    /// - user data
    ///
    /// the newly-created rigid static
    pub fn phys_PxCloneShape(physicsSDK: *mut PxPhysics, shape: *const PxShape, isExclusive: bool) -> *mut PxShape;

    /// create a static body by copying attributes from another rigid actor
    ///
    /// The function clones a PxRigidDynamic or PxRigidStatic as a PxRigidStatic. A uniform scale is applied. The following properties are copied:
    /// - shapes
    /// - actor flags
    /// - owner client and client behavior bits
    /// - dominance group
    ///
    /// The following are not copied and retain their default values:
    /// - name
    /// - joints or observers
    /// - aggregate or scene membership
    /// - user data
    ///
    /// Transforms are not copied with bit-exact accuracy.
    ///
    /// the newly-created rigid static
    pub fn phys_PxCloneStatic(physicsSDK: *mut PxPhysics, transform: *const PxTransform, actor: *const PxRigidActor) -> *mut PxRigidStatic;

    /// create a dynamic body by copying attributes from an existing body
    ///
    /// The following properties are copied:
    /// - shapes
    /// - actor flags, rigidDynamic flags and rigidDynamic lock flags
    /// - mass, moment of inertia, and center of mass frame
    /// - linear and angular velocity
    /// - linear and angular damping
    /// - maximum linear velocity
    /// - maximum angular velocity
    /// - position and velocity solver iterations
    /// - maximum depenetration velocity
    /// - sleep threshold
    /// - contact report threshold
    /// - dominance group
    /// - owner client and client behavior bits
    /// - name pointer
    /// - kinematic target
    ///
    /// The following are not copied and retain their default values:
    /// - name
    /// - joints or observers
    /// - aggregate or scene membership
    /// - sleep timer
    /// - user data
    ///
    /// Transforms are not copied with bit-exact accuracy.
    ///
    /// the newly-created rigid static
    pub fn phys_PxCloneDynamic(physicsSDK: *mut PxPhysics, transform: *const PxTransform, body: *const PxRigidDynamic) -> *mut PxRigidDynamic;

    /// create a plane actor. The plane equation is n.x + d = 0
    ///
    /// a new static actor, or NULL if it could not be constructed
    pub fn phys_PxCreatePlane(sdk: *mut PxPhysics, plane: *const PxPlane, material: *mut PxMaterial) -> *mut PxRigidStatic;

    /// scale a rigid actor by a uniform scale
    ///
    /// The geometry and relative positions of the actor are multiplied by the given scale value. If the actor is a rigid body or an
    /// articulation link and the scaleMassProps value is true, the mass properties are scaled assuming the density is constant: the
    /// center of mass is linearly scaled, the mass is multiplied by the cube of the scale, and the inertia tensor by the fifth power of the scale.
    pub fn phys_PxScaleRigidActor(actor: *mut PxRigidActor, scale: f32, scaleMassProps: bool);

    pub fn PxStringTableExt_createStringTable(inAllocator: *mut PxAllocatorCallback) -> *mut PxStringTable;

    /// Creates regions for PxSceneDesc, from a global box.
    ///
    /// This helper simply subdivides the given global box into a 2D grid of smaller boxes. Each one of those smaller boxes
    /// is a region of interest for the broadphase. There are nbSubdiv*nbSubdiv regions in the 2D grid. The function does not
    /// subdivide along the given up axis.
    ///
    /// This is the simplest setup one can use with PxBroadPhaseType::eMBP. A more sophisticated setup would try to cover
    /// the game world with a non-uniform set of regions (i.e. not just a grid).
    ///
    /// number of regions written out to the 'regions' array
    pub fn PxBroadPhaseExt_createRegionsFromWorldBounds(regions: *mut PxBounds3, globalBounds: *const PxBounds3, nbSubdiv: u32, upAxis: u32) -> u32;

    /// Raycast returning any blocking hit, not necessarily the closest.
    ///
    /// Returns whether any rigid actor is hit along the ray.
    ///
    /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
    ///
    /// True if a blocking hit was found.
    pub fn PxSceneQueryExt_raycastAny(scene: *const PxScene, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, hit: *mut PxQueryHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache) -> bool;

    /// Raycast returning a single result.
    ///
    /// Returns the first rigid actor that is hit along the ray. Data for a blocking hit will be returned as specified by the outputFlags field. Touching hits will be ignored.
    ///
    /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
    ///
    /// True if a blocking hit was found.
    pub fn PxSceneQueryExt_raycastSingle(scene: *const PxScene, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, hit: *mut PxRaycastHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache) -> bool;

    /// Raycast returning multiple results.
    ///
    /// Find all rigid actors that get hit along the ray. Each result contains data as specified by the outputFlags field.
    ///
    /// Touching hits are not ordered.
    ///
    /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
    ///
    /// Number of hits in the buffer, or -1 if the buffer overflowed.
    pub fn PxSceneQueryExt_raycastMultiple(scene: *const PxScene, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, hitBuffer: *mut PxRaycastHit, hitBufferSize: u32, blockingHit: *mut bool, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache) -> i32;

    /// Sweep returning any blocking hit, not necessarily the closest.
    ///
    /// Returns whether any rigid actor is hit along the sweep path.
    ///
    /// If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
    ///
    /// True if a blocking hit was found.
    pub fn PxSceneQueryExt_sweepAny(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, queryFlags: PxHitFlags, hit: *mut PxQueryHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> bool;

    /// Sweep returning a single result.
    ///
    /// Returns the first rigid actor that is hit along the ray. Data for a blocking hit will be returned as specified by the outputFlags field. Touching hits will be ignored.
    ///
    /// If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
    ///
    /// True if a blocking hit was found.
    pub fn PxSceneQueryExt_sweepSingle(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, hit: *mut PxSweepHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> bool;

    /// Sweep returning multiple results.
    ///
    /// Find all rigid actors that get hit along the sweep. Each result contains data as specified by the outputFlags field.
    ///
    /// Touching hits are not ordered.
    ///
    /// If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
    ///
    /// Number of hits in the buffer, or -1 if the buffer overflowed.
    pub fn PxSceneQueryExt_sweepMultiple(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, outputFlags: PxHitFlags, hitBuffer: *mut PxSweepHit, hitBufferSize: u32, blockingHit: *mut bool, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback, cache: *const PxQueryCache, inflation: f32) -> i32;

    /// Test overlap between a geometry and objects in the scene.
    ///
    /// Filtering: Overlap tests do not distinguish between touching and blocking hit types. Both get written to the hit buffer.
    ///
    /// PxHitFlag::eMESH_MULTIPLE and PxHitFlag::eMESH_BOTH_SIDES have no effect in this case
    ///
    /// Number of hits in the buffer, or -1 if the buffer overflowed.
    pub fn PxSceneQueryExt_overlapMultiple(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, hitBuffer: *mut PxOverlapHit, hitBufferSize: u32, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback) -> i32;

    /// Test returning, for a given geometry, any overlapping object in the scene.
    ///
    /// Filtering: Overlap tests do not distinguish between touching and blocking hit types. Both trigger a hit.
    ///
    /// PxHitFlag::eMESH_MULTIPLE and PxHitFlag::eMESH_BOTH_SIDES have no effect in this case
    ///
    /// True if an overlap was found.
    pub fn PxSceneQueryExt_overlapAny(scene: *const PxScene, geometry: *const PxGeometry, pose: *const PxTransform, hit: *mut PxOverlapHit, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback) -> bool;

    pub fn PxBatchQueryExt_release_mut(self_: *mut PxBatchQueryExt);

    /// Performs a raycast against objects in the scene.
    ///
    /// Touching hits are not ordered.
    ///
    /// Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
    ///
    /// This query call writes to a list associated with the query object and is NOT thread safe (for performance reasons there is no lock
    /// and overlapping writes from different threads may result in undefined behavior).
    ///
    /// Returns a PxRaycastBuffer pointer that will store the result of the query after execute() is completed.
    /// This will point either to an element of the buffer allocated on construction or to a user buffer passed to the constructor.
    pub fn PxBatchQueryExt_raycast_mut(self_: *mut PxBatchQueryExt, origin: *const PxVec3, unitDir: *const PxVec3, distance: f32, maxNbTouches: u16, hitFlags: PxHitFlags, filterData: *const PxQueryFilterData, cache: *const PxQueryCache) -> *mut PxRaycastBuffer;

    /// Performs a sweep test against objects in the scene.
    ///
    /// Touching hits are not ordered.
    ///
    /// If a shape from the scene is already overlapping with the query shape in its starting position,
    /// the hit is returned unless eASSUME_NO_INITIAL_OVERLAP was specified.
    ///
    /// This query call writes to a list associated with the query object and is NOT thread safe (for performance reasons there is no lock
    /// and overlapping writes from different threads may result in undefined behavior).
    ///
    /// Returns a PxSweepBuffer pointer that will store the result of the query after execute() is completed.
    /// This will point either to an element of the buffer allocated on construction or to a user buffer passed to the constructor.
    pub fn PxBatchQueryExt_sweep_mut(self_: *mut PxBatchQueryExt, geometry: *const PxGeometry, pose: *const PxTransform, unitDir: *const PxVec3, distance: f32, maxNbTouches: u16, hitFlags: PxHitFlags, filterData: *const PxQueryFilterData, cache: *const PxQueryCache, inflation: f32) -> *mut PxSweepBuffer;

    /// Performs an overlap test of a given geometry against objects in the scene.
    ///
    /// Filtering: returning eBLOCK from user filter for overlap queries will cause a warning (see [`PxQueryHitType`]).
    ///
    /// eBLOCK should not be returned from user filters for overlap(). Doing so will result in undefined behavior, and a warning will be issued.
    ///
    /// If the PxQueryFlag::eNO_BLOCK flag is set, the eBLOCK will instead be automatically converted to an eTOUCH and the warning suppressed.
    ///
    /// This query call writes to a list associated with the query object and is NOT thread safe (for performance reasons there is no lock
    /// and overlapping writes from different threads may result in undefined behavior).
    ///
    /// Returns a PxOverlapBuffer pointer that will store the result of the query after execute() is completed.
    /// This will point either to an element of the buffer allocated on construction or to a user buffer passed to the constructor.
    pub fn PxBatchQueryExt_overlap_mut(self_: *mut PxBatchQueryExt, geometry: *const PxGeometry, pose: *const PxTransform, maxNbTouches: u16, filterData: *const PxQueryFilterData, cache: *const PxQueryCache) -> *mut PxOverlapBuffer;

    pub fn PxBatchQueryExt_execute_mut(self_: *mut PxBatchQueryExt);

    /// Create a PxBatchQueryExt without the need for pre-allocated result or touch buffers.
    ///
    /// Returns a PxBatchQueryExt instance. A NULL pointer will be returned if the subsequent allocations fail or if any of the arguments are illegal.
    /// In the event that a NULL pointer is returned a corresponding error will be issued to the error stream.
    pub fn phys_PxCreateBatchQueryExt(scene: *const PxScene, queryFilterCallback: *mut PxQueryFilterCallback, maxNbRaycasts: u32, maxNbRaycastTouches: u32, maxNbSweeps: u32, maxNbSweepTouches: u32, maxNbOverlaps: u32, maxNbOverlapTouches: u32) -> *mut PxBatchQueryExt;

    /// Create a PxBatchQueryExt with user-supplied result and touch buffers.
    ///
    /// Returns a PxBatchQueryExt instance. A NULL pointer will be returned if the subsequent allocations fail or if any of the arguments are illegal.
    /// In the event that a NULL pointer is returned a corresponding error will be issued to the error stream.
    pub fn phys_PxCreateBatchQueryExt_1(scene: *const PxScene, queryFilterCallback: *mut PxQueryFilterCallback, raycastBuffers: *mut PxRaycastBuffer, maxNbRaycasts: u32, raycastTouches: *mut PxRaycastHit, maxNbRaycastTouches: u32, sweepBuffers: *mut PxSweepBuffer, maxNbSweeps: u32, sweepTouches: *mut PxSweepHit, maxNbSweepTouches: u32, overlapBuffers: *mut PxOverlapBuffer, maxNbOverlaps: u32, overlapTouches: *mut PxOverlapHit, maxNbOverlapTouches: u32) -> *mut PxBatchQueryExt;

    /// Creates an external scene query system.
    ///
    /// An external SQ system is the part of a PxScene that deals with scene queries (SQ). This is usually taken care of
    /// by an internal implementation inside PxScene, but it is also possible to re-route all SQ calls to an external
    /// implementation, potentially opening the door to some customizations in behavior and features for advanced users.
    ///
    /// The following external SQ system is an example of how an implementation would look like. It re-uses much of the
    /// same code as the internal version, but it could be re-implemented in a completely different way to match users'
    /// specific needs.
    ///
    /// An external SQ system instance
    pub fn phys_PxCreateExternalSceneQuerySystem(desc: *const PxSceneQueryDesc, contextID: u64) -> *mut PxSceneQuerySystem;

    /// Adds a pruner to the system.
    ///
    /// The internal PhysX scene-query system uses two regular pruners (one for static shapes, one for dynamic shapes) and an optional
    /// compound pruner. Our custom scene query system supports an arbitrary number of regular pruners.
    ///
    /// This can be useful to reduce the load on each pruner, in particular during updates, when internal trees are rebuilt in the
    /// background. On the other hand this implementation simply iterates over all created pruners to perform queries, so their cost
    /// might increase if a large number of pruners is used.
    ///
    /// In any case this serves as an example of how the PxSceneQuerySystem API can be used to customize scene queries.
    ///
    /// A pruner index
    pub fn PxCustomSceneQuerySystem_addPruner_mut(self_: *mut PxCustomSceneQuerySystem, primaryType: PxPruningStructureType, secondaryType: PxDynamicTreeSecondaryPruner, preallocated: u32) -> u32;

    /// Start custom build-steps for all pruners
    ///
    /// This function is used in combination with customBuildstep() and finishCustomBuildstep() to let users take control
    /// of the pruners' build-step
    /// &
    /// commit calls - basically the pruners' update functions. These functions should be used
    /// with the PxSceneQueryUpdateMode::eBUILD_DISABLED_COMMIT_DISABLED update mode, otherwise the build-steps will happen
    /// automatically in fetchResults. For N pruners it can be more efficient to use these custom build-step functions to
    /// perform the updates in parallel:
    ///
    /// - call startCustomBuildstep() first (one synchronous call)
    /// - for each pruner, call customBuildstep() (asynchronous calls from multiple threads)
    /// - once it is done, call finishCustomBuildstep() to finish the update (synchronous call)
    ///
    /// The multi-threaded update is more efficient here than what it is in PxScene, because the "flushShapes()" call is
    /// also multi-threaded (while it is not in PxScene).
    ///
    /// Note that users are responsible for locks here, and these calls should not overlap with other SQ calls. In particular
    /// one should not add new objects to the SQ system or perform queries while these calls are happening.
    ///
    /// The number of pruners in the system.
    pub fn PxCustomSceneQuerySystem_startCustomBuildstep_mut(self_: *mut PxCustomSceneQuerySystem) -> u32;

    /// Perform a custom build-step for a given pruner.
    pub fn PxCustomSceneQuerySystem_customBuildstep_mut(self_: *mut PxCustomSceneQuerySystem, index: u32);

    /// Finish custom build-steps
    ///
    /// Call this function once after all the customBuildstep() calls are done.
    pub fn PxCustomSceneQuerySystem_finishCustomBuildstep_mut(self_: *mut PxCustomSceneQuerySystem);

    pub fn PxCustomSceneQuerySystemAdapter_delete(self_: *mut PxCustomSceneQuerySystemAdapter);

    /// Gets a pruner index for an actor/shape.
    ///
    /// This user-defined function tells the system in which pruner a given actor/shape should go.
    ///
    /// The returned index must be valid, i.e. it must have been previously returned to users by PxCustomSceneQuerySystem::addPruner.
    ///
    /// A pruner index for this actor/shape.
    pub fn PxCustomSceneQuerySystemAdapter_getPrunerIndex(self_: *const PxCustomSceneQuerySystemAdapter, actor: *const PxRigidActor, shape: *const PxShape) -> u32;

    /// Pruner filtering callback.
    ///
    /// This will be called for each query to validate whether it should process a given pruner.
    ///
    /// True to process the pruner, false to skip it entirely
    pub fn PxCustomSceneQuerySystemAdapter_processPruner(self_: *const PxCustomSceneQuerySystemAdapter, prunerIndex: u32, context: *const PxQueryThreadContext, filterData: *const PxQueryFilterData, filterCall: *mut PxQueryFilterCallback) -> bool;

    /// Creates a custom scene query system.
    ///
    /// This is similar to PxCreateExternalSceneQuerySystem, except this function creates a PxCustomSceneQuerySystem object.
    /// It can be plugged to PxScene the same way, via PxSceneDesc::sceneQuerySystem.
    ///
    /// A custom SQ system instance
    pub fn phys_PxCreateCustomSceneQuerySystem(sceneQueryUpdateMode: PxSceneQueryUpdateMode, contextID: u64, adapter: *const PxCustomSceneQuerySystemAdapter, usesTreeOfPruners: bool) -> *mut PxCustomSceneQuerySystem;

    /// Computes closest polygon of the convex hull geometry for a given impact point
    /// and impact direction. When doing sweeps against a scene, one might want to delay
    /// the rather expensive computation of the hit face index for convexes until it is clear
    /// the information is really needed and then use this method to get the corresponding
    /// face index.
    ///
    /// Closest face index of the convex geometry.
    pub fn phys_PxFindFaceIndex(convexGeom: *const PxConvexMeshGeometry, geomPose: *const PxTransform, impactPos: *const PxVec3, unitDir: *const PxVec3) -> u32;

    /// Sets the sampling radius
    ///
    /// Returns true if the sampling was successful and false if there was a problem. Usually an internal overflow is the problem for very big meshes or very small sampling radii.
    pub fn PxPoissonSampler_setSamplingRadius_mut(self_: *mut PxPoissonSampler, samplingRadius: f32) -> bool;

    /// Adds new Poisson Samples inside the sphere specified
    pub fn PxPoissonSampler_addSamplesInSphere_mut(self_: *mut PxPoissonSampler, sphereCenter: *const PxVec3, sphereRadius: f32, createVolumeSamples: bool);

    /// Adds new Poisson Samples inside the box specified
    pub fn PxPoissonSampler_addSamplesInBox_mut(self_: *mut PxPoissonSampler, axisAlignedBox: *const PxBounds3, boxOrientation: *const PxQuat, createVolumeSamples: bool);

    pub fn PxPoissonSampler_delete(self_: *mut PxPoissonSampler);

    /// Creates a shape sampler
    ///
    /// Returns the sampler
    pub fn phys_PxCreateShapeSampler(geometry: *const PxGeometry, transform: *const PxTransform, worldBounds: *const PxBounds3, initialSamplingRadius: f32, numSampleAttemptsAroundPoint: i32) -> *mut PxPoissonSampler;

    /// Checks whether a point is inside the triangle mesh
    ///
    /// Returns true if the point is inside the triangle mesh
    pub fn PxTriangleMeshPoissonSampler_isPointInTriangleMesh_mut(self_: *mut PxTriangleMeshPoissonSampler, p: *const PxVec3) -> bool;

    pub fn PxTriangleMeshPoissonSampler_delete(self_: *mut PxTriangleMeshPoissonSampler);

    /// Creates a triangle mesh sampler
    ///
    /// Returns the sampler
    pub fn phys_PxCreateTriangleMeshSampler(triangles: *const u32, numTriangles: u32, vertices: *const PxVec3, numVertices: u32, initialSamplingRadius: f32, numSampleAttemptsAroundPoint: i32) -> *mut PxTriangleMeshPoissonSampler;

    /// Returns the index of the tetrahedron that contains a point
    ///
    /// The index of the tetrahedon containing the point, -1 if not tetrahedron contains the opoint
    pub fn PxTetrahedronMeshExt_findTetrahedronContainingPoint(mesh: *const PxTetrahedronMesh, point: *const PxVec3, bary: *mut PxVec4, tolerance: f32) -> i32;

    /// Returns the index of the tetrahedron closest to a point
    ///
    /// The index of the tetrahedon closest to the point
    pub fn PxTetrahedronMeshExt_findTetrahedronClosestToPoint(mesh: *const PxTetrahedronMesh, point: *const PxVec3, bary: *mut PxVec4) -> i32;

    /// Initialize the PhysXExtensions library.
    ///
    /// This should be called before calling any functions or methods in extensions which may require allocation.
    ///
    /// This function does not need to be called before creating a PxDefaultAllocator object.
    pub fn phys_PxInitExtensions(physics: *mut PxPhysics, pvd: *mut PxPvd) -> bool;

    /// Shut down the PhysXExtensions library.
    ///
    /// This function should be called to cleanly shut down the PhysXExtensions library before application exit.
    ///
    /// This function is required to be called to release foundation usage.
    pub fn phys_PxCloseExtensions();

    pub fn PxRepXObject_new(inTypeName: *const std::ffi::c_char, inSerializable: *const std::ffi::c_void, inId: u64) -> PxRepXObject;

    pub fn PxRepXObject_isValid(self_: *const PxRepXObject) -> bool;

    pub fn PxRepXInstantiationArgs_new(inPhysics: *mut PxPhysics, inCooking: *mut PxCooking, inStringTable: *mut PxStringTable) -> PxRepXInstantiationArgs;

    /// The type this Serializer is meant to operate on.
    pub fn PxRepXSerializer_getTypeName_mut(self_: *mut PxRepXSerializer) -> *const std::ffi::c_char;

    /// Convert from a RepX object to a key-value pair hierarchy
    pub fn PxRepXSerializer_objectToFile_mut(self_: *mut PxRepXSerializer, inLiveObject: *const PxRepXObject, inCollection: *mut PxCollection, inWriter: *mut XmlWriter, inTempBuffer: *mut MemoryBuffer, inArgs: *mut PxRepXInstantiationArgs);

    /// Convert from a descriptor to a live object.  Must be an object of this Serializer type.
    ///
    /// The new live object.  It can be an invalid object if the instantiation cannot take place.
    pub fn PxRepXSerializer_fileToObject_mut(self_: *mut PxRepXSerializer, inReader: *mut XmlReader, inAllocator: *mut XmlMemoryAllocator, inArgs: *mut PxRepXInstantiationArgs, inCollection: *mut PxCollection) -> PxRepXObject;

    /// Connects the SDK to the PhysX Visual Debugger application.
    pub fn PxPvd_connect_mut(self_: *mut PxPvd, transport: *mut PxPvdTransport, flags: PxPvdInstrumentationFlags) -> bool;

    /// Disconnects the SDK from the PhysX Visual Debugger application.
    /// If we are still connected, this will kill the entire debugger connection.
    pub fn PxPvd_disconnect_mut(self_: *mut PxPvd);

    /// Return if connection to PVD is created.
    pub fn PxPvd_isConnected_mut(self_: *mut PxPvd, useCachedStatus: bool) -> bool;

    /// returns the PVD data transport
    /// returns NULL if no transport is present.
    pub fn PxPvd_getTransport_mut(self_: *mut PxPvd) -> *mut PxPvdTransport;

    /// Retrieves the PVD flags. See PxPvdInstrumentationFlags.
    pub fn PxPvd_getInstrumentationFlags_mut(self_: *mut PxPvd) -> PxPvdInstrumentationFlags;

    /// Releases the pvd instance.
    pub fn PxPvd_release_mut(self_: *mut PxPvd);

    /// Create a pvd instance.
    pub fn phys_PxCreatePvd(foundation: *mut PxFoundation) -> *mut PxPvd;

    /// Connects to the Visual Debugger application.
    /// return True if success
    pub fn PxPvdTransport_connect_mut(self_: *mut PxPvdTransport) -> bool;

    /// Disconnects from the Visual Debugger application.
    /// If we are still connected, this will kill the entire debugger connection.
    pub fn PxPvdTransport_disconnect_mut(self_: *mut PxPvdTransport);

    /// Return if connection to PVD is created.
    pub fn PxPvdTransport_isConnected_mut(self_: *mut PxPvdTransport) -> bool;

    /// write bytes to the other endpoint of the connection. should lock before witre. If an error occurs
    /// this connection will assume to be dead.
    pub fn PxPvdTransport_write_mut(self_: *mut PxPvdTransport, inBytes: *const u8, inLength: u32) -> bool;

    pub fn PxPvdTransport_lock_mut(self_: *mut PxPvdTransport) -> *mut PxPvdTransport;

    pub fn PxPvdTransport_unlock_mut(self_: *mut PxPvdTransport);

    /// send any data and block until we know it is at least on the wire.
    pub fn PxPvdTransport_flush_mut(self_: *mut PxPvdTransport);

    /// Return size of written data.
    pub fn PxPvdTransport_getWrittenDataSize_mut(self_: *mut PxPvdTransport) -> u64;

    pub fn PxPvdTransport_release_mut(self_: *mut PxPvdTransport);

    /// Create a default socket transport.
    pub fn phys_PxDefaultPvdSocketTransportCreate(host: *const std::ffi::c_char, port: i32, timeoutInMilliseconds: u32) -> *mut PxPvdTransport;

    /// Create a default file transport.
    pub fn phys_PxDefaultPvdFileTransportCreate(name: *const std::ffi::c_char) -> *mut PxPvdTransport;

}