common.bmx 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. ' Copyright (c) 2008-2021 Bruce A Henderson
  2. '
  3. ' Permission is hereby granted, free of charge, to any person obtaining a copy
  4. ' of this software and associated documentation files (the "Software"), to deal
  5. ' in the Software without restriction, including without limitation the rights
  6. ' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. ' copies of the Software, and to permit persons to whom the Software is
  8. ' furnished to do so, subject to the following conditions:
  9. '
  10. ' The above copyright notice and this permission notice shall be included in
  11. ' all copies or substantial portions of the Software.
  12. '
  13. ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. ' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. ' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. ' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. ' THE SOFTWARE.
  20. '
  21. SuperStrict
  22. Import "source.bmx"
  23. Extern
  24. Function bmx_b2world_createbody:Byte Ptr(handle:Byte Ptr, def:Byte Ptr, body:Object)
  25. Function bmx_b2world_destroybody(handle:Byte Ptr, body:Byte Ptr)
  26. Function bmx_b2world_getgroundbody:Byte Ptr(handle:Byte Ptr)
  27. Function bmx_b2world_setwarmstarting(handle:Byte Ptr, flag:Int)
  28. Function bmx_b2world_setcontinuousphysics(handle:Byte Ptr, flag:Int)
  29. Function bmx_b2world_validate(handle:Byte Ptr)
  30. Function bmx_b2world_setdebugDraw(handle:Byte Ptr, debugDraw:Byte Ptr)
  31. Function bmx_b2world_createjoint:Byte Ptr(handle:Byte Ptr, def:Byte Ptr)
  32. Function bmx_b2world_destroyjoint(handle:Byte Ptr, joint:Byte Ptr)
  33. Function bmx_b2world_getbodylist:Byte Ptr(handle:Byte Ptr)
  34. Function bmx_b2world_getjointlist:Byte Ptr(handle:Byte Ptr)
  35. Function bmx_b2world_setfilter(handle:Byte Ptr, filter:Byte Ptr)
  36. Function bmx_b2world_setcontactlistener(handle:Byte Ptr, listener:Byte Ptr)
  37. Function bmx_b2world_setboundarylistener(handle:Byte Ptr, listener:Byte Ptr)
  38. Function bmx_b2world_getcontactlist:Byte Ptr(handle:Byte Ptr)
  39. Function bmx_b2world_getproxycount:Int(handle:Byte Ptr)
  40. Function bmx_b2world_getpaircount:Int(handle:Byte Ptr)
  41. Function bmx_b2world_getbodycount:Int(handle:Byte Ptr)
  42. Function bmx_b2world_getjointcount:Int(handle:Byte Ptr)
  43. Function bmx_b2world_free(handle:Byte Ptr)
  44. Function bmx_b2world_setdestructionlistener(handle:Byte Ptr, listener:Byte Ptr)
  45. Function bmx_b2world_refilter(handle:Byte Ptr, shape:Byte Ptr)
  46. Function bmx_b2world_createcontroller:Byte Ptr(handle:Byte Ptr, def:Byte Ptr, _type:Int)
  47. Function bmx_b2world_destroycontroller(handle:Byte Ptr, controller:Byte Ptr)
  48. Function bmx_b2bodydef_create:Byte Ptr()
  49. Function bmx_b2bodydef_delete(handle:Byte Ptr)
  50. Function bmx_b2bodydef_setpositionxy(handle:Byte Ptr, x:Float, y:Float)
  51. Function bmx_b2bodydef_setangle(handle:Byte Ptr, angle:Float)
  52. Function bmx_b2bodydef_setmassdata(handle:Byte Ptr, data:Byte Ptr)
  53. Function bmx_b2bodydef_issleeping:Int(handle:Byte Ptr)
  54. Function bmx_b2bodydef_setissleeping(handle:Byte Ptr, sleeping:Int)
  55. Function bmx_b2bodydef_setfixedrotation(handle:Byte Ptr, fixed:Int)
  56. Function bmx_b2bodydef_getfixedrotation:Int(handle:Byte Ptr)
  57. Function bmx_b2bodydef_setisbullet(handle:Byte Ptr, bullet:Int)
  58. Function bmx_b2bodydef_setlineardamping(handle:Byte Ptr, damping:Float)
  59. Function bmx_b2bodydef_getlineardamping:Float(handle:Byte Ptr)
  60. Function bmx_b2bodydef_setangulardamping(handle:Byte Ptr, damping:Float)
  61. Function bmx_b2bodydef_getangulardamping:Float(handle:Byte Ptr)
  62. Function bmx_b2bodydef_setallowsleep(handle:Byte Ptr, allow:Int)
  63. Function bmx_b2bodydef_getallowsleep:Int(handle:Byte Ptr)
  64. Function bmx_b2bodydef_getangle:Float(handle:Byte Ptr)
  65. Function bmx_b2bodydef_isbullet:Int(handle:Byte Ptr)
  66. Function bmx_b2bodydef_getmassdata:Byte Ptr(handle:Byte Ptr)
  67. Function bmx_b2world_dostep(handle:Byte Ptr, timeStep:Float, velocityIterations:Int, positionIterations:Int)
  68. Function bmx_b2shapedef_setfriction(handle:Byte Ptr, friction:Float)
  69. Function bmx_b2shapedef_setrestitution(handle:Byte Ptr, restitution:Float)
  70. Function bmx_b2shapedef_setdensity(handle:Byte Ptr, density:Float)
  71. Function bmx_b2shapedef_setfilter(handle:Byte Ptr, filter:Byte Ptr)
  72. Function bmx_b2shapedef_getfilter:Byte Ptr(handle:Byte Ptr)
  73. Function bmx_b2shapedef_setissensor(handle:Byte Ptr, sensor:Int)
  74. Function bmx_b2shapedef_issensor:Int(handle:Byte Ptr)
  75. Function bmx_b2shapedef_getfriction:Float(handle:Byte Ptr)
  76. Function bmx_b2shapedef_getrestitution:Float(handle:Byte Ptr)
  77. Function bmx_b2shapedef_getdensity:Float(handle:Byte Ptr)
  78. Function bmx_b2polygondef_create:Byte Ptr()
  79. Function bmx_b2polygondef_setasbox(handle:Byte Ptr, hx:Float, hy:Float)
  80. Function bmx_b2polygondef_delete(handle:Byte Ptr)
  81. Function bmx_b2body_createshape:Byte Ptr(handle:Byte Ptr, def:Byte Ptr)
  82. Function bmx_b2body_destroyshape(handle:Byte Ptr, shape:Byte Ptr)
  83. Function bmx_b2body_setmassfromshapes(handle:Byte Ptr)
  84. Function bmx_b2body_getangle:Float(handle:Byte Ptr)
  85. Function bmx_b2body_getmaxbody:Object(handle:Byte Ptr)
  86. Function bmx_b2body_getnext:Byte Ptr(handle:Byte Ptr)
  87. Function bmx_b2body_getshapelist:Byte Ptr(handle:Byte Ptr)
  88. Function bmx_b2body_isstatic:Int(handle:Byte Ptr)
  89. Function bmx_b2body_isdynamic:Int(handle:Byte Ptr)
  90. Function bmx_b2body_isfrozen:Int(handle:Byte Ptr)
  91. Function bmx_b2body_issleeping:Int(handle:Byte Ptr)
  92. Function bmx_b2body_allowsleeping(handle:Byte Ptr, flag:Int)
  93. Function bmx_b2body_wakeup(handle:Byte Ptr)
  94. Function bmx_b2body_puttosleep(handle:Byte Ptr)
  95. Function bmx_b2body_isbullet:Int(handle:Byte Ptr)
  96. Function bmx_b2body_setbullet(handle:Byte Ptr, flag:Int)
  97. Function bmx_b2body_setangularvelocity(handle:Byte Ptr, omega:Float)
  98. Function bmx_b2body_getangularvelocity:Float(handle:Byte Ptr)
  99. Function bmx_b2body_applytorque(handle:Byte Ptr, torque:Float)
  100. Function bmx_b2body_getmass:Float(handle:Byte Ptr)
  101. Function bmx_b2body_getinertia:Float(handle:Byte Ptr)
  102. Function bmx_b2body_getjointlist:Byte Ptr(handle:Byte Ptr)
  103. Function bmx_b2body_getworld:Byte Ptr(handle:Byte Ptr)
  104. Function bmx_b2body_setmass(handle:Byte Ptr, massData:Byte Ptr)
  105. Function bmx_b2debugdraw_create:Byte Ptr(handle:Object)
  106. Function bmx_b2debugdraw_setflags(handle:Byte Ptr, flags:Int)
  107. Function bmx_b2debugdraw_getflags:Int(handle:Byte Ptr)
  108. Function bmx_b2debugdraw_appendflags(handle:Byte Ptr, flags:Int)
  109. Function bmx_b2debugdraw_clearflags(handle:Byte Ptr, flags:Int)
  110. Function bmx_b2circledef_create:Byte Ptr()
  111. Function bmx_b2circledef_setradius(handle:Byte Ptr, radius:Float)
  112. Function bmx_b2circledef_delete(handle:Byte Ptr)
  113. Function bmx_b2circledef_getradius:Float(handle:Byte Ptr)
  114. Function bmx_b2shape_issensor:Int(handle:Byte Ptr)
  115. Function bmx_b2shape_getbody:Byte Ptr(handle:Byte Ptr)
  116. Function bmx_b2shape_getmaxshape:Object(handle:Byte Ptr)
  117. Function bmx_b2shape_getnext:Byte Ptr(handle:Byte Ptr)
  118. Function bmx_b2shape_getsweepradius:Float(handle:Byte Ptr)
  119. Function bmx_b2shape_getfriction:Float(handle:Byte Ptr)
  120. Function bmx_b2shape_getrestitution:Float(handle:Byte Ptr)
  121. Function bmx_b2shape_computemass(handle:Byte Ptr, data:Byte Ptr)
  122. Function bmx_b2shape_getfilterdata:Byte Ptr(handle:Byte Ptr)
  123. Function bmx_b2shape_setfilterdata(handle:Byte Ptr, data:Byte Ptr)
  124. Function bmx_b2shape_setfriction(handle:Byte Ptr, friction:Float)
  125. Function bmx_b2shape_setrestitution(handle:Byte Ptr, restitution:Float)
  126. Function bmx_b2shape_getdensity:Float(handle:Byte Ptr)
  127. Function bmx_b2shape_setdensity(handle:Byte Ptr, density:Float)
  128. Function bmx_b2jointdef_setcollideconnected(handle:Byte Ptr, collideConnected:Int)
  129. Function bmx_b2jointdef_getcollideconnected:Int(handle:Byte Ptr)
  130. Function bmx_b2jointdef_setbody1(handle:Byte Ptr, body:Byte Ptr)
  131. Function bmx_b2jointdef_getbody1:Byte Ptr(handle:Byte Ptr)
  132. Function bmx_b2jointdef_setbody2(handle:Byte Ptr, body:Byte Ptr)
  133. Function bmx_b2jointdef_getbody2:Byte Ptr(handle:Byte Ptr)
  134. Function bmx_b2revolutejointdef_create:Byte Ptr()
  135. Function bmx_b2revolutejointdef_delete(handle:Byte Ptr)
  136. Function bmx_b2revolutejointdef_islimitenabled:Int(handle:Byte Ptr)
  137. Function bmx_b2revolutejointdef_enablelimit(handle:Byte Ptr, limit:Int)
  138. Function bmx_b2revolutejointdef_getlowerangle:Float(handle:Byte Ptr)
  139. Function bmx_b2revolutejointdef_setlowerangle(handle:Byte Ptr, angle:Float)
  140. Function bmx_b2revolutejointdef_getupperangle:Float(handle:Byte Ptr)
  141. Function bmx_b2revolutejointdef_setupperangle(handle:Byte Ptr, angle:Float)
  142. Function bmx_b2revolutejointdef_ismotorenabled:Int(handle:Byte Ptr)
  143. Function bmx_b2revolutejointdef_enablemotor(handle:Byte Ptr, value:Int)
  144. Function bmx_b2revolutejointdef_getmotorspeed:Float(handle:Byte Ptr)
  145. Function bmx_b2revolutejointdef_setmotorspeed(handle:Byte Ptr, speed:Float)
  146. Function bmx_b2revolutejointdef_getmaxmotortorque:Float(handle:Byte Ptr)
  147. Function bmx_b2revolutejointdef_setmaxmotortorque(handle:Byte Ptr, torque:Float)
  148. Function bmx_b2revolutejointdef_getreferenceangle:Float(handle:Byte Ptr)
  149. Function bmx_b2revolutejointdef_setreferenceangle(handle:Byte Ptr, angle:Float)
  150. Function bmx_b2joint_getmaxjoint:Object(handle:Byte Ptr)
  151. Function bmx_b2joint_getbody1:Byte Ptr(handle:Byte Ptr)
  152. Function bmx_b2joint_getbody2:Byte Ptr(handle:Byte Ptr)
  153. Function bmx_b2joint_getnext:Byte Ptr(handle:Byte Ptr)
  154. Function bmx_b2massdata_new:Byte Ptr()
  155. Function bmx_b2massdata_delete(handle:Byte Ptr)
  156. Function bmx_b2massdata_setmass(handle:Byte Ptr, mass:Float)
  157. Function bmx_b2massdata_seti(handle:Byte Ptr, i:Float)
  158. Function bmx_b2jointedge_getother:Byte Ptr(handle:Byte Ptr)
  159. Function bmx_b2jointedge_getjoint:Byte Ptr(handle:Byte Ptr)
  160. Function bmx_b2jointedge_getprev:Byte Ptr(handle:Byte Ptr)
  161. Function bmx_b2jointedge_getnext:Byte Ptr(handle:Byte Ptr)
  162. Function bmx_b2contactfilter_new:Byte Ptr(handle:Object)
  163. Function bmx_b2contactfilter_delete(handle:Byte Ptr)
  164. Function bmx_b2contactlistener_new:Byte Ptr(handle:Object)
  165. Function bmx_b2contactlistener_delete(handle:Byte Ptr)
  166. Function bmx_b2boundarylistener_new:Byte Ptr(handle:Object)
  167. Function bmx_b2boundarylistener_delete(handle:Byte Ptr)
  168. Function bmx_b2distancejointdef_new:Byte Ptr()
  169. Function bmx_b2distancejointdef_setlength(handle:Byte Ptr, length:Float)
  170. Function bmx_b2distancejointdef_getlength:Float(handle:Byte Ptr)
  171. Function bmx_b2distancejointdef_delete(handle:Byte Ptr)
  172. Function bmx_b2distancejointdef_setfrequencyhz(handle:Byte Ptr, freq:Float)
  173. Function bmx_b2distancejointdef_setdampingratio(handle:Byte Ptr, ratio:Float)
  174. Function bmx_b2prismaticjointdef_create:Byte Ptr()
  175. Function bmx_b2prismaticjointdef_enablelimit(handle:Byte Ptr, value:Int)
  176. Function bmx_b2prismaticjointdef_islimitenabled:Int(handle:Byte Ptr)
  177. Function bmx_b2prismaticjointdef_setlowertranslation(handle:Byte Ptr, Translation:Float)
  178. Function bmx_b2prismaticjointdef_getlowertranslation:Float(handle:Byte Ptr)
  179. Function bmx_b2prismaticjointdef_setuppertranslation(handle:Byte Ptr, Translation:Float)
  180. Function bmx_b2prismaticjointdef_getuppertranslation:Float(handle:Byte Ptr)
  181. Function bmx_b2prismaticjointdef_enablemotor(handle:Byte Ptr, value:Int)
  182. Function bmx_b2prismaticjointdef_ismotorenabled:Int(handle:Byte Ptr)
  183. Function bmx_b2prismaticjointdef_setmaxmotorforce(handle:Byte Ptr, force:Float)
  184. Function bmx_b2prismaticjointdef_getmaxmotorforce:Float(handle:Byte Ptr)
  185. Function bmx_b2prismaticjointdef_setmotorspeed(handle:Byte Ptr, speed:Float)
  186. Function bmx_b2prismaticjointdef_getmotorspeed:Float(handle:Byte Ptr)
  187. Function bmx_b2prismaticjointdef_delete(handle:Byte Ptr)
  188. Function bmx_b2prismaticjointdef_setreferenceangle(handle:Byte Ptr, angle:Float)
  189. Function bmx_b2prismaticjointdef_getreferenceangle:Float(handle:Byte Ptr)
  190. Function bmx_b2revolutejoint_getlowerlimit:Float(handle:Byte Ptr)
  191. Function bmx_b2revolutejoint_getupperlimit:Float(handle:Byte Ptr)
  192. Function bmx_b2revolutejoint_setlimits(handle:Byte Ptr, lowerLimit:Float, upperLimit:Float)
  193. Function bmx_b2revolutejoint_ismotorenabled:Int(handle:Byte Ptr)
  194. Function bmx_b2revolutejoint_enablemotor(handle:Byte Ptr, flag:Int)
  195. Function bmx_b2revolutejoint_setmotorspeed(handle:Byte Ptr, speed:Float)
  196. Function bmx_b2revolutejoint_getmotorspeed:Float(handle:Byte Ptr)
  197. Function bmx_b2revolutejoint_setmaxmotortorque(handle:Byte Ptr, torque:Float)
  198. Function bmx_b2revolutejoint_getmotortorque:Float(handle:Byte Ptr)
  199. Function bmx_b2revolutejoint_islimitenabled:Int(handle:Byte Ptr)
  200. Function bmx_b2revolutejoint_enablelimit(handle:Byte Ptr, flag:Int)
  201. Function bmx_b2revolutejoint_getreactiontorque:Float(handle:Byte Ptr, inv_dt:Float)
  202. Function bmx_b2revolutejoint_getjointangle:Float(handle:Byte Ptr)
  203. Function bmx_b2revolutejoint_getjointspeed:Float(handle:Byte Ptr)
  204. Function bmx_b2prismaticjoint_getjointspeed:Float(handle:Byte Ptr)
  205. Function bmx_b2prismaticjoint_islimitenabled:Int(handle:Byte Ptr)
  206. Function bmx_b2prismaticjoint_enablelimit(handle:Byte Ptr, flag:Int)
  207. Function bmx_b2prismaticjoint_getlowerlimit:Float(handle:Byte Ptr)
  208. Function bmx_b2prismaticjoint_getupperlimit:Float(handle:Byte Ptr)
  209. Function bmx_b2prismaticjoint_setlimits(handle:Byte Ptr, lowerLimit:Float, upperLimit:Float)
  210. Function bmx_b2prismaticjoint_ismotorenabled:Int(handle:Byte Ptr)
  211. Function bmx_b2prismaticjoint_enablemotor(handle:Byte Ptr, flag:Int)
  212. Function bmx_b2prismaticjoint_setmotorspeed(handle:Byte Ptr, speed:Float)
  213. Function bmx_b2prismaticjoint_getmotorspeed:Float(handle:Byte Ptr)
  214. Function bmx_b2prismaticjoint_setmaxmotorforce(handle:Byte Ptr, force:Float)
  215. Function bmx_b2prismaticjoint_getmotorforce:Float(handle:Byte Ptr)
  216. Function bmx_b2prismaticjoint_getreactiontorque:Float(handle:Byte Ptr, inv_dt:Float)
  217. Function bmx_b2prismaticjoint_getjointtranslation:Float(handle:Byte Ptr)
  218. Function bmx_b2xform_create:Byte Ptr()
  219. Function bmx_b2xform_getposition:Byte Ptr(handle:Byte Ptr)
  220. Function bmx_b2xform_setposition(handle:Byte Ptr, pos:Byte Ptr)
  221. Function bmx_b2xform_getr:Byte Ptr(handle:Byte Ptr)
  222. Function bmx_b2xform_setr(handle:Byte Ptr, r:Byte Ptr)
  223. Function bmx_b2xform_delete(handle:Byte Ptr)
  224. Function bmx_b2contact_getshape1:Byte Ptr(handle:Byte Ptr)
  225. Function bmx_b2contact_getshape2:Byte Ptr(handle:Byte Ptr)
  226. Function bmx_b2contact_getnext:Byte Ptr(handle:Byte Ptr)
  227. Function bmx_b2contact_issolid:Int(handle:Byte Ptr)
  228. Function bmx_b2contact_getmanifoldcount:Int(handle:Byte Ptr)
  229. Function bmx_b2filterdata_create:Byte Ptr()
  230. Function bmx_b2filterdata_getcategorybits:Short(handle:Byte Ptr)
  231. Function bmx_b2filterdata_setcategorybits(handle:Byte Ptr, categoryBits:Short)
  232. Function bmx_b2filterdata_getmaskbits:Short(handle:Byte Ptr)
  233. Function bmx_b2filterdata_setmaskbits(handle:Byte Ptr, maskBits:Short)
  234. Function bmx_b2filterdata_getgroupindex:Short(handle:Byte Ptr)
  235. Function bmx_b2filterdata_setgroupindex(handle:Byte Ptr, index:Int)
  236. Function bmx_b2filterdata_delete(handle:Byte Ptr)
  237. Function bmx_b2gearjointdef_new:Byte Ptr()
  238. Function bmx_b2gearjointdef_setjoint1(handle:Byte Ptr, joint:Byte Ptr)
  239. Function bmx_b2gearjointdef_setjoint2(handle:Byte Ptr, joint:Byte Ptr)
  240. Function bmx_b2gearjointdef_setratio(handle:Byte Ptr, ratio:Float)
  241. Function bmx_b2gearjointdef_delete(handle:Byte Ptr)
  242. Function bmx_b2gearjoint_getreactiontorque:Float(handle:Byte Ptr, inv_dt:Float)
  243. Function bmx_b2gearjoint_getratio:Float(handle:Byte Ptr)
  244. Function bmx_b2mousejoint_getreactiontorque:Float(handle:Byte Ptr, inv_dt:Float)
  245. Function bmx_b2pulleyjoint_getreactiontorque:Float(handle:Byte Ptr, inv_dt:Float)
  246. Function bmx_b2pulleyjoint_getlength1:Float(handle:Byte Ptr)
  247. Function bmx_b2pulleyjoint_getlength2:Float(handle:Byte Ptr)
  248. Function bmx_b2pulleyjoint_getratio:Float(handle:Byte Ptr)
  249. Function bmx_b2distancejoint_getreactiontorque:Float(handle:Byte Ptr, inv_dt:Float)
  250. Function bmx_b2mousejointdef_new:Byte Ptr()
  251. Function bmx_b2mousejointdef_setmaxforce(handle:Byte Ptr, maxForce:Float)
  252. Function bmx_b2mousejointdef_getmaxforce:Float(handle:Byte Ptr)
  253. Function bmx_b2mousejointdef_setfrequencyhz(handle:Byte Ptr, frequency:Float)
  254. Function bmx_b2mousejointdef_getfrequencyhz:Float(handle:Byte Ptr)
  255. Function bmx_b2mousejointdef_setdampingration(handle:Byte Ptr, ratio:Float)
  256. Function bmx_b2mousejointdef_getdampingratio:Float(handle:Byte Ptr)
  257. Function bmx_b2mousejointdef_delete(handle:Byte Ptr)
  258. Function bmx_b2pulleyjointdef_create:Byte Ptr()
  259. Function bmx_b2pulleyjointdef_setlength1(handle:Byte Ptr, length:Float)
  260. Function bmx_b2pulleyjointdef_getlength1:Float(handle:Byte Ptr)
  261. Function bmx_b2pulleyjointdef_setmaxlength1(handle:Byte Ptr, maxLength:Float)
  262. Function bmx_b2pulleyjointdef_getmaxlength1:Float(handle:Byte Ptr)
  263. Function bmx_b2pulleyjointdef_setlength2(handle:Byte Ptr, length:Float)
  264. Function bmx_b2pulleyjointdef_getlength2:Float(handle:Byte Ptr)
  265. Function bmx_b2pulleyjointdef_setmaxlength2(handle:Byte Ptr, maxLength:Float)
  266. Function bmx_b2pulleyjointdef_getmaxlength2:Float(handle:Byte Ptr)
  267. Function bmx_b2pulleyjointdef_setratio(handle:Byte Ptr, ratio:Float)
  268. Function bmx_b2pulleyjointdef_getratio:Float(handle:Byte Ptr)
  269. Function bmx_b2pulleyjointdef_delete(handle:Byte Ptr)
  270. Function bmx_b2destructionlistener_new:Byte Ptr(handle:Object)
  271. Function bmx_b2destructionlistener_delete(handle:Byte Ptr)
  272. Function bmx_b2polygonshape_getobb:Byte Ptr(handle:Byte Ptr)
  273. Function bmx_b2polygonshape_getvertexcount:Int(handle:Byte Ptr)
  274. Function bmx_b2circleshape_getradius:Float(handle:Byte Ptr)
  275. Function bmx_b2linejointdef_create:Byte Ptr()
  276. Function bmx_b2linejointdef_enablelimit(handle:Byte Ptr, limit:Int)
  277. Function bmx_b2linejointdef_getlimit:Int(handle:Byte Ptr)
  278. Function bmx_b2linejointdef_setlowertranslation(handle:Byte Ptr, Translation:Float)
  279. Function bmx_b2linejointdef_getlowertranslation:Float(handle:Byte Ptr)
  280. Function bmx_b2linejointdef_setuppertranslation(handle:Byte Ptr, Translation:Float)
  281. Function bmx_b2linejointdef_getuppertranslation:Float(handle:Byte Ptr)
  282. Function bmx_b2linejointdef_enablemotor(handle:Byte Ptr, enable:Int)
  283. Function bmx_b2linejointdef_ismotorenabled:Int(handle:Byte Ptr)
  284. Function bmx_b2linejointdef_setmaxmotorforce(handle:Byte Ptr, maxForce:Float)
  285. Function bmx_b2linejointdef_getmaxmotorforce:Float(handle:Byte Ptr)
  286. Function bmx_b2linejointdef_setmotorspeed(handle:Byte Ptr, speed:Float)
  287. Function bmx_b2linejointdef_getmotorspeed:Float(handle:Byte Ptr)
  288. Function bmx_b2linejointdef_delete(handle:Byte Ptr)
  289. Function bmx_b2linejoint_getreactiontorque:Float(handle:Byte Ptr, inv_dt:Float)
  290. Function bmx_b2linejoint_getjointtranslation:Float(handle:Byte Ptr)
  291. Function bmx_b2linejoint_getjointspeed:Float(handle:Byte Ptr)
  292. Function bmx_b2linejoint_islimitenabled:Int(handle:Byte Ptr)
  293. Function bmx_b2linejoint_enablelimit(handle:Byte Ptr, flag:Int)
  294. Function bmx_b2linejoint_getlowerlimit:Float(handle:Byte Ptr)
  295. Function bmx_b2linejoint_getupperlimit:Float(handle:Byte Ptr)
  296. Function bmx_b2linejoint_setlimits(handle:Byte Ptr, _lower:Float, _upper:Float)
  297. Function bmx_b2linejoint_ismotorenabled:Int(handle:Byte Ptr)
  298. Function bmx_b2linejoint_enablemotor(handle:Byte Ptr, flag:Int)
  299. Function bmx_b2linejoint_setmotorspeed(handle:Byte Ptr, speed:Float)
  300. Function bmx_b2linejoint_getmotorspeed:Float(handle:Byte Ptr)
  301. Function bmx_b2linejoint_setmaxmotorforce(handle:Byte Ptr, force:Float)
  302. Function bmx_b2linejoint_getmotorforce:Float(handle:Byte Ptr)
  303. Function bmx_b2edgechaindef_create:Byte Ptr()
  304. Function bmx_b2edgechaindef_getdef:Byte Ptr(handle:Byte Ptr)
  305. Function bmx_b2edgechaindef_isaloop:Int(handle:Byte Ptr)
  306. Function bmx_b2edgechaindef_setisaloop(handle:Byte Ptr, value:Int)
  307. Function bmx_b2edgechaindef_delete(handle:Byte Ptr)
  308. Function bmx_b2edgeshape_getlength:Float(handle:Byte Ptr)
  309. Function bmx_b2edgeshape_corner1isconvex:Int(handle:Byte Ptr)
  310. Function bmx_b2edgeshape_corner2isconvex:Int(handle:Byte Ptr)
  311. Function bmx_b2edgeshape_getnextedge:Byte Ptr(handle:Byte Ptr)
  312. Function bmx_b2edgeshape_getprevedge:Byte Ptr(handle:Byte Ptr)
  313. Function bmx_b2buoyancycontrollerdef_create:Byte Ptr()
  314. Function bmx_b2buoyancycontrollerdef_getoffset:Float(handle:Byte Ptr)
  315. Function bmx_b2buoyancycontrollerdef_setoffset(handle:Byte Ptr, offset:Float)
  316. Function bmx_b2buoyancycontrollerdef_getdensity:Float(handle:Byte Ptr)
  317. Function bmx_b2buoyancycontrollerdef_setdensity(handle:Byte Ptr, density:Float)
  318. Function bmx_b2buoyancycontrollerdef_getlineardrag:Float(handle:Byte Ptr)
  319. Function bmx_b2buoyancycontrollerdef_setlineardrag(handle:Byte Ptr, drag:Float)
  320. Function bmx_b2buoyancycontrollerdef_getangulardrag:Float(handle:Byte Ptr)
  321. Function bmx_b2buoyancycontrollerdef_setangulardrag(handle:Byte Ptr, drag:Float)
  322. Function bmx_b2buoyancycontrollerdef_usesdensity:Int(handle:Byte Ptr)
  323. Function bmx_b2buoyancycontrollerdef_setusesdensity(handle:Byte Ptr, value:Int)
  324. Function bmx_b2buoyancycontrollerdef_usesworldgravity:Int(handle:Byte Ptr)
  325. Function bmx_b2buoyancycontrollerdef_setusesworldgravity(handle:Byte Ptr, value:Int)
  326. Function bmx_b2buoyancycontrollerdef_delete(handle:Byte Ptr)
  327. Function bmx_b2buoyancycontroller_getoffset:Float(handle:Byte Ptr)
  328. Function bmx_b2buoyancycontroller_setoffset(handle:Byte Ptr, offset:Float)
  329. Function bmx_b2buoyancycontroller_getdensity:Float(handle:Byte Ptr)
  330. Function bmx_b2buoyancycontroller_setdensity(handle:Byte Ptr, density:Float)
  331. Function bmx_b2buoyancycontroller_getlineardrag:Float(handle:Byte Ptr)
  332. Function bmx_b2buoyancycontroller_setlineardrag(handle:Byte Ptr, drag:Float)
  333. Function bmx_b2buoyancycontroller_getangulardrag:Float(handle:Byte Ptr)
  334. Function bmx_b2buoyancycontroller_setangulardrag(handle:Byte Ptr, drag:Float)
  335. Function bmx_b2buoyancycontroller_usesdensity:Int(handle:Byte Ptr)
  336. Function bmx_b2buoyancycontroller_setusesdensity(handle:Byte Ptr, value:Int)
  337. Function bmx_b2buoyancycontroller_usesworldgravity:Int(handle:Byte Ptr)
  338. Function bmx_b2buoyancycontroller_setusesworldgravity(handle:Byte Ptr, value:Int)
  339. Function bmx_b2tensordampingcontrollerdef_create:Byte Ptr()
  340. Function bmx_b2tensordampingcontrollerdef_delete(handle:Byte Ptr)
  341. Function bmx_b2tensordampingcontrollerdef_getmaxtimestep:Float(handle:Byte Ptr)
  342. Function bmx_b2tensordampingcontrollerdef_setmaxtimestep(handle:Byte Ptr, timestep:Float)
  343. Function bmx_b2tensordampingcontrollerdef_setaxisaligned(handle:Byte Ptr, xDamping:Float, yDamping:Float)
  344. Function bmx_b2tensordampingcontroller_getmaxtimestep:Float(handle:Byte Ptr)
  345. Function bmx_b2tensordampingcontroller_setmaxtimestep(handle:Byte Ptr, timestep:Float)
  346. Function bmx_b2gravitycontrollerdef_create:Byte Ptr()
  347. Function bmx_b2gravitycontrollerdef_delete(handle:Byte Ptr)
  348. Function bmx_b2gravitycontrollerdef_getforce:Float(handle:Byte Ptr)
  349. Function bmx_b2gravitycontrollerdef_setforce(handle:Byte Ptr, force:Float)
  350. Function bmx_b2gravitycontrollerdef_isinvsqr:Int(handle:Byte Ptr)
  351. Function bmx_b2gravitycontrollerdef_setisinvsqr(handle:Byte Ptr, value:Int)
  352. Function bmx_b2gravitycontroller_getforce:Float(handle:Byte Ptr)
  353. Function bmx_b2gravitycontroller_setforce(handle:Byte Ptr, force:Float)
  354. Function bmx_b2gravitycontroller_isinvsqr:Int(handle:Byte Ptr)
  355. Function bmx_b2gravitycontroller_setisinvsqr(handle:Byte Ptr, value:Int)
  356. Function bmx_b2constantforcecontrollerdef_create:Byte Ptr()
  357. Function bmx_b2constantforcecontrollerdef_delete(handle:Byte Ptr)
  358. Function bmx_b2constantaccelcontrollerdef_create:Byte Ptr()
  359. Function bmx_b2constantaccelcontrollerdef_delete(handle:Byte Ptr)
  360. Function bmx_b2controlleredge_getcontroller:Byte Ptr(handle:Byte Ptr)
  361. Function bmx_b2controlleredge_getbody:Byte Ptr(handle:Byte Ptr)
  362. Function bmx_b2controlleredge_getprevbody:Byte Ptr(handle:Byte Ptr)
  363. Function bmx_b2controlleredge_getnextbody:Byte Ptr(handle:Byte Ptr)
  364. Function bmx_b2controlleredge_getprevcontroller:Byte Ptr(handle:Byte Ptr)
  365. Function bmx_b2controlleredge_getnextcontroller:Byte Ptr(handle:Byte Ptr)
  366. Function bmx_b2controller_getmaxcontroller:Object(handle:Byte Ptr)
  367. Function bmx_b2controller_addbody(handle:Byte Ptr, body:Byte Ptr)
  368. Function bmx_b2controller_removebody(handle:Byte Ptr, body:Byte Ptr)
  369. Function bmx_b2controller_clear(handle:Byte Ptr)
  370. Function bmx_b2controller_getnext:Byte Ptr(handle:Byte Ptr)
  371. Function bmx_b2controller_getworld:Byte Ptr(handle:Byte Ptr)
  372. Function bmx_b2controller_getbodylist:Byte Ptr(handle:Byte Ptr)
  373. End Extern
  374. Const e_unknownJoint:Int = 0
  375. Const e_revoluteJoint:Int = 1
  376. Const e_prismaticJoint:Int = 2
  377. Const e_distanceJoint:Int = 3
  378. Const e_pulleyJoint:Int = 4
  379. Const e_mouseJoint:Int = 5
  380. Const e_gearJoint:Int = 6
  381. Const e_lineJoint:Int = 7
  382. Const e_unknownShape:Int = -1
  383. Const e_circleShape:Int = 0
  384. Const e_polygonShape:Int = 1
  385. Const e_edgeShape:Int = 2
  386. Const e_buoyancyController:Int = 1
  387. Const e_constantAccelController:Int = 2
  388. Const e_tensorDampingController:Int = 3
  389. Const e_gravityController:Int = 4
  390. Const e_constantForceController:Int = 5