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
extern crate libc;

pub type cpFloat = ::libc::c_double;
pub type cpHashValue = usize;
pub type cpCollisionID = usize;
pub type cpBool = ::libc::c_uchar;
pub type cpDataPointer = *mut ::libc::c_void;
pub type cpCollisionType = usize;
pub type cpGroup = usize;
pub type cpBitmask = ::libc::c_uint;
pub type cpTimestamp = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_cpVect {
    pub x: cpFloat,
    pub y: cpFloat,
}
impl ::std::default::Default for Struct_cpVect {
    fn default() -> Struct_cpVect { unsafe { ::std::mem::zeroed() } }
}
pub type cpVect = Struct_cpVect;
impl Struct_cpVect {
    fn to_tuple(&self) -> (cpFloat, cpFloat) {
        (self.x, self.y)
    }
}

pub fn cpv(x: cpFloat, y: cpFloat) -> cpVect {
    cpVect{x: x, y:y}
}

#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_cpTransform {
    pub a: cpFloat,
    pub b: cpFloat,
    pub c: cpFloat,
    pub d: cpFloat,
    pub tx: cpFloat,
    pub ty: cpFloat,
}
impl ::std::default::Default for Struct_cpTransform {
    fn default() -> Struct_cpTransform { unsafe { ::std::mem::zeroed() } }
}
pub type cpTransform = Struct_cpTransform;
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_cpMat2x2 {
    pub a: cpFloat,
    pub b: cpFloat,
    pub c: cpFloat,
    pub d: cpFloat,
}
impl ::std::default::Default for Struct_cpMat2x2 {
    fn default() -> Struct_cpMat2x2 { unsafe { ::std::mem::zeroed() } }
}
pub type cpMat2x2 = Struct_cpMat2x2;
pub type cpArray = Struct_cpArray;
pub enum Struct_cpHashSet { }
pub type cpHashSet = Struct_cpHashSet;
pub type cpBody = Struct_cpBody;
pub type cpShape = Struct_cpShape;
pub type cpCircleShape = Struct_cpCircleShape;
pub type cpSegmentShape = Struct_cpSegmentShape;
pub type cpPolyShape = Struct_cpPolyShape;
pub type cpConstraint = Struct_cpConstraint;
pub type cpPinJoint = Struct_cpPinJoint;
pub type cpSlideJoint = Struct_cpSlideJoint;
pub type cpPivotJoint = Struct_cpPivotJoint;
pub type cpGrooveJoint = Struct_cpGrooveJoint;
pub type cpDampedSpring = Struct_cpDampedSpring;
pub type cpDampedRotarySpring = Struct_cpDampedRotarySpring;
pub type cpRotaryLimitJoint = Struct_cpRotaryLimitJoint;
pub type cpRatchetJoint = Struct_cpRatchetJoint;
pub type cpGearJoint = Struct_cpGearJoint;
pub enum Struct_cpSimpleMotorJoint { }
pub type cpSimpleMotorJoint = Struct_cpSimpleMotorJoint;
pub type cpCollisionHandler = Struct_cpCollisionHandler;
pub type cpContactPointSet = Struct_cpContactPointSet;
pub type cpArbiter = Struct_cpArbiter;
pub type cpSpace = Struct_cpSpace;
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_cpBB {
    pub l: cpFloat,
    pub b: cpFloat,
    pub r: cpFloat,
    pub t: cpFloat,
}
impl ::std::default::Default for Struct_cpBB {
    fn default() -> Struct_cpBB { unsafe { ::std::mem::zeroed() } }
}
pub type cpBB = Struct_cpBB;
pub type cpSpatialIndexBBFunc =
    ::std::option::Option<extern "C" fn(obj: *mut ::libc::c_void) -> cpBB>;
