lua_PhysicsVehicleWheel.cpp 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624
  1. #include "Base.h"
  2. #include "ScriptController.h"
  3. #include "lua_PhysicsVehicleWheel.h"
  4. #include "Base.h"
  5. #include "Game.h"
  6. #include "Node.h"
  7. #include "PhysicsCollisionObject.h"
  8. #include "PhysicsController.h"
  9. #include "PhysicsVehicle.h"
  10. #include "PhysicsVehicleWheel.h"
  11. #include "ScriptController.h"
  12. #include "lua_PhysicsCollisionObjectCollisionListenerEventType.h"
  13. #include "lua_PhysicsCollisionObjectType.h"
  14. #include "lua_PhysicsCollisionShapeType.h"
  15. namespace gameplay
  16. {
  17. void luaRegister_PhysicsVehicleWheel()
  18. {
  19. const luaL_Reg lua_members[] =
  20. {
  21. {"addCollisionListener", lua_PhysicsVehicleWheel_addCollisionListener},
  22. {"collidesWith", lua_PhysicsVehicleWheel_collidesWith},
  23. {"getCollisionShape", lua_PhysicsVehicleWheel_getCollisionShape},
  24. {"getFrictionBreakout", lua_PhysicsVehicleWheel_getFrictionBreakout},
  25. {"getNode", lua_PhysicsVehicleWheel_getNode},
  26. {"getRollInfluence", lua_PhysicsVehicleWheel_getRollInfluence},
  27. {"getShapeType", lua_PhysicsVehicleWheel_getShapeType},
  28. {"getStrutConnectionOffset", lua_PhysicsVehicleWheel_getStrutConnectionOffset},
  29. {"getStrutDampingCompression", lua_PhysicsVehicleWheel_getStrutDampingCompression},
  30. {"getStrutDampingRelaxation", lua_PhysicsVehicleWheel_getStrutDampingRelaxation},
  31. {"getStrutForceMax", lua_PhysicsVehicleWheel_getStrutForceMax},
  32. {"getStrutRestLength", lua_PhysicsVehicleWheel_getStrutRestLength},
  33. {"getStrutStiffness", lua_PhysicsVehicleWheel_getStrutStiffness},
  34. {"getStrutTravelMax", lua_PhysicsVehicleWheel_getStrutTravelMax},
  35. {"getType", lua_PhysicsVehicleWheel_getType},
  36. {"getWheelAxle", lua_PhysicsVehicleWheel_getWheelAxle},
  37. {"getWheelDirection", lua_PhysicsVehicleWheel_getWheelDirection},
  38. {"getWheelRadius", lua_PhysicsVehicleWheel_getWheelRadius},
  39. {"isDynamic", lua_PhysicsVehicleWheel_isDynamic},
  40. {"isEnabled", lua_PhysicsVehicleWheel_isEnabled},
  41. {"isKinematic", lua_PhysicsVehicleWheel_isKinematic},
  42. {"isSteerable", lua_PhysicsVehicleWheel_isSteerable},
  43. {"removeCollisionListener", lua_PhysicsVehicleWheel_removeCollisionListener},
  44. {"setEnabled", lua_PhysicsVehicleWheel_setEnabled},
  45. {"setFrictionBreakout", lua_PhysicsVehicleWheel_setFrictionBreakout},
  46. {"setRollInfluence", lua_PhysicsVehicleWheel_setRollInfluence},
  47. {"setSteerable", lua_PhysicsVehicleWheel_setSteerable},
  48. {"setStrutConnectionOffset", lua_PhysicsVehicleWheel_setStrutConnectionOffset},
  49. {"setStrutDampingCompression", lua_PhysicsVehicleWheel_setStrutDampingCompression},
  50. {"setStrutDampingRelaxation", lua_PhysicsVehicleWheel_setStrutDampingRelaxation},
  51. {"setStrutForceMax", lua_PhysicsVehicleWheel_setStrutForceMax},
  52. {"setStrutRestLength", lua_PhysicsVehicleWheel_setStrutRestLength},
  53. {"setStrutStiffness", lua_PhysicsVehicleWheel_setStrutStiffness},
  54. {"setStrutTravelMax", lua_PhysicsVehicleWheel_setStrutTravelMax},
  55. {"setWheelAxle", lua_PhysicsVehicleWheel_setWheelAxle},
  56. {"setWheelDirection", lua_PhysicsVehicleWheel_setWheelDirection},
  57. {"setWheelRadius", lua_PhysicsVehicleWheel_setWheelRadius},
  58. {"transform", lua_PhysicsVehicleWheel_transform},
  59. {NULL, NULL}
  60. };
  61. const luaL_Reg* lua_statics = NULL;
  62. std::vector<std::string> scopePath;
  63. ScriptUtil::registerClass("PhysicsVehicleWheel", lua_members, NULL, NULL, lua_statics, scopePath);
  64. }
  65. static PhysicsVehicleWheel* getInstance(lua_State* state)
  66. {
  67. void* userdata = luaL_checkudata(state, 1, "PhysicsVehicleWheel");
  68. luaL_argcheck(state, userdata != NULL, 1, "'PhysicsVehicleWheel' expected.");
  69. return (PhysicsVehicleWheel*)((ScriptUtil::LuaObject*)userdata)->instance;
  70. }
  71. int lua_PhysicsVehicleWheel_addCollisionListener(lua_State* state)
  72. {
  73. // Get the number of parameters.
  74. int paramCount = lua_gettop(state);
  75. // Attempt to match the parameters to a valid binding.
  76. switch (paramCount)
  77. {
  78. case 2:
  79. {
  80. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  81. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  82. {
  83. // Get parameter 1 off the stack.
  84. ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
  85. PhysicsVehicleWheel* instance = getInstance(state);
  86. instance->addCollisionListener(param1);
  87. return 0;
  88. }
  89. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  90. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  91. {
  92. // Get parameter 1 off the stack.
  93. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  94. PhysicsVehicleWheel* instance = getInstance(state);
  95. instance->addCollisionListener(param1);
  96. return 0;
  97. }
  98. else
  99. {
  100. lua_pushstring(state, "lua_PhysicsVehicleWheel_addCollisionListener - Failed to match the given parameters to a valid function signature.");
  101. lua_error(state);
  102. }
  103. break;
  104. }
  105. case 3:
  106. {
  107. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  108. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  109. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  110. {
  111. // Get parameter 1 off the stack.
  112. ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
  113. // Get parameter 2 off the stack.
  114. ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
  115. PhysicsVehicleWheel* instance = getInstance(state);
  116. instance->addCollisionListener(param1, param2);
  117. return 0;
  118. }
  119. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  120. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  121. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  122. {
  123. // Get parameter 1 off the stack.
  124. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  125. // Get parameter 2 off the stack.
  126. ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
  127. PhysicsVehicleWheel* instance = getInstance(state);
  128. instance->addCollisionListener(param1, param2);
  129. return 0;
  130. }
  131. else
  132. {
  133. lua_pushstring(state, "lua_PhysicsVehicleWheel_addCollisionListener - Failed to match the given parameters to a valid function signature.");
  134. lua_error(state);
  135. }
  136. break;
  137. }
  138. default:
  139. {
  140. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  141. lua_error(state);
  142. break;
  143. }
  144. }
  145. return 0;
  146. }
  147. int lua_PhysicsVehicleWheel_collidesWith(lua_State* state)
  148. {
  149. // Get the number of parameters.
  150. int paramCount = lua_gettop(state);
  151. // Attempt to match the parameters to a valid binding.
  152. switch (paramCount)
  153. {
  154. case 2:
  155. {
  156. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  157. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  158. {
  159. // Get parameter 1 off the stack.
  160. ScriptUtil::LuaArray<PhysicsCollisionObject> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(2, "PhysicsCollisionObject", false);
  161. PhysicsVehicleWheel* instance = getInstance(state);
  162. bool result = instance->collidesWith(param1);
  163. // Push the return value onto the stack.
  164. lua_pushboolean(state, result);
  165. return 1;
  166. }
  167. else
  168. {
  169. lua_pushstring(state, "lua_PhysicsVehicleWheel_collidesWith - Failed to match the given parameters to a valid function signature.");
  170. lua_error(state);
  171. }
  172. break;
  173. }
  174. default:
  175. {
  176. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  177. lua_error(state);
  178. break;
  179. }
  180. }
  181. return 0;
  182. }
  183. int lua_PhysicsVehicleWheel_getCollisionShape(lua_State* state)
  184. {
  185. // Get the number of parameters.
  186. int paramCount = lua_gettop(state);
  187. // Attempt to match the parameters to a valid binding.
  188. switch (paramCount)
  189. {
  190. case 1:
  191. {
  192. if ((lua_type(state, 1) == LUA_TUSERDATA))
  193. {
  194. PhysicsVehicleWheel* instance = getInstance(state);
  195. void* returnPtr = (void*)instance->getCollisionShape();
  196. if (returnPtr)
  197. {
  198. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  199. object->instance = returnPtr;
  200. object->owns = false;
  201. luaL_getmetatable(state, "PhysicsCollisionShape");
  202. lua_setmetatable(state, -2);
  203. }
  204. else
  205. {
  206. lua_pushnil(state);
  207. }
  208. return 1;
  209. }
  210. else
  211. {
  212. lua_pushstring(state, "lua_PhysicsVehicleWheel_getCollisionShape - Failed to match the given parameters to a valid function signature.");
  213. lua_error(state);
  214. }
  215. break;
  216. }
  217. default:
  218. {
  219. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  220. lua_error(state);
  221. break;
  222. }
  223. }
  224. return 0;
  225. }
  226. int lua_PhysicsVehicleWheel_getFrictionBreakout(lua_State* state)
  227. {
  228. // Get the number of parameters.
  229. int paramCount = lua_gettop(state);
  230. // Attempt to match the parameters to a valid binding.
  231. switch (paramCount)
  232. {
  233. case 1:
  234. {
  235. if ((lua_type(state, 1) == LUA_TUSERDATA))
  236. {
  237. PhysicsVehicleWheel* instance = getInstance(state);
  238. float result = instance->getFrictionBreakout();
  239. // Push the return value onto the stack.
  240. lua_pushnumber(state, result);
  241. return 1;
  242. }
  243. else
  244. {
  245. lua_pushstring(state, "lua_PhysicsVehicleWheel_getFrictionBreakout - Failed to match the given parameters to a valid function signature.");
  246. lua_error(state);
  247. }
  248. break;
  249. }
  250. default:
  251. {
  252. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  253. lua_error(state);
  254. break;
  255. }
  256. }
  257. return 0;
  258. }
  259. int lua_PhysicsVehicleWheel_getNode(lua_State* state)
  260. {
  261. // Get the number of parameters.
  262. int paramCount = lua_gettop(state);
  263. // Attempt to match the parameters to a valid binding.
  264. switch (paramCount)
  265. {
  266. case 1:
  267. {
  268. if ((lua_type(state, 1) == LUA_TUSERDATA))
  269. {
  270. PhysicsVehicleWheel* instance = getInstance(state);
  271. void* returnPtr = (void*)instance->getNode();
  272. if (returnPtr)
  273. {
  274. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  275. object->instance = returnPtr;
  276. object->owns = false;
  277. luaL_getmetatable(state, "Node");
  278. lua_setmetatable(state, -2);
  279. }
  280. else
  281. {
  282. lua_pushnil(state);
  283. }
  284. return 1;
  285. }
  286. else
  287. {
  288. lua_pushstring(state, "lua_PhysicsVehicleWheel_getNode - Failed to match the given parameters to a valid function signature.");
  289. lua_error(state);
  290. }
  291. break;
  292. }
  293. default:
  294. {
  295. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  296. lua_error(state);
  297. break;
  298. }
  299. }
  300. return 0;
  301. }
  302. int lua_PhysicsVehicleWheel_getRollInfluence(lua_State* state)
  303. {
  304. // Get the number of parameters.
  305. int paramCount = lua_gettop(state);
  306. // Attempt to match the parameters to a valid binding.
  307. switch (paramCount)
  308. {
  309. case 1:
  310. {
  311. if ((lua_type(state, 1) == LUA_TUSERDATA))
  312. {
  313. PhysicsVehicleWheel* instance = getInstance(state);
  314. float result = instance->getRollInfluence();
  315. // Push the return value onto the stack.
  316. lua_pushnumber(state, result);
  317. return 1;
  318. }
  319. else
  320. {
  321. lua_pushstring(state, "lua_PhysicsVehicleWheel_getRollInfluence - Failed to match the given parameters to a valid function signature.");
  322. lua_error(state);
  323. }
  324. break;
  325. }
  326. default:
  327. {
  328. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  329. lua_error(state);
  330. break;
  331. }
  332. }
  333. return 0;
  334. }
  335. int lua_PhysicsVehicleWheel_getShapeType(lua_State* state)
  336. {
  337. // Get the number of parameters.
  338. int paramCount = lua_gettop(state);
  339. // Attempt to match the parameters to a valid binding.
  340. switch (paramCount)
  341. {
  342. case 1:
  343. {
  344. if ((lua_type(state, 1) == LUA_TUSERDATA))
  345. {
  346. PhysicsVehicleWheel* instance = getInstance(state);
  347. PhysicsCollisionShape::Type result = instance->getShapeType();
  348. // Push the return value onto the stack.
  349. lua_pushstring(state, lua_stringFromEnum_PhysicsCollisionShapeType(result));
  350. return 1;
  351. }
  352. else
  353. {
  354. lua_pushstring(state, "lua_PhysicsVehicleWheel_getShapeType - Failed to match the given parameters to a valid function signature.");
  355. lua_error(state);
  356. }
  357. break;
  358. }
  359. default:
  360. {
  361. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  362. lua_error(state);
  363. break;
  364. }
  365. }
  366. return 0;
  367. }
  368. int lua_PhysicsVehicleWheel_getStrutConnectionOffset(lua_State* state)
  369. {
  370. // Get the number of parameters.
  371. int paramCount = lua_gettop(state);
  372. // Attempt to match the parameters to a valid binding.
  373. switch (paramCount)
  374. {
  375. case 2:
  376. {
  377. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  378. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  379. {
  380. // Get parameter 1 off the stack.
  381. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  382. PhysicsVehicleWheel* instance = getInstance(state);
  383. instance->getStrutConnectionOffset(param1);
  384. return 0;
  385. }
  386. else
  387. {
  388. lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutConnectionOffset - Failed to match the given parameters to a valid function signature.");
  389. lua_error(state);
  390. }
  391. break;
  392. }
  393. default:
  394. {
  395. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  396. lua_error(state);
  397. break;
  398. }
  399. }
  400. return 0;
  401. }
  402. int lua_PhysicsVehicleWheel_getStrutDampingCompression(lua_State* state)
  403. {
  404. // Get the number of parameters.
  405. int paramCount = lua_gettop(state);
  406. // Attempt to match the parameters to a valid binding.
  407. switch (paramCount)
  408. {
  409. case 1:
  410. {
  411. if ((lua_type(state, 1) == LUA_TUSERDATA))
  412. {
  413. PhysicsVehicleWheel* instance = getInstance(state);
  414. float result = instance->getStrutDampingCompression();
  415. // Push the return value onto the stack.
  416. lua_pushnumber(state, result);
  417. return 1;
  418. }
  419. else
  420. {
  421. lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutDampingCompression - Failed to match the given parameters to a valid function signature.");
  422. lua_error(state);
  423. }
  424. break;
  425. }
  426. default:
  427. {
  428. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  429. lua_error(state);
  430. break;
  431. }
  432. }
  433. return 0;
  434. }
  435. int lua_PhysicsVehicleWheel_getStrutDampingRelaxation(lua_State* state)
  436. {
  437. // Get the number of parameters.
  438. int paramCount = lua_gettop(state);
  439. // Attempt to match the parameters to a valid binding.
  440. switch (paramCount)
  441. {
  442. case 1:
  443. {
  444. if ((lua_type(state, 1) == LUA_TUSERDATA))
  445. {
  446. PhysicsVehicleWheel* instance = getInstance(state);
  447. float result = instance->getStrutDampingRelaxation();
  448. // Push the return value onto the stack.
  449. lua_pushnumber(state, result);
  450. return 1;
  451. }
  452. else
  453. {
  454. lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutDampingRelaxation - Failed to match the given parameters to a valid function signature.");
  455. lua_error(state);
  456. }
  457. break;
  458. }
  459. default:
  460. {
  461. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  462. lua_error(state);
  463. break;
  464. }
  465. }
  466. return 0;
  467. }
  468. int lua_PhysicsVehicleWheel_getStrutForceMax(lua_State* state)
  469. {
  470. // Get the number of parameters.
  471. int paramCount = lua_gettop(state);
  472. // Attempt to match the parameters to a valid binding.
  473. switch (paramCount)
  474. {
  475. case 1:
  476. {
  477. if ((lua_type(state, 1) == LUA_TUSERDATA))
  478. {
  479. PhysicsVehicleWheel* instance = getInstance(state);
  480. float result = instance->getStrutForceMax();
  481. // Push the return value onto the stack.
  482. lua_pushnumber(state, result);
  483. return 1;
  484. }
  485. else
  486. {
  487. lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutForceMax - Failed to match the given parameters to a valid function signature.");
  488. lua_error(state);
  489. }
  490. break;
  491. }
  492. default:
  493. {
  494. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  495. lua_error(state);
  496. break;
  497. }
  498. }
  499. return 0;
  500. }
  501. int lua_PhysicsVehicleWheel_getStrutRestLength(lua_State* state)
  502. {
  503. // Get the number of parameters.
  504. int paramCount = lua_gettop(state);
  505. // Attempt to match the parameters to a valid binding.
  506. switch (paramCount)
  507. {
  508. case 1:
  509. {
  510. if ((lua_type(state, 1) == LUA_TUSERDATA))
  511. {
  512. PhysicsVehicleWheel* instance = getInstance(state);
  513. float result = instance->getStrutRestLength();
  514. // Push the return value onto the stack.
  515. lua_pushnumber(state, result);
  516. return 1;
  517. }
  518. else
  519. {
  520. lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutRestLength - Failed to match the given parameters to a valid function signature.");
  521. lua_error(state);
  522. }
  523. break;
  524. }
  525. default:
  526. {
  527. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  528. lua_error(state);
  529. break;
  530. }
  531. }
  532. return 0;
  533. }
  534. int lua_PhysicsVehicleWheel_getStrutStiffness(lua_State* state)
  535. {
  536. // Get the number of parameters.
  537. int paramCount = lua_gettop(state);
  538. // Attempt to match the parameters to a valid binding.
  539. switch (paramCount)
  540. {
  541. case 1:
  542. {
  543. if ((lua_type(state, 1) == LUA_TUSERDATA))
  544. {
  545. PhysicsVehicleWheel* instance = getInstance(state);
  546. float result = instance->getStrutStiffness();
  547. // Push the return value onto the stack.
  548. lua_pushnumber(state, result);
  549. return 1;
  550. }
  551. else
  552. {
  553. lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutStiffness - Failed to match the given parameters to a valid function signature.");
  554. lua_error(state);
  555. }
  556. break;
  557. }
  558. default:
  559. {
  560. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  561. lua_error(state);
  562. break;
  563. }
  564. }
  565. return 0;
  566. }
  567. int lua_PhysicsVehicleWheel_getStrutTravelMax(lua_State* state)
  568. {
  569. // Get the number of parameters.
  570. int paramCount = lua_gettop(state);
  571. // Attempt to match the parameters to a valid binding.
  572. switch (paramCount)
  573. {
  574. case 1:
  575. {
  576. if ((lua_type(state, 1) == LUA_TUSERDATA))
  577. {
  578. PhysicsVehicleWheel* instance = getInstance(state);
  579. float result = instance->getStrutTravelMax();
  580. // Push the return value onto the stack.
  581. lua_pushnumber(state, result);
  582. return 1;
  583. }
  584. else
  585. {
  586. lua_pushstring(state, "lua_PhysicsVehicleWheel_getStrutTravelMax - Failed to match the given parameters to a valid function signature.");
  587. lua_error(state);
  588. }
  589. break;
  590. }
  591. default:
  592. {
  593. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  594. lua_error(state);
  595. break;
  596. }
  597. }
  598. return 0;
  599. }
  600. int lua_PhysicsVehicleWheel_getType(lua_State* state)
  601. {
  602. // Get the number of parameters.
  603. int paramCount = lua_gettop(state);
  604. // Attempt to match the parameters to a valid binding.
  605. switch (paramCount)
  606. {
  607. case 1:
  608. {
  609. if ((lua_type(state, 1) == LUA_TUSERDATA))
  610. {
  611. PhysicsVehicleWheel* instance = getInstance(state);
  612. PhysicsCollisionObject::Type result = instance->getType();
  613. // Push the return value onto the stack.
  614. lua_pushstring(state, lua_stringFromEnum_PhysicsCollisionObjectType(result));
  615. return 1;
  616. }
  617. else
  618. {
  619. lua_pushstring(state, "lua_PhysicsVehicleWheel_getType - Failed to match the given parameters to a valid function signature.");
  620. lua_error(state);
  621. }
  622. break;
  623. }
  624. default:
  625. {
  626. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  627. lua_error(state);
  628. break;
  629. }
  630. }
  631. return 0;
  632. }
  633. int lua_PhysicsVehicleWheel_getWheelAxle(lua_State* state)
  634. {
  635. // Get the number of parameters.
  636. int paramCount = lua_gettop(state);
  637. // Attempt to match the parameters to a valid binding.
  638. switch (paramCount)
  639. {
  640. case 2:
  641. {
  642. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  643. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  644. {
  645. // Get parameter 1 off the stack.
  646. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  647. PhysicsVehicleWheel* instance = getInstance(state);
  648. instance->getWheelAxle(param1);
  649. return 0;
  650. }
  651. else
  652. {
  653. lua_pushstring(state, "lua_PhysicsVehicleWheel_getWheelAxle - Failed to match the given parameters to a valid function signature.");
  654. lua_error(state);
  655. }
  656. break;
  657. }
  658. default:
  659. {
  660. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  661. lua_error(state);
  662. break;
  663. }
  664. }
  665. return 0;
  666. }
  667. int lua_PhysicsVehicleWheel_getWheelDirection(lua_State* state)
  668. {
  669. // Get the number of parameters.
  670. int paramCount = lua_gettop(state);
  671. // Attempt to match the parameters to a valid binding.
  672. switch (paramCount)
  673. {
  674. case 2:
  675. {
  676. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  677. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  678. {
  679. // Get parameter 1 off the stack.
  680. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  681. PhysicsVehicleWheel* instance = getInstance(state);
  682. instance->getWheelDirection(param1);
  683. return 0;
  684. }
  685. else
  686. {
  687. lua_pushstring(state, "lua_PhysicsVehicleWheel_getWheelDirection - Failed to match the given parameters to a valid function signature.");
  688. lua_error(state);
  689. }
  690. break;
  691. }
  692. default:
  693. {
  694. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  695. lua_error(state);
  696. break;
  697. }
  698. }
  699. return 0;
  700. }
  701. int lua_PhysicsVehicleWheel_getWheelRadius(lua_State* state)
  702. {
  703. // Get the number of parameters.
  704. int paramCount = lua_gettop(state);
  705. // Attempt to match the parameters to a valid binding.
  706. switch (paramCount)
  707. {
  708. case 1:
  709. {
  710. if ((lua_type(state, 1) == LUA_TUSERDATA))
  711. {
  712. PhysicsVehicleWheel* instance = getInstance(state);
  713. float result = instance->getWheelRadius();
  714. // Push the return value onto the stack.
  715. lua_pushnumber(state, result);
  716. return 1;
  717. }
  718. else
  719. {
  720. lua_pushstring(state, "lua_PhysicsVehicleWheel_getWheelRadius - Failed to match the given parameters to a valid function signature.");
  721. lua_error(state);
  722. }
  723. break;
  724. }
  725. default:
  726. {
  727. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  728. lua_error(state);
  729. break;
  730. }
  731. }
  732. return 0;
  733. }
  734. int lua_PhysicsVehicleWheel_isDynamic(lua_State* state)
  735. {
  736. // Get the number of parameters.
  737. int paramCount = lua_gettop(state);
  738. // Attempt to match the parameters to a valid binding.
  739. switch (paramCount)
  740. {
  741. case 1:
  742. {
  743. if ((lua_type(state, 1) == LUA_TUSERDATA))
  744. {
  745. PhysicsVehicleWheel* instance = getInstance(state);
  746. bool result = instance->isDynamic();
  747. // Push the return value onto the stack.
  748. lua_pushboolean(state, result);
  749. return 1;
  750. }
  751. else
  752. {
  753. lua_pushstring(state, "lua_PhysicsVehicleWheel_isDynamic - Failed to match the given parameters to a valid function signature.");
  754. lua_error(state);
  755. }
  756. break;
  757. }
  758. default:
  759. {
  760. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  761. lua_error(state);
  762. break;
  763. }
  764. }
  765. return 0;
  766. }
  767. int lua_PhysicsVehicleWheel_isEnabled(lua_State* state)
  768. {
  769. // Get the number of parameters.
  770. int paramCount = lua_gettop(state);
  771. // Attempt to match the parameters to a valid binding.
  772. switch (paramCount)
  773. {
  774. case 1:
  775. {
  776. if ((lua_type(state, 1) == LUA_TUSERDATA))
  777. {
  778. PhysicsVehicleWheel* instance = getInstance(state);
  779. bool result = instance->isEnabled();
  780. // Push the return value onto the stack.
  781. lua_pushboolean(state, result);
  782. return 1;
  783. }
  784. else
  785. {
  786. lua_pushstring(state, "lua_PhysicsVehicleWheel_isEnabled - Failed to match the given parameters to a valid function signature.");
  787. lua_error(state);
  788. }
  789. break;
  790. }
  791. default:
  792. {
  793. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  794. lua_error(state);
  795. break;
  796. }
  797. }
  798. return 0;
  799. }
  800. int lua_PhysicsVehicleWheel_isKinematic(lua_State* state)
  801. {
  802. // Get the number of parameters.
  803. int paramCount = lua_gettop(state);
  804. // Attempt to match the parameters to a valid binding.
  805. switch (paramCount)
  806. {
  807. case 1:
  808. {
  809. if ((lua_type(state, 1) == LUA_TUSERDATA))
  810. {
  811. PhysicsVehicleWheel* instance = getInstance(state);
  812. bool result = instance->isKinematic();
  813. // Push the return value onto the stack.
  814. lua_pushboolean(state, result);
  815. return 1;
  816. }
  817. else
  818. {
  819. lua_pushstring(state, "lua_PhysicsVehicleWheel_isKinematic - Failed to match the given parameters to a valid function signature.");
  820. lua_error(state);
  821. }
  822. break;
  823. }
  824. default:
  825. {
  826. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  827. lua_error(state);
  828. break;
  829. }
  830. }
  831. return 0;
  832. }
  833. int lua_PhysicsVehicleWheel_isSteerable(lua_State* state)
  834. {
  835. // Get the number of parameters.
  836. int paramCount = lua_gettop(state);
  837. // Attempt to match the parameters to a valid binding.
  838. switch (paramCount)
  839. {
  840. case 1:
  841. {
  842. if ((lua_type(state, 1) == LUA_TUSERDATA))
  843. {
  844. PhysicsVehicleWheel* instance = getInstance(state);
  845. bool result = instance->isSteerable();
  846. // Push the return value onto the stack.
  847. lua_pushboolean(state, result);
  848. return 1;
  849. }
  850. else
  851. {
  852. lua_pushstring(state, "lua_PhysicsVehicleWheel_isSteerable - Failed to match the given parameters to a valid function signature.");
  853. lua_error(state);
  854. }
  855. break;
  856. }
  857. default:
  858. {
  859. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  860. lua_error(state);
  861. break;
  862. }
  863. }
  864. return 0;
  865. }
  866. int lua_PhysicsVehicleWheel_removeCollisionListener(lua_State* state)
  867. {
  868. // Get the number of parameters.
  869. int paramCount = lua_gettop(state);
  870. // Attempt to match the parameters to a valid binding.
  871. switch (paramCount)
  872. {
  873. case 2:
  874. {
  875. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  876. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  877. {
  878. // Get parameter 1 off the stack.
  879. ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
  880. PhysicsVehicleWheel* instance = getInstance(state);
  881. instance->removeCollisionListener(param1);
  882. return 0;
  883. }
  884. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  885. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  886. {
  887. // Get parameter 1 off the stack.
  888. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  889. PhysicsVehicleWheel* instance = getInstance(state);
  890. instance->removeCollisionListener(param1);
  891. return 0;
  892. }
  893. else
  894. {
  895. lua_pushstring(state, "lua_PhysicsVehicleWheel_removeCollisionListener - Failed to match the given parameters to a valid function signature.");
  896. lua_error(state);
  897. }
  898. break;
  899. }
  900. case 3:
  901. {
  902. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  903. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  904. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  905. {
  906. // Get parameter 1 off the stack.
  907. ScriptUtil::LuaArray<PhysicsCollisionObject::CollisionListener> param1 = ScriptUtil::getObjectPointer<PhysicsCollisionObject::CollisionListener>(2, "PhysicsCollisionObjectCollisionListener", false);
  908. // Get parameter 2 off the stack.
  909. ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
  910. PhysicsVehicleWheel* instance = getInstance(state);
  911. instance->removeCollisionListener(param1, param2);
  912. return 0;
  913. }
  914. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  915. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  916. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  917. {
  918. // Get parameter 1 off the stack.
  919. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  920. // Get parameter 2 off the stack.
  921. ScriptUtil::LuaArray<PhysicsCollisionObject> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionObject>(3, "PhysicsCollisionObject", false);
  922. PhysicsVehicleWheel* instance = getInstance(state);
  923. instance->removeCollisionListener(param1, param2);
  924. return 0;
  925. }
  926. else
  927. {
  928. lua_pushstring(state, "lua_PhysicsVehicleWheel_removeCollisionListener - Failed to match the given parameters to a valid function signature.");
  929. lua_error(state);
  930. }
  931. break;
  932. }
  933. default:
  934. {
  935. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  936. lua_error(state);
  937. break;
  938. }
  939. }
  940. return 0;
  941. }
  942. int lua_PhysicsVehicleWheel_setEnabled(lua_State* state)
  943. {
  944. // Get the number of parameters.
  945. int paramCount = lua_gettop(state);
  946. // Attempt to match the parameters to a valid binding.
  947. switch (paramCount)
  948. {
  949. case 2:
  950. {
  951. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  952. lua_type(state, 2) == LUA_TBOOLEAN)
  953. {
  954. // Get parameter 1 off the stack.
  955. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  956. PhysicsVehicleWheel* instance = getInstance(state);
  957. instance->setEnabled(param1);
  958. return 0;
  959. }
  960. else
  961. {
  962. lua_pushstring(state, "lua_PhysicsVehicleWheel_setEnabled - Failed to match the given parameters to a valid function signature.");
  963. lua_error(state);
  964. }
  965. break;
  966. }
  967. default:
  968. {
  969. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  970. lua_error(state);
  971. break;
  972. }
  973. }
  974. return 0;
  975. }
  976. int lua_PhysicsVehicleWheel_setFrictionBreakout(lua_State* state)
  977. {
  978. // Get the number of parameters.
  979. int paramCount = lua_gettop(state);
  980. // Attempt to match the parameters to a valid binding.
  981. switch (paramCount)
  982. {
  983. case 2:
  984. {
  985. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  986. lua_type(state, 2) == LUA_TNUMBER)
  987. {
  988. // Get parameter 1 off the stack.
  989. float param1 = (float)luaL_checknumber(state, 2);
  990. PhysicsVehicleWheel* instance = getInstance(state);
  991. instance->setFrictionBreakout(param1);
  992. return 0;
  993. }
  994. else
  995. {
  996. lua_pushstring(state, "lua_PhysicsVehicleWheel_setFrictionBreakout - Failed to match the given parameters to a valid function signature.");
  997. lua_error(state);
  998. }
  999. break;
  1000. }
  1001. default:
  1002. {
  1003. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1004. lua_error(state);
  1005. break;
  1006. }
  1007. }
  1008. return 0;
  1009. }
  1010. int lua_PhysicsVehicleWheel_setRollInfluence(lua_State* state)
  1011. {
  1012. // Get the number of parameters.
  1013. int paramCount = lua_gettop(state);
  1014. // Attempt to match the parameters to a valid binding.
  1015. switch (paramCount)
  1016. {
  1017. case 2:
  1018. {
  1019. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1020. lua_type(state, 2) == LUA_TNUMBER)
  1021. {
  1022. // Get parameter 1 off the stack.
  1023. float param1 = (float)luaL_checknumber(state, 2);
  1024. PhysicsVehicleWheel* instance = getInstance(state);
  1025. instance->setRollInfluence(param1);
  1026. return 0;
  1027. }
  1028. else
  1029. {
  1030. lua_pushstring(state, "lua_PhysicsVehicleWheel_setRollInfluence - Failed to match the given parameters to a valid function signature.");
  1031. lua_error(state);
  1032. }
  1033. break;
  1034. }
  1035. default:
  1036. {
  1037. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1038. lua_error(state);
  1039. break;
  1040. }
  1041. }
  1042. return 0;
  1043. }
  1044. int lua_PhysicsVehicleWheel_setSteerable(lua_State* state)
  1045. {
  1046. // Get the number of parameters.
  1047. int paramCount = lua_gettop(state);
  1048. // Attempt to match the parameters to a valid binding.
  1049. switch (paramCount)
  1050. {
  1051. case 2:
  1052. {
  1053. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1054. lua_type(state, 2) == LUA_TBOOLEAN)
  1055. {
  1056. // Get parameter 1 off the stack.
  1057. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  1058. PhysicsVehicleWheel* instance = getInstance(state);
  1059. instance->setSteerable(param1);
  1060. return 0;
  1061. }
  1062. else
  1063. {
  1064. lua_pushstring(state, "lua_PhysicsVehicleWheel_setSteerable - Failed to match the given parameters to a valid function signature.");
  1065. lua_error(state);
  1066. }
  1067. break;
  1068. }
  1069. default:
  1070. {
  1071. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1072. lua_error(state);
  1073. break;
  1074. }
  1075. }
  1076. return 0;
  1077. }
  1078. int lua_PhysicsVehicleWheel_setStrutConnectionOffset(lua_State* state)
  1079. {
  1080. // Get the number of parameters.
  1081. int paramCount = lua_gettop(state);
  1082. // Attempt to match the parameters to a valid binding.
  1083. switch (paramCount)
  1084. {
  1085. case 2:
  1086. {
  1087. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1088. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  1089. {
  1090. // Get parameter 1 off the stack.
  1091. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  1092. PhysicsVehicleWheel* instance = getInstance(state);
  1093. instance->setStrutConnectionOffset(*param1);
  1094. return 0;
  1095. }
  1096. else
  1097. {
  1098. lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutConnectionOffset - Failed to match the given parameters to a valid function signature.");
  1099. lua_error(state);
  1100. }
  1101. break;
  1102. }
  1103. default:
  1104. {
  1105. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1106. lua_error(state);
  1107. break;
  1108. }
  1109. }
  1110. return 0;
  1111. }
  1112. int lua_PhysicsVehicleWheel_setStrutDampingCompression(lua_State* state)
  1113. {
  1114. // Get the number of parameters.
  1115. int paramCount = lua_gettop(state);
  1116. // Attempt to match the parameters to a valid binding.
  1117. switch (paramCount)
  1118. {
  1119. case 2:
  1120. {
  1121. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1122. lua_type(state, 2) == LUA_TNUMBER)
  1123. {
  1124. // Get parameter 1 off the stack.
  1125. float param1 = (float)luaL_checknumber(state, 2);
  1126. PhysicsVehicleWheel* instance = getInstance(state);
  1127. instance->setStrutDampingCompression(param1);
  1128. return 0;
  1129. }
  1130. else
  1131. {
  1132. lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutDampingCompression - Failed to match the given parameters to a valid function signature.");
  1133. lua_error(state);
  1134. }
  1135. break;
  1136. }
  1137. default:
  1138. {
  1139. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1140. lua_error(state);
  1141. break;
  1142. }
  1143. }
  1144. return 0;
  1145. }
  1146. int lua_PhysicsVehicleWheel_setStrutDampingRelaxation(lua_State* state)
  1147. {
  1148. // Get the number of parameters.
  1149. int paramCount = lua_gettop(state);
  1150. // Attempt to match the parameters to a valid binding.
  1151. switch (paramCount)
  1152. {
  1153. case 2:
  1154. {
  1155. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1156. lua_type(state, 2) == LUA_TNUMBER)
  1157. {
  1158. // Get parameter 1 off the stack.
  1159. float param1 = (float)luaL_checknumber(state, 2);
  1160. PhysicsVehicleWheel* instance = getInstance(state);
  1161. instance->setStrutDampingRelaxation(param1);
  1162. return 0;
  1163. }
  1164. else
  1165. {
  1166. lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutDampingRelaxation - Failed to match the given parameters to a valid function signature.");
  1167. lua_error(state);
  1168. }
  1169. break;
  1170. }
  1171. default:
  1172. {
  1173. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1174. lua_error(state);
  1175. break;
  1176. }
  1177. }
  1178. return 0;
  1179. }
  1180. int lua_PhysicsVehicleWheel_setStrutForceMax(lua_State* state)
  1181. {
  1182. // Get the number of parameters.
  1183. int paramCount = lua_gettop(state);
  1184. // Attempt to match the parameters to a valid binding.
  1185. switch (paramCount)
  1186. {
  1187. case 2:
  1188. {
  1189. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1190. lua_type(state, 2) == LUA_TNUMBER)
  1191. {
  1192. // Get parameter 1 off the stack.
  1193. float param1 = (float)luaL_checknumber(state, 2);
  1194. PhysicsVehicleWheel* instance = getInstance(state);
  1195. instance->setStrutForceMax(param1);
  1196. return 0;
  1197. }
  1198. else
  1199. {
  1200. lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutForceMax - Failed to match the given parameters to a valid function signature.");
  1201. lua_error(state);
  1202. }
  1203. break;
  1204. }
  1205. default:
  1206. {
  1207. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1208. lua_error(state);
  1209. break;
  1210. }
  1211. }
  1212. return 0;
  1213. }
  1214. int lua_PhysicsVehicleWheel_setStrutRestLength(lua_State* state)
  1215. {
  1216. // Get the number of parameters.
  1217. int paramCount = lua_gettop(state);
  1218. // Attempt to match the parameters to a valid binding.
  1219. switch (paramCount)
  1220. {
  1221. case 2:
  1222. {
  1223. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1224. lua_type(state, 2) == LUA_TNUMBER)
  1225. {
  1226. // Get parameter 1 off the stack.
  1227. float param1 = (float)luaL_checknumber(state, 2);
  1228. PhysicsVehicleWheel* instance = getInstance(state);
  1229. instance->setStrutRestLength(param1);
  1230. return 0;
  1231. }
  1232. else
  1233. {
  1234. lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutRestLength - Failed to match the given parameters to a valid function signature.");
  1235. lua_error(state);
  1236. }
  1237. break;
  1238. }
  1239. default:
  1240. {
  1241. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1242. lua_error(state);
  1243. break;
  1244. }
  1245. }
  1246. return 0;
  1247. }
  1248. int lua_PhysicsVehicleWheel_setStrutStiffness(lua_State* state)
  1249. {
  1250. // Get the number of parameters.
  1251. int paramCount = lua_gettop(state);
  1252. // Attempt to match the parameters to a valid binding.
  1253. switch (paramCount)
  1254. {
  1255. case 2:
  1256. {
  1257. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1258. lua_type(state, 2) == LUA_TNUMBER)
  1259. {
  1260. // Get parameter 1 off the stack.
  1261. float param1 = (float)luaL_checknumber(state, 2);
  1262. PhysicsVehicleWheel* instance = getInstance(state);
  1263. instance->setStrutStiffness(param1);
  1264. return 0;
  1265. }
  1266. else
  1267. {
  1268. lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutStiffness - Failed to match the given parameters to a valid function signature.");
  1269. lua_error(state);
  1270. }
  1271. break;
  1272. }
  1273. default:
  1274. {
  1275. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1276. lua_error(state);
  1277. break;
  1278. }
  1279. }
  1280. return 0;
  1281. }
  1282. int lua_PhysicsVehicleWheel_setStrutTravelMax(lua_State* state)
  1283. {
  1284. // Get the number of parameters.
  1285. int paramCount = lua_gettop(state);
  1286. // Attempt to match the parameters to a valid binding.
  1287. switch (paramCount)
  1288. {
  1289. case 2:
  1290. {
  1291. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1292. lua_type(state, 2) == LUA_TNUMBER)
  1293. {
  1294. // Get parameter 1 off the stack.
  1295. float param1 = (float)luaL_checknumber(state, 2);
  1296. PhysicsVehicleWheel* instance = getInstance(state);
  1297. instance->setStrutTravelMax(param1);
  1298. return 0;
  1299. }
  1300. else
  1301. {
  1302. lua_pushstring(state, "lua_PhysicsVehicleWheel_setStrutTravelMax - Failed to match the given parameters to a valid function signature.");
  1303. lua_error(state);
  1304. }
  1305. break;
  1306. }
  1307. default:
  1308. {
  1309. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1310. lua_error(state);
  1311. break;
  1312. }
  1313. }
  1314. return 0;
  1315. }
  1316. int lua_PhysicsVehicleWheel_setWheelAxle(lua_State* state)
  1317. {
  1318. // Get the number of parameters.
  1319. int paramCount = lua_gettop(state);
  1320. // Attempt to match the parameters to a valid binding.
  1321. switch (paramCount)
  1322. {
  1323. case 2:
  1324. {
  1325. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1326. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  1327. {
  1328. // Get parameter 1 off the stack.
  1329. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  1330. PhysicsVehicleWheel* instance = getInstance(state);
  1331. instance->setWheelAxle(*param1);
  1332. return 0;
  1333. }
  1334. else
  1335. {
  1336. lua_pushstring(state, "lua_PhysicsVehicleWheel_setWheelAxle - Failed to match the given parameters to a valid function signature.");
  1337. lua_error(state);
  1338. }
  1339. break;
  1340. }
  1341. default:
  1342. {
  1343. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1344. lua_error(state);
  1345. break;
  1346. }
  1347. }
  1348. return 0;
  1349. }
  1350. int lua_PhysicsVehicleWheel_setWheelDirection(lua_State* state)
  1351. {
  1352. // Get the number of parameters.
  1353. int paramCount = lua_gettop(state);
  1354. // Attempt to match the parameters to a valid binding.
  1355. switch (paramCount)
  1356. {
  1357. case 2:
  1358. {
  1359. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1360. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  1361. {
  1362. // Get parameter 1 off the stack.
  1363. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  1364. PhysicsVehicleWheel* instance = getInstance(state);
  1365. instance->setWheelDirection(*param1);
  1366. return 0;
  1367. }
  1368. else
  1369. {
  1370. lua_pushstring(state, "lua_PhysicsVehicleWheel_setWheelDirection - Failed to match the given parameters to a valid function signature.");
  1371. lua_error(state);
  1372. }
  1373. break;
  1374. }
  1375. default:
  1376. {
  1377. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1378. lua_error(state);
  1379. break;
  1380. }
  1381. }
  1382. return 0;
  1383. }
  1384. int lua_PhysicsVehicleWheel_setWheelRadius(lua_State* state)
  1385. {
  1386. // Get the number of parameters.
  1387. int paramCount = lua_gettop(state);
  1388. // Attempt to match the parameters to a valid binding.
  1389. switch (paramCount)
  1390. {
  1391. case 2:
  1392. {
  1393. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1394. lua_type(state, 2) == LUA_TNUMBER)
  1395. {
  1396. // Get parameter 1 off the stack.
  1397. float param1 = (float)luaL_checknumber(state, 2);
  1398. PhysicsVehicleWheel* instance = getInstance(state);
  1399. instance->setWheelRadius(param1);
  1400. return 0;
  1401. }
  1402. else
  1403. {
  1404. lua_pushstring(state, "lua_PhysicsVehicleWheel_setWheelRadius - Failed to match the given parameters to a valid function signature.");
  1405. lua_error(state);
  1406. }
  1407. break;
  1408. }
  1409. default:
  1410. {
  1411. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1412. lua_error(state);
  1413. break;
  1414. }
  1415. }
  1416. return 0;
  1417. }
  1418. int lua_PhysicsVehicleWheel_transform(lua_State* state)
  1419. {
  1420. // Get the number of parameters.
  1421. int paramCount = lua_gettop(state);
  1422. // Attempt to match the parameters to a valid binding.
  1423. switch (paramCount)
  1424. {
  1425. case 2:
  1426. {
  1427. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1428. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1429. {
  1430. // Get parameter 1 off the stack.
  1431. ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false);
  1432. PhysicsVehicleWheel* instance = getInstance(state);
  1433. instance->transform(param1);
  1434. return 0;
  1435. }
  1436. else
  1437. {
  1438. lua_pushstring(state, "lua_PhysicsVehicleWheel_transform - Failed to match the given parameters to a valid function signature.");
  1439. lua_error(state);
  1440. }
  1441. break;
  1442. }
  1443. default:
  1444. {
  1445. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1446. lua_error(state);
  1447. break;
  1448. }
  1449. }
  1450. return 0;
  1451. }
  1452. }