lua_PhysicsSpringConstraint.cpp 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335
  1. // Autogenerated by gameplay-luagen
  2. #include "Base.h"
  3. #include "ScriptController.h"
  4. #include "lua_PhysicsSpringConstraint.h"
  5. #include "PhysicsSpringConstraint.h"
  6. namespace gameplay
  7. {
  8. void luaRegister_PhysicsSpringConstraint()
  9. {
  10. const luaL_Reg lua_members[] =
  11. {
  12. {"getBreakingImpulse", lua_PhysicsSpringConstraint_getBreakingImpulse},
  13. {"getRotationOffsetA", lua_PhysicsSpringConstraint_getRotationOffsetA},
  14. {"getRotationOffsetB", lua_PhysicsSpringConstraint_getRotationOffsetB},
  15. {"getTranslationOffsetA", lua_PhysicsSpringConstraint_getTranslationOffsetA},
  16. {"getTranslationOffsetB", lua_PhysicsSpringConstraint_getTranslationOffsetB},
  17. {"isEnabled", lua_PhysicsSpringConstraint_isEnabled},
  18. {"setAngularDampingX", lua_PhysicsSpringConstraint_setAngularDampingX},
  19. {"setAngularDampingY", lua_PhysicsSpringConstraint_setAngularDampingY},
  20. {"setAngularDampingZ", lua_PhysicsSpringConstraint_setAngularDampingZ},
  21. {"setAngularLowerLimit", lua_PhysicsSpringConstraint_setAngularLowerLimit},
  22. {"setAngularStrengthX", lua_PhysicsSpringConstraint_setAngularStrengthX},
  23. {"setAngularStrengthY", lua_PhysicsSpringConstraint_setAngularStrengthY},
  24. {"setAngularStrengthZ", lua_PhysicsSpringConstraint_setAngularStrengthZ},
  25. {"setAngularUpperLimit", lua_PhysicsSpringConstraint_setAngularUpperLimit},
  26. {"setBreakingImpulse", lua_PhysicsSpringConstraint_setBreakingImpulse},
  27. {"setEnabled", lua_PhysicsSpringConstraint_setEnabled},
  28. {"setLinearDampingX", lua_PhysicsSpringConstraint_setLinearDampingX},
  29. {"setLinearDampingY", lua_PhysicsSpringConstraint_setLinearDampingY},
  30. {"setLinearDampingZ", lua_PhysicsSpringConstraint_setLinearDampingZ},
  31. {"setLinearLowerLimit", lua_PhysicsSpringConstraint_setLinearLowerLimit},
  32. {"setLinearStrengthX", lua_PhysicsSpringConstraint_setLinearStrengthX},
  33. {"setLinearStrengthY", lua_PhysicsSpringConstraint_setLinearStrengthY},
  34. {"setLinearStrengthZ", lua_PhysicsSpringConstraint_setLinearStrengthZ},
  35. {"setLinearUpperLimit", lua_PhysicsSpringConstraint_setLinearUpperLimit},
  36. {"setRotationOffsetA", lua_PhysicsSpringConstraint_setRotationOffsetA},
  37. {"setRotationOffsetB", lua_PhysicsSpringConstraint_setRotationOffsetB},
  38. {"setTranslationOffsetA", lua_PhysicsSpringConstraint_setTranslationOffsetA},
  39. {"setTranslationOffsetB", lua_PhysicsSpringConstraint_setTranslationOffsetB},
  40. {NULL, NULL}
  41. };
  42. const luaL_Reg lua_statics[] =
  43. {
  44. {"centerOfMassMidpoint", lua_PhysicsSpringConstraint_static_centerOfMassMidpoint},
  45. {"getRotationOffset", lua_PhysicsSpringConstraint_static_getRotationOffset},
  46. {"getTranslationOffset", lua_PhysicsSpringConstraint_static_getTranslationOffset},
  47. {NULL, NULL}
  48. };
  49. std::vector<std::string> scopePath;
  50. gameplay::ScriptUtil::registerClass("PhysicsSpringConstraint", lua_members, NULL, NULL, lua_statics, scopePath);
  51. }
  52. static PhysicsSpringConstraint* getInstance(lua_State* state)
  53. {
  54. void* userdata = luaL_checkudata(state, 1, "PhysicsSpringConstraint");
  55. luaL_argcheck(state, userdata != NULL, 1, "'PhysicsSpringConstraint' expected.");
  56. return (PhysicsSpringConstraint*)((gameplay::ScriptUtil::LuaObject*)userdata)->instance;
  57. }
  58. int lua_PhysicsSpringConstraint_getBreakingImpulse(lua_State* state)
  59. {
  60. // Get the number of parameters.
  61. int paramCount = lua_gettop(state);
  62. // Attempt to match the parameters to a valid binding.
  63. switch (paramCount)
  64. {
  65. case 1:
  66. {
  67. if ((lua_type(state, 1) == LUA_TUSERDATA))
  68. {
  69. PhysicsSpringConstraint* instance = getInstance(state);
  70. float result = instance->getBreakingImpulse();
  71. // Push the return value onto the stack.
  72. lua_pushnumber(state, result);
  73. return 1;
  74. }
  75. lua_pushstring(state, "lua_PhysicsSpringConstraint_getBreakingImpulse - Failed to match the given parameters to a valid function signature.");
  76. lua_error(state);
  77. break;
  78. }
  79. default:
  80. {
  81. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  82. lua_error(state);
  83. break;
  84. }
  85. }
  86. return 0;
  87. }
  88. int lua_PhysicsSpringConstraint_getRotationOffsetA(lua_State* state)
  89. {
  90. // Get the number of parameters.
  91. int paramCount = lua_gettop(state);
  92. // Attempt to match the parameters to a valid binding.
  93. switch (paramCount)
  94. {
  95. case 1:
  96. {
  97. if ((lua_type(state, 1) == LUA_TUSERDATA))
  98. {
  99. PhysicsSpringConstraint* instance = getInstance(state);
  100. void* returnPtr = (void*)&(instance->getRotationOffsetA());
  101. if (returnPtr)
  102. {
  103. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  104. object->instance = returnPtr;
  105. object->owns = false;
  106. luaL_getmetatable(state, "Quaternion");
  107. lua_setmetatable(state, -2);
  108. }
  109. else
  110. {
  111. lua_pushnil(state);
  112. }
  113. return 1;
  114. }
  115. lua_pushstring(state, "lua_PhysicsSpringConstraint_getRotationOffsetA - Failed to match the given parameters to a valid function signature.");
  116. lua_error(state);
  117. break;
  118. }
  119. default:
  120. {
  121. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  122. lua_error(state);
  123. break;
  124. }
  125. }
  126. return 0;
  127. }
  128. int lua_PhysicsSpringConstraint_getRotationOffsetB(lua_State* state)
  129. {
  130. // Get the number of parameters.
  131. int paramCount = lua_gettop(state);
  132. // Attempt to match the parameters to a valid binding.
  133. switch (paramCount)
  134. {
  135. case 1:
  136. {
  137. if ((lua_type(state, 1) == LUA_TUSERDATA))
  138. {
  139. PhysicsSpringConstraint* instance = getInstance(state);
  140. void* returnPtr = (void*)&(instance->getRotationOffsetB());
  141. if (returnPtr)
  142. {
  143. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  144. object->instance = returnPtr;
  145. object->owns = false;
  146. luaL_getmetatable(state, "Quaternion");
  147. lua_setmetatable(state, -2);
  148. }
  149. else
  150. {
  151. lua_pushnil(state);
  152. }
  153. return 1;
  154. }
  155. lua_pushstring(state, "lua_PhysicsSpringConstraint_getRotationOffsetB - Failed to match the given parameters to a valid function signature.");
  156. lua_error(state);
  157. break;
  158. }
  159. default:
  160. {
  161. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  162. lua_error(state);
  163. break;
  164. }
  165. }
  166. return 0;
  167. }
  168. int lua_PhysicsSpringConstraint_getTranslationOffsetA(lua_State* state)
  169. {
  170. // Get the number of parameters.
  171. int paramCount = lua_gettop(state);
  172. // Attempt to match the parameters to a valid binding.
  173. switch (paramCount)
  174. {
  175. case 1:
  176. {
  177. if ((lua_type(state, 1) == LUA_TUSERDATA))
  178. {
  179. PhysicsSpringConstraint* instance = getInstance(state);
  180. void* returnPtr = (void*)&(instance->getTranslationOffsetA());
  181. if (returnPtr)
  182. {
  183. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  184. object->instance = returnPtr;
  185. object->owns = false;
  186. luaL_getmetatable(state, "Vector3");
  187. lua_setmetatable(state, -2);
  188. }
  189. else
  190. {
  191. lua_pushnil(state);
  192. }
  193. return 1;
  194. }
  195. lua_pushstring(state, "lua_PhysicsSpringConstraint_getTranslationOffsetA - Failed to match the given parameters to a valid function signature.");
  196. lua_error(state);
  197. break;
  198. }
  199. default:
  200. {
  201. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  202. lua_error(state);
  203. break;
  204. }
  205. }
  206. return 0;
  207. }
  208. int lua_PhysicsSpringConstraint_getTranslationOffsetB(lua_State* state)
  209. {
  210. // Get the number of parameters.
  211. int paramCount = lua_gettop(state);
  212. // Attempt to match the parameters to a valid binding.
  213. switch (paramCount)
  214. {
  215. case 1:
  216. {
  217. if ((lua_type(state, 1) == LUA_TUSERDATA))
  218. {
  219. PhysicsSpringConstraint* instance = getInstance(state);
  220. void* returnPtr = (void*)&(instance->getTranslationOffsetB());
  221. if (returnPtr)
  222. {
  223. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  224. object->instance = returnPtr;
  225. object->owns = false;
  226. luaL_getmetatable(state, "Vector3");
  227. lua_setmetatable(state, -2);
  228. }
  229. else
  230. {
  231. lua_pushnil(state);
  232. }
  233. return 1;
  234. }
  235. lua_pushstring(state, "lua_PhysicsSpringConstraint_getTranslationOffsetB - Failed to match the given parameters to a valid function signature.");
  236. lua_error(state);
  237. break;
  238. }
  239. default:
  240. {
  241. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  242. lua_error(state);
  243. break;
  244. }
  245. }
  246. return 0;
  247. }
  248. int lua_PhysicsSpringConstraint_isEnabled(lua_State* state)
  249. {
  250. // Get the number of parameters.
  251. int paramCount = lua_gettop(state);
  252. // Attempt to match the parameters to a valid binding.
  253. switch (paramCount)
  254. {
  255. case 1:
  256. {
  257. if ((lua_type(state, 1) == LUA_TUSERDATA))
  258. {
  259. PhysicsSpringConstraint* instance = getInstance(state);
  260. bool result = instance->isEnabled();
  261. // Push the return value onto the stack.
  262. lua_pushboolean(state, result);
  263. return 1;
  264. }
  265. lua_pushstring(state, "lua_PhysicsSpringConstraint_isEnabled - Failed to match the given parameters to a valid function signature.");
  266. lua_error(state);
  267. break;
  268. }
  269. default:
  270. {
  271. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  272. lua_error(state);
  273. break;
  274. }
  275. }
  276. return 0;
  277. }
  278. int lua_PhysicsSpringConstraint_setAngularDampingX(lua_State* state)
  279. {
  280. // Get the number of parameters.
  281. int paramCount = lua_gettop(state);
  282. // Attempt to match the parameters to a valid binding.
  283. switch (paramCount)
  284. {
  285. case 2:
  286. {
  287. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  288. lua_type(state, 2) == LUA_TNUMBER)
  289. {
  290. // Get parameter 1 off the stack.
  291. float param1 = (float)luaL_checknumber(state, 2);
  292. PhysicsSpringConstraint* instance = getInstance(state);
  293. instance->setAngularDampingX(param1);
  294. return 0;
  295. }
  296. lua_pushstring(state, "lua_PhysicsSpringConstraint_setAngularDampingX - Failed to match the given parameters to a valid function signature.");
  297. lua_error(state);
  298. break;
  299. }
  300. default:
  301. {
  302. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  303. lua_error(state);
  304. break;
  305. }
  306. }
  307. return 0;
  308. }
  309. int lua_PhysicsSpringConstraint_setAngularDampingY(lua_State* state)
  310. {
  311. // Get the number of parameters.
  312. int paramCount = lua_gettop(state);
  313. // Attempt to match the parameters to a valid binding.
  314. switch (paramCount)
  315. {
  316. case 2:
  317. {
  318. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  319. lua_type(state, 2) == LUA_TNUMBER)
  320. {
  321. // Get parameter 1 off the stack.
  322. float param1 = (float)luaL_checknumber(state, 2);
  323. PhysicsSpringConstraint* instance = getInstance(state);
  324. instance->setAngularDampingY(param1);
  325. return 0;
  326. }
  327. lua_pushstring(state, "lua_PhysicsSpringConstraint_setAngularDampingY - Failed to match the given parameters to a valid function signature.");
  328. lua_error(state);
  329. break;
  330. }
  331. default:
  332. {
  333. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  334. lua_error(state);
  335. break;
  336. }
  337. }
  338. return 0;
  339. }
  340. int lua_PhysicsSpringConstraint_setAngularDampingZ(lua_State* state)
  341. {
  342. // Get the number of parameters.
  343. int paramCount = lua_gettop(state);
  344. // Attempt to match the parameters to a valid binding.
  345. switch (paramCount)
  346. {
  347. case 2:
  348. {
  349. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  350. lua_type(state, 2) == LUA_TNUMBER)
  351. {
  352. // Get parameter 1 off the stack.
  353. float param1 = (float)luaL_checknumber(state, 2);
  354. PhysicsSpringConstraint* instance = getInstance(state);
  355. instance->setAngularDampingZ(param1);
  356. return 0;
  357. }
  358. lua_pushstring(state, "lua_PhysicsSpringConstraint_setAngularDampingZ - Failed to match the given parameters to a valid function signature.");
  359. lua_error(state);
  360. break;
  361. }
  362. default:
  363. {
  364. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  365. lua_error(state);
  366. break;
  367. }
  368. }
  369. return 0;
  370. }
  371. int lua_PhysicsSpringConstraint_setAngularLowerLimit(lua_State* state)
  372. {
  373. // Get the number of parameters.
  374. int paramCount = lua_gettop(state);
  375. // Attempt to match the parameters to a valid binding.
  376. switch (paramCount)
  377. {
  378. case 2:
  379. {
  380. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  381. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  382. {
  383. // Get parameter 1 off the stack.
  384. bool param1Valid;
  385. gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
  386. if (!param1Valid)
  387. {
  388. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
  389. lua_error(state);
  390. }
  391. PhysicsSpringConstraint* instance = getInstance(state);
  392. instance->setAngularLowerLimit(*param1);
  393. return 0;
  394. }
  395. lua_pushstring(state, "lua_PhysicsSpringConstraint_setAngularLowerLimit - Failed to match the given parameters to a valid function signature.");
  396. lua_error(state);
  397. break;
  398. }
  399. default:
  400. {
  401. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  402. lua_error(state);
  403. break;
  404. }
  405. }
  406. return 0;
  407. }
  408. int lua_PhysicsSpringConstraint_setAngularStrengthX(lua_State* state)
  409. {
  410. // Get the number of parameters.
  411. int paramCount = lua_gettop(state);
  412. // Attempt to match the parameters to a valid binding.
  413. switch (paramCount)
  414. {
  415. case 2:
  416. {
  417. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  418. lua_type(state, 2) == LUA_TNUMBER)
  419. {
  420. // Get parameter 1 off the stack.
  421. float param1 = (float)luaL_checknumber(state, 2);
  422. PhysicsSpringConstraint* instance = getInstance(state);
  423. instance->setAngularStrengthX(param1);
  424. return 0;
  425. }
  426. lua_pushstring(state, "lua_PhysicsSpringConstraint_setAngularStrengthX - Failed to match the given parameters to a valid function signature.");
  427. lua_error(state);
  428. break;
  429. }
  430. default:
  431. {
  432. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  433. lua_error(state);
  434. break;
  435. }
  436. }
  437. return 0;
  438. }
  439. int lua_PhysicsSpringConstraint_setAngularStrengthY(lua_State* state)
  440. {
  441. // Get the number of parameters.
  442. int paramCount = lua_gettop(state);
  443. // Attempt to match the parameters to a valid binding.
  444. switch (paramCount)
  445. {
  446. case 2:
  447. {
  448. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  449. lua_type(state, 2) == LUA_TNUMBER)
  450. {
  451. // Get parameter 1 off the stack.
  452. float param1 = (float)luaL_checknumber(state, 2);
  453. PhysicsSpringConstraint* instance = getInstance(state);
  454. instance->setAngularStrengthY(param1);
  455. return 0;
  456. }
  457. lua_pushstring(state, "lua_PhysicsSpringConstraint_setAngularStrengthY - Failed to match the given parameters to a valid function signature.");
  458. lua_error(state);
  459. break;
  460. }
  461. default:
  462. {
  463. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  464. lua_error(state);
  465. break;
  466. }
  467. }
  468. return 0;
  469. }
  470. int lua_PhysicsSpringConstraint_setAngularStrengthZ(lua_State* state)
  471. {
  472. // Get the number of parameters.
  473. int paramCount = lua_gettop(state);
  474. // Attempt to match the parameters to a valid binding.
  475. switch (paramCount)
  476. {
  477. case 2:
  478. {
  479. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  480. lua_type(state, 2) == LUA_TNUMBER)
  481. {
  482. // Get parameter 1 off the stack.
  483. float param1 = (float)luaL_checknumber(state, 2);
  484. PhysicsSpringConstraint* instance = getInstance(state);
  485. instance->setAngularStrengthZ(param1);
  486. return 0;
  487. }
  488. lua_pushstring(state, "lua_PhysicsSpringConstraint_setAngularStrengthZ - Failed to match the given parameters to a valid function signature.");
  489. lua_error(state);
  490. break;
  491. }
  492. default:
  493. {
  494. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  495. lua_error(state);
  496. break;
  497. }
  498. }
  499. return 0;
  500. }
  501. int lua_PhysicsSpringConstraint_setAngularUpperLimit(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 2:
  509. {
  510. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  511. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  512. {
  513. // Get parameter 1 off the stack.
  514. bool param1Valid;
  515. gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
  516. if (!param1Valid)
  517. {
  518. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
  519. lua_error(state);
  520. }
  521. PhysicsSpringConstraint* instance = getInstance(state);
  522. instance->setAngularUpperLimit(*param1);
  523. return 0;
  524. }
  525. lua_pushstring(state, "lua_PhysicsSpringConstraint_setAngularUpperLimit - Failed to match the given parameters to a valid function signature.");
  526. lua_error(state);
  527. break;
  528. }
  529. default:
  530. {
  531. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  532. lua_error(state);
  533. break;
  534. }
  535. }
  536. return 0;
  537. }
  538. int lua_PhysicsSpringConstraint_setBreakingImpulse(lua_State* state)
  539. {
  540. // Get the number of parameters.
  541. int paramCount = lua_gettop(state);
  542. // Attempt to match the parameters to a valid binding.
  543. switch (paramCount)
  544. {
  545. case 2:
  546. {
  547. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  548. lua_type(state, 2) == LUA_TNUMBER)
  549. {
  550. // Get parameter 1 off the stack.
  551. float param1 = (float)luaL_checknumber(state, 2);
  552. PhysicsSpringConstraint* instance = getInstance(state);
  553. instance->setBreakingImpulse(param1);
  554. return 0;
  555. }
  556. lua_pushstring(state, "lua_PhysicsSpringConstraint_setBreakingImpulse - Failed to match the given parameters to a valid function signature.");
  557. lua_error(state);
  558. break;
  559. }
  560. default:
  561. {
  562. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  563. lua_error(state);
  564. break;
  565. }
  566. }
  567. return 0;
  568. }
  569. int lua_PhysicsSpringConstraint_setEnabled(lua_State* state)
  570. {
  571. // Get the number of parameters.
  572. int paramCount = lua_gettop(state);
  573. // Attempt to match the parameters to a valid binding.
  574. switch (paramCount)
  575. {
  576. case 2:
  577. {
  578. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  579. lua_type(state, 2) == LUA_TBOOLEAN)
  580. {
  581. // Get parameter 1 off the stack.
  582. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
  583. PhysicsSpringConstraint* instance = getInstance(state);
  584. instance->setEnabled(param1);
  585. return 0;
  586. }
  587. lua_pushstring(state, "lua_PhysicsSpringConstraint_setEnabled - Failed to match the given parameters to a valid function signature.");
  588. lua_error(state);
  589. break;
  590. }
  591. default:
  592. {
  593. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  594. lua_error(state);
  595. break;
  596. }
  597. }
  598. return 0;
  599. }
  600. int lua_PhysicsSpringConstraint_setLinearDampingX(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 2:
  608. {
  609. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  610. lua_type(state, 2) == LUA_TNUMBER)
  611. {
  612. // Get parameter 1 off the stack.
  613. float param1 = (float)luaL_checknumber(state, 2);
  614. PhysicsSpringConstraint* instance = getInstance(state);
  615. instance->setLinearDampingX(param1);
  616. return 0;
  617. }
  618. lua_pushstring(state, "lua_PhysicsSpringConstraint_setLinearDampingX - Failed to match the given parameters to a valid function signature.");
  619. lua_error(state);
  620. break;
  621. }
  622. default:
  623. {
  624. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  625. lua_error(state);
  626. break;
  627. }
  628. }
  629. return 0;
  630. }
  631. int lua_PhysicsSpringConstraint_setLinearDampingY(lua_State* state)
  632. {
  633. // Get the number of parameters.
  634. int paramCount = lua_gettop(state);
  635. // Attempt to match the parameters to a valid binding.
  636. switch (paramCount)
  637. {
  638. case 2:
  639. {
  640. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  641. lua_type(state, 2) == LUA_TNUMBER)
  642. {
  643. // Get parameter 1 off the stack.
  644. float param1 = (float)luaL_checknumber(state, 2);
  645. PhysicsSpringConstraint* instance = getInstance(state);
  646. instance->setLinearDampingY(param1);
  647. return 0;
  648. }
  649. lua_pushstring(state, "lua_PhysicsSpringConstraint_setLinearDampingY - Failed to match the given parameters to a valid function signature.");
  650. lua_error(state);
  651. break;
  652. }
  653. default:
  654. {
  655. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  656. lua_error(state);
  657. break;
  658. }
  659. }
  660. return 0;
  661. }
  662. int lua_PhysicsSpringConstraint_setLinearDampingZ(lua_State* state)
  663. {
  664. // Get the number of parameters.
  665. int paramCount = lua_gettop(state);
  666. // Attempt to match the parameters to a valid binding.
  667. switch (paramCount)
  668. {
  669. case 2:
  670. {
  671. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  672. lua_type(state, 2) == LUA_TNUMBER)
  673. {
  674. // Get parameter 1 off the stack.
  675. float param1 = (float)luaL_checknumber(state, 2);
  676. PhysicsSpringConstraint* instance = getInstance(state);
  677. instance->setLinearDampingZ(param1);
  678. return 0;
  679. }
  680. lua_pushstring(state, "lua_PhysicsSpringConstraint_setLinearDampingZ - Failed to match the given parameters to a valid function signature.");
  681. lua_error(state);
  682. break;
  683. }
  684. default:
  685. {
  686. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  687. lua_error(state);
  688. break;
  689. }
  690. }
  691. return 0;
  692. }
  693. int lua_PhysicsSpringConstraint_setLinearLowerLimit(lua_State* state)
  694. {
  695. // Get the number of parameters.
  696. int paramCount = lua_gettop(state);
  697. // Attempt to match the parameters to a valid binding.
  698. switch (paramCount)
  699. {
  700. case 2:
  701. {
  702. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  703. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  704. {
  705. // Get parameter 1 off the stack.
  706. bool param1Valid;
  707. gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
  708. if (!param1Valid)
  709. {
  710. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
  711. lua_error(state);
  712. }
  713. PhysicsSpringConstraint* instance = getInstance(state);
  714. instance->setLinearLowerLimit(*param1);
  715. return 0;
  716. }
  717. lua_pushstring(state, "lua_PhysicsSpringConstraint_setLinearLowerLimit - Failed to match the given parameters to a valid function signature.");
  718. lua_error(state);
  719. break;
  720. }
  721. default:
  722. {
  723. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  724. lua_error(state);
  725. break;
  726. }
  727. }
  728. return 0;
  729. }
  730. int lua_PhysicsSpringConstraint_setLinearStrengthX(lua_State* state)
  731. {
  732. // Get the number of parameters.
  733. int paramCount = lua_gettop(state);
  734. // Attempt to match the parameters to a valid binding.
  735. switch (paramCount)
  736. {
  737. case 2:
  738. {
  739. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  740. lua_type(state, 2) == LUA_TNUMBER)
  741. {
  742. // Get parameter 1 off the stack.
  743. float param1 = (float)luaL_checknumber(state, 2);
  744. PhysicsSpringConstraint* instance = getInstance(state);
  745. instance->setLinearStrengthX(param1);
  746. return 0;
  747. }
  748. lua_pushstring(state, "lua_PhysicsSpringConstraint_setLinearStrengthX - Failed to match the given parameters to a valid function signature.");
  749. lua_error(state);
  750. break;
  751. }
  752. default:
  753. {
  754. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  755. lua_error(state);
  756. break;
  757. }
  758. }
  759. return 0;
  760. }
  761. int lua_PhysicsSpringConstraint_setLinearStrengthY(lua_State* state)
  762. {
  763. // Get the number of parameters.
  764. int paramCount = lua_gettop(state);
  765. // Attempt to match the parameters to a valid binding.
  766. switch (paramCount)
  767. {
  768. case 2:
  769. {
  770. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  771. lua_type(state, 2) == LUA_TNUMBER)
  772. {
  773. // Get parameter 1 off the stack.
  774. float param1 = (float)luaL_checknumber(state, 2);
  775. PhysicsSpringConstraint* instance = getInstance(state);
  776. instance->setLinearStrengthY(param1);
  777. return 0;
  778. }
  779. lua_pushstring(state, "lua_PhysicsSpringConstraint_setLinearStrengthY - Failed to match the given parameters to a valid function signature.");
  780. lua_error(state);
  781. break;
  782. }
  783. default:
  784. {
  785. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  786. lua_error(state);
  787. break;
  788. }
  789. }
  790. return 0;
  791. }
  792. int lua_PhysicsSpringConstraint_setLinearStrengthZ(lua_State* state)
  793. {
  794. // Get the number of parameters.
  795. int paramCount = lua_gettop(state);
  796. // Attempt to match the parameters to a valid binding.
  797. switch (paramCount)
  798. {
  799. case 2:
  800. {
  801. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  802. lua_type(state, 2) == LUA_TNUMBER)
  803. {
  804. // Get parameter 1 off the stack.
  805. float param1 = (float)luaL_checknumber(state, 2);
  806. PhysicsSpringConstraint* instance = getInstance(state);
  807. instance->setLinearStrengthZ(param1);
  808. return 0;
  809. }
  810. lua_pushstring(state, "lua_PhysicsSpringConstraint_setLinearStrengthZ - Failed to match the given parameters to a valid function signature.");
  811. lua_error(state);
  812. break;
  813. }
  814. default:
  815. {
  816. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  817. lua_error(state);
  818. break;
  819. }
  820. }
  821. return 0;
  822. }
  823. int lua_PhysicsSpringConstraint_setLinearUpperLimit(lua_State* state)
  824. {
  825. // Get the number of parameters.
  826. int paramCount = lua_gettop(state);
  827. // Attempt to match the parameters to a valid binding.
  828. switch (paramCount)
  829. {
  830. case 2:
  831. {
  832. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  833. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  834. {
  835. // Get parameter 1 off the stack.
  836. bool param1Valid;
  837. gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
  838. if (!param1Valid)
  839. {
  840. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
  841. lua_error(state);
  842. }
  843. PhysicsSpringConstraint* instance = getInstance(state);
  844. instance->setLinearUpperLimit(*param1);
  845. return 0;
  846. }
  847. lua_pushstring(state, "lua_PhysicsSpringConstraint_setLinearUpperLimit - Failed to match the given parameters to a valid function signature.");
  848. lua_error(state);
  849. break;
  850. }
  851. default:
  852. {
  853. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  854. lua_error(state);
  855. break;
  856. }
  857. }
  858. return 0;
  859. }
  860. int lua_PhysicsSpringConstraint_setRotationOffsetA(lua_State* state)
  861. {
  862. // Get the number of parameters.
  863. int paramCount = lua_gettop(state);
  864. // Attempt to match the parameters to a valid binding.
  865. switch (paramCount)
  866. {
  867. case 2:
  868. {
  869. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  870. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  871. {
  872. // Get parameter 1 off the stack.
  873. bool param1Valid;
  874. gameplay::ScriptUtil::LuaArray<Quaternion> param1 = gameplay::ScriptUtil::getObjectPointer<Quaternion>(2, "Quaternion", true, &param1Valid);
  875. if (!param1Valid)
  876. {
  877. lua_pushstring(state, "Failed to convert parameter 1 to type 'Quaternion'.");
  878. lua_error(state);
  879. }
  880. PhysicsSpringConstraint* instance = getInstance(state);
  881. instance->setRotationOffsetA(*param1);
  882. return 0;
  883. }
  884. lua_pushstring(state, "lua_PhysicsSpringConstraint_setRotationOffsetA - Failed to match the given parameters to a valid function signature.");
  885. lua_error(state);
  886. break;
  887. }
  888. default:
  889. {
  890. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  891. lua_error(state);
  892. break;
  893. }
  894. }
  895. return 0;
  896. }
  897. int lua_PhysicsSpringConstraint_setRotationOffsetB(lua_State* state)
  898. {
  899. // Get the number of parameters.
  900. int paramCount = lua_gettop(state);
  901. // Attempt to match the parameters to a valid binding.
  902. switch (paramCount)
  903. {
  904. case 2:
  905. {
  906. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  907. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  908. {
  909. // Get parameter 1 off the stack.
  910. bool param1Valid;
  911. gameplay::ScriptUtil::LuaArray<Quaternion> param1 = gameplay::ScriptUtil::getObjectPointer<Quaternion>(2, "Quaternion", true, &param1Valid);
  912. if (!param1Valid)
  913. {
  914. lua_pushstring(state, "Failed to convert parameter 1 to type 'Quaternion'.");
  915. lua_error(state);
  916. }
  917. PhysicsSpringConstraint* instance = getInstance(state);
  918. instance->setRotationOffsetB(*param1);
  919. return 0;
  920. }
  921. lua_pushstring(state, "lua_PhysicsSpringConstraint_setRotationOffsetB - Failed to match the given parameters to a valid function signature.");
  922. lua_error(state);
  923. break;
  924. }
  925. default:
  926. {
  927. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  928. lua_error(state);
  929. break;
  930. }
  931. }
  932. return 0;
  933. }
  934. int lua_PhysicsSpringConstraint_setTranslationOffsetA(lua_State* state)
  935. {
  936. // Get the number of parameters.
  937. int paramCount = lua_gettop(state);
  938. // Attempt to match the parameters to a valid binding.
  939. switch (paramCount)
  940. {
  941. case 2:
  942. {
  943. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  944. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  945. {
  946. // Get parameter 1 off the stack.
  947. bool param1Valid;
  948. gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
  949. if (!param1Valid)
  950. {
  951. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
  952. lua_error(state);
  953. }
  954. PhysicsSpringConstraint* instance = getInstance(state);
  955. instance->setTranslationOffsetA(*param1);
  956. return 0;
  957. }
  958. lua_pushstring(state, "lua_PhysicsSpringConstraint_setTranslationOffsetA - Failed to match the given parameters to a valid function signature.");
  959. lua_error(state);
  960. break;
  961. }
  962. default:
  963. {
  964. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  965. lua_error(state);
  966. break;
  967. }
  968. }
  969. return 0;
  970. }
  971. int lua_PhysicsSpringConstraint_setTranslationOffsetB(lua_State* state)
  972. {
  973. // Get the number of parameters.
  974. int paramCount = lua_gettop(state);
  975. // Attempt to match the parameters to a valid binding.
  976. switch (paramCount)
  977. {
  978. case 2:
  979. {
  980. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  981. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  982. {
  983. // Get parameter 1 off the stack.
  984. bool param1Valid;
  985. gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param1Valid);
  986. if (!param1Valid)
  987. {
  988. lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
  989. lua_error(state);
  990. }
  991. PhysicsSpringConstraint* instance = getInstance(state);
  992. instance->setTranslationOffsetB(*param1);
  993. return 0;
  994. }
  995. lua_pushstring(state, "lua_PhysicsSpringConstraint_setTranslationOffsetB - Failed to match the given parameters to a valid function signature.");
  996. lua_error(state);
  997. break;
  998. }
  999. default:
  1000. {
  1001. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1002. lua_error(state);
  1003. break;
  1004. }
  1005. }
  1006. return 0;
  1007. }
  1008. int lua_PhysicsSpringConstraint_static_centerOfMassMidpoint(lua_State* state)
  1009. {
  1010. // Get the number of parameters.
  1011. int paramCount = lua_gettop(state);
  1012. // Attempt to match the parameters to a valid binding.
  1013. switch (paramCount)
  1014. {
  1015. case 2:
  1016. {
  1017. if ((lua_type(state, 1) == LUA_TUSERDATA || lua_type(state, 1) == LUA_TTABLE || lua_type(state, 1) == LUA_TNIL) &&
  1018. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1019. {
  1020. // Get parameter 1 off the stack.
  1021. bool param1Valid;
  1022. gameplay::ScriptUtil::LuaArray<Node> param1 = gameplay::ScriptUtil::getObjectPointer<Node>(1, "Node", false, &param1Valid);
  1023. if (!param1Valid)
  1024. {
  1025. lua_pushstring(state, "Failed to convert parameter 1 to type 'Node'.");
  1026. lua_error(state);
  1027. }
  1028. // Get parameter 2 off the stack.
  1029. bool param2Valid;
  1030. gameplay::ScriptUtil::LuaArray<Node> param2 = gameplay::ScriptUtil::getObjectPointer<Node>(2, "Node", false, &param2Valid);
  1031. if (!param2Valid)
  1032. {
  1033. lua_pushstring(state, "Failed to convert parameter 2 to type 'Node'.");
  1034. lua_error(state);
  1035. }
  1036. void* returnPtr = (void*)new Vector3(PhysicsSpringConstraint::centerOfMassMidpoint(param1, param2));
  1037. if (returnPtr)
  1038. {
  1039. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1040. object->instance = returnPtr;
  1041. object->owns = true;
  1042. luaL_getmetatable(state, "Vector3");
  1043. lua_setmetatable(state, -2);
  1044. }
  1045. else
  1046. {
  1047. lua_pushnil(state);
  1048. }
  1049. return 1;
  1050. }
  1051. lua_pushstring(state, "lua_PhysicsSpringConstraint_static_centerOfMassMidpoint - Failed to match the given parameters to a valid function signature.");
  1052. lua_error(state);
  1053. break;
  1054. }
  1055. default:
  1056. {
  1057. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1058. lua_error(state);
  1059. break;
  1060. }
  1061. }
  1062. return 0;
  1063. }
  1064. int lua_PhysicsSpringConstraint_static_getRotationOffset(lua_State* state)
  1065. {
  1066. // Get the number of parameters.
  1067. int paramCount = lua_gettop(state);
  1068. // Attempt to match the parameters to a valid binding.
  1069. switch (paramCount)
  1070. {
  1071. case 2:
  1072. {
  1073. if ((lua_type(state, 1) == LUA_TUSERDATA || lua_type(state, 1) == LUA_TTABLE || lua_type(state, 1) == LUA_TNIL) &&
  1074. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  1075. {
  1076. // Get parameter 1 off the stack.
  1077. bool param1Valid;
  1078. gameplay::ScriptUtil::LuaArray<Node> param1 = gameplay::ScriptUtil::getObjectPointer<Node>(1, "Node", false, &param1Valid);
  1079. if (!param1Valid)
  1080. {
  1081. lua_pushstring(state, "Failed to convert parameter 1 to type 'Node'.");
  1082. lua_error(state);
  1083. }
  1084. // Get parameter 2 off the stack.
  1085. bool param2Valid;
  1086. gameplay::ScriptUtil::LuaArray<Vector3> param2 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param2Valid);
  1087. if (!param2Valid)
  1088. {
  1089. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector3'.");
  1090. lua_error(state);
  1091. }
  1092. void* returnPtr = (void*)new Quaternion(PhysicsSpringConstraint::getRotationOffset(param1, *param2));
  1093. if (returnPtr)
  1094. {
  1095. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1096. object->instance = returnPtr;
  1097. object->owns = true;
  1098. luaL_getmetatable(state, "Quaternion");
  1099. lua_setmetatable(state, -2);
  1100. }
  1101. else
  1102. {
  1103. lua_pushnil(state);
  1104. }
  1105. return 1;
  1106. }
  1107. lua_pushstring(state, "lua_PhysicsSpringConstraint_static_getRotationOffset - Failed to match the given parameters to a valid function signature.");
  1108. lua_error(state);
  1109. break;
  1110. }
  1111. default:
  1112. {
  1113. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1114. lua_error(state);
  1115. break;
  1116. }
  1117. }
  1118. return 0;
  1119. }
  1120. int lua_PhysicsSpringConstraint_static_getTranslationOffset(lua_State* state)
  1121. {
  1122. // Get the number of parameters.
  1123. int paramCount = lua_gettop(state);
  1124. // Attempt to match the parameters to a valid binding.
  1125. switch (paramCount)
  1126. {
  1127. case 2:
  1128. {
  1129. if ((lua_type(state, 1) == LUA_TUSERDATA || lua_type(state, 1) == LUA_TTABLE || lua_type(state, 1) == LUA_TNIL) &&
  1130. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  1131. {
  1132. // Get parameter 1 off the stack.
  1133. bool param1Valid;
  1134. gameplay::ScriptUtil::LuaArray<Node> param1 = gameplay::ScriptUtil::getObjectPointer<Node>(1, "Node", false, &param1Valid);
  1135. if (!param1Valid)
  1136. {
  1137. lua_pushstring(state, "Failed to convert parameter 1 to type 'Node'.");
  1138. lua_error(state);
  1139. }
  1140. // Get parameter 2 off the stack.
  1141. bool param2Valid;
  1142. gameplay::ScriptUtil::LuaArray<Vector3> param2 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, &param2Valid);
  1143. if (!param2Valid)
  1144. {
  1145. lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector3'.");
  1146. lua_error(state);
  1147. }
  1148. void* returnPtr = (void*)new Vector3(PhysicsSpringConstraint::getTranslationOffset(param1, *param2));
  1149. if (returnPtr)
  1150. {
  1151. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  1152. object->instance = returnPtr;
  1153. object->owns = true;
  1154. luaL_getmetatable(state, "Vector3");
  1155. lua_setmetatable(state, -2);
  1156. }
  1157. else
  1158. {
  1159. lua_pushnil(state);
  1160. }
  1161. return 1;
  1162. }
  1163. lua_pushstring(state, "lua_PhysicsSpringConstraint_static_getTranslationOffset - Failed to match the given parameters to a valid function signature.");
  1164. lua_error(state);
  1165. break;
  1166. }
  1167. default:
  1168. {
  1169. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1170. lua_error(state);
  1171. break;
  1172. }
  1173. }
  1174. return 0;
  1175. }
  1176. }