pub type cpSpatialIndexIteratorFunc =
    ::std::option::Option<extern "C" fn
                              (obj: *mut ::libc::c_void,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpSpatialIndexQueryFunc =
    ::std::option::Option<extern "C" fn
                              (obj1: *mut ::libc::c_void,
                               obj2: *mut ::libc::c_void, id: cpCollisionID,
                               data: *mut ::libc::c_void) -> cpCollisionID>;
pub type cpSpatialIndexSegmentQueryFunc =
    ::std::option::Option<extern "C" fn
                              (obj1: *mut ::libc::c_void,
                               obj2: *mut ::libc::c_void,
                               data: *mut ::libc::c_void) -> cpFloat>;
pub type cpSpatialIndexClass = Struct_cpSpatialIndexClass;
pub type cpSpatialIndex = Struct_cpSpatialIndex;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpSpatialIndex {
    pub klass: *mut cpSpatialIndexClass,
    pub bbfunc: cpSpatialIndexBBFunc,
    pub staticIndex: *mut cpSpatialIndex,
    pub dynamicIndex: *mut cpSpatialIndex,
}
impl ::std::default::Default for Struct_cpSpatialIndex {
    fn default() -> Struct_cpSpatialIndex { unsafe { ::std::mem::zeroed() } }
}
pub enum Struct_cpSpaceHash { }
pub type cpSpaceHash = Struct_cpSpaceHash;
pub enum Struct_cpBBTree { }
pub type cpBBTree = Struct_cpBBTree;
pub type cpBBTreeVelocityFunc =
    ::std::option::Option<extern "C" fn(obj: *mut ::libc::c_void) -> cpVect>;
pub enum Struct_cpSweep1D { }
pub type cpSweep1D = Struct_cpSweep1D;
pub type cpSpatialIndexDestroyImpl =
    ::std::option::Option<extern "C" fn(index: *mut cpSpatialIndex) -> ()>;
pub type cpSpatialIndexCountImpl =
    ::std::option::Option<extern "C" fn(index: *mut cpSpatialIndex)
                              -> ::libc::c_int>;
pub type cpSpatialIndexEachImpl =
    ::std::option::Option<extern "C" fn
                              (index: *mut cpSpatialIndex,
                               func: cpSpatialIndexIteratorFunc,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpSpatialIndexContainsImpl =
    ::std::option::Option<extern "C" fn
                              (index: *mut cpSpatialIndex,
                               obj: *mut ::libc::c_void, hashid: cpHashValue)
                              -> cpBool>;
pub type cpSpatialIndexInsertImpl =
    ::std::option::Option<extern "C" fn
                              (index: *mut cpSpatialIndex,
                               obj: *mut ::libc::c_void, hashid: cpHashValue)
                              -> ()>;
pub type cpSpatialIndexRemoveImpl =
    ::std::option::Option<extern "C" fn
                              (index: *mut cpSpatialIndex,
                               obj: *mut ::libc::c_void, hashid: cpHashValue)
                              -> ()>;
pub type cpSpatialIndexReindexImpl =
    ::std::option::Option<extern "C" fn(index: *mut cpSpatialIndex) -> ()>;
pub type cpSpatialIndexReindexObjectImpl =
    ::std::option::Option<extern "C" fn
                              (index: *mut cpSpatialIndex,
                               obj: *mut ::libc::c_void, hashid: cpHashValue)
                              -> ()>;
pub type cpSpatialIndexReindexQueryImpl =
    ::std::option::Option<extern "C" fn
                              (index: *mut cpSpatialIndex,
                               func: cpSpatialIndexQueryFunc,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpSpatialIndexQueryImpl =
    ::std::option::Option<extern "C" fn
                              (index: *mut cpSpatialIndex,
                               obj: *mut ::libc::c_void, bb: cpBB,
                               func: cpSpatialIndexQueryFunc,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpSpatialIndexSegmentQueryImpl =
    ::std::option::Option<extern "C" fn
                              (index: *mut cpSpatialIndex,
                               obj: *mut ::libc::c_void, a: cpVect, b: cpVect,
                               t_exit: cpFloat,
                               func: cpSpatialIndexSegmentQueryFunc,
                               data: *mut ::libc::c_void) -> ()>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpSpatialIndexClass {
    pub destroy: cpSpatialIndexDestroyImpl,
    pub count: cpSpatialIndexCountImpl,
    pub each: cpSpatialIndexEachImpl,
    pub contains: cpSpatialIndexContainsImpl,
    pub insert: cpSpatialIndexInsertImpl,
    pub remove: cpSpatialIndexRemoveImpl,
    pub reindex: cpSpatialIndexReindexImpl,
    pub reindexObject: cpSpatialIndexReindexObjectImpl,
    pub reindexQuery: cpSpatialIndexReindexQueryImpl,
    pub query: cpSpatialIndexQueryImpl,
    pub segmentQuery: cpSpatialIndexSegmentQueryImpl,
}
impl ::std::default::Default for Struct_cpSpatialIndexClass {
    fn default() -> Struct_cpSpatialIndexClass {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_cpContactPointSet {
    pub count: ::libc::c_int,
    pub normal: cpVect,
    pub points: [Struct_Unnamed1; 2usize],
}
impl ::std::default::Default for Struct_cpContactPointSet {
    fn default() -> Struct_cpContactPointSet {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_Unnamed1 {
    pub pointA: cpVect,
    pub pointB: cpVect,
    pub distance: cpFloat,
}
impl ::std::default::Default for Struct_Unnamed1 {
    fn default() -> Struct_Unnamed1 { unsafe { ::std::mem::zeroed() } }
}
pub type Enum_cpBodyType = ::libc::c_uint;
pub const CP_BODY_TYPE_DYNAMIC: ::libc::c_uint = 0;
pub const CP_BODY_TYPE_KINEMATIC: ::libc::c_uint = 1;
pub const CP_BODY_TYPE_STATIC: ::libc::c_uint = 2;
pub type cpBodyType = Enum_cpBodyType;
pub type cpBodyVelocityFunc =
    ::std::option::Option<extern "C" fn
                              (body: *mut cpBody, gravity: cpVect,
                               damping: cpFloat, dt: cpFloat) -> ()>;
pub type cpBodyPositionFunc =
    ::std::option::Option<extern "C" fn(body: *mut cpBody, dt: cpFloat)
                              -> ()>;
pub type cpBodyShapeIteratorFunc =
    ::std::option::Option<extern "C" fn
                              (body: *mut cpBody, shape: *mut cpShape,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpBodyConstraintIteratorFunc =
    ::std::option::Option<extern "C" fn
                              (body: *mut cpBody,
                               constraint: *mut cpConstraint,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpBodyArbiterIteratorFunc =
    ::std::option::Option<extern "C" fn
                              (body: *mut cpBody, arbiter: *mut cpArbiter,
                               data: *mut ::libc::c_void) -> ()>;
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_cpPointQueryInfo {
    pub shape: *const cpShape,
    pub point: cpVect,
    pub distance: cpFloat,
    pub gradient: cpVect,
}
impl ::std::default::Default for Struct_cpPointQueryInfo {
    fn default() -> Struct_cpPointQueryInfo {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type cpPointQueryInfo = Struct_cpPointQueryInfo;
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_cpSegmentQueryInfo {
    pub shape: *const cpShape,
    pub point: cpVect,
    pub normal: cpVect,
    pub alpha: cpFloat,
}
impl ::std::default::Default for Struct_cpSegmentQueryInfo {
    fn default() -> Struct_cpSegmentQueryInfo {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type cpSegmentQueryInfo = Struct_cpSegmentQueryInfo;
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_cpShapeFilter {
    pub group: cpGroup,
    pub categories: cpBitmask,
    pub mask: cpBitmask,
}
impl ::std::default::Default for Struct_cpShapeFilter {
    fn default() -> Struct_cpShapeFilter { unsafe { ::std::mem::zeroed() } }
}
pub type cpShapeFilter = Struct_cpShapeFilter;
pub type cpConstraintPreSolveFunc =
    ::std::option::Option<extern "C" fn
                              (constraint: *mut cpConstraint,
                               space: *mut cpSpace) -> ()>;
pub type cpConstraintPostSolveFunc =
    ::std::option::Option<extern "C" fn
                              (constraint: *mut cpConstraint,
                               space: *mut cpSpace) -> ()>;
pub type cpDampedSpringForceFunc =
    ::std::option::Option<extern "C" fn
                              (spring: *mut cpConstraint, dist: cpFloat)
                              -> cpFloat>;
pub type cpDampedRotarySpringTorqueFunc =
    ::std::option::Option<extern "C" fn
                              (spring: *mut Struct_cpConstraint,
                               relativeAngle: cpFloat) -> cpFloat>;
pub type cpSimpleMotor = Struct_cpSimpleMotor;
pub type cpCollisionBeginFunc =
    ::std::option::Option<extern "C" fn
                              (arb: *mut cpArbiter, space: *mut cpSpace,
                               userData: cpDataPointer) -> cpBool>;
pub type cpCollisionPreSolveFunc =
    ::std::option::Option<extern "C" fn
                              (arb: *mut cpArbiter, space: *mut cpSpace,
                               userData: cpDataPointer) -> cpBool>;
pub type cpCollisionPostSolveFunc =
    ::std::option::Option<extern "C" fn
                              (arb: *mut cpArbiter, space: *mut cpSpace,
                               userData: cpDataPointer) -> ()>;
pub type cpCollisionSeparateFunc =
    ::std::option::Option<extern "C" fn
                              (arb: *mut cpArbiter, space: *mut cpSpace,
                               userData: cpDataPointer) -> ()>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpCollisionHandler {
    pub typeA: cpCollisionType,
    pub typeB: cpCollisionType,
    pub beginFunc: cpCollisionBeginFunc,
    pub preSolveFunc: cpCollisionPreSolveFunc,
    pub postSolveFunc: cpCollisionPostSolveFunc,
    pub separateFunc: cpCollisionSeparateFunc,
    pub userData: cpDataPointer,
}
impl ::std::default::Default for Struct_cpCollisionHandler {
    fn default() -> Struct_cpCollisionHandler {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type cpPostStepFunc =
    ::std::option::Option<extern "C" fn
                              (space: *mut cpSpace, key: *mut ::libc::c_void,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpSpacePointQueryFunc =
    ::std::option::Option<extern "C" fn
                              (shape: *mut cpShape, point: cpVect,
                               distance: cpFloat, gradient: cpVect,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpSpaceSegmentQueryFunc =
    ::std::option::Option<extern "C" fn
                              (shape: *mut cpShape, point: cpVect,
                               normal: cpVect, alpha: cpFloat,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpSpaceBBQueryFunc =
    ::std::option::Option<extern "C" fn
                              (shape: *mut cpShape, data: *mut ::libc::c_void)
                              -> ()>;
pub type cpSpaceShapeQueryFunc =
    ::std::option::Option<extern "C" fn
                              (shape: *mut cpShape,
                               points: *mut cpContactPointSet,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpSpaceBodyIteratorFunc =
    ::std::option::Option<extern "C" fn
                              (body: *mut cpBody, data: *mut ::libc::c_void)
                              -> ()>;
pub type cpSpaceShapeIteratorFunc =
    ::std::option::Option<extern "C" fn
                              (shape: *mut cpShape, data: *mut ::libc::c_void)
                              -> ()>;
pub type cpSpaceConstraintIteratorFunc =
    ::std::option::Option<extern "C" fn
                              (constraint: *mut cpConstraint,
                               data: *mut ::libc::c_void) -> ()>;
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_cpSpaceDebugColor {
    pub r: ::libc::c_float,
    pub g: ::libc::c_float,
    pub b: ::libc::c_float,
    pub a: ::libc::c_float,
}
impl ::std::default::Default for Struct_cpSpaceDebugColor {
    fn default() -> Struct_cpSpaceDebugColor {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type cpSpaceDebugColor = Struct_cpSpaceDebugColor;
pub type cpSpaceDebugDrawCircleImpl =
    ::std::option::Option<extern "C" fn
                              (pos: cpVect, angle: cpFloat, radius: cpFloat,
                               outlineColor: cpSpaceDebugColor,
                               fillColor: cpSpaceDebugColor,
                               data: cpDataPointer) -> ()>;
pub type cpSpaceDebugDrawSegmentImpl =
    ::std::option::Option<extern "C" fn
                              (a: cpVect, b: cpVect, color: cpSpaceDebugColor,
                               data: cpDataPointer) -> ()>;
pub type cpSpaceDebugDrawFatSegmentImpl =
    ::std::option::Option<extern "C" fn
                              (a: cpVect, b: cpVect, radius: cpFloat,
                               outlineColor: cpSpaceDebugColor,
                               fillColor: cpSpaceDebugColor,
                               data: cpDataPointer) -> ()>;
pub type cpSpaceDebugDrawPolygonImpl =
    ::std::option::Option<extern "C" fn
                              (count: ::libc::c_int, verts: *const cpVect,
                               radius: cpFloat,
                               outlineColor: cpSpaceDebugColor,
                               fillColor: cpSpaceDebugColor,
                               data: cpDataPointer) -> ()>;
pub type cpSpaceDebugDrawDotImpl =
    ::std::option::Option<extern "C" fn
                              (size: cpFloat, pos: cpVect,
                               color: cpSpaceDebugColor, data: cpDataPointer)
                              -> ()>;
pub type cpSpaceDebugDrawColorForShapeImpl =
    ::std::option::Option<extern "C" fn
                              (shape: *mut cpShape, data: cpDataPointer)
                              -> cpSpaceDebugColor>;
pub type Enum_cpSpaceDebugDrawFlags = ::libc::c_uint;
pub const CP_SPACE_DEBUG_DRAW_SHAPES: ::libc::c_uint = 1;
pub const CP_SPACE_DEBUG_DRAW_CONSTRAINTS: ::libc::c_uint = 2;
pub const CP_SPACE_DEBUG_DRAW_COLLISION_POINTS: ::libc::c_uint = 4;
pub type cpSpaceDebugDrawFlags = Enum_cpSpaceDebugDrawFlags;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpSpaceDebugDrawOptions {
    pub drawCircle: cpSpaceDebugDrawCircleImpl,
    pub drawSegment: cpSpaceDebugDrawSegmentImpl,
    pub drawFatSegment: cpSpaceDebugDrawFatSegmentImpl,
    pub drawPolygon: cpSpaceDebugDrawPolygonImpl,
    pub drawDot: cpSpaceDebugDrawDotImpl,
    pub flags: cpSpaceDebugDrawFlags,
    pub shapeOutlineColor: cpSpaceDebugColor,
    pub colorForShape: cpSpaceDebugDrawColorForShapeImpl,
    pub constraintColor: cpSpaceDebugColor,
    pub collisionPointColor: cpSpaceDebugColor,
    pub data: cpDataPointer,
}
impl ::std::default::Default for Struct_cpSpaceDebugDrawOptions {
    fn default() -> Struct_cpSpaceDebugDrawOptions {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type cpSpaceDebugDrawOptions = Struct_cpSpaceDebugDrawOptions;
pub type cpSpacePointQueryBlock = ::libc::c_void;
pub type cpSpaceSegmentQueryBlock = ::libc::c_void;
pub type cpSpaceBBQueryBlock = ::libc::c_void;
pub type cpSpaceShapeQueryBlock = ::libc::c_void;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpArray {
    pub num: ::libc::c_int,
    pub max: ::libc::c_int,
    pub arr: *mut *mut ::libc::c_void,
}
impl ::std::default::Default for Struct_cpArray {
    fn default() -> Struct_cpArray { unsafe { ::std::mem::zeroed() } }
}
pub type cpHashSetEqlFunc =
    ::std::option::Option<extern "C" fn
                              (ptr: *mut ::libc::c_void,
                               elt: *mut ::libc::c_void) -> cpBool>;
pub type cpHashSetTransFunc =
    ::std::option::Option<extern "C" fn
                              (ptr: *mut ::libc::c_void,
                               data: *mut ::libc::c_void)
                              -> *mut ::libc::c_void>;
pub type cpHashSetIteratorFunc =
    ::std::option::Option<extern "C" fn
                              (elt: *mut ::libc::c_void,
                               data: *mut ::libc::c_void) -> ()>;
pub type cpHashSetFilterFunc =
    ::std::option::Option<extern "C" fn
                              (elt: *mut ::libc::c_void,
                               data: *mut ::libc::c_void) -> cpBool>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpBody {
    pub velocity_func: cpBodyVelocityFunc,
    pub position_func: cpBodyPositionFunc,
    pub m: cpFloat,
    pub m_inv: cpFloat,
    pub i: cpFloat,
    pub i_inv: cpFloat,
    pub cog: cpVect,
    pub p: cpVect,
    pub v: cpVect,
    pub f: cpVect,
    pub a: cpFloat,
    pub w: cpFloat,
    pub t: cpFloat,
    pub transform: cpTransform,
    pub userData: cpDataPointer,
    pub v_bias: cpVect,
    pub w_bias: cpFloat,
    pub space: *mut cpSpace,
    pub shapeList: *mut cpShape,
    pub arbiterList: *mut cpArbiter,
    pub constraintList: *mut cpConstraint,
    pub sleeping: Struct_Unnamed2,
}
impl ::std::default::Default for Struct_cpBody {
    fn default() -> Struct_cpBody { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct Struct_Unnamed2 {
    pub root: *mut cpBody,
    pub next: *mut cpBody,
    pub idleTime: cpFloat,
}
impl ::std::default::Default for Struct_Unnamed2 {
    fn default() -> Struct_Unnamed2 { unsafe { ::std::mem::zeroed() } }
}
pub type Enum_cpArbiterState = ::libc::c_uint;
pub const CP_ARBITER_STATE_FIRST_COLLISION: ::libc::c_uint = 0;
pub const CP_ARBITER_STATE_NORMAL: ::libc::c_uint = 1;
pub const CP_ARBITER_STATE_IGNORE: ::libc::c_uint = 2;
pub const CP_ARBITER_STATE_CACHED: ::libc::c_uint = 3;
pub const CP_ARBITER_STATE_INVALIDATED: ::libc::c_uint = 4;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpArbiterThread {
    pub next: *mut Struct_cpArbiter,
    pub prev: *mut Struct_cpArbiter,
}
impl ::std::default::Default for Struct_cpArbiterThread {
    fn default() -> Struct_cpArbiterThread { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpContact {
    pub r1: cpVect,
    pub r2: cpVect,
    pub nMass: cpFloat,
    pub tMass: cpFloat,
    pub bounce: cpFloat,
    pub jnAcc: cpFloat,
    pub jtAcc: cpFloat,
    pub jBias: cpFloat,
    pub bias: cpFloat,
    pub hash: cpHashValue,
}
impl ::std::default::Default for Struct_cpContact {
    fn default() -> Struct_cpContact { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpCollisionInfo {
    pub a: *const cpShape,
    pub b: *const cpShape,
    pub id: cpCollisionID,
    pub n: cpVect,
    pub count: ::libc::c_int,
    pub arr: *mut Struct_cpContact,
}
impl ::std::default::Default for Struct_cpCollisionInfo {
    fn default() -> Struct_cpCollisionInfo { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpArbiter {
    pub e: cpFloat,
    pub u: cpFloat,
    pub surface_vr: cpVect,
    pub data: cpDataPointer,
    pub a: *const cpShape,
    pub b: *const cpShape,
    pub body_a: *mut cpBody,
    pub body_b: *mut cpBody,
    pub thread_a: Struct_cpArbiterThread,
    pub thread_b: Struct_cpArbiterThread,
    pub count: ::libc::c_int,
    pub contacts: *mut Struct_cpContact,
    pub n: cpVect,
    pub handler: *mut cpCollisionHandler,
    pub handlerA: *mut cpCollisionHandler,
    pub handlerB: *mut cpCollisionHandler,
    pub swapped: cpBool,
    pub stamp: cpTimestamp,
    pub state: Enum_cpArbiterState,
}
impl ::std::default::Default for Struct_cpArbiter {
    fn default() -> Struct_cpArbiter { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpShapeMassInfo {
    pub m: cpFloat,
    pub i: cpFloat,
    pub cog: cpVect,
    pub area: cpFloat,
}
impl ::std::default::Default for Struct_cpShapeMassInfo {
    fn default() -> Struct_cpShapeMassInfo { unsafe { ::std::mem::zeroed() } }
}
pub type Enum_cpShapeType = ::libc::c_uint;
pub const CP_CIRCLE_SHAPE: ::libc::c_uint = 0;
pub const CP_SEGMENT_SHAPE: ::libc::c_uint = 1;
pub const CP_POLY_SHAPE: ::libc::c_uint = 2;
pub const CP_NUM_SHAPES: ::libc::c_uint = 3;
pub type cpShapeType = Enum_cpShapeType;
pub type cpShapeCacheDataImpl =
    ::std::option::Option<extern "C" fn
                              (shape: *mut cpShape, transform: cpTransform)
                              -> cpBB>;
pub type cpShapeDestroyImpl =
    ::std::option::Option<extern "C" fn(shape: *mut cpShape) -> ()>;
pub type cpShapePointQueryImpl =
    ::std::option::Option<extern "C" fn
                              (shape: *const cpShape, p: cpVect,
                               info: *mut cpPointQueryInfo) -> ()>;
pub type cpShapeSegmentQueryImpl =
    ::std::option::Option<extern "C" fn
                              (shape: *const cpShape, a: cpVect, b: cpVect,
                               radius: cpFloat, info: *mut cpSegmentQueryInfo)
                              -> ()>;
pub type cpShapeClass = Struct_cpShapeClass;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpShapeClass {
    pub _type: cpShapeType,
    pub cacheData: cpShapeCacheDataImpl,
    pub destroy: cpShapeDestroyImpl,
    pub pointQuery: cpShapePointQueryImpl,
    pub segmentQuery: cpShapeSegmentQueryImpl,
}
impl ::std::default::Default for Struct_cpShapeClass {
    fn default() -> Struct_cpShapeClass { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpShape {
    pub klass: *const cpShapeClass,
    pub space: *mut cpSpace,
    pub body: *mut cpBody,
    pub massInfo: Struct_cpShapeMassInfo,
    pub bb: cpBB,
    pub sensor: cpBool,
    pub e: cpFloat,
    pub u: cpFloat,
    pub surfaceV: cpVect,
    pub userData: cpDataPointer,
    pub _type: cpCollisionType,
    pub filter: cpShapeFilter,
    pub next: *mut cpShape,
    pub prev: *mut cpShape,
    pub hashid: cpHashValue,
}
impl ::std::default::Default for Struct_cpShape {
    fn default() -> Struct_cpShape { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpCircleShape {
    pub shape: cpShape,
    pub c: cpVect,
    pub tc: cpVect,
    pub r: cpFloat,
}
impl ::std::default::Default for Struct_cpCircleShape {
    fn default() -> Struct_cpCircleShape { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpSegmentShape {
    pub shape: cpShape,
    pub a: cpVect,
    pub b: cpVect,
    pub n: cpVect,
    pub ta: cpVect,
    pub tb: cpVect,
    pub tn: cpVect,
    pub r: cpFloat,
    pub a_tangent: cpVect,
    pub b_tangent: cpVect,
}
impl ::std::default::Default for Struct_cpSegmentShape {
    fn default() -> Struct_cpSegmentShape { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpSplittingPlane {
    pub v0: cpVect,
    pub n: cpVect,
}
impl ::std::default::Default for Struct_cpSplittingPlane {
    fn default() -> Struct_cpSplittingPlane {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpPolyShape {
    pub shape: cpShape,
    pub r: cpFloat,
    pub count: ::libc::c_int,
    pub planes: *mut Struct_cpSplittingPlane,
    pub _planes: [Struct_cpSplittingPlane; 12usize],
}
impl ::std::default::Default for Struct_cpPolyShape {
    fn default() -> Struct_cpPolyShape { unsafe { ::std::mem::zeroed() } }
}
pub type cpConstraintPreStepImpl =
    ::std::option::Option<extern "C" fn
                              (constraint: *mut cpConstraint, dt: cpFloat)
                              -> ()>;
pub type cpConstraintApplyCachedImpulseImpl =
    ::std::option::Option<extern "C" fn
                              (constraint: *mut cpConstraint,
                               dt_coef: cpFloat) -> ()>;
pub type cpConstraintApplyImpulseImpl =
    ::std::option::Option<extern "C" fn
                              (constraint: *mut cpConstraint, dt: cpFloat)
                              -> ()>;
pub type cpConstraintGetImpulseImpl =
    ::std::option::Option<extern "C" fn(constraint: *mut cpConstraint)
                              -> cpFloat>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpConstraintClass {
    pub preStep: cpConstraintPreStepImpl,
    pub applyCachedImpulse: cpConstraintApplyCachedImpulseImpl,
    pub applyImpulse: cpConstraintApplyImpulseImpl,
    pub getImpulse: cpConstraintGetImpulseImpl,
}
impl ::std::default::Default for Struct_cpConstraintClass {
    fn default() -> Struct_cpConstraintClass {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type cpConstraintClass = Struct_cpConstraintClass;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpConstraint {
    pub klass: *const cpConstraintClass,
    pub space: *mut cpSpace,
    pub a: *mut cpBody,
    pub b: *mut cpBody,
    pub next_a: *mut cpConstraint,
    pub next_b: *mut cpConstraint,
    pub maxForce: cpFloat,
    pub errorBias: cpFloat,
    pub maxBias: cpFloat,
    pub collideBodies: cpBool,
    pub preSolve: cpConstraintPreSolveFunc,
    pub postSolve: cpConstraintPostSolveFunc,
    pub userData: cpDataPointer,
}
impl ::std::default::Default for Struct_cpConstraint {
    fn default() -> Struct_cpConstraint { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpPinJoint {
    pub constraint: cpConstraint,
    pub anchorA: cpVect,
    pub anchorB: cpVect,
    pub dist: cpFloat,
    pub r1: cpVect,
    pub r2: cpVect,
    pub n: cpVect,
    pub nMass: cpFloat,
    pub jnAcc: cpFloat,
    pub bias: cpFloat,
}
impl ::std::default::Default for Struct_cpPinJoint {
    fn default() -> Struct_cpPinJoint { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpSlideJoint {
    pub constraint: cpConstraint,
    pub anchorA: cpVect,
    pub anchorB: cpVect,
    pub min: cpFloat,
    pub max: cpFloat,
    pub r1: cpVect,
    pub r2: cpVect,
    pub n: cpVect,
    pub nMass: cpFloat,
    pub jnAcc: cpFloat,
    pub bias: cpFloat,
}
impl ::std::default::Default for Struct_cpSlideJoint {
    fn default() -> Struct_cpSlideJoint { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpPivotJoint {
    pub constraint: cpConstraint,
    pub anchorA: cpVect,
    pub anchorB: cpVect,
    pub r1: cpVect,
    pub r2: cpVect,
    pub k: cpMat2x2,
    pub jAcc: cpVect,
    pub bias: cpVect,
}
impl ::std::default::Default for Struct_cpPivotJoint {
    fn default() -> Struct_cpPivotJoint { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpGrooveJoint {
    pub constraint: cpConstraint,
    pub grv_n: cpVect,
    pub grv_a: cpVect,
    pub grv_b: cpVect,
    pub anchorB: cpVect,
    pub grv_tn: cpVect,
    pub clamp: cpFloat,
    pub r1: cpVect,
    pub r2: cpVect,
    pub k: cpMat2x2,
    pub jAcc: cpVect,
    pub bias: cpVect,
}
impl ::std::default::Default for Struct_cpGrooveJoint {
    fn default() -> Struct_cpGrooveJoint { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpDampedSpring {
    pub constraint: cpConstraint,
    pub anchorA: cpVect,
    pub anchorB: cpVect,
    pub restLength: cpFloat,
    pub stiffness: cpFloat,
    pub damping: cpFloat,
    pub springForceFunc: cpDampedSpringForceFunc,
    pub target_vrn: cpFloat,
    pub v_coef: cpFloat,
    pub r1: cpVect,
    pub r2: cpVect,
    pub nMass: cpFloat,
    pub n: cpVect,
    pub jAcc: cpFloat,
}
impl ::std::default::Default for Struct_cpDampedSpring {
    fn default() -> Struct_cpDampedSpring { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpDampedRotarySpring {
    pub constraint: cpConstraint,
    pub restAngle: cpFloat,
    pub stiffness: cpFloat,
    pub damping: cpFloat,
    pub springTorqueFunc: cpDampedRotarySpringTorqueFunc,
    pub target_wrn: cpFloat,
    pub w_coef: cpFloat,
    pub iSum: cpFloat,
    pub jAcc: cpFloat,
}
impl ::std::default::Default for Struct_cpDampedRotarySpring {
    fn default() -> Struct_cpDampedRotarySpring {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpRotaryLimitJoint {
    pub constraint: cpConstraint,
    pub min: cpFloat,
    pub max: cpFloat,
    pub iSum: cpFloat,
    pub bias: cpFloat,
    pub jAcc: cpFloat,
}
impl ::std::default::Default for Struct_cpRotaryLimitJoint {
    fn default() -> Struct_cpRotaryLimitJoint {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpRatchetJoint {
    pub constraint: cpConstraint,
    pub angle: cpFloat,
    pub phase: cpFloat,
    pub ratchet: cpFloat,
    pub iSum: cpFloat,
    pub bias: cpFloat,
    pub jAcc: cpFloat,
}
impl ::std::default::Default for Struct_cpRatchetJoint {
    fn default() -> Struct_cpRatchetJoint { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpGearJoint {
    pub constraint: cpConstraint,
    pub phase: cpFloat,
    pub ratio: cpFloat,
    pub ratio_inv: cpFloat,
    pub iSum: cpFloat,
    pub bias: cpFloat,
    pub jAcc: cpFloat,
}
impl ::std::default::Default for Struct_cpGearJoint {
    fn default() -> Struct_cpGearJoint { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpSimpleMotor {
    pub constraint: cpConstraint,
    pub rate: cpFloat,
    pub iSum: cpFloat,
    pub jAcc: cpFloat,
}
impl ::std::default::Default for Struct_cpSimpleMotor {
    fn default() -> Struct_cpSimpleMotor { unsafe { ::std::mem::zeroed() } }
}
pub enum Struct_cpContactBufferHeader { }
pub type cpContactBufferHeader = Struct_cpContactBufferHeader;
pub type cpSpaceArbiterApplyImpulseFunc =
    ::std::option::Option<extern "C" fn(arb: *mut cpArbiter) -> ()>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpSpace {
    pub iterations: ::libc::c_int,
    pub gravity: cpVect,
    pub damping: cpFloat,
    pub idleSpeedThreshold: cpFloat,
    pub sleepTimeThreshold: cpFloat,
    pub collisionSlop: cpFloat,
    pub collisionBias: cpFloat,
    pub collisionPersistence: cpTimestamp,
    pub userData: cpDataPointer,
    pub stamp: cpTimestamp,
    pub curr_dt: cpFloat,
    pub dynamicBodies: *mut cpArray,
    pub staticBodies: *mut cpArray,
    pub rousedBodies: *mut cpArray,
    pub sleepingComponents: *mut cpArray,
    pub shapeIDCounter: cpHashValue,
    pub staticShapes: *mut cpSpatialIndex,
    pub dynamicShapes: *mut cpSpatialIndex,
    pub constraints: *mut cpArray,
    pub arbiters: *mut cpArray,
    pub contactBuffersHead: *mut cpContactBufferHeader,
    pub cachedArbiters: *mut cpHashSet,
    pub pooledArbiters: *mut cpArray,
    pub allocatedBuffers: *mut cpArray,
    pub locked: ::libc::c_uint,
    pub usesWildcards: cpBool,
    pub collisionHandlers: *mut cpHashSet,
    pub defaultHandler: cpCollisionHandler,
    pub skipPostStep: cpBool,
    pub postStepCallbacks: *mut cpArray,
    pub staticBody: *mut cpBody,
    pub _staticBody: cpBody,
}
impl ::std::default::Default for Struct_cpSpace {
    fn default() -> Struct_cpSpace { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Struct_cpPostStepCallback {
    pub func: cpPostStepFunc,
    pub key: *mut ::libc::c_void,
    pub data: *mut ::libc::c_void,
}
impl ::std::default::Default for Struct_cpPostStepCallback {
    fn default() -> Struct_cpPostStepCallback {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type cpPostStepCallback = Struct_cpPostStepCallback;
extern "C" {
    pub static mut cpVersionString: *const ::libc::c_char;
    pub static mut cpCollisionHandlerDoNothing: cpCollisionHandler;
}
extern "C" {
    pub fn cpMessage(condition: *const ::libc::c_char,
                     file: *const ::libc::c_char, line: ::libc::c_int,
                     isError: ::libc::c_int, isHardError: ::libc::c_int,
                     message: *const ::libc::c_char, ...) -> ();
    pub fn cpSpaceHashAlloc() -> *mut cpSpaceHash;
    pub fn cpSpaceHashInit(hash: *mut cpSpaceHash, celldim: cpFloat,
                           numcells: ::libc::c_int,
                           bbfunc: cpSpatialIndexBBFunc,
                           staticIndex: *mut cpSpatialIndex)
     -> *mut cpSpatialIndex;
    pub fn cpSpaceHashNew(celldim: cpFloat, cells: ::libc::c_int,
                          bbfunc: cpSpatialIndexBBFunc,
                          staticIndex: *mut cpSpatialIndex)
     -> *mut cpSpatialIndex;
    pub fn cpSpaceHashResize(hash: *mut cpSpaceHash, celldim: cpFloat,
                             numcells: ::libc::c_int) -> ();
    pub fn cpBBTreeAlloc() -> *mut cpBBTree;
    pub fn cpBBTreeInit(tree: *mut cpBBTree, bbfunc: cpSpatialIndexBBFunc,
                        staticIndex: *mut cpSpatialIndex)
     -> *mut cpSpatialIndex;
    pub fn cpBBTreeNew(bbfunc: cpSpatialIndexBBFunc,
                       staticIndex: *mut cpSpatialIndex)
     -> *mut cpSpatialIndex;
    pub fn cpBBTreeOptimize(index: *mut cpSpatialIndex) -> ();
    pub fn cpBBTreeSetVelocityFunc(index: *mut cpSpatialIndex,
                                   func: cpBBTreeVelocityFunc) -> ();
    pub fn cpSweep1DAlloc() -> *mut cpSweep1D;
    pub fn cpSweep1DInit(sweep: *mut cpSweep1D, bbfunc: cpSpatialIndexBBFunc,
                         staticIndex: *mut cpSpatialIndex)
     -> *mut cpSpatialIndex;
    pub fn cpSweep1DNew(bbfunc: cpSpatialIndexBBFunc,
                        staticIndex: *mut cpSpatialIndex)
     -> *mut cpSpatialIndex;
    pub fn cpSpatialIndexFree(index: *mut cpSpatialIndex) -> ();
    pub fn cpSpatialIndexCollideStatic(dynamicIndex: *mut cpSpatialIndex,
                                       staticIndex: *mut cpSpatialIndex,
                                       func: cpSpatialIndexQueryFunc,
                                       data: *mut ::libc::c_void) -> ();
    pub fn cpArbiterGetRestitution(arb: *const cpArbiter) -> cpFloat;
    pub fn cpArbiterSetRestitution(arb: *mut cpArbiter, restitution: cpFloat)
     -> ();
    pub fn cpArbiterGetFriction(arb: *const cpArbiter) -> cpFloat;
    pub fn cpArbiterSetFriction(arb: *mut cpArbiter, friction: cpFloat) -> ();
    pub fn cpArbiterGetSurfaceVelocity(arb: *mut cpArbiter) -> cpVect;
    pub fn cpArbiterSetSurfaceVelocity(arb: *mut cpArbiter, vr: cpVect) -> ();
    pub fn cpArbiterGetUserData(arb: *const cpArbiter) -> cpDataPointer;
    pub fn cpArbiterSetUserData(arb: *mut cpArbiter, userData: cpDataPointer)
     -> ();
    pub fn cpArbiterTotalImpulse(arb: *const cpArbiter) -> cpVect;
    pub fn cpArbiterTotalKE(arb: *const cpArbiter) -> cpFloat;
    pub fn cpArbiterIgnore(arb: *mut cpArbiter) -> cpBool;
    pub fn cpArbiterGetShapes(arb: *const cpArbiter, a: *mut *mut cpShape,
                              b: *mut *mut cpShape) -> ();
    pub fn cpArbiterGetBodies(arb: *const cpArbiter, a: *mut *mut cpBody,
                              b: *mut *mut cpBody) -> ();
    pub fn cpArbiterGetContactPointSet(arb: *const cpArbiter)
     -> cpContactPointSet;
    pub fn cpArbiterSetContactPointSet(arb: *mut cpArbiter,
                                       set: *mut cpContactPointSet) -> ();
    pub fn cpArbiterIsFirstContact(arb: *const cpArbiter) -> cpBool;
    pub fn cpArbiterIsRemoval(arb: *const cpArbiter) -> cpBool;
    pub fn cpArbiterGetCount(arb: *const cpArbiter) -> ::libc::c_int;
    pub fn cpArbiterGetNormal(arb: *const cpArbiter) -> cpVect;
    pub fn cpArbiterGetPointA(arb: *const cpArbiter, i: ::libc::c_int)
     -> cpVect;
    pub fn cpArbiterGetPointB(arb: *const cpArbiter, i: ::libc::c_int)
     -> cpVect;
    pub fn cpArbiterGetDepth(arb: *const cpArbiter, i: ::libc::c_int)
     -> cpFloat;
    pub fn cpArbiterCallWildcardBeginA(arb: *mut cpArbiter,
                                       space: *mut cpSpace) -> cpBool;
    pub fn cpArbiterCallWildcardBeginB(arb: *mut cpArbiter,
                                       space: *mut cpSpace) -> cpBool;
    pub fn cpArbiterCallWildcardPreSolveA(arb: *mut cpArbiter,
                                          space: *mut cpSpace) -> cpBool;
    pub fn cpArbiterCallWildcardPreSolveB(arb: *mut cpArbiter,
                                          space: *mut cpSpace) -> cpBool;
    pub fn cpArbiterCallWildcardPostSolveA(arb: *mut cpArbiter,
                                           space: *mut cpSpace) -> ();
    pub fn cpArbiterCallWildcardPostSolveB(arb: *mut cpArbiter,
                                           space: *mut cpSpace) -> ();
    pub fn cpArbiterCallWildcardSeparateA(arb: *mut cpArbiter,
                                          space: *mut cpSpace) -> ();
    pub fn cpArbiterCallWildcardSeparateB(arb: *mut cpArbiter,
                                          space: *mut cpSpace) -> ();
    pub fn cpBodyAlloc() -> *mut cpBody;
    pub fn cpBodyInit(body: *mut cpBody, mass: cpFloat, moment: cpFloat)
     -> *mut cpBody;
    pub fn cpBodyNew(mass: cpFloat, moment: cpFloat) -> *mut cpBody;
    pub fn cpBodyNewKinematic() -> *mut cpBody;
    pub fn cpBodyNewStatic() -> *mut cpBody;
    pub fn cpBodyDestroy(body: *mut cpBody) -> ();
    pub fn cpBodyFree(body: *mut cpBody) -> ();
    pub fn cpBodyActivate(body: *mut cpBody) -> ();
    pub fn cpBodyActivateStatic(body: *mut cpBody, filter: *mut cpShape)
     -> ();
    pub fn cpBodySleep(body: *mut cpBody) -> ();
    pub fn cpBodySleepWithGroup(body: *mut cpBody, group: *mut cpBody) -> ();
    pub fn cpBodyIsSleeping(body: *const cpBody) -> cpBool;
    pub fn cpBodyGetType(body: *mut cpBody) -> cpBodyType;
    pub fn cpBodySetType(body: *mut cpBody, _type: cpBodyType) -> ();
    pub fn cpBodyGetSpace(body: *const cpBody) -> *mut cpSpace;
    pub fn cpBodyGetMass(body: *const cpBody) -> cpFloat;
    pub fn cpBodySetMass(body: *mut cpBody, m: cpFloat) -> ();
    pub fn cpBodyGetMoment(body: *const cpBody) -> cpFloat;
    pub fn cpBodySetMoment(body: *mut cpBody, i: cpFloat) -> ();
    pub fn cpBodyGetPosition(body: *const cpBody) -> cpVect;
    pub fn cpBodySetPosition(body: *mut cpBody, pos: cpVect) -> ();
    pub fn cpBodyGetCenterOfGravity(body: *const cpBody) -> cpVect;
    pub fn cpBodySetCenterOfGravity(body: *mut cpBody, cog: cpVect) -> ();
    pub fn cpBodyGetVelocity(body: *const cpBody) -> cpVect;
    pub fn cpBodySetVelocity(body: *mut cpBody, velocity: cpVect) -> ();
    pub fn cpBodyGetForce(body: *const cpBody) -> cpVect;
    pub fn cpBodySetForce(body: *mut cpBody, force: cpVect) -> ();
    pub fn cpBodyGetAngle(body: *const cpBody) -> cpFloat;
    pub fn cpBodySetAngle(body: *mut cpBody, a: cpFloat) -> ();
    pub fn cpBodyGetAngularVelocity(body: *const cpBody) -> cpFloat;
    pub fn cpBodySetAngularVelocity(body: *mut cpBody,
                                    angularVelocity: cpFloat) -> ();
    pub fn cpBodyGetTorque(body: *const cpBody) -> cpFloat;
    pub fn cpBodySetTorque(body: *mut cpBody, torque: cpFloat) -> ();
    pub fn cpBodyGetRotation(body: *const cpBody) -> cpVect;
    pub fn cpBodyGetUserData(body: *const cpBody) -> cpDataPointer;
    pub fn cpBodySetUserData(body: *mut cpBody, userData: cpDataPointer)
     -> ();
    pub fn cpBodySetVelocityUpdateFunc(body: *mut cpBody,
                                       velocityFunc: cpBodyVelocityFunc)
     -> ();
    pub fn cpBodySetPositionUpdateFunc(body: *mut cpBody,
                                       positionFunc: cpBodyPositionFunc)
     -> ();
    pub fn cpBodyUpdateVelocity(body: *mut cpBody, gravity: cpVect,
                                damping: cpFloat, dt: cpFloat) -> ();
    pub fn cpBodyUpdatePosition(body: *mut cpBody, dt: cpFloat) -> ();
    pub fn cpBodyLocalToWorld(body: *const cpBody, point: cpVect) -> cpVect;
    pub fn cpBodyWorldToLocal(body: *const cpBody, point: cpVect) -> cpVect;
    pub fn cpBodyApplyForceAtWorldPoint(body: *mut cpBody, force: cpVect,
                                        point: cpVect) -> ();
    pub fn cpBodyApplyForceAtLocalPoint(body: *mut cpBody, force: cpVect,
                                        point: cpVect) -> ();
    pub fn cpBodyApplyImpulseAtWorldPoint(body: *mut cpBody, impulse: cpVect,
                                          point: cpVect) -> ();
    pub fn cpBodyApplyImpulseAtLocalPoint(body: *mut cpBody, impulse: cpVect,
                                          point: cpVect) -> ();
    pub fn cpBodyGetVelocityAtWorldPoint(body: *const cpBody, point: cpVect)
     -> cpVect;
    pub fn cpBodyGetVelocityAtLocalPoint(body: *const cpBody, point: cpVect)
     -> cpVect;
    pub fn cpBodyKineticEnergy(body: *const cpBody) -> cpFloat;
    pub fn cpBodyEachShape(body: *mut cpBody, func: cpBodyShapeIteratorFunc,
                           data: *mut ::libc::c_void) -> ();
    pub fn cpBodyEachConstraint(body: *mut cpBody,
                                func: cpBodyConstraintIteratorFunc,
                                data: *mut ::libc::c_void) -> ();
    pub fn cpBodyEachArbiter(body: *mut cpBody,
                             func: cpBodyArbiterIteratorFunc,
                             data: *mut ::libc::c_void) -> ();
    pub fn cpShapeDestroy(shape: *mut cpShape) -> ();
    pub fn cpShapeFree(shape: *mut cpShape) -> ();
    pub fn cpShapeCacheBB(shape: *mut cpShape) -> cpBB;
    pub fn cpShapeUpdate(shape: *mut cpShape, transform: cpTransform) -> cpBB;
    pub fn cpShapePointQuery(shape: *const cpShape, p: cpVect,
                             out: *mut cpPointQueryInfo) -> cpFloat;
    pub fn cpShapeSegmentQuery(shape: *const cpShape, a: cpVect, b: cpVect,
                               radius: cpFloat, info: *mut cpSegmentQueryInfo)
     -> cpBool;
    pub fn cpShapesCollide(a: *const cpShape, b: *const cpShape)
     -> cpContactPointSet;
    pub fn cpShapeGetSpace(shape: *const cpShape) -> *mut cpSpace;
    pub fn cpShapeGetBody(shape: *const cpShape) -> *mut cpBody;
    pub fn cpShapeSetBody(shape: *mut cpShape, body: *mut cpBody) -> ();
    pub fn cpShapeGetMass(shape: *const cpShape) -> cpFloat;
    pub fn cpShapeSetMass(shape: *mut cpShape, mass: cpFloat) -> ();
    pub fn cpShapeGetDensity(shape: *const cpShape) -> cpFloat;
    pub fn cpShapeSetDensity(shape: *mut cpShape, density: cpFloat) -> ();
    pub fn cpShapeGetMoment(shape: *const cpShape) -> cpFloat;
    pub fn cpShapeGetArea(shape: *mut cpShape) -> cpFloat;
    pub fn cpShapeGetCenterOfGravity(shape: *mut cpShape) -> cpVect;
    pub fn cpShapeGetBB(shape: *const cpShape) -> cpBB;
    pub fn cpShapeGetSensor(shape: *const cpShape) -> cpBool;
    pub fn cpShapeSetSensor(shape: *mut cpShape, sensor: cpBool) -> ();
    pub fn cpShapeGetElasticity(shape: *const cpShape) -> cpFloat;
    pub fn cpShapeSetElasticity(shape: *mut cpShape, elasticity: cpFloat)
     -> ();
    pub fn cpShapeGetFriction(shape: *const cpShape) -> cpFloat;
    pub fn cpShapeSetFriction(shape: *mut cpShape, friction: cpFloat) -> ();
    pub fn cpShapeGetSurfaceVelocity(shape: *const cpShape) -> cpVect;
    pub fn cpShapeSetSurfaceVelocity(shape: *mut cpShape,
                                     surfaceVelocity: cpVect) -> ();
    pub fn cpShapeGetUserData(shape: *const cpShape) -> cpDataPointer;
    pub fn cpShapeSetUserData(shape: *mut cpShape, userData: cpDataPointer)
     -> ();
    pub fn cpShapeGetCollisionType(shape: *const cpShape) -> cpCollisionType;
    pub fn cpShapeSetCollisionType(shape: *mut cpShape,
                                   collisionType: cpCollisionType) -> ();
    pub fn cpShapeGetFilter(shape: *const cpShape) -> cpShapeFilter;
    pub fn cpShapeSetFilter(shape: *mut cpShape, filter: cpShapeFilter) -> ();
    pub fn cpCircleShapeAlloc() -> *mut cpCircleShape;
    pub fn cpCircleShapeInit(circle: *mut cpCircleShape, body: *mut cpBody,
                             radius: cpFloat, offset: cpVect)
     -> *mut cpCircleShape;
    pub fn cpCircleShapeNew(body: *mut cpBody, radius: cpFloat,
                            offset: cpVect) -> *mut cpShape;
    pub fn cpCircleShapeGetOffset(shape: *const cpShape) -> cpVect;
    pub fn cpCircleShapeGetRadius(shape: *const cpShape) -> cpFloat;
    pub fn cpSegmentShapeAlloc() -> *mut cpSegmentShape;
    pub fn cpSegmentShapeInit(seg: *mut cpSegmentShape, body: *mut cpBody,
                              a: cpVect, b: cpVect, radius: cpFloat)
     -> *mut cpSegmentShape;
    pub fn cpSegmentShapeNew(body: *mut cpBody, a: cpVect, b: cpVect,
                             radius: cpFloat) -> *mut cpShape;
    pub fn cpSegmentShapeSetNeighbors(shape: *mut cpShape, prev: cpVect,
                                      next: cpVect) -> ();
    pub fn cpSegmentShapeGetA(shape: *const cpShape) -> cpVect;
    pub fn cpSegmentShapeGetB(shape: *const cpShape) -> cpVect;
    pub fn cpSegmentShapeGetNormal(shape: *const cpShape) -> cpVect;
    pub fn cpSegmentShapeGetRadius(shape: *const cpShape) -> cpFloat;
    pub fn cpPolyShapeAlloc() -> *mut cpPolyShape;
    pub fn cpPolyShapeInit(poly: *mut cpPolyShape, body: *mut cpBody,
                           count: ::libc::c_int, verts: *const cpVect,
                           transform: cpTransform, radius: cpFloat)
     -> *mut cpPolyShape;
    pub fn cpPolyShapeInitRaw(poly: *mut cpPolyShape, body: *mut cpBody,
                              count: ::libc::c_int, verts: *const cpVect,
                              radius: cpFloat) -> *mut cpPolyShape;
    pub fn cpPolyShapeNew(body: *mut cpBody, count: ::libc::c_int,
                          verts: *const cpVect, transform: cpTransform,
                          radius: cpFloat) -> *mut cpShape;
    pub fn cpPolyShapeNewRaw(body: *mut cpBody, count: ::libc::c_int,
                             verts: *const cpVect, radius: cpFloat)
     -> *mut cpShape;
    pub fn cpBoxShapeInit(poly: *mut cpPolyShape, body: *mut cpBody,
                          width: cpFloat, height: cpFloat, radius: cpFloat)
     -> *mut cpPolyShape;
    pub fn cpBoxShapeInit2(poly: *mut cpPolyShape, body: *mut cpBody,
                           _box: cpBB, radius: cpFloat) -> *mut cpPolyShape;
    pub fn cpBoxShapeNew(body: *mut cpBody, width: cpFloat, height: cpFloat,
                         radius: cpFloat) -> *mut cpShape;
    pub fn cpBoxShapeNew2(body: *mut cpBody, _box: cpBB, radius: cpFloat)
     -> *mut cpShape;
    pub fn cpPolyShapeGetCount(shape: *const cpShape) -> ::libc::c_int;
    pub fn cpPolyShapeGetVert(shape: *const cpShape, index: ::libc::c_int)
     -> cpVect;
    pub fn cpPolyShapeGetRadius(shape: *const cpShape) -> cpFloat;
    pub fn cpConstraintDestroy(constraint: *mut cpConstraint) -> ();
    pub fn cpConstraintFree(constraint: *mut cpConstraint) -> ();
    pub fn cpConstraintGetSpace(constraint: *const cpConstraint)
     -> *mut cpSpace;
    pub fn cpConstraintGetBodyA(constraint: *const cpConstraint)
     -> *mut cpBody;
    pub fn cpConstraintGetBodyB(constraint: *const cpConstraint)
     -> *mut cpBody;
    pub fn cpConstraintGetMaxForce(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpConstraintSetMaxForce(constraint: *mut cpConstraint,
                                   maxForce: cpFloat) -> ();
    pub fn cpConstraintGetErrorBias(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpConstraintSetErrorBias(constraint: *mut cpConstraint,
                                    errorBias: cpFloat) -> ();
    pub fn cpConstraintGetMaxBias(constraint: *const cpConstraint) -> cpFloat;
    pub fn cpConstraintSetMaxBias(constraint: *mut cpConstraint,
                                  maxBias: cpFloat) -> ();
    pub fn cpConstraintGetCollideBodies(constraint: *const cpConstraint)
     -> cpBool;
    pub fn cpConstraintSetCollideBodies(constraint: *mut cpConstraint,
                                        collideBodies: cpBool) -> ();
    pub fn cpConstraintGetPreSolveFunc(constraint: *const cpConstraint)
     -> cpConstraintPreSolveFunc;
    pub fn cpConstraintSetPreSolveFunc(constraint: *mut cpConstraint,
                                       preSolveFunc: cpConstraintPreSolveFunc)
     -> ();
    pub fn cpConstraintGetPostSolveFunc(constraint: *const cpConstraint)
     -> cpConstraintPostSolveFunc;
    pub fn cpConstraintSetPostSolveFunc(constraint: *mut cpConstraint,
                                        postSolveFunc:
                                            cpConstraintPostSolveFunc) -> ();
    pub fn cpConstraintGetUserData(constraint: *const cpConstraint)
     -> cpDataPointer;
    pub fn cpConstraintSetUserData(constraint: *mut cpConstraint,
                                   userData: cpDataPointer) -> ();
    pub fn cpConstraintGetImpulse(constraint: *mut cpConstraint) -> cpFloat;
    pub fn cpConstraintIsPinJoint(constraint: *const cpConstraint) -> cpBool;
    pub fn cpPinJointAlloc() -> *mut cpPinJoint;
    pub fn cpPinJointInit(joint: *mut cpPinJoint, a: *mut cpBody,
                          b: *mut cpBody, anchorA: cpVect, anchorB: cpVect)
     -> *mut cpPinJoint;
    pub fn cpPinJointNew(a: *mut cpBody, b: *mut cpBody, anchorA: cpVect,
                         anchorB: cpVect) -> *mut cpConstraint;
    pub fn cpPinJointGetAnchorA(constraint: *const cpConstraint) -> cpVect;
    pub fn cpPinJointSetAnchorA(constraint: *mut cpConstraint,
                                anchorA: cpVect) -> ();
    pub fn cpPinJointGetAnchorB(constraint: *const cpConstraint) -> cpVect;
    pub fn cpPinJointSetAnchorB(constraint: *mut cpConstraint,
                                anchorB: cpVect) -> ();
    pub fn cpPinJointGetDist(constraint: *const cpConstraint) -> cpFloat;
    pub fn cpPinJointSetDist(constraint: *mut cpConstraint, dist: cpFloat)
     -> ();
    pub fn cpConstraintIsSlideJoint(constraint: *const cpConstraint)
     -> cpBool;
    pub fn cpSlideJointAlloc() -> *mut cpSlideJoint;
    pub fn cpSlideJointInit(joint: *mut cpSlideJoint, a: *mut cpBody,
                            b: *mut cpBody, anchorA: cpVect, anchorB: cpVect,
                            min: cpFloat, max: cpFloat) -> *mut cpSlideJoint;
    pub fn cpSlideJointNew(a: *mut cpBody, b: *mut cpBody, anchorA: cpVect,
                           anchorB: cpVect, min: cpFloat, max: cpFloat)
     -> *mut cpConstraint;
    pub fn cpSlideJointGetAnchorA(constraint: *const cpConstraint) -> cpVect;
    pub fn cpSlideJointSetAnchorA(constraint: *mut cpConstraint,
                                  anchorA: cpVect) -> ();
    pub fn cpSlideJointGetAnchorB(constraint: *const cpConstraint) -> cpVect;
    pub fn cpSlideJointSetAnchorB(constraint: *mut cpConstraint,
                                  anchorB: cpVect) -> ();
    pub fn cpSlideJointGetMin(constraint: *const cpConstraint) -> cpFloat;
    pub fn cpSlideJointSetMin(constraint: *mut cpConstraint, min: cpFloat)
     -> ();
    pub fn cpSlideJointGetMax(constraint: *const cpConstraint) -> cpFloat;
    pub fn cpSlideJointSetMax(constraint: *mut cpConstraint, max: cpFloat)
     -> ();
    pub fn cpConstraintIsPivotJoint(constraint: *const cpConstraint)
     -> cpBool;
    pub fn cpPivotJointAlloc() -> *mut cpPivotJoint;
    pub fn cpPivotJointInit(joint: *mut cpPivotJoint, a: *mut cpBody,
                            b: *mut cpBody, anchorA: cpVect, anchorB: cpVect)
     -> *mut cpPivotJoint;
    pub fn cpPivotJointNew(a: *mut cpBody, b: *mut cpBody, pivot: cpVect)
     -> *mut cpConstraint;
    pub fn cpPivotJointNew2(a: *mut cpBody, b: *mut cpBody, anchorA: cpVect,
                            anchorB: cpVect) -> *mut cpConstraint;
    pub fn cpPivotJointGetAnchorA(constraint: *const cpConstraint) -> cpVect;
    pub fn cpPivotJointSetAnchorA(constraint: *mut cpConstraint,
                                  anchorA: cpVect) -> ();
    pub fn cpPivotJointGetAnchorB(constraint: *const cpConstraint) -> cpVect;
    pub fn cpPivotJointSetAnchorB(constraint: *mut cpConstraint,
                                  anchorB: cpVect) -> ();
    pub fn cpConstraintIsGrooveJoint(constraint: *const cpConstraint)
     -> cpBool;
    pub fn cpGrooveJointAlloc() -> *mut cpGrooveJoint;
    pub fn cpGrooveJointInit(joint: *mut cpGrooveJoint, a: *mut cpBody,
                             b: *mut cpBody, groove_a: cpVect,
                             groove_b: cpVect, anchorB: cpVect)
     -> *mut cpGrooveJoint;
    pub fn cpGrooveJointNew(a: *mut cpBody, b: *mut cpBody, groove_a: cpVect,
                            groove_b: cpVect, anchorB: cpVect)
     -> *mut cpConstraint;
    pub fn cpGrooveJointGetGrooveA(constraint: *const cpConstraint) -> cpVect;
    pub fn cpGrooveJointSetGrooveA(constraint: *mut cpConstraint,
                                   grooveA: cpVect) -> ();
    pub fn cpGrooveJointGetGrooveB(constraint: *const cpConstraint) -> cpVect;
    pub fn cpGrooveJointSetGrooveB(constraint: *mut cpConstraint,
                                   grooveB: cpVect) -> ();
    pub fn cpGrooveJointGetAnchorB(constraint: *const cpConstraint) -> cpVect;
    pub fn cpGrooveJointSetAnchorB(constraint: *mut cpConstraint,
                                   anchorB: cpVect) -> ();
    pub fn cpConstraintIsDampedSpring(constraint: *const cpConstraint)
     -> cpBool;
    pub fn cpDampedSpringAlloc() -> *mut cpDampedSpring;
    pub fn cpDampedSpringInit(joint: *mut cpDampedSpring, a: *mut cpBody,
                              b: *mut cpBody, anchorA: cpVect,
                              anchorB: cpVect, restLength: cpFloat,
                              stiffness: cpFloat, damping: cpFloat)
     -> *mut cpDampedSpring;
    pub fn cpDampedSpringNew(a: *mut cpBody, b: *mut cpBody, anchorA: cpVect,
                             anchorB: cpVect, restLength: cpFloat,
                             stiffness: cpFloat, damping: cpFloat)
     -> *mut cpConstraint;
    pub fn cpDampedSpringGetAnchorA(constraint: *const cpConstraint)
     -> cpVect;
    pub fn cpDampedSpringSetAnchorA(constraint: *mut cpConstraint,
                                    anchorA: cpVect) -> ();
    pub fn cpDampedSpringGetAnchorB(constraint: *const cpConstraint)
     -> cpVect;
    pub fn cpDampedSpringSetAnchorB(constraint: *mut cpConstraint,
                                    anchorB: cpVect) -> ();
    pub fn cpDampedSpringGetRestLength(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpDampedSpringSetRestLength(constraint: *mut cpConstraint,
                                       restLength: cpFloat) -> ();
    pub fn cpDampedSpringGetStiffness(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpDampedSpringSetStiffness(constraint: *mut cpConstraint,
                                      stiffness: cpFloat) -> ();
    pub fn cpDampedSpringGetDamping(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpDampedSpringSetDamping(constraint: *mut cpConstraint,
                                    damping: cpFloat) -> ();
    pub fn cpDampedSpringGetSpringForceFunc(constraint: *const cpConstraint)
     -> cpDampedSpringForceFunc;
    pub fn cpDampedSpringSetSpringForceFunc(constraint: *mut cpConstraint,
                                            springForceFunc:
                                                cpDampedSpringForceFunc)
     -> ();
    pub fn cpConstraintIsDampedRotarySpring(constraint: *const cpConstraint)
     -> cpBool;
    pub fn cpDampedRotarySpringAlloc() -> *mut cpDampedRotarySpring;
    pub fn cpDampedRotarySpringInit(joint: *mut cpDampedRotarySpring,
                                    a: *mut cpBody, b: *mut cpBody,
                                    restAngle: cpFloat, stiffness: cpFloat,
                                    damping: cpFloat)
     -> *mut cpDampedRotarySpring;
    pub fn cpDampedRotarySpringNew(a: *mut cpBody, b: *mut cpBody,
                                   restAngle: cpFloat, stiffness: cpFloat,
                                   damping: cpFloat) -> *mut cpConstraint;
    pub fn cpDampedRotarySpringGetRestAngle(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpDampedRotarySpringSetRestAngle(constraint: *mut cpConstraint,
                                            restAngle: cpFloat) -> ();
    pub fn cpDampedRotarySpringGetStiffness(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpDampedRotarySpringSetStiffness(constraint: *mut cpConstraint,
                                            stiffness: cpFloat) -> ();
    pub fn cpDampedRotarySpringGetDamping(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpDampedRotarySpringSetDamping(constraint: *mut cpConstraint,
                                          damping: cpFloat) -> ();
    pub fn cpDampedRotarySpringGetSpringTorqueFunc(constraint:
                                                       *const cpConstraint)
     -> cpDampedRotarySpringTorqueFunc;
    pub fn cpDampedRotarySpringSetSpringTorqueFunc(constraint:
                                                       *mut cpConstraint,
                                                   springTorqueFunc:
                                                       cpDampedRotarySpringTorqueFunc)
     -> ();
    pub fn cpConstraintIsRotaryLimitJoint(constraint: *const cpConstraint)
     -> cpBool;
    pub fn cpRotaryLimitJointAlloc() -> *mut cpRotaryLimitJoint;
    pub fn cpRotaryLimitJointInit(joint: *mut cpRotaryLimitJoint,
                                  a: *mut cpBody, b: *mut cpBody,
                                  min: cpFloat, max: cpFloat)
     -> *mut cpRotaryLimitJoint;
    pub fn cpRotaryLimitJointNew(a: *mut cpBody, b: *mut cpBody, min: cpFloat,
                                 max: cpFloat) -> *mut cpConstraint;
    pub fn cpRotaryLimitJointGetMin(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpRotaryLimitJointSetMin(constraint: *mut cpConstraint,
                                    min: cpFloat) -> ();
    pub fn cpRotaryLimitJointGetMax(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpRotaryLimitJointSetMax(constraint: *mut cpConstraint,
                                    max: cpFloat) -> ();
    pub fn cpConstraintIsRatchetJoint(constraint: *const cpConstraint)
     -> cpBool;
    pub fn cpRatchetJointAlloc() -> *mut cpRatchetJoint;
    pub fn cpRatchetJointInit(joint: *mut cpRatchetJoint, a: *mut cpBody,
                              b: *mut cpBody, phase: cpFloat,
                              ratchet: cpFloat) -> *mut cpRatchetJoint;
    pub fn cpRatchetJointNew(a: *mut cpBody, b: *mut cpBody, phase: cpFloat,
                             ratchet: cpFloat) -> *mut cpConstraint;
    pub fn cpRatchetJointGetAngle(constraint: *const cpConstraint) -> cpFloat;
    pub fn cpRatchetJointSetAngle(constraint: *mut cpConstraint,
                                  angle: cpFloat) -> ();
    pub fn cpRatchetJointGetPhase(constraint: *const cpConstraint) -> cpFloat;
    pub fn cpRatchetJointSetPhase(constraint: *mut cpConstraint,
                                  phase: cpFloat) -> ();
    pub fn cpRatchetJointGetRatchet(constraint: *const cpConstraint)
     -> cpFloat;
    pub fn cpRatchetJointSetRatchet(constraint: *mut cpConstraint,
                                    ratchet: cpFloat) -> ();
    pub fn cpConstraintIsGearJoint(constraint: *const cpConstraint) -> cpBool;
    pub fn cpGearJointAlloc() -> *mut cpGearJoint;
    pub fn cpGearJointInit(joint: *mut cpGearJoint, a: *mut cpBody,
                           b: *mut cpBody, phase: cpFloat, ratio: cpFloat)
     -> *mut cpGearJoint;
    pub fn cpGearJointNew(a: *mut cpBody, b: *mut cpBody, phase: cpFloat,
                          ratio: cpFloat) -> *mut cpConstraint;
    pub fn cpGearJointGetPhase(constraint: *const cpConstraint) -> cpFloat;
    pub fn cpGearJointSetPhase(constraint: *mut cpConstraint, phase: cpFloat)
     -> ();
    pub fn cpGearJointGetRatio(constraint: *const cpConstraint) -> cpFloat;
    pub fn cpGearJointSetRatio(constraint: *mut cpConstraint, ratio: cpFloat)
     -> ();
    pub fn cpConstraintIsSimpleMotor(constraint: *const cpConstraint)
     -> cpBool;
    pub fn cpSimpleMotorAlloc() -> *mut cpSimpleMotor;
    pub fn cpSimpleMotorInit(joint: *mut cpSimpleMotor, a: *mut cpBody,
                             b: *mut cpBody, rate: cpFloat)
     -> *mut cpSimpleMotor;
    pub fn cpSimpleMotorNew(a: *mut cpBody, b: *mut cpBody, rate: cpFloat)
     -> *mut cpConstraint;
    pub fn cpSimpleMotorGetRate(constraint: *const cpConstraint) -> cpFloat;
    pub fn cpSimpleMotorSetRate(constraint: *mut cpConstraint, rate: cpFloat)
     -> ();
    pub fn cpSpaceAlloc() -> *mut cpSpace;
    pub fn cpSpaceInit(space: *mut cpSpace) -> *mut cpSpace;
    pub fn cpSpaceNew() -> *mut cpSpace;
    pub fn cpSpaceDestroy(space: *mut cpSpace) -> ();
    pub fn cpSpaceFree(space: *mut cpSpace) -> ();
    pub fn cpSpaceGetIterations(space: *const cpSpace) -> ::libc::c_int;
    pub fn cpSpaceSetIterations(space: *mut cpSpace,
                                iterations: ::libc::c_int) -> ();
    pub fn cpSpaceGetGravity(space: *const cpSpace) -> cpVect;
    pub fn cpSpaceSetGravity(space: *mut cpSpace, gravity: cpVect) -> ();
    pub fn cpSpaceGetDamping(space: *const cpSpace) -> cpFloat;
    pub fn cpSpaceSetDamping(space: *mut cpSpace, damping: cpFloat) -> ();
    pub fn cpSpaceGetIdleSpeedThreshold(space: *const cpSpace) -> cpFloat;
    pub fn cpSpaceSetIdleSpeedThreshold(space: *mut cpSpace,
                                        idleSpeedThreshold: cpFloat) -> ();
    pub fn cpSpaceGetSleepTimeThreshold(space: *const cpSpace) -> cpFloat;
    pub fn cpSpaceSetSleepTimeThreshold(space: *mut cpSpace,
                                        sleepTimeThreshold: cpFloat) -> ();
    pub fn cpSpaceGetCollisionSlop(space: *const cpSpace) -> cpFloat;
    pub fn cpSpaceSetCollisionSlop(space: *mut cpSpace,
                                   collisionSlop: cpFloat) -> ();
    pub fn cpSpaceGetCollisionBias(space: *const cpSpace) -> cpFloat;
    pub fn cpSpaceSetCollisionBias(space: *mut cpSpace,
                                   collisionBias: cpFloat) -> ();
    pub fn cpSpaceGetCollisionPersistence(space: *const cpSpace)
     -> cpTimestamp;
    pub fn cpSpaceSetCollisionPersistence(space: *mut cpSpace,
                                          collisionPersistence: cpTimestamp)
     -> ();
    pub fn cpSpaceGetUserData(space: *const cpSpace) -> cpDataPointer;
    pub fn cpSpaceSetUserData(space: *mut cpSpace, userData: cpDataPointer)
     -> ();
    pub fn cpSpaceGetStaticBody(space: *const cpSpace) -> *mut cpBody;
    pub fn cpSpaceGetCurrentTimeStep(space: *const cpSpace) -> cpFloat;
    pub fn cpSpaceIsLocked(space: *mut cpSpace) -> cpBool;
    pub fn cpSpaceAddDefaultCollisionHandler(space: *mut cpSpace)
     -> *mut cpCollisionHandler;
    pub fn cpSpaceAddCollisionHandler(space: *mut cpSpace, a: cpCollisionType,
                                      b: cpCollisionType)
     -> *mut cpCollisionHandler;
    pub fn cpSpaceAddWildcardHandler(space: *mut cpSpace,
                                     _type: cpCollisionType)
     -> *mut cpCollisionHandler;
    pub fn cpSpaceAddShape(space: *mut cpSpace, shape: *mut cpShape)
     -> *mut cpShape;
    pub fn cpSpaceAddBody(space: *mut cpSpace, body: *mut cpBody)
     -> *mut cpBody;
    pub fn cpSpaceAddConstraint(space: *mut cpSpace,
                                constraint: *mut cpConstraint)
     -> *mut cpConstraint;
    pub fn cpSpaceRemoveShape(space: *mut cpSpace, shape: *mut cpShape) -> ();
    pub fn cpSpaceRemoveBody(space: *mut cpSpace, body: *mut cpBody) -> ();
    pub fn cpSpaceRemoveConstraint(space: *mut cpSpace,
                                   constraint: *mut cpConstraint) -> ();
    pub fn cpSpaceContainsShape(space: *mut cpSpace, shape: *mut cpShape)
     -> cpBool;
    pub fn cpSpaceContainsBody(space: *mut cpSpace, body: *mut cpBody)
     -> cpBool;
    pub fn cpSpaceContainsConstraint(space: *mut cpSpace,
                                     constraint: *mut cpConstraint) -> cpBool;
    pub fn cpSpaceAddPostStepCallback(space: *mut cpSpace,
                                      func: cpPostStepFunc,
                                      key: *mut ::libc::c_void,
                                      data: *mut ::libc::c_void) -> cpBool;
    pub fn cpSpacePointQuery(space: *mut cpSpace, point: cpVect,
                             maxDistance: cpFloat, filter: cpShapeFilter,
                             func: cpSpacePointQueryFunc,
                             data: *mut ::libc::c_void) -> ();
    pub fn cpSpacePointQueryNearest(space: *mut cpSpace, point: cpVect,
                                    maxDistance: cpFloat,
                                    filter: cpShapeFilter,
                                    out: *mut cpPointQueryInfo)
     -> *mut cpShape;
    pub fn cpSpaceSegmentQuery(space: *mut cpSpace, start: cpVect,
                               end: cpVect, radius: cpFloat,
                               filter: cpShapeFilter,
                               func: cpSpaceSegmentQueryFunc,
                               data: *mut ::libc::c_void) -> ();
    pub fn cpSpaceSegmentQueryFirst(space: *mut cpSpace, start: cpVect,
                                    end: cpVect, radius: cpFloat,
                                    filter: cpShapeFilter,
                                    out: *mut cpSegmentQueryInfo)
     -> *mut cpShape;
    pub fn cpSpaceBBQuery(space: *mut cpSpace, bb: cpBB,
                          filter: cpShapeFilter, func: cpSpaceBBQueryFunc,
                          data: *mut ::libc::c_void) -> ();
    pub fn cpSpaceShapeQuery(space: *mut cpSpace, shape: *mut cpShape,
                             func: cpSpaceShapeQueryFunc,
                             data: *mut ::libc::c_void) -> cpBool;
    pub fn cpSpaceEachBody(space: *mut cpSpace, func: cpSpaceBodyIteratorFunc,
                           data: *mut ::libc::c_void) -> ();
    pub fn cpSpaceEachShape(space: *mut cpSpace,
                            func: cpSpaceShapeIteratorFunc,
                            data: *mut ::libc::c_void) -> ();
    pub fn cpSpaceEachConstraint(space: *mut cpSpace,
                                 func: cpSpaceConstraintIteratorFunc,
                                 data: *mut ::libc::c_void) -> ();
    pub fn cpSpaceReindexStatic(space: *mut cpSpace) -> ();
    pub fn cpSpaceReindexShape(space: *mut cpSpace, shape: *mut cpShape)
     -> ();
    pub fn cpSpaceReindexShapesForBody(space: *mut cpSpace, body: *mut cpBody)
     -> ();
    pub fn cpSpaceUseSpatialHash(space: *mut cpSpace, dim: cpFloat,
                                 count: ::libc::c_int) -> ();
    pub fn cpSpaceStep(space: *mut cpSpace, dt: cpFloat) -> ();
    pub fn cpSpaceDebugDraw(space: *mut cpSpace,
                            options: *mut cpSpaceDebugDrawOptions) -> ();
    pub fn cpMomentForCircle(m: cpFloat, r1: cpFloat, r2: cpFloat,
                             offset: cpVect) -> cpFloat;
    pub fn cpAreaForCircle(r1: cpFloat, r2: cpFloat) -> cpFloat;
    pub fn cpMomentForSegment(m: cpFloat, a: cpVect, b: cpVect,
                              radius: cpFloat) -> cpFloat;
    pub fn cpAreaForSegment(a: cpVect, b: cpVect, radius: cpFloat) -> cpFloat;
    pub fn cpMomentForPoly(m: cpFloat, count: ::libc::c_int,
                           verts: *const cpVect, offset: cpVect,
                           radius: cpFloat) -> cpFloat;
    pub fn cpAreaForPoly(count: ::libc::c_int, verts: *const cpVect,
                         radius: cpFloat) -> cpFloat;
    pub fn cpCentroidForPoly(count: ::libc::c_int, verts: *const cpVect)
     -> cpVect;
    pub fn cpMomentForBox(m: cpFloat, width: cpFloat, height: cpFloat)
     -> cpFloat;
    pub fn cpMomentForBox2(m: cpFloat, _box: cpBB) -> cpFloat;
    pub fn cpConvexHull(count: ::libc::c_int, verts: *const cpVect,
                        result: *mut cpVect, first: *mut ::libc::c_int,
                        tol: cpFloat) -> ::libc::c_int;
    pub fn cpSpaceEachBody_b(space: *mut cpSpace, block: ::libc::c_void)
     -> ();
    pub fn cpSpaceEachShape_b(space: *mut cpSpace, block: ::libc::c_void)
     -> ();
    pub fn cpSpaceEachConstraint_b(space: *mut cpSpace, block: ::libc::c_void)
     -> ();
    pub fn cpBodyEachShape_b(body: *mut cpBody, block: ::libc::c_void) -> ();
    pub fn cpBodyEachConstraint_b(body: *mut cpBody, block: ::libc::c_void)
     -> ();
    pub fn cpBodyEachArbiter_b(body: *mut cpBody, block: ::libc::c_void)
     -> ();
    pub fn cpSpacePointQuery_b(space: *mut cpSpace, point: cpVect,
                               maxDistance: cpFloat, filter: cpShapeFilter,
                               block: cpSpacePointQueryBlock) -> ();
    pub fn cpSpaceSegmentQuery_b(space: *mut cpSpace, start: cpVect,
                                 end: cpVect, radius: cpFloat,
                                 filter: cpShapeFilter,
                                 block: cpSpaceSegmentQueryBlock) -> ();
    pub fn cpSpaceBBQuery_b(space: *mut cpSpace, bb: cpBB,
                            filter: cpShapeFilter, block: cpSpaceBBQueryBlock)
     -> ();
    pub fn cpSpaceShapeQuery_b(space: *mut cpSpace, shape: *mut cpShape,
                               block: cpSpaceShapeQueryBlock) -> cpBool;
    pub fn cpArrayNew(size: ::libc::c_int) -> *mut cpArray;
    pub fn cpArrayFree(arr: *mut cpArray) -> ();
    pub fn cpArrayPush(arr: *mut cpArray, object: *mut ::libc::c_void) -> ();
    pub fn cpArrayPop(arr: *mut cpArray) -> *mut ::libc::c_void;
    pub fn cpArrayDeleteObj(arr: *mut cpArray, obj: *mut ::libc::c_void)
     -> ();
    pub fn cpArrayContains(arr: *mut cpArray, ptr: *mut ::libc::c_void)
     -> cpBool;
    pub fn cpArrayFreeEach(arr: *mut cpArray, freeFunc: ::libc::c_void) -> ();
    pub fn cpHashSetNew(size: ::libc::c_int, eqlFunc: cpHashSetEqlFunc)
     -> *mut cpHashSet;
    pub fn cpHashSetSetDefaultValue(set: *mut cpHashSet,
                                    default_value: *mut ::libc::c_void) -> ();
    pub fn cpHashSetFree(set: *mut cpHashSet) -> ();
    pub fn cpHashSetCount(set: *mut cpHashSet) -> ::libc::c_int;
    pub fn cpHashSetInsert(set: *mut cpHashSet, hash: cpHashValue,
                           ptr: *mut ::libc::c_void,
                           trans: cpHashSetTransFunc,
                           data: *mut ::libc::c_void) -> *mut ::libc::c_void;
    pub fn cpHashSetRemove(set: *mut cpHashSet, hash: cpHashValue,
                           ptr: *mut ::libc::c_void) -> *mut ::libc::c_void;
    pub fn cpHashSetFind(set: *mut cpHashSet, hash: cpHashValue,
                         ptr: *mut ::libc::c_void) -> *mut ::libc::c_void;
    pub fn cpHashSetEach(set: *mut cpHashSet, func: cpHashSetIteratorFunc,
                         data: *mut ::libc::c_void) -> ();
    pub fn cpHashSetFilter(set: *mut cpHashSet, func: cpHashSetFilterFunc,
                           data: *mut ::libc::c_void) -> ();
    pub fn cpBodyAddShape(body: *mut cpBody, shape: *mut cpShape) -> ();
    pub fn cpBodyRemoveShape(body: *mut cpBody, shape: *mut cpShape) -> ();
    pub fn cpBodyAccumulateMassFromShapes(body: *mut cpBody) -> ();
    pub fn cpBodyRemoveConstraint(body: *mut cpBody,
                                  constraint: *mut cpConstraint) -> ();
    pub fn cpSpatialIndexInit(index: *mut cpSpatialIndex,
                              klass: *mut cpSpatialIndexClass,
                              bbfunc: cpSpatialIndexBBFunc,
                              staticIndex: *mut cpSpatialIndex)
     -> *mut cpSpatialIndex;
    pub fn cpArbiterInit(arb: *mut cpArbiter, a: *mut cpShape,
                         b: *mut cpShape) -> *mut cpArbiter;
    pub fn cpArbiterUnthread(arb: *mut cpArbiter) -> ();
    pub fn cpArbiterUpdate(arb: *mut cpArbiter,
                           info: *mut Struct_cpCollisionInfo,
                           space: *mut cpSpace) -> ();
    pub fn cpArbiterPreStep(arb: *mut cpArbiter, dt: cpFloat, bias: cpFloat,
                            slop: cpFloat) -> ();
    pub fn cpArbiterApplyCachedImpulse(arb: *mut cpArbiter, dt_coef: cpFloat)
     -> ();
    pub fn cpArbiterApplyImpulse(arb: *mut cpArbiter) -> ();
    pub fn cpShapeInit(shape: *mut cpShape, klass: *const cpShapeClass,
                       body: *mut cpBody, massInfo: Struct_cpShapeMassInfo)
     -> *mut cpShape;
    pub fn cpCollide(a: *const cpShape, b: *const cpShape, id: cpCollisionID,
                     contacts: *mut Struct_cpContact)
     -> Struct_cpCollisionInfo;
    pub fn cpLoopIndexes(verts: *const cpVect, count: ::libc::c_int,
                         start: *mut ::libc::c_int, end: *mut ::libc::c_int)
     -> ();
    pub fn cpConstraintInit(constraint: *mut cpConstraint,
                            klass: *const Struct_cpConstraintClass,
                            a: *mut cpBody, b: *mut cpBody) -> ();
    pub fn cpSpaceSetStaticBody(space: *mut cpSpace, body: *mut cpBody) -> ();
    pub fn cpSpaceProcessComponents(space: *mut cpSpace, dt: cpFloat) -> ();
    pub fn cpSpacePushFreshContactBuffer(space: *mut cpSpace) -> ();
    pub fn cpContactBufferGetArray(space: *mut cpSpace)
     -> *mut Struct_cpContact;
    pub fn cpSpacePushContacts(space: *mut cpSpace, count: ::libc::c_int)
     -> ();
    pub fn cpSpaceGetPostStepCallback(space: *mut cpSpace,
                                      key: *mut ::libc::c_void)
     -> *mut cpPostStepCallback;
    pub fn cpSpaceArbiterSetFilter(arb: *mut cpArbiter, space: *mut cpSpace)
     -> cpBool;
    pub fn cpSpaceFilterArbiters(space: *mut cpSpace, body: *mut cpBody,
                                 filter: *mut cpShape) -> ();
    pub fn cpSpaceActivateBody(space: *mut cpSpace, body: *mut cpBody) -> ();
    pub fn cpSpaceLock(space: *mut cpSpace) -> ();
    pub fn cpSpaceUnlock(space: *mut cpSpace, runPostStep: cpBool) -> ();
    pub fn cpShapeUpdateFunc(shape: *mut cpShape, unused: *mut ::libc::c_void)
     -> ();
    pub fn cpSpaceCollideShapes(a: *mut cpShape, b: *mut cpShape,
                                id: cpCollisionID, space: *mut cpSpace)
     -> cpCollisionID;
}